{"version":3,"sources":["scripts/app.js"],"names":["MarkerClusterer","map","opt_markers","opt_options","this","extend","google","maps","OverlayView","map_","markers_","clusters_","sizes","styles_","ready_","options","gridSize_","minClusterSize_","maxZoom_","imagePath_","MARKER_CLUSTER_IMAGE_PATH_","imageExtension_","MARKER_CLUSTER_IMAGE_EXTENSION_","zoomOnClick_","undefined","averageCenter_","setupStyles_","setMap","prevZoom_","getZoom","that","event","addListener","zoom","resetViewport","redraw","length","addMarkers","Cluster","markerClusterer","markerClusterer_","getMap","getGridSize","getMinClusterSize","isAverageCenter","center_","bounds_","clusterIcon_","ClusterIcon","getStyles","cluster","styles","opt_padding","getMarkerClusterer","padding_","cluster_","div_","sums_","visible_","iframeReady","scope","showLoaderImage","s2ab","s","buf","ArrayBuffer","view","Uint8Array","i","charCodeAt","Workbook","SheetNames","Sheets","sheet_from_array_of_arrays","data","headerIndex","instructionIndex","ws","range","c","r","e","wscols","angular","forEach","val","push","wch","R","C","cell","v","font","name","sz","cell_ref","XLSX","utils","encode_cell","t","Date","z","SSF","_table","datenum","bold","merge","encode_range","module","ServerTableCslService","ngTableDefaults","$location","$rootScope","$q","NgTableParams","TrackTraceCslService","AdvSearchCslService","UserService","TrackTraceCslPaginationService","sortFields","orderBy","sorting","result","isNaN","x","replace","p","getQuery","query","getData","params","queryParameterName","queryParameterValue","sort_params","table_filters","getCurrentSearch","search","new_url","page_from","localStorage","getItem","setItem","key","criteria","state","loading","$broadcast","q","propName","page_number","get_page_number","per_page","get_per_page","page","queryShipments","timeoutPromise","then","resp","every","status","total","error","shipments","JSON","parse","slice","isEmpty","ngTable","count","shipmentData","parseInt","ngTableChanges","searchRequest","counts","defaultSettings","defaultSort","filterOptions","filterComparator","initialParams","getUserTableSettings","$watch","newValue","oldValue","$defer","resolve","reload","clearTimeout","getState","getParams","parameters","getTable","getTableParams","reloadTable","invalidate_cache","setQuery","defer","settings","service","$inject","ServerTableCslController","$scope","$stateParams","$http","$timeout","$resource","CustomResultsCslService","$translatePartialLoader","$log","$filter","$translate","ContactsService","ShippingDetailsCslService","slug","mdSelectHelper","getStatusColors","vm","status_colors","aljex_page_number","paginate_no","queries","save_page_number","aljex_per_page","paginate_record","save_per_page","sortClickable","target","parentElement","className","aljexSortBy","$column","parsedSortable","sortable","tableParams","inverseSort","sortingParams","ctrlKey","metaKey","returnData","onResizeEnd","args","preventDefault","stopPropagation","id","width","getHeaderWidth","item","filterDate","filter_by","filters","moment","format","updateFilteredCounts","filterTime","timezone_name","tz","guess","timezone_symbol","checkStatus","row","isdelivered","paramName","paramValue","getException","number","tooltipIsLoading","getPotentialException","getShipment","response","title","potential_exceptions","description","addPart","shipdate","duedate","isLoading","columns","getColumnHeaders","filtersVisible","onSelectOpen","onSelectClose","$on","path","indexOf","filter","k","isFiltered","setResultsCount","setSubjectStatuses","trackTrace","exceptions","exception_count","potential_exception_count","results","noResults","isError","controller","ngTableSorterRow","directive","restrict","templateUrl","ngTableFilterRowAljex","setColumnHeaders","activeCol","columnHeaders","aljexColumns","d","show","j","activeAljexColumns","field","unshift","tdClass","class","static","setActiveColumns","defaultAljexColumns","getActiveColumns","getDefaultColumns","getAllColumns","getAvailableColumns","sort","a","b","CustomizeResultsCslController","api","$mdDialog","$window","$mdToast","permissions","cancel","activeColumnsCopy","colHeight","innerHeight","add","column","activeColumns","index","availableColumns","splice","tempActiveColumns","copy","tempAvailableColumns","stringify","remove","debug","dragListener","accept","sourceItemHandleScope","destSortableScope","itemMoved","orderChanged","allowDuplicates","showToastWithFile","file","messages","delay","position","hideDelay","preserveScope","locals","parent","element","document","getElementById","saveToDefault","column_array","method","url","user","default_columns","success","window","removeItem","restoreDefault","onlyInA","allColumns","compare","onlyInB","concat","submit","hide","availableSearchChange","lcs","availableSearchField","toLowerCase","clickedAvailableSearchX","otherArray","current","other","getUserData","hasFinancialPermissions","canAccess","shipment","financial","ServerTableCmtsService","TrackTraceCmtsService","AdvSearchCmtsService","TrackTraceCmtsPaginationService","ServerTableCmtsController","CustomResultsCmtsService","ShippingDetailsCmtsService","planned_start","planned_end","cmtsFiltersVisible","ngTableFilterRowCmts","CustomizeResultsCmtsController","ServerTableCfsService","TrackTraceCfsService","AdvSearchCfsService","TrackTraceCfsPaginationService","CustomResultsCfsService","ServerTableCfsController","ShippingDetailsCfsService","codeArray","descArray","array","includes","code","join","CustomizeResultsCfsController","ServerTableABService","AJAX","$mdMedia","TrackTraceService","paramsName","dfd","promise","ngTableReload","ngTableData","paginationMaxBlocks","dataset","queryState","displayNoResults","isFilterLoading","active","exception","potential","customFullscreen","getQueryState","ServerTableABController","CustomResultsABService","ngTableEventsChannel","ShippingDetailsService","checkSelectedInput","onPagesChanged","p1","p2","p3","tmp","listSelectedCount","selectAll","selected","checkAll","selectUser","tabledata","viewAccountCreation","getShipmentReferences","toString","results_filtered","Object","values","setResultsFiltered","noDataResults","getShipmentException","tabName","searchParamStatusVal","actionTableData","CustomizeResultsABController","$state","column_type","default_column_type","is_consignee_user","check_consignee_user","loadActionColumns","cookiedata","savedDefaults","savedData","defaultColumns","load_Actioncolumns","load_defaultColumns","load_activeColumns","isDate","truncate","disabled","link_class","uniqueRef","object","uniqueArray","prototype","obj1","obj2","property","apply","onAdd","setReady_","draw","size","height","fitMapToMarkers","marker","markers","getMarkers","bounds","LatLngBounds","getPosition","fitBounds","setStyles","isZoomOnClick","getTotalMarkers","setMaxZoom","maxZoom","getMaxZoom","calculator_","numStyles","dv","Math","min","text","setCalculator","calculator","getCalculator","opt_nodraw","pushMarkerTo_","isAdded","repaint","addMarker","removeMarker_","m","removeMarker","removed","removeMarkers","ready","createClusters_","getTotalClusters","setGridSize","setMinClusterSize","getExtendedBounds","projection","getProjection","tr","LatLng","getNorthEast","lat","lng","bl","getSouthWest","trPix","fromLatLngToDivPixel","y","blPix","ne","fromDivPixelToLatLng","sw","isMarkerInBounds_","contains","clearMarkers","opt_hide","oldClusters","setTimeout","distanceBetweenPoints_","dLat","PI","dLon","sin","cos","atan2","sqrt","addToClosestCluster_","distance","clusterToAddTo","center","getCenter","isMarkerInClusterBounds","mapBounds","getBounds","isMarkerAlreadyAdded","l","calculateBounds_","len","updateIcon","getSize","mz","sums","setCenter","setSums","triggerClusterClick","trigger","createElement","pos","getPosFromLatLng_","style","cssText","createCss","innerHTML","panes","getPanes","overlayMouseTarget","appendChild","isDragging","addDomListener","latlng","iconAnchor_","width_","height_","top","left","display","onRemove","parentNode","removeChild","text_","index_","useStyle","max","url_","textColor_","anchor_","textSize_","backgroundPosition_","backgroundPosition","txtColor","txtSize","ForecastCslController","$element","$httpParamSerializer","getPercentageFtl","round","ftl_count","ltl_count","intermodal_count","getPercentageLtl","getPercentageIntermodal","container","color","icon","icon_class","colspan","rowspan","crate","empty","box","createVessel","n","vessel","containers","createForecast","Number","isInteger","value","isFinite","floor","keys","crates","boxes","ceil","loopBoxCount","getDay","date","getDate","getDateForTT","getTotal","delivered","ontime","viewOnTrackAndTraceCsl","time_val","arrive_date_from","arrive_date_to","shipment_type","payload","mode","forecast_aljex_custom_options","open","component","bindings","mobile","fivedayCslService","stateArray","Array","getAllStateCode","get","url_v2","res","getStateCode","getMatch","post","reject","save","editForecast","request_method","put","deleteForecast","forecasts","FiveDayCslForecastController","selectedDateChange","getUrl","getDays","days","is_record","query_debounce","toggleOptions","optionsActive","forecastEditId","onLaneTypeTabSelected","tab","tabIndex","lastTabIndex","selectOptionRowById","custom_forecasts","setPayLoadForForecasts","opt","origins","destinations","lane_pairs","forecast_label","isMobile","innerWidth","huh","selectedItemChange","request","hasData","parseData","is_high","ref_numbers","getDefault","is_default","selectedOptionRow","checkClear","getCustomForecasts","firstLoad","timeoutId","date_from","set5DFDefaultAljex","customerType","switchEmailCslType","userCompanyCsl","encodeURIComponent","userDepartmentCsl","userDepartmentCompanyCsl","dummyUser","urlString","timeout","requestId","origin","destination","lane_type","label","origin[]","destination[]","get5DFDefaultAljex","toDate","lane_pairs[]","editForecastOptions","forecastsLoading","customEditChck","selectedOptionRow1","o","CustomOptionsCslController","$mdConstant","DepartmentManagementService","$anchorScroll","isRootforecastEditId","customForecasts","initNewOption","newOption","getMatches","searchText","autocompletes","chipDisplay","chip","packageCustomForecasts","theForecasts","forecast","customer_type","newRecordEmpty","record","newRecord","deleteOptionRow","oldCustomForecasts","customOptionsForm","$setPristine","requireAtLeastOne","model","removeOtherDefaults","emptyData","isValid","equals","closeModal","showApiError","apiErrorMessages","useFullScreen","body","clickOutsideToClose","fullscreen","all_forecasts","errors","constructor","KEY_CODE","COMMA","state_origin","BreakdownCslController","getColor","drawBreakdown","querySelector","offSetWidthVal","offsetWidth","svg","attr","d3","select","append","multiplier","breakdown","enter","bars","num_bars","on","tip","html","line","offset","call","potentials","totalpipes","barValues","maxIndex","bind","template","onDelete","ForecastCmtsController","getPercentageTl","tl_count","viewOnTrackAndTraceCmts","transport_mode_name","forecast_cmts_custom_options","fivedayCmtsService","FiveDayCmtsForecastController","switchEmailCmtsType","userCompanyCmts","userDepartmentCmts","userDepartmentCompanyCmts","CustomOptionsCmtsController","BreakdownCmtsController","ForecastCfsController","local_count","getPercentageLocal","viewOnTrackAndTraceCfs","fivedayCfsService","FiveDayCfsForecastController","switchEmailCfsType","userCompanyCfs","userDepartmentCfs","userDepartmentCompanyCfs","CustomOptionsCfsController","BreakdownCfsController","WidgetsCslController","toggleCollapse","ev","collapsed","setCollapsed","collapsibleLayout","collapseState","editBookmarks","showRemoveButton","doneEditingBookmarks","sendMessage","getCurrentUrl","absUrl","getShipmentDetails","getShipmentSummary","isCollapsed","bookmarksLoaded","bookmarks","bookmarksCount","isBookmarksFirstLoad","hasCachedBookmarks","bookmarksError","type","getCachedBookmarks","load_bookmarks","getBookmarks","successResponse","flags","flag","jobno","unBookmarkId","pro","currentPagePro","getShipmentPro","getStatus","expression","switchUser","WidgetsCmtsController","load_cmts_bookmarks","load_id","currentPageLoadId","getShipmentLoadID","WidgetsCfsController","ServerTableSRService","support_request_data","company_tickets","supportRequestTab","getCount","showExportCSV","targetEvent","closeDialog","exportAll","ServerTableService","exportCsvLoaded","AdvSearchService","exportSearchFields","alert","htmlContent","instant","ariaLabel","ok","exportCustom","ServerTableSRController","CustomResultsSRService","setNewColumnHeaders","validation_user","cview_classic_admin","supportrequestAdminCheck","supportrequestUserCheck","globals","tableParams1","debugId","checkbox","lensviewUsersController","UserManagementService","lensviewUsersPopupService","lensviewService","subscribeToTable","userTable","getSelectedCount","add_userslens","loadLensUsersFlag","answer","search_deptlens","searchflag","search_deptlens_criteria","isClear","searchData","getUserTable","getField","charAt","toUpperCase","substr","getLink","link","getClass","is_active","user_status","count1","getSelectedUsers","count2","addSectedusers","getList","countUser","selectedCompanies","userExists","tempUser","addUserTable","all_Ids","selectedUsers","del_user_ids","getDeletedLensUsers","setSelectedLensUsers","setDeletedLensUsers","setUserAddCheck","clearAll","getUsers","gotoSelectUser","lastSelected","lastSelectedValue","$event","shiftKey","shiftSelect","first","last","resetSelected","bulkDelete","databaseusers","newusers","totalusers","params_newUsers","user_ids","value1","key1","value2","key2","deleteUserTable","headers","Content-Type","showModal","cww","Company","csl","cfs","cmts","readAccessUsers","buttons","action","lensviewIcon","lensviewtitle","lensviewtitle2","lensviewtable","searchListData","showUserText","viewUserTextLens","getLensgroupUsers","dd","getCompanyUsers","PermissionsService","DownloadService","Upload","exportUserLogs","req_params","filename","getDownloadFile","getCompanies","deferred","companies","getCompany","company","getContacts","forceLoad","cachedContacts","contacts","getContactPhotos","contactPhotos","getPermissions","getUser","createUserObject","unpackageUser","contact","primary_contact","bulkCreate","users","prepare_bulk_communications","packageUsers","unpackageUsers","run_timeout","bulkUpdate","exitLoadState","resendConfirmation","data_settings","u","confirmed","timeoutTid","TIMEOUT","users_url","uploadFile","errFiles","upload","user_csv","bulk_users","f","getBulkUsers","postBulkUsers","parsePermissions","group","packageUser","theUser","updatedUser","meUser","is_crane","bccs","contact_id","roles","is_crane_contact","ix","user_data","company_id","hasPermissions","autoComplete","postUser","updateUser","deleteUser","getName","first_name","last_name","email","resetBCCS","resetPrimary","loadData","PotentialException","Shipment","User","BookShipment","party_id_names","related_party_id_names","notification_settings","milestone_delivered","getSelectedLensUsers","deletedUsers","resetSelecteduser","generatePotentialPermissions","clean_user","clearUser","getCompanyDetails","getRoles","getUserDetails","lensviewUsersPopupController","userTableData","userList","objUser","clearbtn","lensviewDepartmentsController","CompanyManagementService","NgTableParam","departmentTable","changeCustomerType","is_cww","is_csl","is_cfs","is_cmt","department","default_contact_id","default_bccs","is_reskin","reskin_type","customer_type_cehck","is_cmts","cancelCustomerType","textCustType","changeCustomerSettings","statusChanged","changeCustomerTypeEdit","onReskinChange","reskin_check","changeReskin","check","addPartyIds","party_check","addPartyIdsEdit","department_ids","getSelectedDepartment","bulkDeleteDepartments","bulkDeleteDemo","is_demo","bulkDeleteDepartmentsDemo","modal","add_deptlens","message","edit_deptlens","customer_types","readAccess","typeCust","getMatchs","autoCompletes","getMatchCww","autocompleteCww","getMatchCsl","getMatchCfs","getMatchCmts","saveDepartment","isSave","party_ids_check","related_party_ids_check","party_check_new","formIsValid","updateDepartment","dept_id","party_ids_check1","related_party_ids_check1","party_check_new1","formDetails","$valid","getDepartmentTable","substring","depart","countLens","obj","LensCount","allDepartment","lensviewtitleedit","getDepartmentObject","cssClass","possibleContacts","showDepText","ENTER","TAB","getDepartments","params1","params2","find","autocompleteCsl","autocompleteCfs","autocompleteCmts","filterVals","buildQuery","theData","department_id","departments","CslExceptionService","addUserCheck","bulkDeleteExceptions","console","log","getSelectedException","exceptionTable","getExceptionObject","exception_id","getExceptions","csl_exception_approvers","getExceptionTable","addExceptionstable","cslExceptionController","showAllClientExceptionFlag","currentPage","showAllClientExceptionOrg","showAllClientException","approver_level","addExceptions","search_exceptions","addAllClientRow","allException","approver_ids","viewUserText","LensviewCompanyPopUpService","companyTable","param","company_url","getCompanyObject","unpackageCompany","deleteCompany","getSelectedCompanies","setSelectedLensCompanies","selectedLensCompanies","getSelectedLensCompanies","setDeletedLensCompanies","deletedLensCompanies","getDeletedLensCompanies","resetSelectedLensCompanies","getCompanyTable","lensviewCompaniesController","userLensGroupService","add_companieslens","search_companieslens","search_companieslens_criteria","addSectedCompanies","countCompany","companyExists","tempCompany","addCompanytable","del_company_ids","removeElem","company_ids","databaseCompanies","newCompanies","totalCompanies","params_newCompanies","DeleteLensGroupTable","getReadOnly","lensviewAddTitle","currentStateObj","getNameData","companiesList","companiesListData","getCompanyRouteStatus","lensviewCompaniesPopUpController","companyList","objCompany","CmtsExceptionService","cmts_exception_approvers","cmtsExceptionController","CfsExceptionService","cfs_exception_approvers","cfsExceptionController","routerHelperProvider","$locationProvider","$stateProvider","$urlRouterProvider","$windowProvider","RouterHelper","$document","logger","configureStates","states","otherwisePath","config","resolveAlways","hasOtherwise","otherwise","handleRoutingErrors","toState","toParams","fromState","fromParams","handlingStateChangeError","stateCounts","loadedTemplateUrl","msg","statusText","warning","init","updateDocTitle","getStates","changes","docTitle","$get","history","pushState","location","hash","configure","cfg","provider","toastr","info","warn","showToasts","factory","activeTimeoutPromise","new_query","hasOwnProperty","loads","isTimeout","active_count","unfiltered_counts","lastcheckcalldate","lastcheckcalltime","lastcheckcalllocation","lastcheckcallstate","lastcheckcalldetails_new","delivery_date","deliverydate","delivery_time","deliverytime","deliverydatetime_new","pickup_appt_date","pickupapptdate","pickup_appt_time","pickupappttime","pickupappointmentdatetime_new","deliveryAppt_date","consigneeapptdate","deliveryAppt_time","consigneeappttime","consigneeapptdatetime_new","$$state","blankData","pins","Error","globalSearchData","service_level_codes","reason_codes","search_params","business_type_codes","results_count","totalShipments","potentialExceptions","long","isNoResults","collapse","getShipments","getPotentialExceptions","setGlobalSearchData","getGlobalSearchData","getShipTotal","num","bool","getPins","getStatusOptions","TrackTraceCslController","aljexSearchChange","searchType","searchDestinationText","searchOriginText","queryVal","consigneeapptdateRangeIsSelected","consigneeDateRangeSelect","consigneeapptdate_start_date","consigneeapptdate_end_date","consigneeapptdate_start_date_new","consigneeapptdate_end_date_new","deliverydateRangeIsSelected","deliveryDateRangeSelect","deliverydate_start_date","deliverydate_end_date","deliverydate_start_date_new","deliverydate_end_date_new","pickupapptdateRangeIsSelected","pickupDateRangeSelect","pickupapptdate_start_date","pickupapptdate_end_date","pickupapptdate_start_date_new","pickupapptdate_end_date_new","querySelectorAll","aljexSearchType","visualize","hardRefresh","keyCodeString","hardRefreshCodes","selectRange","start","end","dateChanged","toggleLimitOptions","limitOptions","showNoShippmentsAlert","textContent","disableUrlReplacement","quickFilters","searchFields","getCurrentSearchFields","quick_filter","filterLabels","setFilterDisplayWithActiveFilter","setCurrentSearchFields","filteredType","isActive","isException","isPotentialException","isFilteredOut","isFilterActive","setFilterButtons","filterType","getActiveShipments","button","tagName","gshpid","quickSearch","getEmptySearchFields","showCustomizeResults","showLoadAnimation","hideLoadAnimation","loadingState","aljex_due_start_date","aljex_due_end_date","ship_start_date","ship_end_date","aljex_estimated_start_date","aljex_estimated_end_date","isAwbBolQuickSearch","statusOptionsVar","aljexDueDateRangeSelect","hasExportPermissions","aljexMinDate","subtract","quarterAdjustment","month","lastQuarterEndDate","months","endOf","lastQuarterStartDate","clone","startOf","aljexRanges","refresh","getSearch","searchParamsCount","test","newParams","currentSearchFields","getLastSearchLocally","paramSearchFields","foundParamSearch","findAndTextInDateRange","newV","split","potential_exception_id","listSavedSearches","isSavedSearch","getIsFirstSearch","loadSearch","setIsFirstSearch","paginate","load_cmts","TrackTraceCmtsController","searchRouteNumberText","searchLoadNumberText","searchBolNumberText","searchProNumberText","searchTPCNameText","searchTPCNumberText","searchTPClientNameText","searchTPClientNumberText","plannedstartdateRangeIsSelected","planned_start_start_date","planned_start_end_date","plannedSatrtDateRangeSelect","plannedenddateRangeIsSelected","planned_end_start_date","planned_end_end_date","plannedEndDateRangeSelect","planned_start_start_date_new","planned_start_end_date_new","planned_end_start_date_new","planned_end_end_date_new","statusOptVar","isBookedOptionsVar","billingStatusVar","transportModeVar","serviceOptionVar","equipmentNameVar","logs","TrackTraceCfsController","TrackTracePaginationService","searchCriteria","get_sort_params","ngTableChangess","shipmentDatas","resps","totals","ServerTableController","CustomResultsService","cwwSortBy","save_sort_params","loadColumns","multipleKeyPress","attrs","modifiers","keyEvent","String","which","InMemoryTableController","rowSelection","multiSelect","autoSelect","decapitate","largeEditDialog","boundaryLinks","limitSelect","pageSelect","order","limit","ExceptionMapController","setSize","mapObject","responsive","geographyConfig","popupOnHover","highlightOnHover","borderColor","borderWidth","fills","HIGH","MEDIUM","LOW","defaultFill","mapPlugins","exceptionMapPin","layer","self","latitude","longitude","latLngToXY","addEventListener","mapPluginData","customResultsService","load_columns","CustomizeResultsController","anchorSmoothScroll","scrollTo","eID","currentYPosition","pageYOffset","documentElement","scrollTop","elmYPosition","elm","offsetTop","node","offsetParent","startY","stopY","speed","step","leapY","timer","ngTableActionBoard","actionBoardCtrl","ActionBoardService","ActionBoardController","$interval","notAuthorize","beforeLoad","loader","showList","view_action_board","getAllActionBoardData","autoRefershTime","action_board_time","refreshData","errorMessage","autoReferesh","dataRefresher","toggleTime","sessionTime","initTableData","heading_text","openAllShipment","is_OnLoadApiCall","is_onRefereshApiCall","all_Action_boardData","tableData","getDataByDate","ActionBoardRecords","$today","dates","subDays","getDayOfWeek","addDays","refereshID","refereshVal","setPageFlag","someDate","today","makeToggleActive","refereshTime","idx","scrollToPosition","expandShipment","loadTableData","shipment_records","dataLoading","indx","currentDate","getDateFormat","getAction_board_Data","action_board_records","ids","expandMoreShipping","slowScroll","targetOffset","$","scrollPostion","animate","stop","autoScroll","bottom","setInterval","exc","dayOfWeek","getUTCDay","getAction_board_autoRefereshed","resetAuth","uid","client","access-token","expiry","storeResetAuth","mm","getMonth","yyyy","getFullYear","dat","valueOf","shipment_summary","arc","cachedBookmarks","check_calls","getUserBookmarks","quer","PLANNED","color-code","hover_icon","PICKUP","LOADED","CONSIGNEE","UNDELIVERED","DELIVERED","getCheckCalls","res1","bookmarkShipment","bookmark_type","bookmark_id","discussion_bookmark_id","bookmarkNotification","user_id","unBookmarkNotification","markAsRead","unBookmarkShipment","bookmark","unBookmarkShipmentDiscussion","ref_num","origincity","destinationcity","strokeWidth","strokeColor","greatArc","arcSharpness","radius","fillKey","dest","customername","awb","getInvoice","getLineCharges","getMilestone","getShipmentVariable","getArc","resetArc","resetPins","getLoad","downloadDocument","responseType","blob","Blob","URL","createObjectURL","href","download","click","chunkArray","myArray","chunk_size","myChunk","arrayLength","tempArray","saveDiscussionText","getDiscussionData","getSuffixDate","lastDigit","ShippingDetailsCslController","NgMap","$sce","$mdpTimePicker","downloadLink","google_api_url","removeFile","files","attachments","myEl","discussion_text","trim","submitBtnReply","submitBtn","clearChatForm","removeDuplicateFiles","origArr","found","newArr","origLen","findData","searchDiscussionNew","searchDiscussionOld","cancelFindData","findText","sendNotification","userId","isBookmarkedNotification","setBookmarkButtonNotification","showBookmarkToastWithUrl","err","bookmarkShipmentError","findAttachmentComments","isAttachmentsNotification","val1","discussion_chat","replies","original_discussion_chat","getPermissionsValue","responsePermissionsData","verticalGreenLine","reCalVerticalGreenLine","isCurrentShipment","currentShipment","isBookmarked","isFinancialPermission","documenttype","row_length","getDocumentsCount","pinTo","getToastPosition","toast","setProgressStatus","now","departuredate","isAfter","progressStatus","daysRemaining","isBefore","startBookmarked","isBookmarking","setBookmarkButton","bookmarkButtonText","bookmarkShipmentDiscussion","bookmarksCount1","isBookmarkedDiscussion","discussion_bookmarks","isBookmarkingDiscussion","setBookmarkButtonDiscussion","getConsigneeAddress","address_labels","getShipperAddress","calcInvoiceTotal","inv","shipment_invoices","sum","totalinvoiceamount","isMarked","bookmarkButtonTextDiscussion","invoiceData","invoiceDetails","lineChargesData","invoiceLineCharges","line_charges","milestoneData","shipment_milestones","milestones","last_status_details","next_status_details","estimateddelivery","origin_geocode","origin_lat","parseFloat","origin_lng","destination_geocode","dest_lat","dest_lng","filtersData","pickupdate","referenceNumberObject","getReferenceNumberObject","shipment_references","isReferenceNumbers","setDaysRemaining","unseen_discussion_count","markReadCheck","barPercentage","getBarPercentage","chatContactsAutocompleteCsl","failedToRetrieveData","check_calls_filter","field_name","time","filter_requested_data","filterData","ngMapway","ngGpsMapway","ngmap","ngMapLocations","checkPtsLocation","gps_check_calls","checkCallsCount","check_calls_status","originStatus","destinationStatus","state_name","origin_state_name","serial_no","geocodes","stopover","imageType","chunk_array","destination_state_name","googleMap","initMarkerClusterer","highlight_check_call_pt_jquery","highlight_check_call_pt","scrollCheckptDetails","update_highlight_image","serial_nos","objectContainsKey","referencenumber","referencecode","prop","sanitizePosition","toastPosition","percentage","departdate","denomDiff","getTime","numDiff","timeDiff","diffDays","convertDate","convertTime","getReasonDescription","milestone","reasoncode","reasondescription","desc","milestonecode","docDate","pad","content","docName","right","showInvoice","_invoice_","invoice","address","invoice_date","invoicedate","getContainers","shipment_containers","containerHistory","eventtime","contno","containers2","reverse","showContainerDetails","currentMilestone","ref_no","controllerAs","showExceptionsModal","list","exceptionList","$new","doneBookmark","jumpToDashboard","gotoMilestome","goToReference","expandInvoice","showListViewChange","showListView","showWayPointDiv","infowindow","previousMarker","icon_new","icons","setIcon","isHighlight","showListFilter","showListFilterChange","getDetailsHighlight","indexNo","getComments","autocompleteData","pro_number","chatContactsListCsl","autocompletetimer","company_contacts","chatSoket","faye","Faye","Client","subscribe","dataComment","current_date","parent_id","chat_data","chat_msgs","showReplyTextBox","msg_id","usr_id","replyId","focusIndex","tagged_users","cursorPointerLocation","addClass","removeClass","scrollElement","getPrecedingChar","sel","precedingRange","precedingChar","getSelection","rangeCount","getRangeAt","cloneRange","setStart","selection","createRange","duplicate","moveToElementText","setEndPoint","set_cursor","containerEl","charIndex","nodeStack","foundStart","pop","nodeType","nextCharIndex","setEnd","childNodes","removeAllRanges","addRange","getCursorCoOrdinates","rect","boundingLeft","boundingTop","getClientRects","span","createTextNode","insertNode","spanParent","normalize","scrollContainer","fromPt","toPt","hasClass","chat_text_submit","parentId","discussion_comment_text","replacedText","replacePattern1","replacePattern2","replacePattern3","user_name","transformRequest","formData","FormData","comment","chatShipmentError","reply_comment_display","index_no","replyCommentId","markRead","csl_discussion_count","mapStyle","featureType","elementType","stylers","invert_lightness","saturation","lightness","gamma","hue","visibility","way1","way2","downloadlink","bookmarkType","googleMapsUrl","show_class_access","expandedInvoices","invoicesIsExpanded","expandedShippingDetails","shippingDetailsIsExpanded","expandedRefNumbers","refNumbersIsExpanded","setInvoicesExpanded","setShippingDetailsExpanded","setRefNumbersExpanded","progressStatusText","verticalLineHeight","userListOpen","file_size_array","discussion_file_format","discussion_file_format1","shipmentDetails","potentialException","currentException","discussion_visibility","customer_type_setup","discussion_enabled","checkpoints","lastCheckPt","mouseOverIcons","selectedMarkerIcons","fileNameChanged","messageData","attributes","message_id","file_upload_error","bytes","toFixed","highlight","haystack","trustAsHtml","RegExp","match","removableMarkers","setPosition","markerCluster","city","createMarkerForCity","clusterMarkers","clusterMarkerIcons","clusterOptions","zoomOnClick","gridSize","InfoWindow","clusteredMarkers","MVCObject","set","state_names","cursorPointer","close","setContent","Marker","image","Size","Point","anchor","scaledSize","userFilter","comment_text_array","userSelect","replyTagPopup","commentTagPopup","extractContents","currentCursorPoint","startOffset","currentLineStringsAfterCursor","startContainer","currentLineStringsUptoCursor","textAfterAtSymbol","lastIndexOf","removeStringAftreAtSymbol","lastAtSymbolPosition","beforeAtSymbol","afterAtSymbol","pasteHtmlAtCaret","deleteContents","el","lastNode","frag","createDocumentFragment","firstChild","setStartAfter","pasteHTML","openUserTagsDiv","msgId","checkTagWord","discussion_comment_html","innerText","curserPointData","getElementsByTagName","clientX","clientY","cursor_point_length","setManualCrusorPoint","getElementsByClassName","replyMsg","keyCode","triggerHandler","$apply","scroll","hT","hH","outerHeight","wH","wS","collection","keyname","output","scrollToBottomCsl","$watchCollection","newVal","scrollHeight","$parse","elem","offsetHeight","heightDeduct","animation","NG_HIDE_CLASS","beforeAddClass","done","slideUp","slideDown","input","names","full_name","closeToast","getStops","entity","ShippingDetailsCmtsController","stopsData","shipment_stops","stops","chatContactsAutocompleteCmts","chatContactsListCmts","cmts_discussion_count","scrollToBottomCmts","ShippingDetailsCfsController","chatContactsAutocompleteCfs","chatContactsListCfs","cfs_discussion_count","scrollToBottomCfs","ShipmentPotentialExceptionsController","dataToPass","setHeight","css","$parent","shippingDetailsMap","iElement","renderChart","rendering","render","renderMap","elHeight","duration","geo","equirectangular","scale","translate","g","land","boundary","datum","newVals","oldVals","calcMid","d1","abs","d2","pow","mid","defs","feMerge","arcs","arc_data","pair","m1","m2","interpolate","colors","laneColor","each","totalLength","getTotalLength","interpolateString","transition","attrTween","pWidth","pHeight","ease","SDMapController","legendHeight","arcConfig","animationSpeed","popupTemplate","geography","pinsConfig","fillColor","tooltip","shippingDetailsLegend","lanePair","shippingDetailsPin","ContainerDetailsService","event1","event2","event3","event4","getTableData","ContainerDetailsController","closeContainerDetails","lensview","lensviewController","whenDoneAnimating","readOnlyView","admin_check","showAllClientFlag","showAllClientOrg","showAllClient","showAllClientOrgCsl","showAllClientCsl","showAllClientOrgCfs","showAllClientCfs","showAllClientOrgCmts","showAllClientCmts","lensGroupTable","resetList","serachData","openShipLink","submitShiplinkText","currentUser","default_text","shiplnkTextDataVal","changeCompany","companyId","companyName","portalType","departmentCheck","serachDataCompany","focusSearchTxt","focusTxt","showLensview","clearSwitchEmail","switchEmail","loadRecent","zeroRecord","custType","recentSearch","lens_groups","loadFavorites","favourite","company_count","addDepartments","depart_names","company_name","defaultRole","demoEmail","userEmail","removeDepartments","removeCompany","getMatchesCompanies","selectedCusTypeChange","notValidDemoEmail","defaultShiLinkData","customer_type_default","shiplinkDefault","setDefaultText","clearText","defaultbtn","shipLink","selected_awb_autocomplete","searchTextDepart","selectedCompanyChange","default_company_name","resetSelectionCompany","setDefaultCompany","company_customer_type","cancelDefaultCompany","clearDefaultCompany","selectedDepartmentChange","department_name","selectedUserChange","userrole","cid","showLoader","getMatchesDepartments","getShipmentLink","awb_with_gspid_autocomplete","selectedLinkChanges","protocol","host","selectedUrlLinkChanges","resetSelection","getCompaniesList","add_lens","search_lens","searchFlag","updateAccount","lensgroupName","lensgroupDescription","isCreate","updateLensGroup","saveBtnShow","loadLensGroupData","getLensGroupTable","getLensGroups","getCompanyLensTable","oldData","mangaeLensGroupCheck","showLensText","readOnly","lensGroupTableDataByName","setReadOnly","lensGroupTableData","lensGroup","allLensGroup","addGroupsInUsers","searchGroups","searchValue","userID","cname","bookingCheck","bookingEnable","dataswitchEnable","lensviewType","searchval","userCompany","switchEmailCww","userCompanyCww","switchEmailCsl","switchEmailCfs","switchEmailCmts","userDepartment","userDepartmentCompany","userDepartmentCompanyName","userDepartmentCww","userDepartmentCompanyCww","userDepartmentCompanyNameCww","userDepartmentCompanyNameCsl","userDepartmentCompanyNameCfs","userDepartmentCompanyNameCmts","switchEmailCwwType","lens_group_recent","portal_type","addToFavorites","recentData","recent_type","recent_id","lensGroups_ids","bulkDeleteLensGroup","databaseLensgroups","newLensgroups","totalLensgroups","all_client_id","params_newLensgroups","lens_grp_ids","DeleteCompanyLensTable","lens_group_ids","DeleteLensCompanyTable","getSelectedLensGroup","lens_grp_manage","readAccessLens","lens_mode_view","demoCWW","demoCSL","demoCFS","demoCMTS","urlText","shiplnkTextData","shiplinktext","shipLinkDef","role_count","readlens","currentstate","defaultDemoType","evt","showAllClientFlagCsl","showAllClientFlagCfs","showAllClientFlagCmts","lensGroupButtons","user_emailId","strickCheck","CslDataSwitch","setNameData","focus","maxCharacters","lastSpace","alerts","AlertsController","AlertsService","$mdMenu","getAlerts","getAlertsCount","unread","clickAlert","alertData","alertsClosed","notification","notifiable_type","notifiable_id","putAlertAPI","refreshAlerts","getAlertsAPI","closeAlerts","alertIcon","sortAlerts","created_at","processAlerts","alertz","pAlerts","titleText","messageText","actionable_item","getAlertsAPIPromise","getAlertAPIPromise","putAlertAPIPromise","getAlertAPI","isRead","loadmask","$compile","defaults","backgroundColor","progressIndicatorSize","fixedCenter","loadmaskBackgroundColor","loadmaskDuration","loadmaskProgressIndicatorSize","loadmaskFixedCenter","loadMaskElement","progressIndicatorElement","testElement","parentIsCard","opacity","classList","offsetY","offsetX","donutChart","isRendering","resizeSvg","hoverTween","rad","scp","addExternalCls","__data__","internalSegmentClassMap","outerRadius","dim","svgHeight","$root","initialHeight","innerRadius","didRenderData","theme","debounceId","totalShipmentsInterval","shouldCallExternalListeners","newDataPending","segmentDataMap","internalControl","control","growSegment","restoreSegment","onTotalClick","segmentClassMap","ordinal","pie","layout","padAngle","padRadius","x_axis","y_axis","_current","onClick","getBBox","startAngle","endAngle","textNode","oldTotalShipments","tsDistance","tsStep","currTotalShipments","update","textFontSize","me","barChart","hexToRgb","hex","shorthandRegex","exec","wrap","word","words","lineNumber","lineHeight","dy","tspan","getComputedTextLength","onresize","rangeRoundBands","linear","xAxis","axis","tickFormat","orient","yAxis","ticks","y_domain","spent","progress","domain","yLabel","xVal","rangeBand","collapsible","cascade","children","tid","asyncValidator","require","ngModel","$name","$asyncValidators","modelValue","viewValue","valid","$$parentForm","$setViewValue","$render","cvaAccordion","$animate","transclude","accordionCtrl","savedExpanded","child","addAccordion","groupCollapse","toggleGroup","$animateCss","doneFn","from","to","easing","cleanupStyles","leave","cvaAccordionGroup","accordions","accordion","lanePairBarChart","renderNoData","margin","selectedLane","showTotal","diff","clickLabel","isSelected","dblClickLabel","ports","selectedLaneType","period","pluralize","unit","yHeight","yScale","yScale2","xScale","xScale1","xAxis1","lanePairs","metric","showCountVolume","select_pairs","lane","x_domain","x1_domain","volume","metricColors","two_bars","spot","str","mouse","countVsVolumeLineChart","_data_","getPoints","points","bardelay","xWidth","parseDate","y0","y1","xticks","selectedPeriod","yAxisLeft","yAxisRight","countLine","volumeLine","lane_pair","overtime_breakdown","extent","xAxisLabels","year","quarter","isoWeek","countPath","countPathLength","countSegments","getYear","volumePath","volumePathLength","volumeSegments","lanePairMap","getAverage","avg_lat","avg_long","pt","getMinMaxLat","legend_height_offset","minMax","legend_width_offset","legend_width_begin","laneColors","circle_radius","ls_h","legend","ForecastController","getPercentageAir","air_count","getPercentageSea","sea_count","getPercentageGround","ground_count","viewOnTrackAndTrace","business_type_group","advSearch","forecast_custom_options","FiveDayForecastController","set5DFDefault","get5DFDefault","CustomOptionsController","BreakdownController","DashboardCslService","DASHBOARD","searchParams","cachedActiveShipments","cachedCurrentExceptions","cachedPotentialExceptions","loadingExistParam","cachedLanePairs","week","cachedSpendingOverTime","cachedOnTimePercentage","tlp","all","sea","air","ground","topLanePairs","weekLoaded","monthLoaded","quarterLoaded","yearLoaded","foo","setSearchParams","getLanePairs","getLegend","invalidateCache","loadActiveShipments","SERVER_ERROR","getCachedActiveShipments","hasCachedActiveShipments","loadCurrentExceptions","getCachedCurrentExceptions","hasCachedCurrentExceptions","getCachedPotentialExceptions","hasCachedPotentialExceptions","getCachedSpendingOverTime","hasCachedSpendingOverTime","loadOnTimePercentage","dateTo","getCachedOnTimePercentage","hasCachedOnTimePercentage","hasCachedLanePairs","constant","DashboardCslController","cancelTimeouts","timeoutHash","timeoutkey","getAljexDashboard","groups","dashboard_config","configuration","keyHandler","showLoading","hideLoading","loadDefaultOnTimePercentage","due_date_to","loadDonutWidget","getCounts","_data","isData","donut_data","FTL","FullTruckLoad","LTL","LessThanTruckLoad","INTERMODAL","RailInterModal","pickup","delivery","activeShipments","currentExceptions","capName","Intermodal","Pick Up","Delivery","donutNums","largeDonutNumbers","displayDateRange","dateFrom","otp","displayDate","onTimePercentage","def","currentPercent","previousPercent","change","previousPercentage","direction","isLoaded","currentTotal","adjusted_ontime","previous","previousTotal","currentOnTime","previousOnTime","_getDatePercentage","getDatePercentage","getDateTo","getDateFrom","getDatePeriod","getDateRange","getDatePeriodTo","getPercentage","version","getChange","isNoPreviousData","isNoCurrentData","getDirection","tabSelected","fromLast","noPreviousData","noCurrentData","switch","tabs","periods","percent_complete","weekday","daysInMonth","dayOfYear","ending","isEnd","onTimePercentageSwap","onTimePercentageTimeout","doLoadOnTimePercentage","momentDateFormat","cancelRequests","spendingOverTimeTimeout","lanePairsTimeout","setCustomRange","widget","activeWidgetRange","activeModal","setEndDate","startDate","endDate","due_date_from","widgetHasCustomRange","shipmentVolVsCountSettings","isLanePairLoaded","isLanePairData","isLanePairFirstLoad","loadLanePairs","resetCustomRange","loadDefaultLanePairs","spendOverTime","loadDefaultSpendingOverTime","scrollEvt","today_date","week_start_day","week_end_day","donut_query","backLink","lanePairsDateTo","currentExceptionNum","activeShipmentsNum","currentShipmentsLoading","currentExceptionLoading","json","world","topojson","feature","objects","countries","mesh","metric_types","run","yOffset","ewidth","dashboardCmtsService","DashboardCmtsController","getCmtsDashboard","TL","dashboardCfsService","DashboardCfsController","LOCAL","Truckload","Local","WidgetsController","isbooked","deliverStatus","timeZonesSelect","TimeZoneController","TimeZoneService","createRailsTimeZones","timeZoneObjects","createTimeZonesObject","zones","parseCSV","timeZoneObject","country","zonesArray","cca2","isZones","lines","objectArray","parseRailsZones","both","modules","__webpack_require__","moduleId","installedModules","exports","loaded","_directivesDateRangePickerDateRangePickerDirective","_directivesCalendarCalendarDirective","_directivesObDateRangePickerObDateRangePickerDirectiveJs","_directivesObDayPickerObDayPickerDirective","DateRangePicker","ObDateRangePicker","Calendar","ObDayPicker","_classCallCheck","instance","Constructor","TypeError","weekStart","minDay","maxDay","monthFormat","inputFormat","weekDaysName","linkedCalendars","interceptors","DateRangePickerController","bindToController","defineProperty","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","protoProps","staticProps","_extends","assign","arguments","source","Moment","Scope","setConfigurations","startCalendarApi","endCalendarApi","setInterceptors","setListeners","setApi","watchRangeChange","_this","setCalendarPosition","startCalendar","isSame","endCalendar","_this2","$watchGroup","newRange","isMomentRange","getFormat","rangeStart","rangeEnd","daysSelected","updateRange","_this3","startCalendarInterceptors","moveToPrevClicked","moveCalenders","moveToNextClicked","daySelected","day","dayInStartSelected","rangeSelectedByClick","inputSelected","inputInStartSelected","endCalendarInterceptors","dayInEndSelected","inputInEndSelected","isBetween","nextMonth","prevMonth","calendar","areCalendarsLinked","isRange","isMoment","_this4","oldRange","newStart","newEnd","oldStart","oldEnd","isDefined","getInterceptors","selectedDay","minMonth","maxMonth","showInput","CalendarController","$attrs","Attrs","defaultWeekDaysNames","firstDayOfWeek","daysOfWeek","buildWeek","buildCalendar","daysName","setWeekDaysNames","getInputFormat","weekDays","weekDayNames","defPosMap","su","mo","tu","we","th","fr","sa","defPos","newMonth","setValue","updateDaysProperties","monthWeeks","inRange","isInRange","firstDay","pivot","firstHalf","secondHalf","monthRange","getMonthDateRange","firstDayOfMonth","tmpDate","currentDay","currentMonth","currentCalendar","selectedDate","lastDayOfMonth","context","moveCalenderByMonth","dateInputSelected","getMonthFormat","ranges","onApply","autoApply","calendarsAlwaysOn","ObDateRangePickerController","_slicedToArray","sliceIterator","arr","_arr","_n","_d","_e","_s","_i","Symbol","iterator","next","isArray","Element","Document","pickerApi","isCustomVisible","setOpenCloseLogic","setWatchers","setDateRange","preRanges","isCustom","_range","setPredefinedStatus","firstPreRange","applyMinMaxDaysToRange","setRange","markPredefined","setPickerInterceptors","_getMinDay","_getMaxDay","pickerInterceptors","applyChanges","_ref","_ref2","selfChange","getRangeValue","isPickerVisible","pickerPopup","elemClickFlag","_this5","events","documentClick","discardChanges","documentEsc","hidePicker","pickerClick","off","selectedRengeIndex","findIndex","_this6","callApply","formName","isValidDateEnabled","ObDayPickerController","_selectedDay","getSelectedDay","setCalendarInterceptors","calendarApi","dayValidity","checkIfDayIsValid","applyValidity","calendarInterceptors","onBlur","$digest","updateSelectedDate","isDaySelectable","getInputValue","currentValue","isDateValid","$setValidity","predicate","thisArg","$templateCache","acmeNavbar","NavbarController","relativeDate","creationDate","fromNow","loadingButton","callfunction","isdisabled","isloading","holdButton","Time","mytitle","mouseDown","mouseUp","longPress","ngTableFilterRow","craneTable","readaccess","menu","tabletype","lensviewtablepopup","loaddatausers","CraneSearchController","searchAction","mobileExpanded","onFormSubmit","expandSearch","craneSearch","lastQuery","searchResults","showSearchResults","showSearchResultsCsl","showSearchResultsCfs","showSearchResultsCmts","canceler","globalUrl","searchResultTotal","baseUrl","$$absUrl","crane_search_form","$setUntouched","searchResultsTranslateData","displayed","matchingKey","matching_keys","queryValue","query_value","doneLoading","closeSearchResults","general","allSubjects","billOfLading","account","notifications","default","postMessage","getSubjects","topic","getContactInfo","getContactMessageData","subject","url_from","getDefaultSubjectStatuses","ContactsController","details","willSendUrl","getIsInShipmentDetails","contactMessageData","getIsInTrackTrace","fields","getCurrentFields","showToastWithUrl","contactPhone","getContactName","noContact","getIsInBillOfLading","getIsInAccount","isIn","showContactModal","subjects","contactName","menutogglebtn","contactMail","emailId","photo_url","SearchPreviousController","BookShipmentService","clickedSearch","bolSliCmrSearch","booking","clearBookings","getCurrentShipOrder","mapping","subPath","invoice_shipment","reference_numbers","rn","reference_code","validReferenceCodes","reference","citycode","origincitycode","countrycode","origincountryycode","origincountrycode","destinationcitycode","destinationcountrycode","originCityCountry","destinationCityCountry","customer_info","paymentOptions","shipment_options","serviceLevel","getServiceLevelTypes","types","serviceLevelType","form","cslAutoComplete","searchField","displayName","focusField","extraParamString","deleteSearch","generateChips","searchFieldChips","displayValue","status_arr","get_milestone","get_status","idx2","cnt","removeCloseMarkInChips","chips","modifySearchVal","dataToBeRemovalkey","nodes","nodes1","myEl1","status_value","displaycontent","searchdata","status_array","planned","consignee","setUrl","shipdate_date_range_to","estimateddelivery_date_range_to","deliverydate_date_range_to","duedate_date_range_to","saveLastSearchLocally","searchShippDueDate","duedate_date_equal_to","searchDelDate","searchDeliveryDate","estimateddelivery_date_equal_to","toDateString","convDueDate","convDelDate","conDeliveryDate","updateQuery","removeTimeZoneInPickUp","chipData","searchFieldName","timeList","remove_ist1","remove_ist2","pickupTime1","pickupTime2","remove_ist","pickupTime","isFirstSearch","emptySearchFields","shipdate_from","shipdate_to","pickupapptdate_from","pickupapptdate_to","deliverydate_from","deliverydate_to","consigneeapptdate_from","consigneeapptdate_to","duedate_from","duedate_to","estimateddate_from","estimateddate_to","reason_code","shipment_status","destinationstate","originstate","booking_number","customeraddress1","customerphone","shipment_delivery_status","shipment_current_status","shipment_invoice_total_is_less_than","shipment_invoice_total_is_greater_than","shipment_invoice_total_equal_to","shipment_invoice_total_range","shipment_gross_weight_range","shipment_gross_weight_equal_to","shipment_gross_weight_is_greater_than","shipment_gross_weight_is_less_than","shipment_total_pieces_is_less_than","shipment_total_pieces_is_greater_than","shipment_total_pieces_equal_to","shipment_total_pieces_range","shipment_invoice","shipment_consignee_reference","shipment_pro","shipment_bol","shipment_reference","shipment_load","shipment_container","shipment_is_bookmarked","deliverydate_date_equal_to","shipment_pickup_date_equal_to","shipment_pickup_date_range_to","shipment_pickup_time_equal_to","shipment_pickup_time_range_to","shipment_deliveryeta_date_equal_to","shipment_deliveryeta_date_range_to","shipment_mustship_date_equal_to","shipment_mustship_date_range_to","shipment_mustdeliver_date_equal_to","shipment_mustdeliver_date_range_to","shipdate_date_equal_to","shipment_origin_state","shipment_origin_city","shipment_destination_state","shipment_destination_city","shippername","consignee_name","consignee_contact_name","consignee_street_address","consignee_state","consignee_city","consignee_zip","consignee_phone","pickup_name","pickup_contact_name","pickup_street_address","pickup_state","pickup_city","pickup_zip","pickup_phone","shipment_equipment_type","hasLoadedSearchValues","postDownloadFile","autocomplete","theQuery","pairs","bits","saveDefaultSearch","isDefault","search_name","default_search","emptySearchSave","getIsSavedSearch","getSearchParams","getChips","setClickedChip","removeChip","getSearchFieldsFocus","searchFieldsFocus","modifySearch","AdvSearchCslController","$mdBottomSheet","ttSearch","inputRangeFlag","shipmentOpenInputFlag","openInputFlag","timeInputFlag","textFieldData","dateInputFlag","nextElem","ttserchdata","ttserchdataNew","ttSearchFlag","breakFlag","ship","secondChildFlg","temStrOne","temStr","searchValueFlag","secondChildElem","thirdChildFlg","remainingText","breakRemaining","searchValue2","dateItemOrNot","keyItem","checkrangeOrNot","clearFlags","addAllBtnShow","clearValues","chipClicked","showAdvSearch","chipRemoved","chipTempRemoved","currentFields","get_array_status","get_string_status_displaycontent","get_status_original_value","callingToRemoveCrossIConInChips","chipSearchFields","resetSearch","selectClear","focused","showListBottomSheet","convertStatusFieldToString","convertStatusFieldToInt","field1","convertedFields","newSearch","isAddAll","searchcontent","searched_eq_type","date2","add_multiple_values","multiplepillseperator","get_milestone_displaycontent","arr_values","myArrayRC","uniqueRC","array_unique","fnalvalueRC","myArraySL","uniqueSL","fnalvalueSL","myArrayAW","uniqueAW","fnalvalueAW","unique","fnalvalue","shipment_searchdata","object_type","get_status_displaycontent","space_text","at_pickup","at_consignee","clearSearch","clearDefault","loadDefault","resetForm","formClick","addOneMoreDay","dateMin","subtractOneDay","dateMax","bookingMode","transitMode","booking_number_quick_search","status_advanced_search","selectedItem","minDate","invoice_total","gross_weight","total_pieces","equipment_type","is_bookmarked","consignee_reference","bol","load","pickup_date","pickup_time","deliveryeta_date","mustship_date","mustdeliver_date","notSorted","checkValue","needle","findNaN","setSelectionRange","capitalizeString","inputString","HOT","IPRI","NFO","ISTD","3DAY","2DAY","NDAM","NDPM","2DAM","2DPM","ECO","3DAM","3DPM","DEFR","TKLD","LCL","IECO","PROJ","CSTBKR","4TH","5TH","OCN","NDR","INVOICE","OTPACT","OTPAPT","OTPCAO","OTPCAR","OTPCEC","OTPCIV","OTPCON","OTPCST","OTPCUS","OTPCUT","OTPDRP","OTPGND","OTPHOL","OTPMIS","OTPMPU","OTPNFO","OTPPCK","OTPPCON","OTPPRO","OTPREF","OTPRRH","OTPSEC","OTPUDO","OTPWHS","OTPWX","inputPieces","cmtsAutoComplete","planned_start_range","planned_end_range","load_status","load_number","pickup_location","delivery_location","total_gross_wt","route_number","total_piece_count","bol_number","load_billing_invoice_status","stop_count","order_count","trading_partner_carrier_name","trading_partner_carrier_number","trading_partner_client_name","trading_partner_client_number","service_option_name","total_invoice_amount","planned_start_from","planned_start_to","planned_end_from","planned_end_to","total_piece_count_is_less_than","total_piece_count_is_greater_than","total_piece_count_equal_to","total_piece_count_range","order_count_is_less_than","order_count_is_greater_than","order_count_equal_to","order_count_range","stop_count_range","stop_count_equal_to","stop_count_is_greater_than","stop_count_is_less_than","planned_start_equal_to","planned_end_equal_to","total_invoice_amount_is_less_than","total_invoice_amount_is_greater_than","total_invoice_amount_equal_to","total_invoice_amount_range","total_gross_wt_is_less_than","total_gross_wt_is_greater_than","total_gross_wt_equal_to","total_gross_wt_range","equipment_name","reference_number","shipment_revenue_code","searchPlannedStartDate","searchPlannedEndDate","AdvSearchCmtsController","rangvalue","cfsAutoComplete","AdvSearchCfsController","revenue_code","RemoveUser","totallength","bulkActivation","resendUrl","bulkDeactivation","bulkResendVerificationEmail","bulkResetPasswordAndSecurityQuestion","bulkDeleteAndResendVerificationEmail","bulkResendImmediateActionEmail","bulkReimportUsers","oktaDeactivateUser","oktaActivateUser","reimportUser","deleteAndResend","immediateActionEmail","allFilter","ad_users","non_ad_users","allUsersCount","setUserTableData","searchParam","queryBuildStr","total_count","getUsersFilter","user_params","filter_only","sendErrorsToEmails","emailList","options_classic","parsePermissionsCsl","options_csl","parsePermissionsCfs","options_cfs","parsePermissionsCmts","options_cmts","superAdminCheck","superAdminCheckCsl","superAdminCheckCfs","superAdminCheckCmts","is_ad_user","ad_user","super_admin","role","role_csl","role_cfs","role_cmts","role_classic","crane_contact","SupportRequestUser","SupportRequestAdmin","SupportRequestValidator","CviewClassicAdmin","updateAdUserData","adurl","department_ids_cww","department_ids_csl","department_ids_cfs","department_ids_cmts","party_id_names_cww","party_id_names_csl","party_id_names_cfs","party_id_names_cmts","default_bccs_cfs","default_bccs_csl","default_bccs_cww","default_bccs_cmts","is_discussion","is_discussion_csl","is_discussion_cfs","is_discussion_cmts","clearUserData","exceptionFilterPersist","awaitFilterPersist","roles_shipper","roles_consignee","roles_classic","roles_classic_consignee","roles_classic_shipper","roles_csl","roles_cfs","roles_cmts","getRolesShipper","getRolesConsignee","getRolesCsl","getRolesCfs","getRolesCmts","getRolesClassic","getRolesClassicConsignee","getRolesClassicShipper","getExceptionFilterPersist","getAllFilter","setAllFilter","getAllUserCount","getUsersTableData","UserManagementController","testChange","CustomerFilter","cww_filter","csl_filter","cfs_filter","cmts_filter","filterCheck","changeCslAllClients","selectedAllCleintRole","selectAllClientRole","changeActiveStatus","exceptionFilter","table","cww_setup","cww_check","Admin","Group","LensGroup","Spotlight","csl_setup","csl_check","Load","CslException","cfs_setup","cfs_check","cmts_setup","cmts_check","onClose","setFilter","userSearchFilter","removeDuplicates","onCompanyChange","customerCheck","access_type","cwwUserCheck","classicDivCheck","clearToggles","cww_visibility","party_id_names_exist_cww","csl_visibility","party_id_names_exist_csl","cfs_visibility","party_id_names_exist_cfs","cmts_visibility","party_id_names_exist_cmts","related_party_id_names_exist_cww","related_party_id_names_exist_csl","related_party_id_names_exist_cfs","related_party_id_names_exist_cmts","party_id_names_exist","related_party_id_names_exist","partids","mergedids","clean_permissions","view_air_shipments_cww","view_ground_shipments_cww","view_sea_shipments_cww","primary_contact_cww","primary_contact_csl","primary_contact_cfs","primary_contact_cmts","clearTogglesEdit","setupNewUser","synced_with_ad","setup","showCwwData","view_air_shipments","view_ground_shipments","view_sea_shipments","showCslData","showCfsData","showCmtsData","isUploading","errorMsg","selectedFile","dublicateRecordExists","file_headers","reader","FileReader","readAsBinaryString","onload","workbook","read","sheet","rowObject","sheet_to_row_object_array","header","defval","blankrows","val2","strHeader","errFile","checkError","$invalid","$touched","canSetIsCraneContact","formRole","formSettings","add_user","import_users","eval","isLink","hasIcon","getIcon","userSearch","userSearchNotEnable","is_active_cehck","lookup","ad_user_check","ad_user_length","active_user_length","inactive_user_length","issue_ad_length","issue_nonad_length","issue_nonad_length1","no_security_length","unverified_length","null_length","reset_user_length","resetAll","getContact","getDefaultContact","getDefaultBCCs","isPermissionsIn","pgroup","logsVisible","logs_empty","canSetSuperAdmin","setPrimaryContact","parseFilename","onRoleChangeClassic","permissionsMap","perm","onRoleChange","onRoleChangeCSL","onRoleChangeCFS","onRoleChangeCMTS","onPermissionsChangeClassic","permission","transport","warehouse","accounts_recievables","book_shipment","reporting","operations_kpi","operations_dashboard","customs","cview_full_access","cview_customer_ops","cview_customer_shipper","cview_customer_consignee","onPermissionsChange","pe_perm1","pe_perm","permission1","permission2","permission3","permission4","superAdmin","companyAdmin","accessCompanyLensData","groupAdmin","shipmentView","editPotentialExceptions","approvePotentialExceptions","manageLensGroup","mangeUsers","cviewLensMode","canExport","pe_read","onPermissionsChangeCSL","onCslToggle","onCfsToggle","onCmtsToggle","onPermissionsChangeCFS","onPermissionsChangeCMTS","manageLensGroupDisabled","canSetPermissions","superadminCheck","getRemainingPermissionGroupsAmountArray","mod","permissions_display","newUser","lens","password","password_confirmation","support_request_user","support_request_admin","support_request_validator","bulkEdit","bulkActivate","isActionLoading","confirmDelete","bulkDeactivate","ad_user_ids","addata","inactive_user_ids","inactivedata","array3","Boolean","nonad_user_length","total_users_length","allUsers","allAdUsers","allNonadUsers","downloadXLSXTemplate","ws_name","ws2_name","ws2_headers","wb","ws2","wbout","write","bookType","bookSST","saveAs","isSafari","present","browser","navigator","userAgent","activateUser","phone","confirmUser","force_verify","deactivateUser","importUsers","showLensView","showUserNotFoundError","errorMessagesArray","UserController","errorMessages","changePermissions","ad","nonad","user_states","switchTrue","switchFalse","lookupTimeout","canSelect","permissions_enable","stateName","isReadOnly","discussion_visibility_csl","discussion_visibility_cfs","c_view_lens_mode_check","searchInitial","EditTab","newPrimaryContact","removableFields","saveBtnShowNew","c_view_lens_mode","ad_user_enable","partids_old","mergedids_old","pwd_exists","searchValChanges","searchEanble","all_users_count","ad_user_count","non_ad_users_count","enableSaveButton","$pristine","companyDetails","checkValidation","ctype","templateMessages","UserLogDetailController","ctrl","processActions","actions","logExportShowCSV","inject","BulkEditController","isCompanySelected","selected_company_id","isCrane","updates","include","group_id","resetRolesPermissions","getMatchForDepartment","removeEventListener","_DOMReady","ath","_instance","Class","_extend","_removeToken","replaceState","_reSmartURL","_reQueryString","_eventListener","readyState","intl","cs_cs","ios","android","de_de","da_dk","el_gr","en_us","es_es","fi_fi","fr_fr","he_il","hu_hu","it_it","ja_jp","ko_kr","nb_no","pt_br","pt_pt","nl_nl","ru_ru","sk_sk","sv_se","tr_tr","uk_ua","zh_cn","zh_tw","lang","appID","fontSize","logging","mandatory","autostart","skipFirstVisit","startDelay","lifespan","displayPace","maxDisplayCount","validLocation","onInit","onShow","onPrivate","privateModeOverride","detectHomescreen","_ua","_nav","hasToken","isRetina","devicePixelRatio","isIDevice","isMobileChrome","isMobileIE","language","isMobileSafari","OS","OSVersion","isStandalone","standalone","isTablet","isCompatible","_defaultSession","lastDisplayTime","returningVisitor","displayCount","optedout","added","removeSession","doLog","logStr","session","hasLocalStorage","isValidLocation","optOut","updateSession","orientationchange","resize","touchmove","transitionend","webkitTransitionEnd","MSTransitionEnd","handleEvent","force","shown","applicationIcon","matches","group1","viewport","webkitTransform","transform","img","src","_delayedShow","_show","updateViewport","webkitTransitionDuration","transitionDuration","removeTimer","_removeElements","scrollX","scrollY","clientWidth","orientation","clientHeight","screenWidth","screen","resizeTimer","clearSession","optIn","clearDisplayCount","_preventDefault","addToHomescreen","SupportRequestsService","setTicketType","ticketType","getTicketType","checkEmailExist","Useremail","changeAccountStatus","create_new_account","account_det","getUserViewDetails","getSupportObject","party_group_ids","is_magno","is_department","getSupportCompanyObject","portalTheme","crane_sales_rep","cww_default_bccs","csl_default_bccs","cfs_default_bccs","cww_primary_contact","csl_primary_contact","cfs_primary_contact","accessTypeStandard","accessTypeClassic","csl_exception_hours","csl_exception_minutes","companyEnableCheck","is_threshold_default","copy_contacts_csl","copy_contacts_cfs","cww_party_id_names","cww_related_party_id_names","csl_customer_ids","cfs_customer_ids","cww_primary_contact_name","cww_primary_contact_phone","csl_primary_contact_name","csl_primary_contact_phone","cfs_primary_contact_name","cfs_primary_contact_phone","getSupportCompanyEditObject","cww_department_name","cww_default_contact","cww_party_group_ids","csl_department_name","csl_default_contact","cww_user_first_name","cww_user_last_name","cww_user_email","csl_user_first_name","csl_user_last_name","csl_user_email","cfs_user_first_name","cfs_user_last_name","cfs_user_email","bccs_cww","customer_ids_csl","bccs_csl","customer_ids_cfs","bccs_cfs","classic_role","portal_role","financial_customer_type","classic_access","cww_customer_type","csl_customer_type","cfs_customer_type","cfs_department_name","cfs_default_contact","getSupportCompanyEditRowObject","SupportRequestsController","chatComments","supportChatComments","comments","supportRequestLogs","requestsupportLogs","ticket_logs","full_url","url_array","last_segment","newComment","uId","cId","comment_by","commentObj","comment_text","supportChatComment","viewSupportLog","closeSuportLogDiv","addBccContactsCww","bcc_check_cww","addBccContactsCsl","bcc_check_csl","addBccContactsCfs","bcc_check_cfs","uploadFiles","closeErrorDiv","errorDivCheck","removable_attachments","submitGeneralRequest","dataRequest","support","associated_company","departments_added","toJson","clearDepartment","clearSupportForm","editGeneralRequest","editCompanyRequest","viewGeneralRequest","viewCompanyRequest","getMatchesDepartment","showValidationToasts","openPopup","supportAdminCheck","supportUserCheck","support_requests_tab","support_tab_selected","generalSupport","addUser","addCompany","goBackRequest","searchText1","clearSupportCompanyForm","supportCompany","primary_contact_name","primary_contact_phone","default_contact","deaprtmentError","clearCompanyContactCww","cww_contact_name","searchText8","cww_contact_location","clearCompanyContactCsl","csl_contact_name","searchText9","csl_contact_location","clearCompanyContactCfs","cfs_contact_name","searchText10","cfs_contact_location","clearCompanyDepartmentCww","supportCompanyEdit","clearCompanyDepartmentCsl","clearCompanyDepartmentCfs","clearCompanyUserCww","clearCompanyUserCsl","clearCompanyUserCfs","loadingUserData","user_list","account_ticket","searchUserCompany","departmentAccess","cwwDeparments","cslDeparments","cfsDeparments","addUserRow","from_add_btn","isEmailAddress","is_user_exist","user_array","dept_array","accessToggleUser","user_accounts","cww_access","csl_access","cfs_access","cww_overrides","csl_overrides","customer_ids","cfs_overrides","resetStep1Form","addUserRowCsv","add_department_autocomplete","array_values","dept_new_array","add_dept_autocomplete","addDepartmentUser","did","party_id_names_combined","addDepartmentUserCsl","addDepartmentUserCfs","updateUserRow","checked","updateUserRowCompanyCww","companyUsersCww","updateUserRowCompanyCsl","updateUserRowCompanyCfs","updateUserRowCsl","updateUserRowCfs","pattern","removeUserList","userRemoveId","removeUserListStep2","removeDepartmentListStep2","editUserId","removeDepartmentListStep2Csl","editUserIdCsl","removeDepartmentListStep2Cfs","editUserIdCfs","removeUserListStep2Csl","removeUserListStep2Cfs","copyOverrides","editId","copyOverridesCompany","editUserListRow","editUserListRowCww","editUserIdCww","editUserListRowCsl","editUserListRowCfs","completeUserListRow","completeUserListRowStep2","completeUserListRowStep2Csl","completeUserListRowStep2Cfs","removeCompanyContactListCww","contactRemoveId","companyContactsCww","removeCompanyContactListCsl","companyContactsCsl","removeCompanyContactListCfs","companyContactsCfs","removeCompanyDepartmentListCww","departmentRemoveId","companyDepartmentsCww","removeCompanyDepartmentListCsl","companyDepartmentsCsl","removeCompanyDepartmentListCfs","companyDepartmentsCfs","removeCompanyUserListCww","removeCompanyUserListCsl","companyUsersCsl","removeCompanyUserListCfs","companyUsersCfs","next_step","step_number","cwwShowData","cslShowData","cfsShowData","form_step_number","company_next_step","supportCompanyEditRow","accessToggle","customerToggle","bcc_ids_check_cww","bcc_ids_check_csl","bcc_ids_check_cfs","skip_override_step","skip_department_step","companyFormSubmit","dataResult","sales_rep","customer_configurations","operation_contacts","phone_no","primary_crane_contact","toLocaleString","exception_threshold_hours","exception_threshold_minutes","is_send_exception_email","do_not_send_exception_mails","is_show_class","show_shipment_class","prev_step","edit_prev_step","departmentsId","departmentsName","overrideSelect","overrideSelectCopy","overrideSelectCsl","overrideSelectCfs","display_overrides","overridesData","badPartyIds","page_name","display_departments","redirectToDashboard","check_selectAll","check_selectAll_csl","check_selectAll_cfs","check_selectAllMain","check_selectAllMain_Csl","check_selectAllMain_Cfs","addUserCompanySelect","showImportUserPopup","showImportUserPopupCompany","exist_users","is_valid_email","addRequestCompanyUsersCwwCsv","existUsers","readAsText","downloadCSVTemplate","generateFile","addGeneralRequestDepartment","bcc_override","party_or_group_id","magno_re_skin","addRequestCompanyDepartmentsCww","departmentNameExistCww","companyDepartmentCww","party_or_group_ids","addRequestCompanyDepartmentsCsl","departmentNameExistCsl","companyDepartmentCsl","addRequestCompanyDepartmentsCfs","departmentNameExistCfs","companyDepartmentCfs","count3","addRequestCompanyUsersCww","companyUserCww","addRequestCompanyContactsCww","companyContactCww","cww_contact_id","contact_name","office_location","addRequestCompanyContactsCsl","companyContactCsl","csl_contact_id","addRequestCompanyContactsCfs","companyContactCfs","cfs_contact_id","editCompanyDepartmentListCww","departmentData","editDepatmentId","editCheckCww","cww_default_contact_name","notexistIds","editCompanyUserListCww","userData","editCheckCwwUser","editCompanyDepartmentListCsl","editCheckCsl","csl_default_contact_name","editCompanyDepartmentListCfs","editCheckCfs","cfs_default_contact_name","submitEditCompanyDepartmentCww","contactEmail","companyDepartment","submitEditCompanyDepartmentCsl","submitEditCompanyDepartmentCfs","submitEditCompanyUserCww","companyUser","removeDepartment","GeneralRequestForm","open_status_count","in_review_count","awaiting_demo_count","total_account_tickets","total_company_tickets","total_general_tickets","tab_name","primaryContactCheckCww","primaryContactCheckCsl","primaryContactCheckCfs","portalChangeEdit","customerTypeEnableCheck","checkboxCustType","checkboxCustType1","portalChange","accessType","accessTypeEnableCheck","searchText2","searchText3","searchText5","searchText7","copyContactsCww","copyContactsCfs","getMatchCwwUser","getMatchCslUser","getMatchCfsUser","selectedCwwPArtyIdChange","ptype","addPartyIdsCww","itype","party_id","related_party_id","customer_id","is_party","idCheck","thresholdChange","showMinsError","hrscheck","showhrsError","csl_threshold_default","hrs","mins","cwwDeparmentChips","departmentsCww","invalide_party_or_group_ids","cwwInvalidIds","departmentsCwwInvalid","cwwInvalid","cslDeparmentChips","departmentsCsl","invalide_customer_ids","cslInvalidIds","departmentsCslInvalid","cslInvalid","cfsDeparmentChips","departmentsCfs","cfsInvalidIds","departmentsCfsInvalid","cfsInvalid","getEditCompanyDetails","ticket","arr1","invalid_party_id_names","curNode","invalid","arr2","invalid_related_party_id_names","curNode1","item1","invalid1","arr5","hoursCheck","minutesCheck","csl_exception_hours_exist","csl_exception_minutes_exist","arr3","invalid_customer_ids","curNode2","item2","myEl2","invalid2","arr6","arr4","curNode3","item3","myEl3","invalid3","arr7","bad_party_ids","supportRequestfiltersVisible","nameCheck","partyCheck","partyCheck1","repCheck","bccCheck","primaryContactCheck","primaryPhoneCheck","createNew","general_support_count","requestTab","generalSupportComment","generalsupportComments","btnMarkCheck","rejectCheck","editCheckCompanyAdminuser","support_request_add_user","editCheck","editCheckCslUser","editCheckCfsUser","showErrorDiv","company_bad_party_ids","customerClassic","associateCompany","btnMark","openCheck","newArrayBadpartyIds","data_validated","users_created","usersExist","errorCount","bad_dept_array","fileName","changeGeneralsupportStatus","statusVal","statusNew","dataValidateCompanysupportStatus","error_hash","company_errors","changeCompanysupportStatus","status_action","deleteGeneralsupportRequest","savesupportChatComment","checkNameField","checkPartyField","checkRepField","rep_id","rep_email","checkPrimaryContactFieldCww","checkPrimaryContactFieldCsl","checkPrimaryContactFieldCfs","checkContactFieldCww","checkContactFieldCsl","checkContactFieldCfs","checkPrimaryPhoneField","onChangeFunc","$eval","customOnChange","CompanyLogDetailController","exportCompanyLogs","SupportRequestsViewController","rediretToUserEdit","getAccountData","stateChanges","getMatchArray","rowArray","approve_button_disable","PotentialExceptionsService","genTable","datagetter","def_sort","createGetter","awaitFilter","await","AWAIT","ALL","awaitingTable","start_date","potExcTable","getAwaitFilter","setAwaitFilter","getAwaitFilterPersist","exportPotentialException","PotentialExceptionsController","CustomPotentialResultsService","createPotentialException","rejection_note","workflow_state","exportShowCSV","wasPublished","modes","city_codes","city_code_count","isAwaitLoading","isAllLoading","awaitTableParams","canCreate","create","canApprove","publish","isReader","drafts","submitted","published","expired","mine","allButtons","awaitButtons","potExcTableParams","noResultsAwait","noResultsAll","getLensGroup","setCompanyDetails","addToLensGroupTable","setQueryExce","cust_type","excluded_approvers","bulkUrl","AllClients","addLensGroupPopUpController","addSectedLensGroup","countCompanyLens","selectedLensGroup","addCompanyLenstable","countUserLens","lensviewAddTitle2","addExceptionPopUpController","search_users","addCfsExceptionPopUpController","GroupsService","getGroups","defaultsParams","getGroup","saveGroup","endpoint","getRequestData","GroupsManageController","editDataRows","showDataRemoveButton","doneEditingData","addData","groupData","removeData","isSaving","loadGroup","GroupsIndexController","addGroup","loadDeferred","FeatureSpotlightService","spotlightTable","getFeatureSpotlight","urls","responseData","spotlights","slide_status","published_date_time","setSpotlightSlide","createSlide","updateSlide","getSelectedSlides","slide","api_method_url","deleteSlide","spotlight_ids","setUnSeenSpotlight","seen","featureSpotlightController","getselectedUsersCount","getSelectedFilterCount","getSelectedActiveCount","getColumnWidth","search_spotlight","add_slide_click","searchSlide","filterClose","slide_image","isLinkImg","imgLink","getPrority","priority","myColor","priorityStar","newicon","getProrityColor","none","createBulkParamsSpotlightIds","slides","feature_name","hsh","canDelete","active_spotlights","featureSpotlight","spotlighttable","closeButton","menuIndexContentContainer","addfeatureSpotlightController","convertToEst","dateVal","timeVal","toGMTString","File","newSlide","readAsDataURL","publishedDateTimeValid","SpotlightForm","validatSlideDate","publish_date","validatSlideTime","publish_time","$error","required","slideDate","slideTime","validateDateGreaterThanCheck","slide_title","slide_content","isSaveDisabled","mark_as_new","publishOptionsArr","isRequired","isDisabled","canSetNew","isSlideActiveDisabled","menuEditContentContainer","isChanged","slide_active","$dirty","isFormChanged","index_status","active_slide","isPublishedDisabled","ExceptionLogDetailController","ExceptionsCslService","unpackageException","exception_data","changeStatusException","sendEmailException","getExceptionDetails","ExceptionsCslController","aprrover_level","logs_visible","viewShipment","endException","reOpenException","textEndedType","deliverdException","isdeliverdShipment","cancelDeliverdException","cancelEndException","cancelOpenException","rejectSubmit","reject_reason_check","rejection_reason","showModalWithFile","changeEndExceptionStatus","changeOpenExceptionStatus","endExceptionSubmit","approveException","exception_ids","showRejectModal","showEndModal","exceptionStatus","cancelException","excAprover","viewExceptionText","estimated","estimated_date","estimated_time","actual","actual_date","actual_time","approver_level_company_ids","ExceptionsCslExistService","unpackageExceptions","ended","live","rejected","ExceptionsCslExistController","filterValue","isLoadingExist","all_count","expired_count","live_count","ended_count","rejected_count","addApproverPopUpService","addApproverPopUpController","old_status","dontSendEmailException","showPouptext","ExceptionsCmtsService","ExceptionsCmtsController","CmtsException","ExceptionsCmtsExistService","cmtsdata","ExceptionsCmtsExistController","addApproverCmtsPopUpService","addApproverCmtsPopUpController","ExceptionsCfsService","ExceptionsCfsController","CfsException","ExceptionsCfsExistService","cfsdata","ExceptionsCfsExistController","addApproverCfsPopUpService","addApproverCfsPopUpController","equipmentTypeService","getEquipment","equipment_types","equipmentTable","updateEquipmentType","equipment_type_data","equipmentTypeGroup","getEquipmentTable","FetchEquipmentTypeGroup","getEquipmentTypeGroup","equipment_type_groups","equipmentTypeController","equipmentTypeUpdating","equipment_data","statuss","editEquipment","row_data","CFS","CSL","cslUsers","csfUsers","equipmentTypeGroupData","editAccount","DiscussionShipmentsCslService","getShipmentDiscussions","DiscussionShipmentsCslController","gotoShipment","userName","DiscussionShipmentsCslExistService","DiscussionShipmentsCslExistController","DiscussionShipmentsCfsService","DiscussionShipmentsCfsController","DiscussionShipmentsCfsExistService","DiscussionShipmentsCfsExistController","DiscussionShipmentsService","DiscussionShipmentsController","DiscussionShipmentsExistService","DiscussionShipmentsExistController","notstatic","LogDetailController","exceptionForm","editable","ExceptionFormController","CreatePotentialExceptionsService","validateForm","end_date","arrivals","departures","checkAllModes","isSubmittedExpire","isAll","isValidator","isEditable","dateNow","watch","resetService","portChips","portCodeCache","copyException","exc_A","exc_B","processData","exceptionDetails","isStaticMode","newExceptionDetails","originalExceptionDetails","exceptionPackage","toJSON","shapes","country_city_code","known_updated_at","updated_at","row_version","paginateChips","pageNum","perPage","countryCityCode","tempPorts","filteredPorts","startPage","lastPage","mannualPorts","note","exceptionAuthor","postException","updateException","publishException","deleteException","getPotentialExceptionShipments","isNew","getOriginalExceptionDetails","getPorts","getIsValidator","getUpdates","isChange","toggleIsEditable","setIsEditable","nums","checkChips","unCheckAllChips","checkAllChips","getPortChips","resetPorts","postShape","shapes_json","postCountryCityCodes","codes","country_city_codes","addPorts","_ports_","CreatePotentialExceptionsController","$mdpDatePicker","POTENTIAL","errorMsgLensMode","myToast","closeMdToastErr","setUrlPath","urlPath","editPotentialException","setStatus","DRAFT","isPublishEdit","PUBLISHED","postputException","isSaveDraftForSubmit","curr_state","SUBMITTED","SUBMITTED_EXPIRE","reviewer","isDraft","handleAction","action_type","close_modal","setActionLoadingAndDisabledWithType","potentialExceptionHasTitle","saveAsDraft","actionType","saveDraft","isDraftSaving","confirmCancel","isButtonDisabled","isLoadingAffectedShipments","isActionDisabled","confirmSubmit","confirmEnd","isDeleting","confirmReject","reject_reason","go","confirmPublish","isPublished","saveEdits","submitButton","missingFields","requiredSubmitFields","hasEntry","translations","cancelEdits","showTimePicker","showConfirmationDialog","numShipmentsAffected","affected_shipments_count","addLocation","locationsSearchField","uncheckAllChips","changePage","setPageNumbers","changePerPage","pageRange","setAddLocationsScope","addLocationsScope","chipManualLocations","manualLocationSearchText","selectedManualLocationChange","addManualLocations","showAddLocations","stateprov","manualPorts","checkChip","searchChips","searchChange","isSubmitted","ACTION","SAVEDRAFT","SUBMIT","SAVE","CONFIRM_DELETE","CONFIRM_REJECT","CONFIRM_SUBMIT","CONFIRM_PUBLISH","CONFIRM_END","peID","chipsLoading","mapActive","NONE","CreateMapController","initialize","isLoad","mapOptions","mapTypeId","MapTypeId","TERRAIN","Map","drawingManager","drawing","DrawingManager","drawingControl","drawingControlOptions","ControlPosition","TOP_CENTER","drawingModes","OverlayType","CIRCLE","POLYGON","RECTANGLE","polygonOptions","clickable","circleOptions","rectangleOptions","newShape","overlay","setDrawingMode","addModifyShapeListener","rightClickShape","getCities","shape","vertex","getPaths","getAt","removeAt","removeShape","drawShape","drawableShape","latlngbounds","Rectangle","north","northeast","east","south","southwest","west","draggable","Circle","Polygon","paths","latLng","getLatLong","polys","getPath","getShapes","selectedCityCodes","missingCityCodes","shapeCityCodes","county_city_code","missingPorts","createAccount","resetDirective","fn","masterModel","numbersOnly","ngModelCtrl","fromUser","transformedInput","$parsers","companyRouteChanged","routeStatus","show_booking_shipment","show_discussion_module","show_discussion_module_csl","show_discussion_module_cfs","show_discussion_module_cmts","cfs_exception_hours","cfs_exception_minutes","is_cfs_threshold_default","is_cfs_send_exception_email","is_cfs_show_class","cmts_default_bccs","cmts_customer_ids","cmts_exception_hours","cmts_exception_minutes","is_cmts_threshold_default","is_cmts_send_exception_email","allCompanyCount","companyTableData","companyLensTable","lensGroupData","companyExceptionTable","all_company_count","getCompaniesFilter","company_params","unpackageCompanyNew","createNewCompany","updateCompany","_company_","deleteConfirmCompany","company_data","company_csv","bulk_companies","postBulkCompanies","getBulkCompanies","clearCompanyTable","getAllCompaniesCount","getCompanyTableData","CompanyManagementController","company_edit_emails","thresholdCheck","threshold_cfs_Change","cfs_thresholdCheck","cfs_hoursCheck","cfs_minutesCheck","threshold_cmts_Change","cmts_thresholdCheck","cmts_hoursCheck","cmts_minutesCheck","listCompany","cww_party_check","addPartyIdsCsl","csl_party_check","addPartyIdsCfs","cfs_party_check","addPartyIdsCmts","cmts_party_check","cfs_threshold_default","cmts_threshold_default","add_company","import_company","companySearch","companySearchNotEnable","companySearchFilter","resetDefaultUserContact","saveCompany","cfs_exception","cmts_exception","cfs_approver_ids","cmts_approver_ids","cww_default_contact_id","refresh_time","csl_default_contact_id","party_check_new2","cfs_default_contact_id","party_check_new3","cmts_default_contact_id","party_check_new4","resObject","base","primaryContactCheckCmts","is_cmts_show_class","isValidCwwDefaultContact","isValidCfsDefaultContact","isValidCslDefaultContact","isValidCmtsDefaultContact","activateCompany","deactivateCompany","getCompanyUserCount","companyUserCount","companyEditEmails","portaEditCheck","consignee_check","userEmailActiveCheck","approversCheck","defaultDisabled","departmenttitle","exceptiontitle","exceptionCount","live_exceptions_count","allCompaniesCount","checkRefreshTimeField","$setDirty","$setTouched","actionTimeOut","ViewActionBoard","BulkUsersController","setFieldErrors","fieldErrors","element_index","bulkUsersForm","message_key","viewValueStr","$viewValue","initializeErrors","new_users","emails","companyIdExist","user_errors","taken_emails","pathway_role","party_id_overrides","bccs_overrides","primary_contact_overrides","createdUserEmails","createdUserIDs","importUserIds","selected_users","selectedRowsValid","rows_valid","rowHasErrors","selectAllChecked","bulkFilter","refreshCompanies","attribute","$validate","refreshEmails","asyncErrors","updateErrorCount","userEmailForm","isSendEmailLoading","BulkCompaniesController","selectCompany","bulkCompaniesForm","new_companies","cww_enable_show_bookings","cww_enable_discussion","cww_enable_magno_skin","cww_enable_action_board","csl_show_class","csl_send_exception_email","cfs_show_class","cfs_send_exception_email","cmts_send_exception_email","enable_demo","cww_refresh_time","refreshRes","isNumVal","cww_party_ids","cww_group_ids","csl_exception_email","csl_exception_threshold","cfs_exception_email","cfs_exception_threshold","cmts_default_contact","cmts_trading_partner_ids","cmts_exception_email","cmts_exception_threshold","canonicalizeCompanies","createdComapanies","selected_companies","MdSelectHelper","$mdSelect","overflow","scrollMask","onScrollMaskClick","zIndex","unbind","$auth","Idle","autoCompleteUsers","setScrollHight","getScrollHight","ScrollHight","fiveDayForecastDefault","fiveDayForecastAljexDefault","loadUserData","getUnseenCount","table_settings","localUser","setUser","_user_","azure_user_id","AllActivetabs","show_cfs_class","all_cww_unseen_discussion_count","all_csl_unseen_discussion_count","all_cfs_unseen_discussion_count","all_cmts_unseen_discussion_count","isConsigneeShipper","portal_user_type","action_board_adv_search_column","findValueForKeyInGroups","ga","notification_setting","milestone_setting","booked","pick_up","confirmed_on_board","logoutUser","dummyUserParam","authHeadersData","isLoggedIn","auth","getConfig","validateOnPageLoad","shippingDetailsSettings","invoicesExpanded","loadShippingDetailsSettings","expanded","storeShippingDetailsSettings","shippingDetailsExpanded","refNumbersExpanded","aljexSavedForecastIsExpanded","aljexSavedForecastExpanded","setAljexSavedForecastExpanded","checkSettings","tempAuth","getResetAuth","Check1","Check2","Check3","Check4","Check5","canAccessOperations","userid","postDownloadFileAudit","bulkUserExport","setSeenSpotlight","getActiveSpotlights","cr_url","getUnseenSpotlights","getResetQuestions","okta_user_id","hostname","questions","getResetQuestion","oktaid","question","setSelectedRoute","routeIndex","selectedRoute","getSelectedRoute","setsubmenuLink","submenuLink","SelectedsubmenuLink","getsubmenuLink","setContainerExpanded","isContainer","openFlag","routerConfig","requireLogin","menuGroup","checkSecurityAnswer","secQuestionArray","secAnsArray","securityAnswerInvalid","checkPassWithEmail","passwrd","stored_emailId","userEmailStr","usr","userDomain","splitUsername","emailComb","consecutiveCobinations","uniqueEmailComb","passComb","properNameAndDomain","passInValid","checkOktaAnswer","oktaQuestion","oktaAnswer","answerValid","sendMail","changeQuestionSaml","resetQuestionForm","isResetQuestionLoading","changePasswordSaml","resetPasswordForm","isResetPasswordLoading","encryptedPassword","btoa","resetPasswordSaml","azureid","clear","sessionStorage","tokenid","resetPassword","encryptedPasswordConfirmation","reset_headers","confirmPassword","confirmPasswordForm","isConfirmPasswordLoading","confirmation_token","previousSlide","currentSlide","splotlightSlideArr","showPrev","showNext","nextSlide","makeAllMilestoneActive","AllStatus","greyout","checkAll_milestones","login","username","demoUserExist","magno","isLoggingIn","redirect_url","logout","requestPasswordReset","requestPasswordResetForm","isResetPasswordRequestLoading","user_form","isUpdateAccountLoading","updatePassword","changePasswordForm","formCtrl","isUpdatePasswordLoading","current_password","redirectToSaml","dummyUserEmail","showSamlData","paramsObject","triggerSamlData","name_id","redirect_path","fromPath","activityType","user_activity","getMatchesUsers","searchTextval","items","userDisabled","isUserRequired","displayReportFields","isCompanyRequired","exportAuditlog","exportAuditReports","isReportLoading","from_date","to_date","isToDateRequired","isFromDateRequired","selectedCompanyRecord","isUserCompanyRequired","isConfirmPasswordRequestLoading","expandedMoreShipping","azureuserid","showNextPrev","showPrevPrev","userstatus","user_email","passwordPattern","isParams","client_id","token","onEnterKeyPress","userActivityTab","ShowFromDate","vmDate","ShowToDate","userExport","userExportData","cww_roles","csl_roles","cfs_roles","cmts_roles","cww_classic","Classic_roles","adUser","nonAduser","userReportTab","onCwwChecked","frmData","onCslChecked","onCfsChecked","onCmtsChecked","focusMe","doesBincludeA","A","B","blank_permissions","user_permissions","_permissions","logIn","changeQuestion","changePassword","passwordVerify","combined","processPins","pinData","geotype","active_geocodes","potential_exception_geocodes","exception_geocodes","deliverDate","menuGroups","trackAndTrace","trackAndTraceBooking","trackAndTraceActionBoard","trackAndTraceInTransit","trackAndTraceCfs","trackAndTraceCmts","trackAndTraceCsl","TrackTraceController","selectedStatus","dueRangeIsSelected","dueDateRangeSelect","due_start_date","due_end_date","due_start_date_new","due_end_date_new","etaRangeIsSelected","etaDateRangeSelect","eta_start_date","eta_end_date","eta_start_date_new","eta_end_date_new","etdRangeIsSelected","etdDateRangeSelect","etd_start_date","etd_end_date","etd_start_date_new","etd_end_date_new","shipRangeIsSelected","shipDateRangeSelect","ship_start_date_new","ship_end_date_new","estimatedRangeIsSelected","estimatedDateRangeSelect","estimated_start_date","estimated_end_date","estimated_start_date_new","estimated_end_date_new","selectedOrigin","selectedDestination","statusList","absNewUrl","absOldUrl","savedSearch","sort_param","sortParam","loadAnimation","moduleLoadAnimation","gbOverlay","condition","backdrop","transcludeFn","overlayTarget","overlayWrapper","makeOverlayWrapper","overlayContent","makeOverlayContent","overlayBackground","makeOverlayBackground","DEFAULT_BACKDROP_OPACITY","DEFAULT_BACKDROP_COLOR","DEFAULT_Z_INDEX","documentPath","documentName","menuGroupCww","ShippingDetailsController","shipment_invoices_without_credit_note","defaultContainer","updatedData","arrival","departure","addLastMilestone","under_exception","discussion_notification_id","chatContactsAutocomplete","containerDetails","getAllContainers","cww_is_container_display","IsContainerVisible","expandBtn","k2","getReferenceNumbers","referencenumbers","onlyUnique","reduce","containers3","showAllConaintersData","dueDate","shipment_display_date","duedatenew","daysRemainingNew","daysLateNew","shipment_milestones_view","counterFlag","actualdate","nextmilestone","lastmilestone","shipment_id","chatContactsList","tagged_users_name","t_users","cww_discussion_count","downloadlinkv2","displayContainer","prev_page","file_discussion_chat","altKey","is_container_display","scrollToBottom","SidebarController","$mdSidenav","user_audit_emails","valid_user_audit","user_emails","cviewpopup","cviewModal","isKitchenSink","adminMenuItems","CviewMenuItems","Transpotation","Warehousing","Account","tracktrace","Reports","operations","Customs","cviewpopupmsg","cviewSubMenupmsg","DashboardCww","DashboardCsl","DashboardCfs","DashboardCmts","discussion_visibility_cmts","booking_visibility","shiplink_visibility","auditReportCheck","supportRequestCheck","DashboardCwwShipment","DashboardCslShipment","DashboardCfsShipment","DashboardCmtsShipment","permission_length","AllActivetabsArr","Scrollheight","item_url","CviewMenuItemsSubMenu","hovering","showIt","iconhover","showSubmenuLinkval","showSubmenuLink","sidemenuController","defaultDashboard","cslDashboard","cfsDashboard","cmtsDashboard","craneWorldWide","dashboard","paddingLeft","trackAndTraceDiscussion","craneSolutions","dashboardCsl","trackAndTraceDiscussionCsl","craneFreight","dashboardCfs","trackAndTraceDiscussionCfs","craneMts","dashboardCmts","trackAndTraceDiscussionCmts","dashboardTypes","dashboardTypesSubMenu","itemflag","menuItems","bookShipment","admin","cslException","csl_excptions_permission","is_csl_dashboard","cfsException","cfs_excptions_permission","is_cfs_dashboard","manage","lensgroup","auditlog","demo_account","demo","ship_link","Transportation","cview_operationskpi","operationskpi","cview_transportation","transportation","cview_warehouse","cview_accounts_receivables","accounts_receivables","cview_book_shipment","cview_reporting","cview_customs","cview_operations","AllShowActivetabs","CviewSubmenuToggole","activeflag","CviewMenuToggoleItems","CviewMenuToggole","CmenuHeader","cviewSubmenuPageUrl","cviewSubmenuPage","submenuUrl","prunedMenuItems","mi","prunedAdminMenuItems","pe_permissions","prunedReportMenuItems","prunedCviewMenuItems","itemslist","CviewSubmenuItemsflag","CviewMenuItemsSubMenulist","CviewSubMenulist","subMenuTabs","Selecteditemindex","sinkItems","gotoAnchor","newHash","toggleMenu","ind","cvaShell","ShellController","activate","hideSplash","showSplash","isBusy","isSidenavOpen","openLeftMenu","toggle","navline","htTopNav","TopNavController","$mdComponentRegistry","searchExpanded","isExpanded","showSearch","virtualRepeat","editaccountvisible","reskin_logo","magnointl_Logo","cranewwLogo","magno_login","when","it","isOpen","toggleSearch","htSidebar","dropdown","dropClass","$dropdownElement","$sidebarInner","KitchenSinkController","showBookmarkToast","resetPageLoad","pageLoaded","resetWidget1Load","widget1Loaded","widget1Data","resetWidget2Load","widget2Loaded","widget2Data","rand","resetWidget3Load","widget3Loaded","widget3DataTab1","widget3Data","original","tab1","widget3DataTab2","tab2","widget3DataTab3","tab3","widget3DataTab4","tab4","resetTheme","themeLoaded","themeData","resetTable1Load","table1Loaded","resetTable2Load","table2Loaded","getWidget3Data","getColorGroups","hexColor","rgbColor","random","widget1Control","widget1SegmentClassMap","widget2Control","widget2SegmentClassMap","craneIcons","colorGroups","multipleEmails","re","validityArr","atLeastOneInvalid","countingNumber","isCounting","currNum","DashboardService","processLanePairs","pin_types","ship_type","top_3","top_3_by_count","total_by_count","total_by_volume","route_name","pin","loadPotentialExceptions","loadSpendingOverTime","DashboardController","tabSelectedOne","setData","setFullYear","doLoadSpendingOverTime","getDashboard","getLanePair","onSVOCPeriodTabSelected","selectLane","onSVOCMetricTabSelected","onSVOCLaneTypeTabSelected","startDateforWeek","startWeekDate","startDateforYear","startYearDate","spendingOverTime","sotime","getTheme","displayDateOnGraph","parseFormattedDate","limitData","spentMode","time_unit","urgent_air","custom_brokerage","data_date","years","sortNum","periodIsOver","periodType","time_units","limitedData","selectedTabIndex","resData","sopDefaultDate","group_by","getstackedChartData","defaultTabSelected","forceFirstLoad","lanePairsPeriod","DateTo","dateSubPeriod","dateSubAmount","DateFrom","doLoadLanePairs","dateShow","laneDate","sopDate","otpDate","enddate","datefromWeek","datefromYear","dateToWeek","dateToYear","CurrDate","eightWeekBefore","yearBefore","noOfdays","daysDifference","totalMonths","monthDiff","FormatedEndDate","FormatedStartDate","temp","eightWeekBeforeCurrDate","crDate","startDateForm","currDate","sopdateFrom","dateForLoad","tabValue","disableSet","dateReset","getStartDate","endofDate","returnDate","endofDateForm","checkValidDate","setValid","loadTrackandTracePage","otpSelection","otp_type","otp_period","otp_date_from","utc","otp_date_to","onspentModeSelected","deselectSpendMode","stackedData","totalData","formatedData","labels","labelColors","series","chartColors","hoverBackgroundColor","hoverBorderColor","Allseries","potentialExceptionNum","currentPotentialExceptionsLoading","loadTrackandTrace","spent_type","totalButton","toggleTotal","spendingOverTimeData","weekHasData","monthHasData","quarterHasData","yearHasData","isSpendingOverTimeLoaded","spendingOverTimePeriod","seriesText","maintainAspectRatio","scales","xAxes","stacked","fontColor","yAxes","callback","currency","minimumFractionDigits","maximumFractionDigits","scaleLabel","labelString","horizontalAlign","tooltips","xPadding","callbacks","tooltipItem","datasets","datasetIndex","labelvalue","footer","chart","html5Mode","enabled","requireBase","cmtsException","reports","supportRequests","approver","all_clients_approver","export","cview_operations_dashboard","Operations_Dashboard","reports_creports","creports","reports_maintenance_report","maintenance_report","reports_reporting_sharepoint","reporting_sharepoint","reports_kpi_services","kpi_services","customer_group","customer_name","origin_country","origin_city","ship_date_from","ship_date_to","shipper","service_level_code","consol_number","destination_country","destination_city","pod_eta_date_from","pod_eta_date_to","pol_etd_date_from","pol_etd_date_to","container_number","$mdDateLocaleProvider","dateString","$authProvider","apiUrl","tokenValidationPath","signOutUrl","emailRegistrationPath","accountUpdatePath","accountDeletePath","confirmationSuccessUrl","passwordResetPath","passwordUpdatePath","passwordResetSuccessUrl","emailSignInPath","storage","forceValidateToken","proxyIf","proxyUrl","omniauthWindowType","authProviderPaths","github","facebook","tokenFormat","token-type","cookieOps","expires","expirationUnit","secure","createPopup","parseExpiry","handleLoginResponse","handleAccountUpdateResponse","handleTokenValidationResponse","ipCookie","$injector","authData","responseError","$httpVal","startInterval","clearInterval","$httpProvider","unpackageShipOrder","section","ship_order","packageShipOrder","submitShipOrder","getBlankOrder","getShipOrder","getShipOrderVariable","postShipOrder","getBookingDraft","putBookingDraft","deleteBookingDraft","shipper_name","serviceLevelTypes","setCurrentShipOrder","getServiceLevelType","BookShipmentController","setOrdersFromShipOrder","shipper_consignee_info","shipment_details","haz_mat","item_details","complete_shipment","isSavedDraft","generate_label","book_shipment_generate_label","book_shipment_settings","default_reference_number_types","ShipmentDetailsForm","shipmentAvailableTime","pickUpDate","dockTime","sideBarData","CustomerInfoForm","ShipperConsigneeForm","ShipmentOptionsForm","shouldValidateReferenceNumbers","optional","ReferenceNumbersForm","unID","classGroup","ItemDetailsForm","CompleteShipmentForm","isAllFormsValid","isFormValid","clearOrder","blank_order","isLocked","searchOrigin","searchDestination","forms","clearDraft","clearSection","noOfPieces","grossWeight","uom1","descriptionOfGoods","scheduleBInternational","uom2","updateItemDetails","totalNumPieces","totalGrossWeight","updateServiceLevel","isReview","reviewOrder","resizeSidebar","viewBookedShipment","bookingNumber","bookingNumberSearch","submitOrder","confirmCSS","submissionErrors","readTermsAndConditions","isSubmitLoading","bill_of_lading_download_path","shippingLabel","shipping_label_download_path","bol_sli_cmr","error_msg","section_label","printBillOfLading","printShippingLabel","closeConfirmationModal","changedSameAsBilling","same_as_billing","shipperPhone","customerPhone","customer","shipperAddress1","customerAddress1","shipperCity","customerCityName","shipperCountry","customerCountry","shipperAccountCode","customerAccountCode","shipperAddress2","customerAddress2","shipperState","customerStateProv","shipperPostalCode","customerPostalCode","addReferenceNumber","addItemDetail","isTouchSupported","msTouchEnabled","msMaxTouchPoints","generalTouchEnabled","removeItemDetail","doneEditingItemDetails","editItemDetailRows","showItemDetailRemoveButton","removeRefNum","doneEditingRefNums","editRefNumRows","showRefNumRemoveButton","isSavingDraft","booking_draft","file_index","minPickUpDate","isCustomerFieldLocked","isShipperFieldLocked","isConsigneeFieldLocked","referenceNumberTypes","autoCompleteBookment","isFieldsLocked","autoBookController","textChange","shipperAddress3","shipperAddress4","consigneeAddress1","consigneeAddress2","consigneeAddress3","consigneeAddress4","consigneeCity","consigneeCountry","consigneeContactName","consigneePostalCode","consigneePhone","consigneeAccountCode","selectItemChange","customer_address1","customer_address2","customer_phone","account_code","shipper_address1","shipper_address2","shipper_address3","shipper_address4","shipper_city","shipper_country","shipper_zip_code","consignee_address1","consignee_address2","consignee_address3","consignee_address4","consignee_country","consignee_contact","shipment_ship_date_range_to","shipment_expected_delivery_date_range_to","shipment_delivered_date_range_to","shipment_due_date_range_to","shipment_eta_date_range_to","shipment_etd_date_range_to","shipment_due_date_equal_to","shipment_expected_delivery_date_equal_to","eta_date_from","eta_date_to","etd_date_from","etd_date_to","estimated_date_from","estimated_date_to","incoterm","vesselname","voyage","origin_code","destination_code","invoicenumber","invoice_number","customer_street_address","customer_zip","customer_party_id","shipment_invoice_amount_is_less_than","shipment_invoice_amount_is_greater_than","shipment_invoice_amount_equal_to","shipment_invoice_amount_range","shipment_mode","shipment_reason_code","shipment_service_level","shipment_awb_bol","shipment_ref","shipment_consol","shipment_delivered_date_equal_to","shipment_ship_date_equal_to","shipment_origin_country","shipment_origin_city_code","shipment_destination_country","shipment_destination_city_code","shipment_lane_pair","shipper_street_address","shipper_state","shipper_zip","shipper_phone","shipper_party_id","consignee_party_id","shipment_port_of_discharge","shipment_port_of_load","shipment_eta_date_equal_to","shipment_etd_date_equal_to","shipment_incoterm","shipment_vesselname","shipment_voyage","departmentCompanyId","descSort","getBusinessTypeCodes","getReasonCodes","getServiceLevelCodes","booking_status","transit_status","AdvSearchController","getServiceLevels","getBusinessTypes","invoice_amount","service_level","awb_bol","ref","consol","delivered_date","ship_date","due_date","expected_delivery_date","port_of_discharge","port_of_load","eta_date","etd_date","supportRequestCompanyDetailsController","loadingCompanyData","AdminService","newUserInfo","display_name","email_address","crane_poc","user_group","getAdminData","getNewUserInfo","postUserData","requiredPermission","AdminController","createUser","updateNameEmail","firstName","lastName","currPass","newPass","confirmPass","newUserCopy","define","amd","global","JSZip","1","_dereq_","_keyStr","encode","utf8","chr1","chr2","chr3","enc1","enc2","enc3","enc4","decode","fromCharCode","2","CompressedObject","compressedSize","uncompressedSize","crc32","compressionMethod","compressedContent","getContent","getCompressedContent","3","STORE","magic","compress","uncompress","compressInputType","uncompressInputType","DEFLATE","./flate","4","crc","getTypeOf","iTop","./utils","5","DataReader","checkOffset","checkIndex","newIndex","setIndex","skip","byteAt","readInt","readString","transformTo","readData","lastIndexOfSignature","sig","readDate","dostime","6","base64","binary","dir","createFolders","compression","7","string2binary","string2Uint8Array","uint8Array2String","string2Blob","buffer","arrayBuffer2Blob","outputType","checkSupport","MAX_VALUE_16BITS","MAX_VALUE_32BITS","pretty","findCompression","isRegExp","8","USE_TYPEDARRAY","Uint16Array","Uint32Array","pako","deflateRaw","inflateRaw","9","root","newObj","compressions","./base64","./compressions","./defaults","./deprecatedPublicUtils","./load","./object","./support","10","ZipEntries","zipEntries","decompressed","optimizedBinaryString","fileComment","zipComment","./zipEntries","11","Buffer","encoding","isBuffer","12","NodeBufferReader","Uint8ArrayReader","./uint8ArrayReader","13","signature","nodeBuffer","StringWriter","Uint8ArrayWriter","getRawData","getBinaryData","nodebuffer","asBinary","dataToString","asUTF8","out","utf8decode","utf8encode","ZipObject","_initialMetadata","asText","asNodeBuffer","asUint8Array","asArrayBuffer","decToHex","dec","prepareFileAttrs","fileAdd","dataType","parentFolder","folderAdd","lastSlash","generateCompressedObjectFrom","generateZipParts","compressedObject","dosTime","dosDate","utfEncodedFileName","utfEncodedComment","useUTF8ForFileName","useUTF8ForComment","extraFields","unicodePathExtraField","unicodeCommentExtraField","getHours","getMinutes","getSeconds","fileRecord","LOCAL_FILE_HEADER","dirRecord","CENTRAL_FILE_HEADER","stream","relativePath","fileClone","regexp","folder","arg","newFolder","ret","kids","generate","writer","zipData","localDirLength","centralDirLength","compressionName","zipPart","dirEnd","CENTRAL_DIRECTORY_END","typeName","zip","finalize","string","./compressedObject","./crc32","./nodeBuffer","./signature","./stringWriter","./uint8ArrayWriter","./utf8","14","ZIP64_CENTRAL_DIRECTORY_LOCATOR","ZIP64_CENTRAL_DIRECTORY_END","DATA_DESCRIPTOR","15","StringReader","./dataReader","16","17","arraybuffer","uint8array","Builder","BlobBuilder","WebKitBlobBuilder","MozBlobBuilder","MSBlobBuilder","builder","getBlob","18","sig0","sig1","sig2","sig3","subarray","19","20","_utf8len","string2buf","c2","m_pos","str_len","buf_len","utf8border","buf2string","c_len","utf16buf","applyFromCharCode","chunk","nextBoundary","21","identity","stringToArrayLike","arrayLikeToString","canUseApply","resultStr","arrayLikeToArrayLike","arrayFrom","arrayTo","byteLength","inputType","supported","22","loadOptions","ZipEntry","jszipProto","checkSignature","expectedSignature","readBlockEndOfCentral","diskNumber","diskWithCentralDirStart","centralDirRecordsOnThisDisk","centralDirRecords","centralDirSize","centralDirOffset","zipCommentLength","readBlockZip64EndOfCentral","zip64EndOfCentralSize","versionMadeBy","versionNeeded","zip64ExtensibleData","extraFieldId","extraFieldLength","extraFieldValue","extraDataSize","readBlockZip64EndOfCentralLocator","diskWithZip64CentralDirStart","relativeOffsetEndOfZip64CentralDir","disksCount","readLocalFiles","localHeaderOffset","readLocalPart","handleUTF8","readCentralDir","zip64","readCentralPart","readEndOfCentral","prepareReader","./nodeBufferReader","./stringReader","./zipEntry","23","isEncrypted","bitFlag","useUTF8","prepareCompressedContent","previousIndex","compressedFileData","prepareContent","uncompressedFileData","localExtraFieldsLength","fileNameLength","checkCRC32","extraFieldsLength","fileCommentLength","diskNumberStart","internalFileAttributes","externalFileAttributes","readExtraFields","parseZIP64ExtraField","extraReader","upath","findExtraFieldUnicodePath","ucomment","findExtraFieldUnicodeComment","upathField","ucommentField","24","deflate","inflate","constants","./lib/deflate","./lib/inflate","./lib/utils/common","./lib/zlib/constants","25","deflator","Deflate","raw","gzip","zlib_deflate","strings","zstream","Z_NO_FLUSH","Z_FINISH","Z_OK","Z_STREAM_END","Z_DEFAULT_COMPRESSION","Z_DEFAULT_STRATEGY","Z_DEFLATED","level","chunkSize","windowBits","memLevel","strategy","chunks","strm","avail_out","deflateInit2","deflateSetHeader","_mode","next_in","avail_in","Buf8","next_out","onEnd","onData","buf2binstring","shrinkBuf","deflateEnd","flattenChunks","./utils/common","./utils/strings","./zlib/deflate.js","./zlib/messages","./zlib/zstream","26","inflator","Inflate","zlib_inflate","gzheader","inflateInit2","inflateGetHeader","next_out_utf8","tail","utf8str","binstring2buf","arraySet","inflateEnd","ungzip","./zlib/constants","./zlib/gzheader","./zlib/inflate.js","27","TYPED_OK","Int32Array","sources","shift","fnTyped","src_offs","dest_offs","fnUntyped","setTyped","Buf16","Buf32","28","STR_APPLY_UIA_OK","STR_APPLY_OK","__","./common","29","adler32","adler","s1","s2","30","Z_PARTIAL_FLUSH","Z_SYNC_FLUSH","Z_FULL_FLUSH","Z_BLOCK","Z_TREES","Z_NEED_DICT","Z_ERRNO","Z_STREAM_ERROR","Z_DATA_ERROR","Z_BUF_ERROR","Z_NO_COMPRESSION","Z_BEST_SPEED","Z_BEST_COMPRESSION","Z_FILTERED","Z_HUFFMAN_ONLY","Z_RLE","Z_FIXED","Z_BINARY","Z_TEXT","Z_UNKNOWN","31","makeTable","crcTable","32","errorCode","rank","zero","flush_pending","pending","pending_buf","pending_out","total_out","flush_block_only","trees","_tr_flush_block","block_start","strstart","put_byte","putShortMSB","read_buf","total_in","longest_match","cur_match","chain_length","max_chain_length","scan","best_len","prev_length","nice_match","w_size","MIN_LOOKAHEAD","_win","wmask","w_mask","prev","strend","MAX_MATCH","scan_end1","scan_end","good_match","lookahead","match_start","fill_window","more","_w_size","window_size","hash_size","head","insert","MIN_MATCH","ins_h","hash_shift","hash_mask","deflate_stored","flush","max_block_size","pending_buf_size","BS_NEED_MORE","max_start","BS_FINISH_STARTED","BS_FINISH_DONE","deflate_fast","hash_head","bflush","match_length","_tr_tally","max_lazy_match","last_lit","BS_BLOCK_DONE","deflate_slow","max_insert","prev_match","match_available","deflate_rle","deflate_huff","lm_init","configuration_table","max_lazy","good_length","nice_length","max_chain","DeflateState","gzhead","gzindex","last_flush","w_bits","hash_bits","dyn_ltree","HEAP_SIZE","dyn_dtree","D_CODES","bl_tree","BL_CODES","l_desc","d_desc","bl_desc","bl_count","MAX_BITS","heap","L_CODES","heap_len","heap_max","depth","l_buf","lit_bufsize","d_buf","opt_len","static_len","bi_buf","bi_valid","deflateResetKeep","data_type","INIT_STATE","BUSY_STATE","_tr_init","deflateReset","MAX_MEM_LEVEL","deflateInit","MAX_WBITS","DEF_MEM_LEVEL","old_flush","beg","FINISH_STATE","hcrc","extra","os","EXTRA_STATE","OS_CODE","level_flags","PRESET_DICT","NAME_STATE","COMMENT_STATE","HCRC_STATE","bstate","func","_tr_align","_tr_stored_block","LENGTH_CODES","LITERALS","Config","deflateInfo","../utils/common","./adler32","./messages","./trees","33","GZheader","xflags","extra_len","34","BAD","TYPE","_in","_out","dmax","wsize","whave","wnext","hold","lcode","dcode","lmask","dmask","here","op","dist","from_source","lencode","distcode","lenbits","distbits","dolen","dodist","sane","35","ZSWAP32","InflateState","havedict","wbits","ncode","nlen","ndist","have","work","lendyn","distdyn","back","was","inflateResetKeep","HEAD","ENOUGH_LENS","ENOUGH_DISTS","inflateReset","inflateReset2","inflateInit","DEF_WBITS","fixedtables","virgin","sym","lenfix","distfix","inflate_table","LENS","DISTS","updatewindow","here_bits","here_op","here_val","last_bits","last_op","last_val","opts","hbuf","TYPEDO","inf_leave","FLAGS","DICTID","TIME","EXLEN","EXTRA","NAME","COMMENT","HCRC","DICT","CHECK","STORED","LEN_","TABLE","COPY_","COPY","LENLENS","CODES","CODELENS","LEN","inflate_fast","LIT","LENEXT","DIST","DISTEXT","MATCH","LENGTH","DONE","MEM","Z_MEM_ERROR","SYNC","inflateInfo","./inffast","./inftrees","36","MAXBITS","lbase","lext","dbase","dext","lens_index","table_index","incr","fill","low","mask","curr","drop","used","huff","base_index","offs","extra_index","37","0","-1","-2","-3","-4","-5","-6","38","d_code","_dist_code","put_short","w","send_bits","Buf_size","send_code","tree","bi_reverse","bi_flush","gen_bitlen","h","xbits","dyn_tree","max_code","stree","stat_desc","static_tree","has_stree","extra_bits","extra_base","max_length","gen_codes","next_code","tr_static_init","base_length","extra_lbits","_length_code","base_dist","extra_dbits","static_ltree","static_dtree","static_l_desc","StaticTreeDesc","static_d_desc","static_bl_desc","extra_blbits","MAX_BL_BITS","init_block","END_BLOCK","bi_windup","copy_block","smaller","_n2","_m2","pqdownheap","compress_block","ltree","dtree","lc","lx","build_tree","elems","scan_tree","curlen","prevlen","nextlen","max_count","min_count","REP_3_6","REPZ_3_10","REPZ_11_138","send_tree","build_bl_tree","max_blindex","bl_order","send_all_trees","lcodes","dcodes","blcodes","detect_data_type","black_mask","static_init_done","TreeDesc","stored_len","STORED_BLOCK","STATIC_TREES","opt_lenb","static_lenb","DYN_TREES","DIST_CODE_LEN","39","ZStream","reset_cp","set_cp","char_codes","new_raw_buf","has_buf","s2a","isval","evert_key","K","evert","evert_num","evert_arr","date1904","epoch","cc2str","getdata","debom_xml","safegetzipfile","getzipfile","getzipdata","safe","parsexmltag","tag","skip_root","eq","attregexg","cc","strip_ns","nsregex2","escapexml","decregex","rencoding","charegex","parsexmlbool","parseVector","vtregex","baseType","vtvregex","vtmregex","writetag","wtregex","wxt_helper","writextag","write_w3cdtf","toISOString","write_vt","readIEEE754","isLE","nl","ml","eMax","eBias","NaN","Infinity","ReadShift","oI","oR","vv","loc","oo","__readUInt16LE","__utf8","__utf16le","__lpstr","__lpwstr","__readUInt8","_getchar","__readInt16LE","__readInt32LE","__readUInt32LE","__double","__hexlify","WriteShift","writeUInt16LE","writeUInt32LE","writeDoubleLE","writeInt32LE","CheckField","hexstr","fld","prep_blob","read_shift","chk","write_shift","parsenoop","new_buf","recordhopper","cb","tmpbyte","cntbyte","RT","XLSBRecordEnum","buf_array","bufs","blksz","newblk","curbuf","endbuf","__toBuffer","_bufs","write_record","ba","evert_RE","is_buf","shift_cell_xls","tgt","cRel","rRel","shift_range_xls","parse_StrRun","ich","ifnt","parse_RichStr","parse_XLWideString","rgsStrRun","dwSizeStrRun","write_RichStr","write_XLWideString","parse_XLSBCell","col","iStyleRef","write_XLSBCell","parse_XLSBCodeName","parse_XLNullableWideString","cchCharacters","write_XLNullableWideString","parse_RkNumber","fX100","fInt","RK","parse_UncheckedRfX","write_UncheckedRfX","parse_Xnum","write_Xnum","parse_BrtColor","fValidRGB","xColorType","nTintAndShade","bRed","bGreen","bBlue","bAlpha","parse_FontFlags","fItalic","fStrikeout","fOutline","fShadow","fCondense","fExtend","rgbify","parse_ct","ctext","ct","workbooks","sheets","calcchains","themes","coreprops","extprops","custprops","strs","vba","TODO","rels","xmlns","tagregex","nsregex","Extension","ContentType","ct2type","PartName","WTF","XMLNS","CT","calcchain","sst","write_ct","XML_HEADER","CTYPE_XML_ROOT","CTYPE_DEFAULTS","f1","CT_LIST","f2","f3","type2ct","parse_rels","currentFilePath","resolveRelativePathIntoAbsolute","toksFrom","toksTo","tokTo","rel","Type","Target","Id","TargetMode","canonictarget","write_rels","RELS_ROOT","rid","parse_core_props","CORE_PROPS","cur","CORE_PROPS_REGEX","cp_doit","write_core_props","cp","CORE_PROPS_XML_ROOT","Props","creator","keywords","CreatedDate","xsi:type","ModifiedDate","parse_ext_props","EXT_PROPS","matchtag","HeadingPairs","TitlesOfParts","widx","Worksheets","parts","utf8read","write_ext_props","W","Application","EXT_PROPS_XML_ROOT","parse_cust_props","custregex","CUST_PROPS","xmlnsvt","vt","toks","unescapexml","write_cust_props","CUST_PROPS_XML_ROOT","pid","fmtid","xlml_set_prop","parse_FILETIME","dwLowDateTime","dwHighDateTime","parse_lpstr","parse_lpwstr","parse_VtStringBase","stringType","parse_VtString","parse_VtUnalignedString","parse_VtVecUnalignedLpstrValue","parse_VtVecUnalignedLpstr","parse_VtHeadingPair","headingString","parse_TypedPropertyValue","VT_USTR","headerParts","VT_I4","parse_VtVecHeadingPairValue","cElements","parse_VtVecHeadingPair","parse_dictionary","CodePage","dict","chr0","parse_BLOB","parse_ClipboardData","_opts","VT_VARIANT","VT_CUSTOM","parse_PropertySet","PIDSI","DictObj","start_addr","NumProps","Dictionary","PropID","Offset","PropH","fail","piddsi","VT_I2","oldpos","parsebool","parse_PropertySetStream","NumSets","FMTID0","FMTID1","Offset0","Offset1","SystemIdentifier","CFB","consts","HEADER_CLSID","PSet0","rval","FMTID","PSet1","parsenoop2","parslurp","parslurp2","parseuint16","parseuint16a","parse_Bes","parse_ShortXLUnicodeString","cch","current_codepage","biff","fHighByte","parse_XLUnicodeRichExtendedString","cRun","cbExtRst","fExtSt","fRichSt","parse_XLUnicodeStringNoCch","retval","parse_XLUnicodeString","parse_XLUnicodeString2","parse_LongRGBA","parse_LongRGB","parse_XLSCell","rw","ixfe","parse_frtHeader","rt","parse_OptXLUnicodeString","parse_XTI","iSupBook","itabFirst","itabLast","parse_RkRec","parse_AddinUdf","udfName","parse_Ref8U","rwFirst","rwLast","colFirst","colLast","parse_RefU","parse_FtCmo","ot","parse_FtNts","fSharedNote","parse_FtCf","cf","parse_FtArray","fts","ft","FtTab","parse_BOF","BIFFVer","parse_InterfaceHdr","parse_WriteAccess","enc","UserName","parse_BoundSheet8","hidden","dt","hs","parse_SST","ucnt","Count","Unique","parse_ExtSST","extsst","dsst","parse_Row","Col","parse_ForceFullCalculation","fullcalc","parse_RecalcId","parse_DefaultRowHeight","miyRw","fl","Unsynced","DyZero","ExAsc","ExDsc","parse_Window1","xWn","yWn","dxWn","dyWn","iTabCur","iTabFirst","ctabSel","wTabRatio","Pos","Dim","Flags","CurTab","FirstTab","Selected","TabRatio","parse_Font","parse_LabelSst","isst","parse_Label","parse_Format","ifmt","fmtstr","parse_Dimensions","parse_RK","rkrec","rknum","parse_MulRk","rkrecs","lastcol","parse_CellStyleXF","patternType","XLSFillPattern","icvFore","icvBack","parse_XF","fStyle","parse_Guts","parse_BoolErr","parse_Number","xnum","parse_SupBook","virtPath","ctab","rgst","sbcch","parse_ExternName","fBuiltIn","fWantAdvise","fWantPict","fOle","fOleLink","fIcon","parse_Lbl","chKey","cce","rgce","parse_NameParsedFormula","Name","parse_ExternSheet","snames","parse_ShrFmla","cUse","parse_SharedParsedFormula","parse_Array","parse_Ref","parse_ArrayParsedFormula","parse_MTRSettings","fMTREnabled","fUserSetThreadCount","cUserThreadCount","parse_NoteSh","idObj","stAuthor","parse_Note","parse_MergeCells","merges","cmcs","parse_Obj","cmo","parse_TxO","controlInfo","lastobj","parse_ControlInfo","cchText","parse_FontIndex","texts","hdr","parse_Country","CountryEnum","parse_ClrtClient","ccv","parse_Palette","parse_XFCRC","cxfs","parse_BIFF2STR","parse_BIFF2NUM","parse_si","cellHTML","sirregex","sitregex","parse_rs","parse_sst_xml","ss","sstr0","sstr1","sstr2","uniqueCount","write_sst_xml","main","sitag","straywsregex","parse_BrtBeginSst","parse_sst_bin","pass","write_BrtBeginSst","write_sst_bin","write_BrtSSTItem","_JS2ANSI","cptable","parse_Version","Major","Minor","parse_EncryptionHeader","AlgID","parse_EncryptionVerifier","parse_RC4CryptoHeader","vers","EncryptionVersionInfo","EncryptionHeader","EncryptionVerifier","parse_RC4Header","Salt","EncryptedVerifier","EncryptedVerifierHash","crypto_CreatePasswordVerifier_Method1","Password","PasswordArray","PasswordByte","Intermediate1","Intermediate2","Intermediate3","Verifier","PasswordDecoded","parse_XORObfuscation","verificationBytes","verifier","insitu_decrypt","crypto_MakeXorDecryptor","parse_FilePassHeader","Info","Data","parse_FilePass","hex2RGB","rgb2Hex","rgb","rgb2HSL","G","M","H6","S","L2","hsl2RGB","hsl","X","H","L","h6","rgb_tint","tint","rev","width2px","MDW","px2char","px","char2width","chr","cycle_width","collw","find_mdw","coll","DEF_MDW","MIN_MDW","MAX_MDW","parse_fills","Fills","bgColor","indexed","themeElements","clrScheme","raw_rgb","fgColor","parse_fonts","Fonts","underline","italic","strike","outline","shadow","vertAlign","parse_borders","Borders","border","sub_border","diagonalUp","diagonalDown","diagonal","auto","parse_numFmts","NumberFmt","formatCode","numFmtId","write_numFmts","NF","parse_cellXfs","CellXf","xf","fillId","alignment","vertical","horizontal","textRotation","indent","wrapText","write_cellXfs","cellXfs","write_sty_xml","style_builder","toXml","STYLES_XML_ROOT","parse_BrtFmt","stFmtCode","parse_BrtFont","dyHeight","grbit","bls","sss","uls","bFamily","bCharSet","brtColor","bFontScheme","Bold","Italic","Strikeout","Outline","Shadow","Condense","Extend","Sub","Sup","parse_BrtXF","ixfeParent","parse_sty_bin","write_sty_bin","parse_clrScheme","lastClr","parse_fontScheme","parse_fmtScheme","parse_themeElements","clrsregex","fntsregex","fmtsregex","parse_theme_xml","themeltregex","write_theme","themeXml","parse_Theme","dwThemeVersion","parse_ColorTheme","parse_FullColorExt","xclrType","nTintShade","xclrValue","parse_IcvXF","parse_XFExtGradient","parse_ExtProp","extType","parse_XFExt","cexts","ext","update_xfext","xfext","xfe","parse_cc_xml","parse_BrtCalcChainItem$","parse_cc_bin","parse_comments","dirComments","sheetRels","canonicalpath","parse_cmnt","sheetNames","sheetName","insertCommentsIntoSheet","safe_decode_range","thisCell","decode_cell","encoded","author","parse_comments_xml","authors","commentList","authorId","guid","sheetRows","textMatch","parse_BrtBeginComment","iauthor","rfx","parse_comments_bin","parseread","parseread1","parse_ColRelU","parse_RgceArea","parse_RgceAreaRel","parse_RgceLoc","parse_RgceLocRel","cl","parse_PtgArea","area","parse_PtgArea3d","ixti","parse_PtgAreaErr","parse_PtgAreaErr3d","parse_PtgAreaN","parse_PtgArray","parse_PtgAttrBaxcel","bitSemi","bitBaxcel","parse_PtgAttrChoose","parse_PtgAttrGoto","bitGoto","parse_PtgAttrIf","bitIf","parse_PtgAttrSemi","parse_PtgAttrSpaceType","parse_PtgAttrSpace","parse_PtgAttrSpaceSemi","parse_PtgRef","parse_PtgRefN","parse_PtgRef3d","parse_PtgFunc","iftab","FtabArgc","Ftab","parse_PtgFuncVar","cparams","parsetab","Cetab","parse_PtgExp","parse_PtgErr","BErr","parse_PtgInt","parse_PtgBool","parse_PtgNum","parse_PtgStr","parse_SerAr","parse_PtgExtraMem","parse_PtgExtraArray","cols","rows","parse_PtgName","nameindex","parse_PtgNameX","parse_PtgMemArea","parse_PtgMemFunc","parse_PtgRefErr","parse_Formula","parse_FormulaValue","cbf","parse_XLSCellParsedFormula","formula","shared","tt","parse_RgbExtra","rgcb","parse_Rgce","ptgs","PtgTypes","Ptg18","Ptg19","mapper","stringify_formula","supbooks","e1","e2","nameidx","stack","ff","fflen","argc","lbl","XLSXFutureFunctions","bookidx","externbook","sharedf","parsedf","fnd","arrayf","parse_XLSBCellParsedFormula","get_sst_id","get_cell_style","numFmt","addStyle","revssf","fontId","borderId","xfId","applyNumberFormat","get_cell_style_csf","cellXf","applyAlignment","safe_format","fillid","_general_int","_ssfopts","_general_num","_general","cellNF","parse_ws_xml_dim","parse_ws_xml","ridx","dimregex","mergecells","mergecregex","cellStyles","colregex","parse_ws_xml_cols","refguess","mtch","sheetdataregex","parse_ws_xml_data","parse_ws_xml_hlinks","hlinkregex","tmpref","write_ws_xml_merges","write_ws_xml_pagesetup","pageSetup","horizontalDpi","verticalDpi","Rel","rng","addr","seencol","coli","colm","colM","wpx","write_ws_xml_cols","customWidth","write_ws_xml_cell","oldt","oldv","cellDates","Strings","write_ws_xml_data","rr","encode_col","encode_row","write_ws_xml","WS_XML_ROOT","sidx","rdata","sheetView","showGridLines","workbookViewId","write_ws_xml_row_breaks","write_ws_xml_col_breaks","breaks","brk","thisBreak","nextBreak","man","manualBreakCount","parse_BrtRowHdr","parse_BrtWsProp","parse_BrtCellBlank","write_BrtCellBlank","parse_BrtCellBool","fBool","parse_BrtCellError","parse_BrtCellIsst","parse_BrtCellReal","parse_BrtCellRk","parse_BrtCellSt","parse_BrtFmlaBool","cellFormula","parse_BrtFmlaError","parse_BrtFmlaNum","parse_BrtFmlaString","parse_BrtHLink","relId","parse_ws_bin","!id","sstr","sheetStubs","write_ws_bin_cell","write_CELLTABLE","write_ws_bin","write_BrtWsDim","push_defaults_array","push_defaults","parse_wb_defaults","WBProps","WBPropsDef","CalcPr","CalcPrDef","WBView","WBViewDef","SheetDef","parse_wb_xml","AppVersion","wbnsregex","safe1904","write_wb_xml","WB_XML_ROOT","sheetId","r:id","hasPrintHeaders","localSheetId","parse_BrtBundleSh","hsState","iTabID","strRelID","parse_RelID","write_BrtBundleSh","write_RelID","parse_BrtWbProp","strName","write_BrtWbProp","parse_BrtFRTArchID$","ArchID","parse_wb_bin","write_BUNDLESHS","write_BrtFileVersion","write_BOOKVIEWS","write_BrtCalcProp","write_BrtFileRecover","write_wb_bin","parse_wb","parse_ws","parse_sty","parse_sty_xml","parse_theme","parse_sst","parse_cc","write_wb","write_ws","write_sty","write_sst","xlml_parsexmltag","attregexg2","attregex2","xlml_parsexmltagobj","xlml_format","fmt","XLMLFormatMap","xlml_set_custprop","Custprops","Rn","safe_format_xlml","nf","process_style_xlml","stag","Interior","I","Pattern","XLMLPatternTypeMap","ID","parse_xlml_data","xml","csty","sid","StyleID","interiors","Parent","xlml_fixstr","UTC","RBErr","Formula","rc_to_a1","xlml_clean_comment","xlml_normalize","parse_xlml_xml","dtag","didx","sheetnames","cursheet","sheetname","fidx","pidx","cstys","xlmlregex","lastIndex","HRef","HRefScreenTip","MergeAcross","MergeDown","Index","Format","Span","Author","bookSheets","bookProps","get_table","parse_xlml","fix_read_opts","Base64","_chr","write_xlml","parse_compobj","UserType","Reserved1","slurp","XLSRecordEnum","bconcat","ll","safe_format_xf","XF","make_cell","parse_workbook","lastcell","last_cell","cmnt","rngC","rngR","temp_val","Directory","last_formula","cur_sheet","Preamble","shared_formulae","array_formulae","cell_valid","XFs","palette","get_rgb","icv","XLSIcv","process_cell_style","xfd","addcell","rrtabid","lastuser","codepage","winlocked","wtf","sbc","sbci","sbcli","last_Rn","file_depth","RecordType","Date1904","WriteProtect","RefreshAll","CalcCount","CalcDelta","CalcIter","CalcMode","CalcPrecision","CalcSaveRecalc","CalcRefMode","FullCalc","TxO","noteobj","sheetnamesraw","Encryption","Metadata","Country","parse_xlscfb","cfb","CompObj","Summary","CompObjP","WorkbookP","parse_props","DocSummary","bookFiles","DSI","DocSummaryPIDDSI","SI","SummaryPIDSI","parse_ods","ODS","fix_opts_func","safe_parse_wbrels","wbrels","safe_parse_ws","relsPath","parse_zip","make_ssf","binname","entries","nodirs","xlsb","propdata","deps","bookDeps","wbsheets","wbext","wbrelsfile","nmode","Deps","Styles","Themes","bookVBA","vbaraw","bin","add_rels","rId","relobj","write_zip","load_table","fix_write_opts","jszip","General","RELS","WB","WS","SST","THEME","STY","firstbyte","read_zip","_fs","readFileSync","readSync","isfile","FILENAME","write_zip_type","StyleBuilder","writeFileSync","writeSync","decode_row","rowstr","unfix_row","cstr","decode_col","colstr","unfix_col","split_cell","splt","decode_range","cs","ce","safe_format_cell","format_cell","sheet_to_json","isempty","outi","__rowNum__","sheet_to_csv","txt","qreg","FS","fs","RS","rs","sheet_to_formulae","cmds","current_cptable","c1","c3","e3","e4","_strrev","pad0","pad_","rpad_","pad0r1","pad0r2","pad0r","p2_32","isgeneral","fixopts","opts_fmt","frac","D","mixed","sgn","P_2","P_1","P","Q_2","Q_1","Q","general_fmt_int","general_fmt","general_fmt_num","fix_hijri","parse_date_code","b2","dow","dout","T","setDate","write_date","ss0","outl","commaify","split_fmt","in_str","eval_fmt","flen","lst","hr","abstime","ssm","bt","jj","nstr","myv","ostr","write_num","decpt","lasti","chkcond","thresh","choose_fmt","cfregex","cfregex2","sfmt","table_fmt","40","45","46","47","48","49","56","65535","gfn2","gfn5","toPrecision","toExponential","gfn3","gnr1","gfn4","gnr4","gnr5","gnr6","gnr2","V","LOG10E","write_num_pct","pct1","mul","write_num_cm","write_num_exp","ee","fakee","$$","$1","$2","$3","write_num_f1","aval","sign","den","myn","myd","write_num_f2","hashq","rnd","flr","write_num_flt","closeparen","ffmt","ri","frac1","dec1","oa","lres","rres","write_num_cm2","write_num_pct2","write_num_exp2","write_num_int","_split","_eval","tbl","General Number","General Date","Long Date","Medium Date","Short Date","Long Time","Medium Time","Short Time","Currency","Fixed","Standard","Percent","Scientific","Yes/No","True/False","On/Off","DO_NOT_EXPORT_CFB","mver","ssz","nmfs","ndfs","dir_start","minifat_start","difat_start","fat_addrs","mv","check_get_mver","check_shifts","nds","sectors","sectorify","sleuth_fat","sector_list","make_sector_list","ENDOFCHAIN","Paths","FileIndex","FullPaths","FullPathDir","read_directory","build_full_paths","root_name","find_path","make_find_path","HEADER_SIGNATURE","nsectors","FI","FPD","FP","pl","dad","UCFullPaths","UCPaths","UCPath","sector","get_sector_list","chkd","buf_chain","sl","modulus","ctime","mtime","minifat_store","namelen","clsid","read_date","mt","MSSZ","MAXREGSECT","DIFSECT","FATSECT","FREESECT","HEADER_MINOR_VERSION","MAXREGSID","NOSTREAM","EntryTypes","encodings",""","'",">","<","&","encregex","coderegex","entrepl","entregex","orig","utf8readb","ww","corpus","utf8readc","mtcache","vt_cache","dc","dcterms","dcmitype","mx","sjs","xsi","xsd","___toBuffer","___utf16le","___hexlify","___utf8","___lpstr","___lpwstr","___double","readUInt32LE","readDoubleLE","___unhexlify","OFFCRYPTO","make_offcrypto","O","_crypto","crypto","rc4","md5","createHash","digest","42","43","255","VT_BOOL","VT_UI4","VT_LPSTR","VT_FILETIME","VT_CF","VT_VECTOR","VT_STRING","SpecialProperties","2147483648","2147483651","1919054434","41","44","52","55","61","64","66","81","82","84","86","90","105","213","216","218","351","354","358","420","886","961","962","963","964","965","966","971","972","974","981","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml","application/vnd.ms-excel.binIndexWs","application/vnd.ms-excel.chartsheet","application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml","application/vnd.ms-excel.dialogsheet","application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml","application/vnd.ms-excel.macrosheet","application/vnd.ms-excel.macrosheet+xml","application/vnd.ms-excel.intlmacrosheet","application/vnd.ms-excel.binIndexMs","application/vnd.openxmlformats-package.core-properties+xml","application/vnd.openxmlformats-officedocument.custom-properties+xml","application/vnd.openxmlformats-officedocument.extended-properties+xml","application/vnd.openxmlformats-officedocument.customXmlProperties+xml","application/vnd.ms-excel.comments","application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml","application/vnd.ms-excel.pivotTable","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml","application/vnd.ms-excel.calcChain","application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml","application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings","application/vnd.ms-office.activeX","application/vnd.ms-office.activeX+xml","application/vnd.ms-excel.attachedToolbars","application/vnd.ms-excel.connections","application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml","application/vnd.ms-excel.externalLink","application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml","application/vnd.ms-excel.sheetMetadata","application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml","application/vnd.ms-excel.pivotCacheDefinition","application/vnd.ms-excel.pivotCacheRecords","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml","application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml","application/vnd.ms-excel.queryTable","application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml","application/vnd.ms-excel.userNames","application/vnd.ms-excel.revisionHeaders","application/vnd.ms-excel.revisionLog","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml","application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml","application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml","application/vnd.ms-excel.tableSingleCells","application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml","application/vnd.ms-excel.slicer","application/vnd.ms-excel.slicerCache","application/vnd.ms-excel.slicer+xml","application/vnd.ms-excel.slicerCache+xml","application/vnd.ms-excel.wsSortMap","application/vnd.ms-excel.table","application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml","application/vnd.openxmlformats-officedocument.theme+xml","application/vnd.ms-excel.Timeline+xml","application/vnd.ms-excel.TimelineCache+xml","application/vnd.ms-office.vbaProject","application/vnd.ms-office.vbaProjectSignature","application/vnd.ms-office.volatileDependencies","application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml","application/vnd.ms-excel.controlproperties+xml","application/vnd.openxmlformats-officedocument.model+data","application/vnd.ms-excel.Survey+xml","application/vnd.openxmlformats-officedocument.drawing+xml","application/vnd.openxmlformats-officedocument.drawingml.chart+xml","application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml","application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml","application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml","application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml","application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml","application/vnd.openxmlformats-officedocument.vmlDrawing","application/vnd.openxmlformats-package.relationships+xml","application/vnd.openxmlformats-officedocument.oleObject","xlsx","xlsm","xltx","xmlns:xsd","xmlns:xsi","SHEET","xmlns:cp","xmlns:dc","xmlns:dcterms","xmlns:dcmitype","xmlns:vt","parse_URLMoniker","parse_FileMoniker","ansiLength","ansiPath","cbUnicodePathSize","cbUnicodePathBytes","unicodePath","parse_HyperlinkMoniker","parse_HyperlinkString","parse_Hyperlink","sVer","targetFrameName","moniker","oleMoniker","fileTime","parse_HideObjEnum","parse_CompressPictures","parse_XLHeaderFooter","parse_HLink","hlink","parse_HLinkTooltip","wzTooltip","parse_Style","parse_StyleExt","parse_ColInfo","parse_Window2","parse_Backup","parse_Blank","parse_BottomMargin","parse_BuiltInFnGroupCount","parse_CalcCount","parse_CalcDelta","parse_CalcIter","parse_CalcMode","parse_CalcPrecision","parse_CalcRefMode","parse_CalcSaveRecalc","parse_CodePage","parse_Compat12","parse_Date1904","parse_DefColWidth","parse_DSF","parse_EntExU2","parse_EOF","parse_Excel9File","parse_FeatHdr","parse_FontX","parse_Footer","parse_GridSet","parse_HCenter","parse_Header","parse_HideObj","parse_InterfaceEnd","parse_LeftMargin","parse_Mms","parse_ObjProtect","parse_Password","parse_PrintGrid","parse_PrintRowCol","parse_PrintSize","parse_Prot4Rev","parse_Prot4RevPass","parse_Protect","parse_RefreshAll","parse_RightMargin","parse_RRTabId","parse_ScenarioProtect","parse_Scl","parse_String","parse_SxBool","parse_TopMargin","parse_UsesELFs","parse_VCenter","parse_WinProtect","parse_WriteProtect","parse_VerticalPageBreaks","parse_HorizontalPageBreaks","parse_Selection","parse_Continue","parse_Pane","parse_Pls","parse_DCon","parse_DConRef","parse_DConName","parse_XCT","parse_CRN","parse_FileSharing","parse_Uncalced","parse_Template","parse_Intl","parse_WsBool","parse_Sort","parse_Sync","parse_LPr","parse_DxGCol","parse_FnGroupName","parse_FilterMode","parse_AutoFilterInfo","parse_AutoFilter","parse_Setup","parse_ScenMan","parse_SCENARIO","parse_SxView","parse_Sxvd","parse_SXVI","parse_SxIvd","parse_SXLI","parse_SXPI","parse_DocRoute","parse_RecipName","parse_MulBlank","parse_SXDI","parse_SXDB","parse_SXFDB","parse_SXDBB","parse_SXNum","parse_SxErr","parse_SXInt","parse_SXString","parse_SXDtr","parse_SxNil","parse_SXTbl","parse_SXTBRGIITM","parse_SxTbpg","parse_ObProj","parse_SXStreamID","parse_DBCell","parse_SXRng","parse_SxIsxoper","parse_BookBool","parse_DbOrParamQry","parse_OleObjectSize","parse_SXVS","parse_BkHim","parse_MsoDrawingGroup","parse_MsoDrawing","parse_MsoDrawingSelection","parse_PhoneticInfo","parse_SxRule","parse_SXEx","parse_SxFilt","parse_SxDXF","parse_SxItm","parse_SxName","parse_SxSelect","parse_SXPair","parse_SxFmla","parse_SxFormat","parse_SXVDEx","parse_SXFormula","parse_SXDBEx","parse_RRDInsDel","parse_RRDHead","parse_RRDChgCell","parse_RRDRenSheet","parse_RRSort","parse_RRDMove","parse_RRFormat","parse_RRAutoFmt","parse_RRInsertSh","parse_RRDMoveBegin","parse_RRDMoveEnd","parse_RRDInsDelBegin","parse_RRDInsDelEnd","parse_RRDConflict","parse_RRDDefName","parse_RRDRstEtxp","parse_LRng","parse_CUsr","parse_CbUsr","parse_UsrInfo","parse_UsrExcl","parse_FileLock","parse_RRDInfo","parse_BCUsrs","parse_UsrChk","parse_UserBView","parse_UserSViewBegin","parse_UserSViewEnd","parse_RRDUserView","parse_Qsi","parse_CondFmt","parse_CF","parse_DVal","parse_DConBin","parse_Lel","parse_XLSCodeName","parse_SXFDBType","parse_ObNoMacros","parse_Dv","parse_Index","parse_Table","parse_BigName","parse_ContinueBigName","parse_WebPub","parse_QsiSXTag","parse_DBQueryExt","parse_ExtString","parse_TxtQry","parse_Qsir","parse_Qsif","parse_RRDTQSIF","parse_OleDbConn","parse_WOpt","parse_SXViewEx","parse_SXTH","parse_SXPIEx","parse_SXVDTEx","parse_SXViewEx9","parse_ContinueFrt","parse_RealTimeData","parse_ChartFrtInfo","parse_FrtWrapper","parse_StartBlock","parse_EndBlock","parse_StartObject","parse_EndObject","parse_CatLab","parse_YMult","parse_SXViewLink","parse_PivotChartBits","parse_FrtFontList","parse_SheetExt","parse_BookExt","parse_SXAddl","parse_CrErr","parse_HFPicture","parse_Feat","parse_DataLabExt","parse_DataLabExtContents","parse_CellWatch","parse_FeatHdr11","parse_Feature11","parse_DropDownObjIds","parse_ContinueFrt11","parse_DConn","parse_List12","parse_Feature12","parse_CondFmt12","parse_CF12","parse_CFEx","parse_AutoFilter12","parse_ContinueFrt12","parse_MDTInfo","parse_MDXStr","parse_MDXTuple","parse_MDXSet","parse_MDXProp","parse_MDXKPI","parse_MDB","parse_PLV","parse_DXF","parse_TableStyles","parse_TableStyle","parse_TableStyleElement","parse_NamePublish","parse_NameCmt","parse_SortData","parse_GUIDTypeLib","parse_FnGrp12","parse_NameFnGrp12","parse_HeaderFooter","parse_CrtLayout12","parse_CrtMlFrt","parse_CrtMlFrtContinue","parse_ShapePropsStream","parse_TextPropsStream","parse_RichTextStream","parse_CrtLayout12A","parse_Units","parse_Chart","parse_Series","parse_DataFormat","parse_LineFormat","parse_MarkerFormat","parse_AreaFormat","parse_PieFormat","parse_AttachedLabel","parse_SeriesText","parse_ChartFormat","parse_Legend","parse_SeriesList","parse_Bar","parse_Line","parse_Pie","parse_Area","parse_Scatter","parse_CrtLine","parse_Axis","parse_Tick","parse_ValueRange","parse_CatSerRange","parse_AxisLine","parse_CrtLink","parse_DefaultText","parse_Text","parse_ObjectLink","parse_Frame","parse_Begin","parse_End","parse_PlotArea","parse_Chart3d","parse_PicF","parse_DropBar","parse_Radar","parse_Surf","parse_RadarArea","parse_AxisParent","parse_LegendException","parse_ShtProps","parse_SerToCrt","parse_AxesUsed","parse_SBaseRef","parse_SerParent","parse_SerAuxTrend","parse_IFmtRecord","parse_Pos","parse_AlRuns","parse_BRAI","parse_SerAuxErrBar","parse_SerFmt","parse_Chart3DBarShape","parse_Fbi","parse_BopPop","parse_AxcExt","parse_Dat","parse_PlotGrowth","parse_SIIndex","parse_GelFrame","parse_BopPopCustom","parse_Fbi2","CS2CP","77","128","129","130","134","136","161","162","163","177","178","186","204","222","238","69","parse_r","terms","tregex","rpr","rpregex","parse_rpr","nlregex","rregex","rend","intro","outro","family","crypto_CreateXorArray_Method1","PadArray","InitialCode","XorMatrix","Ror","Byte","XorRor","byte1","byte2","CreateXorKey_Method1","XorKey","CurrentElement","Char","ObfuscationArray","Temp","PasswordLastChar","PadIndex","crypto_DecryptData_Method1","XorArrayIndex","XorArray","Value","None","Solid","Gray50","Gray75","Gray25","HorzStripe","VertStripe","ReverseDiagStripe","DiagStripe","DiagCross","ThickDiagCross","ThinHorzStripe","ThinVertStripe","ThinReverseDiagStripe","ThinHorzCross","numFmtRegex","cellXfRegex","fillsRegex","bordersRegex","parse_BrtCommentAuthor","parse_BrtCommentText","rcfunc","$4","$5","rcbase","rcregex","fstr","parse_PtgAttrSum","parse_PtgConcat","parse_PtgAdd","parse_PtgDiv","parse_PtgEq","parse_PtgGe","parse_PtgGt","parse_PtgIsect","parse_PtgLe","parse_PtgLt","parse_PtgMissArg","parse_PtgMul","parse_PtgNe","parse_PtgParen","parse_PtgPercent","parse_PtgPower","parse_PtgRange","parse_PtgSub","parse_PtgUminus","parse_PtgUnion","parse_PtgUplus","parse_PtgMemErr","parse_PtgMemNoMem","parse_PtgRefErr3d","parse_PtgTbl","57","58","59","60","PtgDupes","96","65","97","98","67","99","68","100","101","70","102","71","103","72","104","73","74","106","75","107","76","108","109","89","121","122","91","123","92","124","93","125","50","51","53","54","62","63","78","79","80","83","85","87","88","94","95","110","111","112","113","114","115","116","117","118","119","120","126","127","131","132","133","135","137","138","139","140","142","143","144","145","146","147","148","149","150","151","152","153","155","159","164","166","167","168","169","170","171","172","173","174","175","185","187","188","189","190","191","192","193","194","195","196","197","198","199","200","201","202","203","206","207","208","209","210","211","212","214","215","217","219","220","223","224","225","226","227","228","229","240","243","249","250","251","252","253","254","256","259","260","265","266","267","268","269","272","273","274","276","277","278","279","280","281","282","283","284","285","288","289","290","291","292","293","295","296","297","298","302","305","306","307","308","309","310","311","312","313","314","315","316","318","319","320","321","322","323","324","325","328","330","336","338","339","342","343","344","350","352","355","356","370","373","374","375","376","377","378","379","380","381","382","383","384","385","386","388","390","391","392","393","394","395","396","397","398","399","400","412","413","414","415","416","417","421","422","423","424","425","430","431","432","433","434","435","436","437","438","439","440","441","442","443","444","445","446","447","448","449","450","451","452","453","454","455","456","458","459","460","461","462","463","464","465","466","467","468","469","470","471","472","473","474","475","476","477","478","480","481","482","485","489","491","493","494","495","509","510","511","517","518","519","520","521","522","523","545","546","547","548","549","620","621","647","653","667","673","753","755","808","141","154","156","157","158","160","165","176","179","180","181","182","183","184","205","221","230","231","232","233","234","235","236","237","239","241","242","244","245","246","247","248","257","258","261","262","263","264","270","271","275","286","287","294","299","300","301","303","304","317","326","327","329","331","332","334","335","337","340","341","345","346","347","348","349","353","357","359","360","361","362","363","364","365","366","367","368","369","371","372","_xlfn.ACOT","_xlfn.ACOTH","_xlfn.AGGREGATE","_xlfn.ARABIC","_xlfn.AVERAGEIF","_xlfn.AVERAGEIFS","_xlfn.BASE","_xlfn.BETA.DIST","_xlfn.BETA.INV","_xlfn.BINOM.DIST","_xlfn.BINOM.DIST.RANGE","_xlfn.BINOM.INV","_xlfn.BITAND","_xlfn.BITLSHIFT","_xlfn.BITOR","_xlfn.BITRSHIFT","_xlfn.BITXOR","_xlfn.CEILING.MATH","_xlfn.CEILING.PRECISE","_xlfn.CHISQ.DIST","_xlfn.CHISQ.DIST.RT","_xlfn.CHISQ.INV","_xlfn.CHISQ.INV.RT","_xlfn.CHISQ.TEST","_xlfn.COMBINA","_xlfn.CONFIDENCE.NORM","_xlfn.CONFIDENCE.T","_xlfn.COT","_xlfn.COTH","_xlfn.COUNTIFS","_xlfn.COVARIANCE.P","_xlfn.COVARIANCE.S","_xlfn.CSC","_xlfn.CSCH","_xlfn.DAYS","_xlfn.DECIMAL","_xlfn.ECMA.CEILING","_xlfn.ERF.PRECISE","_xlfn.ERFC.PRECISE","_xlfn.EXPON.DIST","_xlfn.F.DIST","_xlfn.F.DIST.RT","_xlfn.F.INV","_xlfn.F.INV.RT","_xlfn.F.TEST","_xlfn.FILTERXML","_xlfn.FLOOR.MATH","_xlfn.FLOOR.PRECISE","_xlfn.FORMULATEXT","_xlfn.GAMMA","_xlfn.GAMMA.DIST","_xlfn.GAMMA.INV","_xlfn.GAMMALN.PRECISE","_xlfn.GAUSS","_xlfn.HYPGEOM.DIST","_xlfn.IFNA","_xlfn.IFERROR","_xlfn.IMCOSH","_xlfn.IMCOT","_xlfn.IMCSC","_xlfn.IMCSCH","_xlfn.IMSEC","_xlfn.IMSECH","_xlfn.IMSINH","_xlfn.IMTAN","_xlfn.ISFORMULA","_xlfn.ISO.CEILING","_xlfn.ISOWEEKNUM","_xlfn.LOGNORM.DIST","_xlfn.LOGNORM.INV","_xlfn.MODE.MULT","_xlfn.MODE.SNGL","_xlfn.MUNIT","_xlfn.NEGBINOM.DIST","_xlfn.NETWORKDAYS.INTL","_xlfn.NIGBINOM","_xlfn.NORM.DIST","_xlfn.NORM.INV","_xlfn.NORM.S.DIST","_xlfn.NORM.S.INV","_xlfn.NUMBERVALUE","_xlfn.PDURATION","_xlfn.PERCENTILE.EXC","_xlfn.PERCENTILE.INC","_xlfn.PERCENTRANK.EXC","_xlfn.PERCENTRANK.INC","_xlfn.PERMUTATIONA","_xlfn.PHI","_xlfn.POISSON.DIST","_xlfn.QUARTILE.EXC","_xlfn.QUARTILE.INC","_xlfn.QUERYSTRING","_xlfn.RANK.AVG","_xlfn.RANK.EQ","_xlfn.RRI","_xlfn.SEC","_xlfn.SECH","_xlfn.SHEET","_xlfn.SHEETS","_xlfn.SKEW.P","_xlfn.STDEV.P","_xlfn.STDEV.S","_xlfn.SUMIFS","_xlfn.T.DIST","_xlfn.T.DIST.2T","_xlfn.T.DIST.RT","_xlfn.T.INV","_xlfn.T.INV.2T","_xlfn.T.TEST","_xlfn.UNICHAR","_xlfn.UNICODE","_xlfn.VAR.P","_xlfn.VAR.S","_xlfn.WEBSERVICE","_xlfn.WEIBULL.DIST","_xlfn.WORKDAY.INTL","_xlfn.XOR","_xlfn.Z.TEST","cellregex","rowregex","isregex","match_v","match_f","sdata","cells","cref","tagr","tagc","do_format","marr","marrlen","xlen","xmlns:r","parse_BrtWsDim","parse_BrtMergeCell","333","387","389","401","403","404","405","406","407","408","409","410","411","418","419","426","427","428","429","457","479","483","484","486","487","488","490","492","496","497","498","499","500","501","502","503","504","505","506","507","508","512","513","514","515","516","524","525","526","527","528","529","530","531","532","533","534","535","536","537","538","539","540","541","542","550","551","552","553","554","555","556","557","558","559","560","561","562","564","565","566","569","570","572","573","574","577","578","579","580","581","582","583","584","585","586","587","588","589","590","591","592","593","594","595","596","597","598","599","600","601","602","603","604","605","606","607","608","609","610","611","612","613","614","615","616","617","618","619","625","626","627","628","629","630","631","632","633","634","635","636","637","638","639","640","641","642","643","644","645","646","648","649","650","651","652","654","655","656","657","658","659","660","661","662","663","664","665","666","668","669","671","672","674","675","676","677","678","679","680","1024","1025","1026","1027","1028","1029","1030","1031","1032","1033","1034","1035","1036","1037","1038","1039","1040","1041","1042","1043","1044","1045","1046","1047","1048","1049","1050","1051","1052","1053","1054","1055","1056","1057","1058","1059","1061","1062","1063","1066","1067","1068","1069","1070","1071","1072","1073","1075","1076","1077","1078","1079","1080","1081","1082","1083","1084","1085","1086","1087","1088","1089","1090","1091","1092","1093","1094","1095","1096","1097","1098","1099","1100","1101","1102","1103","1104","1105","1111","1112","1113","1114","1115","1116","1117","1118","1119","1120","1121","1122","1123","1124","1125","1126","1128","1129","1130","1131","1132","1133","1134","1135","1136","1137","1138","1139","1140","1141","1142","1143","1144","1145","1146","1147","1148","1149","1150","1152","1153","1154","1155","1156","1157","1158","1159","1160","1161","1162","1163","1164","1165","1166","1167","1168","1169","1170","1171","1172","1173","1177","1178","1180","1181","1182","2048","2049","2050","2051","2052","2053","2054","2055","2056","2057","2058","2060","2067","2068","2069","2070","2071","2072","2073","2075","2076","2077","2078","2079","2080","2081","2082","2083","2084","2085","2086","2087","2088","2089","2090","2091","2092","2093","2094","2095","2096","2097","2098","2099","2100","2101","2102","2103","2104","2105","2106","2107","2108","2109","2110","2111","2112","2113","2114","2115","2116","2117","2118","2119","2120","2121","2122","2123","2124","2125","2126","2127","2128","2129","2130","2131","2132","2133","2134","2135","2136","402","1212","2059","2061","2062","2063","2064","2066","2137","2138","2146","2147","2148","2149","2150","2151","2152","2154","2155","2156","2161","2162","2164","2165","2166","2167","2168","2169","2170","2171","2172","2173","2174","2175","2180","2181","2182","2183","2184","2185","2186","2187","2188","2189","2190","2191","2192","2194","2195","2196","2197","2198","2199","2200","2201","2202","2203","2204","2205","2206","2207","2211","2212","2213","2214","2215","4097","4098","4099","4102","4103","4105","4106","4107","4108","4109","4116","4117","4118","4119","4120","4121","4122","4123","4124","4125","4126","4127","4128","4129","4130","4132","4133","4134","4135","4146","4147","4148","4149","4154","4156","4157","4158","4159","4160","4161","4163","4164","4165","4166","4168","4170","4171","4174","4175","4176","4177","4187","4188","4189","4191","4192","4193","4194","4195","4196","4197","4198","4199","4200","2157","2163","2177","2240","2241","2242","2243","2244","2245","2246","2247","2248","2249","2250","2251","get_formulae","make_csv","make_json","make_formulae","XmlNode","_attributes","_children","_prefix","prefix","APOS","QUOTE","ESCAPED_QUOTE","escapeAttributeValue","att_value","customNumFmtId","fmt_table","_hashIndex","_listIndex","$fonts","$fills","$borders","$numFmts","$cellStyleXfs","$xf","$cellXfs","$cellStyles","$dxfs","$tableStyles","$styles","defaultStyle","defaultCellStyle","gray125Style","addStyles","hashKey","_addXf","_duckTypeStyle","patternFill","_getStyleCSS","_addFont","_addFill","_addBorder","_addNumFmt","$alignment","readingOrder","$font","numFmtIdx","$numFmt","$patternFill","$fgColor","$bgColor","$fill","_getSubBorder","spec","$direction","$color","$border","directions","readFile","writeFile","XLS","runBlock","routerHelper","removeAuthInfo","addPolyfills","addStringIncludes","setDefault","loginCheckPassed","permissionCheckPassed","$logProvider","toastrConfig","$uiViewScrollProvider","$translateProvider","$translatePartialLoaderProvider","$mdThemingProvider","$analyticsProvider","$mdIconProvider","googleAnalytics","IdleProvider","KeepaliveProvider","debugEnabled","allowHtml","timeOut","positionClass","preventDuplicates","progressBar","firstPageview","withBase","useAnchorScroll","useLoader","urlTemplate","preferredLanguage","definePalette","700","800","900","A100","A200","A400","A700","contrastDefaultColor","contrastDarkColors","contrastLightColors","dark","primaryPalette","accentPalette","hue-1","hue-2","hue-3","webkitURL","createElementNS","MouseEvent","dispatchEvent","HTMLElement","safari","setImmediate","revokeObjectURL","onloadend","INIT","msSaveOrOpenBlob","abort","WRITING","onwritestart","onprogress","onwrite","onabort","onerror","onwriteend","get_class","FakeBlobBuilder","FakeBlob","FBB_proto","FB_proto","FileReaderSync","FileException","file_ex_codes","file_ex_code","real_URL","real_create_object_URL","real_revoke_object_URL","atob","fake","data_URI_header","decodeURIComponent","object_URL","bb","unescape","blobParts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAmzIA,QAASA,iBAAgBC,EAAKC,EAAaC,GAMzCC,KAAKC,OAAOL,gBAAiBM,OAAOC,KAAKC,aACzCJ,KAAKK,KAAOR,EAMZG,KAAKM,YAKLN,KAAKO,aAELP,KAAKQ,OAAS,GAAI,GAAI,GAAI,GAAI,IAK9BR,KAAKS,WAMLT,KAAKU,QAAS,CAEd,IAAIC,GAAUZ,KAMdC,MAAKY,UAAYD,EAAQ,UAAe,GAKxCX,KAAKa,gBAAkBF,EAAQ,oBAAyB,EAOxDX,KAAKc,SAAWH,EAAQ,SAAc,KAEtCX,KAAKS,QAAUE,EAAQ,WAMvB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B,OAAO,GAETy4B,wBACE17F,MAAO,yBACPmV,MAAO,GACP1C,QAAS,yBACTuiF,cAAc,EACd/xB,OAAO,GAET04B,0BACE37F,MAAO,2BACPmV,MAAO,GACP1C,QAAS,2BACTuiF,cAAc,EACd/xB,OAAO,GAET24B,iBACE57F,MAAO,kBACPmV,MAAO,GACP1C,QAAS,kBACTuiF,cAAc,EACd/xB,OAAO,GAET44B,gBACE77F,MAAO,iBACPmV,MAAO,GACP1C,QAAS,iBACTuiF,cAAc,EACd/xB,OAAO,GAET64B,eACE97F,MAAO,gBACPmV,MAAO,GACP1C,QAAS,gBACTuiF,cAAc,EACd/xB,OAAO,GAET84B,iBACE/7F,MAAO,kBACPmV,MAAO,GACP1C,QAAS,kBACTuiF,cAAc,EACd/xB,OAAO,GAET+4B,aACEh8F,MAAO,cACPmV,MAAO,GACP1C,QAAS,cACTuiF,cAAc,EACd/xB,OAAO,GAETg5B,qBACEj8F,MAAO,sBACPmV,MAAO,GACP1C,QAAS,sBACTuiF,cAAc,EACd/xB,OAAO,GAETi5B,uBACEl8F,MAAO,wBACPmV,MAAO,GACP1C,QAAS,wBACTuiF,cAAc,EACd/xB,OAAO,GAETk5B,cACEn8F,MAAO,eACPmV,MAAO,GACP1C,QAAS,eACTuiF,cAAc,EACd/xB,OAAO,GAETm5B,aACEp8F,MAAO,cACPmV,MAAO,GACP1C,QAAS,cACTuiF,cAAc,EACd/xB,OAAO,GAETo5B,YACEr8F,MAAO,aACPmV,MAAO,GACP1C,QAAS,aACTuiF,cAAc,EACd/xB,OAAO,GAETq5B,cACEt8F,MAAO,eACPmV,MAAO,GACP1C,QAAS,eACTuiF,cAAc,EACd/xB,OAAO,GAETgnC,mCACEjqG,MAAO,oCACPmV,MAAO,GACP1C,QAAS,yBACTuiF,cAAc,EACd/xB,OAAO,GAETinC,sCACElqG,MAAO,uCACPmV,MAAO,GACP1C,QAAS,yBACTuiF,cAAc,EACd/xB,OAAO,GAETknC,+BACEnqG,MAAO,gCACPmV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OAAO,GAETk4B,wBACEn7F,MAAO,yBACPmV,MAAO,GACP1C,QAAS,YACTuiF,cAAc,EACd/xB,OAAO,GAETmzB,wBACEp2F,MAAO,yBACPmV,MAAO,GACP1C,QAAS,oBACTuiF,cAAc,EACd/xB,OAAO,GAETyzB,uBACE12F,MAAO,wBACPmV,MAAO,GACP1C,QAAS,WACTuiF,cAAc,EACd/xB,OAAO,GAETszB,uBACEv2F,MAAO,wBACPmV,MAAO,GACP1C,QAAS,mBACTuiF,cAAc,EACd/xB,OAAO,GAET4zB,iCACE72F,MAAO,kCACPmV,MAAO,GACP1C,QAAS,yBACTuiF,cAAc,EACd/xB,OAAO,GAETozB,iCACEr2F,MAAO,kCACPmV,MAAO,GACP1C,QAAS,iCACTuiF,cAAc,EACd/xB,OAAO,GAETm4B,uBACEp7F,MAAO,wBACPmV,MAAO,GACP1C,QAAS,eACTuiF,cAAc,EACd/xB,OAAO,GAETo4B,sBACEr7F,MAAO,uBACPmV,MAAO,GACP1C,QAAS,cACTuiF,cAAc,EACd/xB,OAAO,GAETq4B,4BACEt7F,MAAO,6BACPmV,MAAO,GACP1C,QAAS,iBACTuiF,cAAc,EACd/xB,OAAO,GAETs4B,2BACEv7F,MAAO,4BACPmV,MAAO,GACP1C,QAAS,gBACTuiF,cAAc,EACd/xB,OAAO,GAETu4B,aACEx7F,MAAO,cACPmV,MAAO,GACP1C,QAAS,eACTuiF,cAAc,EACd/xB,OAAO,GAETw4B,gBACEz7F,MAAO,iBACPmV,MAAO,GACP1C,QAAS,iBACTuiF,cAAc,EACd/xB,OAAO,GAETy4B,wBACE17F,MAAO,yBACPmV,MAAO,GACP1C,QAAS,yBACTuiF,cAAc,EACd/xB,OAAO,GAET04B,0BACE37F,MAAO,2BACPmV,MAAO,GACP1C,QAAS,2BACTuiF,cAAc,EACd/xB,OAAO,GAET24B,iBACE57F,MAAO,kBACPmV,MAAO,GACP1C,QAAS,kBACTuiF,cAAc,EACd/xB,OAAO,GAET44B,gBACE77F,MA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V,MAAO,GACP1C,QAAS,iBACTuiF,cAAc,EACd/xB,OAAO,GAET42B,uCACE75F,MAAO,wCACPmV,MAAO,GACP1C,QAAS,iBACTuiF,cAAc,EACd/xB,OAAO,GAET62B,gCACE95F,MAAO,oCACPmV,MAAO,GACP1C,QAAS,iBACTuiF,cAAc,EACd/xB,OAAO,GAET82B,6BACE/5F,MAAO,8BACPmV,MAAO,GACP1C,QAAS,uBACTuiF,cAAc,EACd/xB,OAAO,GAETosH,eACErvL,MAAO,gBACPmV,MAAO,GACP1C,QAAS,gBACTuiF,cAAc,EACd/xB,OAAO,GAETs3B,wBACEv6F,MAAO,yBACPmV,MAAO,GACP1C,QAAS,eACTuiF,cAAc,EACd/xB,OAAO,GAETqsH,sBACEtvL,MAAO,uBACPmV,MAAO,GACP1C,QAAS,YACTuiF,cAAc,EACd/xB,OAAO,GAETssH,wBACEvvL,MAAO,yBACPmV,MAAO,GACP1C,QAAS,gBACTuiF,cAAc,EACd/xB,OAAO,GAETusH,kBACExvL,MAAO,mBACPmV,MAAO,GACP1C,QAAS,YACTuiF,cAAc,EACd/xB,OAAO,GAET+2B,kBACEh6F,MAAO,mBACPmV,MAAO,GACP1C,QAAS,UACTuiF,cAAc,EACd/xB,OAAO,GAETwsH,cACEzvL,MAAO,eACPmV,MAAO,GACP1C,QAAS,YACTuiF,cAAc,EACd/xB,OAAO,GAETysH,iBACE1vL,MAAO,kBACPmV,MAAO,GACP1C,QAAS,SACTuiF,cAAc,EACd/xB,OAAO,GAETq3B,oBACEt6F,MAAO,qBACPmV,MAAO,GACP1C,QAAS,2BACTuiF,cAAc,EACd/xB,OAAO,GAET0sH,kCACE3vL,MAAO,mCACPmV,MAAO,GACP1C,QAAS,iBACTuiF,cAAc,EACd/xB,OAAO,GAET0qH,kCACE3tL,MAAO,mCACPmV,MAAO,GACP1C,QAAS,yBACTuiF,cAAc,EACd/xB,OAAO,GAET2sH,6BACE5vL,MAAO,8BACPmV,MAAO,GACP1C,QAAS,aACTuiF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B,OAAO,GAETktH,eACEnwL,MAAO,gBACPmV,MAAO,GACP1C,QAAS,gBACTuiF,cAAc,EACd/xB,OAAO,GAET+pH,cACEhtL,MAAO,eACPmV,MAAO,GACP1C,QAAS,eACTuiF,cAAc,EACd/xB,OAAO,GAETmtH,aACEpwL,MAAO,cACPmV,MAAO,GACP1C,QAAS,cACTuiF,cAAc,EACd/xB,OAAO,GAETotH,eACErwL,MAAO,gBACPmV,MAAO,GACP1C,QAAS,gBACTuiF,cAAc,EACd/xB,OAAO,GAETgqH,iBACEjtL,MAAO,kBACPmV,MAAO,GACP1C,QAAS,kBACTuiF,cAAc,EACd/xB,OAAO,GAETqtH,kBACEtwL,MAAO,mBACPmV,MAAO,GACP1C,QAAS,mBACTuiF,cAAc,EACd/xB,OAAO,GAETshH,cACEvkL,MAAO,eACPmV,MAAO,GACP1C,QAAS,eACTuiF,cAAc,EACd/xB,OAAO,GAET04B,0BACE37F,MAAO,2BACPmV,MAAO,GACP1C,QAAS,2BACTuiF,cAAc,EACd/xB,OAAO,GAET24B,iBACE57F,MAAO,kBACPmV,MAAO,GACP1C,QAAS,kBACTuiF,cAAc,EACd/xB,OAAO,GAET44B,gBACE77F,MAAO,iBACPmV,MAAO,GACP1C,QAAS,iBACTuiF,cAAc,EACd/xB,OAAO,GAET64B,eACE97F,MAAO,gBACPmV,MAAO,GACP1C,QAAS,gBACTuiF,cAAc,EACd/xB,OAAO,GAET84B,iBACE/7F,MAAO,kBACPmV,MAAO,GACP1C,QAAS,kBACTuiF,cAAc,EACd/xB,OAAO,GAETsqH,mBACEvtL,MAAO,oBACPmV,MAAO,GACP1C,QAAS,oBACTuiF,cAAc,EACd/xB,OAAO,GAETstH,oBACEvwL,MAAO,qBACPmV,MAAO,GACP1C,QAAS,qBACTuiF,cAAc,EACd/xB,OAAO,GAETw4B,gBACEz7F,MAAO,iBACPmV,MAAO,GACP1C,QAAS,iBACTuiF,cAAc,EACd/xB,OAAO,GAETutH,4BACExwL,MAAO,6BACPm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EAAmE,kLACtFs1E,EAAet1E,IAAI,qEAAqE,oLACxFs1E,EAAet1E,IAAI,2DAA2D,izBAC9Es1E,EAAet1E,IAAI,yDAAyD,6PAC5Es1E,EAAet1E,IAAI,2DAA2D,uSAC9Es1E,EAAet1E,IAAI,yDAAyD,4NAC5Es1E,EAAet1E,IAAI,2DAA2D,gJAC9Es1E,EAAet1E,IAAI,4DAA4D","file":"scripts/app-3d2f4fc196.js","sourcesContent":["/**\r\n * @ngdoc module\r\n * @name TrackTraceController\r\n *\r\n * @description The TrackTraceController module interfaces with the main track and trace view and TrackTraceService\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular.module('app.trackTrace', [\r\n 'app.core',\r\n 'md.data.table',\r\n 'ngTable',\r\n 'datamaps'\r\n ]);\r\n\r\n})();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('ServerTableCslService', ServerTableCslService);\r\n\r\n /** @ngInject */\r\n ServerTableCslService.$inject = ['ngTableDefaults' ,'$location' ,'$rootScope', '$q', 'NgTableParams', \"TrackTraceCslService\", 'AdvSearchCslService', 'UserService', 'TrackTraceCslPaginationService'];\r\n function ServerTableCslService(ngTableDefaults, $location ,$rootScope, $q,NgTableParams, TrackTraceCslService, AdvSearchCslService, UserService, TrackTraceCslPaginationService) {\r\n\r\n $rootScope.ngTableChanges = 0 ;\r\n $rootScope.shipmentData = '';\r\n $rootScope.resp = '';\r\n $rootScope.total = 0;\r\n\r\n var table_filters = {};\r\n\r\n var query = {},\r\n \r\n isEmpty = true,\r\n // ngTable = genTable(),\r\n state = {\r\n loading: false\r\n },\r\n timeoutPromise,\r\n searchRequest,\r\n query = AdvSearchCslService.getCurrentSearch(),\r\n ngTable = new NgTableParams(\r\n {\r\n\r\n }, {\r\n counts: [10,25,50,100]\r\n });\r\n\r\n // *** TURNED THIS FEATURE OFF TO MAKE ALL TABLES HAVE UNIFORM COUNTS\r\n // var pageSizes = [\r\n // { label: \"5 10 20\", sizes: [5,10,20] },\r\n // { label: \"10 20 50\", sizes: [10,20,50] }\r\n // ];\r\n var defaultSettings = {\r\n counts: [10,25,50,100],\r\n defaultSort: \"asc\",\r\n filterOptions: {\r\n filterComparator: true\r\n }\r\n };\r\n\r\n var initialSorting = [\r\n { label: \"Id ASC\", value: { id: \"asc\"} },\r\n { label: \"Id DESC\", value: { id: \"desc\"} },\r\n { label: \"Name ASC\", value: { name: \"asc\"} },\r\n { label: \"Name DESC\", value: { name: \"desc\"} }\r\n ];\r\n var initialParams = {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n sorting: undefined\r\n };\r\n\r\n function genTable(){\r\n return new NgTableParams(\r\n {\r\n\r\n }, {\r\n counts: [10,25,50,100],\r\n getData: getData\r\n });\r\n }\r\n\r\n\r\n\r\n\r\n function sortFields(orderBy, sorting){\r\n var result = [];\r\n for (var i in orderBy){\r\n if (!isNaN(+i)){\r\n var x = orderBy[i].replace(/[+-]/g,\"\");\r\n var p = {};\r\n p[x] = sorting[x];\r\n result.push(p);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function getQuery() {return query;}\r\n\r\n function getData(params, queryParameterName, queryParameterValue, sort_params ){\r\n\r\n if(queryParameterName){\r\n table_filters[queryParameterName] = queryParameterValue; \r\n }\r\n\r\n query = AdvSearchCslService.getCurrentSearch();\r\n \r\n var search = {};\r\n var new_url = {};\r\n\r\n // from dount chart dashboard[Aljex] page.\r\n if($location.search().page_from == 'aljex'){\r\n\r\n for (var r in $location.search()){\r\n search = $location.search();\r\n }\r\n \r\n }\r\n\r\n if (params && params['invalidate_cache'] === true || localStorage.getItem('invalidateCache') === 'true'){\r\n search['invalidate_cache'] = true;\r\n localStorage.setItem('invalidateCache', false);\r\n\r\n //myurl = '';\r\n //query = {};\r\n //table_filters = {};\r\n\r\n //TrackTraceCslPaginationService.save_page_number(1);\r\n //TrackTraceCslPaginationService.save_per_page(10);\r\n }\r\n if (sort_params && sort_params['key'] && sort_params['criteria'])\r\n {\r\n localStorage.setItem('sort_key', sort_params['key']);\r\n localStorage.setItem('sort_criteria', sort_params['criteria']);\r\n }\r\n else if (localStorage.getItem('sort_key') && localStorage.getItem('sort_criteria'))\r\n {\r\n var sort_params = {key: localStorage.getItem('sort_key'), criteria: localStorage.getItem('sort_criteria')}\r\n }\r\n\r\n state.loading = true;\r\n $rootScope.$broadcast(\"serverTable:stateChanged\", state);\r\n \r\n\r\n /*var column_header = [];\r\n\r\n var columns = CustomResultsCslService.getActiveColumns();\r\n\r\n if(columns){\r\n if(columns.length > 0){\r\n for(var i =0; i < columns.length; i++ ){\r\n column_header.push(columns[i].field);\r\n }\r\n }\r\n }\r\n //debugger;\r\n if(myurl){\r\n if(myurl.split('?')[1].length > 0){\r\n var keyval = myurl.split('?')[1].split('&');\r\n\r\n if(keyval.length > 0){\r\n for(var x=0,y=keyval.length; x'+ queryParameterName);\r\n if(keyval[x].split('=')[0] != queryParameterName){\r\n //if((column_header.indexOf(keyval[x].split('=')[0]) !== -1) ){\r\n search[keyval[x].split('=')[0]] = keyval[x].split('=')[1];\r\n //}\r\n }\r\n\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n for (var r in table_filters){\r\n search[r] = table_filters[r];\r\n }\r\n\r\n for (var q in query){\r\n if(q == 'quick_filter'){\r\n search['current_exception'] = 1;\r\n }else{\r\n search[q] = query[q];\r\n } \r\n }\r\n\r\n for (var q in sort_params){\r\n search[q] = sort_params[q];\r\n }\r\n\r\n //To clean[remove] null and undefined params values\r\n for (var propName in search) {\r\n if (search[propName] === null || search[propName] === undefined || search[propName] === '' ) {\r\n delete search[propName];\r\n }\r\n }\r\n\r\n var page_number = TrackTraceCslPaginationService.get_page_number();\r\n var per_page = TrackTraceCslPaginationService.get_per_page();\r\n\r\n search.page = page_number;\r\n search.per_page = per_page;\r\n\r\n new_url.page = page_number;\r\n new_url.per_page = per_page;\r\n \r\n // URL Rewriting with new params\r\n //$location.search(new_url);\r\n \r\n return TrackTraceCslService.queryShipments(search, timeoutPromise, sort_params).then(\r\n function(resp){\r\n \r\n if (resp && ![422, 500, 503].every(function(status){ return status != resp.status;})){\r\n resp.total = 0;\r\n resp.error = \"The search returned no results.\";\r\n }\r\n\r\n if(query['reference_number']=='Global Search'){\r\n resp.shipments = JSON.parse(localStorage.getItem(\"globalSearchData\"));\r\n resp.shipments = resp.shipments.slice((page_number - 1) * per_page, page_number * per_page);\r\n resp.total = localStorage.getItem(\"globalSearchCount\");\r\n }\r\n\r\n isEmpty = resp.shipments.length == 0;\r\n state.loading = false;\r\n var error = resp.error ? resp.error : undefined;\r\n\r\n ngTable.page(page_number);\r\n ngTable.count(per_page);\r\n \r\n $rootScope.shipmentData = resp.shipments;\r\n $rootScope.resp = resp;\r\n $rootScope.total = parseInt(resp.total);\r\n\r\n $rootScope.ngTableChanges = $rootScope.ngTableChanges + 1;\r\n\r\n // somewhere URL is overriding, to avoid written again.\r\n //$location.search(search);\r\n\r\n return resp.shipments;\r\n });\r\n }\r\n\r\n $rootScope.$watch('ngTableChanges', function(newValue, oldValue) {\r\n \r\n var error = undefined;\r\n\r\n ngTable = new NgTableParams(\r\n {\r\n page: TrackTraceCslPaginationService.get_page_number(),\r\n count: TrackTraceCslPaginationService.get_per_page(), // count per page\r\n }, {\r\n total: $rootScope.total, // length of data\r\n getData: function ($defer, params) {\r\n params.total($rootScope.total);\r\n\r\n //var filtered_data = $filter('filter')($rootScope.shipmentData, params.filter());\r\n //var ordered_data = $filter('orderBy')($rootScope.shipmentData, params.orderBy());\r\n\r\n $defer.resolve($rootScope.shipmentData);\r\n\r\n }\r\n });\r\n\r\n ngTable.reload();\r\n\r\n $rootScope.$broadcast(\"serverTable:stateChanged\", state);\r\n $rootScope.$broadcast(\"serverTable:loaded\", $rootScope.shipmentData, error, $rootScope.resp);\r\n AdvSearchCslService.clearTimeout();\r\n\r\n });\r\n\r\n return {\r\n getState: function(){return state;},\r\n // genTable: genTable,\r\n sortFields: sortFields,\r\n getData: getData,\r\n getParams: function(){\r\n return ngTable.parameters();\r\n },\r\n isEmpty: function(){return isEmpty;},\r\n getTable: function(){ return ngTable;},\r\n getTableParams: function(){return ngTable;},\r\n reloadTable: function(){\r\n\r\n $rootScope.$broadcast(\"ngTableParamsChanged\", ngTableDefaults);\r\n\r\n //$timeout(function () {\r\n //ngTable.page(1);\r\n //ngTable.count(10);\r\n //ngTable.reload();\r\n\r\n return getData({\"invalidate_cache\":true});\r\n //}, 500);\r\n\r\n //return getData({\"invalidate_cache\":true});\r\n //\r\n //return ngTable.reload();\r\n },\r\n getQuery: getQuery,\r\n setQuery: function() {\r\n if (searchRequest){\r\n timeoutPromise.resolve('newSearch');\r\n timeoutPromise = $q.defer();\r\n } else {\r\n timeoutPromise = $q.defer();\r\n }\r\n ngTableDefaults.settings = angular.extend({}, ngTableDefaults.settings, defaultSettings);\r\n ngTableDefaults.params = angular.extend({}, ngTableDefaults.params, initialParams);\r\n $rootScope.$broadcast(\"ngTableParamsChanged\", ngTableDefaults);\r\n searchRequest = getData();\r\n return searchRequest;\r\n }\r\n };\r\n }\r\n\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name ServerTableController.getData()\r\n * @description method retrieves data from the AdvSearchService to generate the table\r\n * @param {params} - provides an object of parameters to the server, this is a function that\r\n * exposes many table parameters.\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('ServerTableCslController', ServerTableCslController);\r\n\r\n /** @ngInject */\r\n\r\n ServerTableCslController.$inject = ['$scope','$rootScope','$stateParams' ,'$http', '$timeout' , '$resource', '$location', 'TrackTraceCslService','CustomResultsCslService', '$translatePartialLoader', '$log', '$filter', '$translate', 'NgTableParams', 'ServerTableCslService', '$q', 'ContactsService', 'ShippingDetailsCslService', 'slug', 'TrackTraceCslPaginationService', 'mdSelectHelper'];\r\n function ServerTableCslController($scope,$rootScope,$stateParams ,$http, $timeout , $resource, $location, TrackTraceCslService, CustomResultsCslService, $translatePartialLoader,$log, $filter, $translate, NgTableParams, ServerTableCslService, $q, ContactsService, ShippingDetailsCslService, slug, TrackTraceCslPaginationService, mdSelectHelper) {\r\n\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('shipment');\r\n $translatePartialLoader.addPart('tracktrace');\r\n /* Variables */\r\n var vm = this;\r\n vm.query = {};\r\n vm.response = {};\r\n vm.isEmpty = ServerTableCslService.isEmpty();\r\n\t\tvm.filters = {shipdate: \"\", duedate: \"\"}\r\n vm.query = ServerTableCslService.getQuery();\r\n\r\n $scope.$watch('vm.query', function(){\r\n vm.query;\r\n vm.isLoading = true;\r\n ServerTableCslService.setQuery();\r\n }, true);\r\n\r\n vm.columns = CustomResultsCslService.getColumnHeaders();\r\n\r\n vm.filtersVisible = false;\r\n vm.isLoading = false;\r\n vm.checkStatus = checkStatus;\r\n\r\n vm.aljex_per_page = aljex_per_page;\r\n vm.aljex_page_number = aljex_page_number;\r\n\r\n /* Function call for Tooltip exceptions */\r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n $scope.getHeaderWidth = getHeaderWidth;\r\n vm.tableParams = ServerTableCslService.getTable();\r\n $scope.sortClickable = sortClickable;\r\n $scope.aljexSortBy = aljexSortBy;\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n vm.getStatusColors = getStatusColors;\r\n\r\n vm.getStatusColors();\r\n\r\n $scope.$on(\"angular-resizable.resizeEnd\", onResizeEnd);\r\n $scope.$on(\"angular-resizable.resizeStart\", function(event){\r\n event.preventDefault();\r\n event.stopPropagation();\r\n });\r\n\r\n function getStatusColors(){\r\n \r\n vm.status_colors = ShippingDetailsCslService.getStatusColors();\r\n\r\n }\r\n\r\n function aljex_page_number(paginate_no){\r\n\r\n var queries = $location.search();\r\n queries.page = paginate_no;\r\n $location.search(queries);\r\n\r\n TrackTraceCslPaginationService.save_page_number(paginate_no);\r\n ServerTableCslService.getData();\r\n\r\n }\r\n\r\n function aljex_per_page(paginate_record){\r\n\r\n var queries = $location.search();\r\n queries.per_page = paginate_record;\r\n $location.search(queries);\r\n\r\n TrackTraceCslPaginationService.save_per_page(paginate_record);\r\n\r\n var returnData = ServerTableCslService.getData();\r\n\r\n /*if(returnData){\r\n // To Avoid wrong page number highligh during page count change.\r\n vm.tableParams.page($rootScope.pageNumber);\r\n vm.tableParams.reload();\r\n }*/\r\n\r\n }\r\n\r\n function sortClickable(event){\r\n return event.target.parentElement.className != \"rg-right\";\r\n }\r\n\r\n function aljexSortBy($column, event) {\r\n var parsedSortable = $column.sortable && $column.sortable();\r\n if (!parsedSortable) {\r\n return;\r\n }\r\n var defaultSort = vm.tableParams.settings().defaultSort;\r\n //var defaultSort = $scope.params.settings().defaultSort;\r\n var inverseSort = (defaultSort === 'asc' ? 'desc' : 'asc');\r\n var sorting = vm.tableParams.sorting() && vm.tableParams.sorting()[parsedSortable] && (vm.tableParams.sorting()[parsedSortable] === defaultSort);\r\n var sortingParams = (event.ctrlKey || event.metaKey) ? vm.tableParams.sorting() : {};\r\n sortingParams[parsedSortable] = (sorting ? inverseSort : defaultSort);\r\n vm.tableParams.parameters({\r\n sorting: sortingParams\r\n });\r\n var sort_params = {key: parsedSortable, criteria: sortingParams[parsedSortable]}\r\n var returnData = ServerTableCslService.getData('','','', sort_params);\r\n if(returnData){\r\n vm.tableParams.page(TrackTraceCslPaginationService.get_page_number());\r\n vm.tableParams.reload();\r\n }\r\n }\r\n\r\n function onResizeEnd(event, args){\r\n event.preventDefault();\r\n event.stopPropagation();\r\n localStorage.setItem( \"resize-tt-\" + args.id, args.width );\r\n }\r\n\r\n function getHeaderWidth(item){\r\n var width = localStorage.getItem(\"resize-tt-\" + slug(item));\r\n return width ? \"width: \" + width + \"px;\" : \"\";\r\n }\r\n\r\n\t\tvm.filterDate = filterDate;\r\n vm.filterTime = filterTime;\r\n vm.tableParams = ServerTableCslService.getTable();\r\n vm.updateFilteredCounts = updateFilteredCounts;\r\n\r\n\t\tfunction filterDate(key){\r\n\r\n\t\t\tvar filter_by = {};\r\n\t\t\tif (vm.filters[key]){\r\n\t\t\t\tfilter_by[key] = moment(vm.filters[key]).format(\"YYYY-MM-DD\");\r\n\t\t\t}\r\n\r\n updateFilteredCounts(key,filter_by[key]);\r\n\r\n\t\t}\r\n\r\n function filterTime(key){\r\n\r\n var filter_by = {};\r\n if (vm.filters[key]){\r\n \r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n\r\n filter_by[key] = moment(vm.filters[key]).format('hh:mm a')+' '+timezone_symbol;\r\n \r\n }\r\n \r\n updateFilteredCounts(key,filter_by[key]);\r\n\r\n }\r\n\r\n function checkStatus(row){\r\n return (row.isdelivered === 'booking' || row.isdelivered == 'n/a') ? 'N/A' : 'Undelivered'\r\n }\r\n\r\n function updateFilteredCounts(paramName, paramValue){ \r\n //Changing Field name to filter only\r\n paramName = paramName+'_filter';\r\n\r\n //$timeout(function () {\r\n //$rootScope.pageNumber = 1;\r\n TrackTraceCslPaginationService.save_page_number(1);\r\n \r\n var returnData = ServerTableCslService.getData('',paramName,paramValue);\r\n if(returnData){\r\n\r\n // To Avoid wrong page number highlight during ngTable Filter.\r\n vm.tableParams.page(TrackTraceCslPaginationService.get_page_number());\r\n\r\n vm.tableParams.reload();\r\n }\r\n\r\n //}, 500);\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n \r\n $timeout(function () {\r\n vm.tooltipIsLoading = false;\r\n }, 1000); \r\n\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsCslService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n $scope.$on(\"ngTableParamsChanged\", function(){\r\n vm.tableParams = ServerTableCslService.getTable();\r\n vm.isEmpty = ServerTableCslService.isEmpty();\r\n vm.tableParams.reload();\r\n\r\n });\r\n\r\n $scope.$on(\"serverTable:stateChanged\", function(event, state) {\r\n vm.isLoading = state.loading;\r\n if(vm.isLoading === false){\r\n vm.tableParams.reload();\r\n }\r\n });\r\n\r\n $scope.$on(\"serverTable:loaded\", function(event, data, error, response) {\r\n /* Added by Abheesh */\r\n if(vm.query['reference_number']=='Global Search'){\r\n // // console.log('Global search');\r\n // vm.tableParams.data = TrackTraceService.getGlobalSearchData();\r\n data = JSON.parse(localStorage.getItem(\"globalSearchData\"));\r\n vm.tableParams['data'] = data;\r\n }\r\n if ($location.path().indexOf('/track-trace-csl') === -1) return;\r\n // Check filters for actual values and tell our service that we are filtering\r\n angular.forEach(vm.tableParams.filter(), function(v, k) {\r\n var isFiltered = false;\r\n if (v != \"\" && v != null && v != undefined) {\r\n isFiltered = false;\r\n }\r\n\r\n //TrackTraceCslService.setResultsFiltered(isFiltered);\r\n });\r\n // Tell our service how many results we have total\r\n TrackTraceCslService.setResultsCount(vm.tableParams.total());\r\n ContactsService.setSubjectStatuses({trackTrace: {exceptions: response.exception_count + response.potential_exception_count > 0, results: true}});\r\n\r\n vm.noResults = !data || data.length == 0;\r\n vm.isError = !!error;\r\n vm.error = vm.isError ? error : \"\";\r\n });\r\n }\r\n\r\n\r\n}) ();\r\n\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk \r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License \r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name ServerTable.ngTableSorterRow\r\n * @description directive that sorts the rows of a table\r\n * @restrict E\r\n */\r\n\r\n(function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableSorterCslRowServerTable', ngTableSorterRow);\r\n\r\n ngTableSorterRow.$inject = [];\r\n\r\n function ngTableSorterRow(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/track-trace/track-trace-csl/server-table/sorterHeader.html',\r\n scope: true,\r\n controller: 'ngTableSorterRowController'\r\n };\r\n return directive;\r\n }\r\n\r\n})();\r\n\n// /**\r\n// * ngTable: Table + Angular JS\r\n// *\r\n// * @author Vitalii Savchuk \r\n// * @url https://github.com/esvit/ng-table/\r\n// * @license New BSD License \r\n// */\r\n\r\n// /**\r\n// * @ngdoc directive\r\n// * @name ServerTable.ngTableFilterRowAljex\r\n// * @description directive that filters the rows of a table\r\n// * @restrict E\r\n// */\r\n\r\n (function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableFilterRowAljexCview', ngTableFilterRowAljex);\r\n ngTableFilterRowAljex.$inject = [];\r\n\r\n function ngTableFilterRowAljex(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/track-trace/track-trace-csl/server-table/filterHeader.html',\r\n scope: true,\r\n controller: 'ngTableFilterRowController'\r\n };\r\n return directive;\r\n }\r\n })();\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.setColumnHeaders\r\n * @description sets the headers of the shipments table in track and trace\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.getColumnHeaders\r\n * @description gets the column headers variable\r\n */\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.setActiveColumns\r\n* @description setActiveColumns() set the activeColumns variable\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getActiveColumns\r\n* @description getActiveColumns() returns the active columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getDefaultColumns\r\n* @description getDefaultColumns() returns the default columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getAvailableColumns\r\n* @description getAvailableColumns returns the availableColumns\r\n*/\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('CustomResultsCslService', CustomResultsCslService);\r\n\r\n /** @ngInject */\r\n CustomResultsCslService.$inject = ['$log', '$http'];\r\n function CustomResultsCslService($log, $http) {\r\n\r\n var aljexColumns = [\r\n\r\n {field:\"status\", title: \"SHIPMENT.STATUS_Aljex\", sortable: \"status\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true},\r\n\r\n {field:\"deliverydate\", title: \"DELIVERY DATE\", sortable: \"deliverydate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"deliverytime\", title: \"DELIVERY TIME\", sortable: \"deliverytime\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"signedby\", title: \"SHIPMENT.SIGNEDBY_Aljex\", sortable: \"signedby\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"lastcheckcalldetails_new\", title: \"SHIPMENT.LASTCHECKCALL_CSL\", sortable: \"lastcheckcalldetails\", filter: {}, show:false, tdClass: \"td-25\", class: \"td-25\", static: true},\r\n\r\n {field:\"lastcheckcallstatus\", title: \"SHIPMENT.LASTCHECKCALLSTATUS_Aljex\", sortable: \"lastcheckcallstatus\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"lastcheckcallstate\", title: \"SHIPMENT.LASTCHECKCALLSTATE_Aljex\", sortable: \"lastcheckcallstate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"numberofpicks\", title: \"PICK(S) - Number of Picks\", sortable: \"numberofpicks\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"numberofstops\", title: \"STOP(S) - Number of Stops\", sortable: \"numberofstops\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"bol\", title: \"SHIPMENT.BOL_Aljex\", sortable: \"bol\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"reference\", title: \"SHIPMENT.REF_Aljex\", sortable: \"reference\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true},\r\n {field:\"pro\", title: \"SHIPMENT.PRO_Aljex\", sortable: \"pro\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true},\r\n {field:\"load\", title: \"SHIPMENT.LOAD_Aljex\", sortable: \"load\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"containertrailer\", title: \"SHIPMENT.CONTAINERTRAILER_Aljex\", sortable: \"containertrailer\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"truck\", title: \"SHIPMENT.TRUCK_Aljex\", sortable: \"truck\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"pickupappointmentdatetime_new\", title: \"SHIPMENT.PICKUP_APPT_CSL\", sortable: \"pickupappointmentdatetime\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"deliverydatetime_new\", title: \"SHIPMENT.DELIVERYDATE_Aljex\", sortable: \"deliverydatetime\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"pickupname\", title: \"SHIPMENT.PICKUPNAME_Aljex\", sortable: \"pickupname\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"pickupzipcode\", title: \"SHIPMENT.PICKUPZIPCODE_Aljex\", sortable: \"pickupzipcode\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"pickupaddress\", title: \"SHIPMENT.PICKUPADDRESS_Aljex\", sortable: \"pickupaddress\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"pickupaddressline2\", title: \"SHIPMENT.PICKUPADDRESSLINE2_Aljex\", sortable: \"pickupaddressline2\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n\r\n {field:\"consigneeapptdatetime_new\", title: \"SHIPMENT.delivery_csl\", sortable: \"consigneeapptdatetime\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"consigneename\", title: \"SHIPMENT.CONSIGNEENAME_Aljex\", sortable: \"consigneename\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneezipcode\", title: \"SHIPMENT.CONSIGNEEZIPCODE_Aljex\", sortable: \"consigneezipcode\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"consigneeaddress\", title: \"SHIPMENT.CONSIGNEEADDRESS_Aljex\", sortable: \"consigneeaddress\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"consigneeaddressline2\", title: \"SHIPMENT.CONSIGNEEADDRESSLINE2_Aljex\", sortable: \"consigneeaddressline2\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n\r\n {field:\"equipmenttype\", title: \"SHIPMENT.EQUIPMENT_TYPE\", sortable: \"equipmenttype\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"billeddate\", title: \"SHIPMENT.BILLEDDATE_Aljex\", sortable: \"billeddate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"shipdate\", title: \"SHIPMENT.SHIPDATE_Aljex\", sortable: \"shipdate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"totalpieces\", title: \"SHIPMENT.TOTALPIECES_Aljex\", sortable: \"totalpieces\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"loadeddate\", title: \"SHIPMENT.LOADEDDATE_Aljex\", sortable: \"loadeddate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"origincitystate\", title: \"SHIPMENT.PICKUP_CSL\", sortable: \"origincitystate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"destinationcitystate\", title: \"SHIPMENT.DESTINATION_CSL\", sortable: \"destinationcitystate\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n\r\n {field:\"invoicetotal\", title: \"SHIPMENT.INVOICETOTAL_Aljex\", sortable: \"invoicetotal\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"weight\", title: \"SHIPMENT.TOTALGROSSWEIGHT_Aljex\", sortable: \"weight\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n ];\r\n\r\n aljexColumns.map(function(d){\r\n if (d.field.indexOf('date') !== -1) {\r\n d.filter[d.field] = '/app/track-trace/track-trace-csl/server-table/filterDate.html';\r\n } else if (d.field.indexOf('time') !== -1) {\r\n d.filter[d.field] = '/app/track-trace/track-trace-csl/server-table/filterTime.html';\r\n } else if (d.field == 'status' ) {\r\n d.filter[d.field] = '/app/track-trace/track-trace-csl/server-table/filterStatus.html';\r\n } else if (d.field == 'milestone'){\r\n d.filter[d.field] = '/app/track-trace/track-trace-csl/server-table/filterMilestone.html';\r\n } else {\r\n d.filter[d.field] = '/app/track-trace/track-trace-csl/server-table/filterDefault.html';\r\n }\r\n })\r\n\r\n var columnHeaders = [];\r\n\r\n var defaultAljexColumns = [\r\n {field:\"status\", title: \"SHIPMENT.STATUS_Aljex\"},\r\n {field:\"pro\", title: \"SHIPMENT.PRO_Aljex\"},\r\n {field:\"reference\", title: \"SHIPMENT.REF_Aljex\"},\r\n {field:\"pickupappointmentdatetime_new\", title: \"SHIPMENT.PICKUP_APPT_CSL\"},\r\n {field:\"origincitystate\", title: \"SHIPMENT.PICKUP_CSL\"},\r\n {field:\"consigneeapptdatetime_new\", title: \"SHIPMENT.delivery_csl\"},\r\n {field:\"destinationcitystate\", title: \"SHIPMENT.DESTINATION_CSL\"},\r\n {field:\"deliverydatetime_new\", title: \"DELIVERYDATE_Aljex\"},\r\n {field:\"lastcheckcalldetails_new\", title: \"SHIPMENT.LASTCHECKCALL_CSL\"}\r\n ];\r\n\r\n var activeAljexColumns = defaultAljexColumns;\r\n\r\n /* functions */\r\n function setColumnHeaders(activeCol) {\r\n\r\n columnHeaders.length = 0;\r\n aljexColumns.map(function(d){d.show = false});\r\n for (var j in activeAljexColumns){\r\n for (var i in aljexColumns) {\r\n if (activeAljexColumns[j].field === aljexColumns[i].field){\r\n aljexColumns[i].show = true;\r\n columnHeaders.push(aljexColumns[i]);\r\n }\r\n }\r\n }\r\n columnHeaders.unshift({field:\"flag\", title: \"TRACKTRACE.EXCEPTION_HEADER\", show:true, tdClass: \"td-5\", class: \"td-5\", static: true});\r\n }\r\n\r\n function setActiveColumns(activeCol){\r\n activeAljexColumns = activeCol;\r\n }\r\n\r\n function setDefaultColumns(activeCol){\r\n activeAljexColumns = defaultAljexColumns;\r\n }\r\n\r\n setColumnHeaders(activeAljexColumns);\r\n\r\n return {\r\n setColumnHeaders: setColumnHeaders,\r\n getColumnHeaders: function() {\r\n return columnHeaders;\r\n },\r\n setActiveColumns: setActiveColumns,\r\n getActiveColumns: function() {\r\n return activeAljexColumns;\r\n },\r\n getDefaultColumns: function(){\r\n return defaultAljexColumns;\r\n },\r\n getAllColumns: function(){\r\n return aljexColumns;\r\n },\r\n getAvailableColumns: function() {\r\n return aljexColumns.filter(function(d){\r\n if (!d.show){\r\n return {\r\n field: d.field,\r\n title: d.title\r\n };\r\n }\r\n }).sort(function(a, b) {\r\n return a.title > b.title ? 1 : (a.title < b.title ? -1 : 0);\r\n });\r\n }\r\n };\r\n\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCslController.add\r\n * @description method adds a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCslController.remove\r\n * @description method removes a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCslController.dragListener\r\n * @description method that is the listener for drag events\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCslController.saveToDefault\r\n * @description method saves the layout to default\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCslController.submit\r\n * @description method submits the custom search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCslController.activeSearchChange\r\n * @description method called when the active search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCslController.availableSearchChange\r\n * @description method called when the available search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCslController.clickedActiveSearchX\r\n * @description method called the X by the activeSearchField is clicked and deletes the value in activeSearchField\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCslController.clickedAvailableSearchX\r\n * @description method called the X by the availableSearchField is clicked and deletes the value in availableSearchField\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('CustomizeResultsCslController', CustomizeResultsCslController);\r\n\r\n /** @ngInject */\r\n CustomizeResultsCslController.$inject = ['CustomResultsCslService', 'api', '$log', '$mdDialog', '$window','$http', '$mdToast', 'UserService', 'permissions'];\r\n function CustomizeResultsCslController(CustomResultsCslService, api, $log, $mdDialog, $window, $http, $mdToast,UserService, permissions) {\r\n\r\n /* variables */\r\n var vm = this;\r\n vm.user = UserService.getUserData();\r\n vm.activeColumns = CustomResultsCslService.getActiveColumns();\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.availableColumns = CustomResultsCslService.getAvailableColumns();\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns); //used for search of availableColumns\r\n vm.allColumns = CustomResultsCslService.getAllColumns();\r\n vm.availableSearchField = \"\";\r\n //vm.activeSearchField = \"\";\r\n //need copies of the orignal lists for setting the service back if canceled\r\n vm.activeColumnsCopy = angular.copy(vm.activeColumns);\r\n\r\n vm.colHeight = colHeight();\r\n\r\n /* functions */\r\n vm.cancel = cancel;\r\n vm.add = add;\r\n vm.remove = remove;\r\n vm.dragListener = dragListener;\r\n vm.saveToDefault = saveToDefault;\r\n vm.restoreDefault = restoreDefault;\r\n vm.submit = submit;\r\n //vm.activeSearchChange = activeSearchChange;\r\n vm.availableSearchChange = availableSearchChange;\r\n vm.showToastWithFile = showToastWithFile\r\n //vm.clickedActiveSearchX = clickedActiveSearchX;\r\n vm.clickedAvailableSearchX = clickedAvailableSearchX;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n function cancel() {\r\n CustomResultsCslService.setActiveColumns(vm.activeColumnsCopy);\r\n $mdDialog.cancel();\r\n }\r\n\r\n colHeight();\r\n function colHeight() {\r\n //// console.log($window.innerHeight);\r\n return ($window.innerHeight * 0.5);\r\n }\r\n\r\n //add to the active column\r\n function add(column) {\r\n vm.activeColumns.push(column);\r\n var index = vm.availableColumns.indexOf(column);\r\n vm.availableColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n localStorage.setItem(\"mycslcookie\", JSON.stringify(vm.activeColumns));\r\n }\r\n\r\n //remove from the active column\r\n function remove(column) {\r\n $log.debug(\"column name: \" + column.name + \" column width: \" + column.width);\r\n vm.availableColumns.push(column);\r\n var index = vm.activeColumns.indexOf(column);\r\n vm.activeColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n localStorage.setItem(\"mycslcookie\", JSON.stringify(vm.activeColumns));\r\n }\r\n\r\n //function for the event when the active column is dragged\r\n function dragListener() {\r\n return {\r\n accept: function (sourceItemHandleScope, destSortableScope) {return true}, //override to determine drag is allowed or not. default is true.\r\n itemMoved: function () {\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n localStorage.setItem(\"mycslcookie\", JSON.stringify(vm.activeColumns));\r\n },\r\n orderChanged: function() {},\r\n allowDuplicates: false //optional param allows duplicates to be dropped.\r\n }\r\n }\r\n\r\n function showToastWithFile(file, messages, delay) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: delay ? delay : 2000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/users/toast/' + file,\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n //saves the current custimization to default\r\n function saveToDefault() {\r\n\r\n $log.debug(\"save to default: \" + vm.activeColumns);\r\n var column_array =[]\r\n vm.activeColumns.forEach(function(element, index){\r\n column_array.push(element.field)\r\n })\r\n $http({\r\n method: 'PUT',\r\n url: api.url + '/users/'+vm.user.id+'/set_aljex_def_colms',\r\n data: {\r\n default_columns: column_array\r\n }\r\n }).success(function(response){\r\n showToastWithFile('default-columns-save-sucess.html', \"Default Columns Saved\");\r\n window.localStorage.removeItem('mycslcookie');\r\n }).error(function(response){\r\n showToastWithFile('default-columns-save-error.html', \"Error saving Default Columns\");\r\n });\r\n }\r\n\r\n function restoreDefault(){\r\n\r\n vm.activeColumns = [\r\n {field:\"status\", title: \"SHIPMENT.STATUS_Aljex\"},\r\n {field:\"pro\", title: \"SHIPMENT.PRO_Aljex\"},\r\n {field:\"reference\", title: \"SHIPMENT.REF_Aljex\"},\r\n {field:\"pickupappointmentdatetime_new\", title: \"SHIPMENT.PICKUP_APPT_CSL\"},\r\n {field:\"origincitystate\", title: \"SHIPMENT.PICKUP_CSL\"},\r\n {field:\"consigneeapptdatetime_new\", title: \"SHIPMENT.delivery_csl\"},\r\n {field:\"destinationcitystate\", title: \"SHIPMENT.DESTINATION_CSL\"},\r\n {field:\"deliverydatetime_new\", title: \"DELIVERYDATE_Aljex\"},\r\n {field:\"lastcheckcalldetails_new\", title: \"SHIPMENT.LASTCHECKCALL_CSL\"}\r\n ];\r\n\r\n var onlyInA = vm.allColumns.filter(compare(vm.activeColumns));\r\n var onlyInB = vm.activeColumns.filter(compare(vm.allColumns));\r\n\r\n var result = onlyInA.concat(onlyInB);\r\n\r\n vm.availableColumns = angular.copy(result);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n saveToDefault();\r\n // vm.activeColumns = CustomResultsCslService.getActiveColumns();\r\n }\r\n\r\n //the submit button\r\n function submit() {\r\n $log.debug(\"submited \" + vm.activeColumns);\r\n //vm.availableColumns = vm.tempAvailableColumns;\r\n CustomResultsCslService.setActiveColumns(vm.activeColumns);\r\n CustomResultsCslService.setColumnHeaders(vm.activeColumns); //sends the object\r\n $mdDialog.hide();\r\n }\r\n\r\n //changes the activeColumns to be shown based on what the search field is\r\n // function activeSearchChange() {\r\n // var results = [];\r\n // var lcs = vm.activeSearchField.toLowerCase();\r\n // for (var index = 0; index < vm.tempActiveColumns.length; index++) {\r\n // var name = vm.tempActiveColumns[index].title.toLowerCase();\r\n // if (name.indexOf(lcs) > -1) { //if the string contains the name\r\n // results.push(vm.tempActiveColumns[index]);\r\n // }\r\n // }\r\n // vm.activeColumns = results;\r\n // }\r\n\r\n //changes the availableColumns to be shown based on what the search field is\r\n function availableSearchChange() {\r\n var results = [];\r\n var lcs = vm.availableSearchField.toLowerCase();\r\n for (var index = 0; index < vm.tempAvailableColumns.length; index++) {\r\n var name = vm.tempAvailableColumns[index].title.toLowerCase();\r\n if (name.indexOf(lcs) > -1) { //if the string contains the name\r\n results.push(vm.tempAvailableColumns[index]);\r\n }\r\n }\r\n vm.availableColumns = results;\r\n }\r\n\r\n //clears the active search field\r\n // function clickedActiveSearchX() {\r\n // vm.activeSearchField = '';\r\n // vm.activeSearchChange();\r\n // }\r\n\r\n //clears the available search field\r\n function clickedAvailableSearchX() {\r\n vm.availableSearchField = '';\r\n\r\n var onlyInA = vm.allColumns.filter(compare(vm.activeColumns));\r\n var onlyInB = vm.activeColumns.filter(compare(vm.allColumns));\r\n\r\n var result = onlyInA.concat(onlyInB);\r\n\r\n vm.tempAvailableColumns = angular.copy(result);\r\n\r\n // CustomResultsService.getAvailableColumns();\r\n vm.availableSearchChange();\r\n }\r\n\r\n function compare(otherArray){\r\n return function(current){\r\n return otherArray.filter(function(other){\r\n return other.field == current.field\r\n }).length == 0;\r\n }\r\n }\r\n\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('ServerTableCmtsService', ServerTableCmtsService);\r\n\r\n /** @ngInject */\r\n ServerTableCmtsService.$inject = ['ngTableDefaults' ,'$location' ,'$rootScope', '$q', 'NgTableParams', \"TrackTraceCmtsService\", 'AdvSearchCmtsService', 'UserService', 'TrackTraceCmtsPaginationService'];\r\n function ServerTableCmtsService(ngTableDefaults, $location ,$rootScope, $q,NgTableParams, TrackTraceCmtsService, AdvSearchCmtsService, UserService, TrackTraceCmtsPaginationService) {\r\n\r\n $rootScope.ngTableChanges = 0 ;\r\n $rootScope.shipmentData = '';\r\n $rootScope.resp = '';\r\n $rootScope.total = 0;\r\n\r\n var table_filters = {};\r\n\r\n var query = {},\r\n\r\n isEmpty = true,\r\n // ngTable = genTable(),\r\n state = {\r\n loading: false\r\n },\r\n timeoutPromise,\r\n searchRequest,\r\n query = AdvSearchCmtsService.getCurrentSearch(),\r\n ngTable = new NgTableParams(\r\n {\r\n\r\n }, {\r\n counts: [10,25,50,100]\r\n });\r\n\r\n // *** TURNED THIS FEATURE OFF TO MAKE ALL TABLES HAVE UNIFORM COUNTS\r\n // var pageSizes = [\r\n // { label: \"5 10 20\", sizes: [5,10,20] },\r\n // { label: \"10 20 50\", sizes: [10,20,50] }\r\n // ];\r\n var defaultSettings = {\r\n counts: [10,25,50,100],\r\n defaultSort: \"asc\",\r\n filterOptions: {\r\n filterComparator: true\r\n }\r\n };\r\n\r\n var initialSorting = [\r\n { label: \"Id ASC\", value: { id: \"asc\"} },\r\n { label: \"Id DESC\", value: { id: \"desc\"} },\r\n { label: \"Name ASC\", value: { name: \"asc\"} },\r\n { label: \"Name DESC\", value: { name: \"desc\"} }\r\n ];\r\n var initialParams = {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n sorting: undefined\r\n };\r\n\r\n function genTable(){\r\n return new NgTableParams(\r\n {\r\n\r\n }, {\r\n counts: [10,25,50,100],\r\n getData: getData\r\n });\r\n }\r\n\r\n\r\n\r\n\r\n function sortFields(orderBy, sorting){\r\n var result = [];\r\n for (var i in orderBy){\r\n if (!isNaN(+i)){\r\n var x = orderBy[i].replace(/[+-]/g,\"\");\r\n var p = {};\r\n p[x] = sorting[x];\r\n result.push(p);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function getQuery() {return query;}\r\n\r\n function getData(params, queryParameterName, queryParameterValue, sort_params ){\r\n\r\n if(queryParameterName){\r\n table_filters[queryParameterName] = queryParameterValue;\r\n }\r\n\r\n query = AdvSearchCmtsService.getCurrentSearch();\r\n\r\n var search = {};\r\n var new_url = {};\r\n\r\n // from dount chart dashboard[Aljex] page.\r\n if($location.search().page_from == 'aljex'){\r\n\r\n for (var r in $location.search()){\r\n search = $location.search();\r\n }\r\n\r\n }\r\n\r\n if (params && params['invalidate_cache'] === true || localStorage.getItem('invalidateCache') === 'true'){\r\n search['invalidate_cache'] = true;\r\n localStorage.setItem('invalidateCache', false);\r\n\r\n //myurl = '';\r\n //query = {};\r\n //table_filters = {};\r\n\r\n //TrackTraceCmtsPaginationService.save_page_number(1);\r\n //TrackTraceCmtsPaginationService.save_per_page(10);\r\n }\r\n if (sort_params && sort_params['key'] && sort_params['criteria'])\r\n {\r\n localStorage.setItem('sort_key', sort_params['key']);\r\n localStorage.setItem('sort_criteria', sort_params['criteria']);\r\n }\r\n else if (localStorage.getItem('sort_key') && localStorage.getItem('sort_criteria'))\r\n {\r\n var sort_params = {key: localStorage.getItem('sort_key'), criteria: localStorage.getItem('sort_criteria')}\r\n }\r\n\r\n state.loading = true;\r\n $rootScope.$broadcast(\"serverTable:stateChanged\", state);\r\n\r\n\r\n /*var column_header = [];\r\n\r\n var columns = CustomResultsCmtsService.getActiveColumns();\r\n\r\n if(columns){\r\n if(columns.length > 0){\r\n for(var i =0; i < columns.length; i++ ){\r\n column_header.push(columns[i].field);\r\n }\r\n }\r\n }\r\n //debugger;\r\n if(myurl){\r\n if(myurl.split('?')[1].length > 0){\r\n var keyval = myurl.split('?')[1].split('&');\r\n\r\n if(keyval.length > 0){\r\n for(var x=0,y=keyval.length; x'+ queryParameterName);\r\n if(keyval[x].split('=')[0] != queryParameterName){\r\n //if((column_header.indexOf(keyval[x].split('=')[0]) !== -1) ){\r\n search[keyval[x].split('=')[0]] = keyval[x].split('=')[1];\r\n //}\r\n }\r\n\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n for (var r in table_filters){\r\n search[r] = table_filters[r];\r\n }\r\n\r\n for (var q in query){\r\n if(q == 'quick_filter'){\r\n search['current_exception'] = 1;\r\n }else{\r\n search[q] = query[q];\r\n }\r\n }\r\n\r\n for (var q in sort_params){\r\n search[q] = sort_params[q];\r\n }\r\n\r\n //To clean[remove] null and undefined params values\r\n for (var propName in search) {\r\n if (search[propName] === null || search[propName] === undefined || search[propName] === '' ) {\r\n delete search[propName];\r\n }\r\n }\r\n\r\n var page_number = TrackTraceCmtsPaginationService.get_page_number();\r\n var per_page = TrackTraceCmtsPaginationService.get_per_page();\r\n\r\n search.page = page_number;\r\n search.per_page = per_page;\r\n\r\n new_url.page = page_number;\r\n new_url.per_page = per_page;\r\n\r\n // URL Rewriting with new params\r\n //$location.search(new_url);\r\n\r\n return TrackTraceCmtsService.queryShipments(search, timeoutPromise, sort_params).then(\r\n function(resp){\r\n\r\n if (resp && ![422, 500, 503].every(function(status){ return status != resp.status;})){\r\n resp.total = 0;\r\n resp.error = \"The search returned no results.\";\r\n }\r\n\r\n if(query['reference_number']=='Global Search'){\r\n resp.shipments = JSON.parse(localStorage.getItem(\"globalSearchData\"));\r\n resp.shipments = resp.shipments.slice((page_number - 1) * per_page, page_number * per_page);\r\n resp.total = localStorage.getItem(\"globalSearchCount\");\r\n }\r\n\r\n isEmpty = resp.shipments.length == 0;\r\n state.loading = false;\r\n var error = resp.error ? resp.error : undefined;\r\n\r\n ngTable.settings({data: resp.shipments});\r\n ngTable.total(resp.total);\r\n ngTable.page(page_number);\r\n ngTable.count(per_page);\r\n\r\n $rootScope.shipmentData = resp.shipments;\r\n $rootScope.resp = resp;\r\n $rootScope.total = parseInt(resp.total);\r\n\r\n $rootScope.ngTableChanges = $rootScope.ngTableChanges + 1;\r\n\r\n // somewhere URL is overriding, to avoid written again.\r\n //$location.search(search);\r\n\r\n return resp.shipments;\r\n });\r\n }\r\n\r\n $rootScope.$watch('ngTableChanges', function(newValue, oldValue) {\r\n\r\n var error = undefined;\r\n\r\n ngTable = new NgTableParams(\r\n {\r\n page: TrackTraceCmtsPaginationService.get_page_number(),\r\n count: TrackTraceCmtsPaginationService.get_per_page() // count per page\r\n }, {\r\n total: $rootScope.total, // length of data\r\n getData: function ($defer, params) {\r\n params.total($rootScope.total);\r\n\r\n //var filtered_data = $filter('filter')($rootScope.shipmentData, params.filter());\r\n //var ordered_data = $filter('orderBy')($rootScope.shipmentData, params.orderBy());\r\n\r\n $defer.resolve($rootScope.shipmentData);\r\n\r\n }\r\n });\r\n\r\n ngTable.reload();\r\n\r\n $rootScope.$broadcast(\"serverTable:stateChanged\", state);\r\n $rootScope.$broadcast(\"serverTable:loaded\", $rootScope.shipmentData, error, $rootScope.resp);\r\n AdvSearchCmtsService.clearTimeout();\r\n\r\n });\r\n\r\n return {\r\n getState: function(){return state;},\r\n // genTable: genTable,\r\n sortFields: sortFields,\r\n getData: getData,\r\n getParams: function(){\r\n return ngTable.parameters();\r\n },\r\n isEmpty: function(){return isEmpty;},\r\n getTable: function(){ return ngTable;},\r\n getTableParams: function(){return ngTable;},\r\n reloadTable: function(){\r\n\r\n $rootScope.$broadcast(\"ngTableParamsChanged\", ngTableDefaults);\r\n\r\n //$timeout(function () {\r\n //ngTable.page(1);\r\n //ngTable.count(10);\r\n //ngTable.reload();\r\n\r\n return getData({\"invalidate_cache\":true});\r\n //}, 500);\r\n\r\n //return getData({\"invalidate_cache\":true});\r\n //\r\n //return ngTable.reload();\r\n },\r\n getQuery: getQuery,\r\n setQuery: function() {\r\n if (searchRequest){\r\n timeoutPromise.resolve('newSearch');\r\n timeoutPromise = $q.defer();\r\n } else {\r\n timeoutPromise = $q.defer();\r\n }\r\n ngTableDefaults.settings = angular.extend({}, ngTableDefaults.settings, defaultSettings);\r\n ngTableDefaults.params = angular.extend({}, ngTableDefaults.params, initialParams);\r\n $rootScope.$broadcast(\"ngTableParamsChanged\", ngTableDefaults);\r\n searchRequest = getData();\r\n return searchRequest;\r\n }\r\n };\r\n }\r\n\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name ServerTableController.getData()\r\n * @description method retrieves data from the AdvSearchService to generate the table\r\n * @param {params} - provides an object of parameters to the server, this is a function that\r\n * exposes many table parameters.\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('ServerTableCmtsController', ServerTableCmtsController);\r\n\r\n /** @ngInject */\r\n\r\n ServerTableCmtsController.$inject = ['$scope','$rootScope','$stateParams' ,'$http', '$timeout' , '$resource', '$location', 'TrackTraceCmtsService','CustomResultsCmtsService', '$translatePartialLoader', '$log', '$filter', '$translate', 'NgTableParams', 'ServerTableCmtsService', '$q', 'ContactsService', 'ShippingDetailsCmtsService', 'slug', 'TrackTraceCmtsPaginationService', 'mdSelectHelper'];\r\n function ServerTableCmtsController($scope,$rootScope,$stateParams ,$http, $timeout , $resource, $location, TrackTraceCmtsService, CustomResultsCmtsService, $translatePartialLoader,$log, $filter, $translate, NgTableParams, ServerTableCmtsService, $q, ContactsService, ShippingDetailsCmtsService, slug, TrackTraceCmtsPaginationService, mdSelectHelper) {\r\n\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('shipment');\r\n $translatePartialLoader.addPart('tracktrace');\r\n /* Variables */\r\n var vm = this;\r\n vm.query = {};\r\n vm.response = {};\r\n vm.isEmpty = ServerTableCmtsService.isEmpty();\r\n vm.filters = {planned_start: \"\", planned_end: \"\"}\r\n vm.query = ServerTableCmtsService.getQuery();\r\n\r\n $scope.$watch('vm.query', function(){\r\n vm.query;\r\n vm.isLoading = true;\r\n ServerTableCmtsService.setQuery();\r\n }, true);\r\n\r\n vm.columns = CustomResultsCmtsService.getColumnHeaders();\r\n\r\n vm.cmtsFiltersVisible = false;\r\n vm.isLoading = false;\r\n vm.checkStatus = checkStatus;\r\n\r\n vm.aljex_per_page = aljex_per_page;\r\n vm.aljex_page_number = aljex_page_number;\r\n\r\n /* Function call for Tooltip exceptions */\r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n $scope.getHeaderWidth = getHeaderWidth;\r\n vm.tableParams = ServerTableCmtsService.getTable();\r\n $scope.sortClickable = sortClickable;\r\n $scope.aljexSortBy = aljexSortBy;\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n vm.getStatusColors = getStatusColors;\r\n\r\n vm.getStatusColors();\r\n\r\n $scope.$on(\"angular-resizable.resizeEnd\", onResizeEnd);\r\n $scope.$on(\"angular-resizable.resizeStart\", function(event){\r\n event.preventDefault();\r\n event.stopPropagation();\r\n });\r\n\r\n function getStatusColors(){\r\n \r\n vm.status_colors = ShippingDetailsCmtsService.getStatusColors();\r\n\r\n }\r\n\r\n function aljex_page_number(paginate_no){\r\n\r\n var queries = $location.search();\r\n queries.page = paginate_no;\r\n $location.search(queries);\r\n\r\n TrackTraceCmtsPaginationService.save_page_number(paginate_no);\r\n ServerTableCmtsService.getData();\r\n\r\n }\r\n\r\n function aljex_per_page(paginate_record){\r\n\r\n var queries = $location.search();\r\n queries.per_page = paginate_record;\r\n $location.search(queries);\r\n\r\n TrackTraceCmtsPaginationService.save_per_page(paginate_record);\r\n\r\n var returnData = ServerTableCmtsService.getData();\r\n\r\n /*if(returnData){\r\n // To Avoid wrong page number highligh during page count change.\r\n vm.tableParams.page($rootScope.pageNumber);\r\n vm.tableParams.reload();\r\n }*/\r\n\r\n }\r\n\r\n function sortClickable(event){\r\n return event.target.parentElement.className != \"rg-right\";\r\n }\r\n\r\n function aljexSortBy($column, event) {\r\n var parsedSortable = $column.sortable && $column.sortable();\r\n if (!parsedSortable) {\r\n return;\r\n }\r\n var defaultSort = vm.tableParams.settings().defaultSort;\r\n //var defaultSort = $scope.params.settings().defaultSort;\r\n var inverseSort = (defaultSort === 'asc' ? 'desc' : 'asc');\r\n var sorting = vm.tableParams.sorting() && vm.tableParams.sorting()[parsedSortable] && (vm.tableParams.sorting()[parsedSortable] === defaultSort);\r\n var sortingParams = (event.ctrlKey || event.metaKey) ? vm.tableParams.sorting() : {};\r\n sortingParams[parsedSortable] = (sorting ? inverseSort : defaultSort);\r\n vm.tableParams.parameters({\r\n sorting: sortingParams\r\n });\r\n var sort_params = {key: parsedSortable, criteria: sortingParams[parsedSortable]}\r\n var returnData = ServerTableCmtsService.getData('','','', sort_params);\r\n if(returnData){\r\n vm.tableParams.page(TrackTraceCmtsPaginationService.get_page_number());\r\n vm.tableParams.reload();\r\n }\r\n }\r\n\r\n function onResizeEnd(event, args){\r\n event.preventDefault();\r\n event.stopPropagation();\r\n localStorage.setItem( \"resize-tt-\" + args.id, args.width );\r\n }\r\n\r\n function getHeaderWidth(item){\r\n var width = localStorage.getItem(\"resize-tt-\" + slug(item));\r\n return width ? \"width: \" + width + \"px;\" : \"\";\r\n }\r\n\r\n vm.filterDate = filterDate;\r\n vm.filterTime = filterTime;\r\n vm.tableParams = ServerTableCmtsService.getTable();\r\n vm.updateFilteredCounts = updateFilteredCounts;\r\n\r\n function filterDate(key){\r\n\r\n var filter_by = {};\r\n if (vm.filters[key]){\r\n filter_by[key] = moment(vm.filters[key]).format(\"YYYY-MM-DD\");\r\n }\r\n\r\n updateFilteredCounts(key,filter_by[key]);\r\n\r\n }\r\n\r\n function filterTime(key){\r\n\r\n var filter_by = {};\r\n if (vm.filters[key]){\r\n \r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n\r\n filter_by[key] = moment(vm.filters[key]).format('hh:mm a')+' '+timezone_symbol;\r\n \r\n }\r\n \r\n updateFilteredCounts(key,filter_by[key]);\r\n\r\n }\r\n\r\n function checkStatus(row){\r\n return (row.isdelivered === 'booking' || row.isdelivered == 'n/a') ? 'N/A' : 'Undelivered'\r\n }\r\n\r\n function updateFilteredCounts(paramName, paramValue){ \r\n //Changing Field name to filter only\r\n paramName = paramName+'_filter';\r\n\r\n //$timeout(function () {\r\n //$rootScope.pageNumber = 1;\r\n TrackTraceCmtsPaginationService.save_page_number(1);\r\n \r\n var returnData = ServerTableCmtsService.getData('',paramName,paramValue);\r\n if(returnData){\r\n\r\n // To Avoid wrong page number highlight during ngTable Filter.\r\n vm.tableParams.page(TrackTraceCmtsPaginationService.get_page_number());\r\n\r\n vm.tableParams.reload();\r\n }\r\n\r\n //}, 500);\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n \r\n $timeout(function () {\r\n vm.tooltipIsLoading = false;\r\n }, 1000); \r\n\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsCmtsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n $scope.$on(\"ngTableParamsChanged\", function(){\r\n vm.tableParams = ServerTableCmtsService.getTable();\r\n vm.isEmpty = ServerTableCmtsService.isEmpty();\r\n vm.tableParams.reload();\r\n\r\n });\r\n\r\n $scope.$on(\"serverTable:stateChanged\", function(event, state) {\r\n vm.isLoading = state.loading;\r\n if(vm.isLoading === false){\r\n vm.tableParams.reload();\r\n }\r\n });\r\n\r\n $scope.$on(\"serverTable:loaded\", function(event, data, error, response) {\r\n /* Added by Abheesh */\r\n if(vm.query['reference_number']=='Global Search'){\r\n // // console.log('Global search');\r\n // vm.tableParams.data = TrackTraceService.getGlobalSearchData();\r\n data = JSON.parse(localStorage.getItem(\"globalSearchData\"));\r\n vm.tableParams['data'] = data;\r\n }\r\n if ($location.path().indexOf('/track-trace-cmts') === -1) return;\r\n // Check filters for actual values and tell our service that we are filtering\r\n angular.forEach(vm.tableParams.filter(), function(v, k) {\r\n var isFiltered = false;\r\n if (v != \"\" && v != null && v != undefined) {\r\n isFiltered = false;\r\n }\r\n\r\n //TrackTraceCmtsService.setResultsFiltered(isFiltered);\r\n });\r\n // Tell our service how many results we have total\r\n TrackTraceCmtsService.setResultsCount(vm.tableParams.total());\r\n ContactsService.setSubjectStatuses({trackTrace: {exceptions: response.exception_count + response.potential_exception_count > 0, results: true}});\r\n\r\n vm.noResults = !data || data.length == 0;\r\n vm.isError = !!error;\r\n vm.error = vm.isError ? error : \"\";\r\n });\r\n }\r\n\r\n\r\n}) ();\r\n\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk \r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License \r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name ServerTable.ngTableSorterRow\r\n * @description directive that sorts the rows of a table\r\n * @restrict E\r\n */\r\n\r\n(function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableSorterCmtsRowServerTable', ngTableSorterRow);\r\n\r\n ngTableSorterRow.$inject = [];\r\n\r\n function ngTableSorterRow(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/track-trace/track-trace-cmts/server-table/sorterHeader.html',\r\n scope: true,\r\n controller: 'ngTableSorterRowController'\r\n };\r\n return directive;\r\n }\r\n\r\n})();\r\n\n// /**\r\n// * ngTable: Table + Angular JS\r\n// *\r\n// * @author Vitalii Savchuk \r\n// * @url https://github.com/esvit/ng-table/\r\n// * @license New BSD License \r\n// */\r\n\r\n// /**\r\n// * @ngdoc directive\r\n// * @name ServerTable.ngTableFilterRowCmts\r\n// * @description directive that filters the rows of a table\r\n// * @restrict E\r\n// */\r\n\r\n (function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableFilterRowCmtsCview', ngTableFilterRowCmts);\r\n ngTableFilterRowCmts.$inject = [];\r\n\r\n function ngTableFilterRowCmts(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/track-trace/track-trace-cmts/server-table/filterHeader.html',\r\n scope: true,\r\n controller: 'ngTableFilterRowController'\r\n };\r\n return directive;\r\n }\r\n })();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.setColumnHeaders\r\n * @description sets the headers of the shipments table in track and trace\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.getColumnHeaders\r\n * @description gets the column headers variable\r\n */\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.setActiveColumns\r\n* @description setActiveColumns() set the activeColumns variable\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getActiveColumns\r\n* @description getActiveColumns() returns the active columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getDefaultColumns\r\n* @description getDefaultColumns() returns the default columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getAvailableColumns\r\n* @description getAvailableColumns returns the availableColumns\r\n*/\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('CustomResultsCmtsService', CustomResultsCmtsService);\r\n\r\n /** @ngInject */\r\n CustomResultsCmtsService.$inject = ['$log', '$http'];\r\n function CustomResultsCmtsService($log, $http) {\r\n\r\n var aljexColumns = [\r\n {field:\"load_status\", title: \"Load Status\", sortable: \"load_status\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true},\r\n\r\n {field:\"load_number\", title: \"Load #\", sortable: \"load_number\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"planned_start\", title: \"Planned Start\", sortable: \"planned_start\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"pickup_location\", title: \"Pick-up Location\", sortable: \"pickup_location\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"planned_end\", title: \"Planned End\", sortable: \"planned_end\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"delivery_location\", title: \"Delivery Location\", sortable: \"delivery_location\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"route_number\", title: \"Route Number\", sortable: \"route_number\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"total_gross_wt\", title: \"Total Gross Weight\", sortable: \"total_gross_wt\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"total_piece_count\", title: \"Total Piece Count\", sortable: \"total_piece_count\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"bol_number\", title: \"BOL #\", sortable: \"bol_number\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"pro_number\", title: \"Pro #\", sortable: \"pro_number\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true},\r\n {field:\"load_billing_invoice_status\", title: \"Billing Status\", sortable: \"load_billing_invoice_status\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true},\r\n {field:\"stop_count\", title: \"Stop Count\", sortable: \"stop_count\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"order_count\", title: \"Order Count\", sortable: \"order_count\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"trading_partner_carrier_name\", title: \"TP Carrier Name\", sortable: \"trading_partner_carrier_name\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"trading_partner_carrier_number\", title: \"TP Carrier Number\", sortable: \"trading_partner_carrier_number\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"transport_mode_name\", title: \"Transport Mode\", sortable: \"transport_mode_name\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true},\r\n {field:\"equipment_name\", title: \"Equipment Name\", sortable: \"equipment_name\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"trading_partner_client_name\", title: \"TP Client Name\", sortable: \"trading_partner_client_name\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"trading_partner_client_number\", title: \"TP Client Number\", sortable: \"trading_partner_client_number\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n\r\n {field:\"service_option_name\", title: \"Service Option\", sortable: \"service_option_name\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"total_invoice_amount\", title: \"Total Invoice Amount\", sortable: \"total_invoice_amount\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true}\r\n\r\n ];\r\n\r\n aljexColumns.map(function(d){\r\n if (d.field.indexOf('start') !== -1 || d.field.indexOf('end') !== -1) {\r\n d.filter[d.field] = '/app/track-trace/track-trace-cmts/server-table/filterDate.html';\r\n } else if (d.field.indexOf('time') !== -1) {\r\n d.filter[d.field] = '/app/track-trace/track-trace-cmts/server-table/filterTime.html';\r\n } else if (d.field == 'load_status' || d.field == 'load_billing_invoice_status'\r\n || d.field == 'transport_mode_name' || d.field == 'equipment_name'\r\n || d.field == 'service_option_name') {\r\n d.filter[d.field] = '/app/track-trace/track-trace-cmts/server-table/filterStatus.html';\r\n } else {\r\n d.filter[d.field] = '/app/track-trace/track-trace-cmts/server-table/filterDefault.html';\r\n }\r\n })\r\n\r\n var columnHeaders = [];\r\n\r\n var defaultAljexColumns = [\r\n {field:\"load_status\", title: \"SHIPMENT.STATUS_Aljex\"},\r\n {field:\"load_number\", title: \"Load #\"},\r\n {field:\"pro_number\", title: \"Pro #\"},\r\n {field:\"planned_start\", title: \"Planned Start\"},\r\n {field:\"planned_end\", title: \"Planned End\"},\r\n {field:\"pickup_location\", title: \"Pick-up Location\"},\r\n {field:\"delivery_location\", title: \"Delivery Location\"},\r\n {field:\"route_number\", title: \"Route Number\"}\r\n ];\r\n\r\n var activeAljexColumns = defaultAljexColumns;\r\n\r\n /* functions */\r\n function setColumnHeaders(activeCol) {\r\n\r\n columnHeaders.length = 0;\r\n aljexColumns.map(function(d){d.show = false});\r\n for (var j in activeAljexColumns){\r\n for (var i in aljexColumns) {\r\n if (activeAljexColumns[j].field === aljexColumns[i].field){\r\n aljexColumns[i].show = true;\r\n columnHeaders.push(aljexColumns[i]);\r\n }\r\n }\r\n }\r\n //columnHeaders.unshift({field:\"flag\", title: \"TRACKTRACE.EXCEPTION_HEADER\", show:true, tdClass: \"td-5\", class: \"td-5\", static: true});\r\n }\r\n\r\n function setActiveColumns(activeCol){\r\n activeAljexColumns = activeCol;\r\n }\r\n\r\n function setDefaultColumns(activeCol){\r\n activeAljexColumns = defaultAljexColumns;\r\n }\r\n\r\n setColumnHeaders(activeAljexColumns);\r\n\r\n return {\r\n setColumnHeaders: setColumnHeaders,\r\n getColumnHeaders: function() {\r\n return columnHeaders;\r\n },\r\n setActiveColumns: setActiveColumns,\r\n getActiveColumns: function() {\r\n return activeAljexColumns;\r\n },\r\n getDefaultColumns: function(){\r\n return defaultAljexColumns;\r\n },\r\n getAllColumns: function(){\r\n return aljexColumns;\r\n },\r\n getAvailableColumns: function() {\r\n return aljexColumns.filter(function(d){\r\n if (!d.show){\r\n return {\r\n field: d.field,\r\n title: d.title\r\n };\r\n }\r\n }).sort(function(a, b) {\r\n return a.title > b.title ? 1 : (a.title < b.title ? -1 : 0);\r\n });\r\n }\r\n };\r\n\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCmtsController.add\r\n * @description method adds a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCmtsController.remove\r\n * @description method removes a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCmtsController.dragListener\r\n * @description method that is the listener for drag events\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCmtsController.saveToDefault\r\n * @description method saves the layout to default\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCmtsController.submit\r\n * @description method submits the custom search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCmtsController.activeSearchChange\r\n * @description method called when the active search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCmtsController.availableSearchChange\r\n * @description method called when the available search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCmtsController.clickedActiveSearchX\r\n * @description method called the X by the activeSearchField is clicked and deletes the value in activeSearchField\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCmtsController.clickedAvailableSearchX\r\n * @description method called the X by the availableSearchField is clicked and deletes the value in availableSearchField\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('CustomizeResultsCmtsController', CustomizeResultsCmtsController);\r\n\r\n /** @ngInject */\r\n CustomizeResultsCmtsController.$inject = ['CustomResultsCmtsService', 'api', '$log', '$mdDialog', '$window','$http', '$mdToast', 'UserService', 'permissions'];\r\n function CustomizeResultsCmtsController(CustomResultsCmtsService, api, $log, $mdDialog, $window, $http, $mdToast,UserService, permissions) {\r\n\r\n /* variables */\r\n var vm = this;\r\n vm.user = UserService.getUserData();\r\n vm.activeColumns = CustomResultsCmtsService.getActiveColumns();\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.availableColumns = CustomResultsCmtsService.getAvailableColumns();\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns); //used for search of availableColumns\r\n vm.allColumns = CustomResultsCmtsService.getAllColumns();\r\n vm.availableSearchField = \"\";\r\n //need copies of the orignal lists for setting the service back if canceled\r\n vm.activeColumnsCopy = angular.copy(vm.activeColumns);\r\n\r\n vm.colHeight = colHeight();\r\n\r\n /* functions */\r\n vm.cancel = cancel;\r\n vm.add = add;\r\n vm.remove = remove;\r\n vm.dragListener = dragListener;\r\n vm.saveToDefault = saveToDefault;\r\n vm.restoreDefault = restoreDefault;\r\n vm.submit = submit;\r\n vm.availableSearchChange = availableSearchChange;\r\n vm.showToastWithFile = showToastWithFile\r\n vm.clickedAvailableSearchX = clickedAvailableSearchX;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n function cancel() {\r\n CustomResultsCmtsService.setActiveColumns(vm.activeColumnsCopy);\r\n $mdDialog.cancel();\r\n }\r\n\r\n colHeight();\r\n function colHeight() {\r\n //// console.log($window.innerHeight);\r\n return ($window.innerHeight * 0.5);\r\n }\r\n\r\n //add to the active column\r\n function add(column) {\r\n vm.activeColumns.push(column);\r\n var index = vm.availableColumns.indexOf(column);\r\n vm.availableColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n localStorage.setItem(\"mycmtscookie\", JSON.stringify(vm.activeColumns));\r\n }\r\n\r\n //remove from the active column\r\n function remove(column) {\r\n $log.debug(\"column name: \" + column.name + \" column width: \" + column.width);\r\n vm.availableColumns.push(column);\r\n var index = vm.activeColumns.indexOf(column);\r\n vm.activeColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n localStorage.setItem(\"mycmtscookie\", JSON.stringify(vm.activeColumns));\r\n }\r\n\r\n //function for the event when the active column is dragged\r\n function dragListener() {\r\n return {\r\n accept: function (sourceItemHandleScope, destSortableScope) {return true}, //override to determine drag is allowed or not. default is true.\r\n itemMoved: function () {\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n localStorage.setItem(\"mycmtscookie\", JSON.stringify(vm.activeColumns));\r\n },\r\n orderChanged: function() {},\r\n allowDuplicates: false //optional param allows duplicates to be dropped.\r\n }\r\n }\r\n\r\n function showToastWithFile(file, messages, delay) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: delay ? delay : 2000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/users/toast/' + file,\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n //saves the current custimization to default\r\n function saveToDefault() {\r\n\r\n $log.debug(\"save to default: \" + vm.activeColumns);\r\n var column_array =[]\r\n vm.activeColumns.forEach(function(element, index){\r\n column_array.push(element.field)\r\n })\r\n $http({\r\n method: 'PUT',\r\n url: api.url + '/users/'+vm.user.id+'/set_cmts_def_colms',\r\n data: {\r\n default_columns: column_array\r\n }\r\n }).success(function(response){\r\n showToastWithFile('default-columns-save-sucess.html', \"Default Columns Saved\");\r\n\r\n window.localStorage.removeItem('mycmtscookie');\r\n }).error(function(response){\r\n showToastWithFile('default-columns-save-error.html', \"Error saving Default Columns\");\r\n });\r\n }\r\n\r\n function restoreDefault(){\r\n\r\n vm.activeColumns = [\r\n {field:\"status\", title: \"SHIPMENT.STATUS_Aljex\"},\r\n {field:\"load_number\", title: \"Load #\"},\r\n {field:\"pro_number\", title: \"Pro #\"},\r\n {field:\"planned_start\", title: \"Planned Start\"},\r\n {field:\"pickup_location\", title: \"Pick-up Location\"},\r\n {field:\"planned_end\", title: \"Planned End\"},\r\n {field:\"delivery_location\", title: \"Delivery Location\"},\r\n {field:\"route_number\", title: \"Route Number\"}\r\n ];\r\n\r\n var onlyInA = vm.allColumns.filter(compare(vm.activeColumns));\r\n var onlyInB = vm.activeColumns.filter(compare(vm.allColumns));\r\n\r\n var result = onlyInA.concat(onlyInB);\r\n\r\n vm.availableColumns = angular.copy(result);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n saveToDefault();\r\n }\r\n\r\n //the submit button\r\n function submit() {\r\n $log.debug(\"submited \" + vm.activeColumns);\r\n CustomResultsCmtsService.setActiveColumns(vm.activeColumns);\r\n CustomResultsCmtsService.setColumnHeaders(vm.activeColumns); //sends the object\r\n $mdDialog.hide();\r\n }\r\n\r\n //changes the availableColumns to be shown based on what the search field is\r\n function availableSearchChange() {\r\n var results = [];\r\n var lcs = vm.availableSearchField.toLowerCase();\r\n for (var index = 0; index < vm.tempAvailableColumns.length; index++) {\r\n var name = vm.tempAvailableColumns[index].title.toLowerCase();\r\n if (name.indexOf(lcs) > -1) { //if the string contains the name\r\n results.push(vm.tempAvailableColumns[index]);\r\n }\r\n }\r\n vm.availableColumns = results;\r\n }\r\n\r\n\r\n //clears the available search field\r\n function clickedAvailableSearchX() {\r\n vm.availableSearchField = '';\r\n\r\n var onlyInA = vm.allColumns.filter(compare(vm.activeColumns));\r\n var onlyInB = vm.activeColumns.filter(compare(vm.allColumns));\r\n\r\n var result = onlyInA.concat(onlyInB);\r\n\r\n vm.tempAvailableColumns = angular.copy(result);\r\n\r\n vm.availableSearchChange();\r\n }\r\n\r\n function compare(otherArray){\r\n return function(current){\r\n return otherArray.filter(function(other){\r\n return other.field == current.field\r\n }).length == 0;\r\n }\r\n }\r\n\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('ServerTableCfsService', ServerTableCfsService);\r\n\r\n /** @ngInject */\r\n ServerTableCfsService.$inject = ['ngTableDefaults' ,'$location' ,'$filter', '$timeout', '$rootScope', '$q', '$http', '$log', 'api', 'NgTableParams', \"TrackTraceCfsService\", 'AdvSearchCfsService', 'UserService', 'TrackTraceCfsPaginationService', 'CustomResultsCfsService'];\r\n function ServerTableCfsService(ngTableDefaults, $location ,$filter, $timeout, $rootScope, $q, $http, $log, api, NgTableParams, TrackTraceCfsService, AdvSearchCfsService, UserService, TrackTraceCfsPaginationService, CustomResultsCfsService) {\r\n\r\n $rootScope.ngTableChanges = 0 ;\r\n $rootScope.shipmentData = '';\r\n $rootScope.resp = '';\r\n $rootScope.total = 0;\r\n\r\n var table_filters = {};\r\n\r\n var query = {},\r\n data,\r\n isEmpty = true,\r\n // ngTable = genTable(),\r\n state = {\r\n loading: false\r\n },\r\n timeoutPromise,\r\n searchRequest,\r\n query = AdvSearchCfsService.getCurrentSearch(),\r\n ngTable = new NgTableParams(\r\n {\r\n\r\n }, {\r\n counts: [10,25,50,100]\r\n });\r\n\r\n // *** TURNED THIS FEATURE OFF TO MAKE ALL TABLES HAVE UNIFORM COUNTS\r\n // var pageSizes = [\r\n // { label: \"5 10 20\", sizes: [5,10,20] },\r\n // { label: \"10 20 50\", sizes: [10,20,50] }\r\n // ];\r\n var defaultSettings = {\r\n counts: [10,25,50,100],\r\n defaultSort: \"asc\",\r\n filterOptions: {\r\n filterComparator: true\r\n }\r\n };\r\n\r\n var initialSorting = [\r\n { label: \"Id ASC\", value: { id: \"asc\"} },\r\n { label: \"Id DESC\", value: { id: \"desc\"} },\r\n { label: \"Name ASC\", value: { name: \"asc\"} },\r\n { label: \"Name DESC\", value: { name: \"desc\"} }\r\n ];\r\n var initialParams = {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n sorting: undefined\r\n };\r\n\r\n function genTable(){\r\n return new NgTableParams(\r\n {\r\n\r\n }, {\r\n counts: [10,25,50,100],\r\n getData: getData\r\n });\r\n }\r\n\r\n\r\n\r\n\r\n function sortFields(orderBy, sorting){\r\n var result = [];\r\n for (var i in orderBy){\r\n if (!isNaN(+i)){\r\n var x = orderBy[i].replace(/[+-]/g,\"\");\r\n var p = {};\r\n p[x] = sorting[x];\r\n result.push(p);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function getQuery() {return query;}\r\n\r\n function getData(params, queryParameterName, queryParameterValue, sort_params ){\r\n\r\n if(queryParameterName){\r\n table_filters[queryParameterName] = queryParameterValue; \r\n }\r\n\r\n query = AdvSearchCfsService.getCurrentSearch();\r\n \r\n var search = {};\r\n var new_url = {};\r\n\r\n // from dount chart dashboard[Aljex] page.\r\n if($location.search().page_from == 'aljex'){\r\n\r\n for (var r in $location.search()){\r\n search = $location.search();\r\n }\r\n \r\n }\r\n\r\n if (params && params['invalidate_cache'] === true || localStorage.getItem('invalidateCache') === 'true'){\r\n search['invalidate_cache'] = true;\r\n localStorage.setItem('invalidateCache', false);\r\n\r\n //myurl = '';\r\n //query = {};\r\n //table_filters = {};\r\n\r\n //TrackTraceCfsPaginationService.save_page_number(1);\r\n //TrackTraceCfsPaginationService.save_per_page(10);\r\n }\r\n if (sort_params && sort_params['key'] && sort_params['criteria'])\r\n {\r\n localStorage.setItem('sort_key', sort_params['key']);\r\n localStorage.setItem('sort_criteria', sort_params['criteria']);\r\n }\r\n else if (localStorage.getItem('sort_key') && localStorage.getItem('sort_criteria'))\r\n {\r\n var sort_params = {key: localStorage.getItem('sort_key'), criteria: localStorage.getItem('sort_criteria')}\r\n }\r\n\r\n state.loading = true;\r\n $rootScope.$broadcast(\"serverTable:stateChanged\", state);\r\n \r\n\r\n /*var column_header = [];\r\n\r\n var columns = CustomResultsCfsService.getActiveColumns();\r\n\r\n if(columns){\r\n if(columns.length > 0){\r\n for(var i =0; i < columns.length; i++ ){\r\n column_header.push(columns[i].field);\r\n }\r\n }\r\n }\r\n //debugger;\r\n if(myurl){\r\n if(myurl.split('?')[1].length > 0){\r\n var keyval = myurl.split('?')[1].split('&');\r\n\r\n if(keyval.length > 0){\r\n for(var x=0,y=keyval.length; x'+ queryParameterName);\r\n if(keyval[x].split('=')[0] != queryParameterName){\r\n //if((column_header.indexOf(keyval[x].split('=')[0]) !== -1) ){\r\n search[keyval[x].split('=')[0]] = keyval[x].split('=')[1];\r\n //}\r\n }\r\n\r\n }\r\n }\r\n }\r\n }*/\r\n\r\n for (var r in table_filters){\r\n search[r] = table_filters[r];\r\n }\r\n\r\n for (var q in query){\r\n if(q == 'quick_filter'){\r\n search['current_exception'] = 1;\r\n }else{\r\n search[q] = query[q];\r\n } \r\n }\r\n\r\n for (var q in sort_params){\r\n search[q] = sort_params[q];\r\n }\r\n\r\n //To clean[remove] null and undefined params values\r\n for (var propName in search) {\r\n if (search[propName] === null || search[propName] === undefined || search[propName] === '' ) {\r\n delete search[propName];\r\n }\r\n }\r\n\r\n var page_number = TrackTraceCfsPaginationService.get_page_number();\r\n var per_page = TrackTraceCfsPaginationService.get_per_page();\r\n\r\n search.page = page_number;\r\n search.per_page = per_page;\r\n\r\n new_url.page = page_number;\r\n new_url.per_page = per_page;\r\n \r\n // URL Rewriting with new params\r\n //$location.search(new_url);\r\n \r\n return TrackTraceCfsService.queryShipments(search, timeoutPromise, sort_params).then(\r\n function(resp){\r\n \r\n if (resp && ![422, 500, 503].every(function(status){ return status != resp.status;})){\r\n resp.total = 0;\r\n resp.error = \"The search returned no results.\";\r\n }\r\n\r\n if(query['reference_number']=='Global Search'){\r\n resp.shipments = JSON.parse(localStorage.getItem(\"globalSearchData\")); \r\n resp.shipments = resp.shipments.slice((page_number - 1) * per_page, page_number * per_page); \r\n resp.total = localStorage.getItem(\"globalSearchCount\");\r\n }\r\n\r\n isEmpty = resp.shipments.length == 0;\r\n state.loading = false;\r\n var error = resp.error ? resp.error : undefined;\r\n\r\n ngTable.page(page_number);\r\n ngTable.count(per_page);\r\n \r\n $rootScope.shipmentData = resp.shipments;\r\n $rootScope.resp = resp;\r\n $rootScope.total = parseInt(resp.total);\r\n\r\n $rootScope.ngTableChanges = $rootScope.ngTableChanges + 1;\r\n\r\n // somewhere URL is overriding, to avoid written again.\r\n //$location.search(search);\r\n\r\n return resp.shipments;\r\n });\r\n }\r\n\r\n $rootScope.$watch('ngTableChanges', function(newValue, oldValue) {\r\n \r\n var error = undefined;\r\n\r\n ngTable = new NgTableParams(\r\n {\r\n page: TrackTraceCfsPaginationService.get_page_number(),\r\n count: TrackTraceCfsPaginationService.get_per_page(), // count per page\r\n }, {\r\n total: $rootScope.total, // length of data\r\n getData: function ($defer, params) {\r\n params.total($rootScope.total);\r\n\r\n //var filtered_data = $filter('filter')($rootScope.shipmentData, params.filter());\r\n //var ordered_data = $filter('orderBy')($rootScope.shipmentData, params.orderBy());\r\n\r\n $defer.resolve($rootScope.shipmentData);\r\n\r\n }\r\n });\r\n\r\n ngTable.reload();\r\n\r\n $rootScope.$broadcast(\"serverTable:stateChanged\", state);\r\n $rootScope.$broadcast(\"serverTable:loaded\", $rootScope.shipmentData, error, $rootScope.resp);\r\n AdvSearchCfsService.clearTimeout();\r\n\r\n });\r\n\r\n return {\r\n getState: function(){return state;},\r\n // genTable: genTable,\r\n sortFields: sortFields,\r\n getData: getData,\r\n getParams: function(){\r\n return ngTable.parameters();\r\n },\r\n isEmpty: function(){return isEmpty;},\r\n getTable: function(){ return ngTable;},\r\n getTableParams: function(){return ngTable;},\r\n reloadTable: function(){\r\n\r\n $rootScope.$broadcast(\"ngTableParamsChanged\", ngTableDefaults);\r\n\r\n //$timeout(function () {\r\n //ngTable.page(1);\r\n //ngTable.count(10);\r\n //ngTable.reload();\r\n\r\n return getData({\"invalidate_cache\":true});\r\n //}, 500);\r\n\r\n //return getData({\"invalidate_cache\":true});\r\n //\r\n //return ngTable.reload();\r\n },\r\n getQuery: getQuery,\r\n setQuery: function() {\r\n if (searchRequest){\r\n timeoutPromise.resolve('newSearch');\r\n timeoutPromise = $q.defer();\r\n } else {\r\n timeoutPromise = $q.defer();\r\n }\r\n ngTableDefaults.settings = angular.extend({}, ngTableDefaults.settings, defaultSettings);\r\n ngTableDefaults.params = angular.extend({}, ngTableDefaults.params, initialParams);\r\n $rootScope.$broadcast(\"ngTableParamsChanged\", ngTableDefaults);\r\n searchRequest = getData();\r\n return searchRequest;\r\n }\r\n };\r\n }\r\n\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name ServerTableController.getData()\r\n * @description method retrieves data from the AdvSearchService to generate the table\r\n * @param {params} - provides an object of parameters to the server, this is a function that\r\n * exposes many table parameters.\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('ServerTableCfsController', ServerTableCfsController);\r\n\r\n /** @ngInject */\r\n\r\n ServerTableCfsController.$inject = ['$scope','$rootScope','$stateParams' ,'$http', '$timeout' , '$resource', '$location', 'TrackTraceCfsService','CustomResultsCfsService', '$translatePartialLoader', '$log', '$filter', '$translate', 'NgTableParams', 'ServerTableCfsService', '$q', 'ContactsService', 'ShippingDetailsCfsService', 'slug', 'TrackTraceCfsPaginationService', 'mdSelectHelper'];\r\n function ServerTableCfsController($scope,$rootScope,$stateParams ,$http, $timeout , $resource, $location, TrackTraceCfsService, CustomResultsCfsService, $translatePartialLoader,$log, $filter, $translate, NgTableParams, ServerTableCfsService, $q, ContactsService, ShippingDetailsCfsService, slug, TrackTraceCfsPaginationService, mdSelectHelper) {\r\n\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('shipment');\r\n $translatePartialLoader.addPart('tracktrace');\r\n /* Variables */\r\n var vm = this;\r\n vm.query = {};\r\n vm.response = {};\r\n vm.isEmpty = ServerTableCfsService.isEmpty();\r\n vm.filters = {shipdate: \"\", duedate: \"\"}\r\n vm.query = ServerTableCfsService.getQuery();\r\n\r\n $scope.$watch('vm.query', function(){\r\n vm.query;\r\n vm.isLoading = true;\r\n ServerTableCfsService.setQuery();\r\n }, true);\r\n\r\n vm.columns = CustomResultsCfsService.getColumnHeaders();\r\n\r\n vm.filtersVisible = false;\r\n vm.isLoading = false;\r\n vm.checkStatus = checkStatus;\r\n\r\n vm.aljex_per_page = aljex_per_page;\r\n vm.aljex_page_number = aljex_page_number;\r\n\r\n /* Function call for Tooltip exceptions */\r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n $scope.getHeaderWidth = getHeaderWidth;\r\n vm.tableParams = ServerTableCfsService.getTable();\r\n $scope.sortClickable = sortClickable;\r\n $scope.aljexSortBy = aljexSortBy;\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n vm.getStatusColors = getStatusColors;\r\n\r\n vm.getStatusColors();\r\n\r\n $scope.$on(\"angular-resizable.resizeEnd\", onResizeEnd);\r\n $scope.$on(\"angular-resizable.resizeStart\", function(event){\r\n event.preventDefault();\r\n event.stopPropagation();\r\n });\r\n\r\n function getStatusColors(){\r\n\r\n vm.status_colors = ShippingDetailsCfsService.getStatusColors();\r\n\r\n }\r\n\r\n function aljex_page_number(paginate_no){\r\n\r\n var queries = $location.search();\r\n queries.page = paginate_no;\r\n $location.search(queries);\r\n\r\n TrackTraceCfsPaginationService.save_page_number(paginate_no);\r\n ServerTableCfsService.getData();\r\n\r\n }\r\n\r\n function aljex_per_page(paginate_record){\r\n\r\n var queries = $location.search();\r\n queries.per_page = paginate_record;\r\n $location.search(queries);\r\n\r\n TrackTraceCfsPaginationService.save_per_page(paginate_record);\r\n\r\n var returnData = ServerTableCfsService.getData();\r\n\r\n /*if(returnData){\r\n // To Avoid wrong page number highligh during page count change.\r\n vm.tableParams.page($rootScope.pageNumber);\r\n vm.tableParams.reload();\r\n }*/\r\n\r\n }\r\n\r\n function sortClickable(event){\r\n return event.target.parentElement.className != \"rg-right\";\r\n }\r\n\r\n function aljexSortBy($column, event) {\r\n var parsedSortable = $column.sortable && $column.sortable();\r\n if (!parsedSortable) {\r\n return;\r\n }\r\n var defaultSort = vm.tableParams.settings().defaultSort;\r\n //var defaultSort = $scope.params.settings().defaultSort;\r\n var inverseSort = (defaultSort === 'asc' ? 'desc' : 'asc');\r\n var sorting = vm.tableParams.sorting() && vm.tableParams.sorting()[parsedSortable] && (vm.tableParams.sorting()[parsedSortable] === defaultSort);\r\n var sortingParams = (event.ctrlKey || event.metaKey) ? vm.tableParams.sorting() : {};\r\n sortingParams[parsedSortable] = (sorting ? inverseSort : defaultSort);\r\n vm.tableParams.parameters({\r\n sorting: sortingParams\r\n });\r\n var sort_params = {key: parsedSortable, criteria: sortingParams[parsedSortable]}\r\n var returnData = ServerTableCfsService.getData('','','', sort_params);\r\n if(returnData){\r\n vm.tableParams.page(TrackTraceCfsPaginationService.get_page_number());\r\n vm.tableParams.reload();\r\n }\r\n }\r\n\r\n function onResizeEnd(event, args){\r\n event.preventDefault();\r\n event.stopPropagation();\r\n localStorage.setItem( \"resize-tt-\" + args.id, args.width );\r\n }\r\n\r\n function getHeaderWidth(item){\r\n var width = localStorage.getItem(\"resize-tt-\" + slug(item));\r\n return width ? \"width: \" + width + \"px;\" : \"\";\r\n }\r\n\r\n vm.filterDate = filterDate;\r\n vm.filterTime = filterTime;\r\n vm.tableParams = ServerTableCfsService.getTable();\r\n vm.updateFilteredCounts = updateFilteredCounts;\r\n\r\n function filterDate(key){\r\n\r\n var filter_by = {};\r\n if (vm.filters[key]){\r\n filter_by[key] = moment(vm.filters[key]).format(\"YYYY-MM-DD\");\r\n }\r\n\r\n updateFilteredCounts(key,filter_by[key]);\r\n\r\n }\r\n\r\n function filterTime(key){\r\n\r\n var filter_by = {};\r\n if (vm.filters[key]){\r\n\r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n\r\n filter_by[key] = moment(vm.filters[key]).format('hh:mm a')+' '+timezone_symbol;\r\n\r\n }\r\n\r\n updateFilteredCounts(key,filter_by[key]);\r\n\r\n }\r\n\r\n function checkStatus(row){\r\n return (row.isdelivered === 'booking' || row.isdelivered == 'n/a') ? 'N/A' : 'Undelivered'\r\n }\r\n\r\n function updateFilteredCounts(paramName, paramValue){\r\n //Changing Field name to filter only\r\n paramName = paramName+'_filter';\r\n\r\n //$timeout(function () {\r\n //$rootScope.pageNumber = 1;\r\n TrackTraceCfsPaginationService.save_page_number(1);\r\n\r\n var returnData = ServerTableCfsService.getData('',paramName,paramValue);\r\n if(returnData){\r\n\r\n // To Avoid wrong page number highlight during ngTable Filter.\r\n vm.tableParams.page(TrackTraceCfsPaginationService.get_page_number());\r\n\r\n vm.tableParams.reload();\r\n }\r\n\r\n //}, 500);\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n\r\n $timeout(function () {\r\n vm.tooltipIsLoading = false;\r\n }, 1000);\r\n\r\n ShippingDetailsCfsService.getShipment(number).then(function(resp){\r\n var codeArray = [];\r\n var descArray = [];\r\n resp.exceptions.forEach(function(item, index, array){\r\n if(!codeArray.includes(item.code)){\r\n codeArray.push(item.code);\r\n }\r\n if(!descArray.includes(item.description)){\r\n descArray.push(item.description);\r\n }\r\n });\r\n vm.response = {\"code\": codeArray.join(\", \"), \"description\": descArray.join(\", \")};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsCfsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n $scope.$on(\"ngTableParamsChanged\", function(){\r\n vm.tableParams = ServerTableCfsService.getTable();\r\n vm.isEmpty = ServerTableCfsService.isEmpty();\r\n vm.tableParams.reload();\r\n\r\n });\r\n\r\n $scope.$on(\"serverTable:stateChanged\", function(event, state) {\r\n vm.isLoading = state.loading;\r\n if(vm.isLoading === false){\r\n vm.tableParams.reload();\r\n }\r\n });\r\n\r\n $scope.$on(\"serverTable:loaded\", function(event, data, error, response) {\r\n /* Added by Abheesh */\r\n if(vm.query['reference_number']=='Global Search'){\r\n // // console.log('Global search');\r\n // vm.tableParams.data = TrackTraceService.getGlobalSearchData();\r\n data = JSON.parse(localStorage.getItem(\"globalSearchData\"));\r\n vm.tableParams['data'] = data;\r\n }\r\n if ($location.path().indexOf('/track-trace-cfs') === -1) return;\r\n // Check filters for actual values and tell our service that we are filtering\r\n angular.forEach(vm.tableParams.filter(), function(v, k) {\r\n var isFiltered = false;\r\n if (v != \"\" && v != null && v != undefined) {\r\n isFiltered = false;\r\n }\r\n\r\n //TrackTraceCfsService.setResultsFiltered(isFiltered);\r\n });\r\n // Tell our service how many results we have total\r\n TrackTraceCfsService.setResultsCount(vm.tableParams.total());\r\n ContactsService.setSubjectStatuses({trackTrace: {exceptions: response.exception_count + response.potential_exception_count > 0, results: true}});\r\n\r\n vm.noResults = !data || data.length == 0;\r\n vm.isError = !!error;\r\n vm.error = vm.isError ? error : \"\";\r\n });\r\n }\r\n\r\n\r\n}) ();\r\n\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk \r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License \r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name ServerTable.ngTableSorterRow\r\n * @description directive that sorts the rows of a table\r\n * @restrict E\r\n */\r\n\r\n(function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableSorterAljexRowServerTable', ngTableSorterRow);\r\n\r\n ngTableSorterRow.$inject = [];\r\n\r\n function ngTableSorterRow(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/track-trace/track-trace-cfs/server-table/sorterHeader.html',\r\n scope: true,\r\n controller: 'ngTableSorterRowController'\r\n };\r\n return directive;\r\n }\r\n\r\n})();\r\n\n// /**\r\n// * ngTable: Table + Angular JS\r\n// *\r\n// * @author Vitalii Savchuk \r\n// * @url https://github.com/esvit/ng-table/\r\n// * @license New BSD License \r\n// */\r\n\r\n// /**\r\n// * @ngdoc directive\r\n// * @name ServerTable.ngTableFilterRowAljex\r\n// * @description directive that filters the rows of a table\r\n// * @restrict E\r\n// */\r\n\r\n (function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableFilterRowAljexCview', ngTableFilterRowAljex);\r\n ngTableFilterRowAljex.$inject = [];\r\n\r\n function ngTableFilterRowAljex(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: 'app/track-trace/track-trace-cfs/server-table/filterHeader.html',\r\n scope: true,\r\n controller: 'ngTableFilterRowController'\r\n };\r\n return directive;\r\n }\r\n })();\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.setColumnHeaders\r\n * @description sets the headers of the shipments table in track and trace\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.getColumnHeaders\r\n * @description gets the column headers variable\r\n */\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.setActiveColumns\r\n* @description setActiveColumns() set the activeColumns variable\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getActiveColumns\r\n* @description getActiveColumns() returns the active columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getDefaultColumns\r\n* @description getDefaultColumns() returns the default columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getAvailableColumns\r\n* @description getAvailableColumns returns the availableColumns\r\n*/\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('CustomResultsCfsService', CustomResultsCfsService);\r\n\r\n /** @ngInject */\r\n CustomResultsCfsService.$inject = ['$log', '$http'];\r\n function CustomResultsCfsService($log, $http) {\r\n\r\n var aljexColumns = [\r\n\r\n {field:\"status\", title: \"SHIPMENT.STATUS_Aljex\", sortable: \"status\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true},\r\n\r\n {field:\"deliverydate\", title: \"DELIVERY DATE\", sortable: \"deliverydate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"deliverytime\", title: \"DELIVERY TIME\", sortable: \"deliverytime\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"signedby\", title: \"SHIPMENT.SIGNEDBY_Aljex\", sortable: \"signedby\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"lastcheckcalldetails_new\", title: \"SHIPMENT.LASTCHECKCALL_CSL\", sortable: \"lastcheckcalldetails\", filter: {}, show:false, tdClass: \"td-25\", class: \"td-25\", static: true},\r\n\r\n {field:\"lastcheckcallstatus\", title: \"SHIPMENT.LASTCHECKCALLSTATUS_Aljex\", sortable: \"lastcheckcallstatus\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"lastcheckcallstate\", title: \"SHIPMENT.LASTCHECKCALLSTATE_Aljex\", sortable: \"lastcheckcallstate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"numberofpicks\", title: \"PICK(S) - Number of Picks\", sortable: \"numberofpicks\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"numberofstops\", title: \"STOP(S) - Number of Stops\", sortable: \"numberofstops\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"bol\", title: \"SHIPMENT.BOL_Aljex\", sortable: \"bol\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"reference\", title: \"SHIPMENT.REF_Aljex\", sortable: \"reference\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true},\r\n {field:\"pro\", title: \"SHIPMENT.PRO_Aljex\", sortable: \"pro\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true},\r\n {field:\"load\", title: \"SHIPMENT.LOAD_Aljex\", sortable: \"load\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"containertrailer\", title: \"SHIPMENT.CONTAINERTRAILER_Aljex\", sortable: \"containertrailer\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"truck\", title: \"SHIPMENT.TRUCK_Aljex\", sortable: \"truck\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"pickupappointmentdatetime_new\", title: \"SHIPMENT.PICKUP_APPT_CSL\", sortable: \"pickupappointmentdatetime\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"deliverydatetime_new\", title: \"SHIPMENT.DELIVERYDATE_Aljex\", sortable: \"deliverydatetime\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"pickupname\", title: \"SHIPMENT.PICKUPNAME_Aljex\", sortable: \"pickupname\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"pickupzipcode\", title: \"SHIPMENT.PICKUPZIPCODE_Aljex\", sortable: \"pickupzipcode\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"pickupaddress\", title: \"SHIPMENT.PICKUPADDRESS_Aljex\", sortable: \"pickupaddress\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"pickupaddressline2\", title: \"SHIPMENT.PICKUPADDRESSLINE2_Aljex\", sortable: \"pickupaddressline2\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n\r\n {field:\"consigneeapptdatetime_new\", title: \"SHIPMENT.delivery_csl\", sortable: \"consigneeapptdatetime\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"consigneename\", title: \"SHIPMENT.CONSIGNEENAME_Aljex\", sortable: \"consigneename\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneezipcode\", title: \"SHIPMENT.CONSIGNEEZIPCODE_Aljex\", sortable: \"consigneezipcode\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"consigneeaddress\", title: \"SHIPMENT.CONSIGNEEADDRESS_Aljex\", sortable: \"consigneeaddress\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"consigneeaddressline2\", title: \"SHIPMENT.CONSIGNEEADDRESSLINE2_Aljex\", sortable: \"consigneeaddressline2\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n\r\n {field:\"equipmenttype\", title: \"SHIPMENT.EQUIPMENT_TYPE\", sortable: \"equipmenttype\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"billeddate\", title: \"SHIPMENT.BILLEDDATE_Aljex\", sortable: \"billeddate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"shipdate\", title: \"SHIPMENT.SHIPDATE_Aljex\", sortable: \"shipdate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"totalpieces\", title: \"SHIPMENT.TOTALPIECES_Aljex\", sortable: \"totalpieces\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"loadeddate\", title: \"SHIPMENT.LOADEDDATE_Aljex\", sortable: \"loadeddate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"origincitystate\", title: \"SHIPMENT.PICKUP_CSL\", sortable: \"origincitystate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n\r\n {field:\"destinationcitystate\", title: \"SHIPMENT.DESTINATION_CSL\", sortable: \"destinationcitystate\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n\r\n {field:\"invoicetotal\", title: \"SHIPMENT.INVOICETOTAL_Aljex\", sortable: \"invoicetotal\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"weight\", title: \"SHIPMENT.TOTALGROSSWEIGHT_Aljex\", sortable: \"weight\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"revenuecode\", title: \"REVENUE CODE\", sortable: \"revenuecode\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", static: true}\r\n\r\n ];\r\n\r\n aljexColumns.map(function(d){\r\n if (d.field.indexOf('date') !== -1) {\r\n d.filter[d.field] = '/app/track-trace/track-trace-cfs/server-table/filterDate.html';\r\n } else if (d.field.indexOf('time') !== -1) {\r\n d.filter[d.field] = '/app/track-trace/track-trace-cfs/server-table/filterTime.html';\r\n } else if (d.field == 'status' ) {\r\n d.filter[d.field] = '/app/track-trace/track-trace-cfs/server-table/filterStatus.html';\r\n } else if (d.field == 'milestone'){\r\n d.filter[d.field] = '/app/track-trace/track-trace-cfs/server-table/filterMilestone.html';\r\n } else {\r\n d.filter[d.field] = '/app/track-trace/track-trace-cfs/server-table/filterDefault.html';\r\n }\r\n })\r\n\r\n var columnHeaders = [];\r\n\r\n var defaultAljexColumns = [\r\n {field:\"status\", title: \"SHIPMENT.STATUS_Aljex\"},\r\n {field:\"pro\", title: \"SHIPMENT.PRO_Aljex\"},\r\n {field:\"reference\", title: \"SHIPMENT.REF_Aljex\"},\r\n {field:\"pickupappointmentdatetime_new\", title: \"SHIPMENT.PICKUP_APPT_CSL\"},\r\n {field:\"origincitystate\", title: \"SHIPMENT.PICKUP_CSL\"},\r\n {field:\"consigneeapptdatetime_new\", title: \"SHIPMENT.delivery_csl\"},\r\n {field:\"destinationcitystate\", title: \"SHIPMENT.DESTINATION_CSL\"},\r\n {field:\"deliverydatetime_new\", title: \"DELIVERYDATE_Aljex\"},\r\n {field:\"lastcheckcalldetails_new\", title: \"SHIPMENT.LASTCHECKCALL_CSL\"}\r\n ];\r\n\r\n var activeAljexColumns = defaultAljexColumns;\r\n\r\n /* functions */\r\n function setColumnHeaders(activeCol) {\r\n\r\n columnHeaders.length = 0;\r\n aljexColumns.map(function(d){d.show = false});\r\n for (var j in activeAljexColumns){\r\n for (var i in aljexColumns) {\r\n if (activeAljexColumns[j].field === aljexColumns[i].field){\r\n aljexColumns[i].show = true;\r\n columnHeaders.push(aljexColumns[i]);\r\n }\r\n }\r\n }\r\n columnHeaders.unshift({field:\"flag\", title: \"TRACKTRACE.EXCEPTION_HEADER\", show:true, tdClass: \"td-5\", class: \"td-5\", static: true});\r\n }\r\n\r\n function setActiveColumns(activeCol){\r\n activeAljexColumns = activeCol;\r\n }\r\n\r\n function setDefaultColumns(activeCol){\r\n activeAljexColumns = defaultAljexColumns;\r\n }\r\n\r\n setColumnHeaders(activeAljexColumns);\r\n\r\n return {\r\n setColumnHeaders: setColumnHeaders,\r\n getColumnHeaders: function() {\r\n return columnHeaders;\r\n },\r\n setActiveColumns: setActiveColumns,\r\n getActiveColumns: function() {\r\n return activeAljexColumns;\r\n },\r\n getDefaultColumns: function(){\r\n return defaultAljexColumns;\r\n },\r\n getAllColumns: function(){\r\n return aljexColumns;\r\n },\r\n getAvailableColumns: function() {\r\n return aljexColumns.filter(function(d){\r\n if (!d.show){\r\n return {\r\n field: d.field,\r\n title: d.title\r\n };\r\n }\r\n }).sort(function(a, b) {\r\n return a.title > b.title ? 1 : (a.title < b.title ? -1 : 0);\r\n });\r\n }\r\n };\r\n\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCfsController.add\r\n * @description method adds a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCfsController.remove\r\n * @description method removes a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCfsController.dragListener\r\n * @description method that is the listener for drag events\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCfsController.saveToDefault\r\n * @description method saves the layout to default\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCfsController.submit\r\n * @description method submits the custom search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCfsController.activeSearchChange\r\n * @description method called when the active search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCfsController.availableSearchChange\r\n * @description method called when the available search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCfsController.clickedActiveSearchX\r\n * @description method called the X by the activeSearchField is clicked and deletes the value in activeSearchField\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsCfsController.clickedAvailableSearchX\r\n * @description method called the X by the availableSearchField is clicked and deletes the value in availableSearchField\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('CustomizeResultsCfsController', CustomizeResultsCfsController);\r\n\r\n /** @ngInject */\r\n CustomizeResultsCfsController.$inject = ['CustomResultsCfsService', 'api', '$log', '$mdDialog', '$window','$http', '$mdToast', 'UserService', 'permissions'];\r\n function CustomizeResultsCfsController(CustomResultsCfsService, api, $log, $mdDialog, $window, $http, $mdToast,UserService, permissions) {\r\n\r\n /* variables */\r\n var vm = this;\r\n vm.user = UserService.getUserData();\r\n vm.activeColumns = CustomResultsCfsService.getActiveColumns();\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.availableColumns = CustomResultsCfsService.getAvailableColumns();\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns); //used for search of availableColumns\r\n vm.allColumns = CustomResultsCfsService.getAllColumns();\r\n vm.availableSearchField = \"\";\r\n //vm.activeSearchField = \"\";\r\n //need copies of the orignal lists for setting the service back if canceled\r\n vm.activeColumnsCopy = angular.copy(vm.activeColumns);\r\n\r\n vm.colHeight = colHeight();\r\n\r\n /* functions */\r\n vm.cancel = cancel;\r\n vm.add = add;\r\n vm.remove = remove;\r\n vm.dragListener = dragListener;\r\n vm.saveToDefault = saveToDefault;\r\n vm.restoreDefault = restoreDefault;\r\n vm.submit = submit;\r\n //vm.activeSearchChange = activeSearchChange;\r\n vm.availableSearchChange = availableSearchChange;\r\n vm.showToastWithFile = showToastWithFile\r\n //vm.clickedActiveSearchX = clickedActiveSearchX;\r\n vm.clickedAvailableSearchX = clickedAvailableSearchX;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n function cancel() {\r\n CustomResultsCfsService.setActiveColumns(vm.activeColumnsCopy);\r\n $mdDialog.cancel();\r\n }\r\n\r\n colHeight();\r\n function colHeight() {\r\n //// console.log($window.innerHeight);\r\n return ($window.innerHeight * 0.5);\r\n }\r\n\r\n //add to the active column\r\n function add(column) {\r\n vm.activeColumns.push(column);\r\n var index = vm.availableColumns.indexOf(column);\r\n vm.availableColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n localStorage.setItem(\"mycfscookie\", JSON.stringify(vm.activeColumns));\r\n }\r\n\r\n //remove from the active column\r\n function remove(column) {\r\n $log.debug(\"column name: \" + column.name + \" column width: \" + column.width);\r\n vm.availableColumns.push(column);\r\n var index = vm.activeColumns.indexOf(column);\r\n vm.activeColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n localStorage.setItem(\"mycfscookie\", JSON.stringify(vm.activeColumns));\r\n }\r\n\r\n //function for the event when the active column is dragged\r\n function dragListener() {\r\n return {\r\n accept: function (sourceItemHandleScope, destSortableScope) {return true}, //override to determine drag is allowed or not. default is true.\r\n itemMoved: function () {\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n localStorage.setItem(\"mycfscookie\", JSON.stringify(vm.activeColumns));\r\n },\r\n orderChanged: function() {},\r\n allowDuplicates: false //optional param allows duplicates to be dropped.\r\n }\r\n }\r\n\r\n function showToastWithFile(file, messages, delay) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: delay ? delay : 2000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/users/toast/' + file,\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n //saves the current custimization to default\r\n function saveToDefault() {\r\n\r\n $log.debug(\"save to default: \" + vm.activeColumns);\r\n var column_array =[]\r\n vm.activeColumns.forEach(function(element, index){\r\n column_array.push(element.field)\r\n })\r\n $http({\r\n method: 'PUT',\r\n url: api.url + '/users/'+vm.user.id+'/set_aljex_def_colms',\r\n data: {\r\n default_columns: column_array\r\n }\r\n }).success(function(response){\r\n showToastWithFile('default-columns-save-sucess.html', \"Default Columns Saved\");\r\n window.localStorage.removeItem('mycfscookie');\r\n }).error(function(response){\r\n showToastWithFile('default-columns-save-error.html', \"Error saving Default Columns\");\r\n });\r\n }\r\n\r\n function restoreDefault(){\r\n\r\n vm.activeColumns = [\r\n {field:\"status\", title: \"SHIPMENT.STATUS_Aljex\"},\r\n {field:\"pro\", title: \"SHIPMENT.PRO_Aljex\"},\r\n {field:\"reference\", title: \"SHIPMENT.REF_Aljex\"},\r\n {field:\"pickupappointmentdatetime_new\", title: \"SHIPMENT.PICKUP_APPT_CSL\"},\r\n {field:\"origincitystate\", title: \"SHIPMENT.PICKUP_CSL\"},\r\n {field:\"consigneeapptdatetime_new\", title: \"SHIPMENT.delivery_csl\"},\r\n {field:\"destinationcitystate\", title: \"SHIPMENT.DESTINATION_CSL\"},\r\n {field:\"deliverydatetime_new\", title: \"DELIVERYDATE_Aljex\"},\r\n {field:\"lastcheckcalldetails_new\", title: \"SHIPMENT.LASTCHECKCALL_CSL\"}\r\n ];\r\n\r\n var onlyInA = vm.allColumns.filter(compare(vm.activeColumns));\r\n var onlyInB = vm.activeColumns.filter(compare(vm.allColumns));\r\n\r\n var result = onlyInA.concat(onlyInB);\r\n\r\n vm.availableColumns = angular.copy(result);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n saveToDefault();\r\n // vm.activeColumns = CustomResultsCfsService.getActiveColumns();\r\n }\r\n\r\n //the submit button\r\n function submit() {\r\n $log.debug(\"submited \" + vm.activeColumns);\r\n //vm.availableColumns = vm.tempAvailableColumns;\r\n CustomResultsCfsService.setActiveColumns(vm.activeColumns);\r\n CustomResultsCfsService.setColumnHeaders(vm.activeColumns); //sends the object\r\n $mdDialog.hide();\r\n }\r\n\r\n //changes the activeColumns to be shown based on what the search field is\r\n // function activeSearchChange() {\r\n // var results = [];\r\n // var lcs = vm.activeSearchField.toLowerCase();\r\n // for (var index = 0; index < vm.tempActiveColumns.length; index++) {\r\n // var name = vm.tempActiveColumns[index].title.toLowerCase();\r\n // if (name.indexOf(lcs) > -1) { //if the string contains the name\r\n // results.push(vm.tempActiveColumns[index]);\r\n // }\r\n // }\r\n // vm.activeColumns = results;\r\n // }\r\n\r\n //changes the availableColumns to be shown based on what the search field is\r\n function availableSearchChange() {\r\n var results = [];\r\n var lcs = vm.availableSearchField.toLowerCase();\r\n for (var index = 0; index < vm.tempAvailableColumns.length; index++) {\r\n var name = vm.tempAvailableColumns[index].title.toLowerCase();\r\n if (name.indexOf(lcs) > -1) { //if the string contains the name\r\n results.push(vm.tempAvailableColumns[index]);\r\n }\r\n }\r\n vm.availableColumns = results;\r\n }\r\n\r\n //clears the active search field\r\n // function clickedActiveSearchX() {\r\n // vm.activeSearchField = '';\r\n // vm.activeSearchChange();\r\n // }\r\n\r\n //clears the available search field\r\n function clickedAvailableSearchX() {\r\n vm.availableSearchField = '';\r\n\r\n var onlyInA = vm.allColumns.filter(compare(vm.activeColumns));\r\n var onlyInB = vm.activeColumns.filter(compare(vm.allColumns));\r\n\r\n var result = onlyInA.concat(onlyInB);\r\n\r\n vm.tempAvailableColumns = angular.copy(result);\r\n\r\n // CustomResultsService.getAvailableColumns();\r\n vm.availableSearchChange();\r\n }\r\n\r\n function compare(otherArray){\r\n return function(current){\r\n return otherArray.filter(function(other){\r\n return other.field == current.field\r\n }).length == 0;\r\n }\r\n }\r\n\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('ServerTableABService', ServerTableABService);\r\n\r\n /** @ngInject */\r\n ServerTableABService.$inject = ['AJAX', '$timeout', '$mdMedia', '$mdDialog', 'ngTableDefaults', '$rootScope', '$q', '$http', '$log', 'api', 'NgTableParams', \"TrackTraceService\", 'UserService'];\r\n function ServerTableABService(AJAX, $timeout, $mdMedia, $mdDialog, ngTableDefaults, $rootScope, $q, $http, $log, api, NgTableParams, TrackTraceService, UserService) {\r\n\r\n var vm = this;\r\n vm.noResults = false;\r\n var query = {},\r\n data,\r\n activeTimeoutPromise = false,\r\n isEmpty = true,\r\n // ngTable = genTable(),\r\n state = {\r\n loading: false\r\n },\r\n\r\n timeoutPromise,\r\n searchRequest,\r\n //query = AdvSearchService.getCurrentSearch(),\r\n ngTable = new NgTableParams(\r\n {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: { duedate: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n\r\n var defaultSettings = {\r\n counts: [],\r\n defaultSort: \"asc\",\r\n filterOptions: {\r\n filterComparator: true\r\n }\r\n };\r\n\r\n var queryState = {\r\n displayNoResults: true,\r\n isFilterLoading: {\r\n active: false,\r\n exception: false,\r\n potential: false\r\n }\r\n };\r\n\r\n var collapsed = true, noResults = false;\r\n\r\n vm.customFullscreen = $mdMedia('xs') || $mdMedia('sm');\r\n\r\n var initialSorting = [\r\n { label: \"Id ASC\", value: { id: \"asc\"} },\r\n { label: \"Id DESC\", value: { id: \"desc\"} },\r\n { label: \"Name ASC\", value: { name: \"asc\"} },\r\n { label: \"Name DESC\", value: { name: \"desc\"} }\r\n ];\r\n var initialParams = {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n sorting: undefined\r\n };\r\n\r\n function genTable(){\r\n return new NgTableParams(\r\n {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: { duedate: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n getData: getData\r\n });\r\n }\r\n\r\n function sortFields(orderBy, sorting){\r\n var result = [];\r\n for (var i in orderBy){\r\n if (!isNaN(+i)){\r\n var x = orderBy[i].replace(/[+-]/g,\"\");\r\n var p = {};\r\n p[x] = sorting[x];\r\n result.push(p);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function getQuery() {return query;}\r\n\r\n function getData(paramsName){\r\n \r\n state.loading = true; \r\n\r\n var dfd = $q.defer();\r\n \r\n return dfd.promise;\r\n \r\n\r\n }\r\n\r\n \r\n\r\n function ngTableReload(ngTableData){\r\n\r\n //debugger;\r\n\r\n ngTable.settings({data: ngTableData})\r\n ngTable.data = ngTableData;\r\n\r\n ngTable.total(ngTableData.length);\r\n\r\n ngTable.reload();\r\n\r\n }\r\n\r\n return {\r\n getState: function(){return state;},\r\n // genTable: genTable,\r\n sortFields: sortFields,\r\n getData: getData,\r\n //getCount: getCount,\r\n getParams: function(){\r\n return ngTable.parameters();\r\n },\r\n isEmpty: function(){return isEmpty;},\r\n getTable: function(){ return ngTable;},\r\n getTableParams: function(){return ngTable;},\r\n getQueryState: function() { return queryState;},\r\n reloadTable: function(){\r\n\r\n },\r\n getQuery: getQuery,\r\n ngTableReload:ngTableReload,\r\n setQuery: function() {\r\n if (searchRequest){\r\n //timeoutPromise.resolve('newSearch');\r\n //timeoutPromise = $q.defer();\r\n } else {\r\n //timeoutPromise = $q.defer();\r\n }\r\n ngTableDefaults.settings = angular.extend({}, ngTableDefaults.settings, defaultSettings);\r\n ngTableDefaults.params = angular.extend({}, ngTableDefaults.params, initialParams);\r\n $rootScope.$broadcast(\"ngTableRsParamsChanged\", ngTableDefaults);\r\n searchRequest = getData();\r\n return searchRequest;\r\n }\r\n };\r\n\r\n }\r\n\r\n})();\r\n \n/**\r\n * @ngdoc method\r\n * @name ServerTableABController.getData()\r\n * @description method retrieves data from the AdvSearchService to generate the table\r\n * @param {params} - provides an object of parameters to the server, this is a function that\r\n * exposes many table parameters.\r\n */\r\n\r\n(function () {\r\n 'use strict';\r\n angular\r\n .module ('app.trackTrace')\r\n .controller ('ServerTableABController', ServerTableABController);\r\n\r\n /** @ngInject */\r\n\r\n ServerTableABController.$inject = [\r\n '$scope',\r\n '$rootScope',\r\n '$http',\r\n '$resource',\r\n '$location',\r\n 'CustomResultsABService',\r\n '$translatePartialLoader',\r\n '$log',\r\n '$filter',\r\n '$translate',\r\n 'NgTableParams',\r\n 'ngTableEventsChannel',\r\n 'ServerTableABService',\r\n '$q',\r\n 'slug',\r\n 'mdSelectHelper',\r\n 'TrackTraceService',\r\n 'ShippingDetailsService',\r\n ];\r\n function ServerTableABController (\r\n $scope,\r\n $rootScope,\r\n $http,\r\n $resource,\r\n $location,\r\n CustomResultsABService,\r\n $translatePartialLoader,\r\n $log,\r\n $filter,\r\n $translate,\r\n NgTableParams,\r\n ngTableEventsChannel,\r\n ServerTableABService,\r\n $q,\r\n slug,\r\n mdSelectHelper,\r\n TrackTraceService,\r\n ShippingDetailsService\r\n ) {\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart ('shipment');\r\n $translatePartialLoader.addPart ('tracktrace');\r\n\r\n /* Variables */\r\n var vm = this;\r\n\r\n vm.query = {};\r\n vm.response = {};\r\n vm.isEmpty = ServerTableABService.isEmpty ();\r\n vm.filters = {shipdate: '', duedate: ''};\r\n vm.query = ServerTableABService.getQuery ();\r\n vm.selectAll = false;\r\n vm.checkSelectedInput = checkSelectedInput;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n // debugger;\r\n $scope.$watch (\r\n 'vm.query',\r\n function () {\r\n vm.query;\r\n vm.isLoading = true;\r\n // ServerTableABService.setQuery();\r\n },\r\n true\r\n );\r\n\r\n vm.columns = CustomResultsABService.getColumnHeaders ();\r\n\r\n $scope.$on ('customisedResultsActionHeaderChanged', function (\r\n event,\r\n tabName\r\n ) {\r\n vm.columns = CustomResultsABService.getColumnHeaders ();\r\n });\r\n\r\n $rootScope.searchParamStatusVal = $location.search ().status\r\n ? parseInt ($location.search ().status)\r\n : 'none';\r\n\r\n vm.isLoading = false;\r\n vm.checkStatus = checkStatus;\r\n vm.getShipmentReferences = getShipmentReferences;\r\n /* Function call for Tooltip exceptions */\r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n $scope.getHeaderWidth = getHeaderWidth;\r\n $scope.shipmentData = '';\r\n var dataset = $scope.actionTableData;\r\n\r\n $scope.tabledata = [];\r\n\r\n $scope.tabledata = new NgTableParams (\r\n {\r\n page: 1,\r\n count: $scope.actionTableData.length,\r\n paginationMaxBlocks: 3,\r\n },\r\n {\r\n counts: [],\r\n dataset: $scope.actionTableData,\r\n }\r\n );\r\n $scope.tabledata.settings ({data: $scope.actionTableData});\r\n $scope.tabledata.data = $scope.actionTableData;\r\n\r\n $scope.tabledata.total ($scope.actionTableData.length);\r\n if ($scope.tabledata.data.length == 0) {\r\n vm.noDataResults = true;\r\n }\r\n\r\n $scope.sortClickable = sortClickable;\r\n vm.viewAccountCreation = viewAccountCreation;\r\n vm.checkAll = checkAll;\r\n vm.selectUser = selectUser;\r\n $scope.$on ('angular-resizable.resizeEnd', onResizeEnd);\r\n $scope.$on ('angular-resizable.resizeStart', function (event) {\r\n event.preventDefault ();\r\n event.stopPropagation ();\r\n });\r\n\r\n function checkSelectedInput () {\r\n ngTableEventsChannel.onPagesChanged (\r\n function (p1, p2, p3) {\r\n var tmp = 0;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n\r\n angular.forEach (vm.tableParams.data, function (v, k) {\r\n if (v.selected && v.selected != undefined) {\r\n tmp++;\r\n }\r\n });\r\n\r\n vm.selectAll = vm.tableParams.data.length == tmp && tmp > 0;\r\n },\r\n $scope,\r\n vm.tableParams\r\n );\r\n }\r\n\r\n function sortClickable (event) {\r\n return event.target.parentElement.className != 'rg-right';\r\n }\r\n\r\n function onResizeEnd (event, args) {\r\n event.preventDefault ();\r\n event.stopPropagation ();\r\n localStorage.setItem ('resize-tt-' + args.id, args.width);\r\n }\r\n\r\n function getHeaderWidth (item) {\r\n var width = localStorage.getItem ('resize-tt-' + slug (item));\r\n return width ? 'width: ' + width + 'px;' : '';\r\n }\r\n\r\n function checkAll (selected) {\r\n vm.tableParams.data.map (function (user) {\r\n user.selected = selected;\r\n });\r\n }\r\n\r\n function selectUser () {\r\n vm.selectAll = false;\r\n }\r\n\r\n vm.filterDate = filterDate;\r\n vm.updateFilteredCounts = updateFilteredCounts;\r\n\r\n function filterDate (key) {\r\n var filter_by = {};\r\n if (vm.filters[key]) {\r\n filter_by[key] = moment (vm.filters[key]).format ('YYYY-MM-DD');\r\n }\r\n $scope.tabledata.filter (filter_by);\r\n updateFilteredCounts ();\r\n }\r\n\r\n function viewAccountCreation (id) {\r\n $location.path ('/userAccountPreview/' + id);\r\n }\r\n function checkStatus (row) {\r\n return row.isdelivered === 'booking' || row.isdelivered == 'n/a'\r\n ? 'N/A'\r\n : 'Undelivered';\r\n }\r\n\r\n function getShipmentReferences (row) {\r\n return row.toString () == ',' ? '' : row.join (', ');\r\n }\r\n vm.noResults = false;\r\n\r\n function updateFilteredCounts () {\r\n $scope.tabledata.reload ();\r\n var results_filtered =\r\n Object.values ($scope.tabledata.filter ()).filter (function (v, i) {\r\n return v && v !== '';\r\n }).length !== 0;\r\n TrackTraceService.setResultsCount ($scope.tabledata.total ());\r\n TrackTraceService.setResultsFiltered (results_filtered);\r\n\r\n if ($scope.tabledata.total () == 0) {\r\n if (results_filtered) {\r\n vm.noResults = true;\r\n vm.noDataResults = false;\r\n } else {\r\n if ($scope.tabledata.filter ().isdelivered == null) {\r\n vm.noResults = false;\r\n vm.noDataResults = true;\r\n } else {\r\n vm.noResults = true;\r\n vm.noDataResults = false;\r\n }\r\n }\r\n } else {\r\n vm.noResults = false;\r\n\r\n vm.noDataResults = false;\r\n }\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException (number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipmentException (number).then (function (\r\n resp\r\n ) {\r\n var codeArray = [];\r\n var descArray = [];\r\n var resp = resp[0];\r\n resp.exceptions.forEach (function (item, index, array) {\r\n if (!codeArray.includes (item.code)) {\r\n codeArray.push (item.code);\r\n }\r\n if (!descArray.includes (item.description)) {\r\n descArray.push (item.description);\r\n }\r\n });\r\n vm.response = {\r\n code: codeArray.join (', '),\r\n description: descArray.join (', '),\r\n };\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException (number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipmentException (number).then (function (\r\n resp\r\n ) {\r\n var resp = resp[0];\r\n vm.response = {\r\n title: resp.potential_exceptions[0].title,\r\n description: resp.potential_exceptions[0].description,\r\n };\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n }\r\n}) ();\r\n\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk \r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License \r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name ServerTable.ngTableSorterRow\r\n * @description directive that sorts the rows of a table\r\n * @restrict E\r\n */\r\n\r\n(function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableSorterRowActionBoard', ngTableSorterRow);\r\n \r\n ngTableSorterRow.$inject = [];\r\n\r\n function ngTableSorterRow(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/track-trace/action-board/server-table/sorterHeader.html',\r\n scope: true,\r\n controller: 'ngTableSorterRowController'\r\n };\r\n return directive;\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsABController.add\r\n * @description method adds a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsABController.remove\r\n * @description method removes a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsABController.dragListener\r\n * @description method that is the listener for drag events\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsABController.saveToDefault\r\n * @description method saves the layout to default\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsABController.submit\r\n * @description method submits the custom search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsABController.activeSearchChange\r\n * @description method called when the active search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsABController.availableSearchChange\r\n * @description method called when the available search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsABController.clickedActiveSearchX\r\n * @description method called the X by the activeSearchField is clicked and deletes the value in activeSearchField\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsABController.clickedAvailableSearchX\r\n * @description method called the X by the availableSearchField is clicked and deletes the value in availableSearchField\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('CustomizeResultsABController', CustomizeResultsABController);\r\n\r\n /** @ngInject */\r\n CustomizeResultsABController.$inject = ['$rootScope', '$state', 'CustomResultsABService', 'api', '$log', '$mdDialog', '$window','$http', '$mdToast', 'UserService', 'permissions'];\r\n function CustomizeResultsABController($rootScope, $state, CustomResultsABService, api, $log, $mdDialog, $window, $http, $mdToast,UserService, permissions) {\r\n\r\n /* variables */\r\n var vm = this;\r\n\r\n vm.user = UserService.getUserData();\r\n vm.activeColumns = CustomResultsABService.getActiveColumns();\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.availableColumns = CustomResultsABService.getAvailableColumns();\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns); //used for search of availableColumns\r\n vm.allColumns = CustomResultsABService.getAllColumns();\r\n vm.availableSearchField = \"\";\r\n //need copies of the orignal lists for setting the service back if canceled\r\n vm.activeColumnsCopy = angular.copy(vm.activeColumns);\r\n\r\n vm.colHeight = colHeight();\r\n\r\n /* functions */\r\n vm.cancel = cancel;\r\n vm.add = add;\r\n vm.remove = remove;\r\n vm.dragListener = dragListener;\r\n vm.saveToDefault = saveToDefault;\r\n vm.restoreDefault = restoreDefault;\r\n vm.submit = submit;\r\n vm.availableSearchChange = availableSearchChange;\r\n vm.showToastWithFile = showToastWithFile\r\n vm.clickedAvailableSearchX = clickedAvailableSearchX;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n vm.is_consignee_user = UserService.check_consignee_user();\r\n\r\n function cancel() {\r\n CustomResultsABService.setActiveColumns(vm.activeColumnsCopy);\r\n $mdDialog.cancel();\r\n }\r\n\r\n colHeight();\r\n function colHeight() {\r\n //// console.log($window.innerHeight);\r\n return ($window.innerHeight * 0.5);\r\n }\r\n\r\n //add to the active column\r\n function add(column) {\r\n vm.activeColumns.push(column);\r\n var index = vm.availableColumns.indexOf(column);\r\n vm.availableColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n localStorage.setItem(\"myActioncookie\", JSON.stringify(vm.activeColumns));\r\n }\r\n\r\n //remove from the active column\r\n function remove(column) {\r\n $log.debug(\"column name: \" + column.name + \" column width: \" + column.width);\r\n vm.availableColumns.push(column);\r\n var index = vm.activeColumns.indexOf(column);\r\n vm.activeColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n localStorage.setItem(\"myActioncookie\", JSON.stringify(vm.activeColumns));\r\n }\r\n\r\n //function for the event when the active column is dragged\r\n function dragListener() {\r\n return {\r\n accept: function (sourceItemHandleScope, destSortableScope) {return true}, //override to determine drag is allowed or not. default is true.\r\n itemMoved: function () {\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n localStorage.setItem(\"myActioncookie\", JSON.stringify(vm.activeColumns));\r\n },\r\n orderChanged: function() {},\r\n allowDuplicates: false //optional param allows duplicates to be dropped.\r\n }\r\n }\r\n\r\n function showToastWithFile(file, messages, delay) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: delay ? delay : 2000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/users/toast/' + file,\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n //saves the current custimization to default\r\n function saveToDefault() {\r\n $log.debug(\"save to default: \" + vm.activeColumns);\r\n var column_array =[]\r\n vm.activeColumns.forEach(function(element, index){\r\n column_array.push(element.field)\r\n }) \r\n var column_type = 'action_board';\r\n\r\n $http({\r\n method: 'PUT',\r\n url: api.url + '/users/'+vm.user.id+'/set_def_colms',\r\n data: {\r\n default_columns: column_array,\r\n 'default_column_type':column_type\r\n }\r\n }).success(function(response){\r\n showToastWithFile('default-columns-save-sucess.html', \"Default Columns Saved\"); \r\n localStorage.setItem(\"adv_search_Action_cols\", JSON.stringify(response.default_columns));\r\n \r\n\r\n window.localStorage.removeItem('myActioncookie');\r\n\r\n }).error(function(response){\r\n showToastWithFile('default-columns-save-error.html', \"Error saving Default Columns\");\r\n });\r\n }\r\n \r\n function restoreDefault(){ \r\n\r\n vm.activeColumns = [ \r\n {field:\"isdelivered\", title: \"SHIPMENT.ISDELIVERED\"}, \r\n {field:\"shippername\", title: \"SHIPMENT.SHIPPERNAME\"}, \r\n {field:\"businesstype\", title: \"SHIPMENT.BUSINESSTYPE\"},\r\n {field:\"awb\", title: \"HAWB/AWB/BOL\"},\r\n {field:\"invoicenumber\", title: \"Invoice Number\"},\r\n {field:\"shipment_contnos\", title: \"Container #\"},\r\n {field:\"shipment_references\", title: \"SHIPMENT References\"},\r\n {field:\"estimateddate\", title: \"ESTIMATED DELIVERY\"},\r\n {field:\"delivereddate\", title: \"ACTUAL DELIVERY\"}, \r\n {field:\"milestonedescription\", title: \"SHIPMENT.MILESTONE\"}\r\n ];\r\n \r\n\r\n var onlyInA = vm.allColumns.filter(compare(vm.activeColumns));\r\n var onlyInB = vm.activeColumns.filter(compare(vm.allColumns));\r\n\r\n var result = onlyInA.concat(onlyInB);\r\n\r\n vm.availableColumns = angular.copy(result);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n saveToDefault();\r\n }\r\n\r\n //the submit button\r\n function submit() {\r\n \r\n //vm.availableColumns = vm.tempAvailableColumns;\r\n CustomResultsABService.setActiveColumns(vm.activeColumns);\r\n CustomResultsABService.setColumnHeaders(vm.activeColumns); //sends the object\r\n $rootScope.$broadcast(\"customisedResultsActionHeaderChanged\", vm.activeColumns);\r\n $mdDialog.hide();\r\n $log.debug(\"submited \" + vm.activeColumns);\r\n }\r\n\r\n //changes the availableColumns to be shown based on what the search field is\r\n function availableSearchChange() {\r\n var results = [];\r\n var lcs = vm.availableSearchField.toLowerCase();\r\n for (var index = 0; index < vm.tempAvailableColumns.length; index++) {\r\n var name = vm.tempAvailableColumns[index].title.toLowerCase();\r\n if (name.indexOf(lcs) > -1) { //if the string contains the name\r\n results.push(vm.tempAvailableColumns[index]);\r\n }\r\n }\r\n vm.availableColumns = results;\r\n }\r\n\r\n //clears the available search field\r\n function clickedAvailableSearchX() {\r\n vm.availableSearchField = '';\r\n\r\n var onlyInA = vm.allColumns.filter(compare(vm.activeColumns));\r\n var onlyInB = vm.activeColumns.filter(compare(vm.allColumns));\r\n\r\n var result = onlyInA.concat(onlyInB);\r\n\r\n vm.tempAvailableColumns = angular.copy(result);\r\n\r\n // CustomResultsABService.getAvailableColumns();\r\n vm.availableSearchChange();\r\n }\r\n\r\n function compare(otherArray){\r\n return function(current){\r\n return otherArray.filter(function(other){\r\n return other.field == current.field\r\n }).length == 0;\r\n }\r\n }\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.setColumnHeaders\r\n * @description sets the headers of the shipments table in track and trace\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.getColumnHeaders\r\n * @description gets the column headers variable\r\n */\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.setActiveColumns\r\n* @description setActiveColumns() set the activeColumns variable\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getActiveColumns\r\n* @description getActiveColumns() returns the active columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getDefaultColumns\r\n* @description getDefaultColumns() returns the default columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getAvailableColumns\r\n* @description getAvailableColumns returns the availableColumns\r\n*/\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('CustomResultsABService', CustomResultsABService);\r\n\r\n /** @ngInject */\r\n CustomResultsABService.$inject = ['$log', '$http'];\r\n function CustomResultsABService($log, $http) {\r\n /* fake data */\r\n //var $translate = $filter('translate');\r\n // function loadActionColumns(){\r\n // return $http.get('./app/track-trace/customize-results/columns.json').then(function(res){return res.data;});\r\n // //promise = deferred.promise;\r\n // }\r\n var vm = this;\r\n \r\n\r\n loadActionColumns();\r\n\r\n\r\n function loadActionColumns(){\r\n\r\n vm.columnHeaders = [];\r\n vm.cookiedata = null;\r\n vm.activeColumns = [];\r\n vm.savedDefaults = [];\r\n vm.savedData;\r\n vm.defaultColumns = [];\r\n\r\n\r\n load_Actioncolumns();\r\n load_defaultColumns();\r\n load_activeColumns();\r\n }\r\n\r\n\r\n function load_Actioncolumns(){\r\n\r\n vm.columns = [\r\n {field:\"servicetype\", title: \"SHIPMENT.SERVICETYPE\", sortable: \"servicetype\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shipdate\", title: 'SHIPMENT.SHIPDATE', sortable: \"shipdate\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", isDate: true, static: true},\r\n {field:\"consigneeaddress4\", title: \"SHIPMENT.CONSIGNEEADDRESS4\", sortable: \"consigneeaddress4\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shipperaddress1\", title: \"SHIPMENT.SHIPPERADDRESS1\", sortable: \"shipperaddress1\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shipperaddress2\", title: \"SHIPMENT.SHIPPERADDRESS2\", sortable: \"shipperaddress2\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shipperaddress3\", title: \"SHIPMENT.SHIPPERADDRESS3\", sortable: \"shipperaddress3\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shipperaddress4\", title: \"SHIPMENT.SHIPPERADDRESS4\", sortable: \"shipperaddress4\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneeaddress1\", title: \"SHIPMENT.CONSIGNEEADDRESS1\", sortable: \"consigneeaddress1\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneeaddress2\", title: \"SHIPMENT.CONSIGNEEADDRESS2\", sortable: \"consigneeaddress2\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneeaddress3\", title: \"SHIPMENT.CONSIGNEEADDRESS3\", sortable: \"consigneeaddress3\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"jobunid\", title: \"SHIPMENT.JOBUNID\", sortable: \"jobunid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"isdelivered\", title: \"SHIPMENT.ISDELIVERED\", sortable: \"isdelivered\", filter: {}, show:false, disabled:true, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"departuredate\", title: \"SHIPMENT.DEPARTUREDATE\", sortable: \"departuredate\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", isDate: true, static: true},\r\n {field:\"shipperzipcode\", title: \"SHIPMENT.SHIPPERZIPCODE\", sortable: \"shipperzipcode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shippername\", title: \"SHIPMENT.SHIPPERNAME\", sortable: \"shippername\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"customername\", title: \"SHIPMENT.CUSTOMERNAME\", sortable: \"customername\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"bookingnumber\", title: \"SHIPMENT.BOOKINGNUMBER\", sortable: \"bookingnumber\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"consigneezipcode\", title: \"SHIPMENT.CONSIGNEEZIPCODE\", sortable: \"consigneezipcode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneename\", title: \"SHIPMENT.CONSIGNEENAME\", sortable: \"consigneename\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"servicetypecode\", title: \"SHIPMENT.SERVICETYPECODE\", sortable: \"servicetypecode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"gshpid\", title: \"SHIPMENT.GSHPID\", sortable: \"gshpid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"shipperpartyid\", title: \"SHIPMENT.SHIPPERPARTYID\", sortable: \"shipperpartyid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"awb\", title: \"HAWB/AWB/BOL\", sortable: \"awb\", filter: {}, show:true, tdClass: \"td-15\", class: \"td-15\", link_class: \"text-strong\", static: true},\r\n {field:\"invoicenumber\", title: \"Invoice Number\", sortable: \"invoicenumber\", filter: {}, show:true, tdClass: \"td-20\", class: \"td-15\", link_class: \"text-strong\", static: true},\r\n {field:\"origin\", title: \"SHIPMENT.ORIGIN\", sortable: \"origin\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"destination\", title: \"SHIPMENT.DESTINATION\", sortable: \"destination\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"totalchargeableweight\", title: \"SHIPMENT.TOTALCHARGEABLEWEIGHT\", sortable: \"totalchargeableweight\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneepartyid\", title: \"SHIPMENT.CONSIGNEEPARTYID\", sortable: \"consigneepartyid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"businesstype\", title: \"SHIPMENT.BUSINESSTYPE\", sortable: \"businesstype\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneecity\", title: \"SHIPMENT.CONSIGNEECITY\", sortable: \"consigneecity\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"totalgrossweight\", title: \"SHIPMENT.TOTALGROSSWEIGHT\", sortable: \"totalgrossweight\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneecountry\", title: \"SHIPMENT.CONSIGNEECOUNTRY\", sortable: \"consigneecountry\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"customergroup\", title: \"SHIPMENT.CUSTOMERGROUP\", sortable: \"customergroup\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"totalpieces\", title: \"SHIPMENT.TOTALPIECES\", sortable: \"totalpieces\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"duedate\", title: \"SHIPMENT.DUEDATE\", sortable: \"duedate\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", isDate: true, static: true},\r\n {field:\"shippercity\", title: \"SHIPMENT.SHIPPERCITY\", sortable: \"shippercity\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"servicelevelcode\", title: \"SHIPMENT.SERVICELEVELCODE\", sortable: \"servicelevelcode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"customerpartyid\", title: \"SHIPMENT.CUSTOMERPARTYID\", sortable: \"customerpartyid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"servicelevel\", title: \"SHIPMENT.SERVICELEVEL\", sortable: \"servicelevel\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"estimateddate\", title: \"ESTIMATED DELIVERY\", sortable: \"estimateddate\", filter: {}, show:false, tdClass: \"td-20\", isDate: true, class: \"td-20\", static: true},\r\n {field:\"milestonedescription\", title: \"SHIPMENT.MILESTONE\", sortable: \"milestonedescription\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"totalinvoiceamount\", title: \"SHIPMENT.TOTAL_INVOICE_AMOUNT\", sortable: \"totalinvoiceamount\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shipment_contnos\", title: \"Container #\", sortable: \"shipment_contnos\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"delivereddate\", title: \"ACTUAL DELIVERY\", sortable: \"delivereddate\", filter: {}, show:false, tdClass: \"td-20\", isDate: true, class: \"td-20\", static: true},\r\n {field:\"shipment_references\", title: \"SHIPMENT References\", sortable: \"shipment_references\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"remark\", title: \"Remarks\", sortable: \"remark\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n ];\r\n\r\n vm.columns.map(function(d){\r\n if (d.field.indexOf('date') !== -1) {\r\n d.filter[d.field] = '/app/track-trace/action-board/server-table/filterDate.html';\r\n } else if (d.disabled) {\r\n d.filter[d.field] = '/app/track-trace/action-board/server-table/filterStatus.html';\r\n } else {\r\n d.filter[d.field] = '/app/track-trace/action-board/server-table/filterDefault.html';\r\n }\r\n })\r\n\r\n }\r\n\r\n function load_defaultColumns(){\r\n \r\n\r\n vm.defaultColumns = [\r\n {field:\"isdelivered\", title: \"SHIPMENT.ISDELIVERED\"}, \r\n {field:\"shippername\", title: \"SHIPMENT.SHIPPERNAME\"}, \r\n {field:\"businesstype\", title: \"SHIPMENT.BUSINESSTYPE\"},\r\n {field:\"awb\", title: \"HAWB/AWB/BOL\"},\r\n {field:\"invoicenumber\", title: \"Invoice Number\"},\r\n {field:\"shipment_contnos\", title: \"Container #\"},\r\n {field:\"shipment_references\", title: \"SHIPMENT References\"},\r\n {field:\"estimateddate\", title: \"ESTIMATED DELIVERY\"},\r\n {field:\"delivereddate\", title: \"ACTUAL DELIVERY\"}, \r\n {field:\"milestonedescription\", title: \"SHIPMENT.MILESTONE\"}\r\n ];\r\n\r\n \r\n\r\n }\r\n\r\n\r\n function load_activeColumns(){\r\n\r\n if(localStorage.getItem(\"myActioncookie\")){\r\n vm.cookiedata = JSON.parse(localStorage.getItem(\"myActioncookie\"));\r\n }\r\n\r\n if(vm.cookiedata != null){\r\n vm.activeColumns = vm.cookiedata;\r\n setColumnHeaders(vm.activeColumns);\r\n } \r\n\r\n else{\r\n\r\n if(JSON.parse(localStorage.getItem(\"adv_search_Action_cols\")) != null){ \r\n \r\n vm.savedData = JSON.parse(localStorage.getItem(\"adv_search_Action_cols\"));\r\n\r\n for(var i=0; i< vm.savedData.length; i++ ){\r\n\r\n vm.columns.filter(function(element){\r\n\r\n if(vm.savedData[i] == element.field){\r\n vm.savedDefaults.push(element);\r\n }\r\n \r\n });\r\n\r\n }\r\n\r\n vm.activeColumns = vm.savedDefaults;\r\n }else{\r\n vm.activeColumns = vm.defaultColumns;\r\n }\r\n setColumnHeaders(vm.activeColumns);\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n /* functions */\r\n function setColumnHeaders(activeCol) {\r\n vm.columnHeaders.length = 0;\r\n vm.columns.map(function(d){d.show = false});\r\n for (var j in vm.activeColumns){\r\n for (var i in vm.columns) {\r\n if (vm.activeColumns[j].field === vm.columns[i].field){\r\n vm.columns[i].show = true;\r\n vm.columnHeaders.push(vm.columns[i]);\r\n }\r\n }\r\n }\r\n vm.columnHeaders.unshift({field:\"flag\", title: \"TRACKTRACE.EXCEPTION_HEADER\", \"sortable\": \"flag\", show:true, tdClass: \"td-5\", class: \"td-5\"});\r\n }\r\n\r\n function setActiveColumns(activeCol){\r\n vm.activeColumns = activeCol;\r\n }\r\n\r\n function setDefaultColumns(activeCol){\r\n vm.activeColumns = vm.defaultColumns;\r\n }\r\n\r\n setColumnHeaders(vm.activeColumns);\r\n\r\n return {\r\n setColumnHeaders: setColumnHeaders,\r\n loadActionColumns:loadActionColumns,\r\n getColumnHeaders: function() {\r\n return vm.columnHeaders;\r\n },\r\n setActiveColumns: setActiveColumns,\r\n getActiveColumns: function() {\r\n return vm.activeColumns;\r\n },\r\n getDefaultColumns: function(){\r\n return vm.defaultColumns;\r\n },\r\n getAllColumns: function(){\r\n return vm.columns;\r\n },\r\n getAvailableColumns: function() {\r\n return vm.columns.filter(function(d){\r\n if (!d.show){\r\n return {\r\n field: d.field,\r\n title: d.title\r\n };\r\n }\r\n }).sort(function(a, b) {\r\n return a.title > b.title ? 1 : (a.title < b.title ? -1 : 0);\r\n });\r\n }\r\n };\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app', [\r\n 'app.admin',\r\n 'app.bookShipment',\r\n 'app.contacts',\r\n 'app.core',\r\n 'app.dashboard',\r\n 'app.kitchenSink',\r\n 'app.layout',\r\n 'app.shippingDetails',\r\n 'app.trackTrace',\r\n 'app.user',\r\n 'app.widgets',\r\n 'angulartics',\r\n 'angulartics.google.analytics',\r\n 'ngIdle',\r\n 'textAngular',\r\n 'ngclipboard',\r\n 'ngMap',\r\n 'hm.readmore',\r\n 'chart.js'\r\n ]);\r\n})();\r\n\n// unique filter used for the reference numbers\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .filter('uniqueRef', uniqueRef);\r\n\r\n /* @ngInject */\r\n function uniqueRef() {\r\n return function (object, field) {\r\n var uniqueArray = [];\r\n for (var key in object) {\r\n if(object[key][field] && uniqueArray.indexOf(object[key][field]) == -1) {\r\n uniqueArray.push(object[key][field]);\r\n }\r\n }\r\n if(uniqueArray.length < 1) uniqueArray.push('N/a');\r\n return uniqueArray;\r\n };\r\n \r\n }\r\n\r\n})();\n// ==ClosureCompiler==\r\n// @compilation_level ADVANCED_OPTIMIZATIONS\r\n// @externs_url https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3.js\r\n// ==/ClosureCompiler==\r\n\r\n/**\r\n * @name MarkerClusterer for Google Maps v3\r\n * @version version 1.0\r\n * @author Luke Mahe\r\n * @fileoverview\r\n * The library creates and manages per-zoom-level clusters for large amounts of\r\n * markers.\r\n *
\r\n * This is a v3 implementation of the\r\n * v2 MarkerClusterer.\r\n */\r\n\r\n/**\r\n * @license\r\n * Copyright 2010 Google Inc. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n\r\n/**\r\n * A Marker Clusterer that clusters markers.\r\n *\r\n * @param {google.maps.Map} map The Google map to attach to.\r\n * @param {Array.=} opt_markers Optional markers to add to\r\n * the cluster.\r\n * @param {Object=} opt_options support the following options:\r\n * 'gridSize': (number) The grid size of a cluster in pixels.\r\n * 'maxZoom': (number) The maximum zoom level that a marker can be part of a\r\n * cluster.\r\n * 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a\r\n * cluster is to zoom into it.\r\n * 'averageCenter': (boolean) Whether the center of each cluster should be\r\n * the average of all markers in the cluster.\r\n * 'minimumClusterSize': (number) The minimum number of markers to be in a\r\n * cluster before the markers are hidden and a count\r\n * is shown.\r\n * 'styles': (object) An object that has style properties:\r\n * 'url': (string) The image url.\r\n * 'height': (number) The image height.\r\n * 'width': (number) The image width.\r\n * 'anchor': (Array) The anchor position of the label text.\r\n * 'textColor': (string) The text color.\r\n * 'textSize': (number) The text size.\r\n * 'backgroundPosition': (string) The position of the backgound x, y.\r\n * 'iconAnchor': (Array) The anchor position of the icon x, y.\r\n * @constructor\r\n * @extends google.maps.OverlayView\r\n */\r\nfunction MarkerClusterer(map, opt_markers, opt_options) {\r\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\r\n // extend function to extend MarkerClusterer with google.maps.OverlayView\r\n // because it might not always be available when the code is defined so we\r\n // look for it at the last possible moment. If it doesn't exist now then\r\n // there is no point going ahead :)\r\n this.extend(MarkerClusterer, google.maps.OverlayView);\r\n this.map_ = map;\r\n\r\n /**\r\n * @type {Array.}\r\n * @private\r\n */\r\n this.markers_ = [];\r\n\r\n /**\r\n * @type {Array.}\r\n */\r\n this.clusters_ = [];\r\n\r\n this.sizes = [53, 56, 66, 78, 90];\r\n\r\n /**\r\n * @private\r\n */\r\n this.styles_ = [];\r\n\r\n /**\r\n * @type {boolean}\r\n * @private\r\n */\r\n this.ready_ = false;\r\n\r\n var options = opt_options || {};\r\n\r\n /**\r\n * @type {number}\r\n * @private\r\n */\r\n this.gridSize_ = options['gridSize'] || 60;\r\n\r\n /**\r\n * @private\r\n */\r\n this.minClusterSize_ = options['minimumClusterSize'] || 2;\r\n\r\n\r\n /**\r\n * @type {?number}\r\n * @private\r\n */\r\n this.maxZoom_ = options['maxZoom'] || null;\r\n\r\n this.styles_ = options['styles'] || [];\r\n\r\n /**\r\n * @type {string}\r\n * @private\r\n */\r\n this.imagePath_ = options['imagePath'] ||\r\n this.MARKER_CLUSTER_IMAGE_PATH_;\r\n\r\n /**\r\n * @type {string}\r\n * @private\r\n */\r\n this.imageExtension_ = options['imageExtension'] ||\r\n this.MARKER_CLUSTER_IMAGE_EXTENSION_;\r\n\r\n /**\r\n * @type {boolean}\r\n * @private\r\n */\r\n this.zoomOnClick_ = true;\r\n\r\n if (options['zoomOnClick'] != undefined) {\r\n this.zoomOnClick_ = options['zoomOnClick'];\r\n }\r\n\r\n /**\r\n * @type {boolean}\r\n * @private\r\n */\r\n this.averageCenter_ = false;\r\n\r\n if (options['averageCenter'] != undefined) {\r\n this.averageCenter_ = options['averageCenter'];\r\n }\r\n\r\n this.setupStyles_();\r\n\r\n this.setMap(map);\r\n\r\n /**\r\n * @type {number}\r\n * @private\r\n */\r\n this.prevZoom_ = this.map_.getZoom();\r\n\r\n // Add the map event listeners\r\n var that = this;\r\n google.maps.event.addListener(this.map_, 'zoom_changed', function() {\r\n var zoom = that.map_.getZoom();\r\n\r\n if (that.prevZoom_ != zoom) {\r\n that.prevZoom_ = zoom;\r\n that.resetViewport();\r\n }\r\n });\r\n\r\n google.maps.event.addListener(this.map_, 'idle', function() {\r\n that.redraw();\r\n });\r\n\r\n // Finally, add the markers\r\n if (opt_markers && opt_markers.length) {\r\n this.addMarkers(opt_markers, false);\r\n }\r\n}\r\n\r\n\r\n/**\r\n * The marker cluster image path.\r\n *\r\n * @type {string}\r\n * @private\r\n */\r\nMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../images/m';\r\n\r\n\r\n/**\r\n * The marker cluster image path.\r\n *\r\n * @type {string}\r\n * @private\r\n */\r\nMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';\r\n\r\n\r\n/**\r\n * Extends a objects prototype by anothers.\r\n *\r\n * @param {Object} obj1 The object to be extended.\r\n * @param {Object} obj2 The object to extend with.\r\n * @return {Object} The new extended object.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.extend = function(obj1, obj2) {\r\n return (function(object) {\r\n for (var property in object.prototype) {\r\n this.prototype[property] = object.prototype[property];\r\n }\r\n return this;\r\n }).apply(obj1, [obj2]);\r\n};\r\n\r\n\r\n/**\r\n * Implementaion of the interface method.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.onAdd = function() {\r\n this.setReady_(true);\r\n};\r\n\r\n/**\r\n * Implementaion of the interface method.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.draw = function() {};\r\n\r\n/**\r\n * Sets up the styles object.\r\n *\r\n * @private\r\n */\r\nMarkerClusterer.prototype.setupStyles_ = function() {\r\n if (this.styles_.length) {\r\n return;\r\n }\r\n\r\n for (var i = 0, size; size = this.sizes[i]; i++) {\r\n this.styles_.push({\r\n url: this.imagePath_ + (i + 1) + '.' + this.imageExtension_,\r\n height: size,\r\n width: size\r\n });\r\n }\r\n};\r\n\r\n/**\r\n * Fit the map to the bounds of the markers in the clusterer.\r\n */\r\nMarkerClusterer.prototype.fitMapToMarkers = function() {\r\n var markers = this.getMarkers();\r\n var bounds = new google.maps.LatLngBounds();\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n bounds.extend(marker.getPosition());\r\n }\r\n\r\n this.map_.fitBounds(bounds);\r\n};\r\n\r\n\r\n/**\r\n * Sets the styles.\r\n *\r\n * @param {Object} styles The style to set.\r\n */\r\nMarkerClusterer.prototype.setStyles = function(styles) {\r\n this.styles_ = styles;\r\n};\r\n\r\n\r\n/**\r\n * Gets the styles.\r\n *\r\n * @return {Object} The styles object.\r\n */\r\nMarkerClusterer.prototype.getStyles = function() {\r\n return this.styles_;\r\n};\r\n\r\n\r\n/**\r\n * Whether zoom on click is set.\r\n *\r\n * @return {boolean} True if zoomOnClick_ is set.\r\n */\r\nMarkerClusterer.prototype.isZoomOnClick = function() {\r\n return this.zoomOnClick_;\r\n};\r\n\r\n/**\r\n * Whether average center is set.\r\n *\r\n * @return {boolean} True if averageCenter_ is set.\r\n */\r\nMarkerClusterer.prototype.isAverageCenter = function() {\r\n return this.averageCenter_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the array of markers in the clusterer.\r\n *\r\n * @return {Array.} The markers.\r\n */\r\nMarkerClusterer.prototype.getMarkers = function() {\r\n return this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the number of markers in the clusterer\r\n *\r\n * @return {Number} The number of markers.\r\n */\r\nMarkerClusterer.prototype.getTotalMarkers = function() {\r\n return this.markers_.length;\r\n};\r\n\r\n\r\n/**\r\n * Sets the max zoom for the clusterer.\r\n *\r\n * @param {number} maxZoom The max zoom level.\r\n */\r\nMarkerClusterer.prototype.setMaxZoom = function(maxZoom) {\r\n this.maxZoom_ = maxZoom;\r\n};\r\n\r\n\r\n/**\r\n * Gets the max zoom for the clusterer.\r\n *\r\n * @return {number} The max zoom level.\r\n */\r\nMarkerClusterer.prototype.getMaxZoom = function() {\r\n return this.maxZoom_;\r\n};\r\n\r\n\r\n/**\r\n * The function for calculating the cluster icon image.\r\n *\r\n * @param {Array.} markers The markers in the clusterer.\r\n * @param {number} numStyles The number of styles available.\r\n * @return {Object} A object properties: 'text' (string) and 'index' (number).\r\n * @private\r\n */\r\nMarkerClusterer.prototype.calculator_ = function(markers, numStyles) {\r\n var index = 0;\r\n var count = markers.length;\r\n var dv = count;\r\n while (dv !== 0) {\r\n dv = parseInt(dv / 10, 10);\r\n index++;\r\n }\r\n\r\n index = Math.min(index, numStyles);\r\n return {\r\n text: count,\r\n index: index\r\n };\r\n};\r\n\r\n\r\n/**\r\n * Set the calculator function.\r\n *\r\n * @param {function(Array, number)} calculator The function to set as the\r\n * calculator. The function should return a object properties:\r\n * 'text' (string) and 'index' (number).\r\n *\r\n */\r\nMarkerClusterer.prototype.setCalculator = function(calculator) {\r\n this.calculator_ = calculator;\r\n};\r\n\r\n\r\n/**\r\n * Get the calculator function.\r\n *\r\n * @return {function(Array, number)} the calculator function.\r\n */\r\nMarkerClusterer.prototype.getCalculator = function() {\r\n return this.calculator_;\r\n};\r\n\r\n\r\n/**\r\n * Add an array of markers to the clusterer.\r\n *\r\n * @param {Array.} markers The markers to add.\r\n * @param {boolean=} opt_nodraw Whether to redraw the clusters.\r\n */\r\nMarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) {\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n this.pushMarkerTo_(marker);\r\n }\r\n if (!opt_nodraw) {\r\n this.redraw();\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Pushes a marker to the clusterer.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.pushMarkerTo_ = function(marker) {\r\n marker.isAdded = false;\r\n if (marker['draggable']) {\r\n // If the marker is draggable add a listener so we update the clusters on\r\n // the drag end.\r\n var that = this;\r\n google.maps.event.addListener(marker, 'dragend', function() {\r\n marker.isAdded = false;\r\n that.repaint();\r\n });\r\n }\r\n this.markers_.push(marker);\r\n};\r\n\r\n\r\n/**\r\n * Adds a marker to the clusterer and redraws if needed.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @param {boolean=} opt_nodraw Whether to redraw the clusters.\r\n */\r\nMarkerClusterer.prototype.addMarker = function(marker, opt_nodraw) {\r\n this.pushMarkerTo_(marker);\r\n if (!opt_nodraw) {\r\n this.redraw();\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Removes a marker and returns true if removed, false if not\r\n *\r\n * @param {google.maps.Marker} marker The marker to remove\r\n * @return {boolean} Whether the marker was removed or not\r\n * @private\r\n */\r\nMarkerClusterer.prototype.removeMarker_ = function(marker) {\r\n var index = -1;\r\n if (this.markers_.indexOf) {\r\n index = this.markers_.indexOf(marker);\r\n } else {\r\n for (var i = 0, m; m = this.markers_[i]; i++) {\r\n if (m == marker) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (index == -1) {\r\n // Marker is not in our list of markers.\r\n return false;\r\n }\r\n\r\n marker.setMap(null);\r\n\r\n this.markers_.splice(index, 1);\r\n\r\n return true;\r\n};\r\n\r\n\r\n/**\r\n * Remove a marker from the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to remove.\r\n * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\r\n * @return {boolean} True if the marker was removed.\r\n */\r\nMarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) {\r\n var removed = this.removeMarker_(marker);\r\n\r\n if (!opt_nodraw && removed) {\r\n this.resetViewport();\r\n this.redraw();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Removes an array of markers from the cluster.\r\n *\r\n * @param {Array.} markers The markers to remove.\r\n * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\r\n */\r\nMarkerClusterer.prototype.removeMarkers = function(markers, opt_nodraw) {\r\n var removed = false;\r\n\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n var r = this.removeMarker_(marker);\r\n removed = removed || r;\r\n }\r\n\r\n if (!opt_nodraw && removed) {\r\n this.resetViewport();\r\n this.redraw();\r\n return true;\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Sets the clusterer's ready state.\r\n *\r\n * @param {boolean} ready The state.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.setReady_ = function(ready) {\r\n if (!this.ready_) {\r\n this.ready_ = ready;\r\n this.createClusters_();\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Returns the number of clusters in the clusterer.\r\n *\r\n * @return {number} The number of clusters.\r\n */\r\nMarkerClusterer.prototype.getTotalClusters = function() {\r\n return this.clusters_.length;\r\n};\r\n\r\n\r\n/**\r\n * Returns the google map that the clusterer is associated with.\r\n *\r\n * @return {google.maps.Map} The map.\r\n */\r\nMarkerClusterer.prototype.getMap = function() {\r\n return this.map_;\r\n};\r\n\r\n\r\n/**\r\n * Sets the google map that the clusterer is associated with.\r\n *\r\n * @param {google.maps.Map} map The map.\r\n */\r\nMarkerClusterer.prototype.setMap = function(map) {\r\n this.map_ = map;\r\n};\r\n\r\n\r\n/**\r\n * Returns the size of the grid.\r\n *\r\n * @return {number} The grid size.\r\n */\r\nMarkerClusterer.prototype.getGridSize = function() {\r\n return this.gridSize_;\r\n};\r\n\r\n\r\n/**\r\n * Sets the size of the grid.\r\n *\r\n * @param {number} size The grid size.\r\n */\r\nMarkerClusterer.prototype.setGridSize = function(size) {\r\n this.gridSize_ = size;\r\n};\r\n\r\n\r\n/**\r\n * Returns the min cluster size.\r\n *\r\n * @return {number} The grid size.\r\n */\r\nMarkerClusterer.prototype.getMinClusterSize = function() {\r\n return this.minClusterSize_;\r\n};\r\n\r\n/**\r\n * Sets the min cluster size.\r\n *\r\n * @param {number} size The grid size.\r\n */\r\nMarkerClusterer.prototype.setMinClusterSize = function(size) {\r\n this.minClusterSize_ = size;\r\n};\r\n\r\n\r\n/**\r\n * Extends a bounds object by the grid size.\r\n *\r\n * @param {google.maps.LatLngBounds} bounds The bounds to extend.\r\n * @return {google.maps.LatLngBounds} The extended bounds.\r\n */\r\nMarkerClusterer.prototype.getExtendedBounds = function(bounds) {\r\n var projection = this.getProjection();\r\n\r\n // Turn the bounds into latlng.\r\n var tr = new google.maps.LatLng(bounds.getNorthEast().lat(),\r\n bounds.getNorthEast().lng());\r\n var bl = new google.maps.LatLng(bounds.getSouthWest().lat(),\r\n bounds.getSouthWest().lng());\r\n\r\n // Convert the points to pixels and the extend out by the grid size.\r\n var trPix = projection.fromLatLngToDivPixel(tr);\r\n trPix.x += this.gridSize_;\r\n trPix.y -= this.gridSize_;\r\n\r\n var blPix = projection.fromLatLngToDivPixel(bl);\r\n blPix.x -= this.gridSize_;\r\n blPix.y += this.gridSize_;\r\n\r\n // Convert the pixel points back to LatLng\r\n var ne = projection.fromDivPixelToLatLng(trPix);\r\n var sw = projection.fromDivPixelToLatLng(blPix);\r\n\r\n // Extend the bounds to contain the new bounds.\r\n bounds.extend(ne);\r\n bounds.extend(sw);\r\n\r\n return bounds;\r\n};\r\n\r\n\r\n/**\r\n * Determins if a marker is contained in a bounds.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @param {google.maps.LatLngBounds} bounds The bounds to check against.\r\n * @return {boolean} True if the marker is in the bounds.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.isMarkerInBounds_ = function(marker, bounds) {\r\n return bounds.contains(marker.getPosition());\r\n};\r\n\r\n\r\n/**\r\n * Clears all clusters and markers from the clusterer.\r\n */\r\nMarkerClusterer.prototype.clearMarkers = function() {\r\n this.resetViewport(true);\r\n\r\n // Set the markers a empty array.\r\n this.markers_ = [];\r\n};\r\n\r\n\r\n/**\r\n * Clears all existing clusters and recreates them.\r\n * @param {boolean} opt_hide To also hide the marker.\r\n */\r\nMarkerClusterer.prototype.resetViewport = function(opt_hide) {\r\n // Remove all the clusters\r\n for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\r\n cluster.remove();\r\n }\r\n\r\n // Reset the markers to not be added and to be invisible.\r\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n marker.isAdded = false;\r\n if (opt_hide) {\r\n marker.setMap(null);\r\n }\r\n }\r\n\r\n this.clusters_ = [];\r\n};\r\n\r\n/**\r\n *\r\n */\r\nMarkerClusterer.prototype.repaint = function() {\r\n var oldClusters = this.clusters_.slice();\r\n this.clusters_.length = 0;\r\n this.resetViewport();\r\n this.redraw();\r\n\r\n // Remove the old clusters.\r\n // Do it in a timeout so the other clusters have been drawn first.\r\n window.setTimeout(function() {\r\n for (var i = 0, cluster; cluster = oldClusters[i]; i++) {\r\n cluster.remove();\r\n }\r\n }, 0);\r\n};\r\n\r\n\r\n/**\r\n * Redraws the clusters.\r\n */\r\nMarkerClusterer.prototype.redraw = function() {\r\n this.createClusters_();\r\n};\r\n\r\n\r\n/**\r\n * Calculates the distance between two latlng locations in km.\r\n * @see http://www.movable-type.co.uk/scripts/latlong.html\r\n *\r\n * @param {google.maps.LatLng} p1 The first lat lng point.\r\n * @param {google.maps.LatLng} p2 The second lat lng point.\r\n * @return {number} The distance between the two points in km.\r\n * @private\r\n*/\r\nMarkerClusterer.prototype.distanceBetweenPoints_ = function(p1, p2) {\r\n if (!p1 || !p2) {\r\n return 0;\r\n }\r\n\r\n var R = 6371; // Radius of the Earth in km\r\n var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;\r\n var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;\r\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\r\n Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *\r\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\r\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n var d = R * c;\r\n return d;\r\n};\r\n\r\n\r\n/**\r\n * Add a marker to a cluster, or creates a new cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.addToClosestCluster_ = function(marker) {\r\n var distance = 40000; // Some large number\r\n var clusterToAddTo = null;\r\n var pos = marker.getPosition();\r\n for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\r\n var center = cluster.getCenter();\r\n if (center) {\r\n var d = this.distanceBetweenPoints_(center, marker.getPosition());\r\n if (d < distance) {\r\n distance = d;\r\n clusterToAddTo = cluster;\r\n }\r\n }\r\n }\r\n\r\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\r\n clusterToAddTo.addMarker(marker);\r\n } else {\r\n var cluster = new Cluster(this);\r\n cluster.addMarker(marker);\r\n this.clusters_.push(cluster);\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Creates the clusters.\r\n *\r\n * @private\r\n */\r\nMarkerClusterer.prototype.createClusters_ = function() {\r\n if (!this.ready_) {\r\n return;\r\n }\r\n\r\n // Get our current map view bounds.\r\n // Create a new bounds object so we don't affect the map.\r\n var mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),\r\n this.map_.getBounds().getNorthEast());\r\n var bounds = this.getExtendedBounds(mapBounds);\r\n\r\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {\r\n this.addToClosestCluster_(marker);\r\n }\r\n }\r\n};\r\n\r\n\r\n/**\r\n * A cluster that contains markers.\r\n *\r\n * @param {MarkerClusterer} markerClusterer The markerclusterer that this\r\n * cluster is associated with.\r\n * @constructor\r\n * @ignore\r\n */\r\nfunction Cluster(markerClusterer) {\r\n this.markerClusterer_ = markerClusterer;\r\n this.map_ = markerClusterer.getMap();\r\n this.gridSize_ = markerClusterer.getGridSize();\r\n this.minClusterSize_ = markerClusterer.getMinClusterSize();\r\n this.averageCenter_ = markerClusterer.isAverageCenter();\r\n this.center_ = null;\r\n this.markers_ = [];\r\n this.bounds_ = null;\r\n this.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(),\r\n markerClusterer.getGridSize());\r\n}\r\n\r\n/**\r\n * Determins if a marker is already added to the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @return {boolean} True if the marker is already added.\r\n */\r\nCluster.prototype.isMarkerAlreadyAdded = function(marker) {\r\n if (this.markers_.indexOf) {\r\n return this.markers_.indexOf(marker) != -1;\r\n } else {\r\n for (var i = 0, m; m = this.markers_[i]; i++) {\r\n if (m == marker) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n};\r\n\r\n\r\n/**\r\n * Add a marker the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @return {boolean} True if the marker was added.\r\n */\r\nCluster.prototype.addMarker = function(marker) {\r\n if (this.isMarkerAlreadyAdded(marker)) {\r\n return false;\r\n }\r\n\r\n if (!this.center_) {\r\n this.center_ = marker.getPosition();\r\n this.calculateBounds_();\r\n } else {\r\n if (this.averageCenter_) {\r\n var l = this.markers_.length + 1;\r\n var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l;\r\n var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l;\r\n this.center_ = new google.maps.LatLng(lat, lng);\r\n this.calculateBounds_();\r\n }\r\n }\r\n\r\n marker.isAdded = true;\r\n this.markers_.push(marker);\r\n\r\n var len = this.markers_.length;\r\n if (len < this.minClusterSize_ && marker.getMap() != this.map_) {\r\n // Min cluster size not reached so show the marker.\r\n marker.setMap(this.map_);\r\n }\r\n\r\n if (len == this.minClusterSize_) {\r\n // Hide the markers that were showing.\r\n for (var i = 0; i < len; i++) {\r\n this.markers_[i].setMap(null);\r\n }\r\n }\r\n\r\n if (len >= this.minClusterSize_) {\r\n marker.setMap(null);\r\n }\r\n\r\n this.updateIcon();\r\n return true;\r\n};\r\n\r\n\r\n/**\r\n * Returns the marker clusterer that the cluster is associated with.\r\n *\r\n * @return {MarkerClusterer} The associated marker clusterer.\r\n */\r\nCluster.prototype.getMarkerClusterer = function() {\r\n return this.markerClusterer_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the bounds of the cluster.\r\n *\r\n * @return {google.maps.LatLngBounds} the cluster bounds.\r\n */\r\nCluster.prototype.getBounds = function() {\r\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\r\n var markers = this.getMarkers();\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n bounds.extend(marker.getPosition());\r\n }\r\n return bounds;\r\n};\r\n\r\n\r\n/**\r\n * Removes the cluster\r\n */\r\nCluster.prototype.remove = function() {\r\n this.clusterIcon_.remove();\r\n this.markers_.length = 0;\r\n delete this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the center of the cluster.\r\n *\r\n * @return {number} The cluster center.\r\n */\r\nCluster.prototype.getSize = function() {\r\n return this.markers_.length;\r\n};\r\n\r\n\r\n/**\r\n * Returns the center of the cluster.\r\n *\r\n * @return {Array.} The cluster center.\r\n */\r\nCluster.prototype.getMarkers = function() {\r\n return this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the center of the cluster.\r\n *\r\n * @return {google.maps.LatLng} The cluster center.\r\n */\r\nCluster.prototype.getCenter = function() {\r\n return this.center_;\r\n};\r\n\r\n\r\n/**\r\n * Calculated the extended bounds of the cluster with the grid.\r\n *\r\n * @private\r\n */\r\nCluster.prototype.calculateBounds_ = function() {\r\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\r\n this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);\r\n};\r\n\r\n\r\n/**\r\n * Determines if a marker lies in the clusters bounds.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @return {boolean} True if the marker lies in the bounds.\r\n */\r\nCluster.prototype.isMarkerInClusterBounds = function(marker) {\r\n return this.bounds_.contains(marker.getPosition());\r\n};\r\n\r\n\r\n/**\r\n * Returns the map that the cluster is associated with.\r\n *\r\n * @return {google.maps.Map} The map.\r\n */\r\nCluster.prototype.getMap = function() {\r\n return this.map_;\r\n};\r\n\r\n\r\n/**\r\n * Updates the cluster icon\r\n */\r\nCluster.prototype.updateIcon = function() {\r\n var zoom = this.map_.getZoom();\r\n var mz = this.markerClusterer_.getMaxZoom();\r\n\r\n if (mz && zoom > mz) {\r\n // The zoom is greater than our max zoom so show all the markers in cluster.\r\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n marker.setMap(this.map_);\r\n }\r\n return;\r\n }\r\n\r\n if (this.markers_.length < this.minClusterSize_) {\r\n // Min cluster size not yet reached.\r\n this.clusterIcon_.hide();\r\n return;\r\n }\r\n\r\n var numStyles = this.markerClusterer_.getStyles().length;\r\n var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);\r\n this.clusterIcon_.setCenter(this.center_);\r\n this.clusterIcon_.setSums(sums);\r\n this.clusterIcon_.show();\r\n};\r\n\r\n\r\n/**\r\n * A cluster icon\r\n *\r\n * @param {Cluster} cluster The cluster to be associated with.\r\n * @param {Object} styles An object that has style properties:\r\n * 'url': (string) The image url.\r\n * 'height': (number) The image height.\r\n * 'width': (number) The image width.\r\n * 'anchor': (Array) The anchor position of the label text.\r\n * 'textColor': (string) The text color.\r\n * 'textSize': (number) The text size.\r\n * 'backgroundPosition: (string) The background postition x, y.\r\n * @param {number=} opt_padding Optional padding to apply to the cluster icon.\r\n * @constructor\r\n * @extends google.maps.OverlayView\r\n * @ignore\r\n */\r\nfunction ClusterIcon(cluster, styles, opt_padding) {\r\n cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);\r\n\r\n this.styles_ = styles;\r\n this.padding_ = opt_padding || 0;\r\n this.cluster_ = cluster;\r\n this.center_ = null;\r\n this.map_ = cluster.getMap();\r\n this.div_ = null;\r\n this.sums_ = null;\r\n this.visible_ = false;\r\n\r\n this.setMap(this.map_);\r\n}\r\n\r\n\r\n/**\r\n * Triggers the clusterclick event and zoom's if the option is set.\r\n *\r\n * @param {google.maps.MouseEvent} event The event to propagate\r\n */\r\nClusterIcon.prototype.triggerClusterClick = function(event) {\r\n var markerClusterer = this.cluster_.getMarkerClusterer();\r\n\r\n // Trigger the clusterclick event.\r\n google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_, event);\r\n\r\n if (markerClusterer.isZoomOnClick()) {\r\n // Zoom into the cluster.\r\n this.map_.fitBounds(this.cluster_.getBounds());\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Adding the cluster icon to the dom.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.onAdd = function() {\r\n this.div_ = document.createElement('DIV');\r\n if (this.visible_) {\r\n var pos = this.getPosFromLatLng_(this.center_);\r\n this.div_.style.cssText = this.createCss(pos);\r\n this.div_.innerHTML = this.sums_.text;\r\n }\r\n\r\n var panes = this.getPanes();\r\n panes.overlayMouseTarget.appendChild(this.div_);\r\n\r\n var that = this;\r\n var isDragging = false;\r\n google.maps.event.addDomListener(this.div_, 'click', function(event) {\r\n // Only perform click when not preceded by a drag\r\n if (!isDragging) {\r\n that.triggerClusterClick(event);\r\n }\r\n });\r\n google.maps.event.addDomListener(this.div_, 'mousedown', function() {\r\n isDragging = false;\r\n });\r\n google.maps.event.addDomListener(this.div_, 'mousemove', function() {\r\n isDragging = true;\r\n });\r\n};\r\n\r\n\r\n/**\r\n * Returns the position to place the div dending on the latlng.\r\n *\r\n * @param {google.maps.LatLng} latlng The position in latlng.\r\n * @return {google.maps.Point} The position in pixels.\r\n * @private\r\n */\r\nClusterIcon.prototype.getPosFromLatLng_ = function(latlng) {\r\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\r\n\r\n if (typeof this.iconAnchor_ === 'object' && this.iconAnchor_.length === 2) {\r\n pos.x -= this.iconAnchor_[0];\r\n pos.y -= this.iconAnchor_[1];\r\n } else {\r\n pos.x -= parseInt(this.width_ / 2, 10);\r\n pos.y -= parseInt(this.height_ / 2, 10);\r\n }\r\n return pos;\r\n};\r\n\r\n\r\n/**\r\n * Draw the icon.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.draw = function() {\r\n if (this.visible_) {\r\n var pos = this.getPosFromLatLng_(this.center_);\r\n this.div_.style.top = pos.y + 'px';\r\n this.div_.style.left = pos.x + 'px';\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Hide the icon.\r\n */\r\nClusterIcon.prototype.hide = function() {\r\n if (this.div_) {\r\n this.div_.style.display = 'none';\r\n }\r\n this.visible_ = false;\r\n};\r\n\r\n\r\n/**\r\n * Position and show the icon.\r\n */\r\nClusterIcon.prototype.show = function() {\r\n if (this.div_) {\r\n var pos = this.getPosFromLatLng_(this.center_);\r\n this.div_.style.cssText = this.createCss(pos);\r\n this.div_.style.display = '';\r\n }\r\n this.visible_ = true;\r\n};\r\n\r\n\r\n/**\r\n * Remove the icon from the map\r\n */\r\nClusterIcon.prototype.remove = function() {\r\n this.setMap(null);\r\n};\r\n\r\n\r\n/**\r\n * Implementation of the onRemove interface.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.onRemove = function() {\r\n if (this.div_ && this.div_.parentNode) {\r\n this.hide();\r\n this.div_.parentNode.removeChild(this.div_);\r\n this.div_ = null;\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Set the sums of the icon.\r\n *\r\n * @param {Object} sums The sums containing:\r\n * 'text': (string) The text to display in the icon.\r\n * 'index': (number) The style index of the icon.\r\n */\r\nClusterIcon.prototype.setSums = function(sums) {\r\n this.sums_ = sums;\r\n this.text_ = sums.text;\r\n this.index_ = sums.index;\r\n if (this.div_) {\r\n this.div_.innerHTML = sums.text;\r\n }\r\n\r\n this.useStyle();\r\n};\r\n\r\n\r\n/**\r\n * Sets the icon to the the styles.\r\n */\r\nClusterIcon.prototype.useStyle = function() {\r\n var index = Math.max(0, this.sums_.index - 1);\r\n index = Math.min(this.styles_.length - 1, index);\r\n var style = this.styles_[index];\r\n this.url_ = style['url'];\r\n this.height_ = style['height'];\r\n this.width_ = style['width'];\r\n this.textColor_ = style['textColor'];\r\n this.anchor_ = style['anchor'];\r\n this.textSize_ = style['textSize'];\r\n this.backgroundPosition_ = style['backgroundPosition'];\r\n this.iconAnchor_ = style['iconAnchor'];\r\n};\r\n\r\n\r\n/**\r\n * Sets the center of the icon.\r\n *\r\n * @param {google.maps.LatLng} center The latlng to set as the center.\r\n */\r\nClusterIcon.prototype.setCenter = function(center) {\r\n this.center_ = center;\r\n};\r\n\r\n\r\n/**\r\n * Create the css text based on the position of the icon.\r\n *\r\n * @param {google.maps.Point} pos The position.\r\n * @return {string} The css style text.\r\n */\r\nClusterIcon.prototype.createCss = function(pos) {\r\n var style = [];\r\n style.push('background-image:url(' + this.url_ + ');');\r\n var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';\r\n style.push('background-position:' + backgroundPosition + ';');\r\n\r\n if (typeof this.anchor_ === 'object') {\r\n if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&\r\n this.anchor_[0] < this.height_) {\r\n style.push('height:' + (this.height_ - this.anchor_[0]) +\r\n 'px; padding-top:' + this.anchor_[0] + 'px;');\r\n } else if (typeof this.anchor_[0] === 'number' && this.anchor_[0] < 0 &&\r\n -this.anchor_[0] < this.height_) {\r\n style.push('height:' + this.height_ + 'px; line-height:' + (this.height_ + this.anchor_[0]) +\r\n 'px;');\r\n } else {\r\n style.push('height:' + this.height_ + 'px; line-height:' + this.height_ +\r\n 'px;');\r\n }\r\n if (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 &&\r\n this.anchor_[1] < this.width_) {\r\n style.push('width:' + (this.width_ - this.anchor_[1]) +\r\n 'px; padding-left:' + this.anchor_[1] + 'px;');\r\n } else {\r\n style.push('width:' + this.width_ + 'px; text-align:center;');\r\n }\r\n } else {\r\n style.push('height:' + this.height_ + 'px; line-height:' +\r\n this.height_ + 'px; width:' + this.width_ + 'px; text-align:center;');\r\n }\r\n\r\n var txtColor = this.textColor_ ? this.textColor_ : 'black';\r\n var txtSize = this.textSize_ ? this.textSize_ : 11;\r\n\r\n style.push('cursor:pointer; top:' + pos.y + 'px; left:' +\r\n pos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' +\r\n txtSize + 'px; font-family:Arial,sans-serif; font-weight:bold');\r\n return style.join('');\r\n};\r\n\r\n\r\n// Export Symbols for Closure\r\n// If you are not going to compile with closure then you can remove the\r\n// code below.\r\nwindow['MarkerClusterer'] = MarkerClusterer;\r\nMarkerClusterer.prototype['addMarker'] = MarkerClusterer.prototype.addMarker;\r\nMarkerClusterer.prototype['addMarkers'] = MarkerClusterer.prototype.addMarkers;\r\nMarkerClusterer.prototype['clearMarkers'] =\r\n MarkerClusterer.prototype.clearMarkers;\r\nMarkerClusterer.prototype['fitMapToMarkers'] =\r\n MarkerClusterer.prototype.fitMapToMarkers;\r\nMarkerClusterer.prototype['getCalculator'] =\r\n MarkerClusterer.prototype.getCalculator;\r\nMarkerClusterer.prototype['getGridSize'] =\r\n MarkerClusterer.prototype.getGridSize;\r\nMarkerClusterer.prototype['getExtendedBounds'] =\r\n MarkerClusterer.prototype.getExtendedBounds;\r\nMarkerClusterer.prototype['getMap'] = MarkerClusterer.prototype.getMap;\r\nMarkerClusterer.prototype['getMarkers'] = MarkerClusterer.prototype.getMarkers;\r\nMarkerClusterer.prototype['getMaxZoom'] = MarkerClusterer.prototype.getMaxZoom;\r\nMarkerClusterer.prototype['getStyles'] = MarkerClusterer.prototype.getStyles;\r\nMarkerClusterer.prototype['getTotalClusters'] =\r\n MarkerClusterer.prototype.getTotalClusters;\r\nMarkerClusterer.prototype['getTotalMarkers'] =\r\n MarkerClusterer.prototype.getTotalMarkers;\r\nMarkerClusterer.prototype['redraw'] = MarkerClusterer.prototype.redraw;\r\nMarkerClusterer.prototype['removeMarker'] =\r\n MarkerClusterer.prototype.removeMarker;\r\nMarkerClusterer.prototype['removeMarkers'] =\r\n MarkerClusterer.prototype.removeMarkers;\r\nMarkerClusterer.prototype['resetViewport'] =\r\n MarkerClusterer.prototype.resetViewport;\r\nMarkerClusterer.prototype['repaint'] =\r\n MarkerClusterer.prototype.repaint;\r\nMarkerClusterer.prototype['setCalculator'] =\r\n MarkerClusterer.prototype.setCalculator;\r\nMarkerClusterer.prototype['setGridSize'] =\r\n MarkerClusterer.prototype.setGridSize;\r\nMarkerClusterer.prototype['setMaxZoom'] =\r\n MarkerClusterer.prototype.setMaxZoom;\r\nMarkerClusterer.prototype['onAdd'] = MarkerClusterer.prototype.onAdd;\r\nMarkerClusterer.prototype['draw'] = MarkerClusterer.prototype.draw;\r\n\r\nCluster.prototype['getCenter'] = Cluster.prototype.getCenter;\r\nCluster.prototype['getSize'] = Cluster.prototype.getSize;\r\nCluster.prototype['getMarkers'] = Cluster.prototype.getMarkers;\r\n\r\nClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd;\r\nClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw;\r\nClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove;\r\n\n// unique filter used for the reference numbers\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .filter('uniqueRef', uniqueRef);\r\n\r\n /* @ngInject */\r\n function uniqueRef() {\r\n return function (object, field) {\r\n var uniqueArray = [];\r\n for (var key in object) {\r\n if(object[key][field] && uniqueArray.indexOf(object[key][field]) == -1) {\r\n uniqueArray.push(object[key][field]);\r\n }\r\n }\r\n if(uniqueArray.length < 1) uniqueArray.push('N/a');\r\n return uniqueArray;\r\n };\r\n \r\n }\r\n\r\n})();\n// ==ClosureCompiler==\r\n// @compilation_level ADVANCED_OPTIMIZATIONS\r\n// @externs_url https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3.js\r\n// ==/ClosureCompiler==\r\n\r\n/**\r\n * @name MarkerClusterer for Google Maps v3\r\n * @version version 1.0\r\n * @author Luke Mahe\r\n * @fileoverview\r\n * The library creates and manages per-zoom-level clusters for large amounts of\r\n * markers.\r\n *
\r\n * This is a v3 implementation of the\r\n * v2 MarkerClusterer.\r\n */\r\n\r\n/**\r\n * @license\r\n * Copyright 2010 Google Inc. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n\r\n/**\r\n * A Marker Clusterer that clusters markers.\r\n *\r\n * @param {google.maps.Map} map The Google map to attach to.\r\n * @param {Array.=} opt_markers Optional markers to add to\r\n * the cluster.\r\n * @param {Object=} opt_options support the following options:\r\n * 'gridSize': (number) The grid size of a cluster in pixels.\r\n * 'maxZoom': (number) The maximum zoom level that a marker can be part of a\r\n * cluster.\r\n * 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a\r\n * cluster is to zoom into it.\r\n * 'averageCenter': (boolean) Whether the center of each cluster should be\r\n * the average of all markers in the cluster.\r\n * 'minimumClusterSize': (number) The minimum number of markers to be in a\r\n * cluster before the markers are hidden and a count\r\n * is shown.\r\n * 'styles': (object) An object that has style properties:\r\n * 'url': (string) The image url.\r\n * 'height': (number) The image height.\r\n * 'width': (number) The image width.\r\n * 'anchor': (Array) The anchor position of the label text.\r\n * 'textColor': (string) The text color.\r\n * 'textSize': (number) The text size.\r\n * 'backgroundPosition': (string) The position of the backgound x, y.\r\n * 'iconAnchor': (Array) The anchor position of the icon x, y.\r\n * @constructor\r\n * @extends google.maps.OverlayView\r\n */\r\nfunction MarkerClusterer(map, opt_markers, opt_options) {\r\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\r\n // extend function to extend MarkerClusterer with google.maps.OverlayView\r\n // because it might not always be available when the code is defined so we\r\n // look for it at the last possible moment. If it doesn't exist now then\r\n // there is no point going ahead :)\r\n this.extend(MarkerClusterer, google.maps.OverlayView);\r\n this.map_ = map;\r\n\r\n /**\r\n * @type {Array.}\r\n * @private\r\n */\r\n this.markers_ = [];\r\n\r\n /**\r\n * @type {Array.}\r\n */\r\n this.clusters_ = [];\r\n\r\n this.sizes = [53, 56, 66, 78, 90];\r\n\r\n /**\r\n * @private\r\n */\r\n this.styles_ = [];\r\n\r\n /**\r\n * @type {boolean}\r\n * @private\r\n */\r\n this.ready_ = false;\r\n\r\n var options = opt_options || {};\r\n\r\n /**\r\n * @type {number}\r\n * @private\r\n */\r\n this.gridSize_ = options['gridSize'] || 60;\r\n\r\n /**\r\n * @private\r\n */\r\n this.minClusterSize_ = options['minimumClusterSize'] || 2;\r\n\r\n\r\n /**\r\n * @type {?number}\r\n * @private\r\n */\r\n this.maxZoom_ = options['maxZoom'] || null;\r\n\r\n this.styles_ = options['styles'] || [];\r\n\r\n /**\r\n * @type {string}\r\n * @private\r\n */\r\n this.imagePath_ = options['imagePath'] ||\r\n this.MARKER_CLUSTER_IMAGE_PATH_;\r\n\r\n /**\r\n * @type {string}\r\n * @private\r\n */\r\n this.imageExtension_ = options['imageExtension'] ||\r\n this.MARKER_CLUSTER_IMAGE_EXTENSION_;\r\n\r\n /**\r\n * @type {boolean}\r\n * @private\r\n */\r\n this.zoomOnClick_ = true;\r\n\r\n if (options['zoomOnClick'] != undefined) {\r\n this.zoomOnClick_ = options['zoomOnClick'];\r\n }\r\n\r\n /**\r\n * @type {boolean}\r\n * @private\r\n */\r\n this.averageCenter_ = false;\r\n\r\n if (options['averageCenter'] != undefined) {\r\n this.averageCenter_ = options['averageCenter'];\r\n }\r\n\r\n this.setupStyles_();\r\n\r\n this.setMap(map);\r\n\r\n /**\r\n * @type {number}\r\n * @private\r\n */\r\n this.prevZoom_ = this.map_.getZoom();\r\n\r\n // Add the map event listeners\r\n var that = this;\r\n google.maps.event.addListener(this.map_, 'zoom_changed', function() {\r\n var zoom = that.map_.getZoom();\r\n\r\n if (that.prevZoom_ != zoom) {\r\n that.prevZoom_ = zoom;\r\n that.resetViewport();\r\n }\r\n });\r\n\r\n google.maps.event.addListener(this.map_, 'idle', function() {\r\n that.redraw();\r\n });\r\n\r\n // Finally, add the markers\r\n if (opt_markers && opt_markers.length) {\r\n this.addMarkers(opt_markers, false);\r\n }\r\n}\r\n\r\n\r\n/**\r\n * The marker cluster image path.\r\n *\r\n * @type {string}\r\n * @private\r\n */\r\nMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../images/m';\r\n\r\n\r\n/**\r\n * The marker cluster image path.\r\n *\r\n * @type {string}\r\n * @private\r\n */\r\nMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';\r\n\r\n\r\n/**\r\n * Extends a objects prototype by anothers.\r\n *\r\n * @param {Object} obj1 The object to be extended.\r\n * @param {Object} obj2 The object to extend with.\r\n * @return {Object} The new extended object.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.extend = function(obj1, obj2) {\r\n return (function(object) {\r\n for (var property in object.prototype) {\r\n this.prototype[property] = object.prototype[property];\r\n }\r\n return this;\r\n }).apply(obj1, [obj2]);\r\n};\r\n\r\n\r\n/**\r\n * Implementaion of the interface method.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.onAdd = function() {\r\n this.setReady_(true);\r\n};\r\n\r\n/**\r\n * Implementaion of the interface method.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.draw = function() {};\r\n\r\n/**\r\n * Sets up the styles object.\r\n *\r\n * @private\r\n */\r\nMarkerClusterer.prototype.setupStyles_ = function() {\r\n if (this.styles_.length) {\r\n return;\r\n }\r\n\r\n for (var i = 0, size; size = this.sizes[i]; i++) {\r\n this.styles_.push({\r\n url: this.imagePath_ + (i + 1) + '.' + this.imageExtension_,\r\n height: size,\r\n width: size\r\n });\r\n }\r\n};\r\n\r\n/**\r\n * Fit the map to the bounds of the markers in the clusterer.\r\n */\r\nMarkerClusterer.prototype.fitMapToMarkers = function() {\r\n var markers = this.getMarkers();\r\n var bounds = new google.maps.LatLngBounds();\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n bounds.extend(marker.getPosition());\r\n }\r\n\r\n this.map_.fitBounds(bounds);\r\n};\r\n\r\n\r\n/**\r\n * Sets the styles.\r\n *\r\n * @param {Object} styles The style to set.\r\n */\r\nMarkerClusterer.prototype.setStyles = function(styles) {\r\n this.styles_ = styles;\r\n};\r\n\r\n\r\n/**\r\n * Gets the styles.\r\n *\r\n * @return {Object} The styles object.\r\n */\r\nMarkerClusterer.prototype.getStyles = function() {\r\n return this.styles_;\r\n};\r\n\r\n\r\n/**\r\n * Whether zoom on click is set.\r\n *\r\n * @return {boolean} True if zoomOnClick_ is set.\r\n */\r\nMarkerClusterer.prototype.isZoomOnClick = function() {\r\n return this.zoomOnClick_;\r\n};\r\n\r\n/**\r\n * Whether average center is set.\r\n *\r\n * @return {boolean} True if averageCenter_ is set.\r\n */\r\nMarkerClusterer.prototype.isAverageCenter = function() {\r\n return this.averageCenter_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the array of markers in the clusterer.\r\n *\r\n * @return {Array.} The markers.\r\n */\r\nMarkerClusterer.prototype.getMarkers = function() {\r\n return this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the number of markers in the clusterer\r\n *\r\n * @return {Number} The number of markers.\r\n */\r\nMarkerClusterer.prototype.getTotalMarkers = function() {\r\n return this.markers_.length;\r\n};\r\n\r\n\r\n/**\r\n * Sets the max zoom for the clusterer.\r\n *\r\n * @param {number} maxZoom The max zoom level.\r\n */\r\nMarkerClusterer.prototype.setMaxZoom = function(maxZoom) {\r\n this.maxZoom_ = maxZoom;\r\n};\r\n\r\n\r\n/**\r\n * Gets the max zoom for the clusterer.\r\n *\r\n * @return {number} The max zoom level.\r\n */\r\nMarkerClusterer.prototype.getMaxZoom = function() {\r\n return this.maxZoom_;\r\n};\r\n\r\n\r\n/**\r\n * The function for calculating the cluster icon image.\r\n *\r\n * @param {Array.} markers The markers in the clusterer.\r\n * @param {number} numStyles The number of styles available.\r\n * @return {Object} A object properties: 'text' (string) and 'index' (number).\r\n * @private\r\n */\r\nMarkerClusterer.prototype.calculator_ = function(markers, numStyles) {\r\n var index = 0;\r\n var count = markers.length;\r\n var dv = count;\r\n while (dv !== 0) {\r\n dv = parseInt(dv / 10, 10);\r\n index++;\r\n }\r\n\r\n index = Math.min(index, numStyles);\r\n return {\r\n text: count,\r\n index: index\r\n };\r\n};\r\n\r\n\r\n/**\r\n * Set the calculator function.\r\n *\r\n * @param {function(Array, number)} calculator The function to set as the\r\n * calculator. The function should return a object properties:\r\n * 'text' (string) and 'index' (number).\r\n *\r\n */\r\nMarkerClusterer.prototype.setCalculator = function(calculator) {\r\n this.calculator_ = calculator;\r\n};\r\n\r\n\r\n/**\r\n * Get the calculator function.\r\n *\r\n * @return {function(Array, number)} the calculator function.\r\n */\r\nMarkerClusterer.prototype.getCalculator = function() {\r\n return this.calculator_;\r\n};\r\n\r\n\r\n/**\r\n * Add an array of markers to the clusterer.\r\n *\r\n * @param {Array.} markers The markers to add.\r\n * @param {boolean=} opt_nodraw Whether to redraw the clusters.\r\n */\r\nMarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) {\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n this.pushMarkerTo_(marker);\r\n }\r\n if (!opt_nodraw) {\r\n this.redraw();\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Pushes a marker to the clusterer.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.pushMarkerTo_ = function(marker) {\r\n marker.isAdded = false;\r\n if (marker['draggable']) {\r\n // If the marker is draggable add a listener so we update the clusters on\r\n // the drag end.\r\n var that = this;\r\n google.maps.event.addListener(marker, 'dragend', function() {\r\n marker.isAdded = false;\r\n that.repaint();\r\n });\r\n }\r\n this.markers_.push(marker);\r\n};\r\n\r\n\r\n/**\r\n * Adds a marker to the clusterer and redraws if needed.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @param {boolean=} opt_nodraw Whether to redraw the clusters.\r\n */\r\nMarkerClusterer.prototype.addMarker = function(marker, opt_nodraw) {\r\n this.pushMarkerTo_(marker);\r\n if (!opt_nodraw) {\r\n this.redraw();\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Removes a marker and returns true if removed, false if not\r\n *\r\n * @param {google.maps.Marker} marker The marker to remove\r\n * @return {boolean} Whether the marker was removed or not\r\n * @private\r\n */\r\nMarkerClusterer.prototype.removeMarker_ = function(marker) {\r\n var index = -1;\r\n if (this.markers_.indexOf) {\r\n index = this.markers_.indexOf(marker);\r\n } else {\r\n for (var i = 0, m; m = this.markers_[i]; i++) {\r\n if (m == marker) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (index == -1) {\r\n // Marker is not in our list of markers.\r\n return false;\r\n }\r\n\r\n marker.setMap(null);\r\n\r\n this.markers_.splice(index, 1);\r\n\r\n return true;\r\n};\r\n\r\n\r\n/**\r\n * Remove a marker from the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to remove.\r\n * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\r\n * @return {boolean} True if the marker was removed.\r\n */\r\nMarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) {\r\n var removed = this.removeMarker_(marker);\r\n\r\n if (!opt_nodraw && removed) {\r\n this.resetViewport();\r\n this.redraw();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Removes an array of markers from the cluster.\r\n *\r\n * @param {Array.} markers The markers to remove.\r\n * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\r\n */\r\nMarkerClusterer.prototype.removeMarkers = function(markers, opt_nodraw) {\r\n var removed = false;\r\n\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n var r = this.removeMarker_(marker);\r\n removed = removed || r;\r\n }\r\n\r\n if (!opt_nodraw && removed) {\r\n this.resetViewport();\r\n this.redraw();\r\n return true;\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Sets the clusterer's ready state.\r\n *\r\n * @param {boolean} ready The state.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.setReady_ = function(ready) {\r\n if (!this.ready_) {\r\n this.ready_ = ready;\r\n this.createClusters_();\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Returns the number of clusters in the clusterer.\r\n *\r\n * @return {number} The number of clusters.\r\n */\r\nMarkerClusterer.prototype.getTotalClusters = function() {\r\n return this.clusters_.length;\r\n};\r\n\r\n\r\n/**\r\n * Returns the google map that the clusterer is associated with.\r\n *\r\n * @return {google.maps.Map} The map.\r\n */\r\nMarkerClusterer.prototype.getMap = function() {\r\n return this.map_;\r\n};\r\n\r\n\r\n/**\r\n * Sets the google map that the clusterer is associated with.\r\n *\r\n * @param {google.maps.Map} map The map.\r\n */\r\nMarkerClusterer.prototype.setMap = function(map) {\r\n this.map_ = map;\r\n};\r\n\r\n\r\n/**\r\n * Returns the size of the grid.\r\n *\r\n * @return {number} The grid size.\r\n */\r\nMarkerClusterer.prototype.getGridSize = function() {\r\n return this.gridSize_;\r\n};\r\n\r\n\r\n/**\r\n * Sets the size of the grid.\r\n *\r\n * @param {number} size The grid size.\r\n */\r\nMarkerClusterer.prototype.setGridSize = function(size) {\r\n this.gridSize_ = size;\r\n};\r\n\r\n\r\n/**\r\n * Returns the min cluster size.\r\n *\r\n * @return {number} The grid size.\r\n */\r\nMarkerClusterer.prototype.getMinClusterSize = function() {\r\n return this.minClusterSize_;\r\n};\r\n\r\n/**\r\n * Sets the min cluster size.\r\n *\r\n * @param {number} size The grid size.\r\n */\r\nMarkerClusterer.prototype.setMinClusterSize = function(size) {\r\n this.minClusterSize_ = size;\r\n};\r\n\r\n\r\n/**\r\n * Extends a bounds object by the grid size.\r\n *\r\n * @param {google.maps.LatLngBounds} bounds The bounds to extend.\r\n * @return {google.maps.LatLngBounds} The extended bounds.\r\n */\r\nMarkerClusterer.prototype.getExtendedBounds = function(bounds) {\r\n var projection = this.getProjection();\r\n\r\n // Turn the bounds into latlng.\r\n var tr = new google.maps.LatLng(bounds.getNorthEast().lat(),\r\n bounds.getNorthEast().lng());\r\n var bl = new google.maps.LatLng(bounds.getSouthWest().lat(),\r\n bounds.getSouthWest().lng());\r\n\r\n // Convert the points to pixels and the extend out by the grid size.\r\n var trPix = projection.fromLatLngToDivPixel(tr);\r\n trPix.x += this.gridSize_;\r\n trPix.y -= this.gridSize_;\r\n\r\n var blPix = projection.fromLatLngToDivPixel(bl);\r\n blPix.x -= this.gridSize_;\r\n blPix.y += this.gridSize_;\r\n\r\n // Convert the pixel points back to LatLng\r\n var ne = projection.fromDivPixelToLatLng(trPix);\r\n var sw = projection.fromDivPixelToLatLng(blPix);\r\n\r\n // Extend the bounds to contain the new bounds.\r\n bounds.extend(ne);\r\n bounds.extend(sw);\r\n\r\n return bounds;\r\n};\r\n\r\n\r\n/**\r\n * Determins if a marker is contained in a bounds.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @param {google.maps.LatLngBounds} bounds The bounds to check against.\r\n * @return {boolean} True if the marker is in the bounds.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.isMarkerInBounds_ = function(marker, bounds) {\r\n return bounds.contains(marker.getPosition());\r\n};\r\n\r\n\r\n/**\r\n * Clears all clusters and markers from the clusterer.\r\n */\r\nMarkerClusterer.prototype.clearMarkers = function() {\r\n this.resetViewport(true);\r\n\r\n // Set the markers a empty array.\r\n this.markers_ = [];\r\n};\r\n\r\n\r\n/**\r\n * Clears all existing clusters and recreates them.\r\n * @param {boolean} opt_hide To also hide the marker.\r\n */\r\nMarkerClusterer.prototype.resetViewport = function(opt_hide) {\r\n // Remove all the clusters\r\n for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\r\n cluster.remove();\r\n }\r\n\r\n // Reset the markers to not be added and to be invisible.\r\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n marker.isAdded = false;\r\n if (opt_hide) {\r\n marker.setMap(null);\r\n }\r\n }\r\n\r\n this.clusters_ = [];\r\n};\r\n\r\n/**\r\n *\r\n */\r\nMarkerClusterer.prototype.repaint = function() {\r\n var oldClusters = this.clusters_.slice();\r\n this.clusters_.length = 0;\r\n this.resetViewport();\r\n this.redraw();\r\n\r\n // Remove the old clusters.\r\n // Do it in a timeout so the other clusters have been drawn first.\r\n window.setTimeout(function() {\r\n for (var i = 0, cluster; cluster = oldClusters[i]; i++) {\r\n cluster.remove();\r\n }\r\n }, 0);\r\n};\r\n\r\n\r\n/**\r\n * Redraws the clusters.\r\n */\r\nMarkerClusterer.prototype.redraw = function() {\r\n this.createClusters_();\r\n};\r\n\r\n\r\n/**\r\n * Calculates the distance between two latlng locations in km.\r\n * @see http://www.movable-type.co.uk/scripts/latlong.html\r\n *\r\n * @param {google.maps.LatLng} p1 The first lat lng point.\r\n * @param {google.maps.LatLng} p2 The second lat lng point.\r\n * @return {number} The distance between the two points in km.\r\n * @private\r\n*/\r\nMarkerClusterer.prototype.distanceBetweenPoints_ = function(p1, p2) {\r\n if (!p1 || !p2) {\r\n return 0;\r\n }\r\n\r\n var R = 6371; // Radius of the Earth in km\r\n var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;\r\n var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;\r\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\r\n Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *\r\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\r\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n var d = R * c;\r\n return d;\r\n};\r\n\r\n\r\n/**\r\n * Add a marker to a cluster, or creates a new cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.addToClosestCluster_ = function(marker) {\r\n var distance = 40000; // Some large number\r\n var clusterToAddTo = null;\r\n var pos = marker.getPosition();\r\n for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\r\n var center = cluster.getCenter();\r\n if (center) {\r\n var d = this.distanceBetweenPoints_(center, marker.getPosition());\r\n if (d < distance) {\r\n distance = d;\r\n clusterToAddTo = cluster;\r\n }\r\n }\r\n }\r\n\r\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\r\n clusterToAddTo.addMarker(marker);\r\n } else {\r\n var cluster = new Cluster(this);\r\n cluster.addMarker(marker);\r\n this.clusters_.push(cluster);\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Creates the clusters.\r\n *\r\n * @private\r\n */\r\nMarkerClusterer.prototype.createClusters_ = function() {\r\n if (!this.ready_) {\r\n return;\r\n }\r\n\r\n // Get our current map view bounds.\r\n // Create a new bounds object so we don't affect the map.\r\n var mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),\r\n this.map_.getBounds().getNorthEast());\r\n var bounds = this.getExtendedBounds(mapBounds);\r\n\r\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {\r\n this.addToClosestCluster_(marker);\r\n }\r\n }\r\n};\r\n\r\n\r\n/**\r\n * A cluster that contains markers.\r\n *\r\n * @param {MarkerClusterer} markerClusterer The markerclusterer that this\r\n * cluster is associated with.\r\n * @constructor\r\n * @ignore\r\n */\r\nfunction Cluster(markerClusterer) {\r\n this.markerClusterer_ = markerClusterer;\r\n this.map_ = markerClusterer.getMap();\r\n this.gridSize_ = markerClusterer.getGridSize();\r\n this.minClusterSize_ = markerClusterer.getMinClusterSize();\r\n this.averageCenter_ = markerClusterer.isAverageCenter();\r\n this.center_ = null;\r\n this.markers_ = [];\r\n this.bounds_ = null;\r\n this.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(),\r\n markerClusterer.getGridSize());\r\n}\r\n\r\n/**\r\n * Determins if a marker is already added to the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @return {boolean} True if the marker is already added.\r\n */\r\nCluster.prototype.isMarkerAlreadyAdded = function(marker) {\r\n if (this.markers_.indexOf) {\r\n return this.markers_.indexOf(marker) != -1;\r\n } else {\r\n for (var i = 0, m; m = this.markers_[i]; i++) {\r\n if (m == marker) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n};\r\n\r\n\r\n/**\r\n * Add a marker the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @return {boolean} True if the marker was added.\r\n */\r\nCluster.prototype.addMarker = function(marker) {\r\n if (this.isMarkerAlreadyAdded(marker)) {\r\n return false;\r\n }\r\n\r\n if (!this.center_) {\r\n this.center_ = marker.getPosition();\r\n this.calculateBounds_();\r\n } else {\r\n if (this.averageCenter_) {\r\n var l = this.markers_.length + 1;\r\n var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l;\r\n var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l;\r\n this.center_ = new google.maps.LatLng(lat, lng);\r\n this.calculateBounds_();\r\n }\r\n }\r\n\r\n marker.isAdded = true;\r\n this.markers_.push(marker);\r\n\r\n var len = this.markers_.length;\r\n if (len < this.minClusterSize_ && marker.getMap() != this.map_) {\r\n // Min cluster size not reached so show the marker.\r\n marker.setMap(this.map_);\r\n }\r\n\r\n if (len == this.minClusterSize_) {\r\n // Hide the markers that were showing.\r\n for (var i = 0; i < len; i++) {\r\n this.markers_[i].setMap(null);\r\n }\r\n }\r\n\r\n if (len >= this.minClusterSize_) {\r\n marker.setMap(null);\r\n }\r\n\r\n this.updateIcon();\r\n return true;\r\n};\r\n\r\n\r\n/**\r\n * Returns the marker clusterer that the cluster is associated with.\r\n *\r\n * @return {MarkerClusterer} The associated marker clusterer.\r\n */\r\nCluster.prototype.getMarkerClusterer = function() {\r\n return this.markerClusterer_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the bounds of the cluster.\r\n *\r\n * @return {google.maps.LatLngBounds} the cluster bounds.\r\n */\r\nCluster.prototype.getBounds = function() {\r\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\r\n var markers = this.getMarkers();\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n bounds.extend(marker.getPosition());\r\n }\r\n return bounds;\r\n};\r\n\r\n\r\n/**\r\n * Removes the cluster\r\n */\r\nCluster.prototype.remove = function() {\r\n this.clusterIcon_.remove();\r\n this.markers_.length = 0;\r\n delete this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the center of the cluster.\r\n *\r\n * @return {number} The cluster center.\r\n */\r\nCluster.prototype.getSize = function() {\r\n return this.markers_.length;\r\n};\r\n\r\n\r\n/**\r\n * Returns the center of the cluster.\r\n *\r\n * @return {Array.} The cluster center.\r\n */\r\nCluster.prototype.getMarkers = function() {\r\n return this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the center of the cluster.\r\n *\r\n * @return {google.maps.LatLng} The cluster center.\r\n */\r\nCluster.prototype.getCenter = function() {\r\n return this.center_;\r\n};\r\n\r\n\r\n/**\r\n * Calculated the extended bounds of the cluster with the grid.\r\n *\r\n * @private\r\n */\r\nCluster.prototype.calculateBounds_ = function() {\r\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\r\n this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);\r\n};\r\n\r\n\r\n/**\r\n * Determines if a marker lies in the clusters bounds.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @return {boolean} True if the marker lies in the bounds.\r\n */\r\nCluster.prototype.isMarkerInClusterBounds = function(marker) {\r\n return this.bounds_.contains(marker.getPosition());\r\n};\r\n\r\n\r\n/**\r\n * Returns the map that the cluster is associated with.\r\n *\r\n * @return {google.maps.Map} The map.\r\n */\r\nCluster.prototype.getMap = function() {\r\n return this.map_;\r\n};\r\n\r\n\r\n/**\r\n * Updates the cluster icon\r\n */\r\nCluster.prototype.updateIcon = function() {\r\n var zoom = this.map_.getZoom();\r\n var mz = this.markerClusterer_.getMaxZoom();\r\n\r\n if (mz && zoom > mz) {\r\n // The zoom is greater than our max zoom so show all the markers in cluster.\r\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n marker.setMap(this.map_);\r\n }\r\n return;\r\n }\r\n\r\n if (this.markers_.length < this.minClusterSize_) {\r\n // Min cluster size not yet reached.\r\n this.clusterIcon_.hide();\r\n return;\r\n }\r\n\r\n var numStyles = this.markerClusterer_.getStyles().length;\r\n var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);\r\n this.clusterIcon_.setCenter(this.center_);\r\n this.clusterIcon_.setSums(sums);\r\n this.clusterIcon_.show();\r\n};\r\n\r\n\r\n/**\r\n * A cluster icon\r\n *\r\n * @param {Cluster} cluster The cluster to be associated with.\r\n * @param {Object} styles An object that has style properties:\r\n * 'url': (string) The image url.\r\n * 'height': (number) The image height.\r\n * 'width': (number) The image width.\r\n * 'anchor': (Array) The anchor position of the label text.\r\n * 'textColor': (string) The text color.\r\n * 'textSize': (number) The text size.\r\n * 'backgroundPosition: (string) The background postition x, y.\r\n * @param {number=} opt_padding Optional padding to apply to the cluster icon.\r\n * @constructor\r\n * @extends google.maps.OverlayView\r\n * @ignore\r\n */\r\nfunction ClusterIcon(cluster, styles, opt_padding) {\r\n cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);\r\n\r\n this.styles_ = styles;\r\n this.padding_ = opt_padding || 0;\r\n this.cluster_ = cluster;\r\n this.center_ = null;\r\n this.map_ = cluster.getMap();\r\n this.div_ = null;\r\n this.sums_ = null;\r\n this.visible_ = false;\r\n\r\n this.setMap(this.map_);\r\n}\r\n\r\n\r\n/**\r\n * Triggers the clusterclick event and zoom's if the option is set.\r\n *\r\n * @param {google.maps.MouseEvent} event The event to propagate\r\n */\r\nClusterIcon.prototype.triggerClusterClick = function(event) {\r\n var markerClusterer = this.cluster_.getMarkerClusterer();\r\n\r\n // Trigger the clusterclick event.\r\n google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_, event);\r\n\r\n if (markerClusterer.isZoomOnClick()) {\r\n // Zoom into the cluster.\r\n this.map_.fitBounds(this.cluster_.getBounds());\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Adding the cluster icon to the dom.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.onAdd = function() {\r\n this.div_ = document.createElement('DIV');\r\n if (this.visible_) {\r\n var pos = this.getPosFromLatLng_(this.center_);\r\n this.div_.style.cssText = this.createCss(pos);\r\n this.div_.innerHTML = this.sums_.text;\r\n }\r\n\r\n var panes = this.getPanes();\r\n panes.overlayMouseTarget.appendChild(this.div_);\r\n\r\n var that = this;\r\n var isDragging = false;\r\n google.maps.event.addDomListener(this.div_, 'click', function(event) {\r\n // Only perform click when not preceded by a drag\r\n if (!isDragging) {\r\n that.triggerClusterClick(event);\r\n }\r\n });\r\n google.maps.event.addDomListener(this.div_, 'mousedown', function() {\r\n isDragging = false;\r\n });\r\n google.maps.event.addDomListener(this.div_, 'mousemove', function() {\r\n isDragging = true;\r\n });\r\n};\r\n\r\n\r\n/**\r\n * Returns the position to place the div dending on the latlng.\r\n *\r\n * @param {google.maps.LatLng} latlng The position in latlng.\r\n * @return {google.maps.Point} The position in pixels.\r\n * @private\r\n */\r\nClusterIcon.prototype.getPosFromLatLng_ = function(latlng) {\r\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\r\n\r\n if (typeof this.iconAnchor_ === 'object' && this.iconAnchor_.length === 2) {\r\n pos.x -= this.iconAnchor_[0];\r\n pos.y -= this.iconAnchor_[1];\r\n } else {\r\n pos.x -= parseInt(this.width_ / 2, 10);\r\n pos.y -= parseInt(this.height_ / 2, 10);\r\n }\r\n return pos;\r\n};\r\n\r\n\r\n/**\r\n * Draw the icon.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.draw = function() {\r\n if (this.visible_) {\r\n var pos = this.getPosFromLatLng_(this.center_);\r\n this.div_.style.top = pos.y + 'px';\r\n this.div_.style.left = pos.x + 'px';\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Hide the icon.\r\n */\r\nClusterIcon.prototype.hide = function() {\r\n if (this.div_) {\r\n this.div_.style.display = 'none';\r\n }\r\n this.visible_ = false;\r\n};\r\n\r\n\r\n/**\r\n * Position and show the icon.\r\n */\r\nClusterIcon.prototype.show = function() {\r\n if (this.div_) {\r\n var pos = this.getPosFromLatLng_(this.center_);\r\n this.div_.style.cssText = this.createCss(pos);\r\n this.div_.style.display = '';\r\n }\r\n this.visible_ = true;\r\n};\r\n\r\n\r\n/**\r\n * Remove the icon from the map\r\n */\r\nClusterIcon.prototype.remove = function() {\r\n this.setMap(null);\r\n};\r\n\r\n\r\n/**\r\n * Implementation of the onRemove interface.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.onRemove = function() {\r\n if (this.div_ && this.div_.parentNode) {\r\n this.hide();\r\n this.div_.parentNode.removeChild(this.div_);\r\n this.div_ = null;\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Set the sums of the icon.\r\n *\r\n * @param {Object} sums The sums containing:\r\n * 'text': (string) The text to display in the icon.\r\n * 'index': (number) The style index of the icon.\r\n */\r\nClusterIcon.prototype.setSums = function(sums) {\r\n this.sums_ = sums;\r\n this.text_ = sums.text;\r\n this.index_ = sums.index;\r\n if (this.div_) {\r\n this.div_.innerHTML = sums.text;\r\n }\r\n\r\n this.useStyle();\r\n};\r\n\r\n\r\n/**\r\n * Sets the icon to the the styles.\r\n */\r\nClusterIcon.prototype.useStyle = function() {\r\n var index = Math.max(0, this.sums_.index - 1);\r\n index = Math.min(this.styles_.length - 1, index);\r\n var style = this.styles_[index];\r\n this.url_ = style['url'];\r\n this.height_ = style['height'];\r\n this.width_ = style['width'];\r\n this.textColor_ = style['textColor'];\r\n this.anchor_ = style['anchor'];\r\n this.textSize_ = style['textSize'];\r\n this.backgroundPosition_ = style['backgroundPosition'];\r\n this.iconAnchor_ = style['iconAnchor'];\r\n};\r\n\r\n\r\n/**\r\n * Sets the center of the icon.\r\n *\r\n * @param {google.maps.LatLng} center The latlng to set as the center.\r\n */\r\nClusterIcon.prototype.setCenter = function(center) {\r\n this.center_ = center;\r\n};\r\n\r\n\r\n/**\r\n * Create the css text based on the position of the icon.\r\n *\r\n * @param {google.maps.Point} pos The position.\r\n * @return {string} The css style text.\r\n */\r\nClusterIcon.prototype.createCss = function(pos) {\r\n var style = [];\r\n style.push('background-image:url(' + this.url_ + ');');\r\n var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';\r\n style.push('background-position:' + backgroundPosition + ';');\r\n\r\n if (typeof this.anchor_ === 'object') {\r\n if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&\r\n this.anchor_[0] < this.height_) {\r\n style.push('height:' + (this.height_ - this.anchor_[0]) +\r\n 'px; padding-top:' + this.anchor_[0] + 'px;');\r\n } else if (typeof this.anchor_[0] === 'number' && this.anchor_[0] < 0 &&\r\n -this.anchor_[0] < this.height_) {\r\n style.push('height:' + this.height_ + 'px; line-height:' + (this.height_ + this.anchor_[0]) +\r\n 'px;');\r\n } else {\r\n style.push('height:' + this.height_ + 'px; line-height:' + this.height_ +\r\n 'px;');\r\n }\r\n if (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 &&\r\n this.anchor_[1] < this.width_) {\r\n style.push('width:' + (this.width_ - this.anchor_[1]) +\r\n 'px; padding-left:' + this.anchor_[1] + 'px;');\r\n } else {\r\n style.push('width:' + this.width_ + 'px; text-align:center;');\r\n }\r\n } else {\r\n style.push('height:' + this.height_ + 'px; line-height:' +\r\n this.height_ + 'px; width:' + this.width_ + 'px; text-align:center;');\r\n }\r\n\r\n var txtColor = this.textColor_ ? this.textColor_ : 'black';\r\n var txtSize = this.textSize_ ? this.textSize_ : 11;\r\n\r\n style.push('cursor:pointer; top:' + pos.y + 'px; left:' +\r\n pos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' +\r\n txtSize + 'px; font-family:Arial,sans-serif; font-weight:bold');\r\n return style.join('');\r\n};\r\n\r\n\r\n// Export Symbols for Closure\r\n// If you are not going to compile with closure then you can remove the\r\n// code below.\r\nwindow['MarkerClusterer'] = MarkerClusterer;\r\nMarkerClusterer.prototype['addMarker'] = MarkerClusterer.prototype.addMarker;\r\nMarkerClusterer.prototype['addMarkers'] = MarkerClusterer.prototype.addMarkers;\r\nMarkerClusterer.prototype['clearMarkers'] =\r\n MarkerClusterer.prototype.clearMarkers;\r\nMarkerClusterer.prototype['fitMapToMarkers'] =\r\n MarkerClusterer.prototype.fitMapToMarkers;\r\nMarkerClusterer.prototype['getCalculator'] =\r\n MarkerClusterer.prototype.getCalculator;\r\nMarkerClusterer.prototype['getGridSize'] =\r\n MarkerClusterer.prototype.getGridSize;\r\nMarkerClusterer.prototype['getExtendedBounds'] =\r\n MarkerClusterer.prototype.getExtendedBounds;\r\nMarkerClusterer.prototype['getMap'] = MarkerClusterer.prototype.getMap;\r\nMarkerClusterer.prototype['getMarkers'] = MarkerClusterer.prototype.getMarkers;\r\nMarkerClusterer.prototype['getMaxZoom'] = MarkerClusterer.prototype.getMaxZoom;\r\nMarkerClusterer.prototype['getStyles'] = MarkerClusterer.prototype.getStyles;\r\nMarkerClusterer.prototype['getTotalClusters'] =\r\n MarkerClusterer.prototype.getTotalClusters;\r\nMarkerClusterer.prototype['getTotalMarkers'] =\r\n MarkerClusterer.prototype.getTotalMarkers;\r\nMarkerClusterer.prototype['redraw'] = MarkerClusterer.prototype.redraw;\r\nMarkerClusterer.prototype['removeMarker'] =\r\n MarkerClusterer.prototype.removeMarker;\r\nMarkerClusterer.prototype['removeMarkers'] =\r\n MarkerClusterer.prototype.removeMarkers;\r\nMarkerClusterer.prototype['resetViewport'] =\r\n MarkerClusterer.prototype.resetViewport;\r\nMarkerClusterer.prototype['repaint'] =\r\n MarkerClusterer.prototype.repaint;\r\nMarkerClusterer.prototype['setCalculator'] =\r\n MarkerClusterer.prototype.setCalculator;\r\nMarkerClusterer.prototype['setGridSize'] =\r\n MarkerClusterer.prototype.setGridSize;\r\nMarkerClusterer.prototype['setMaxZoom'] =\r\n MarkerClusterer.prototype.setMaxZoom;\r\nMarkerClusterer.prototype['onAdd'] = MarkerClusterer.prototype.onAdd;\r\nMarkerClusterer.prototype['draw'] = MarkerClusterer.prototype.draw;\r\n\r\nCluster.prototype['getCenter'] = Cluster.prototype.getCenter;\r\nCluster.prototype['getSize'] = Cluster.prototype.getSize;\r\nCluster.prototype['getMarkers'] = Cluster.prototype.getMarkers;\r\n\r\nClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd;\r\nClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw;\r\nClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove;\r\n\n// unique filter used for the reference numbers\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .filter('uniqueRef', uniqueRef);\r\n\r\n /* @ngInject */\r\n function uniqueRef() {\r\n return function (object, field) {\r\n var uniqueArray = [];\r\n for (var key in object) {\r\n if(object[key][field] && uniqueArray.indexOf(object[key][field]) == -1) {\r\n uniqueArray.push(object[key][field]);\r\n }\r\n }\r\n if(uniqueArray.length < 1) uniqueArray.push('N/a');\r\n return uniqueArray;\r\n };\r\n \r\n }\r\n\r\n})();\n// ==ClosureCompiler==\r\n// @compilation_level ADVANCED_OPTIMIZATIONS\r\n// @externs_url https://raw.githubusercontent.com/google/closure-compiler/master/contrib/externs/maps/google_maps_api_v3.js\r\n// ==/ClosureCompiler==\r\n\r\n/**\r\n * @name MarkerClusterer for Google Maps v3\r\n * @version version 1.0\r\n * @author Luke Mahe\r\n * @fileoverview\r\n * The library creates and manages per-zoom-level clusters for large amounts of\r\n * markers.\r\n *
\r\n * This is a v3 implementation of the\r\n * v2 MarkerClusterer.\r\n */\r\n\r\n/**\r\n * @license\r\n * Copyright 2010 Google Inc. All Rights Reserved.\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n\r\n/**\r\n * A Marker Clusterer that clusters markers.\r\n *\r\n * @param {google.maps.Map} map The Google map to attach to.\r\n * @param {Array.=} opt_markers Optional markers to add to\r\n * the cluster.\r\n * @param {Object=} opt_options support the following options:\r\n * 'gridSize': (number) The grid size of a cluster in pixels.\r\n * 'maxZoom': (number) The maximum zoom level that a marker can be part of a\r\n * cluster.\r\n * 'zoomOnClick': (boolean) Whether the default behaviour of clicking on a\r\n * cluster is to zoom into it.\r\n * 'averageCenter': (boolean) Whether the center of each cluster should be\r\n * the average of all markers in the cluster.\r\n * 'minimumClusterSize': (number) The minimum number of markers to be in a\r\n * cluster before the markers are hidden and a count\r\n * is shown.\r\n * 'styles': (object) An object that has style properties:\r\n * 'url': (string) The image url.\r\n * 'height': (number) The image height.\r\n * 'width': (number) The image width.\r\n * 'anchor': (Array) The anchor position of the label text.\r\n * 'textColor': (string) The text color.\r\n * 'textSize': (number) The text size.\r\n * 'backgroundPosition': (string) The position of the backgound x, y.\r\n * 'iconAnchor': (Array) The anchor position of the icon x, y.\r\n * @constructor\r\n * @extends google.maps.OverlayView\r\n */\r\nfunction MarkerClusterer(map, opt_markers, opt_options) {\r\n // MarkerClusterer implements google.maps.OverlayView interface. We use the\r\n // extend function to extend MarkerClusterer with google.maps.OverlayView\r\n // because it might not always be available when the code is defined so we\r\n // look for it at the last possible moment. If it doesn't exist now then\r\n // there is no point going ahead :)\r\n this.extend(MarkerClusterer, google.maps.OverlayView);\r\n this.map_ = map;\r\n\r\n /**\r\n * @type {Array.}\r\n * @private\r\n */\r\n this.markers_ = [];\r\n\r\n /**\r\n * @type {Array.}\r\n */\r\n this.clusters_ = [];\r\n\r\n this.sizes = [53, 56, 66, 78, 90];\r\n\r\n /**\r\n * @private\r\n */\r\n this.styles_ = [];\r\n\r\n /**\r\n * @type {boolean}\r\n * @private\r\n */\r\n this.ready_ = false;\r\n\r\n var options = opt_options || {};\r\n\r\n /**\r\n * @type {number}\r\n * @private\r\n */\r\n this.gridSize_ = options['gridSize'] || 60;\r\n\r\n /**\r\n * @private\r\n */\r\n this.minClusterSize_ = options['minimumClusterSize'] || 2;\r\n\r\n\r\n /**\r\n * @type {?number}\r\n * @private\r\n */\r\n this.maxZoom_ = options['maxZoom'] || null;\r\n\r\n this.styles_ = options['styles'] || [];\r\n\r\n /**\r\n * @type {string}\r\n * @private\r\n */\r\n this.imagePath_ = options['imagePath'] ||\r\n this.MARKER_CLUSTER_IMAGE_PATH_;\r\n\r\n /**\r\n * @type {string}\r\n * @private\r\n */\r\n this.imageExtension_ = options['imageExtension'] ||\r\n this.MARKER_CLUSTER_IMAGE_EXTENSION_;\r\n\r\n /**\r\n * @type {boolean}\r\n * @private\r\n */\r\n this.zoomOnClick_ = true;\r\n\r\n if (options['zoomOnClick'] != undefined) {\r\n this.zoomOnClick_ = options['zoomOnClick'];\r\n }\r\n\r\n /**\r\n * @type {boolean}\r\n * @private\r\n */\r\n this.averageCenter_ = false;\r\n\r\n if (options['averageCenter'] != undefined) {\r\n this.averageCenter_ = options['averageCenter'];\r\n }\r\n\r\n this.setupStyles_();\r\n\r\n this.setMap(map);\r\n\r\n /**\r\n * @type {number}\r\n * @private\r\n */\r\n this.prevZoom_ = this.map_.getZoom();\r\n\r\n // Add the map event listeners\r\n var that = this;\r\n google.maps.event.addListener(this.map_, 'zoom_changed', function() {\r\n var zoom = that.map_.getZoom();\r\n\r\n if (that.prevZoom_ != zoom) {\r\n that.prevZoom_ = zoom;\r\n that.resetViewport();\r\n }\r\n });\r\n\r\n google.maps.event.addListener(this.map_, 'idle', function() {\r\n that.redraw();\r\n });\r\n\r\n // Finally, add the markers\r\n if (opt_markers && opt_markers.length) {\r\n this.addMarkers(opt_markers, false);\r\n }\r\n}\r\n\r\n\r\n/**\r\n * The marker cluster image path.\r\n *\r\n * @type {string}\r\n * @private\r\n */\r\nMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_PATH_ = '../images/m';\r\n\r\n\r\n/**\r\n * The marker cluster image path.\r\n *\r\n * @type {string}\r\n * @private\r\n */\r\nMarkerClusterer.prototype.MARKER_CLUSTER_IMAGE_EXTENSION_ = 'png';\r\n\r\n\r\n/**\r\n * Extends a objects prototype by anothers.\r\n *\r\n * @param {Object} obj1 The object to be extended.\r\n * @param {Object} obj2 The object to extend with.\r\n * @return {Object} The new extended object.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.extend = function(obj1, obj2) {\r\n return (function(object) {\r\n for (var property in object.prototype) {\r\n this.prototype[property] = object.prototype[property];\r\n }\r\n return this;\r\n }).apply(obj1, [obj2]);\r\n};\r\n\r\n\r\n/**\r\n * Implementaion of the interface method.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.onAdd = function() {\r\n this.setReady_(true);\r\n};\r\n\r\n/**\r\n * Implementaion of the interface method.\r\n * @ignore\r\n */\r\nMarkerClusterer.prototype.draw = function() {};\r\n\r\n/**\r\n * Sets up the styles object.\r\n *\r\n * @private\r\n */\r\nMarkerClusterer.prototype.setupStyles_ = function() {\r\n if (this.styles_.length) {\r\n return;\r\n }\r\n\r\n for (var i = 0, size; size = this.sizes[i]; i++) {\r\n this.styles_.push({\r\n url: this.imagePath_ + (i + 1) + '.' + this.imageExtension_,\r\n height: size,\r\n width: size\r\n });\r\n }\r\n};\r\n\r\n/**\r\n * Fit the map to the bounds of the markers in the clusterer.\r\n */\r\nMarkerClusterer.prototype.fitMapToMarkers = function() {\r\n var markers = this.getMarkers();\r\n var bounds = new google.maps.LatLngBounds();\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n bounds.extend(marker.getPosition());\r\n }\r\n\r\n this.map_.fitBounds(bounds);\r\n};\r\n\r\n\r\n/**\r\n * Sets the styles.\r\n *\r\n * @param {Object} styles The style to set.\r\n */\r\nMarkerClusterer.prototype.setStyles = function(styles) {\r\n this.styles_ = styles;\r\n};\r\n\r\n\r\n/**\r\n * Gets the styles.\r\n *\r\n * @return {Object} The styles object.\r\n */\r\nMarkerClusterer.prototype.getStyles = function() {\r\n return this.styles_;\r\n};\r\n\r\n\r\n/**\r\n * Whether zoom on click is set.\r\n *\r\n * @return {boolean} True if zoomOnClick_ is set.\r\n */\r\nMarkerClusterer.prototype.isZoomOnClick = function() {\r\n return this.zoomOnClick_;\r\n};\r\n\r\n/**\r\n * Whether average center is set.\r\n *\r\n * @return {boolean} True if averageCenter_ is set.\r\n */\r\nMarkerClusterer.prototype.isAverageCenter = function() {\r\n return this.averageCenter_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the array of markers in the clusterer.\r\n *\r\n * @return {Array.} The markers.\r\n */\r\nMarkerClusterer.prototype.getMarkers = function() {\r\n return this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the number of markers in the clusterer\r\n *\r\n * @return {Number} The number of markers.\r\n */\r\nMarkerClusterer.prototype.getTotalMarkers = function() {\r\n return this.markers_.length;\r\n};\r\n\r\n\r\n/**\r\n * Sets the max zoom for the clusterer.\r\n *\r\n * @param {number} maxZoom The max zoom level.\r\n */\r\nMarkerClusterer.prototype.setMaxZoom = function(maxZoom) {\r\n this.maxZoom_ = maxZoom;\r\n};\r\n\r\n\r\n/**\r\n * Gets the max zoom for the clusterer.\r\n *\r\n * @return {number} The max zoom level.\r\n */\r\nMarkerClusterer.prototype.getMaxZoom = function() {\r\n return this.maxZoom_;\r\n};\r\n\r\n\r\n/**\r\n * The function for calculating the cluster icon image.\r\n *\r\n * @param {Array.} markers The markers in the clusterer.\r\n * @param {number} numStyles The number of styles available.\r\n * @return {Object} A object properties: 'text' (string) and 'index' (number).\r\n * @private\r\n */\r\nMarkerClusterer.prototype.calculator_ = function(markers, numStyles) {\r\n var index = 0;\r\n var count = markers.length;\r\n var dv = count;\r\n while (dv !== 0) {\r\n dv = parseInt(dv / 10, 10);\r\n index++;\r\n }\r\n\r\n index = Math.min(index, numStyles);\r\n return {\r\n text: count,\r\n index: index\r\n };\r\n};\r\n\r\n\r\n/**\r\n * Set the calculator function.\r\n *\r\n * @param {function(Array, number)} calculator The function to set as the\r\n * calculator. The function should return a object properties:\r\n * 'text' (string) and 'index' (number).\r\n *\r\n */\r\nMarkerClusterer.prototype.setCalculator = function(calculator) {\r\n this.calculator_ = calculator;\r\n};\r\n\r\n\r\n/**\r\n * Get the calculator function.\r\n *\r\n * @return {function(Array, number)} the calculator function.\r\n */\r\nMarkerClusterer.prototype.getCalculator = function() {\r\n return this.calculator_;\r\n};\r\n\r\n\r\n/**\r\n * Add an array of markers to the clusterer.\r\n *\r\n * @param {Array.} markers The markers to add.\r\n * @param {boolean=} opt_nodraw Whether to redraw the clusters.\r\n */\r\nMarkerClusterer.prototype.addMarkers = function(markers, opt_nodraw) {\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n this.pushMarkerTo_(marker);\r\n }\r\n if (!opt_nodraw) {\r\n this.redraw();\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Pushes a marker to the clusterer.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.pushMarkerTo_ = function(marker) {\r\n marker.isAdded = false;\r\n if (marker['draggable']) {\r\n // If the marker is draggable add a listener so we update the clusters on\r\n // the drag end.\r\n var that = this;\r\n google.maps.event.addListener(marker, 'dragend', function() {\r\n marker.isAdded = false;\r\n that.repaint();\r\n });\r\n }\r\n this.markers_.push(marker);\r\n};\r\n\r\n\r\n/**\r\n * Adds a marker to the clusterer and redraws if needed.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @param {boolean=} opt_nodraw Whether to redraw the clusters.\r\n */\r\nMarkerClusterer.prototype.addMarker = function(marker, opt_nodraw) {\r\n this.pushMarkerTo_(marker);\r\n if (!opt_nodraw) {\r\n this.redraw();\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Removes a marker and returns true if removed, false if not\r\n *\r\n * @param {google.maps.Marker} marker The marker to remove\r\n * @return {boolean} Whether the marker was removed or not\r\n * @private\r\n */\r\nMarkerClusterer.prototype.removeMarker_ = function(marker) {\r\n var index = -1;\r\n if (this.markers_.indexOf) {\r\n index = this.markers_.indexOf(marker);\r\n } else {\r\n for (var i = 0, m; m = this.markers_[i]; i++) {\r\n if (m == marker) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (index == -1) {\r\n // Marker is not in our list of markers.\r\n return false;\r\n }\r\n\r\n marker.setMap(null);\r\n\r\n this.markers_.splice(index, 1);\r\n\r\n return true;\r\n};\r\n\r\n\r\n/**\r\n * Remove a marker from the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to remove.\r\n * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\r\n * @return {boolean} True if the marker was removed.\r\n */\r\nMarkerClusterer.prototype.removeMarker = function(marker, opt_nodraw) {\r\n var removed = this.removeMarker_(marker);\r\n\r\n if (!opt_nodraw && removed) {\r\n this.resetViewport();\r\n this.redraw();\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Removes an array of markers from the cluster.\r\n *\r\n * @param {Array.} markers The markers to remove.\r\n * @param {boolean=} opt_nodraw Optional boolean to force no redraw.\r\n */\r\nMarkerClusterer.prototype.removeMarkers = function(markers, opt_nodraw) {\r\n var removed = false;\r\n\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n var r = this.removeMarker_(marker);\r\n removed = removed || r;\r\n }\r\n\r\n if (!opt_nodraw && removed) {\r\n this.resetViewport();\r\n this.redraw();\r\n return true;\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Sets the clusterer's ready state.\r\n *\r\n * @param {boolean} ready The state.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.setReady_ = function(ready) {\r\n if (!this.ready_) {\r\n this.ready_ = ready;\r\n this.createClusters_();\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Returns the number of clusters in the clusterer.\r\n *\r\n * @return {number} The number of clusters.\r\n */\r\nMarkerClusterer.prototype.getTotalClusters = function() {\r\n return this.clusters_.length;\r\n};\r\n\r\n\r\n/**\r\n * Returns the google map that the clusterer is associated with.\r\n *\r\n * @return {google.maps.Map} The map.\r\n */\r\nMarkerClusterer.prototype.getMap = function() {\r\n return this.map_;\r\n};\r\n\r\n\r\n/**\r\n * Sets the google map that the clusterer is associated with.\r\n *\r\n * @param {google.maps.Map} map The map.\r\n */\r\nMarkerClusterer.prototype.setMap = function(map) {\r\n this.map_ = map;\r\n};\r\n\r\n\r\n/**\r\n * Returns the size of the grid.\r\n *\r\n * @return {number} The grid size.\r\n */\r\nMarkerClusterer.prototype.getGridSize = function() {\r\n return this.gridSize_;\r\n};\r\n\r\n\r\n/**\r\n * Sets the size of the grid.\r\n *\r\n * @param {number} size The grid size.\r\n */\r\nMarkerClusterer.prototype.setGridSize = function(size) {\r\n this.gridSize_ = size;\r\n};\r\n\r\n\r\n/**\r\n * Returns the min cluster size.\r\n *\r\n * @return {number} The grid size.\r\n */\r\nMarkerClusterer.prototype.getMinClusterSize = function() {\r\n return this.minClusterSize_;\r\n};\r\n\r\n/**\r\n * Sets the min cluster size.\r\n *\r\n * @param {number} size The grid size.\r\n */\r\nMarkerClusterer.prototype.setMinClusterSize = function(size) {\r\n this.minClusterSize_ = size;\r\n};\r\n\r\n\r\n/**\r\n * Extends a bounds object by the grid size.\r\n *\r\n * @param {google.maps.LatLngBounds} bounds The bounds to extend.\r\n * @return {google.maps.LatLngBounds} The extended bounds.\r\n */\r\nMarkerClusterer.prototype.getExtendedBounds = function(bounds) {\r\n var projection = this.getProjection();\r\n\r\n // Turn the bounds into latlng.\r\n var tr = new google.maps.LatLng(bounds.getNorthEast().lat(),\r\n bounds.getNorthEast().lng());\r\n var bl = new google.maps.LatLng(bounds.getSouthWest().lat(),\r\n bounds.getSouthWest().lng());\r\n\r\n // Convert the points to pixels and the extend out by the grid size.\r\n var trPix = projection.fromLatLngToDivPixel(tr);\r\n trPix.x += this.gridSize_;\r\n trPix.y -= this.gridSize_;\r\n\r\n var blPix = projection.fromLatLngToDivPixel(bl);\r\n blPix.x -= this.gridSize_;\r\n blPix.y += this.gridSize_;\r\n\r\n // Convert the pixel points back to LatLng\r\n var ne = projection.fromDivPixelToLatLng(trPix);\r\n var sw = projection.fromDivPixelToLatLng(blPix);\r\n\r\n // Extend the bounds to contain the new bounds.\r\n bounds.extend(ne);\r\n bounds.extend(sw);\r\n\r\n return bounds;\r\n};\r\n\r\n\r\n/**\r\n * Determins if a marker is contained in a bounds.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @param {google.maps.LatLngBounds} bounds The bounds to check against.\r\n * @return {boolean} True if the marker is in the bounds.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.isMarkerInBounds_ = function(marker, bounds) {\r\n return bounds.contains(marker.getPosition());\r\n};\r\n\r\n\r\n/**\r\n * Clears all clusters and markers from the clusterer.\r\n */\r\nMarkerClusterer.prototype.clearMarkers = function() {\r\n this.resetViewport(true);\r\n\r\n // Set the markers a empty array.\r\n this.markers_ = [];\r\n};\r\n\r\n\r\n/**\r\n * Clears all existing clusters and recreates them.\r\n * @param {boolean} opt_hide To also hide the marker.\r\n */\r\nMarkerClusterer.prototype.resetViewport = function(opt_hide) {\r\n // Remove all the clusters\r\n for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\r\n cluster.remove();\r\n }\r\n\r\n // Reset the markers to not be added and to be invisible.\r\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n marker.isAdded = false;\r\n if (opt_hide) {\r\n marker.setMap(null);\r\n }\r\n }\r\n\r\n this.clusters_ = [];\r\n};\r\n\r\n/**\r\n *\r\n */\r\nMarkerClusterer.prototype.repaint = function() {\r\n var oldClusters = this.clusters_.slice();\r\n this.clusters_.length = 0;\r\n this.resetViewport();\r\n this.redraw();\r\n\r\n // Remove the old clusters.\r\n // Do it in a timeout so the other clusters have been drawn first.\r\n window.setTimeout(function() {\r\n for (var i = 0, cluster; cluster = oldClusters[i]; i++) {\r\n cluster.remove();\r\n }\r\n }, 0);\r\n};\r\n\r\n\r\n/**\r\n * Redraws the clusters.\r\n */\r\nMarkerClusterer.prototype.redraw = function() {\r\n this.createClusters_();\r\n};\r\n\r\n\r\n/**\r\n * Calculates the distance between two latlng locations in km.\r\n * @see http://www.movable-type.co.uk/scripts/latlong.html\r\n *\r\n * @param {google.maps.LatLng} p1 The first lat lng point.\r\n * @param {google.maps.LatLng} p2 The second lat lng point.\r\n * @return {number} The distance between the two points in km.\r\n * @private\r\n*/\r\nMarkerClusterer.prototype.distanceBetweenPoints_ = function(p1, p2) {\r\n if (!p1 || !p2) {\r\n return 0;\r\n }\r\n\r\n var R = 6371; // Radius of the Earth in km\r\n var dLat = (p2.lat() - p1.lat()) * Math.PI / 180;\r\n var dLon = (p2.lng() - p1.lng()) * Math.PI / 180;\r\n var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) +\r\n Math.cos(p1.lat() * Math.PI / 180) * Math.cos(p2.lat() * Math.PI / 180) *\r\n Math.sin(dLon / 2) * Math.sin(dLon / 2);\r\n var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\r\n var d = R * c;\r\n return d;\r\n};\r\n\r\n\r\n/**\r\n * Add a marker to a cluster, or creates a new cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @private\r\n */\r\nMarkerClusterer.prototype.addToClosestCluster_ = function(marker) {\r\n var distance = 40000; // Some large number\r\n var clusterToAddTo = null;\r\n var pos = marker.getPosition();\r\n for (var i = 0, cluster; cluster = this.clusters_[i]; i++) {\r\n var center = cluster.getCenter();\r\n if (center) {\r\n var d = this.distanceBetweenPoints_(center, marker.getPosition());\r\n if (d < distance) {\r\n distance = d;\r\n clusterToAddTo = cluster;\r\n }\r\n }\r\n }\r\n\r\n if (clusterToAddTo && clusterToAddTo.isMarkerInClusterBounds(marker)) {\r\n clusterToAddTo.addMarker(marker);\r\n } else {\r\n var cluster = new Cluster(this);\r\n cluster.addMarker(marker);\r\n this.clusters_.push(cluster);\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Creates the clusters.\r\n *\r\n * @private\r\n */\r\nMarkerClusterer.prototype.createClusters_ = function() {\r\n if (!this.ready_) {\r\n return;\r\n }\r\n\r\n // Get our current map view bounds.\r\n // Create a new bounds object so we don't affect the map.\r\n var mapBounds = new google.maps.LatLngBounds(this.map_.getBounds().getSouthWest(),\r\n this.map_.getBounds().getNorthEast());\r\n var bounds = this.getExtendedBounds(mapBounds);\r\n\r\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n if (!marker.isAdded && this.isMarkerInBounds_(marker, bounds)) {\r\n this.addToClosestCluster_(marker);\r\n }\r\n }\r\n};\r\n\r\n\r\n/**\r\n * A cluster that contains markers.\r\n *\r\n * @param {MarkerClusterer} markerClusterer The markerclusterer that this\r\n * cluster is associated with.\r\n * @constructor\r\n * @ignore\r\n */\r\nfunction Cluster(markerClusterer) {\r\n this.markerClusterer_ = markerClusterer;\r\n this.map_ = markerClusterer.getMap();\r\n this.gridSize_ = markerClusterer.getGridSize();\r\n this.minClusterSize_ = markerClusterer.getMinClusterSize();\r\n this.averageCenter_ = markerClusterer.isAverageCenter();\r\n this.center_ = null;\r\n this.markers_ = [];\r\n this.bounds_ = null;\r\n this.clusterIcon_ = new ClusterIcon(this, markerClusterer.getStyles(),\r\n markerClusterer.getGridSize());\r\n}\r\n\r\n/**\r\n * Determins if a marker is already added to the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @return {boolean} True if the marker is already added.\r\n */\r\nCluster.prototype.isMarkerAlreadyAdded = function(marker) {\r\n if (this.markers_.indexOf) {\r\n return this.markers_.indexOf(marker) != -1;\r\n } else {\r\n for (var i = 0, m; m = this.markers_[i]; i++) {\r\n if (m == marker) {\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n};\r\n\r\n\r\n/**\r\n * Add a marker the cluster.\r\n *\r\n * @param {google.maps.Marker} marker The marker to add.\r\n * @return {boolean} True if the marker was added.\r\n */\r\nCluster.prototype.addMarker = function(marker) {\r\n if (this.isMarkerAlreadyAdded(marker)) {\r\n return false;\r\n }\r\n\r\n if (!this.center_) {\r\n this.center_ = marker.getPosition();\r\n this.calculateBounds_();\r\n } else {\r\n if (this.averageCenter_) {\r\n var l = this.markers_.length + 1;\r\n var lat = (this.center_.lat() * (l-1) + marker.getPosition().lat()) / l;\r\n var lng = (this.center_.lng() * (l-1) + marker.getPosition().lng()) / l;\r\n this.center_ = new google.maps.LatLng(lat, lng);\r\n this.calculateBounds_();\r\n }\r\n }\r\n\r\n marker.isAdded = true;\r\n this.markers_.push(marker);\r\n\r\n var len = this.markers_.length;\r\n if (len < this.minClusterSize_ && marker.getMap() != this.map_) {\r\n // Min cluster size not reached so show the marker.\r\n marker.setMap(this.map_);\r\n }\r\n\r\n if (len == this.minClusterSize_) {\r\n // Hide the markers that were showing.\r\n for (var i = 0; i < len; i++) {\r\n this.markers_[i].setMap(null);\r\n }\r\n }\r\n\r\n if (len >= this.minClusterSize_) {\r\n marker.setMap(null);\r\n }\r\n\r\n this.updateIcon();\r\n return true;\r\n};\r\n\r\n\r\n/**\r\n * Returns the marker clusterer that the cluster is associated with.\r\n *\r\n * @return {MarkerClusterer} The associated marker clusterer.\r\n */\r\nCluster.prototype.getMarkerClusterer = function() {\r\n return this.markerClusterer_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the bounds of the cluster.\r\n *\r\n * @return {google.maps.LatLngBounds} the cluster bounds.\r\n */\r\nCluster.prototype.getBounds = function() {\r\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\r\n var markers = this.getMarkers();\r\n for (var i = 0, marker; marker = markers[i]; i++) {\r\n bounds.extend(marker.getPosition());\r\n }\r\n return bounds;\r\n};\r\n\r\n\r\n/**\r\n * Removes the cluster\r\n */\r\nCluster.prototype.remove = function() {\r\n this.clusterIcon_.remove();\r\n this.markers_.length = 0;\r\n delete this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the center of the cluster.\r\n *\r\n * @return {number} The cluster center.\r\n */\r\nCluster.prototype.getSize = function() {\r\n return this.markers_.length;\r\n};\r\n\r\n\r\n/**\r\n * Returns the center of the cluster.\r\n *\r\n * @return {Array.} The cluster center.\r\n */\r\nCluster.prototype.getMarkers = function() {\r\n return this.markers_;\r\n};\r\n\r\n\r\n/**\r\n * Returns the center of the cluster.\r\n *\r\n * @return {google.maps.LatLng} The cluster center.\r\n */\r\nCluster.prototype.getCenter = function() {\r\n return this.center_;\r\n};\r\n\r\n\r\n/**\r\n * Calculated the extended bounds of the cluster with the grid.\r\n *\r\n * @private\r\n */\r\nCluster.prototype.calculateBounds_ = function() {\r\n var bounds = new google.maps.LatLngBounds(this.center_, this.center_);\r\n this.bounds_ = this.markerClusterer_.getExtendedBounds(bounds);\r\n};\r\n\r\n\r\n/**\r\n * Determines if a marker lies in the clusters bounds.\r\n *\r\n * @param {google.maps.Marker} marker The marker to check.\r\n * @return {boolean} True if the marker lies in the bounds.\r\n */\r\nCluster.prototype.isMarkerInClusterBounds = function(marker) {\r\n return this.bounds_.contains(marker.getPosition());\r\n};\r\n\r\n\r\n/**\r\n * Returns the map that the cluster is associated with.\r\n *\r\n * @return {google.maps.Map} The map.\r\n */\r\nCluster.prototype.getMap = function() {\r\n return this.map_;\r\n};\r\n\r\n\r\n/**\r\n * Updates the cluster icon\r\n */\r\nCluster.prototype.updateIcon = function() {\r\n var zoom = this.map_.getZoom();\r\n var mz = this.markerClusterer_.getMaxZoom();\r\n\r\n if (mz && zoom > mz) {\r\n // The zoom is greater than our max zoom so show all the markers in cluster.\r\n for (var i = 0, marker; marker = this.markers_[i]; i++) {\r\n marker.setMap(this.map_);\r\n }\r\n return;\r\n }\r\n\r\n if (this.markers_.length < this.minClusterSize_) {\r\n // Min cluster size not yet reached.\r\n this.clusterIcon_.hide();\r\n return;\r\n }\r\n\r\n var numStyles = this.markerClusterer_.getStyles().length;\r\n var sums = this.markerClusterer_.getCalculator()(this.markers_, numStyles);\r\n this.clusterIcon_.setCenter(this.center_);\r\n this.clusterIcon_.setSums(sums);\r\n this.clusterIcon_.show();\r\n};\r\n\r\n\r\n/**\r\n * A cluster icon\r\n *\r\n * @param {Cluster} cluster The cluster to be associated with.\r\n * @param {Object} styles An object that has style properties:\r\n * 'url': (string) The image url.\r\n * 'height': (number) The image height.\r\n * 'width': (number) The image width.\r\n * 'anchor': (Array) The anchor position of the label text.\r\n * 'textColor': (string) The text color.\r\n * 'textSize': (number) The text size.\r\n * 'backgroundPosition: (string) The background postition x, y.\r\n * @param {number=} opt_padding Optional padding to apply to the cluster icon.\r\n * @constructor\r\n * @extends google.maps.OverlayView\r\n * @ignore\r\n */\r\nfunction ClusterIcon(cluster, styles, opt_padding) {\r\n cluster.getMarkerClusterer().extend(ClusterIcon, google.maps.OverlayView);\r\n\r\n this.styles_ = styles;\r\n this.padding_ = opt_padding || 0;\r\n this.cluster_ = cluster;\r\n this.center_ = null;\r\n this.map_ = cluster.getMap();\r\n this.div_ = null;\r\n this.sums_ = null;\r\n this.visible_ = false;\r\n\r\n this.setMap(this.map_);\r\n}\r\n\r\n\r\n/**\r\n * Triggers the clusterclick event and zoom's if the option is set.\r\n *\r\n * @param {google.maps.MouseEvent} event The event to propagate\r\n */\r\nClusterIcon.prototype.triggerClusterClick = function(event) {\r\n var markerClusterer = this.cluster_.getMarkerClusterer();\r\n\r\n // Trigger the clusterclick event.\r\n google.maps.event.trigger(markerClusterer, 'clusterclick', this.cluster_, event);\r\n\r\n if (markerClusterer.isZoomOnClick()) {\r\n // Zoom into the cluster.\r\n this.map_.fitBounds(this.cluster_.getBounds());\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Adding the cluster icon to the dom.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.onAdd = function() {\r\n this.div_ = document.createElement('DIV');\r\n if (this.visible_) {\r\n var pos = this.getPosFromLatLng_(this.center_);\r\n this.div_.style.cssText = this.createCss(pos);\r\n this.div_.innerHTML = this.sums_.text;\r\n }\r\n\r\n var panes = this.getPanes();\r\n panes.overlayMouseTarget.appendChild(this.div_);\r\n\r\n var that = this;\r\n var isDragging = false;\r\n google.maps.event.addDomListener(this.div_, 'click', function(event) {\r\n // Only perform click when not preceded by a drag\r\n if (!isDragging) {\r\n that.triggerClusterClick(event);\r\n }\r\n });\r\n google.maps.event.addDomListener(this.div_, 'mousedown', function() {\r\n isDragging = false;\r\n });\r\n google.maps.event.addDomListener(this.div_, 'mousemove', function() {\r\n isDragging = true;\r\n });\r\n};\r\n\r\n\r\n/**\r\n * Returns the position to place the div dending on the latlng.\r\n *\r\n * @param {google.maps.LatLng} latlng The position in latlng.\r\n * @return {google.maps.Point} The position in pixels.\r\n * @private\r\n */\r\nClusterIcon.prototype.getPosFromLatLng_ = function(latlng) {\r\n var pos = this.getProjection().fromLatLngToDivPixel(latlng);\r\n\r\n if (typeof this.iconAnchor_ === 'object' && this.iconAnchor_.length === 2) {\r\n pos.x -= this.iconAnchor_[0];\r\n pos.y -= this.iconAnchor_[1];\r\n } else {\r\n pos.x -= parseInt(this.width_ / 2, 10);\r\n pos.y -= parseInt(this.height_ / 2, 10);\r\n }\r\n return pos;\r\n};\r\n\r\n\r\n/**\r\n * Draw the icon.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.draw = function() {\r\n if (this.visible_) {\r\n var pos = this.getPosFromLatLng_(this.center_);\r\n this.div_.style.top = pos.y + 'px';\r\n this.div_.style.left = pos.x + 'px';\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Hide the icon.\r\n */\r\nClusterIcon.prototype.hide = function() {\r\n if (this.div_) {\r\n this.div_.style.display = 'none';\r\n }\r\n this.visible_ = false;\r\n};\r\n\r\n\r\n/**\r\n * Position and show the icon.\r\n */\r\nClusterIcon.prototype.show = function() {\r\n if (this.div_) {\r\n var pos = this.getPosFromLatLng_(this.center_);\r\n this.div_.style.cssText = this.createCss(pos);\r\n this.div_.style.display = '';\r\n }\r\n this.visible_ = true;\r\n};\r\n\r\n\r\n/**\r\n * Remove the icon from the map\r\n */\r\nClusterIcon.prototype.remove = function() {\r\n this.setMap(null);\r\n};\r\n\r\n\r\n/**\r\n * Implementation of the onRemove interface.\r\n * @ignore\r\n */\r\nClusterIcon.prototype.onRemove = function() {\r\n if (this.div_ && this.div_.parentNode) {\r\n this.hide();\r\n this.div_.parentNode.removeChild(this.div_);\r\n this.div_ = null;\r\n }\r\n};\r\n\r\n\r\n/**\r\n * Set the sums of the icon.\r\n *\r\n * @param {Object} sums The sums containing:\r\n * 'text': (string) The text to display in the icon.\r\n * 'index': (number) The style index of the icon.\r\n */\r\nClusterIcon.prototype.setSums = function(sums) {\r\n this.sums_ = sums;\r\n this.text_ = sums.text;\r\n this.index_ = sums.index;\r\n if (this.div_) {\r\n this.div_.innerHTML = sums.text;\r\n }\r\n\r\n this.useStyle();\r\n};\r\n\r\n\r\n/**\r\n * Sets the icon to the the styles.\r\n */\r\nClusterIcon.prototype.useStyle = function() {\r\n var index = Math.max(0, this.sums_.index - 1);\r\n index = Math.min(this.styles_.length - 1, index);\r\n var style = this.styles_[index];\r\n this.url_ = style['url'];\r\n this.height_ = style['height'];\r\n this.width_ = style['width'];\r\n this.textColor_ = style['textColor'];\r\n this.anchor_ = style['anchor'];\r\n this.textSize_ = style['textSize'];\r\n this.backgroundPosition_ = style['backgroundPosition'];\r\n this.iconAnchor_ = style['iconAnchor'];\r\n};\r\n\r\n\r\n/**\r\n * Sets the center of the icon.\r\n *\r\n * @param {google.maps.LatLng} center The latlng to set as the center.\r\n */\r\nClusterIcon.prototype.setCenter = function(center) {\r\n this.center_ = center;\r\n};\r\n\r\n\r\n/**\r\n * Create the css text based on the position of the icon.\r\n *\r\n * @param {google.maps.Point} pos The position.\r\n * @return {string} The css style text.\r\n */\r\nClusterIcon.prototype.createCss = function(pos) {\r\n var style = [];\r\n style.push('background-image:url(' + this.url_ + ');');\r\n var backgroundPosition = this.backgroundPosition_ ? this.backgroundPosition_ : '0 0';\r\n style.push('background-position:' + backgroundPosition + ';');\r\n\r\n if (typeof this.anchor_ === 'object') {\r\n if (typeof this.anchor_[0] === 'number' && this.anchor_[0] > 0 &&\r\n this.anchor_[0] < this.height_) {\r\n style.push('height:' + (this.height_ - this.anchor_[0]) +\r\n 'px; padding-top:' + this.anchor_[0] + 'px;');\r\n } else if (typeof this.anchor_[0] === 'number' && this.anchor_[0] < 0 &&\r\n -this.anchor_[0] < this.height_) {\r\n style.push('height:' + this.height_ + 'px; line-height:' + (this.height_ + this.anchor_[0]) +\r\n 'px;');\r\n } else {\r\n style.push('height:' + this.height_ + 'px; line-height:' + this.height_ +\r\n 'px;');\r\n }\r\n if (typeof this.anchor_[1] === 'number' && this.anchor_[1] > 0 &&\r\n this.anchor_[1] < this.width_) {\r\n style.push('width:' + (this.width_ - this.anchor_[1]) +\r\n 'px; padding-left:' + this.anchor_[1] + 'px;');\r\n } else {\r\n style.push('width:' + this.width_ + 'px; text-align:center;');\r\n }\r\n } else {\r\n style.push('height:' + this.height_ + 'px; line-height:' +\r\n this.height_ + 'px; width:' + this.width_ + 'px; text-align:center;');\r\n }\r\n\r\n var txtColor = this.textColor_ ? this.textColor_ : 'black';\r\n var txtSize = this.textSize_ ? this.textSize_ : 11;\r\n\r\n style.push('cursor:pointer; top:' + pos.y + 'px; left:' +\r\n pos.x + 'px; color:' + txtColor + '; position:absolute; font-size:' +\r\n txtSize + 'px; font-family:Arial,sans-serif; font-weight:bold');\r\n return style.join('');\r\n};\r\n\r\n\r\n// Export Symbols for Closure\r\n// If you are not going to compile with closure then you can remove the\r\n// code below.\r\nwindow['MarkerClusterer'] = MarkerClusterer;\r\nMarkerClusterer.prototype['addMarker'] = MarkerClusterer.prototype.addMarker;\r\nMarkerClusterer.prototype['addMarkers'] = MarkerClusterer.prototype.addMarkers;\r\nMarkerClusterer.prototype['clearMarkers'] =\r\n MarkerClusterer.prototype.clearMarkers;\r\nMarkerClusterer.prototype['fitMapToMarkers'] =\r\n MarkerClusterer.prototype.fitMapToMarkers;\r\nMarkerClusterer.prototype['getCalculator'] =\r\n MarkerClusterer.prototype.getCalculator;\r\nMarkerClusterer.prototype['getGridSize'] =\r\n MarkerClusterer.prototype.getGridSize;\r\nMarkerClusterer.prototype['getExtendedBounds'] =\r\n MarkerClusterer.prototype.getExtendedBounds;\r\nMarkerClusterer.prototype['getMap'] = MarkerClusterer.prototype.getMap;\r\nMarkerClusterer.prototype['getMarkers'] = MarkerClusterer.prototype.getMarkers;\r\nMarkerClusterer.prototype['getMaxZoom'] = MarkerClusterer.prototype.getMaxZoom;\r\nMarkerClusterer.prototype['getStyles'] = MarkerClusterer.prototype.getStyles;\r\nMarkerClusterer.prototype['getTotalClusters'] =\r\n MarkerClusterer.prototype.getTotalClusters;\r\nMarkerClusterer.prototype['getTotalMarkers'] =\r\n MarkerClusterer.prototype.getTotalMarkers;\r\nMarkerClusterer.prototype['redraw'] = MarkerClusterer.prototype.redraw;\r\nMarkerClusterer.prototype['removeMarker'] =\r\n MarkerClusterer.prototype.removeMarker;\r\nMarkerClusterer.prototype['removeMarkers'] =\r\n MarkerClusterer.prototype.removeMarkers;\r\nMarkerClusterer.prototype['resetViewport'] =\r\n MarkerClusterer.prototype.resetViewport;\r\nMarkerClusterer.prototype['repaint'] =\r\n MarkerClusterer.prototype.repaint;\r\nMarkerClusterer.prototype['setCalculator'] =\r\n MarkerClusterer.prototype.setCalculator;\r\nMarkerClusterer.prototype['setGridSize'] =\r\n MarkerClusterer.prototype.setGridSize;\r\nMarkerClusterer.prototype['setMaxZoom'] =\r\n MarkerClusterer.prototype.setMaxZoom;\r\nMarkerClusterer.prototype['onAdd'] = MarkerClusterer.prototype.onAdd;\r\nMarkerClusterer.prototype['draw'] = MarkerClusterer.prototype.draw;\r\n\r\nCluster.prototype['getCenter'] = Cluster.prototype.getCenter;\r\nCluster.prototype['getSize'] = Cluster.prototype.getSize;\r\nCluster.prototype['getMarkers'] = Cluster.prototype.getMarkers;\r\n\r\nClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd;\r\nClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw;\r\nClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove;\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('app.dashboard', [\r\n 'app.core' ,'chart.js' ]);\r\n\r\n})();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .component('forecastCsl', {\r\n templateUrl: \"/app/dashboard/csl/five-day-forecast/forecast-csl.html\",\r\n controller: ForecastCslController,\r\n bindings: {\r\n data: '<',\r\n index: '@',\r\n mobile: '<',\r\n payload: '<'\r\n }\r\n })\r\n\r\n ForecastCslController.$inject = [\"mdSelectHelper\", \"$element\", \"$location\", \"$scope\", \"$httpParamSerializer\"];\r\n function ForecastCslController(mdSelectHelper, $element, $location, $scope, $httpParamSerializer){\r\n var vm = this;\r\n\r\n vm.containers = [];\r\n // ==========================\r\n // Functions\r\n // ==========================\r\n vm.createForecast = createForecast;\r\n vm.getDay = function(){return moment(vm.data.date).format('ddd');}\r\n vm.getDate = function(){ return moment(vm.data.date).format('MM/DD/YY');}\r\n vm.getDateForTT = function(){ return vm.data.date; }\r\n vm.getTotal = function(){return parseInt((vm.data.delivered + vm.data.ontime + vm.data.exceptions));}\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.getPercentageFtl = getPercentageFtl;\r\n vm.getPercentageLtl = getPercentageLtl;\r\n vm.getPercentageIntermodal = getPercentageIntermodal;\r\n\r\n vm.viewOnTrackAndTraceCsl = function(time_val){\r\n\r\n var query = {};\r\n //query.arrive_date_from = query.arrive_date_to = moment(vm.data.date).format('MMM DD YYYY');\r\n query.arrive_date_from = query.arrive_date_to = moment(time_val).format('MMM DD YYYY');\r\n //query.arrive_date_from = query.arrive_date_to = time_val;\r\n //query['origins[]'] = vm.payload['origin[]'];\r\n //query['destinations[]'] = vm.payload['destination[]'] ;\r\n //query['lane_pairs[]'] = vm.payload['lane_pair[]'];\r\n query.page_from = 'aljex';\r\n\r\n query.shipment_type = vm.payload.mode == 'all' ? \"\" : vm.payload.mode;\r\n query.forecast_aljex_custom_options=vm.payload.forecast_aljex_custom_options;\r\n query = $httpParamSerializer(query);\r\n window.open(\"/track-trace-csl?\" + query);\r\n\r\n }\r\n\r\n createForecast();\r\n\r\n $scope.$watch(vm.data, function(){\r\n vm.containers = [];\r\n createForecast();\r\n }, true);\r\n\r\n function getPercentageFtl() {\r\n return Math.round(vm.data.ftl_count / (vm.data.ftl_count+vm.data.ltl_count+vm.data.intermodal_count) * 100) + \"%\";\r\n }\r\n\r\n function getPercentageLtl() {\r\n return Math.round(vm.data.ltl_count / (vm.data.ftl_count+vm.data.ltl_count+vm.data.intermodal_count) * 100) + \"%\";\r\n }\r\n\r\n function getPercentageIntermodal(){\r\n return Math.round(vm.data.intermodal_count / (vm.data.ftl_count+vm.data.ltl_count+vm.data.intermodal_count) * 100) + \"%\";\r\n }\r\n\r\n\r\n function container(){\r\n return {\r\n color: 'blue',\r\n icon: '/assets/images/icons/container-100.svg',\r\n icon_class: 'container-icon',\r\n colspan: 4,\r\n rowspan: 2\r\n }\r\n }\r\n\r\n function crate(isEmpty){\r\n return {\r\n empty: isEmpty,\r\n color: isEmpty ? 'none' : 'red',\r\n icon: \"/assets/images/icons/crate-50.svg\",\r\n icon_class: 'crate-icon',\r\n colspan: 2,\r\n rowspan: 2\r\n };\r\n }\r\n\r\n function box(isEmpty){\r\n return {\r\n empty: isEmpty,\r\n color: isEmpty ? 'none' : 'green',\r\n icon_class: 'box-icon',\r\n icon: '/assets/images/icons/box-5.svg',\r\n colspan: 1,\r\n rowspan: 1\r\n };\r\n }\r\n\r\n function createVessel(n, vessel, isEmpty){\r\n for (var i = 0; i < n; i++){\r\n vm.containers.push(vessel(isEmpty));\r\n }\r\n }\r\n\r\n function createForecast(){\r\n\r\n var total = 0;\r\n var toprow = 8;\r\n var empties;\r\n Number.isInteger = Number.isInteger || function(value) {\r\n return typeof value === \"number\" &&\r\n isFinite(value) &&\r\n Math.floor(value) === value;\r\n };\r\n //// console.log(vm.data);\r\n Object.keys(vm.data).map(function(key){\r\n\r\n //if(Number.isInteger(vm.data[key])) total += vm.data[key];\r\n if ([\"ontime\", \"delivered\", \"exceptions\"].includes(key)){\r\n total += vm.data[key];\r\n }\r\n });\r\n // total /= 2;\r\n\r\n\r\n var containers = 0, crates = 0, boxes = 0;\r\n // containers = Math.floor(total / 100);\r\n // crates = Math.floor((total - (containers * 100)) / 50);\r\n // boxes = Math.ceil((total-(containers * 100) - (crates * 50)) / 5);\r\n\r\n containers = Math.floor(total / 50);\r\n crates = Math.floor((total - (containers * 50)) / 10);\r\n boxes = Math.ceil((total-(containers * 50) - (crates * 10)) / 1);\r\n\r\n // createVessel(1, box);\r\n // createVessel(3, box, true);\r\n // createVessel(boxes, box);\r\n // createVessel(crates, crate);\r\n // createVessel(containers, container);\r\n\r\n if (crates % 2 == 1) {\r\n crates -= 1;\r\n if (boxes == 0) {\r\n createVessel(1, crate);\r\n createVessel(1, crate, true);\r\n } else if (boxes >= 4) {\r\n var loopBoxCount=parseInt(boxes/4);\r\n boxes -= 4;\r\n if (boxes % 4 == 0){\r\n createVessel(boxes, box);\r\n createVessel(1, crate);\r\n createVessel(4, box);\r\n } else { \r\n createVessel(boxes % 4, box);\r\n createVessel(4 - (boxes % 4), box, true);\r\n for (var i=0;i 0){\r\n getDefault(vm.custom_forecasts);\r\n //}\r\n }, true);\r\n\r\n\r\n $scope.$watch(function(){return vm.customEditChck }, function(n, o){\r\n\r\n if (vm.customEditChck == true ){\r\n\r\n //var opt = selectOptionRowById(vm.selectedOptionRow);\r\n $http.get(api.url + 'forecast_aljex_custom_options/'+vm.selectedOptionRow1+'?customer_type=csl').then(function(response){\r\n if(response.data){\r\n vm.isLoading = true;\r\n var opt = response.data;\r\n setPayLoadForForecasts(opt);\r\n vm.query();\r\n vm.isLoading = true;\r\n vm.customEditChck = false;\r\n }\r\n }, function errorCallback(error){\r\n\r\n });\r\n }\r\n\r\n });\r\n\r\n\r\n $scope.$watch(function(){return vm.selectedOptionRow }, function(n, o){\r\n\r\n if (n !== o && n !==undefined && !vm.firstLoad){\r\n\r\n var opt = selectOptionRowById(vm.selectedOptionRow);\r\n setPayLoadForForecasts(opt);\r\n vm.query();\r\n\r\n\r\n }\r\n\r\n });\r\n\r\n function selectedDateChange(){\r\n vm.query();\r\n }\r\n\r\n function getUrl(){\r\n }\r\n\r\n\r\n\r\n function query(){\r\n\r\n vm.isLoading = true;\r\n return vm.getDays().then(function(data){\r\n vm.days.length = 0;\r\n\r\n data.map(function(d){vm.days.push(d);})\r\n vm.days = data;\r\n if(data.length > 0){\r\n vm.days.is_record = true;\r\n }\r\n\r\n vm.isLoading = false;\r\n vm.query_debounce = null;\r\n\r\n });\r\n\r\n }\r\n\r\n function toggleOptions(id){\r\n vm.optionsActive = vm.optionsActive ? false : true;\r\n $rootScope.forecastEditId = id\r\n }\r\n\r\n function onLaneTypeTabSelected(tab, tabIndex){\r\n if (tabIndex !== vm.lastTabIndex) {\r\n vm.lastTabIndex = tabIndex;\r\n vm.payload.mode = tab.field;\r\n vm.query();\r\n }\r\n }\r\n\r\n function selectOptionRowById(id){\r\n return vm.custom_forecasts.filter(function(d, i){return d.id === parseInt(id) })[0];\r\n }\r\n\r\n // function onForecastOptionSelected(id){\r\n\r\n // var opt = selectOptionRowById(id);\r\n // setPayLoadForForecasts(opt);\r\n // vm.query();\r\n // }\r\n\r\n\r\n function setPayLoadForForecasts(opt){\r\n\r\n opt = opt || {}\r\n vm.payload['origin[]'] = opt.origins ;\r\n vm.payload['destination[]'] = opt.destinations;\r\n vm.payload['lane_pairs[]'] = opt.lane_pairs;\r\n if (opt!== undefined)\r\n vm.payload['forecast_aljex_custom_options'] = opt.forecast_label;\r\n }\r\n\r\n function isMobile(){\r\n return $window.innerWidth < 959;\r\n }\r\n\r\n function submit(){\r\n\r\n }\r\n\r\n function huh(){\r\n vm;\r\n $httpParamSerializer;\r\n }\r\n\r\n\r\n\r\n function selectedItemChange(request, item, field) {\r\n /* If the field had data, and is cleared, then we need to requery */\r\n\r\n if (request == \"\" && vm.hasData[field] && !item){\r\n vm.hasData[field] = false;\r\n vm.query();\r\n }\r\n /* If the item exists then lets query it! */\r\n if (typeof(item) === 'object' && item && Object.keys(item).sort().includes(\"display\", \"value\")) {\r\n vm.hasData[field] = true;\r\n vm.query();\r\n }\r\n }\r\n\r\n function parseData(data){\r\n return Object.keys(data).map(function(date){\r\n return {\r\n date: date,\r\n //active: data[date].ontime,\r\n //potentials: data[date].potential_exceptions,\r\n exceptions: data[date].exceptions,\r\n is_record: data[date].is_record,\r\n is_high: data[date].is_high,\r\n ltl_count: data[date].ltl_count,\r\n ftl_count: data[date].ftl_count,\r\n intermodal_count: data[date].intermodal_count,\r\n ontime: data[date].ontime,\r\n delivered: data[date].delivered,\r\n ref_numbers: data[date].ref_numbers\r\n }\r\n });\r\n }\r\n\r\n function getDefault(data){\r\n if(data.length>0){\r\n var row = data.filter(function(d, i){return (d.is_default === true || $rootScope.forecastEditId == d.id) })[0];\r\n vm.selectedOptionRow = row !== undefined ? row.id : null;\r\n }\r\n else\r\n vm.selectedOptionRow =null;\r\n }\r\n\r\n function checkClear(){\r\n if (vm.selectedOptionRow === 'null'){\r\n vm.selectedOptionRow = null;\r\n }\r\n\r\n if (vm.selectedOptionRow === 'create' || vm.selectedOptionRow === 'create_new'){\r\n vm.selectedOptionRow = null;\r\n vm.toggleOptions(null);\r\n }\r\n\r\n }\r\n\r\n function getCustomForecasts(){\r\n\r\n vm.isLoading = true;\r\n var dfd = $q.defer();\r\n\r\n $http.get(api.url_v2 + '/forecast_aljex_custom_options?customer_type=csl').then(function(response){\r\n vm.custom_forecasts = response.data;\r\n if (vm.firstLoad){\r\n\r\n getDefault(response.data);\r\n var opt = selectOptionRowById(vm.selectedOptionRow);\r\n setPayLoadForForecasts(opt)\r\n vm.query().finally(function(){\r\n vm.firstLoad = false;\r\n });\r\n\r\n\r\n }\r\n\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n vm.firstLoad = false;\r\n return dfd.reject(error);\r\n\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function getDays(){\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n\r\n var timeoutId = false;\r\n\r\n\r\n var query = angular.copy(vm.payload);\r\n if (query.date_from !== null){\r\n UserService.set5DFDefaultAljex(query.date_from);\r\n vm.days.length = 0;\r\n\r\n ['mode', 'origin[]', 'destination[]', 'lane_pairs[]'].map(function(field){\r\n\r\n if (query[field] === 'all' || query[field] === undefined){\r\n delete query[field];\r\n }\r\n });\r\n\r\n query = $httpParamSerializer(query)\r\n var params='';\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"userEmail=\"+localStorage.switchEmail+\"&\";\r\n // }else if(localStorage.userCompany){\r\n // params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompany)+\"&\";\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&\";\r\n // }\r\n\r\n\r\n\r\n if(localStorage.customerType == 'csl'){\r\n\r\n if(localStorage.switchEmailCslType){\r\n params +=\"userEmail=\"+localStorage.switchEmailCslType+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userCompanyCsl){\r\n params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userDepartmentCsl){\r\n params +=\"userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCsl)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCsl+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.dummyUser){\r\n params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }\r\n\r\n }else{\r\n params +=\"customer_type=csl&\";\r\n }\r\n\r\n var urlString=\"\";\r\n\r\n if (vm.selectedOptionRow === null)\r\n urlString= api.url_v2 + '/widgets_csl/five_day_forecast?' + params+ query;\r\n else\r\n urlString= api.url_v2 + '/widgets_csl/five_day_forecast/saved_search/'+vm.selectedOptionRow+'?' + params+ query;\r\n\r\n\r\n var promise = $http.get(urlString, {timeout: timeoutPromise.promise})\r\n .then(function(response) {\r\n\r\n timeoutPromise = false;\r\n if (timeoutId) $timeout.cancel(timeoutId);\r\n return parseData(response.data);\r\n }, function(error){\r\n vm.isLoading = false;\r\n return $q.reject(error);\r\n });\r\n timeoutId = $timeout(function() {\r\n if (timeoutPromise) timeoutPromise.resolve();\r\n timeoutId = false;\r\n }, 120000);\r\n vm.requestId = timeoutId;\r\n return promise;\r\n }\r\n\r\n else {\r\n vm.isLoading = false;\r\n return $q.reject();\r\n\r\n }\r\n }\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .controller('CustomOptionsCslController', CustomOptionsCslController)\r\n .component('customOptionsCsl', {\r\n templateUrl: \"/app/dashboard/csl/five-day-forecast/custom-options.html\",\r\n controller: CustomOptionsCslController,\r\n bindings: {\r\n active: '=',\r\n customForecasts: \"=\",\r\n state_origin: '='\r\n\r\n }\r\n })\r\n\r\n\r\n CustomOptionsCslController.$inject = [\"$rootScope\", \"$element\", \"$httpParamSerializer\", '$state', \"$location\", \"$scope\", \"$timeout\", \"$mdConstant\", \"$q\", \"$http\", \"api\", \"$mdDialog\", \"$mdMedia\", \"$mdToast\", \"DepartmentManagementService\",\"UserService\",\"$anchorScroll\",\"fivedayCslService\"];\r\n function CustomOptionsCslController($rootScope, $element, $httpParamSerializer, $state, $location, $scope, $timeout, $mdConstant, $q, $http, api, $mdDialog, $mdMedia, $mdToast, DepartmentManagementService, UserService, $anchorScroll,fivedayCslService){\r\n\r\n var vm = this;\r\n vm.custom_forecasts = [];\r\n vm.cancel = cancel;\r\n vm.newOption = {forecast_label:\"\", origins:[], destinations:[], lane_pairs:[], is_default: false};\r\n vm.getMatches = getMatches;\r\n /// removed key for the bug raised APPENG-3088 //////\r\n vm.keys = [$mdConstant.KEY_CODE.COMMA];\r\n vm.chipDisplay = chipDisplay;\r\n vm.save = save;\r\n vm.isLoading = false;\r\n vm.deleteOptionRow = deleteOptionRow;\r\n vm.removeOtherDefaults = removeOtherDefaults;\r\n vm.requireAtLeastOne = requireAtLeastOne;\r\n vm.emptyData = emptyData;\r\n vm.closeModal = closeModal;\r\n vm.oldCustomForecasts;\r\n\r\n // $scope.$watch(function(){return vm.customOptionsForm } , function(customOptionsForm){\r\n // if (customOptionsForm){\r\n\r\n // vm.customOptionsForm.$setDirty(true);\r\n // }\r\n // });\r\n\r\n function cancel(){\r\n vm.active = false;\r\n var isRootforecastEditId=false;\r\n angular.forEach(vm.customForecasts, function(val){\r\n if($rootScope.forecastEditId===val.id)\r\n isRootforecastEditId=true;\r\n });\r\n if(!isRootforecastEditId)\r\n $rootScope.forecastEditId=null;\r\n }\r\n\r\n function initNewOption(){\r\n vm.newOption = {};\r\n vm.newOption = {forecast_label:\"\", origins:[], destinations:[], lane_pairs:[], is_default: false};\r\n }\r\n\r\n\r\n function getMatches(key, searchText){\r\n var query = {field: key, value: searchText}\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/aljex_autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(autocompletes);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function chipDisplay(chip){\r\n\r\n return chip.value;\r\n }\r\n\r\n function packageCustomForecasts(forecasts){\r\n var theForecasts = [];\r\n var keys = ['destinations', 'id', 'is_default', 'lane_pairs', 'origins', 'forecast_label','customer_type'];\r\n\r\n theForecasts = forecasts.map(function(forecast, i){\r\n var row = {};\r\n for (var k in keys){\r\n if(keys[k]==='customer_type'){\r\n row[keys[k]] = forecasts.customer_type = 'csl';\r\n }\r\n else\r\n row[keys[k]] = forecast[keys[k]];\r\n }\r\n return row;\r\n })\r\n return theForecasts;\r\n }\r\n\r\n function newRecordEmpty(record){\r\n if (record !== undefined){\r\n var newRecord = {'destinations': record['destinations'],\r\n 'lane_pairs': record['lane_pairs'],\r\n 'origins': record[\"origins\"],\r\n \"forecast_label\": record[\"forecast_label\"]}\r\n\r\n return (Object.keys(newRecord).map(function(key, i){ return newRecord[key]}).join(\"\").replace(/\\s/g, '') === \"\");\r\n }\r\n\r\n else{\r\n\r\n return true;\r\n }\r\n\r\n }\r\n\r\n function deleteOptionRow(row){\r\n var dfd = $q.defer();\r\n vm.isLoading = true;\r\n $http.delete(api.url_v2 + \"/forecast_aljex_custom_options/\"+ row.id +\"?customer_type=csl\").then(function(response){\r\n vm.oldCustomForecasts = vm.customForecasts = vm.customForecasts.filter(function(d, i){return d.id !== row.id});\r\n vm.isLoading = false;\r\n vm.customOptionsForm.$setPristine(true);\r\n dfd.resolve(response.data);\r\n }, function(error){\r\n vm.isLoading = false;\r\n return dfd.reject(error);\r\n });\r\n\r\n return dfd.promise;\r\n }\r\n\r\n function requireAtLeastOne(model){\r\n\r\n if (model !== undefined && (model.lane_pairs.length !== 0 || model.origins.length !==0 || model.destinations.length !==0 )){\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n\r\n }\r\n\r\n function removeOtherDefaults(row){\r\n\r\n if (row.is_default){\r\n vm.customForecasts.filter(function(d, i){return d.id !== row.id || row.id === null}).map(function(d,i){ d.is_default = false});\r\n if (row.id) {\r\n vm.newOption.is_default = false;\r\n }\r\n }\r\n\r\n }\r\n\r\n function emptyData(){\r\n var isValid=false;\r\n isValid=vm.oldCustomForecasts== undefined ? true : angular.equals(vm.oldCustomForecasts, vm.customForecasts)\r\n if(vm.oldCustomForecasts==undefined)\r\n vm.oldCustomForecasts=angular.copy(vm.customForecasts);\r\n return newRecordEmpty(vm.newOption) && isValid;\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n function showApiError(messages) {\r\n $scope.apiErrorMessages = [];\r\n angular.forEach(messages, function(m) {\r\n // filter out some of the meaningless messages\r\n\r\n $scope.apiErrorMessages.push(m);\r\n });\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/dashboard/five-day-forecast/api-error.modal.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function save(){\r\n vm.isLoading = true;\r\n var dfd = $q.defer();\r\n var all_forecasts = angular.copy(vm.customForecasts)\r\n if (!newRecordEmpty(vm.newOption)){\r\n all_forecasts.push(vm.newOption)\r\n }\r\n\r\n\r\n $http.post(api.url_v2 + '/forecast_aljex_custom_options/batch?customer_type=csl', {forecasts: packageCustomForecasts(all_forecasts)}).then(function(response){\r\n\r\n vm.customForecasts.length = 0;\r\n vm.customForecasts = angular.copy(response.data);\r\n vm.isLoading = false;\r\n initNewOption();\r\n vm.customOptionsForm.$setPristine(true);\r\n vm.active = false;\r\n return dfd.resolve(response.data);\r\n\r\n\r\n },\r\n function errorCallback(error){\r\n\r\n var messages = error.data.errors.constructor === Array ? error.data.errors : [error.data.errors];\r\n showApiError(messages);\r\n vm.isLoading = false;\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n\r\n }\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .component('breakdowncsl', {\r\n template: '
',\r\n controller: BreakdownCslController,\r\n bindings: {\r\n data: '<',\r\n index: '@',\r\n mobile: '<',\r\n onDelete: '&'\r\n }\r\n })\r\n\r\n BreakdownCslController.$inject = [\"$element\", \"$scope\", \"$window\"];\r\n function BreakdownCslController($element, $scope, $window){\r\n var vm = this;\r\n vm.svg;\r\n\r\n function getColor(shipment){\r\n switch (shipment){\r\n case \"ontime\":\r\n /* Class: $success */\r\n return {key: \"On-time Count: \", count: vm.data.ontime, value: '#30C268'};\r\n \r\n case \"exceptions\":\r\n /* Class: $danger */\r\n return {key: \"Exceptions Count: \", count: vm.data.exceptions, value: '#EF533D'}; \r\n case \"delivered\":\r\n return {key: \"Delivered Count: \", count: vm.data.delivered, value: '#A9A9A9'};\r\n }\r\n }\r\n\r\n function drawBreakdown(){\r\n\r\n var element = angular.element(document.querySelector(\"#breakdown-\"+vm.index));\r\n var offSetWidthVal= element[0].offsetWidth===0?177:element[0].offsetWidth;\r\n if(!element) return;\r\n if (vm.svg) {\r\n vm.svg.selectAll('*').remove();\r\n vm.svg.attr({width: offSetWidthVal, height: 26});\r\n } else {\r\n vm.svg = d3.select(element[0])\r\n .append('svg')\r\n .attr({width: offSetWidthVal, height: 26});\r\n }\r\n var multiplier = vm.mobile ? 3 : .8;\r\n\r\n vm.svg\r\n .selectAll(\".forecast-meter\")\r\n .data(breakdown)\r\n .enter()\r\n .append(\"rect\")\r\n .attr(\"class\", \"forecast-meter\")\r\n .attr(\"width\", Math.floor(multiplier * (offSetWidthVal) / bars.num_bars))\r\n .attr(\"x\", function(d, i){\r\n return i * (offSetWidthVal) / bars.num_bars;\r\n })\r\n .attr(\"y\", 0)\r\n .attr(\"height\", 26)\r\n .attr('name', function(d){return d.key;})\r\n .style('fill', function(d){return d.value;})\r\n\r\n vm.svg\r\n .data(breakdown)\r\n .append(\"rect\")\r\n .attr(\"width\", offSetWidthVal)\r\n .attr(\"x\", 0)\r\n .attr(\"y\", 0)\r\n .attr(\"height\", 26)\r\n .style('fill', 'transparent')\r\n .on('mouseover', function(d){\r\n tip.html(function(){\r\n var line = \"\";\r\n if(vm.data.ontime){\r\n line += \"

On-time: \" + vm.data.ontime + \"

\";\r\n } \r\n if(vm.data.exceptions){\r\n line += \"

Exceptions: \" + vm.data.exceptions + \"

\";\r\n } \r\n if(vm.data.delivered){\r\n line += \"

Delivered: \" + vm.data.delivered + \"

\";\r\n }\r\n return line\r\n });\r\n tip.show();\r\n })\r\n .on('mouseout', function(d){\r\n tip.hide();\r\n });\r\n d3.select(\".breakdown-\"+vm.index+\"-tip\").remove();\r\n var tip = d3.tip()\r\n .attr('class', \"d3-tip breakdown-\"+vm.index+\"-tip\")\r\n .style('background-color', \"#616161\")\r\n .style('z-index', 500)\r\n .offset([-10, 0])\r\n .html(function(d){ })\r\n vm.svg.call(tip);\r\n\r\n /* Clean up your tips */\r\n element.on('$destroy', function(){\r\n d3.select(\".breakdown-\"+vm.index+\"-tip\").remove();\r\n })\r\n }\r\n\r\n /* Initialization of the element */\r\n var breakdown = [];\r\n var bars = {active:0, potentials: 0,exceptions:0, delivered: 0, total: 0, num_bars: 20};\r\n Object.keys(vm.data).map(function(key){\r\n if ([\"delivered\", \"exceptions\", \"ontime\"].includes(key)){\r\n bars.total += vm.data[key];\r\n }\r\n //if(Number.isInteger(vm.data[key])) bars.total += vm.data[key];\r\n });\r\n \r\n bars.exceptions = Math.ceil(bars.num_bars * vm.data.exceptions / bars.total);\r\n bars.ontime = Math.ceil(bars.num_bars * vm.data.ontime / bars.total);\r\n bars.delivered = Math.ceil(bars.num_bars * vm.data.delivered / bars.total); \r\n\r\n if((bars.num_bars * vm.data.exceptions / bars.total) > 0 && (bars.num_bars * vm.data.exceptions / bars.total) < 0.99){\r\n bars.exceptions = 1;\r\n }\r\n if((bars.num_bars * vm.data.ontime / bars.total) > 0 && (bars.num_bars * vm.data.ontime / bars.total) < 0.99){\r\n bars.ontime = 1;\r\n }\r\n if((bars.num_bars * vm.data.delivered / bars.total) > 0 && (bars.num_bars * vm.data.delivered / bars.total) < 0.99){\r\n bars.delivered = 1;\r\n }\r\n\r\n var totalpipes = bars.exceptions + bars.ontime + bars.delivered;\r\n var barValues = [bars.exceptions, bars.ontime, bars.delivered];\r\n var maxIndex = barValues.indexOf(Math.max(bars.exceptions, bars.ontime, bars.delivered));\r\n\r\n if(totalpipes > 20){\r\n \r\n if(maxIndex == 0){\r\n var count = 20 - (bars.ontime + bars.delivered);\r\n bars.exceptions = count;\r\n }\r\n\r\n if(maxIndex == 1){\r\n var count = 20 - (bars.exceptions + bars.delivered);\r\n bars.ontime = count;\r\n }\r\n\r\n if(maxIndex == 2){\r\n var count = 20 - (bars.exceptions + bars.ontime);\r\n bars.delivered = count;\r\n }\r\n }\r\n\r\n /* Add bars relative to how many entries there are */\r\n Object.keys(bars).map(function(key){\r\n if ([\"delivered\", \"exceptions\", \"ontime\"].includes(key)){\r\n for (var i = 0; i < bars[key]; i++){\r\n breakdown.push(getColor(key));\r\n }\r\n }\r\n })\r\n\r\n\r\n /* When the document loads, create the bars */\r\n angular.element(document).ready(function(){\r\n drawBreakdown();\r\n angular.element($window).bind('resize', function(){\r\n drawBreakdown();\r\n $scope.$watch(vm.data, function(){drawBreakdown();}, true);\r\n });\r\n });\r\n\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .component('forecastCmts', {\r\n templateUrl: \"/app/dashboard/cmts/five-day-forecast/forecast-cmts.html\",\r\n controller: ForecastCmtsController,\r\n bindings: {\r\n data: '<',\r\n index: '@',\r\n mobile: '<',\r\n payload: '<'\r\n }\r\n })\r\n\r\n ForecastCmtsController.$inject = [\"mdSelectHelper\", \"$element\", \"$location\", \"$scope\", \"$httpParamSerializer\"];\r\n function ForecastCmtsController(mdSelectHelper, $element, $location, $scope, $httpParamSerializer){\r\n var vm = this;\r\n\r\n vm.containers = [];\r\n // ==========================\r\n // Functions\r\n // ==========================\r\n vm.createForecast = createForecast;\r\n vm.getDay = function(){return moment(vm.data.date).format('ddd');}\r\n vm.getDate = function(){ return moment(vm.data.date).format('MM/DD/YY');}\r\n vm.getDateForTT = function(){ return vm.data.date; }\r\n vm.getTotal = function(){return parseInt((vm.data.delivered + vm.data.ontime));}\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.getPercentageTl = getPercentageTl;\r\n //vm.getPercentageLocal = getPercentageLocal;\r\n vm.getPercentageLtl = getPercentageLtl;\r\n\r\n vm.viewOnTrackAndTraceCmts = function(time_val){\r\n\r\n var query = {};\r\n //query.arrive_date_from = query.arrive_date_to = moment(vm.data.date).format('MMM DD YYYY');\r\n //query.arrive_date_from = query.arrive_date_to = time_val;\r\n query.arrive_date_from = query.arrive_date_to = moment(time_val).format('MMM DD YYYY');\r\n //query['origins[]'] = vm.payload['origin[]'];\r\n //query['destinations[]'] = vm.payload['destination[]'] ;\r\n //query['lane_pairs[]'] = vm.payload['lane_pair[]']; \r\n //query.page_from = 'aljex';\r\n\r\n query.transport_mode_name = vm.payload.mode == 'all' ? \"\" : vm.payload.mode;\r\n query.forecast_cmts_custom_options=vm.payload.forecast_cmts_custom_options;\r\n query = $httpParamSerializer(query);\r\n window.open(\"/track-trace-cmts?\" + query);\r\n\r\n }\r\n\r\n createForecast();\r\n\r\n $scope.$watch(vm.data, function(){\r\n vm.containers = [];\r\n createForecast();\r\n }, true);\r\n\r\n function getPercentageTl() {\r\n if((vm.data.tl_count!= undefined && vm.data.ltl_count != undefined) &&(vm.data.tl_count>0 || vm.data.ltl_count>0))\r\n return Math.round(vm.data.tl_count / (vm.data.tl_count+vm.data.ltl_count) * 100) + \"%\";\r\n else\r\n return \"0%\";\r\n\r\n }\r\n\r\n //function getPercentageLocal() {\r\n // return Math.round(vm.data.local_count / (vm.data.tl_count+vm.data.ltl_count+vm.data.local_count) * 100) + \"%\";\r\n //}\r\n\r\n function getPercentageLtl(){\r\n if((vm.data.tl_count!= undefined && vm.data.ltl_count!=undefined) && (vm.data.tl_count>0 || vm.data.ltl_count>0))\r\n return Math.round(vm.data.ltl_count / (vm.data.tl_count+vm.data.ltl_count) * 100) + \"%\";\r\n else\r\n return \"0%\";\r\n }\r\n\r\n\r\n function container(){\r\n return {\r\n color: 'blue',\r\n icon: '/assets/images/icons/container-100.svg',\r\n icon_class: 'container-icon',\r\n colspan: 4,\r\n rowspan: 2\r\n }\r\n }\r\n\r\n function crate(isEmpty){\r\n return {\r\n empty: isEmpty,\r\n color: isEmpty ? 'none' : 'red',\r\n icon: \"/assets/images/icons/crate-50.svg\",\r\n icon_class: 'crate-icon',\r\n colspan: 2,\r\n rowspan: 2\r\n };\r\n }\r\n\r\n function box(isEmpty){\r\n return {\r\n empty: isEmpty,\r\n color: isEmpty ? 'none' : 'green',\r\n icon_class: 'box-icon',\r\n icon: '/assets/images/icons/box-5.svg',\r\n colspan: 1,\r\n rowspan: 1\r\n };\r\n }\r\n\r\n function createVessel(n, vessel, isEmpty){\r\n for (var i = 0; i < n; i++){\r\n vm.containers.push(vessel(isEmpty));\r\n }\r\n }\r\n\r\n function createForecast(){\r\n\r\n var total = 0;\r\n var toprow = 8;\r\n var empties;\r\n Number.isInteger = Number.isInteger || function(value) {\r\n return typeof value === \"number\" &&\r\n isFinite(value) &&\r\n Math.floor(value) === value;\r\n };\r\n //// console.log(vm.data);\r\n Object.keys(vm.data).map(function(key){\r\n\r\n //if(Number.isInteger(vm.data[key])) total += vm.data[key];\r\n if ([\"ontime\", \"delivered\"].includes(key)){\r\n total += vm.data[key];\r\n }\r\n });\r\n // total /= 2;\r\n\r\n\r\n var containers = 0, crates = 0, boxes = 0;\r\n // containers = Math.floor(total / 100);\r\n // crates = Math.floor((total - (containers * 100)) / 50);\r\n // boxes = Math.ceil((total-(containers * 100) - (crates * 50)) / 5);\r\n\r\n containers = Math.floor(total / 50);\r\n crates = Math.floor((total - (containers * 50)) / 10);\r\n boxes = Math.ceil((total-(containers * 50) - (crates * 10)) / 1);\r\n\r\n // createVessel(1, box);\r\n // createVessel(3, box, true);\r\n // createVessel(boxes, box);\r\n // createVessel(crates, crate);\r\n // createVessel(containers, container);\r\n\r\n if (crates % 2 == 1) {\r\n crates -= 1;\r\n if (boxes == 0) {\r\n createVessel(1, crate);\r\n createVessel(1, crate, true);\r\n } else if (boxes >= 4) {\r\n var loopBoxCount=parseInt(boxes/4);\r\n boxes -= 4;\r\n if (boxes % 4 == 0){\r\n createVessel(boxes, box);\r\n createVessel(1, crate);\r\n createVessel(4, box);\r\n } else { \r\n createVessel(boxes % 4, box);\r\n createVessel(4 - (boxes % 4), box, true);\r\n for (var i=0;i 0){\r\n getDefault(vm.custom_forecasts);\r\n //}\r\n }, true);\r\n\r\n\r\n $scope.$watch(function(){return vm.customEditChck }, function(n, o){\r\n\r\n if (vm.customEditChck == true ){\r\n\r\n //var opt = selectOptionRowById(vm.selectedOptionRow);\r\n $http.get(api.url + '/forecast_cmts_custom_options?'+vm.selectedOptionRow1+'?customer_type=cmts').then(function(response){\r\n if(response.data){\r\n vm.isLoading = true;\r\n var opt = response.data;\r\n setPayLoadForForecasts(opt);\r\n vm.query();\r\n vm.isLoading = true;\r\n vm.customEditChck = false;\r\n }\r\n }, function errorCallback(error){\r\n\r\n });\r\n }\r\n\r\n });\r\n\r\n\r\n $scope.$watch(function(){return vm.selectedOptionRow }, function(n, o){\r\n if (n !== o && n !==undefined && !vm.firstLoad){\r\n var opt = selectOptionRowById(vm.selectedOptionRow);\r\n setPayLoadForForecasts(opt);\r\n vm.query();\r\n\r\n }\r\n\r\n });\r\n\r\n function selectedDateChange(){\r\n vm.query();\r\n }\r\n\r\n function getUrl(){\r\n }\r\n\r\n\r\n\r\n function query(){\r\n\r\n vm.isLoading = true;\r\n return vm.getDays().then(function(data){\r\n vm.days.length = 0;\r\n\r\n data.map(function(d){vm.days.push(d);})\r\n vm.days = data;\r\n if(data.length > 0){\r\n vm.days.is_record = true;\r\n }\r\n\r\n vm.isLoading = false;\r\n vm.query_debounce = null;\r\n\r\n });\r\n\r\n }\r\n\r\n function toggleOptions(id){\r\n vm.optionsActive = vm.optionsActive ? false : true;\r\n $rootScope.forecastEditId = id\r\n }\r\n\r\n function onLaneTypeTabSelected(tab, tabIndex){\r\n if (tabIndex !== vm.lastTabIndex) {\r\n vm.lastTabIndex = tabIndex;\r\n vm.payload.mode = tab.field;\r\n vm.query();\r\n }\r\n }\r\n\r\n function selectOptionRowById(id){\r\n return vm.custom_forecasts.filter(function(d, i){return d.id === parseInt(id) })[0];\r\n }\r\n\r\n // function onForecastOptionSelected(id){\r\n\r\n // var opt = selectOptionRowById(id);\r\n // setPayLoadForForecasts(opt);\r\n // vm.query();\r\n // }\r\n\r\n\r\n function setPayLoadForForecasts(opt){\r\n\r\n opt = opt || {}\r\n vm.payload['origin[]'] = opt.origins ;\r\n vm.payload['destination[]'] = opt.destinations;\r\n vm.payload['lane_pairs[]'] = opt.lane_pairs;\r\n if (opt!== undefined)\r\n vm.payload['forecast_cmts_custom_options'] = opt.forecast_label;\r\n }\r\n\r\n function isMobile(){\r\n return $window.innerWidth < 959;\r\n }\r\n\r\n function submit(){\r\n\r\n }\r\n\r\n function huh(){\r\n vm;\r\n $httpParamSerializer;\r\n }\r\n\r\n\r\n\r\n function selectedItemChange(request, item, field) {\r\n /* If the field had data, and is cleared, then we need to requery */\r\n\r\n if (request == \"\" && vm.hasData[field] && !item){\r\n vm.hasData[field] = false;\r\n vm.query();\r\n }\r\n /* If the item exists then lets query it! */\r\n if (typeof(item) === 'object' && item && Object.keys(item).sort().includes(\"display\", \"value\")) {\r\n vm.hasData[field] = true;\r\n vm.query();\r\n }\r\n }\r\n\r\n function parseData(data){\r\n return Object.keys(data).map(function(date){\r\n return {\r\n date: date,\r\n exceptions: data[date].exceptions,\r\n is_record: data[date].is_record,\r\n is_high: data[date].is_high,\r\n tl_count: data[date].tl_count,\r\n //local_count: data[date].local_count,\r\n ltl_count: data[date].ltl_count,\r\n ontime: data[date].ontime,\r\n delivered: data[date].delivered,\r\n ref_numbers: data[date].ref_numbers\r\n }\r\n });\r\n }\r\n\r\n function getDefault(data){\r\n if(data.length>0){\r\n var row = data.filter(function(d, i){return (d.is_default === true || $rootScope.forecastEditId == d.id)})[0];\r\n vm.selectedOptionRow = row !== undefined ? row.id : null;\r\n }\r\n else\r\n vm.selectedOptionRow =null;\r\n }\r\n\r\n function checkClear(){\r\n if (vm.selectedOptionRow === 'null'){\r\n vm.selectedOptionRow = null;\r\n }\r\n\r\n if (vm.selectedOptionRow === 'create' || vm.selectedOptionRow === 'create_new'){\r\n vm.selectedOptionRow = null;\r\n vm.toggleOptions(null);\r\n }\r\n }\r\n\r\n function getCustomForecasts(){\r\n\r\n vm.isLoading = true;\r\n var dfd = $q.defer();\r\n\r\n $http.get(api.url_v2 + '/forecast_cmts_custom_options').then(function(response){\r\n vm.custom_forecasts = response.data;\r\n if (vm.firstLoad){\r\n\r\n getDefault(response.data);\r\n var opt = selectOptionRowById(vm.selectedOptionRow);\r\n setPayLoadForForecasts(opt)\r\n vm.query().finally(function(){\r\n vm.firstLoad = false;\r\n });\r\n\r\n\r\n }\r\n\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n vm.firstLoad = false;\r\n return dfd.reject(error);\r\n\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n\r\n\r\n function getDays(){\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n\r\n var timeoutId = false;\r\n\r\n\r\n var query = angular.copy(vm.payload);\r\n if (query.date_from !== null){\r\n UserService.set5DFDefaultAljex(query.date_from);\r\n vm.days.length = 0;\r\n\r\n ['mode', 'origin[]', 'destination[]', 'lane_pairs[]'].map(function(field){\r\n\r\n if (query[field] === 'all' || query[field] === undefined){\r\n delete query[field];\r\n }\r\n });\r\n\r\n query = $httpParamSerializer(query)\r\n var params='';\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"userEmail=\"+localStorage.switchEmail+\"&\";\r\n // }else if(localStorage.userCompany){\r\n // params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompany)+\"&\";\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&\";\r\n // }\r\n\r\n\r\n\r\n if(localStorage.customerType == 'cmts'){\r\n\r\n if(localStorage.switchEmailCmtsType){\r\n params +=\"userEmail=\"+localStorage.switchEmailCmtsType+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userCompanyCmts){\r\n params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userDepartmentCmts){\r\n params +=\"userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCmts)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCmts+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.dummyUser){\r\n params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }\r\n params +=\"customer_type=cmts&\";\r\n }\r\n\r\n var urlString=\"\";\r\n\r\n if (vm.selectedOptionRow === null)\r\n urlString= api.url_v2 + '/widgets_cmts/five_day_forecast?' + params+ query;\r\n else\r\n urlString= api.url_v2 + '/widgets_cmts/five_day_forecast/saved_search/'+vm.selectedOptionRow+'?' + params+ query;\r\n\r\n\r\n var promise = $http.get(urlString, {timeout: timeoutPromise.promise})\r\n .then(function(response) {\r\n timeoutPromise = false;\r\n if (timeoutId) $timeout.cancel(timeoutId);\r\n return parseData(response.data);\r\n }, function(error){\r\n vm.isLoading = false;\r\n return $q.reject(error);\r\n });\r\n timeoutId = $timeout(function() {\r\n if (timeoutPromise) timeoutPromise.resolve();\r\n timeoutId = false;\r\n }, 120000);\r\n vm.requestId = timeoutId;\r\n return promise;\r\n }\r\n\r\n else {\r\n vm.isLoading = false;\r\n return $q.reject();\r\n\r\n }\r\n }\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .controller('CustomOptionsCmtsController', CustomOptionsCmtsController)\r\n .component('customOptionsCmts', {\r\n templateUrl: \"/app/dashboard/cmts/five-day-forecast/custom-options.html\",\r\n controller: CustomOptionsCmtsController,\r\n bindings: {\r\n active: '=',\r\n customForecasts: \"=\",\r\n state_origin: '='\r\n\r\n }\r\n })\r\n\r\n\r\n CustomOptionsCmtsController.$inject = [\"$rootScope\", \"$element\", \"$httpParamSerializer\", '$state', \"$location\", \"$scope\", \"$timeout\", \"$mdConstant\", \"$q\", \"$http\", \"api\", \"$mdDialog\", \"$mdMedia\", \"$mdToast\", \"DepartmentManagementService\",\"UserService\",\"$anchorScroll\",\"fivedayCmtsService\"];\r\n function CustomOptionsCmtsController($rootScope, $element, $httpParamSerializer, $state, $location, $scope, $timeout, $mdConstant, $q, $http, api, $mdDialog, $mdMedia, $mdToast, DepartmentManagementService, UserService, $anchorScroll,fivedayCmtsService){\r\n var vm = this;\r\n vm.custom_forecasts = [];\r\n vm.cancel = cancel;\r\n vm.newOption = {forecast_label:\"\", origins:[], destinations:[], lane_pairs:[], is_default: false};\r\n vm.getMatches = getMatches;\r\n /// removed key for the bug raised APPENG-3088 //////\r\n vm.keys = [$mdConstant.KEY_CODE.COMMA];\r\n vm.chipDisplay = chipDisplay;\r\n vm.save = save;\r\n vm.isLoading = false;\r\n vm.deleteOptionRow = deleteOptionRow;\r\n vm.removeOtherDefaults = removeOtherDefaults;\r\n vm.requireAtLeastOne = requireAtLeastOne;\r\n vm.emptyData = emptyData;\r\n vm.closeModal = closeModal;\r\n vm.oldCustomForecasts;\r\n\r\n // $scope.$watch(function(){return vm.customOptionsForm } , function(customOptionsForm){\r\n // if (customOptionsForm){\r\n\r\n // vm.customOptionsForm.$setDirty(true);\r\n // }\r\n // });\r\n\r\n function cancel(){\r\n vm.active = false;\r\n var isRootforecastEditId=false;\r\n angular.forEach(vm.customForecasts, function(val){\r\n if($rootScope.forecastEditId===val.id)\r\n isRootforecastEditId=true;\r\n });\r\n if(!isRootforecastEditId)\r\n $rootScope.forecastEditId=null;\r\n }\r\n\r\n function initNewOption(){\r\n vm.newOption = {};\r\n vm.newOption = {forecast_label:\"\", origins:[], destinations:[], lane_pairs:[], is_default: false};\r\n }\r\n\r\n\r\n function getMatches(key, searchText){\r\n var query = {field: key, value: searchText}\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/cmts_autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(autocompletes);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function chipDisplay(chip){\r\n return chip.value;\r\n }\r\n\r\n function packageCustomForecasts(forecasts){\r\n var theForecasts = [];\r\n var keys = ['destinations', 'id', 'is_default', 'lane_pairs', 'origins', 'forecast_label'];\r\n\r\n theForecasts = forecasts.map(function(forecast, i){\r\n var row = {};\r\n for (var k in keys){\r\n if(keys[k]==='customer_type'){\r\n row[keys[k]] = forecasts.customer_type = 'cmts';\r\n }\r\n else\r\n row[keys[k]] = forecast[keys[k]];\r\n }\r\n return row;\r\n })\r\n return theForecasts;\r\n }\r\n\r\n function newRecordEmpty(record){\r\n if (record !== undefined){\r\n var newRecord = {'destinations': record['destinations'],\r\n 'lane_pairs': record['lane_pairs'],\r\n 'origins': record[\"origins\"],\r\n \"forecast_label\": record[\"forecast_label\"]}\r\n\r\n return (Object.keys(newRecord).map(function(key, i){ return newRecord[key]}).join(\"\").replace(/\\s/g, '') === \"\");\r\n }\r\n\r\n else{\r\n\r\n return true;\r\n }\r\n\r\n }\r\n\r\n function deleteOptionRow(row){\r\n var dfd = $q.defer();\r\n vm.isLoading = true;\r\n $http.delete(api.url_v2 + \"/forecast_cmts_custom_options/\" + row.id+\"?customer_type=cmts\").then(function(response){\r\n vm.oldCustomForecasts = vm.customForecasts = vm.customForecasts.filter(function(d, i){return d.id !== row.id});\r\n vm.isLoading = false;\r\n vm.customOptionsForm.$setPristine(true);\r\n dfd.resolve(response.data);\r\n }, function(error){\r\n vm.isLoading = false;\r\n return dfd.reject(error);\r\n });\r\n\r\n return dfd.promise;\r\n }\r\n\r\n function requireAtLeastOne(model){\r\n\r\n if (model !== undefined && (model.lane_pairs.length !== 0 || model.origins.length !==0 || model.destinations.length !==0 )){\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n\r\n }\r\n\r\n function removeOtherDefaults(row){\r\n\r\n if (row.is_default){\r\n vm.customForecasts.filter(function(d, i){return d.id !== row.id || row.id === null}).map(function(d,i){ d.is_default = false});\r\n if (row.id) {\r\n vm.newOption.is_default = false;\r\n }\r\n }\r\n\r\n }\r\n\r\n function emptyData(){\r\n var isValid=false;\r\n isValid=vm.oldCustomForecasts== undefined ? true : angular.equals(vm.oldCustomForecasts, vm.customForecasts)\r\n if(vm.oldCustomForecasts==undefined)\r\n vm.oldCustomForecasts=angular.copy(vm.customForecasts);\r\n return newRecordEmpty(vm.newOption) && isValid;\r\n }\r\n\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n\r\n function showApiError(messages) {\r\n $scope.apiErrorMessages = [];\r\n angular.forEach(messages, function(m) {\r\n // filter out some of the meaningless messages\r\n\r\n $scope.apiErrorMessages.push(m);\r\n });\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/dashboard/five-day-forecast/api-error.modal.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function save(){\r\n vm.isLoading = true;\r\n var dfd = $q.defer();\r\n var all_forecasts = angular.copy(vm.customForecasts)\r\n if (!newRecordEmpty(vm.newOption)){\r\n all_forecasts.push(vm.newOption)\r\n }\r\n\r\n\r\n $http.post(api.url_v2 + '/forecast_cmts_custom_options/batch?customer_type=cmts', {forecasts: packageCustomForecasts(all_forecasts)}).then(function(response){\r\n\r\n vm.customForecasts.length = 0;\r\n vm.customForecasts = angular.copy(response.data);\r\n vm.isLoading = false;\r\n initNewOption();\r\n vm.customOptionsForm.$setPristine(true);\r\n vm.active = false;\r\n return dfd.resolve(response.data);\r\n\r\n\r\n },\r\n function errorCallback(error){\r\n\r\n var messages = error.data.errors.constructor === Array ? error.data.errors : [error.data.errors];\r\n showApiError(messages);\r\n vm.isLoading = false;\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n\r\n }\r\n\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .component('breakdowncmts', {\r\n template: '
',\r\n controller: BreakdownCmtsController,\r\n bindings: {\r\n data: '<',\r\n index: '@',\r\n mobile: '<',\r\n onDelete: '&'\r\n }\r\n })\r\n\r\n BreakdownCmtsController.$inject = [\"$element\", \"$scope\", \"$window\"];\r\n function BreakdownCmtsController($element, $scope, $window){\r\n var vm = this;\r\n vm.svg;\r\n\r\n function getColor(shipment){\r\n switch (shipment){\r\n case \"ontime\":\r\n /* Class: $success */\r\n return {key: \"On-time Count: \", count: vm.data.ontime, value: '#30C268'};\r\n\r\n case \"exceptions\":\r\n /* Class: $danger */\r\n return {key: \"Exceptions Count: \", count: vm.data.exceptions, value: '#EF533D'};\r\n case \"delivered\":\r\n return {key: \"Delivered Count: \", count: vm.data.delivered, value: '#A9A9A9'};\r\n }\r\n }\r\n\r\n function drawBreakdown(){\r\n\r\n var element = angular.element(document.querySelector(\"#breakdown-\"+vm.index));\r\n var offSetWidthVal= element[0].offsetWidth===0?177:element[0].offsetWidth;\r\n if(!element) return;\r\n if (vm.svg) {\r\n vm.svg.selectAll('*').remove();\r\n vm.svg.attr({width: offSetWidthVal, height: 26});\r\n } else {\r\n vm.svg = d3.select(element[0])\r\n .append('svg')\r\n .attr({width: offSetWidthVal, height: 26});\r\n }\r\n var multiplier = vm.mobile ? 3 : .8;\r\n\r\n vm.svg\r\n .selectAll(\".forecast-meter\")\r\n .data(breakdown)\r\n .enter()\r\n .append(\"rect\")\r\n .attr(\"class\", \"forecast-meter\")\r\n .attr(\"width\", Math.floor(multiplier * (offSetWidthVal) / bars.num_bars))\r\n .attr(\"x\", function(d, i){\r\n // console.log(d);\r\n return i * (offSetWidthVal) / bars.num_bars;\r\n })\r\n .attr(\"y\", 0)\r\n .attr(\"height\", 26)\r\n .attr('name', function(d){return d.key;})\r\n .style('fill', function(d){return d.value;})\r\n\r\n vm.svg\r\n .data(breakdown)\r\n .append(\"rect\")\r\n .attr(\"width\", offSetWidthVal)\r\n .attr(\"x\", 0)\r\n .attr(\"y\", 0)\r\n .attr(\"height\", 26)\r\n .style('fill', 'transparent')\r\n .on('mouseover', function(d){\r\n tip.html(function(){\r\n var line = \"\";\r\n if(vm.data.ontime){\r\n line += \"

On-time: \" + vm.data.ontime + \"

\";\r\n }\r\n if(vm.data.exceptions){\r\n line += \"

Exceptions: \" + vm.data.exceptions + \"

\";\r\n }\r\n if(vm.data.delivered){\r\n line += \"

Delivered: \" + vm.data.delivered + \"

\";\r\n }\r\n return line\r\n });\r\n tip.show();\r\n })\r\n .on('mouseout', function(d){\r\n tip.hide();\r\n });\r\n d3.select(\".breakdown-\"+vm.index+\"-tip\").remove();\r\n var tip = d3.tip()\r\n .attr('class', \"d3-tip breakdown-\"+vm.index+\"-tip\")\r\n .style('background-color', \"#616161\")\r\n .style('z-index', 500)\r\n .offset([-10, 0])\r\n .html(function(d){ })\r\n vm.svg.call(tip);\r\n\r\n /* Clean up your tips */\r\n element.on('$destroy', function(){\r\n d3.select(\".breakdown-\"+vm.index+\"-tip\").remove();\r\n })\r\n }\r\n\r\n /* Initialization of the element */\r\n var breakdown = [];\r\n var bars = {active:0, potentials: 0,exceptions:0, delivered: 0, total: 0, num_bars: 20};\r\n Object.keys(vm.data).map(function(key){\r\n if ([\"delivered\", \"exceptions\", \"ontime\"].includes(key)){\r\n bars.total += vm.data[key];\r\n }\r\n //if(Number.isInteger(vm.data[key])) bars.total += vm.data[key];\r\n });\r\n // console.log(vm.data);\r\n\r\n bars.exceptions = Math.ceil(bars.num_bars * vm.data.exceptions / bars.total);\r\n bars.ontime = Math.ceil(bars.num_bars * vm.data.ontime / bars.total);\r\n bars.delivered = Math.ceil(bars.num_bars * vm.data.delivered / bars.total);\r\n\r\n if((bars.num_bars * vm.data.exceptions / bars.total) > 0 && (bars.num_bars * vm.data.exceptions / bars.total) < 0.99){\r\n bars.exceptions = 1;\r\n }\r\n if((bars.num_bars * vm.data.ontime / bars.total) > 0 && (bars.num_bars * vm.data.ontime / bars.total) < 0.99){\r\n bars.ontime = 1;\r\n }\r\n if((bars.num_bars * vm.data.delivered / bars.total) > 0 && (bars.num_bars * vm.data.delivered / bars.total) < 0.99){\r\n bars.delivered = 1;\r\n }\r\n\r\n var totalpipes = bars.exceptions + bars.ontime + bars.delivered;\r\n var barValues = [bars.exceptions, bars.ontime, bars.delivered];\r\n var maxIndex = barValues.indexOf(Math.max(bars.exceptions, bars.ontime, bars.delivered));\r\n\r\n if(totalpipes > 20){\r\n\r\n if(maxIndex == 0){\r\n var count = 20 - (bars.ontime + bars.delivered);\r\n bars.exceptions = count;\r\n }\r\n\r\n if(maxIndex == 1){\r\n var count = 20 - (bars.exceptions + bars.delivered);\r\n bars.ontime = count;\r\n }\r\n\r\n if(maxIndex == 2){\r\n var count = 20 - (bars.exceptions + bars.ontime);\r\n bars.delivered = count;\r\n }\r\n }\r\n\r\n /* Add bars relative to how many entries there are */\r\n Object.keys(bars).map(function(key){\r\n if ([\"delivered\", \"exceptions\", \"ontime\"].includes(key)){\r\n for (var i = 0; i < bars[key]; i++){\r\n breakdown.push(getColor(key));\r\n }\r\n }\r\n })\r\n\r\n // console.log(breakdown);\r\n\r\n /* When the document loads, create the bars */\r\n angular.element(document).ready(function(){\r\n drawBreakdown();\r\n angular.element($window).bind('resize', function(){\r\n drawBreakdown();\r\n $scope.$watch(vm.data, function(){drawBreakdown();}, true);\r\n });\r\n });\r\n };\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .component('forecastCfs', {\r\n templateUrl: \"/app/dashboard/cfs/five-day-forecast/forecast-cfs.html\",\r\n controller: ForecastCfsController,\r\n bindings: {\r\n data: '<',\r\n index: '@',\r\n mobile: '<',\r\n payload: '<'\r\n }\r\n })\r\n\r\n ForecastCfsController.$inject = [\"mdSelectHelper\", \"$element\", \"$location\", \"$scope\", \"$httpParamSerializer\"];\r\n function ForecastCfsController(mdSelectHelper, $element, $location, $scope, $httpParamSerializer){\r\n var vm = this;\r\n\r\n vm.containers = [];\r\n // ==========================\r\n // Functions\r\n // ==========================\r\n vm.createForecast = createForecast;\r\n vm.getDay = function(){return moment(vm.data.date).format('ddd');}\r\n vm.getDate = function(){ return moment(vm.data.date).format('MM/DD/YY');}\r\n vm.getDateForTT = function(){ return vm.data.date; }\r\n vm.getTotal = function(){return parseInt((vm.data.delivered + vm.data.ontime));}\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.getPercentageTl = getPercentageTl;\r\n vm.getPercentageLocal = getPercentageLocal;\r\n vm.getPercentageLtl = getPercentageLtl;\r\n\r\n vm.viewOnTrackAndTraceCfs = function(time_val){\r\n\r\n var query = {};\r\n //query.arrive_date_from = query.arrive_date_to = moment(vm.data.date).format('MMM DD YYYY');\r\n //query.arrive_date_from = query.arrive_date_to = time_val;\r\n query.arrive_date_from = query.arrive_date_to = moment(time_val).format('MMM DD YYYY');\r\n //query['origins[]'] = vm.payload['origin[]'];\r\n //query['destinations[]'] = vm.payload['destination[]'] ;\r\n //query['lane_pairs[]'] = vm.payload['lane_pair[]'];\r\n query.page_from = 'aljex';\r\n\r\n query.shipment_type = vm.payload.mode == 'all' ? \"\" : vm.payload.mode;\r\n query.forecast_aljex_custom_options=vm.payload.forecast_aljex_custom_options;\r\n query = $httpParamSerializer(query);\r\n window.open(\"/track-trace-cfs?\" + query);\r\n\r\n }\r\n\r\n createForecast();\r\n\r\n $scope.$watch(vm.data, function(){\r\n vm.containers = [];\r\n createForecast();\r\n }, true);\r\n\r\n function getPercentageTl() {\r\n return Math.round(vm.data.tl_count / (vm.data.tl_count+vm.data.ltl_count+vm.data.local_count) * 100) + \"%\";\r\n }\r\n\r\n function getPercentageLocal() {\r\n return Math.round(vm.data.local_count / (vm.data.tl_count+vm.data.ltl_count+vm.data.local_count) * 100) + \"%\";\r\n }\r\n\r\n function getPercentageLtl(){\r\n return Math.round(vm.data.ltl_count / (vm.data.tl_count+vm.data.ltl_count+vm.data.local_count) * 100) + \"%\";\r\n }\r\n\r\n\r\n function container(){\r\n return {\r\n color: 'blue',\r\n icon: '/assets/images/icons/container-100.svg',\r\n icon_class: 'container-icon',\r\n colspan: 4,\r\n rowspan: 2\r\n }\r\n }\r\n\r\n function crate(isEmpty){\r\n return {\r\n empty: isEmpty,\r\n color: isEmpty ? 'none' : 'red',\r\n icon: \"/assets/images/icons/crate-50.svg\",\r\n icon_class: 'crate-icon',\r\n colspan: 2,\r\n rowspan: 2\r\n };\r\n }\r\n\r\n function box(isEmpty){\r\n return {\r\n empty: isEmpty,\r\n color: isEmpty ? 'none' : 'green',\r\n icon_class: 'box-icon',\r\n icon: '/assets/images/icons/box-5.svg',\r\n colspan: 1,\r\n rowspan: 1\r\n };\r\n }\r\n\r\n function createVessel(n, vessel, isEmpty){\r\n for (var i = 0; i < n; i++){\r\n vm.containers.push(vessel(isEmpty));\r\n }\r\n }\r\n\r\n function createForecast(){\r\n\r\n var total = 0;\r\n var toprow = 8;\r\n var empties;\r\n Number.isInteger = Number.isInteger || function(value) {\r\n return typeof value === \"number\" &&\r\n isFinite(value) &&\r\n Math.floor(value) === value;\r\n };\r\n //// console.log(vm.data);\r\n Object.keys(vm.data).map(function(key){\r\n\r\n //if(Number.isInteger(vm.data[key])) total += vm.data[key];\r\n if ([\"ontime\", \"delivered\"].includes(key)){\r\n total += vm.data[key];\r\n }\r\n });\r\n // total /= 2;\r\n\r\n\r\n var containers = 0, crates = 0, boxes = 0;\r\n // containers = Math.floor(total / 100);\r\n // crates = Math.floor((total - (containers * 100)) / 50);\r\n // boxes = Math.ceil((total-(containers * 100) - (crates * 50)) / 5);\r\n\r\n containers = Math.floor(total / 50);\r\n crates = Math.floor((total - (containers * 50)) / 10);\r\n boxes = Math.ceil((total-(containers * 50) - (crates * 10)) / 1);\r\n\r\n // createVessel(1, box);\r\n // createVessel(3, box, true);\r\n // createVessel(boxes, box);\r\n // createVessel(crates, crate);\r\n // createVessel(containers, container);\r\n\r\n if (crates % 2 == 1) {\r\n crates -= 1;\r\n if (boxes == 0) {\r\n createVessel(1, crate);\r\n createVessel(1, crate, true);\r\n } else if (boxes >= 4) {\r\n var loopBoxCount=parseInt(boxes/4);\r\n boxes -= 4;\r\n if (boxes % 4 == 0){\r\n createVessel(boxes, box);\r\n createVessel(1, crate);\r\n createVessel(4, box);\r\n } else {\r\n createVessel(boxes % 4, box);\r\n createVessel(4 - (boxes % 4), box, true);\r\n for (var i=0;i 0){\r\n getDefault(vm.custom_forecasts);\r\n //}\r\n }, true);\r\n\r\n\r\n $scope.$watch(function(){return vm.customEditChck }, function(n, o){\r\n\r\n if (vm.customEditChck == true ){\r\n\r\n //var opt = selectOptionRowById(vm.selectedOptionRow);\r\n $http.get(api.url_v2 + '/forecast_aljex_custom_options/'+ vm.selectedOptionRow1 +'?customer_type=cfs').then(function(response){\r\n if(response.data){\r\n vm.isLoading = true;\r\n var opt = response.data;\r\n setPayLoadForForecasts(opt);\r\n vm.query();\r\n vm.isLoading = true;\r\n vm.customEditChck = false;\r\n }\r\n }, function errorCallback(error){\r\n\r\n });\r\n }\r\n\r\n });\r\n\r\n\r\n $scope.$watch(function(){return vm.selectedOptionRow }, function(n, o){\r\n\r\n if (n !== o && n !==undefined && !vm.firstLoad){\r\n\r\n var opt = selectOptionRowById(vm.selectedOptionRow);\r\n setPayLoadForForecasts(opt);\r\n vm.query();\r\n\r\n\r\n }\r\n\r\n });\r\n\r\n function selectedDateChange(){\r\n vm.query();\r\n }\r\n\r\n function getUrl(){\r\n }\r\n\r\n\r\n\r\n function query(){\r\n\r\n vm.isLoading = true;\r\n return vm.getDays().then(function(data){\r\n vm.days.length = 0;\r\n\r\n data.map(function(d){vm.days.push(d);})\r\n vm.days = data;\r\n if(data.length > 0){\r\n vm.days.is_record = true;\r\n }\r\n\r\n vm.isLoading = false;\r\n vm.query_debounce = null;\r\n\r\n });\r\n\r\n }\r\n\r\n function toggleOptions(id){\r\n vm.optionsActive = vm.optionsActive ? false : true;\r\n $rootScope.forecastEditId = id\r\n }\r\n\r\n function onLaneTypeTabSelected(tab, tabIndex){\r\n if (tabIndex !== vm.lastTabIndex) {\r\n vm.lastTabIndex = tabIndex;\r\n vm.payload.mode = tab.field;\r\n vm.query();\r\n }\r\n }\r\n\r\n function selectOptionRowById(id){\r\n return vm.custom_forecasts.filter(function(d, i){return d.id === parseInt(id) })[0];\r\n }\r\n\r\n // function onForecastOptionSelected(id){\r\n\r\n // var opt = selectOptionRowById(id);\r\n // setPayLoadForForecasts(opt);\r\n // vm.query();\r\n // }\r\n\r\n\r\n function setPayLoadForForecasts(opt){\r\n\r\n opt = opt || {}\r\n vm.payload['origin[]'] = opt.origins ;\r\n vm.payload['destination[]'] = opt.destinations;\r\n vm.payload['lane_pairs[]'] = opt.lane_pairs;\r\n if (opt!== undefined)\r\n vm.payload['forecast_aljex_custom_options'] = opt.forecast_label;\r\n }\r\n\r\n function isMobile(){\r\n return $window.innerWidth < 959;\r\n }\r\n\r\n function submit(){\r\n\r\n }\r\n\r\n function huh(){\r\n vm;\r\n $httpParamSerializer;\r\n }\r\n\r\n\r\n\r\n function selectedItemChange(request, item, field) {\r\n /* If the field had data, and is cleared, then we need to requery */\r\n\r\n if (request == \"\" && vm.hasData[field] && !item){\r\n vm.hasData[field] = false;\r\n vm.query();\r\n }\r\n /* If the item exists then lets query it! */\r\n if (typeof(item) === 'object' && item && Object.keys(item).sort().includes(\"display\", \"value\")) {\r\n vm.hasData[field] = true;\r\n vm.query();\r\n }\r\n }\r\n\r\n function parseData(data){\r\n return Object.keys(data).map(function(date){\r\n return {\r\n date: date,\r\n exceptions: data[date].exceptions,\r\n is_record: data[date].is_record,\r\n is_high: data[date].is_high,\r\n tl_count: data[date].tl_count,\r\n local_count: data[date].local_count,\r\n ltl_count: data[date].ltl_count,\r\n ontime: data[date].ontime,\r\n delivered: data[date].delivered, \r\n ref_numbers: data[date].ref_numbers\r\n }\r\n });\r\n }\r\n\r\n function getDefault(data){\r\n if(data.length>0){\r\n var row = data.filter(function(d, i){return (d.is_default === true || $rootScope.forecastEditId == d.id) })[0];\r\n vm.selectedOptionRow = row !== undefined ? row.id : null;\r\n }\r\n else\r\n vm.selectedOptionRow =null;\r\n }\r\n\r\n function checkClear(){\r\n if (vm.selectedOptionRow === 'null'){\r\n vm.selectedOptionRow = null;\r\n }\r\n\r\n if (vm.selectedOptionRow === 'create' || vm.selectedOptionRow === 'create_new'){\r\n vm.selectedOptionRow = null;\r\n vm.toggleOptions(null);\r\n }\r\n\r\n\r\n }\r\n\r\n function getCustomForecasts(){\r\n\r\n vm.isLoading = true;\r\n var dfd = $q.defer();\r\n\r\n $http.get(api.url_v2 + '/forecast_aljex_custom_options?customer_type=cfs').then(function(response){\r\n vm.custom_forecasts = response.data;\r\n if (vm.firstLoad){\r\n\r\n getDefault(response.data);\r\n var opt = selectOptionRowById(vm.selectedOptionRow);\r\n setPayLoadForForecasts(opt)\r\n vm.query().finally(function(){\r\n vm.firstLoad = false;\r\n });\r\n\r\n\r\n }\r\n\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n vm.firstLoad = false;\r\n return dfd.reject(error);\r\n\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n\r\n\r\n function getDays(){\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n\r\n var timeoutId = false;\r\n\r\n\r\n var query = angular.copy(vm.payload);\r\n if (query.date_from !== null){\r\n UserService.set5DFDefaultAljex(query.date_from);\r\n vm.days.length = 0;\r\n\r\n ['mode', 'origin[]', 'destination[]', 'lane_pairs[]'].map(function(field){\r\n\r\n if (query[field] === 'all' || query[field] === undefined){\r\n delete query[field];\r\n }\r\n });\r\n\r\n query = $httpParamSerializer(query)\r\n var params='';\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"userEmail=\"+localStorage.switchEmail+\"&\";\r\n // }else if(localStorage.userCompany){\r\n // params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompany)+\"&\";\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&\";\r\n // }\r\n\r\n\r\n\r\n if(localStorage.customerType == 'cfs'){\r\n\r\n if(localStorage.switchEmailCfsType){\r\n params +=\"userEmail=\"+localStorage.switchEmailCfsType+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userCompanyCfs){\r\n params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userDepartmentCfs){\r\n params +=\"userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCfs)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCfs+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.dummyUser){\r\n params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }\r\n\r\n }else{\r\n params +=\"customer_type=cfs&\";\r\n }\r\n\r\n var urlString=\"\";\r\n\r\n if (vm.selectedOptionRow === null)\r\n urlString= api.url_v2 + '/widgets_cfs/five_day_forecast?' + params+ query;\r\n else \r\n urlString= api.url_v2 + '/widgets_cfs/five_day_forecast/saved_search/'+vm.selectedOptionRow+'?' + params+ query;\r\n\r\n var promise = $http.get(urlString, {timeout: timeoutPromise.promise})\r\n .then(function(response) {\r\n\r\n timeoutPromise = false;\r\n if (timeoutId) $timeout.cancel(timeoutId);\r\n return parseData(response.data);\r\n }, function(error){\r\n vm.isLoading = false;\r\n return $q.reject(error);\r\n });\r\n timeoutId = $timeout(function() {\r\n if (timeoutPromise) timeoutPromise.resolve();\r\n timeoutId = false;\r\n }, 120000);\r\n vm.requestId = timeoutId;\r\n return promise;\r\n }\r\n\r\n else {\r\n vm.isLoading = false;\r\n return $q.reject();\r\n\r\n }\r\n }\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .controller('CustomOptionsCfsController', CustomOptionsCfsController)\r\n .component('customOptionsCfs', {\r\n templateUrl: \"/app/dashboard/cfs/five-day-forecast/custom-options.html\",\r\n controller: CustomOptionsCfsController,\r\n bindings: {\r\n active: '=',\r\n customForecasts: \"=\",\r\n state_origin: '='\r\n\r\n }\r\n })\r\n\r\n\r\n CustomOptionsCfsController.$inject = [\"$rootScope\", \"$element\", \"$httpParamSerializer\", '$state', \"$location\", \"$scope\", \"$timeout\", \"$mdConstant\", \"$q\", \"$http\", \"api\", \"$mdDialog\", \"$mdMedia\", \"$mdToast\", \"DepartmentManagementService\",\"UserService\",\"$anchorScroll\",\"fivedayCfsService\"];\r\n function CustomOptionsCfsController($rootScope, $element, $httpParamSerializer, $state, $location, $scope, $timeout, $mdConstant, $q, $http, api, $mdDialog, $mdMedia, $mdToast, DepartmentManagementService, UserService, $anchorScroll,fivedayCfsService){\r\n\r\n var vm = this;\r\n vm.custom_forecasts = [];\r\n vm.cancel = cancel;\r\n vm.newOption = {forecast_label:\"\", origins:[], destinations:[], lane_pairs:[], is_default: false};\r\n vm.getMatches = getMatches;\r\n /// removed key for the bug raised APPENG-3088 //////\r\n vm.keys = [$mdConstant.KEY_CODE.COMMA];\r\n vm.chipDisplay = chipDisplay;\r\n vm.save = save;\r\n vm.isLoading = false;\r\n vm.deleteOptionRow = deleteOptionRow;\r\n vm.removeOtherDefaults = removeOtherDefaults;\r\n vm.requireAtLeastOne = requireAtLeastOne;\r\n vm.emptyData = emptyData;\r\n vm.closeModal = closeModal;\r\n vm.oldCustomForecasts;\r\n\r\n // $scope.$watch(function(){return vm.customOptionsForm } , function(customOptionsForm){\r\n // if (customOptionsForm){\r\n\r\n // vm.customOptionsForm.$setDirty(true);\r\n // }\r\n // });\r\n\r\n function cancel(){\r\n vm.active = false;\r\n var isRootforecastEditId=false;\r\n angular.forEach(vm.customForecasts, function(val){\r\n if($rootScope.forecastEditId===val.id)\r\n isRootforecastEditId=true;\r\n });\r\n if(!isRootforecastEditId)\r\n $rootScope.forecastEditId=null;\r\n }\r\n\r\n function initNewOption(){\r\n vm.newOption = {};\r\n vm.newOption = {forecast_label:\"\", origins:[], destinations:[], lane_pairs:[], is_default: false};\r\n }\r\n\r\n\r\n function getMatches(key, searchText){\r\n var query = {field: key, value: searchText}\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/aljex_autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(autocompletes);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function chipDisplay(chip){\r\n\r\n return chip.value;\r\n }\r\n\r\n function packageCustomForecasts(forecasts){\r\n var theForecasts = [];\r\n var keys = ['destinations', 'id', 'is_default', 'lane_pairs', 'origins', 'forecast_label','customer_type'];\r\n\r\n theForecasts = forecasts.map(function(forecast, i){\r\n var row = {};\r\n for (var k in keys){\r\n if(keys[k]==='customer_type'){\r\n row[keys[k]] = forecasts.customer_type = 'cfs';\r\n }\r\n else\r\n row[keys[k]] = forecast[keys[k]];\r\n }\r\n return row;\r\n })\r\n return theForecasts;\r\n }\r\n\r\n function newRecordEmpty(record){\r\n if (record !== undefined){\r\n var newRecord = {'destinations': record['destinations'],\r\n 'lane_pairs': record['lane_pairs'],\r\n 'origins': record[\"origins\"],\r\n \"forecast_label\": record[\"forecast_label\"]}\r\n\r\n return (Object.keys(newRecord).map(function(key, i){ return newRecord[key]}).join(\"\").replace(/\\s/g, '') === \"\");\r\n }\r\n\r\n else{\r\n\r\n return true;\r\n }\r\n\r\n }\r\n\r\n function deleteOptionRow(row){\r\n var dfd = $q.defer();\r\n vm.isLoading = true;\r\n $http.delete(api.url_v2 + \"/forecast_aljex_custom_options/\"+ row.id +\"?customer_type=cfs\").then(function(response){\r\n vm.oldCustomForecasts = vm.customForecasts = vm.customForecasts.filter(function(d, i){return d.id !== row.id});\r\n vm.isLoading = false;\r\n vm.customOptionsForm.$setPristine(true);\r\n dfd.resolve(response.data);\r\n }, function(error){\r\n vm.isLoading = false;\r\n return dfd.reject(error);\r\n });\r\n\r\n return dfd.promise;\r\n }\r\n\r\n function requireAtLeastOne(model){\r\n\r\n if (model !== undefined && (model.lane_pairs.length !== 0 || model.origins.length !==0 || model.destinations.length !==0 )){\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n\r\n }\r\n\r\n function removeOtherDefaults(row){\r\n\r\n if (row.is_default){\r\n vm.customForecasts.filter(function(d, i){return d.id !== row.id || row.id === null}).map(function(d,i){ d.is_default = false});\r\n if (row.id) {\r\n vm.newOption.is_default = false;\r\n }\r\n }\r\n\r\n }\r\n\r\n function emptyData(){\r\n var isValid=false;\r\n isValid=vm.oldCustomForecasts== undefined ? true : angular.equals(vm.oldCustomForecasts, vm.customForecasts)\r\n if(vm.oldCustomForecasts==undefined)\r\n vm.oldCustomForecasts=angular.copy(vm.customForecasts);\r\n return newRecordEmpty(vm.newOption) && isValid;\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n function showApiError(messages) {\r\n $scope.apiErrorMessages = [];\r\n angular.forEach(messages, function(m) {\r\n // filter out some of the meaningless messages\r\n\r\n $scope.apiErrorMessages.push(m);\r\n });\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/dashboard/five-day-forecast/api-error.modal.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function save(){\r\n vm.isLoading = true;\r\n var dfd = $q.defer();\r\n var all_forecasts = angular.copy(vm.customForecasts)\r\n if (!newRecordEmpty(vm.newOption)){\r\n all_forecasts.push(vm.newOption)\r\n }\r\n\r\n\r\n $http.post(api.url_v2 + '/forecast_aljex_custom_options/batch?customer_type=cfs', {forecasts: packageCustomForecasts(all_forecasts)}).then(function(response){\r\n\r\n vm.customForecasts.length = 0;\r\n vm.customForecasts = angular.copy(response.data);\r\n vm.isLoading = false;\r\n initNewOption();\r\n vm.customOptionsForm.$setPristine(true);\r\n vm.active = false;\r\n return dfd.resolve(response.data);\r\n\r\n\r\n },\r\n function errorCallback(error){\r\n\r\n var messages = error.data.errors.constructor === Array ? error.data.errors : [error.data.errors];\r\n showApiError(messages);\r\n vm.isLoading = false;\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n\r\n }\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .component('breakdowncfs', {\r\n template: '
',\r\n controller: BreakdownCfsController,\r\n bindings: {\r\n data: '<',\r\n index: '@',\r\n mobile: '<',\r\n onDelete: '&'\r\n }\r\n })\r\n\r\n BreakdownCfsController.$inject = [\"$element\", \"$scope\", \"$window\"];\r\n function BreakdownCfsController($element, $scope, $window){\r\n var vm = this;\r\n vm.svg;\r\n\r\n function getColor(shipment){\r\n switch (shipment){\r\n case \"ontime\":\r\n /* Class: $success */\r\n return {key: \"On-time Count: \", count: vm.data.ontime, value: '#30C268'};\r\n\r\n case \"exceptions\":\r\n /* Class: $danger */\r\n return {key: \"Exceptions Count: \", count: vm.data.exceptions, value: '#EF533D'};\r\n case \"delivered\":\r\n return {key: \"Delivered Count: \", count: vm.data.delivered, value: '#A9A9A9'};\r\n }\r\n }\r\n\r\n function drawBreakdown(){\r\n\r\n var element = angular.element(document.querySelector(\"#breakdown-\"+vm.index));\r\n var offSetWidthVal= element[0].offsetWidth===0?177:element[0].offsetWidth;\r\n if(!element) return;\r\n if (vm.svg) {\r\n vm.svg.selectAll('*').remove();\r\n vm.svg.attr({width: offSetWidthVal, height: 26});\r\n } else {\r\n vm.svg = d3.select(element[0])\r\n .append('svg')\r\n .attr({width: offSetWidthVal, height: 26});\r\n }\r\n var multiplier = vm.mobile ? 3 : .8;\r\n\r\n vm.svg\r\n .selectAll(\".forecast-meter\")\r\n .data(breakdown)\r\n .enter()\r\n .append(\"rect\")\r\n .attr(\"class\", \"forecast-meter\")\r\n .attr(\"width\", Math.floor(multiplier * (offSetWidthVal) / bars.num_bars))\r\n .attr(\"x\", function(d, i){\r\n // console.log(d);\r\n return i * (offSetWidthVal) / bars.num_bars;\r\n })\r\n .attr(\"y\", 0)\r\n .attr(\"height\", 26)\r\n .attr('name', function(d){return d.key;})\r\n .style('fill', function(d){return d.value;})\r\n\r\n vm.svg\r\n .data(breakdown)\r\n .append(\"rect\")\r\n .attr(\"width\", offSetWidthVal)\r\n .attr(\"x\", 0)\r\n .attr(\"y\", 0)\r\n .attr(\"height\", 26)\r\n .style('fill', 'transparent')\r\n .on('mouseover', function(d){\r\n tip.html(function(){\r\n var line = \"\";\r\n if(vm.data.ontime){\r\n line += \"

On-time: \" + vm.data.ontime + \"

\";\r\n }\r\n if(vm.data.exceptions){\r\n line += \"

Exceptions: \" + vm.data.exceptions + \"

\";\r\n }\r\n if(vm.data.delivered){\r\n line += \"

Delivered: \" + vm.data.delivered + \"

\";\r\n }\r\n return line\r\n });\r\n tip.show();\r\n })\r\n .on('mouseout', function(d){\r\n tip.hide();\r\n });\r\n d3.select(\".breakdown-\"+vm.index+\"-tip\").remove();\r\n var tip = d3.tip()\r\n .attr('class', \"d3-tip breakdown-\"+vm.index+\"-tip\")\r\n .style('background-color', \"#616161\")\r\n .style('z-index', 500)\r\n .offset([-10, 0])\r\n .html(function(d){ })\r\n vm.svg.call(tip);\r\n\r\n /* Clean up your tips */\r\n element.on('$destroy', function(){\r\n d3.select(\".breakdown-\"+vm.index+\"-tip\").remove();\r\n })\r\n }\r\n\r\n /* Initialization of the element */\r\n var breakdown = [];\r\n var bars = {active:0, potentials: 0,exceptions:0, delivered: 0, total: 0, num_bars: 20};\r\n Object.keys(vm.data).map(function(key){\r\n if ([\"delivered\", \"exceptions\", \"ontime\"].includes(key)){\r\n bars.total += vm.data[key];\r\n }\r\n //if(Number.isInteger(vm.data[key])) bars.total += vm.data[key];\r\n });\r\n // console.log(vm.data);\r\n\r\n bars.exceptions = Math.ceil(bars.num_bars * vm.data.exceptions / bars.total);\r\n bars.ontime = Math.ceil(bars.num_bars * vm.data.ontime / bars.total);\r\n bars.delivered = Math.ceil(bars.num_bars * vm.data.delivered / bars.total);\r\n\r\n if((bars.num_bars * vm.data.exceptions / bars.total) > 0 && (bars.num_bars * vm.data.exceptions / bars.total) < 0.99){\r\n bars.exceptions = 1;\r\n }\r\n if((bars.num_bars * vm.data.ontime / bars.total) > 0 && (bars.num_bars * vm.data.ontime / bars.total) < 0.99){\r\n bars.ontime = 1;\r\n }\r\n if((bars.num_bars * vm.data.delivered / bars.total) > 0 && (bars.num_bars * vm.data.delivered / bars.total) < 0.99){\r\n bars.delivered = 1;\r\n }\r\n\r\n var totalpipes = bars.exceptions + bars.ontime + bars.delivered;\r\n var barValues = [bars.exceptions, bars.ontime, bars.delivered];\r\n var maxIndex = barValues.indexOf(Math.max(bars.exceptions, bars.ontime, bars.delivered));\r\n\r\n if(totalpipes > 20){\r\n\r\n if(maxIndex == 0){\r\n var count = 20 - (bars.ontime + bars.delivered);\r\n bars.exceptions = count;\r\n }\r\n\r\n if(maxIndex == 1){\r\n var count = 20 - (bars.exceptions + bars.delivered);\r\n bars.ontime = count;\r\n }\r\n\r\n if(maxIndex == 2){\r\n var count = 20 - (bars.exceptions + bars.ontime);\r\n bars.delivered = count;\r\n }\r\n }\r\n\r\n /* Add bars relative to how many entries there are */\r\n Object.keys(bars).map(function(key){\r\n if ([\"delivered\", \"exceptions\", \"ontime\"].includes(key)){\r\n for (var i = 0; i < bars[key]; i++){\r\n breakdown.push(getColor(key));\r\n }\r\n }\r\n })\r\n\r\n // console.log(breakdown);\r\n\r\n /* When the document loads, create the bars */\r\n angular.element(document).ready(function(){\r\n drawBreakdown();\r\n angular.element($window).bind('resize', function(){\r\n drawBreakdown();\r\n $scope.$watch(vm.data, function(){drawBreakdown();}, true);\r\n });\r\n });\r\n };\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('app.widgets', [\r\n 'app.core'\r\n ]);\r\n\r\n})();\n/**\r\n * @ngdoc module\r\n * @name WidgetsController\r\n *\r\n * @description The WidgetsController module interfaces with the various types of widgets displayed through-out the system\r\n *\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name toggleCollapse\r\n * @description to toggle the collapsed state of the widget\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.widgets')\r\n .controller('WidgetsCslController', WidgetsCslController); \r\n\r\n /** @ngInject */\r\n WidgetsCslController.$inject = ['$stateParams','TrackTraceCslService', 'AdvSearchCslService', 'ShippingDetailsCslService', '$scope', '$rootScope','$log', '$translatePartialLoader', '$window', '$mdMedia', '$mdDialog', '$location', '$timeout'];\r\n function WidgetsCslController($stateParams, TrackTraceCslService ,AdvSearchCslService, ShippingDetailsCslService, $scope, $rootScope, $log, $translatePartialLoader, $window, $mdMedia, $mdDialog, $location, $timeout) {\r\n var vm = this;\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('widgets');\r\n $translatePartialLoader.addPart('shippingdetails');\r\n\r\n // vm variables\r\n vm.showRemoveButton = false; //by default don't show the bookmar remove button\r\n vm.collapsed = TrackTraceCslService.isCollapsed();\r\n vm.collapsibleLayout = TrackTraceCslService.isCollapsed() ? \"row\" : \"column\";\r\n vm.collapseState = TrackTraceCslService.isCollapsed() ? \"collapsed\" : \"collapse-expanded\";\r\n vm.bookmarksLoaded = false;\r\n vm.bookmarks = {};\r\n vm.bookmarksCount = 0;\r\n vm.isBookmarksFirstLoad = !ShippingDetailsCslService.hasCachedBookmarks();\r\n\r\n // functions\r\n vm.toggleCollapse = toggleCollapse;\r\n vm.editBookmarks = editBookmarks;\r\n vm.doneEditingBookmarks = doneEditingBookmarks;\r\n vm.sendMessage = sendMessage;\r\n vm.closeModal = closeModal;\r\n vm.getCurrentUrl = getCurrentUrl;\r\n vm.getShipmentDetails = getShipmentDetails;\r\n vm.bookmarksError = false;\r\n vm.getException = getException;\r\n vm.type = 'normal';\r\n // After the promise is completed, return the bookmarks from the service\r\n \r\n if (ShippingDetailsCslService.hasCachedBookmarks()) {\r\n vm.bookmarks = ShippingDetailsCslService.getCachedBookmarks();\r\n vm.bookmarksCount = vm.bookmarks.load_bookmarks.length;\r\n \r\n }\r\n\r\n ShippingDetailsCslService.getBookmarks(vm.type).then(function(successResponse){\r\n vm.bookmarksCount = 0;\r\n vm.bookmarks = successResponse.load_bookmarks;\r\n angular.forEach(vm.bookmarks, function(b, key) {\r\n vm.bookmarksCount += 1;\r\n if (b.flags && b.flags.length > 0) {\r\n if (b.flags.indexOf('current_exception') !== -1) {\r\n b.flag = 'current_exception';\r\n }\r\n else if (b.flags.indexOf('potential_exception') !== -1) {\r\n b.flag = 'potential_exception';\r\n }\r\n }\r\n if (!b.jobno){\r\n\r\n b.isdelivered = 'booking';\r\n }\r\n });\r\n vm.bookmarksLoaded = true;\r\n vm.isBookmarksFirstLoad = false;\r\n }).catch(function(error) {\r\n vm.bookmarksError = 'Error fetching bookmarks';\r\n vm.bookmarksLoaded = true;\r\n vm.isBookmarksFirstLoad = false;\r\n });\r\n\r\n // Unbookmark the requested shipment then refresh our list of bookmarks\r\n vm.unBookmarkId = function(pro) {\r\n // vm.bookmarksLoaded = false\r\n if(pro){\r\n\r\n var currentPagePro = ShippingDetailsCslService.getShipmentPro();\r\n\r\n ShippingDetailsCslService.unBookmarkId(pro,vm.type).then(function(){\r\n ShippingDetailsCslService.getBookmarks(vm.type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse.load_bookmarks;\r\n vm.bookmarksCount--;\r\n\r\n if((pro == currentPagePro) && (currentPagePro != 'no') ){\r\n $rootScope.$broadcast('doneBookmark', true);\r\n }\r\n \r\n //vm.bookmarksLoaded = true;\r\n });\r\n }).catch(function(error) {\r\n // vm.bookmarksError = 'Error fetching bookmarks';\r\n // vm.bookmarksLoaded = true;\r\n /*Added by Abheesh*/\r\n ShippingDetailsCslService.getBookmarks(vm.type).then(function(successResponse){\r\n vm.bookmarks = successResponse.load_bookmarks;\r\n vm.bookmarksLoaded = true;\r\n //vm.bookmarksCount--;\r\n });\r\n });\r\n }\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n \r\n $timeout(function () {\r\n vm.tooltipIsLoading = false;\r\n }, 1000); \r\n\r\n }\r\n\r\n function toggleCollapse(ev) {\r\n if (vm.collapsed) {\r\n vm.collapsed = false;\r\n TrackTraceCslService.setCollapsed(false);\r\n vm.collapsibleLayout = \"column\";\r\n vm.collapseState = \"collapse-expanded\";\r\n } else {\r\n vm.collapsed = true;\r\n TrackTraceCslService.setCollapsed(true);\r\n vm.collapsibleLayout = \"row\";\r\n vm.collapseState = \"collapsed\";\r\n }\r\n }\r\n\r\n /*vm.getException = function (number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsCslService.getShipment(number).then(function(resp){\r\n vm.response = {\"code\": resp.exceptions[0].code, \"description\": resp.exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }*/\r\n\r\n /* Function for Tooltip potential exceptions */\r\n vm.getPotentialException = function(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsCslService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n vm.getStatus = function(item){\r\n var expression = item.isdelivered == \"booking\" ? \"N/A\" : \"Undelivered\";\r\n return item.isdelivered == \"true\" ? 'Delivered' : expression\r\n }\r\n\r\n\r\n function editBookmarks() {\r\n $log.debug('clicked edit button');\r\n vm.showRemoveButton = true;\r\n }\r\n\r\n function doneEditingBookmarks() {\r\n vm.showRemoveButton = false;\r\n }\r\n\r\n function sendMessage() {\r\n $log.debug('send a message');\r\n $mdDialog.hide();\r\n }\r\n\r\n //closes a modal\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function getCurrentUrl() {\r\n return $location.absUrl();\r\n }\r\n\r\n function getShipmentDetails() {\r\n return ShippingDetailsCslService.getShipmentSummary();\r\n }\r\n\r\n vm.activeColumns = [\r\n {\r\n name : \"shipper\",\r\n width : 30\r\n },\r\n {\r\n name : \"AWB\",\r\n width : 30\r\n },\r\n {\r\n name : \"shipDate\",\r\n width : 20\r\n },\r\n {\r\n name : \"dueDate\",\r\n width : 20\r\n }\r\n ];\r\n\r\n vm.availableColumns = [\r\n {\r\n name : \"Customer Group\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"consignee\",\r\n width : 20\r\n },\r\n {\r\n name : \"Service Type\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Origin\",\r\n width : \"md\"\r\n },\r\n {\r\n name : \"shipperCity\",\r\n width : 20\r\n },\r\n {\r\n name : \"Reference #\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Business Type\",\r\n width : \"md\"\r\n },\r\n {\r\n name : \"Consol #\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Owning Station\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Selling Station\",\r\n width : \"md\"\r\n },\r\n {\r\n name : \"Destination Country\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Destination City\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Current Status\",\r\n width : \"lg\"\r\n }\r\n ];\r\n\r\n\r\n // if(localStorage.switchEmail){\r\n // vm.switchUser = true;\r\n // }else if(localStorage.userCompany){\r\n // vm.switchUser = true;\r\n // }\r\n \r\n if(localStorage.customerType == 'csl'){\r\n if(localStorage.switchEmailCslType){\r\n vm.switchUser = true;\r\n }else if(localStorage.userCompanyCsl){\r\n vm.switchUser = true;\r\n }\r\n }\r\n \r\n\r\n\t}\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name WidgetsController\r\n *\r\n * @description The WidgetsController module interfaces with the various types of widgets displayed through-out the system\r\n *\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name toggleCollapse\r\n * @description to toggle the collapsed state of the widget\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.widgets')\r\n .controller('WidgetsCmtsController', WidgetsCmtsController);\r\n\r\n /** @ngInject */\r\n WidgetsCmtsController.$inject = ['$stateParams','TrackTraceCmtsService', 'AdvSearchCmtsService', 'ShippingDetailsCmtsService', '$scope', '$rootScope','$log', '$translatePartialLoader', '$window', '$mdMedia', '$mdDialog', '$location'];\r\n function WidgetsCmtsController($stateParams, TrackTraceCmtsService ,AdvSearchCmtsService, ShippingDetailsCmtsService, $scope, $rootScope, $log, $translatePartialLoader, $window, $mdMedia, $mdDialog, $location) {\r\n var vm = this;\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('widgets');\r\n $translatePartialLoader.addPart('shippingdetails');\r\n\r\n // vm variables\r\n vm.showRemoveButton = false; //by default don't show the bookmar remove button\r\n vm.collapsed = TrackTraceCmtsService.isCollapsed();\r\n vm.collapsibleLayout = TrackTraceCmtsService.isCollapsed() ? \"row\" : \"column\";\r\n vm.collapseState = TrackTraceCmtsService.isCollapsed() ? \"collapsed\" : \"collapse-expanded\";\r\n vm.bookmarksLoaded = false;\r\n vm.bookmarks = {};\r\n vm.bookmarksCount = 0;\r\n vm.isBookmarksFirstLoad = !ShippingDetailsCmtsService.hasCachedBookmarks();\r\n\r\n // functions\r\n vm.toggleCollapse = toggleCollapse;\r\n vm.editBookmarks = editBookmarks;\r\n vm.doneEditingBookmarks = doneEditingBookmarks;\r\n vm.sendMessage = sendMessage;\r\n vm.closeModal = closeModal;\r\n vm.getCurrentUrl = getCurrentUrl;\r\n vm.getShipmentDetails = getShipmentDetails;\r\n vm.bookmarksError = false;\r\n vm.getException = getException;\r\n vm.type = 'normal';\r\n // After the promise is completed, return the bookmarks from the service\r\n\r\n if (ShippingDetailsCmtsService.hasCachedBookmarks()) {\r\n vm.bookmarks = ShippingDetailsCmtsService.getCachedBookmarks();\r\n vm.bookmarksCount = vm.bookmarks.load_cmts_bookmarks.length;\r\n\r\n }\r\n\r\n ShippingDetailsCmtsService.getBookmarks(vm.type).then(function(successResponse){\r\n vm.bookmarksCount = 0;\r\n vm.bookmarks = successResponse.load_cmts_bookmarks;\r\n angular.forEach(vm.bookmarks, function(b, key) {\r\n vm.bookmarksCount += 1;\r\n if (b.flags && b.flags.length > 0) {\r\n if (b.flags.indexOf('current_exception') !== -1) {\r\n b.flag = 'current_exception';\r\n }\r\n }\r\n });\r\n vm.bookmarksLoaded = true;\r\n vm.isBookmarksFirstLoad = false;\r\n }).catch(function(error) {\r\n vm.bookmarksError = 'Error fetching bookmarks';\r\n vm.bookmarksLoaded = true;\r\n vm.isBookmarksFirstLoad = false;\r\n });\r\n\r\n // Unbookmark the requested shipment then refresh our list of bookmarks\r\n vm.unBookmarkId = function(load_id) {\r\n // vm.bookmarksLoaded = false\r\n if(load_id){\r\n\r\n var currentPageLoadId = ShippingDetailsCmtsService.getShipmentLoadID();\r\n\r\n ShippingDetailsCmtsService.unBookmarkId(load_id,vm.type).then(function(){\r\n ShippingDetailsCmtsService.getBookmarks(vm.type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse.load_cmts_bookmarks;\r\n vm.bookmarksCount--;\r\n\r\n if((load_id == currentPageLoadId) && (currentPageLoadId != 'no') ){\r\n $rootScope.$broadcast('doneBookmark', true);\r\n }\r\n\r\n //vm.bookmarksLoaded = true;\r\n });\r\n }).catch(function(error) {\r\n // vm.bookmarksError = 'Error fetching bookmarks';\r\n // vm.bookmarksLoaded = true;\r\n /*Added by Abheesh*/\r\n ShippingDetailsCmtsService.getBookmarks(vm.type).then(function(successResponse){\r\n vm.bookmarks = successResponse.load_cmts_bookmarks;\r\n vm.bookmarksLoaded = true;\r\n //vm.bookmarksCount--;\r\n });\r\n });\r\n }\r\n }\r\n\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n\r\n $timeout(function () {\r\n vm.tooltipIsLoading = false;\r\n }, 1000);\r\n\r\n }\r\n\r\n function toggleCollapse(ev) {\r\n if (vm.collapsed) {\r\n vm.collapsed = false;\r\n TrackTraceCmtsService.setCollapsed(false);\r\n vm.collapsibleLayout = \"column\";\r\n vm.collapseState = \"collapse-expanded\";\r\n } else {\r\n vm.collapsed = true;\r\n TrackTraceCmtsService.setCollapsed(true);\r\n vm.collapsibleLayout = \"row\";\r\n vm.collapseState = \"collapsed\";\r\n }\r\n }\r\n\r\n\r\n function editBookmarks() {\r\n $log.debug('clicked edit button');\r\n vm.showRemoveButton = true;\r\n }\r\n\r\n function doneEditingBookmarks() {\r\n vm.showRemoveButton = false;\r\n }\r\n\r\n function sendMessage() {\r\n $log.debug('send a message');\r\n $mdDialog.hide();\r\n }\r\n\r\n //closes a modal\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function getCurrentUrl() {\r\n return $location.absUrl();\r\n }\r\n\r\n function getShipmentDetails() {\r\n return ShippingDetailsCmtsService.getShipmentSummary();\r\n }\r\n\r\n\r\n\r\n // if(localStorage.switchEmail){\r\n // vm.switchUser = true;\r\n // }else if(localStorage.userCompany){\r\n // vm.switchUser = true;\r\n // }\r\n\r\n if(localStorage.customerType == 'cmts'){\r\n if(localStorage.switchEmailCmtsType){\r\n vm.switchUser = true;\r\n }else if(localStorage.userCompanyCmts){\r\n vm.switchUser = true;\r\n }\r\n }\r\n\r\n\t}\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name WidgetsController\r\n *\r\n * @description The WidgetsController module interfaces with the various types of widgets displayed through-out the system\r\n *\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name toggleCollapse\r\n * @description to toggle the collapsed state of the widget\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.widgets')\r\n .controller('WidgetsCfsController', WidgetsCfsController); \r\n\r\n /** @ngInject */\r\n WidgetsCfsController.$inject = ['$stateParams','TrackTraceCfsService', 'AdvSearchCfsService', 'ShippingDetailsCfsService', '$scope', '$rootScope','$log', '$translatePartialLoader', '$window', '$mdMedia', '$mdDialog', '$location'];\r\n function WidgetsCfsController($stateParams, TrackTraceCfsService ,AdvSearchCfsService, ShippingDetailsCfsService, $scope, $rootScope, $log, $translatePartialLoader, $window, $mdMedia, $mdDialog, $location) {\r\n var vm = this;\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('widgets');\r\n $translatePartialLoader.addPart('shippingdetails');\r\n\r\n // vm variables\r\n vm.showRemoveButton = false; //by default don't show the bookmar remove button\r\n vm.collapsed = TrackTraceCfsService.isCollapsed();\r\n vm.collapsibleLayout = TrackTraceCfsService.isCollapsed() ? \"row\" : \"column\";\r\n vm.collapseState = TrackTraceCfsService.isCollapsed() ? \"collapsed\" : \"collapse-expanded\";\r\n vm.bookmarksLoaded = false;\r\n vm.bookmarks = {};\r\n vm.bookmarksCount = 0;\r\n vm.isBookmarksFirstLoad = !ShippingDetailsCfsService.hasCachedBookmarks();\r\n\r\n // functions\r\n vm.toggleCollapse = toggleCollapse;\r\n vm.editBookmarks = editBookmarks;\r\n vm.doneEditingBookmarks = doneEditingBookmarks;\r\n vm.sendMessage = sendMessage;\r\n vm.closeModal = closeModal;\r\n vm.getCurrentUrl = getCurrentUrl;\r\n vm.getShipmentDetails = getShipmentDetails;\r\n vm.bookmarksError = false;\r\n vm.getException = getException;\r\n vm.type = 'normal';\r\n // After the promise is completed, return the bookmarks from the service\r\n \r\n if (ShippingDetailsCfsService.hasCachedBookmarks()) {\r\n vm.bookmarks = ShippingDetailsCfsService.getCachedBookmarks();\r\n vm.bookmarksCount = vm.bookmarks.load_bookmarks.length;\r\n \r\n }\r\n \r\n ShippingDetailsCfsService.getBookmarks(vm.type).then(function(successResponse){\r\n vm.bookmarksCount = 0;\r\n vm.bookmarks = successResponse.load_bookmarks;\r\n angular.forEach(vm.bookmarks, function(b, key) {\r\n vm.bookmarksCount += 1;\r\n if (b.flags && b.flags.length > 0) {\r\n if (b.flags.indexOf('current_exception') !== -1) {\r\n b.flag = 'current_exception';\r\n }\r\n else if (b.flags.indexOf('potential_exception') !== -1) {\r\n b.flag = 'potential_exception';\r\n }\r\n }\r\n if (!b.jobno){\r\n\r\n b.isdelivered = 'booking';\r\n }\r\n });\r\n vm.bookmarksLoaded = true;\r\n vm.isBookmarksFirstLoad = false;\r\n }).catch(function(error) {\r\n vm.bookmarksError = 'Error fetching bookmarks';\r\n vm.bookmarksLoaded = true;\r\n vm.isBookmarksFirstLoad = false;\r\n });\r\n\r\n // Unbookmark the requested shipment then refresh our list of bookmarks\r\n vm.unBookmarkId = function(pro) {\r\n // vm.bookmarksLoaded = false\r\n if(pro){\r\n\r\n var currentPagePro = ShippingDetailsCfsService.getShipmentPro();\r\n\r\n ShippingDetailsCfsService.unBookmarkId(pro,vm.type).then(function(){\r\n ShippingDetailsCfsService.getBookmarks(vm.type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse.load_bookmarks;\r\n vm.bookmarksCount--;\r\n\r\n if((pro == currentPagePro) && (currentPagePro != 'no') ){\r\n $rootScope.$broadcast('doneBookmark', true);\r\n }\r\n \r\n //vm.bookmarksLoaded = true;\r\n });\r\n }).catch(function(error) {\r\n // vm.bookmarksError = 'Error fetching bookmarks';\r\n // vm.bookmarksLoaded = true;\r\n /*Added by Abheesh*/\r\n ShippingDetailsCfsService.getBookmarks(vm.type).then(function(successResponse){\r\n vm.bookmarks = successResponse.load_bookmarks;\r\n vm.bookmarksLoaded = true;\r\n //vm.bookmarksCount--;\r\n });\r\n });\r\n }\r\n }\r\n\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n \r\n $timeout(function () {\r\n vm.tooltipIsLoading = false;\r\n }, 1000); \r\n\r\n }\r\n\r\n function toggleCollapse(ev) {\r\n if (vm.collapsed) {\r\n vm.collapsed = false;\r\n TrackTraceCfsService.setCollapsed(false);\r\n vm.collapsibleLayout = \"column\";\r\n vm.collapseState = \"collapse-expanded\";\r\n } else {\r\n vm.collapsed = true;\r\n TrackTraceCfsService.setCollapsed(true);\r\n vm.collapsibleLayout = \"row\";\r\n vm.collapseState = \"collapsed\";\r\n }\r\n }\r\n\r\n // vm.getException = function (number) {\r\n // vm.tooltipIsLoading = true;\r\n // ShippingDetailsCfsService.getShipment(number).then(function(resp){\r\n // vm.response = {\"code\": resp.exceptions[0].code, \"description\": resp.exceptions[0].description};\r\n // vm.tooltipIsLoading = false;\r\n // });\r\n // }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n vm.getPotentialException = function(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsCfsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n vm.getStatus = function(item){\r\n var expression = item.isdelivered == \"booking\" ? \"N/A\" : \"Undelivered\";\r\n return item.isdelivered == \"true\" ? 'Delivered' : expression\r\n }\r\n\r\n\r\n function editBookmarks() {\r\n $log.debug('clicked edit button');\r\n vm.showRemoveButton = true;\r\n }\r\n\r\n function doneEditingBookmarks() {\r\n vm.showRemoveButton = false;\r\n }\r\n\r\n function sendMessage() {\r\n $log.debug('send a message');\r\n $mdDialog.hide();\r\n }\r\n\r\n //closes a modal\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function getCurrentUrl() {\r\n return $location.absUrl();\r\n }\r\n\r\n function getShipmentDetails() {\r\n return ShippingDetailsCfsService.getShipmentSummary();\r\n }\r\n\r\n vm.activeColumns = [\r\n {\r\n name : \"shipper\",\r\n width : 30\r\n },\r\n {\r\n name : \"AWB\",\r\n width : 30\r\n },\r\n {\r\n name : \"shipDate\",\r\n width : 20\r\n },\r\n {\r\n name : \"dueDate\",\r\n width : 20\r\n }\r\n ];\r\n\r\n vm.availableColumns = [\r\n {\r\n name : \"Customer Group\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"consignee\",\r\n width : 20\r\n },\r\n {\r\n name : \"Service Type\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Origin\",\r\n width : \"md\"\r\n },\r\n {\r\n name : \"shipperCity\",\r\n width : 20\r\n },\r\n {\r\n name : \"Reference #\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Business Type\",\r\n width : \"md\"\r\n },\r\n {\r\n name : \"Consol #\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Owning Station\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Selling Station\",\r\n width : \"md\"\r\n },\r\n {\r\n name : \"Destination Country\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Destination City\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Current Status\",\r\n width : \"lg\"\r\n }\r\n ];\r\n\r\n\r\n // if(localStorage.switchEmail){\r\n // vm.switchUser = true;\r\n // }else if(localStorage.userCompany){\r\n // vm.switchUser = true;\r\n // } \r\n\r\n if(localStorage.customerType == 'cfs'){\r\n if(localStorage.switchEmailCfsType){\r\n vm.switchUser = true;\r\n }else if(localStorage.userCompanyCfs){\r\n vm.switchUser = true;\r\n }\r\n }\r\n\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('ServerTableSRService', ServerTableSRService);\r\n\r\n /** @ngInject */\r\n ServerTableSRService.$inject = ['AJAX', '$timeout', '$mdMedia', '$mdDialog', 'ngTableDefaults', '$rootScope', '$q', '$http', '$log', 'api', 'NgTableParams', \"TrackTraceService\", 'UserService'];\r\n function ServerTableSRService(AJAX, $timeout, $mdMedia, $mdDialog, ngTableDefaults, $rootScope, $q, $http, $log, api, NgTableParams, TrackTraceService, UserService) {\r\n\r\n var vm = this;\r\n vm.noResults = false;\r\n var query = {},\r\n data,\r\n activeTimeoutPromise = false,\r\n isEmpty = true,\r\n // ngTable = genTable(),\r\n state = {\r\n loading: false\r\n },\r\n\r\n timeoutPromise,\r\n searchRequest,\r\n //query = AdvSearchService.getCurrentSearch(),\r\n ngTable = new NgTableParams(\r\n {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: { duedate: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n\r\n var defaultSettings = {\r\n counts: [10,25,50,100],\r\n defaultSort: \"asc\",\r\n filterOptions: {\r\n filterComparator: true\r\n }\r\n };\r\n\r\n var queryState = {\r\n displayNoResults: true,\r\n isFilterLoading: {\r\n active: false,\r\n exception: false,\r\n potential: false\r\n }\r\n };\r\n\r\n var collapsed = true, noResults = false;\r\n\r\n vm.customFullscreen = $mdMedia('xs') || $mdMedia('sm');\r\n\r\n var initialSorting = [\r\n { label: \"Id ASC\", value: { id: \"asc\"} },\r\n { label: \"Id DESC\", value: { id: \"desc\"} },\r\n { label: \"Name ASC\", value: { name: \"asc\"} },\r\n { label: \"Name DESC\", value: { name: \"desc\"} }\r\n ];\r\n var initialParams = {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n sorting: undefined\r\n };\r\n\r\n function genTable(){\r\n return new NgTableParams(\r\n {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: { duedate: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n getData: getData\r\n });\r\n }\r\n\r\n function sortFields(orderBy, sorting){\r\n var result = [];\r\n for (var i in orderBy){\r\n if (!isNaN(+i)){\r\n var x = orderBy[i].replace(/[+-]/g,\"\");\r\n var p = {};\r\n p[x] = sorting[x];\r\n result.push(p);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function getQuery() {return query;}\r\n\r\n function getData(paramsName){\r\n\r\n state.loading = true;\r\n $rootScope.$broadcast(\"serverTable:stateChanged\", state);\r\n\r\n var name = 'company_tickets';\r\n if(paramsName != undefined && paramsName != null){\r\n name = paramsName;\r\n }\r\n\r\n var dfd = $q.defer();\r\n var url = api.url+'/tickets/'+name;\r\n //var dfd = $q.defer();\r\n $http.get(url).then(function(res){\r\n\r\n if(res.status == 200){\r\n vm.support_request_data = res.data.company_tickets;\r\n vm.supportRequestTab = name; \r\n return dfd.resolve(res);\r\n }\r\n\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function getCount(){\r\n\r\n var dfd = $q.defer();\r\n var url = api.url+'/tickets/dashboard_info';\r\n //var dfd = $q.defer();\r\n $http.get(url).then(function(response){\r\n\r\n if(response.status == 200){\r\n return dfd.resolve(response.data);\r\n }\r\n\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function showExportCSV(ev){\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\r\n if (false){\r\n $mdDialog.show({\r\n templateUrl: '/app/track-trace/exports/no-results.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n controller: function DialogController($scope, $mdDialog){\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n } else{\r\n\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/support-requests/exports/export-csv.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n\r\n controller: function DialogController($scope, $mdDialog){\r\n\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n\r\n $scope.exportAll = function() {\r\n var params = ServerTableService.getParams();\r\n $scope.exportCsvLoaded = false;\r\n AdvSearchService.exportSearchFields([], params).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function() {\r\n $mdDialog.hide();\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n };\r\n $scope.exportCustom = function() {\r\n //debugger;\r\n };\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n function ngTableReload(ngTableData){\r\n\r\n //debugger;\r\n\r\n ngTable.settings({data: ngTableData.data})\r\n ngTable.data = ngTableData.data;\r\n\r\n ngTable.total(ngTableData.total);\r\n\r\n ngTable.reload();\r\n\r\n $rootScope.$broadcast(\"serverRsTable:stateChanged\", ngTableData.state);\r\n $rootScope.$broadcast(\"serverRsTable:loaded\", ngTableData.data, ngTableData.error, ngTableData.data);\r\n\r\n }\r\n\r\n return {\r\n getState: function(){return state;},\r\n // genTable: genTable,\r\n sortFields: sortFields,\r\n showExportCSV: showExportCSV,\r\n getData: getData,\r\n getCount: getCount,\r\n getParams: function(){\r\n return ngTable.parameters();\r\n },\r\n isEmpty: function(){return isEmpty;},\r\n getTable: function(){ return ngTable;},\r\n getTableParams: function(){return ngTable;},\r\n getQueryState: function() { return queryState;},\r\n reloadTable: function(){\r\n\r\n\r\n // $rootScope.$broadcast(\"ngTableParamsChanged\", ngTableDefaults);\r\n //return getData({\"invalidate_cache\":true});\r\n //\r\n //return ngTable.reload();\r\n },\r\n getQuery: getQuery,\r\n ngTableReload:ngTableReload,\r\n setQuery: function() {\r\n if (searchRequest){\r\n //timeoutPromise.resolve('newSearch');\r\n //timeoutPromise = $q.defer();\r\n } else {\r\n //timeoutPromise = $q.defer();\r\n }\r\n ngTableDefaults.settings = angular.extend({}, ngTableDefaults.settings, defaultSettings);\r\n ngTableDefaults.params = angular.extend({}, ngTableDefaults.params, initialParams);\r\n $rootScope.$broadcast(\"ngTableRsParamsChanged\", ngTableDefaults);\r\n searchRequest = getData();\r\n return searchRequest;\r\n }\r\n };\r\n\r\n }\r\n\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name ServerTableController.getData()\r\n * @description method retrieves data from the AdvSearchService to generate the table\r\n * @param {params} - provides an object of parameters to the server, this is a function that\r\n * exposes many table parameters.\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('ServerTableSRController', ServerTableSRController);\r\n\r\n /** @ngInject */\r\n\r\n ServerTableSRController.$inject = ['$scope', '$http', '$resource', '$location','CustomResultsSRService', '$translatePartialLoader', '$log', '$filter', '$translate', 'NgTableParams', 'ngTableEventsChannel', 'ServerTableSRService', '$q', 'slug', 'mdSelectHelper'];\r\n function ServerTableSRController($scope, $http, $resource, $location, CustomResultsSRService, $translatePartialLoader,$log, $filter, $translate, NgTableParams, ngTableEventsChannel ,ServerTableSRService, $q, slug, mdSelectHelper) {\r\n\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('shipment');\r\n $translatePartialLoader.addPart('tracktrace');\r\n\r\n /* Variables */\r\n var vm = this;\r\n vm.query = {};\r\n vm.response = {};\r\n vm.isEmpty = ServerTableSRService.isEmpty();\r\n vm.filters = {shipdate: \"\", duedate: \"\"}\r\n vm.query = ServerTableSRService.getQuery();\r\n vm.selectAll = false;\r\n vm.checkSelectedInput = checkSelectedInput;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n $scope.$watch('vm.query', function(){\r\n vm.query;\r\n vm.isLoading = true;\r\n ServerTableSRService.setQuery();\r\n }, true);\r\n\r\n vm.columns = CustomResultsSRService.getColumnHeaders();\r\n\r\n \r\n $scope.$on(\"supportRequestTabChanged\", function(event, tabName){\r\n CustomResultsSRService.setNewColumnHeaders(tabName);\r\n vm.columns = CustomResultsSRService.getColumnHeaders(); \r\n });\r\n\r\n\r\n vm.filtersVisible = false;\r\n vm.isLoading = false;\r\n vm.checkStatus = checkStatus;\r\n\r\n /* Function call for Tooltip exceptions */\r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n $scope.getHeaderWidth = getHeaderWidth;\r\n vm.tableParams = ServerTableSRService.getTable();\r\n $scope.sortClickable = sortClickable;\r\n vm.viewAccountCreation = viewAccountCreation;\r\n vm.checkAll = checkAll;\r\n vm.selectUser = selectUser;\r\n //vm.checkSelectedInput = checkSelectedInput;\r\n vm.validation_user = localStorage.getItem(\"supportrequestValidator\");\r\n vm.cview_classic_admin = localStorage.getItem(\"cview_classic_admin\");\r\n vm.supportrequestAdminCheck = localStorage.getItem(\"supportrequestAdmin\");\r\n vm.supportrequestUserCheck = localStorage.getItem(\"supportrequestUser\");\r\n\r\n vm.globals={};\r\n vm.globals.tableParams1 = new NgTableParams({}, {\r\n debugId: \"Table 1\",\r\n dataset: []\r\n });\r\n\r\n $scope.$on(\"angular-resizable.resizeEnd\", onResizeEnd);\r\n $scope.$on(\"angular-resizable.resizeStart\", function(event){\r\n event.preventDefault();\r\n event.stopPropagation();\r\n });\r\n\r\n \r\n function checkSelectedInput(){\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n \r\n var tmp = 0\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n \r\n angular.forEach(vm.tableParams.data, function(v,k){\r\n if(v.selected && v.selected != undefined){ \r\n tmp++;\r\n }\r\n });\r\n \r\n vm.selectAll = (vm.tableParams.data.length == tmp && tmp > 0)\r\n }, $scope, vm.tableParams);\r\n\r\n }\r\n\r\n\r\n function sortClickable(event){\r\n return event.target.parentElement.className != \"rg-right\";\r\n }\r\n\r\n function onResizeEnd(event, args){\r\n event.preventDefault();\r\n event.stopPropagation();\r\n localStorage.setItem( \"resize-tt-\" + args.id, args.width );\r\n }\r\n\r\n function getHeaderWidth(item){\r\n var width = localStorage.getItem(\"resize-tt-\" + slug(item));\r\n return width ? \"width: \" + width + \"px;\" : \"\";\r\n }\r\n\r\n function checkAll(selected){ \r\n vm.tableParams.data.map(function(user){\r\n user.selected = selected;\r\n });\r\n }\r\n\r\n function selectUser(){\r\n vm.selectAll = false;\r\n }\r\n\r\n vm.filterDate = filterDate;\r\n vm.tableParams = ServerTableSRService.getTable();\r\n vm.updateFilteredCounts = updateFilteredCounts;\r\n\r\n function filterDate(key){\r\n var filter_by = {};\r\n if (vm.filters[key]){\r\n filter_by[key] = moment(vm.filters[key]).format(\"YYYY-MM-DD\");\r\n }\r\n vm.tableParams.filter(filter_by);\r\n updateFilteredCounts();\r\n }\r\n\r\n function viewAccountCreation(id){\r\n $location.path('/userAccountPreview/'+id);\r\n }\r\n\r\n function checkStatus(row){\r\n\r\n return (row.isdelivered === 'booking' || row.isdelivered == 'n/a') ? 'N/A' : 'Undelivered'\r\n\r\n }\r\n\r\n function updateFilteredCounts(){\r\n vm.tableParams.reload();\r\n var results_filtered = Object.values(vm.tableParams.filter()).filter(function(v, i){ return v && v !== ''}).length !== 0\r\n\r\n TrackTraceService.setResultsCount(vm.tableParams.total());\r\n TrackTraceService.setResultsFiltered(results_filtered);\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n var codeArray = [];\r\n var descArray = [];\r\n resp.exceptions.forEach(function(item, index, array){\r\n if(!codeArray.includes(item.code)){\r\n codeArray.push(item.code);\r\n }\r\n if(!descArray.includes(item.description)){\r\n descArray.push(item.description);\r\n }\r\n });\r\n vm.response = {\"code\": codeArray.join(\", \"), \"description\": descArray.join(\", \")};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n $scope.$on(\"ngTableRsParamsChanged\", function(){\r\n vm.tableParams = ServerTableSRService.getTable();\r\n vm.isEmpty = ServerTableSRService.isEmpty();\r\n vm.tableParams.reload();\r\n\r\n });\r\n\r\n $scope.$on(\"serverRsTable:stateChanged\", function(event, state) {\r\n vm.isLoading = state.loading;\r\n if(vm.isLoading === false){\r\n vm.tableParams.reload();\r\n }\r\n });\r\n\r\n $scope.$on(\"serverRsTable:loaded\", function(event, data, error, response) {\r\n /* Added by Abheesh */\r\n if(vm.query['reference_number']=='Global Search'){\r\n // // console.log('Global search');\r\n // vm.tableParams.data = TrackTraceService.getGlobalSearchData();\r\n data = JSON.parse(localStorage.getItem(\"globalSearchData\"));\r\n vm.tableParams['data'] = data;\r\n }\r\n if ($location.path().indexOf('/supportRequests') === -1) return;\r\n // Check filters for actual values and tell our service that we are filtering\r\n \r\n vm.noResults = !data || data.length == 0;\r\n vm.isError = !!error;\r\n vm.error = vm.isError ? error : \"\";\r\n });\r\n \r\n }\r\n}) ();\r\n\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk \r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License \r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name ServerTable.ngTableSorterRow\r\n * @description directive that sorts the rows of a table\r\n * @restrict E\r\n */\r\n\r\n(function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableSorterRowSupportReq', ngTableSorterRow);\r\n\r\n ngTableSorterRow.$inject = [];\r\n\r\n function ngTableSorterRow(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/admin/support-requests/server-table/sorterHeader.html',\r\n scope: true,\r\n controller: 'ngTableSorterRowController'\r\n };\r\n return directive;\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.setColumnHeaders\r\n * @description sets the headers of the shipments table in track and trace\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.getColumnHeaders\r\n * @description gets the column headers variable\r\n */\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.setActiveColumns\r\n* @description setActiveColumns() set the activeColumns variable\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getActiveColumns\r\n* @description getActiveColumns() returns the active columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getDefaultColumns\r\n* @description getDefaultColumns() returns the default columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getAvailableColumns\r\n* @description getAvailableColumns returns the availableColumns\r\n*/\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('CustomResultsSRService', CustomResultsSRService);\r\n\r\n /** @ngInject */\r\n CustomResultsSRService.$inject = ['$log', '$http'];\r\n function CustomResultsSRService($log, $http) {\r\n /* fake data */\r\n //var $translate = $filter('translate');\r\n // function loadColumns(){\r\n // return $http.get('./app/track-trace/customize-results/columns.json').then(function(res){return res.data;});\r\n // //promise = deferred.promise;\r\n // }\r\n\r\n\r\n var columns = [\r\n\r\n {field:\"id\", title: \"ID#\", sortable: \"id\", filter: {}, show:false, tdClass: \"td-10\", class: \"td-10\", static: true, checkbox:false},\r\n {field:\"name\", title: \"NAME\", sortable: \"name\", filter: {}, show:false, tdClass: \"td-30\", class: \"td-25\", static: true, checkbox:false},\r\n {field:\"company\", title: \"COMPANY\", sortable: \"company\", filter: {}, show:false, tdClass: \"td-30\", class: \"td-25\", static: true, checkbox:false},\r\n {field:\"title\", title: \"TITLE\", sortable: \"title\", filter: {}, show:false, tdClass: \"td-30\", class: \"td-25\", static: true, checkbox:false},\r\n {field:\"created_at\", title: \"REQUEST DATE\", sortable: \"created_at\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", isDate: true, static: true, checkbox:false},\r\n {field:\"updated_at\", title: \"LAST UPDATED\", sortable: \"updated_at\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", isDate: true, static: true, checkbox:false},\r\n {field:\"status\", title: \"STATUS\", sortable: \"status\", filter: {}, show:false, disabled:true, tdClass: \"td-15\", class: \"td-15\", static: true, checkbox:false},\r\n {field:\"actions\", title: \"ACTIONS\", sortable: \"actions\", filter: {}, show:false, tdClass: \"td-25\", class: \"td-25\", static: true, checkbox:false}\r\n\r\n ];\r\n\r\n columns.map(function(d){\r\n\r\n if (d.isDate) {\r\n d.filter[d.field] = '/app/admin/support-requests/server-table/filterDate.html';\r\n } else if (d.disabled) {\r\n d.filter[d.field] = '/app/admin/support-requests/server-table/filterStatus.html';\r\n } else {\r\n \r\n d.filter[d.field] = '/app/admin/support-requests/server-table/filterDefault.html';\r\n\r\n if(d.filter['actions']){\r\n d.filter[d.field] = '';\r\n }\r\n \r\n }\r\n })\r\n\r\n var columnHeaders = [];\r\n\r\n //var cookiedata = JSON.parse(localStorage.getItem(\"mycookie\"));\r\n\r\n //defaultColumns = company request columns\r\n\r\n var defaultColumns = new Array();\r\n\r\n defaultColumns['company_tickets'] = [\r\n {field:\"id\", title: \"ID#\"},\r\n {field:\"name\", title: \"NAME\"},\r\n {field:\"created_at\", title: \"REQUEST DATE\"},\r\n {field:\"updated_at\", title: \"LAST UPDATED\"},\r\n {field:\"status\", title: \"STATUS\"},\r\n {field:\"actions\", title: \"ACTIONS\"}\r\n ];\r\n\r\n //Account Creation Columns[Headers]\r\n defaultColumns['account_tickets'] = [\r\n {field:\"id\", title: \"ID#\"},\r\n {field:\"company\", title: \"COMPANY\"},\r\n {field:\"created_at\", title: \"REQUEST DATE\"},\r\n {field:\"updated_at\", title: \"LAST UPDATED\"},\r\n {field:\"status\", title: \"STATUS\"},\r\n {field:\"actions\", title: \"ACTIONS\"}\r\n ];\r\n\r\n //General Support Columns[Headers]\r\n defaultColumns['general_tickets'] = [\r\n {field:\"id\", title: \"ID#\"},\r\n {field:\"title\", title: \"TITLE\"},\r\n {field:\"created_at\", title: \"REQUEST DATE\"},\r\n {field:\"updated_at\", title: \"LAST UPDATED\"},\r\n {field:\"status\", title: \"STATUS\"},\r\n {field:\"actions\", title: \"ACTIONS\"}\r\n ];\r\n\r\n var activeColumns = defaultColumns['company_tickets'];\r\n\r\n function setNewColumnHeaders(tabName){\r\n activeColumns = defaultColumns[tabName];\r\n setColumnHeaders(defaultColumns[tabName]);\r\n }\r\n\r\n /* functions */\r\n function setColumnHeaders(activeCol) {\r\n columnHeaders.length = 0;\r\n columns.map(function(d){d.show = false});\r\n for (var j in activeColumns){\r\n for (var i in columns) {\r\n if (activeColumns[j].field === columns[i].field){\r\n columns[i].show = true;\r\n columnHeaders.push(columns[i]);\r\n }\r\n }\r\n }\r\n columnHeaders.unshift({field:\"selected\", title: \"Select\", \"sortable\": \"selected\", show:true, tdClass: \"td-15\", class: \"td-10\", static: true, isDate: false, checkbox:true}); \r\n }\r\n\r\n function setActiveColumns(activeCol){\r\n activeColumns = activeCol;\r\n }\r\n\r\n function setDefaultColumns(activeCol){\r\n activeColumns = defaultColumns;\r\n }\r\n\r\n setColumnHeaders(activeColumns);\r\n\r\n return {\r\n setColumnHeaders: setColumnHeaders,\r\n getColumnHeaders: function() {\r\n return columnHeaders;\r\n },\r\n setActiveColumns: setActiveColumns,\r\n setNewColumnHeaders: setNewColumnHeaders,\r\n getActiveColumns: function() {\r\n return activeColumns;\r\n },\r\n getDefaultColumns: function(){\r\n return defaultColumns;\r\n },\r\n getAvailableColumns: function() {\r\n return columns.filter(function(d){\r\n if (!d.show){\r\n return {\r\n field: d.field,\r\n title: d.title\r\n };\r\n }\r\n }).sort(function(a, b) {\r\n return a.title > b.title ? 1 : (a.title < b.title ? -1 : 0);\r\n });\r\n }\r\n };\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('app.layout', [\r\n 'app.core',\r\n 'app.user'\r\n ]);\r\n})();\r\n\n\r\n\r\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('lensviewUsersController', lensviewUsersController);\r\n lensviewUsersController.$inject = ['$scope', '$window', '$location', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http','$state', 'api', 'UserManagementService' , 'lensviewUsersPopupService' ,\r\n '$rootScope', 'UserService','$filter','ngTableEventsChannel','NgTableParams','lensviewService'];\r\n function lensviewUsersController($scope, $window, $location,$stateParams, $mdDialog, $mdMedia, $mdToast, $q, $http,$state, api, UserManagementService, lensviewUsersPopupService, $rootScope,\r\n UserService, $filter,ngTableEventsChannel,NgTableParams,lensviewService){\r\n\r\n\t var vm = this;\r\n //vm.readAccessUsers = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n\r\n try{\r\n //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if(JSON.parse(localStorage.getItem(\"user\")).permissions.cww.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.csl.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.cmts.Company.includes('read')){\r\n vm.readAccessUsers = true;\r\n }else{\r\n vm.readAccessUsers = false;\r\n }\r\n }\r\n catch(e){\r\n vm.readAccessUsers = false;\r\n }\r\n\r\n //// console.log($state.current.name);\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n if(vm.readAccessUsers){\r\n vm.columns = [\r\n //{\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"first_name\", \"title\": 'ADMIN.LENS.FIRST_NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"last_name\", \"title\": 'ADMIN.LENS.LAST_NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"customer_types\", \"title\": 'CUSTOMER TYPE', \"sortable\": \"customer_types\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"email\", \"title\": 'ADMIN.LENS.EMAIL', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"user_status\", \"title\": 'ADMIN.LENS.STATUS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n ];\r\n }else\r\n {\r\n vm.columns = [\r\n //{\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"first_name\", \"title\": 'ADMIN.LENS.FIRST_NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"last_name\", \"title\": 'ADMIN.LENS.LAST_NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"customer_types\", \"title\": 'CUSTOMER TYPE', \"sortable\": \"customer_types\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"email\", \"title\": 'ADMIN.LENS.EMAIL', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"user_status\", \"title\": 'ADMIN.LENS.STATUS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n ];\r\n }\r\n vm.buttons = [\r\n //{id: 0, action: add_userslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n {id: 1, action: search_deptlens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n\r\n\r\n }else\r\n {\r\n vm.columns = [\r\n {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"first_name\", \"title\": 'ADMIN.LENS.FIRST_NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"last_name\", \"title\": 'ADMIN.LENS.LAST_NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"customer_types\", \"title\": 'CUSTOMER TYPE', \"sortable\": \"customer_types\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"email\", \"title\": 'ADMIN.LENS.EMAIL', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"user_status\", \"title\": 'ADMIN.LENS.STATUS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n ];\r\n vm.buttons = [\r\n {id: 0, action: add_userslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n {id: 1, action: search_deptlens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n }\r\n\r\n\t vm.icon=\"\";\r\n\t vm.lensviewtitle = \"Users Currently Assigned to this Company\";\r\n\t vm.lensviewtitle2 = \"Users with Access to this Lens Group\";\r\n\t vm.lensviewtable = true;\r\n vm.getList = [];\r\n vm.getLink = getLink;\r\n\t vm.getTable = getTable;\r\n vm.getField = getField;\r\n\t vm.getClass = getClass;\r\n\t vm.checkAll = checkAll;\r\n\t vm.clearAll = clearAll;\r\n\t vm.searchflag = false;\r\n\t vm.addSectedusers = addSectedusers;\r\n\t vm.cancel = cancel;\r\n vm.link = {field: \"id\", column: \"name\", url: \"users\"};\r\n vm.gotoSelectUser = gotoSelectUser;\r\n vm.selectUser = selectUser;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.bulkDelete = bulkDelete;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n vm.searchListData = search_deptlens_criteria;\r\n vm.loadLensUsersFlag = true;\r\n\r\n if($state.current.name =='showCompany'){\r\n vm.showUserText = true;\r\n }\r\n\r\n if($state.current.name =='showLensGroup'){\r\n vm.viewUserTextLens = true;\r\n }\r\n\r\n vm.globals={};\r\n vm.globals.tableParams1 = new NgTableParams({}, {\r\n debugId: \"Table 1\",\r\n dataset: []\r\n });\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n function subscribeToTable(tableParams){\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n var tmp = 0\r\n angular.forEach(vm.userTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.userTable.data.length == tmp && tmp > 0)\r\n }, $scope, tableParams);\r\n }\r\n\r\n // $rootScope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n\r\n // if(params1 != params2 || UserService.getCompanyRouteStatus())\r\n // {\r\n // var res = UserManagementService.getLensgroupUsers();\r\n // res.then(function(dd){\r\n // vm.getList = dd;\r\n // vm.loadLensUsersFlag = false;\r\n // });\r\n // }\r\n // });\r\n\r\n if($state.current.name == 'showLensGroup'){\r\n var res = UserManagementService.getLensgroupUsers();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n vm.loadLensUsersFlag = false;\r\n });\r\n }\r\n\r\n\r\n // $rootScope.$on(\"userTable:all:loadedlensusers\", function(event, data) {\r\n // vm.getList = data;\r\n // vm.loadLensUsersFlag = false;\r\n // });\r\n // UserManagementService.getUsers('lens_group_users');\r\n\r\n\r\n function getSelectedCount() {\r\n //return getselectedUsersCount().length;\r\n \t return vm.listSelectedCount;\r\n }\r\n\r\n\t function add_userslens(ev){\r\n // vm.searchflag = true;\r\n vm.loadLensUsersFlag = true;\r\n //UserManagementService.getUsers('lens_group');\r\n\t \tvm.listSelectedCount = 0;\r\n\t \tvar useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/users/add-users.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n\r\n })\r\n .then(function(answer) {\r\n \tvm.listSelectedCount = 0;\r\n }, function() {\r\n \tvm.listSelectedCount = 0;\r\n });\r\n\r\n\r\n\t }\r\n\r\n function search_deptlens(){\r\n\r\n\t \tvm.searchflag = !vm.searchflag;\r\n }\r\n\r\n\t function search_deptlens_criteria(isClear){\r\n\r\n var search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search);\r\n\t //lensviewUsersPopupService.setQuery(search);\r\n vm.userTable.filter({});\r\n vm.userTable.filter(search)\r\n vm.userTable.page(1)\r\n vm.userTable.reload();\r\n\r\n\t }\r\n\r\n if($state.current.name =='showCompany'){\r\n \t//// console.log(UserManagementService.getCompanyUsers());\r\n \tUserManagementService.getCompanyUsers();\r\n }\r\n\r\n\r\n\t function getTable(){\r\n // if($state.current.name.includes('new')){\r\n // return false;\r\n // }\r\n if($state.current.name !='createCompany'){\r\n\r\n vm.userTable = UserManagementService.getUserTable();\r\n return UserManagementService.getUserTable();\r\n }else{\r\n \t//// console.log(lensviewUsersPopupService.setSelectedLensUsers());\r\n //// console.log(UserManagementService.getUserTable());\r\n \treturn UserManagementService.getUserTable();\r\n \t//lensviewUsersPopupService..getUserTable();\r\n \t//lensviewUsersPopupService.setSelectedLensUsers();\r\n\r\n\r\n \t// lensviewUsersPopupService.getSelectedUsers().map(function(user){\r\n \t// \t UserManagementService.addUserTable(user);\r\n \t// });\r\n }\r\n // checkAll(true);\r\n\r\n\r\n\t\t}\r\n\t\t function getField(item, field){\r\n\r\n\t\t switch (field){\r\n\t\t //case \"is_active\":\r\n //return item[field] ? (item.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n case \"user_status\":\r\n if(item[field].charAt(0) != null || item[field].charAt(0) != undefined){\r\n return item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n }\r\n case \"customer_types\":\r\n if(item[field].length > 0){\r\n return item[field].join(',').toUpperCase();\r\n }\r\n\t\t default:\r\n\t\t return item[field];\r\n\t\t }\r\n\t\t}\r\n\t\tfunction getLink(data){\r\n\t return vm.link.url+\"/\"+data[vm.link.field];\r\n\t }\r\n\t function isLink(field){\r\n\t return field == vm.link.column;\r\n\t }\r\n\r\n\t function getClass(item, field){\r\n if(!item.is_active && item.user_status == 'issue(non-ad)' && item[field] == 'issue(non-ad)') {\r\n return 'inactive-user';\r\n }\r\n\t switch (field){\r\n\t //case \"is_active\":\r\n //return item.confirmed ? item[field] ? \"active-user\" : \"inactive-user\" : \"inactive-user\";\r\n case \"user_status\":\r\n if(item[field] == 'active'){ return \"active-user\"; }\r\n if(item[field] == 'inactive'){ return \"inactive-user\"; }\r\n if(item[field] == 'unverified'){ return \"inactive-user\"; }\r\n if(item[field] == 'issue(ad)'){ return \"issue-ad-user\"; }\r\n if(item[field] == 'issue(non-ad)'){ return \"issue-nonad-user\"; }\r\n if(item[field] == 'no-security'){ return \"no-security-user\"; }\r\n if(item[field] == 'bad state'){ return \"inactive-user\"; }\r\n\t //return item[field] ? \"active-user\" : \"inactive-user\";\r\n\t default:\r\n\t return '';\r\n\t }\r\n\t }\r\n\t function checkAll(selected){\r\n\t vm.userTable.data.map(function(user){\r\n\t user.selected = selected;\r\n\t });\r\n\r\n var count;\r\n var count1 = UserManagementService.getSelectedUsers().length;\r\n var count2 = vm.userTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\t if(selected)\r\n\t \tvm.listSelectedCount = count; //vm.userTable.data.length;\r\n\t else\r\n\t \tvm.listSelectedCount = 0;\r\n\r\n\t }\r\n\t function addSectedusers(){\r\n // vm.selectedUsers = UserManagementService.getSelectedUsers().map(function(user){return user.id;});\r\n // UserManagementService.setSelectedLensUsers(vm.selectedUsers);\r\n // UserManagementService.getUsers('lens_group');\r\n // cancel();\r\n var userTable = UserManagementService.getUserTable();\r\n if(vm.getList.length >0) var countUser = vm.getList;\r\n vm.selectedCompanies = lensviewUsersPopupService.getSelectedUsers()\r\n .map(function(user){\r\n //var userExists = $filter('filter')(userTable.data, {id: user.id });\r\n var userExists = userTable.data.map(function(data){ return data[\"id\"]; }).includes(user.id);\r\n var tempUser = angular.copy(user);\r\n tempUser.selected = false;\r\n if(userExists == false) {\r\n tempUser.new = true;\r\n if(countUser != undefined) countUser.push(tempUser);\r\n UserManagementService.addUserTable(tempUser,vm.getList.length);\r\n }\r\n return user.id;\r\n });\r\n\r\n // vm.selectedUsers = lensviewUsersPopupService.getSelectedUsers().map(function(user){\r\n // \tUserManagementService.addUserTable(user);\r\n //\treturn user.id;\r\n // });\r\n\r\n var all_Ids = UserManagementService.getUserTable();\r\n if(countUser != undefined) all_Ids.data = countUser;\r\n vm.selectedUsers = [];\r\n angular.forEach(all_Ids.data,function(data){\r\n \tvm.selectedUsers.push(data.id);\r\n\r\n });\r\n\r\n var del_user_ids = lensviewUsersPopupService.getDeletedLensUsers();\r\n\r\n if(del_user_ids.length >0){\r\n for( var i=vm.selectedUsers.length - 1; i>=0; i--){\r\n for( var j=0; j0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n vm.listSelectedCount = count;//$filter('filter')(vm.userTable.data, {selected: true}).length;\r\n }\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n function shiftSelect(index){\r\n\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.userTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.userTable.settings().data.map(function(user){\r\n user.selected = false;\r\n });\r\n }\r\n\r\n function bulkDelete(){\r\n vm.listSelectedCount=0;\r\n vm.selectAll = false;\r\n\r\n $mdDialog.cancel();\r\n // var selectedUsers = UserManagementService.getSelectedUsers().map(function(user){\r\n\t // return user.id;\r\n\t // });\r\n\r\n var databaseusers = [];\r\n var newusers = [];\r\n var totalusers = vm.getTable().data;\r\n if(vm.getList.length < totalusers.length){ totalusers = totalusers; }\r\n if(vm.getList.length > totalusers.length){ totalusers = vm.getList;}\r\n\r\n for( var i=totalusers.length - 1; i>=0; i--){\r\n if(totalusers[i].selected == true && totalusers[i].new == undefined){\r\n databaseusers = databaseusers.concat(totalusers[i].id);\r\n }\r\n if((totalusers[i].selected == true && totalusers[i].new == true)){\r\n newusers = newusers.concat(totalusers[i].id);\r\n }\r\n\r\n }\r\n\r\n if(newusers.length > 0 && databaseusers.length == 0){\r\n lensviewUsersPopupService.setDeletedLensUsers(newusers);\r\n }\r\n else if(databaseusers.length >0 && newusers.length == 0){\r\n lensviewUsersPopupService.setDeletedLensUsers(databaseusers);\r\n }\r\n else if(newusers.length > 0 && databaseusers.length >0)\r\n {\r\n lensviewUsersPopupService.setDeletedLensUsers(newusers.concat(databaseusers));\r\n }\r\n\r\n if((newusers.length > 0)){\r\n\r\n var params_newUsers = {\r\n user_ids: newusers\r\n };\r\n\r\n if(databaseusers.length == 0){\r\n showToastWithFile('delete-user.success.html');\r\n }\r\n\r\n setTimeout(function(){\r\n $state.reload();\r\n angular.forEach(params_newUsers.user_ids, function(value1,key1){\r\n angular.forEach(vm.userTable.data, function(value2,key2){\r\n\r\n if(value2.id==value1)\r\n vm.userTable.data.splice(key2, 1);\r\n UserManagementService.deleteUserTable(vm.userTable.data);\r\n });\r\n });\r\n },2500);\r\n\r\n }\r\n\r\n if(databaseusers.length > 0){\r\n\t var params = {\r\n\t user_ids: databaseusers\r\n\t };\r\n\r\n\t $http({\r\n\t method:'DELETE',\r\n\t url:api.url_v2 + '/lens_groups/'+$stateParams.id,\r\n\t headers :{\r\n\t \"Content-Type\" : \"application/json\"\r\n\t },\r\n\t data :params\r\n\t }).success(function(data){\r\n vm.listSelectedCount = 0;\r\n //// console.log(data);\r\n\t showToastWithFile('delete-user.success.html');\r\n\r\n\t setTimeout(function(){\r\n\r\n if(newusers.length > 0 && databaseusers.length > 0){\r\n\r\n }else if(databaseusers.length > 0){\r\n $state.reload();\r\n }\r\n //$state.reload();\r\n angular.forEach(params.user_ids, function(value1,key1){\r\n angular.forEach(vm.userTable.data, function(value2,key2){\r\n\r\n if(value2.id==value1)\r\n vm.userTable.data.splice(key2, 1);\r\n UserManagementService.deleteUserTable(vm.userTable.data);\r\n });\r\n });\r\n\t },2500);\r\n\r\n\t })\r\n\t .error(function(data){\r\n\t //// console.log(data);\r\n\t showToastWithFile('delete-user.error.html', data.error);\r\n\r\n\t setTimeout(function(){\r\n //location.reload();\r\n\t },2500);\r\n\r\n\t });\r\n }\r\n\r\n }\r\n\r\n\r\n function showModal(ev){\r\n\r\n var count;\r\n var count1 = UserManagementService.getSelectedUsers().length;\r\n var count2 = $filter('filter')(vm.userTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n //vm.getSelectedCount = getselectedUsersCount().length;\r\n vm.getSelectedCount = count;\r\n vm.listSelectedCount = count;\r\n // vm.getSelectedCount = selectedUsers.length;\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/users/modals/delete-users.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.cancel();\r\n }\r\n\r\n function showToastWithFile(file, messages, delay) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: delay ? delay : 3000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/lensview/users/toast/' + file,\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n\r\n function getselectedUsersCount(){\r\n if(vm.getTable().data){\r\n return vm.getTable().data\r\n .filter(function(user){\r\n return user.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n\r\n\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('app.admin', [\r\n 'app.core',\r\n 'mdPickers'\r\n ]);\r\n\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name UserManagementService\r\n *\r\n * @description\r\n * The UserManagementService does stuff\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('lensviewUsersPopupService', lensviewUsersPopupService);\r\n\r\n /** @ngInject */\r\n lensviewUsersPopupService.$inject = ['$http', '$rootScope', '$q','$timeout', '$location', '$stateParams', 'NgTableParams', 'api', 'PermissionsService', 'UserService', 'AJAX', 'DownloadService', 'Upload'];\r\n function lensviewUsersPopupService($http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, PermissionsService, UserService, AJAX, DownloadService, Upload) {\r\n var user = createUserObject(),\r\n permissions = PermissionsService.generatePotentialPermissions(UserService.getUserData().permissions),\r\n company = {},\r\n users = [],\r\n query = {},\r\n timeoutTid = false,\r\n url = api.url + '/users/',\r\n bulkUrl = api.url + \"/bulk_users/\",\r\n loading = false,\r\n isEmpty = true,\r\n deferred = $q.defer(),\r\n userTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n roles = [\r\n {key: \"company_admin\", display: \"Company Admin\", permissions:['Shipment.View', 'User.View', 'User.Create', 'Shipment.View']},\r\n {key: \"customer\", display: \"Customer\", permissions:['Shipment.View', 'Shipment.View']},\r\n {key: \"editor\", display: \"Potential Exception Editor\", permissions:['Shipment.View', 'Shipment.View', 'PotentialException.Editor']},\r\n {key: \"approver\", display: \"Potential Exception Approver\", permissions:['Shipment.View', 'Shipment.View', 'PotentialException.Editor', 'PotentialException.Approver']},\r\n {key: \"crane_admin\", display: \"Crane Admin\", permissions:['Shipment.View', 'Shipment.View', 'PotentialException.Editor', 'PotentialException.Approver', 'User.View', 'User.Create', 'Company.View', 'Company.Admin', 'Group.Admin']},\r\n {key: 'custom', display: 'Custom', permissions:[]}\r\n ];\r\n var clean_user = angular.copy(user);\r\n var bulk_users = [];\r\n var selectedUsers = [];\r\n var deletedUsers = [];\r\n\r\n return {\r\n autoComplete: autoComplete,\r\n bulkCreate: bulkCreate,\r\n bulkUpdate: bulkUpdate,\r\n bulkDelete: bulkDelete,\r\n clearUser: function() { user = angular.copy(clean_user); return user; },\r\n getContacts: getContacts,\r\n getCompany: getCompany,\r\n getCompanies: getCompanies,\r\n //getGroups: getGroups,\r\n getCompanyDetails: function() { return company; },\r\n getPermissions: getPermissions,\r\n getUser: getUser,\r\n getUsers: getUsers,\r\n getRoles: function(){ return roles;},\r\n getUserDetails: function() { return user; },\r\n getUserTable: function() { return userTable; },\r\n getSelectedUsers: getSelectedUsers,\r\n createUserObject: createUserObject,\r\n parsePermissions: parsePermissions,\r\n postUser: postUser,\r\n updateUser: updateUser,\r\n getBulkUsers: getBulkUsers,\r\n // postUserContact: postUserContact,\r\n // updateUserContact: updateUserContact,\r\n // deleteUserContact: deleteUserContact,\r\n deleteUser: deleteUser,\r\n setQuery: setQuery,\r\n getContactPhotos: getContactPhotos,\r\n exportUserLogs: exportUserLogs,\r\n uploadFile: uploadFile,\r\n postBulkUsers: postBulkUsers,\r\n resendConfirmation: resendConfirmation,\r\n setSelectedLensUsers : setSelectedLensUsers,\r\n getSelectedLensUsers : getSelectedLensUsers,\r\n setDeletedLensUsers : setDeletedLensUsers,\r\n getDeletedLensUsers : getDeletedLensUsers,\r\n resetSelecteduser : resetSelecteduser\r\n };\r\n\r\n function setQuery(q){\r\n userTable.filter({});\r\n userTable.filter(q);\r\n userTable.page(1);\r\n userTable.reload();\r\n }\r\n\r\n\r\n function exportUserLogs(user) {\r\n\r\n var url = api.url_v2 + \"/users/\"+ user.id + \"/export_logs\";\r\n\r\n\r\n var req_params = {};\r\n\r\n var csv_date = new Date();\r\n var filename = (moment().format('YYYY-MM-DD') + '-User'+ user.id+ 'Logs.csv');\r\n return DownloadService.getDownloadFile(url, req_params, filename);\r\n // var promise = $http({url: url, method: \"GET\", params: req_params}).then(function(res){\r\n // var anchor = angular.element('');\r\n // anchor.attr({\r\n // href: 'data:attachment/csv;charset=utf-8,'+ encodeURI(res.data),\r\n // target: '_blank',\r\n // download: moment().format('YYYY-MM-DD') + '-PotentialExceptions.csv'\r\n // })[0].click();\r\n\r\n // return res.data;\r\n // });\r\n // return promise;\r\n }\r\n // ---------------------\r\n // Retrieve a list of groups\r\n // // ------------------\r\n // function getGroups(){\r\n // return $http.get(api.url + '/groups', {timeout: deferred.promise})\r\n // .then(function onSuccess(response){\r\n // return response.data.groups;\r\n // }, function onError(response){\r\n // if (response.status === 0){\r\n // // Handle timeout or network error\r\n // } else {\r\n // // Handle error from server\r\n // }\r\n // });\r\n // }\r\n // ---------------------\r\n // Retrieve a list of companies\r\n // // ------------------\r\n function getCompanies(){\r\n return $http.get(api.url_v2 + '/companies', {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return response.data.companies;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a company\r\n // // ------------------\r\n function getCompany(id){\r\n return $http.get(api.url_v2 + '/companies/' + id, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n for (var field in response.data){\r\n company[field] = response.data[field];\r\n }\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n }\r\n\r\n var cachedContacts = false;\r\n function getContacts(forceLoad){\r\n forceLoad = typeof forceLoad === 'undefined' ? false : forceLoad;\r\n if (cachedContacts && !forceLoad) {\r\n var promise = $q.defer();\r\n promise.resolve(cachedContacts);\r\n return promise.promise;\r\n }\r\n else {\r\n return $http.get(api.url_v2 + '/contacts'/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n cachedContacts = response.data.contacts;\r\n return cachedContacts;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n }\r\n }\r\n\r\n\r\n //--------------------------------\r\n // Retrieve Contact Photos\r\n //--------------------------------\r\n\r\n var contactPhotos = false;\r\n function getContactPhotos() {\r\n if (contactPhotos) {\r\n var promise = $q.defer();\r\n promise.resolve(contactPhotos);\r\n return promise.promise;\r\n }\r\n else {\r\n return $http.get(api.url_v2 + '/contacts/photos')\r\n .then(function onSuccess(response){\r\n contactPhotos = response.data;\r\n return contactPhotos;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n }\r\n }\r\n\r\n function getPermissions(){\r\n // var curr_user = UserService.getUserData();\r\n // permissions = PermissionsService.generatePotentialPermissions(curr_user.permissions);\r\n return permissions;\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a user\r\n // // ------------------\r\n function getUser(id){\r\n user = createUserObject();\r\n return $http.get(api.url_v2 + '/users/' + id/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n unpackageUser(response.data);\r\n if(response.data.contact.primary_contact){\r\n user.contact.default = response.data.contact.default;\r\n user.contact.primary_contact = response.data.contact.primary_contact.id;\r\n }\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Do something else;\r\n }\r\n user = null;\r\n });\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n\r\n }\r\n\r\n function getSelectedUsers(){\r\n if(userTable.settings().data){\r\n return userTable.settings().data\r\n .filter(function(user){\r\n return user.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n // ----------------------------\r\n // Bulk create users\r\n // ----------------------------\r\n function bulkCreate(users){\r\n prepare_bulk_communications();\r\n var promise = $http.post(api.url_v2 + \"/bulk_users/\", packageUsers(users), {timeout: deferred.promise})\r\n .then(function(response){\r\n unpackageUsers(response);\r\n return response;\r\n }, function(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n\r\n // ----------------------------\r\n // Bulk Update Users\r\n // ----------------------------\r\n function bulkUpdate(params){\r\n prepare_bulk_communications();\r\n var promise = $http.put(api.url_v2 + \"/bulk_users\", params, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return unpackageUsers(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n\r\n // ----------------------------\r\n // delete the user\r\n // ----------------------------\r\n function bulkDelete(params){\r\n prepare_bulk_communications();\r\n var users = \"?\"+params.user_ids.map(function(d, i){\r\n return \"user_ids%5B%5D=\"+d;}).join('&');\r\n var promise = $http\r\n .delete(api.url_v2 + \"/bulk_users/\" + users, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return unpackageUsers(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n exitLoadState();\r\n //return promise.reject(response);\r\n } else {\r\n exitLoadState();\r\n return response.data;\r\n }\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n function resendConfirmation(id){\r\n $timeout.cancel(deferred.promise);\r\n return $http.get(api.url_v2 + '/users/' + id + '/resend_confirmation')\r\n }\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"usersTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"usersTable:loaded\", data);\r\n }\r\n function unpackageUsers(response){\r\n var data_settings = response.data.users.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n userTable.total(response.headers().total);\r\n userTable.settings({data: data_settings });\r\n userTable.data = data_settings; //response.data.users;\r\n isEmpty = userTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return userTable.data;\r\n }\r\n\r\n // This function sets up comm\r\n function prepare_bulk_communications(){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n $rootScope.$broadcast(\"usersTable:stateChanged\", loading);\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n // ---------------------\r\n // Retrieve users\r\n // // ------------------\r\n function getUsers(params){\r\n prepare_bulk_communications();\r\n var users_url = api.url_v2+\"/users\";\r\n if(params == 'lens_group'){\r\n //users_url = users_url+\"?lens_group=true\";\r\n users_url = api.url_v2+'/lens_groups/'+$stateParams.id+'/excluded_users';\r\n }else if(params == 'lens_group_users'){\r\n users_url = api.url_v2+'/lens_groups/'+$stateParams.id+'/edit';\r\n }else if( params == 'non_cmp_user'){\r\n users_url = users_url+\"?non_cmp_user=true\";\r\n }\r\n\r\n var promise = $http({url: users_url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return unpackageUsers(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // ----------------------------\r\n // POST to upload a file\r\n // ----------------------------\r\n function uploadFile(file, errFiles) {\r\n return Upload.upload({\r\n url: api.url_v2 + '/bulk_users/import',\r\n method: 'POST',\r\n data: {user_csv: file}\r\n }).then(function (response) {\r\n bulk_users.length = 0;\r\n response.data.map(function(f){ bulk_users.push(f); });\r\n\r\n });\r\n }\r\n\r\n function getBulkUsers(){\r\n\r\n return bulk_users;\r\n }\r\n\r\n // ----------------------------\r\n // Create Users in bulk\r\n // ----------------------------\r\n function postBulkUsers(users){\r\n users = users.map(function(user){\r\n var u = {};\r\n [\"first_name\", \"last_name\", \"company_id\", \"email\"].map(function(key){\r\n u[key] = user[key];\r\n });\r\n return u;\r\n })\r\n\r\n\r\n return $http.post(api.url_v2 + '/bulk_users', {\"users\" : users}, {timeout: deferred.promise})\r\n .then(function(response){\r\n return response;\r\n }, function(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n // return $http.post(url, packageUser(user), {timeout: deferred.promise})\r\n //\r\n }\r\n\r\n function parsePermissions(permissions){\r\n var results = {}, field = \"\";\r\n for (var key in permissions){\r\n results[key] = {};\r\n for (var i in permissions[key].options){\r\n field = permissions[key].options[i];\r\n field.group.map(function(d) { results[key][d] = field.value ? field.value: false; });\r\n }\r\n }\r\n return results;\r\n }\r\n // --------------------------------------\r\n // Package the user for create and update\r\n // --------------------------------------\r\n function packageUser(theUser){\r\n\r\n theUser = theUser || user;\r\n\r\n var keys = ['first_name', 'last_name', 'email', 'phone', 'title', 'password', 'company_id',\r\n 'group_ids', 'party_id_names', 'related_party_id_names', 'is_active', 'notification_settings',\r\n 'roles', 'role', 'super_admin', 'photo_url', 'force_verify'];\r\n\r\n var updatedUser = {};\r\n\r\n\r\n for(var k in keys) {\r\n\r\n if((theUser[keys[k]] || theUser[keys[k]] === false) && theUser[keys[k]] !== '') {\r\n updatedUser[keys[k]] = theUser[keys[k]];\r\n\r\n\r\n }\r\n\r\n\r\n if (theUser[\"del_\"+keys[k]]){\r\n\r\n updatedUser[keys[k]] = \"\";\r\n }\r\n }\r\n\r\n\r\n // Contacts\r\n var meUser = UserService.getUserData();\r\n if (meUser.company.is_crane) {\r\n if (!theUser.bccs.default){\r\n updatedUser.bccs = theUser.bccs.values;\r\n }\r\n //if (!theUser.contact.default && theUser.contact.primary_contact && theUser.contact.primary_contact.id){\r\n if (!theUser.contact.default && theUser.contact.primary_contact ){\r\n updatedUser.contact_id = \"\"+theUser.contact.primary_contact;\r\n } else {\r\n updatedUser.contact_id = \"\";\r\n }\r\n }\r\n else {\r\n delete updatedUser['bccs'];\r\n delete updatedUser['contact_id'];\r\n }\r\n updatedUser.permissions = parsePermissions(theUser.permissions);\r\n // for (var key in theUser.permissions){\r\n // updatedUser.permissions[key] = {};\r\n // for (var i in theUser.permissions[key].options){\r\n // var field = theUser.permissions[key].options[i];\r\n // field.group.map(function(d){ updatedUser.permissions[key][d] = field.value; });\r\n // }\r\n // }\r\n\r\n // is crane contact\r\n updatedUser.roles = updatedUser.roles || [];\r\n if (theUser.is_crane_contact) {\r\n updatedUser.roles.push('crane_contact');\r\n // uncaching the contacts so this user can be added\r\n cachedContacts = false;\r\n }\r\n else {\r\n var ix = theUser.roles ? theUser.roles.indexOf('crane_contact') : -1;\r\n if (ix !== -1) {\r\n updatedUser.roles.splice(ix, 1);\r\n // uncaching the contacts so this user can be removed\r\n cachedContacts = false;\r\n }\r\n }\r\n return updatedUser;\r\n }\r\n\r\n function unpackageUser(user_data){\r\n for (var field in user_data){\r\n if (field == 'bccs' && user_data.bccs.default) continue;\r\n if (field == 'contact' && user_data.contact.default){\r\n // user.contact.primary_contact = user_data.contact.primary_contact.id;\r\n //user[field]['primary_contact'] = user_data.contact.primary_contact.id;\r\n continue;\r\n }\r\n user[field] = user_data[field];\r\n }\r\n user.company_id = user.company.id;\r\n if (user.roles && user.roles.indexOf('crane_contact') !== -1) {\r\n user.is_crane_contact = true;\r\n }\r\n user.permissions = PermissionsService.hasPermissions(permissions, user.permissions);\r\n }\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n // function validateField(field, value){\r\n // var url = api.url + '/bulk_users/validate_field';\r\n\r\n // var deferred = $q.defer();\r\n\r\n // $http({\r\n // url: url,\r\n // method: 'GET',\r\n // params: {field: field, value: value}\r\n // }).then(function(data) {\r\n // // Found the user, therefore not unique.\r\n\r\n\r\n // //if (data[field].valid === true){\r\n // deferred.resolve()\r\n // // }\r\n // //else {\r\n // //deferred.reject();\r\n // // }\r\n\r\n // });\r\n\r\n // return deferred.promise;\r\n // }\r\n\r\n\r\n\r\n // ----------------------------\r\n // Create a user\r\n // ----------------------------\r\n function postUser(user){\r\n $timeout.cancel(deferred.promise);\r\n return $http.post(api.url_v2 + '/users/', packageUser(user), {timeout: deferred.promise})\r\n .then(function(response){\r\n unpackageUser(response.data);\r\n return response;\r\n }, function(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n }\r\n\r\n\r\n // ----------------------------\r\n // Update the user\r\n // ----------------------------\r\n function updateUser(id, theUser){\r\n\r\n $timeout.cancel(deferred.promise);\r\n return $http.put(api.url_v2 + '/users/' + id, packageUser(theUser)/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n unpackageUser(response.data);\r\n\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n\r\n });\r\n }\r\n\r\n\r\n // ----------------------------\r\n // delete the user\r\n // ----------------------------\r\n function deleteUser(id){\r\n $timeout.cancel(deferred.promise);\r\n var promise = $q.defer();\r\n $http.delete(api.url_v2 + '/users/' + id, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n //--------------------------\r\n // Returns a blank user object\r\n //--------------------------\r\n function createUserObject(user_data) {\r\n var u = {\r\n bccs:{values:[]},\r\n contact:{},\r\n permissions: {\r\n PotentialException: {},\r\n Shipment: {},\r\n User: {},\r\n BookShipment: {}\r\n },\r\n party_id_names: [],\r\n related_party_id_names: [],\r\n notification_settings: {\r\n potential_exceptions: true,\r\n exceptions: true,\r\n milestone_delivered: true\r\n },\r\n is_crane_contact: false,\r\n resetBCCS: resetBCCS,\r\n getName: getName,\r\n resetPrimary: resetPrimary,\r\n loadData: loadData\r\n\r\n };\r\n\r\n\r\n if (user_data){\r\n loadData();\r\n }\r\n\r\n function getName() {\r\n return u.first_name || u.last_name ? u.first_name + \" \" + u.last_name : u.email;\r\n }\r\n\r\n function resetBCCS(){\r\n u.bccs.values = [];\r\n u.bccs.values.length = 0;\r\n }\r\n\r\n function resetPrimary(){\r\n u.contact.primary_contact = {};\r\n }\r\n\r\n\r\n\r\n\r\n function loadData(){\r\n for (var field in user_data){\r\n if (field == 'bccs' && user_data.bccs.default) continue;\r\n if (field == 'contact' && user_data.contact.default) continue;\r\n u[field] = user_data[field];\r\n }\r\n u.company_id = u.company.id;\r\n if (u.roles && u.roles.indexOf('crane_contact') !== -1) {\r\n u.is_crane_contact = true;\r\n }\r\n u.permissions = PermissionsService.hasPermissions(permissions, u.permissions);\r\n }\r\n return u;\r\n }\r\n\r\n function setSelectedLensUsers(data){\r\n selectedUsers = data;\r\n }\r\n\r\n function getSelectedLensUsers(data){\r\n return selectedUsers;\r\n }\r\n\r\n function setDeletedLensUsers(data){\r\n deletedUsers = data;\r\n }\r\n\r\n function getDeletedLensUsers(data){\r\n return deletedUsers;\r\n }\r\n\r\n function resetSelecteduser(){\r\n selectedUsers =[];\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('lensviewUsersPopupController', lensviewUsersPopupController);\r\n lensviewUsersPopupController.$inject = ['$scope', '$location', '$mdDialog','$state', 'lensviewUsersPopupService','UserManagementService','ngTableEventsChannel'];\r\n function lensviewUsersPopupController($scope, $location, $mdDialog, $state, lensviewUsersPopupService, UserManagementService ,ngTableEventsChannel){\r\n\t var vm = this;\r\n\r\n\t vm.columns = [\r\n\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"first_name\", \"title\": 'ADMIN.LENS.FIRST_NAME', \"sortable\": \"name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"last_name\", \"title\": 'ADMIN.LENS.LAST_NAME', \"sortable\": \"company\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t {\"field\": \"email\", \"title\": 'ADMIN.LENS.EMAIL', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t //{\"field\": \"status\", \"title\": 'ADMIN.LENS.STATUS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n\t //{\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n\r\n\t ];\r\n\t vm.buttons = [\r\n\t // {id: 0, action: add_userslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t // {id: 1, action: search_deptlens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t ];\r\n\r\n\r\n\r\n\t vm.icon=\"\"\r\n\t vm.lensviewtitle = \"Grant Users access to this Lens Group\";\r\n\t vm.lensviewtable = true;\r\n\t vm.clearbtn = true;\r\n\t vm.getTable = getTable;\r\n vm.getField = getField;\r\n\t vm.getClass = getClass;\r\n\t vm.checkAll = checkAll;\r\n\t vm.clearAll = clearAll;\r\n\t vm.searchflag = false; \r\n\t vm.searchListData = search_deptlens;\r\n\t vm.addSectedusers = addSectedusers;\r\n\t vm.cancel = cancel;\r\n vm.link = {field: \"id\", column: \"name\", url: \"users\"};\r\n\r\n\t\t\tif($state.current.name=='newlensgroup' || $state.current.name=='showLensGroup')\r\n\t\t\t\t\tlensviewUsersPopupService.getUsers(\"lens_group\");\r\n\t\t\telse if($state.current.name=='showCompany')\r\n\t\t\t\t\tlensviewUsersPopupService.getUsers(\"non_cmp_user\");\r\n\r\n\r\n if($state.current.name == 'showCompany' || $state.current.name == 'createCompany' ){\r\n vm.lensviewtitle = \"Grant Users access to this Company\";\r\n }\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n\t \tfunction subscribeToTable(tableParams){ \r\n\t ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){ \r\n\t \tvar tmp = 0\r\n angular.forEach(vm.userTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.userTable.data.length == tmp && tmp > 0) \t \r\n\t }, $scope, tableParams);\r\n\t }\r\n\r\n\r\n\t function search_deptlens(isClear){\r\n\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search); \r\n\t lensviewUsersPopupService.setQuery(search); \r\n\t }\r\n\r\n\t function clearAll(){ \r\n\t\t var userTableData = UserManagementService.getUserTable();\r\n\t vm.selectedCompanies = lensviewUsersPopupService.getSelectedUsers()\r\n\t .map(function(user){\r\n\t var userExists = userTableData.data.map(function(data){ return data[\"id\"]; }).includes(user.id); \r\n\t if(userExists == false) {\r\n\t user.selected = false;\r\n\t }\r\n\t }); \r\n\t\t search_deptlens(true);\r\n\r\n\t }\r\n\r\n\t function getTable(){\r\n\r\n\t var selectedUsers = UserManagementService.getUserTable();\r\n\t var userList = lensviewUsersPopupService.getUserTable(); \r\n\r\n\t userList.data.map(function(objUser){\r\n \tselectedUsers.data.map(function(item){\r\n \t\tif(objUser.id == item.id)\r\n\t\t objUser.selected = true;\r\n \t}) \r\n \t}); \r\n\r\n vm.userTable = lensviewUsersPopupService.getUserTable();\r\n\t\t return lensviewUsersPopupService.getUserTable();\r\n\r\n\t\t}\r\n\t\t function getField(item, field){\r\n\t\t switch (field){\r\n\t\t case \"is_active\":\r\n\t\t return item[field] ? \"Active\" : \"Inactive\";\r\n\t\t default:\r\n\t\t return item[field];\r\n\t\t }\r\n\t\t}\r\n\t\tfunction getLink(data){\r\n\t return vm.link.url+\"/\"+data[vm.link.field];\r\n\t }\r\n\t function isLink(field){\r\n\t return field == vm.link.column;\r\n\t }\r\n\r\n\t function getClass(item, field){\r\n\t switch (field){\r\n\t case \"is_active\":\r\n\t return item[field] ? \"active-user\" : \"inactive-user\";\r\n\t default:\r\n\t return '';\r\n\t }\r\n\t }\r\n\t function checkAll(selected){\r\n\t vm.userTable.data.map(function(user){\r\n\t user.selected = selected;\r\n\t });\r\n\t }\r\n\t function addSectedusers(){\r\n vm.selectedUsers = lensviewUsersPopupService.getSelectedUsers().map(function(user){return user.id;});\r\n\r\n if($state.current.name =='createCompany' || $state.current.name =='showCompany'){\r\n\r\n\r\n\r\n lensviewUsersPopupService.setSelectedLensUsers(vm.selectedUsers).map(function(user){UserManagementService.addUserTable(user);});\r\n\r\n\r\n }\r\n lensviewUsersPopupService.getUsers('lens_group');\r\n cancel();\r\n\t }\r\n\t \r\n\t function cancel() {\r\n\t search_deptlens(true);\t\r\n\t $mdDialog.cancel();\r\n\t }\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('lensviewDepartmentsController', lensviewDepartmentsController);\r\n lensviewDepartmentsController.$inject = ['$scope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'DepartmentManagementService', 'CompanyManagementService', 'UserManagementService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper'];\r\n function lensviewDepartmentsController($scope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, DepartmentManagementService, CompanyManagementService, UserManagementService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper){\r\n\t var vm = this;\r\n\t //vm.readAccess = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n\t try{\r\n\t //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n\t if(JSON.parse(localStorage.getItem(\"user\")).permissions.cww.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.csl.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.cmts.Company.includes('read')){\r\n\t vm.readAccess = true;\r\n\t }else{\r\n\t \tvm.readAccess = false;\r\n\t }\r\n\t }\r\n\t catch(e){\r\n\t vm.readAccess = false;\r\n\t }\r\n\r\n\t if($state.current.name == 'supportRequestViewCompany'){\r\n\t \tvm.readAccess = true;\r\n\t }\r\n\r\n\t if(vm.readAccess){\r\n\t \tvm.columns = [\r\n\t\t {\"field\": \"name\", \"title\": 'ADMIN.LENS.NAME', \"sortable\": \"name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"customer_type\", \"title\": 'CUSTOMER TYPE', \"sortable\": \"customer_type\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"partid\", \"title\": 'PARTY IDS/CUSTOMER IDS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"groupid\", \"title\": 'ADMIN.LENS.GROUP_ID', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"is_demo\", \"title\": 'DEMO', \"sortable\": \"is_demo\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"reskin_type\", \"title\": 'RESKIN', \"sortable\": \"reskin_type\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n\t\t ];\r\n\t }\r\n\t if(!vm.readAccess){\r\n\t \tvm.columns = [\r\n\t\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"name\", \"title\": 'ADMIN.LENS.NAME', \"sortable\": \"name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"customer_type\", \"title\": 'CUSTOMER TYPE', \"sortable\": \"customer_type\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"partid\", \"title\": 'PARTY IDS/CUSTOMER IDS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"groupid\", \"title\": 'ADMIN.LENS.GROUP_ID', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"is_demo\", \"title\": 'DEMO', \"sortable\": \"is_demo\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"reskin_type\", \"title\": 'RESKIN', \"sortable\": \"reskin_type\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n\t\t ];\r\n\t }\r\n\r\n\t if(vm.readAccess){\r\n\t\t vm.buttons = [\r\n\t\t {id: 1, action: search_deptlens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t\t ];\r\n\t\t}\r\n\t\tif(!vm.readAccess){\r\n\t\t\tvm.buttons = [\r\n\t\t {id: 0, action: add_deptlens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t\t {id: 1, action: search_deptlens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t\t ];\r\n\t\t}\r\n\r\n\t vm.icon=\"\"\r\n\t vm.lensviewtitle = \"Add New Department to Company\";\r\n\t vm.lensviewtitleedit = \"Edit Department to Company\";\r\n\t vm.lensviewtable = true;\r\n\t vm.searchflag = false;\r\n\t vm.listSelectedCount = 0;\r\n\t vm.selectAll = false;\r\n\t vm.customer_type_cehck = false;\r\n\t vm.saveDepartment = saveDepartment;\r\n\t vm.updateDepartment = updateDepartment;\r\n\t vm.getMatch = getMatch;\r\n\t vm.getMatchCww = getMatchCww;\r\n \t\tvm.getMatchCsl = getMatchCsl;\r\n \t\tvm.getMatchCfs = getMatchCfs;\r\n \t\tvm.getMatchCmts = getMatchCmts;\r\n\t vm.getMatchs = getMatchs;\r\n\t vm.formIsValid = formIsValid;\r\n\t vm.department = DepartmentManagementService.getDepartmentObject();\r\n\t vm.getTable = getTable;\r\n vm.getField = getField;\r\n\t vm.getClass = getClass;\r\n\t vm.checkAll = checkAll;\r\n\t vm.selectUser = selectUser;\r\n\t vm.cancel = cancel;\r\n\t vm.selected = selected;\r\n\t vm.shiftSelect = shiftSelect;\r\n \tvm.resetSelected = resetSelected;\r\n\t vm.add_deptlens = add_deptlens;\r\n\t vm.edit_deptlens = edit_deptlens;\r\n\t vm.showToastWithFile = showToastWithFile;\r\n\t vm.searchListData = search_deptlens;\r\n\t vm.getSelectedCount = getSelectedCount;\r\n\t vm.showModal = showModal;\r\n\t vm.closeModal = closeModal;\r\n\t vm.bulkDelete = bulkDelete;\r\n\t vm.bulkDeleteDemo = bulkDeleteDemo;\r\n\t vm.party_check = false;\r\n\t vm.addPartyIds = addPartyIds;\r\n\t vm.addPartyIdsEdit = addPartyIdsEdit;\r\n\t vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n \tvm.onSelectClose = mdSelectHelper.onSelectClose;\r\n \tvm.changeReskin = changeReskin;\r\n \tvm.onReskinChange = onReskinChange;\r\n \tvm.reskin_check = true;\r\n\t vm.status = {cssClass: \"md-primary\"};\r\n\t vm.possibleContacts = [];\r\n\t vm.changeCustomerType = changeCustomerType;\r\n\t vm.changeCustomerTypeEdit = changeCustomerTypeEdit;\r\n\t vm.is_cww = false;\r\n\t vm.is_csl = false;\r\n\t vm.is_cfs = false;\r\n\t vm.is_cmts = false;\r\n\t vm.textCustType = false;\r\n\t vm.cancelCustomerType = cancelCustomerType;\r\n\t vm.changeCustomerSettings = changeCustomerSettings;\r\n\t //vm.clearAll = clearAll;\r\n\r\n\t // load the Crane Contacts\r\n\t UserManagementService.getContacts().then(function(data){\r\n\t data.sort(function(a, b) {\r\n\t return a.email > b.email ? 1 : -1;\r\n\t });\r\n\t vm.possibleContacts = data;\r\n\t });\r\n\r\n\t if($state.current.name =='showCompany'){\r\n\t vm.showDepText = true;\r\n\r\n\t CompanyManagementService.getCompany($stateParams.id).then(function(res){\r\n \t\tvm.company = CompanyManagementService.getCompanyDetails();\r\n \t});\r\n\t }\r\n\r\n\t vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n\t DepartmentManagementService.getDepartments();\r\n\r\n\r\n\t $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n\t \tfunction subscribeToTable(tableParams){\r\n\t ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n\t \tvar tmp = 0\r\n angular.forEach(vm.departmentTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.departmentTable.data.length == tmp && tmp > 0)\r\n\t }, $scope, tableParams);\r\n\t }\r\n\r\n\r\n\t if($state.current.name == 'showCompany'){\r\n\r\n\t \t$scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n\t var res = DepartmentManagementService.getDepartments();\r\n\t res.then(function(dd){\r\n\t vm.getList = dd;\r\n\t });\r\n\t \t});\r\n \t\t}\r\n\r\n\r\n \t\tfunction changeCustomerType(val){\r\n \t\t\tif(val == 'cww'){\r\n \t\t\t\tvm.is_cww = true;\r\n\t\t\t vm.is_csl = false;\r\n\t\t\t vm.is_cfs = false;\r\n\t\t\t vm.is_cmt = false;\r\n\t\t\t vm.department.party_id_names = [];\r\n\t\t\t vm.department.default_contact_id = \"\";\r\n\t\t\t vm.department.default_bccs = [];\r\n\t\t\t vm.department.related_party_id_names = [];\r\n\t\t\t vm.department.is_reskin = false;\r\n\t\t\t vm.department.reskin_type = \"\";\r\n\t\t\t vm.customer_type_cehck = false;\r\n \t\t\t}\r\n \t\t\tif(val == 'csl'){\r\n \t\t\t\tvm.is_cww = false;\r\n\t\t\t vm.is_csl = true;\r\n\t\t\t vm.is_cfs = false;\r\n\t\t\t vm.is_cmts = false;\r\n\t\t\t vm.department.party_id_names = [];\r\n\t\t\t vm.department.default_contact_id = \"\";\r\n\t\t\t vm.department.default_bccs = [];\r\n\t\t\t vm.department.related_party_id_names = [];\r\n\t\t\t vm.department.is_reskin = false;\r\n\t\t\t vm.department.reskin_type = \"\";\r\n\t\t\t vm.customer_type_cehck = false;\r\n \t\t\t}\r\n \t\t\tif(val == 'cfs'){\r\n \t\t\t\tvm.is_cww = false;\r\n\t\t\t vm.is_csl = false;\r\n\t\t\t vm.is_cfs = true;\r\n\t\t\t vm.is_cmts = false;\r\n\t\t\t vm.department.party_id_names = [];\r\n\t\t\t vm.department.default_contact_id = \"\";\r\n\t\t\t vm.department.default_bccs = [];\r\n\t\t\t vm.department.related_party_id_names = [];\r\n\t\t\t vm.department.is_reskin = false;\r\n\t\t\t vm.department.reskin_type = \"\";\r\n\t\t\t vm.customer_type_cehck = false;\r\n \t\t\t}\r\n \t\t\tif(val == 'cmts'){\r\n \t\t\t\tvm.is_cww = false;\r\n\t\t\t vm.is_csl = false;\r\n\t\t\t vm.is_cfs = false;\r\n\t\t\t vm.is_cmts = true;\r\n\t\t\t vm.department.party_id_names = [];\r\n\t\t\t vm.department.default_contact_id = \"\";\r\n\t\t\t vm.department.default_bccs = [];\r\n\t\t\t vm.department.related_party_id_names = [];\r\n\t\t\t vm.department.is_reskin = false;\r\n\t\t\t vm.department.reskin_type = \"\";\r\n\t\t\t vm.customer_type_cehck = false;\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tfunction cancelCustomerType(val){\r\n \t\t\tif(val == 'CWW'){\r\n \t\t\t\tvm.textCustType = false;\r\n \t\t\t\t$scope.department.customer_type = val;\r\n \t\t\t}\r\n \t\t\tif(val == 'CSL'){\r\n \t\t\t\tvm.textCustType = false;\r\n\t\t\t $scope.department.customer_type = val;\r\n \t\t\t}\r\n \t\t\tif(val == 'CFS'){\r\n \t\t\t\tvm.textCustType = false;\r\n\t\t\t $scope.department.customer_type = val;\r\n \t\t\t}\r\n \t\t\tif(val == 'CMTS'){\r\n \t\t\t\tvm.textCustType = false;\r\n\t\t\t $scope.department.customer_type = val;\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tfunction changeCustomerSettings(val){\r\n \t\t\tif(val == 'CWW'){\r\n \t\t\t\tvm.textCustType = false;\r\n \t\t\t\t$scope.department.statusChanged = true;\r\n \t\t\t\t$scope.department.is_cww = true;\r\n\t\t\t $scope.department.is_csl = false;\r\n\t\t\t $scope.department.is_cfs = false;\r\n\t\t\t $scope.department.is_cmts = false;\r\n\t\t\t $scope.department.is_reskin = false;\r\n\t\t\t $scope.department.default_bccs = [];\r\n\t\t\t $scope.department.related_party_id_names = [];\r\n\t\t\t $scope.department.party_id_names = [];\r\n\t\t\t $scope.department.default_contact_id = \"\";\r\n \t\t\t}\r\n \t\t\tif(val == 'CSL'){\r\n \t\t\t\tvm.textCustType = false;\r\n \t\t\t\t$scope.department.statusChanged = true;\r\n \t\t\t\t$scope.department.is_cww = false;\r\n\t\t\t $scope.department.is_csl = true;\r\n\t\t\t $scope.department.is_cfs = false;\r\n\t\t\t $scope.department.is_cmts = false;\r\n\t\t\t $scope.department.is_reskin = false;\r\n\t\t\t $scope.department.default_bccs = [];\r\n\t\t\t $scope.department.related_party_id_names = [];\r\n\t\t\t $scope.department.party_id_names = [];\r\n\t\t\t $scope.department.default_contact_id = \"\";\r\n \t\t\t}\r\n \t\t\tif(val == 'CFS'){\r\n \t\t\t\tvm.textCustType = false;\r\n \t\t\t\t$scope.department.statusChanged = true;\r\n \t\t\t\t$scope.department.is_cww = false;\r\n\t\t\t $scope.department.is_csl = false;\r\n\t\t\t $scope.department.is_cfs = true;\r\n\t\t\t $scope.department.is_cmts = false;\r\n\t\t\t $scope.department.is_reskin = false;\r\n\t\t\t $scope.department.default_bccs = [];\r\n\t\t\t $scope.department.related_party_id_names = [];\r\n\t\t\t $scope.department.party_id_names = [];\r\n\t\t\t $scope.department.default_contact_id = \"\";\r\n \t\t\t}\r\n \t\t\tif(val == 'CMTS'){\r\n \t\t\t\tvm.textCustType = false;\r\n \t\t\t\t$scope.department.statusChanged = true;\r\n \t\t\t\t$scope.department.is_cww = false;\r\n\t\t\t $scope.department.is_csl = false;\r\n\t\t\t $scope.department.is_cfs = false;\r\n\t\t\t $scope.department.is_cmts = true;\r\n\t\t\t $scope.department.is_reskin = false;\r\n\t\t\t $scope.department.default_bccs = [];\r\n\t\t\t $scope.department.related_party_id_names = [];\r\n\t\t\t $scope.department.party_id_names = [];\r\n\t\t\t $scope.department.default_contact_id = \"\";\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tfunction changeCustomerTypeEdit(val,status){\r\n\r\n \t\t\tif(status == false){\r\n \t\t\t\tvm.textCustType = true;\r\n \t\t\t}\r\n \t\t\tif(status == true){\r\n \t\t\t\tif(val == 'cww'){\r\n \t\t\t\tvm.textCustType = false;\r\n \t\t\t\t$scope.department.is_cww = true;\r\n\t\t\t $scope.department.is_csl = false;\r\n\t\t\t $scope.department.is_cfs = false;\r\n\t\t\t\t$scope.department.is_cmts = false;\r\n\t \t\t\t}\r\n\t \t\t\tif(val == 'csl'){\r\n\t \t\t\t\tvm.textCustType = false;\r\n\t \t\t\t\t$scope.department.is_cww = false;\r\n\t\t\t\t $scope.department.is_csl = true;\r\n\t\t\t\t $scope.department.is_cfs = false;\r\n\t\t\t\t $scope.department.is_cmts = false;\r\n\t \t\t\t}\r\n\t \t\t\tif(val == 'cfs'){\r\n\t \t\t\t\tvm.textCustType = false;\r\n\t \t\t\t\t$scope.department.is_cww = false;\r\n\t\t\t\t $scope.department.is_csl = false;\r\n\t\t\t\t $scope.department.is_cfs = true;\r\n\t\t\t\t $scope.department.is_cmts = false;\r\n\t \t\t\t}\r\n\t \t\t\tif(val == 'cmts'){\r\n\t \t\t\t\tvm.textCustType = false;\r\n\t \t\t\t\t$scope.department.is_cww = false;\r\n\t\t\t\t $scope.department.is_csl = false;\r\n\t\t\t\t $scope.department.is_cfs = false;\r\n\t\t\t\t $scope.department.is_cmts = true;\r\n\t \t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n\r\n \t\tfunction onReskinChange(val){\r\n\t if(val == \"default\"){\r\n\t vm.reskin_check = true;\r\n\t vm.department.is_reskin = false;\r\n\t $scope.department.is_reskin = false;\r\n\t }\r\n \t}\r\n\r\n \t\tfunction changeReskin(val){\r\n \t\t\tvar check = (val == true ? false : true);\r\n \t\t\tif(val == false){\r\n \t\t\t\t$scope.department.reskin_type = 'default';\r\n \t\t\t}\r\n \t\t\tvm.reskin_check = check;\r\n \t\t\t$scope.department.reskin_check = check;\r\n \t\t}\r\n\r\n \t\tfunction addPartyIds(val){\r\n\r\n \t\t\tvm.party_check = false;\r\n \t\t}\r\n\r\n \t\tfunction addPartyIdsEdit(val){\r\n \t\t\t$scope.department.party_check = false;\r\n \t\t}\r\n\r\n\t function getSelectedCount() {\r\n\t \treturn vm.listSelectedCount;\r\n \t }\r\n\r\n \t function closeModal() {\r\n \t$mdDialog.cancel();\r\n \t }\r\n\r\n\r\n \t function bulkDelete(){\r\n \tvm.listSelectedCount = 0;\r\n \tvm.selectAll = false;\r\n \t$mdDialog.cancel();\r\n\r\n \tvar params = {};\r\n\t params.department_ids = DepartmentManagementService.getSelectedDepartment().map(function(department){return department.id;});\r\n\r\n\t DepartmentManagementService.bulkDeleteDepartments(params).then(function(res){\r\n\t if (!res.errors){\r\n\t vm.closeModal();\r\n\t showToastWithFile('delete-department.success.html', '');\r\n\t } else {\r\n\t vm.closeModal();\r\n\t }\r\n\t });\r\n\r\n \t\t}\r\n\r\n \t\tfunction bulkDeleteDemo(flag){\r\n \tvm.listSelectedCount = 0;\r\n \tvm.selectAll = false;\r\n \t$mdDialog.cancel();\r\n \tvar params = {};\r\n\t params.department_ids = DepartmentManagementService.getSelectedDepartment().map(function(department){return department.id;});\r\n\t params.is_demo = flag;\r\n\r\n\t DepartmentManagementService.bulkDeleteDepartmentsDemo(params).then(function(res){\r\n\t if (!res.errors){\r\n\t vm.closeModal();\r\n\t if(flag == true)\r\n\t \tshowToastWithFile('activate-department-demo.success.html', '');\r\n\t \t else\r\n\t \t \tshowToastWithFile('deactivate-department-demo.success.html', '');\r\n\t } else {\r\n\t vm.closeModal();\r\n\t }\r\n\t });\r\n\r\n \t\t}\r\n\r\n \t function showModal(ev, modal){\r\n\t /* Show the modal */\r\n\t var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\t $mdDialog.show({\r\n\t templateUrl: '/app/admin/lensview/modals/'+ modal + '.modal.html',\r\n\t parent: angular.element(document.body),\r\n\t targetEvent: ev,\r\n\t clickOutsideToClose:true,\r\n\t fullscreen: useFullScreen,\r\n\t scope: $scope,\r\n\t preserveScope: true\r\n\t });\r\n\t }\r\n\r\n function add_deptlens(ev){\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/departments/add-department.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n locals: {message: vm.company},\r\n controller: function($scope, message){\r\n\t $scope.company = message;\r\n\t }\r\n\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n\r\n\t }\r\n\r\n\r\n\t function edit_deptlens(ev,data){\r\n\r\n\t\t\tif(data[\"is_reskin\"] == true){ data['reskin_check'] = false; }\r\n\t\t\tif(data[\"is_reskin\"] == false){ data['reskin_check'] = true; }\r\n\t\t\tif(data[\"party_id_names\"] == null){ data[\"party_id_names\"] = []; }\r\n\t\t\tif(data[\"related_party_id_names\"] == null){ data[\"related_party_id_names\"] = []; }\r\n\t\t\tdata['customer_types'] = vm.company.customer_types;\r\n\t\t\tif(data['customer_type'] == \"CWW\"){\r\n\t\t\t\tdata['is_cww'] = true;\r\n\t\t\t}\r\n\t\t\tif(data['customer_type'] == \"CSL\"){\r\n\t\t\t\tdata['is_csl'] = true;\r\n\t\t\t}\r\n\t\t\tif(data['customer_type'] == \"CFS\"){\r\n\t\t\t\tdata['is_cfs'] = true;\r\n\t\t\t}\r\n\t\t\tif(data['customer_type'] == \"CMTS\"){\r\n\t\t\t\tdata['is_cmts'] = true;\r\n\t\t\t}\r\n\r\n\t\t\tdata['read_access'] = vm.readAccess;\r\n\t\t\tdata['statusChanged'] = false;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/departments/edit-department.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n locals: {message: data, type: data['customer_type']},\r\n controller: function($scope, message, type){\r\n\t $scope.department = message;\r\n\t $scope.typeCust = type;\r\n\t }\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n\r\n\t }\r\n\r\n\t\tfunction cancel() {\r\n\t\t\t$mdDialog.cancel();\r\n\t\t}\r\n\r\n\t function search_deptlens(isClear){\r\n\t \tvm.searchflag = !vm.searchflag;\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search);\r\n\t DepartmentManagementService.setQuery(search);\r\n\t }\r\n\r\n\r\n\t function getMatch(key, query){\r\n\t //return DepartmentManagementService.autoComplete({field: key, value: query},vm.company);\r\n\t return DepartmentManagementService.autoComplete({field: key, value: query});\r\n\t }\r\n\r\n\t function getMatchs(key, query){\r\n\t return DepartmentManagementService.autoCompletes({field: key, value: query},vm.company);\r\n\t }\r\n\r\n\t function getMatchCww(key, query){\r\n\t return CompanyManagementService.autocompleteCww({field: key, customer_type: 'cww', value: query});\r\n\t }\r\n\r\n\t function getMatchCsl(key, query){\r\n\t return CompanyManagementService.autocompleteCww({field: key, customer_type: 'csl', value: query});\r\n\t }\r\n\r\n\t function getMatchCfs(key, query){\r\n\t return CompanyManagementService.autocompleteCww({field: key, customer_type: 'cfs', value: query});\r\n\t }\r\n\r\n\t function getMatchCmts(key, query){\r\n\t return CompanyManagementService.autocompleteCww({field: key, customer_type: 'cmts', value: query});\r\n\t }\r\n\r\n\t //toast used for alerts\r\n\t function showToastWithFile(file, message) {\r\n\t $mdToast.show({\r\n\t position: 'top right',\r\n\t hideDelay: 3000,\r\n\t templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n\t locals: {message: message},\r\n\t controller: function($scope, message){\r\n\t $scope.messages = message;\r\n\t }\r\n\t });\r\n\t }\r\n\r\n\r\n\t function saveDepartment(){\r\n vm.isSave = true;\r\n var id = $stateParams.id;\r\n if(vm.department.is_reskin == undefined)\r\n \tvm.department.is_reskin = false;\r\n var query = {\r\n \tname : vm.department.name,\r\n \tcustomer_type: vm.department.customer_type,\r\n \tparty_id_names : vm.department.party_id_names,\r\n \trelated_party_id_names : vm.department.related_party_id_names,\r\n \tis_demo : vm.department.is_demo,\r\n \tis_reskin: vm.department.is_reskin,\r\n \treskin_type: vm.department.reskin_type,\r\n \tdefault_contact_id: vm.department.default_contact_id,\r\n \tdefault_bccs: vm.department.default_bccs\r\n }\r\n\r\n if (query.default_contact_id === \"\") {\r\n query.default_contact_id = null;\r\n }\r\n\r\n var party_ids_check = (vm.department.party_id_names.length > 0) ? true : false;\r\n var related_party_ids_check = (vm.department.related_party_id_names.length > 0) ? true : false;\r\n\r\n if(party_ids_check == false && related_party_ids_check == false){\r\n \tvm.party_check = true;\r\n \tvar party_check_new = false;\r\n }else{\r\n \tvm.party_check = false;\r\n \tvar party_check_new = true;\r\n }\r\n\r\n if(vm.department.customer_type){\r\n \tvm.customer_type_cehck = false;\r\n }else\r\n {\r\n \tvm.customer_type_cehck = true;\r\n }\r\n\r\n\t if (vm.formIsValid() && party_check_new){\r\n\t // vm.isLoading.save = true;\r\n\t DepartmentManagementService.saveDepartment(query,id).then(function(res){\r\n\t \tif(res.status == 200){\r\n\t \t$mdDialog.cancel();\r\n\t \tshowToastWithFile('save-department.success.html', '');\r\n\t \t}\r\n\t \telse if(res.data.messages.length >0){\r\n\t \t$mdDialog.cancel();\r\n\t \tshowToastWithFile('department-update.error.html', res.data.messages);\r\n\t \t}\r\n\t }).catch(function(error) {\r\n\r\n\t });\r\n\t }\r\n\t }\r\n\r\n\r\n\t function updateDepartment(dept_id){\r\n vm.isSave = true;\r\n var id = dept_id;\r\n if(vm.department.is_reskin == undefined)\r\n \tvm.department.is_reskin = false;\r\n var query = {\r\n \tname : $scope.department.name,\r\n \tcustomer_type: $scope.department.customer_type,\r\n \tparty_id_names : $scope.department.party_id_names,\r\n \trelated_party_id_names : $scope.department.related_party_id_names,\r\n \tis_demo : $scope.department.is_demo,\r\n \tis_reskin: $scope.department.is_reskin,\r\n \treskin_type: $scope.department.reskin_type,\r\n \tdefault_contact_id: $scope.department.default_contact_id,\r\n \tdefault_bccs: $scope.department.default_bccs\r\n }\r\n\r\n if (query.default_contact_id === \"\") {\r\n query.default_contact_id = null;\r\n }\r\n\r\n var party_ids_check1 = ($scope.department.party_id_names.length > 0) ? true : false;\r\n var related_party_ids_check1 = ($scope.department.related_party_id_names.length > 0) ? true : false;\r\n\r\n if(party_ids_check1 == false && related_party_ids_check1 == false){\r\n \t$scope.department.party_check = true;\r\n \tvar party_check_new1 = false;\r\n }else{\r\n \t$scope.department.party_check = false;\r\n \tvar party_check_new1 = true;\r\n }\r\n\r\n\r\n\t if (vm.formIsValid() && party_check_new1){\r\n\t \tDepartmentManagementService.updateDepartment(query,id).then(function(res){\r\n\t \tif(res.status == 200){\r\n\t \t$mdDialog.cancel();\r\n\t \tshowToastWithFile('update-department.success.html', '');\r\n\t \t}\r\n\t \telse if(res.data.messages.length >0){\r\n\t \t$mdDialog.cancel();\r\n\t \tshowToastWithFile('department-update.error.html', res.data.messages);\r\n\t \t}\r\n\t }).catch(function(error) {\r\n\r\n\t });\r\n\t }\r\n\t }\r\n\r\n\t function formIsValid(){\r\n\t if (vm.formDetails){\r\n\t return vm.formDetails.$valid;\r\n\t } else {\r\n\t return false;\r\n\t }\r\n\t }\r\n\r\n\t\tfunction getTable(){\r\n\t vm.departmentTable = DepartmentManagementService.getDepartmentTable();\r\n\t return vm.departmentTable;\r\n\t }\r\n\r\n\t\t function getField(item, field){\r\n\r\n\t\t switch(field){\r\n\t\t \tcase \"is_active\":\r\n\t\t \treturn item[field] ? \"Active\" : \"Inactive\";\r\n\t\t \tcase \"partid\":\r\n\t\t \t\t\tif (item[\"party_id_names\"] == null)\r\n\t\t\t\t\t return \"\";\r\n\t\t\t \t\telse if (item[\"party_id_names\"].toString().length > 21)\r\n\t\t\t \t\t\treturn item[\"party_id_names\"].toString().substring(0,21)+\"..\";\r\n\t\t\t \t\telse\r\n\t\t\t \t\t\treturn item[\"party_id_names\"].toString();\r\n\t\t \tcase \"groupid\":\r\n\t\t \t\t\tif (item[\"related_party_id_names\"] == null)\r\n\t\t \t\t\t return \"\";\r\n\t\t\t \t\telse if (item[\"related_party_id_names\"].toString().length > 21)\r\n\t\t\t \t\t\treturn item[\"related_party_id_names\"].toString().substring(0,21)+\"..\";\r\n\t\t\t \t\telse\r\n\t\t\t \t\t\treturn item[\"related_party_id_names\"].toString();\r\n\t\t\t case \"is_demo\":\r\n \t\t\treturn item[field] ? \"Active\" : \"Inactive\";\r\n \t\tcase \"reskin_type\":\r\n \t\t\tif (item[\"is_reskin\"] == false){\r\n\t\t\t\t\t\t\t\t\treturn \"\";\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\telse{\r\n\t\t\t\t\t\t\t\t\tif(item[field].charAt(0) != null || item[field].charAt(0) != undefined){\r\n\t\t\t\t\t\t\t\t\t\treturn item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\r\n\r\n\t\t \tdefault:\r\n\t\t \t\treturn item[field];\r\n\r\n\t\t }\r\n\r\n\t\t}\r\n\r\n\t\tfunction getLink(data){\r\n\t return vm.link.url+\"/\"+data[vm.link.field];\r\n\t }\r\n\r\n\t function isLink(field){\r\n\t return field == vm.link.column;\r\n\t }\r\n\r\n\t function getClass(item, field){\r\n\t switch (field){\r\n\t case \"is_demo\":\r\n\t return item[field] ? \"active-user\" : \"inactive-user\";\r\n\t default:\r\n\t return '';\r\n\t }\r\n\t }\r\n\r\n\t function selected(index){\r\n \tvm.lastSelected = index;\r\n \tif (vm.departmentTable.data.length){\r\n \t vm.lastSelectedValue = vm.departmentTable.data[index].selected;\r\n \t}\r\n \t}\r\n\r\n \tfunction shiftSelect(index){\r\n\t var first, last;\r\n\t if (vm.lastSelected > index){\r\n\t first = index; last = vm.lastSelected;\r\n\t } else {\r\n\t first = vm.lastSelected; last = index;\r\n\t }\r\n\t for (var i = first; i <= last; i++){\r\n\t vm.departmentTable.data[i].selected = vm.lastSelectedValue;\r\n\t }\r\n\t vm.selected(index);\r\n \t}\r\n\r\n\t function resetSelected(){\r\n\t vm.selected(0);\r\n\t vm.lastSelectedValue = true;\r\n\t vm.departmentTable.settings().data.map(function(depart){\r\n\t depart.selected = false;\r\n\t });\r\n\t }\r\n\r\n\t function selectUser($event, index){\r\n\r\n\t vm.selectAll = false;\r\n\t if ($event.shiftKey){\r\n\t vm.shiftSelect(index);\r\n\t } else {\r\n\t selected(index);\r\n\t }\r\n\r\n\r\n\t var countLens =[]\r\n\t vm.departmentTable.data.map(function(department){\r\n\t vm.getList.map(function(obj){\r\n\t if(obj.id == department.id)\r\n\t obj.selected = department.selected\r\n\t })\r\n\t });\r\n\r\n\t\t if(vm.getList.length >0)\r\n\t\t countLens = vm.getList;\r\n\r\n\t\t var LensCount = countLens.filter(function(allDepartment){\r\n\t\t return allDepartment.selected\r\n\t\t }).length;\r\n\r\n\t \tvar count;\r\n\t var count1 = LensCount;\r\n\t var count2 = $filter('filter')(vm.departmentTable.data, {selected: true}).length;\r\n\t if(count1 >0){\r\n\t count = count1;\r\n\t }\r\n\t if(count2 > count1){\r\n\t count = count2;\r\n\t }\r\n\t else\r\n\t {\r\n\t count = count1;\r\n\t }\r\n\r\n\t if(vm.departmentTable != undefined)\r\n\t vm.listSelectedCount = count;\r\n \telse vm.listSelectedCount = 0;\r\n \t}\r\n\r\n\r\n\t function checkAll(selected){\r\n\t vm.departmentTable.data.map(function(depart){\r\n\t depart.selected = selected;\r\n\t });\r\n\r\n\t var countLens =[]\r\n \t\t vm.departmentTable.data.map(function(department){\r\n \t department.selected = selected;\r\n \tvm.getList.map(function(obj){\r\n if(obj.id == department.id)\r\n obj.selected = selected\r\n \t});\r\n \t});\r\n\r\n \t\tif(vm.getList.length >0)\r\n \tcountLens = vm.getList;\r\n\r\n \tvar LensCount = countLens.filter(function(allDepartment){\r\n return allDepartment.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.departmentTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(selected)\r\n\t \tvm.listSelectedCount = count;\r\n\t else\r\n \tvm.listSelectedCount = 0;\r\n\r\n\t }\r\n\r\n\t function addSectedusers(){\r\n\t }\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('DepartmentManagementService', DepartmentManagementService);\r\n\r\n /** @ngInject */\r\n DepartmentManagementService.$inject = ['$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function DepartmentManagementService($http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var isEmpty = true,\r\n loading = false,\r\n departmentTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n \treturn {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n \t\tupdateDepartment : updateDepartment,\r\n saveDepartment:saveDepartment,\r\n bulkDeleteDepartments : bulkDeleteDepartments,\r\n getSelectedDepartment : getSelectedDepartment,\r\n bulkDeleteDepartmentsDemo : bulkDeleteDepartmentsDemo,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n autocompleteCww: autocompleteCww,\r\n autocompleteCsl: autocompleteCsl,\r\n autocompleteCfs: autocompleteCfs,\r\n autocompleteCmts: autocompleteCmts,\r\n \t\tgetDepartmentObject : getDepartmentObject,\r\n \t\tgetDepartmentTable: function() { return departmentTable; },\r\n \t\tgetDepartments : getDepartments\r\n \t}\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCww(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCsl(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCfs(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCmts(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n /*function autoComplete(query,company){\r\n\r\n if(company.related_party_id_names.length == 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.company_party_ids.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.company_party_ids);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }else if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.company_party_ids.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n\r\n var filterVals = find(query.value,company.company_party_ids);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.company_party_ids.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.company_party_ids);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }*/\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteDepartments(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/departments/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getDepartments();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function bulkDeleteDepartmentsDemo(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/departments/bulk_edit';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getDepartments();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSelectedDepartment(){\r\n if(departmentTable.settings().data){\r\n return departmentTable.settings().data\r\n .filter(function(department){\r\n\r\n return department.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n departmentTable.filter({});\r\n departmentTable.filter(q)\r\n departmentTable.page(1)\r\n departmentTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n function saveDepartment(theData,id){\r\n //return $http.post(api.url + '/departments' + id, query, {timeout: deferred.promise});\r\n var query = theData;\r\n var url = api.url_v2 +'/companies/'+ id + '/departments';\r\n var dfd = $q.defer();\r\n\r\n return $http.post(url, query).then(function(response){\r\n getDepartments();\r\n return response;\r\n }, function(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n }\r\n\r\n function updateDepartment(theData,id){\r\n //return $http.post(api.url + '/departments' + id, query, {timeout: deferred.promise});\r\n var query = theData;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/departments/'+ id;\r\n var dfd = $q.defer();\r\n return $http.put(url, query).then(function(response){\r\n getDepartments();\r\n return response;\r\n }, function(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n }\r\n\r\n\r\n \tfunction getDepartmentObject() {\r\n return {name: \"\", department_id: \"\", company_id:\"\", default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true};\r\n }\r\n\r\n function getDepartments(){\r\n loading = true;\r\n timeoutTid = false;\r\n \t var url=api.url_v2+\"/companies/\"+$stateParams.id+\"/departments\";\r\n \t var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n departmentTable.total(response.data.departments.length);\r\n departmentTable.settings({data: response.data.departments});\r\n departmentTable.data = response.data.departments;\r\n isEmpty = departmentTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"departmentsTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"departmentsTable:loaded\", departmentTable.data);\r\n return departmentTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response){\r\n var data_settings = response.data.departments.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n userTable.total(response.headers().total);\r\n userTable.settings({data: data_settings });\r\n userTable.data = data_settings; //response.data.users;\r\n isEmpty = userTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return userTable.data;\r\n }\r\n\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('CslExceptionService', CslExceptionService);\r\n\r\n /** @ngInject */\r\n CslExceptionService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function CslExceptionService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var isEmpty = true,\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n \treturn {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n \t\tgetExceptionObject : getExceptionObject,\r\n \t\tgetExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getExceptions : getExceptions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n console.log('')\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/remove_exception_approvers';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n \tfunction getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true};\r\n }\r\n\r\n function getExceptions(){\r\n loading = true;\r\n timeoutTid = false;\r\n \t //var url=api.url+\"/companies/\"+$stateParams.id+\"/departments\";\r\n var url=api.url_v2+\"/companies/\"+$stateParams.id;\r\n \t var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.csl_exception_approvers.length);\r\n exceptionTable.settings({data: response.data.csl_exception_approvers});\r\n exceptionTable.data = response.data.csl_exception_approvers;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", exceptionTable.data);\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response){\r\n var data_settings = response.data.exceptions.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n userTable.total(response.headers().total);\r\n userTable.settings({data: data_settings });\r\n userTable.data = data_settings; //response.data.users;\r\n isEmpty = userTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return userTable.data;\r\n }\r\n\r\n\r\n }\r\n\r\n})();\r\n\r\n\n\r\n\r\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('cslExceptionController', cslExceptionController);\r\n cslExceptionController.$inject = ['$scope', '$window', '$location', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http','$state', 'api', 'UserManagementService' , 'lensviewUsersPopupService' ,\r\n '$rootScope', 'UserService','$filter','ngTableEventsChannel','NgTableParams','lensviewService','CslExceptionService'];\r\n function cslExceptionController($scope, $window, $location,$stateParams, $mdDialog, $mdMedia, $mdToast, $q, $http,$state, api, UserManagementService, lensviewUsersPopupService, $rootScope,\r\n UserService, $filter,ngTableEventsChannel,NgTableParams,lensviewService,CslExceptionService){\r\n\r\n\t var vm = this;\r\n //vm.readAccess = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n\r\n try{\r\n //vm.readAccess = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if(JSON.parse(localStorage.getItem(\"user\")).permissions.cww.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.csl.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.cmts.Company.includes('read')){\r\n vm.readAccess = true;\r\n }else{\r\n vm.readAccess = false;\r\n }\r\n }\r\n catch(e){\r\n vm.readAccess = false;\r\n }\r\n\r\n //// console.log($state.current.name);\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n if(vm.readAccess){\r\n\t \tvm.columns = [\t\t \t\t \r\n\t\t {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"user_status\", \"title\": 'STATUS', \"sortable\": \"user_status\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"approver_level\", \"title\": 'APPROVER LEVEL', \"sortable\": \"approver_level\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\t \r\n\t\t ];\r\n\t }\r\n\t if(!vm.readAccess){\r\n\t \tvm.columns = [\r\n\t\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"user_status\", \"title\": 'STATUS', \"sortable\": \"user_status\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"approver_level\", \"title\": 'APPROVER LEVEL', \"sortable\": \"approver_level\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false} \r\n\t\t ];\r\n\t }\r\n\r\n\t if(vm.readAccess){\r\n\t\t vm.buttons = [\t\t \r\n\t\t {id: 1, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t\t ];\r\n\t\t}\r\n\t\tif(!vm.readAccess){\r\n\t\t\tvm.buttons = [\r\n\t\t {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t\t {id: 1, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t\t ];\r\n\t\t}\r\n \r\n\r\n } \r\n\r\n\t\tvm.link = {field: \"id\", column: \"name\", url: \"users\"};\r\n\t\tvm.icon=\"\" \r\n\t\tvm.lensviewtable = true;\r\n\t\tvm.getList = [];\r\n\t\tvm.getLink = getLink;\r\n\t\tvm.getTable = getTable;\r\n\t\tvm.getField = getField;\r\n\t\tvm.getClass = getClass;\r\n\t\tvm.checkAll = checkAll;\r\n\t\tvm.clearAll = clearAll;\r\n\t\tvm.searchflag = false; \r\n\t\tvm.exception = CslExceptionService.getExceptionObject();\r\n\t\tvm.addExceptions = addExceptions; \r\n\t\tvm.cancel = cancel; \r\n\t\tvm.gotoSelectUser = gotoSelectUser;\r\n\t\tvm.selectUser = selectUser;\r\n\t\tvm.selected = selected;\r\n\t\tvm.shiftSelect = shiftSelect;\r\n\t\tvm.resetSelected = resetSelected;\r\n\t\tvm.bulkDelete = bulkDelete;\r\n\t\tvm.showModal = showModal;\r\n\t\tvm.closeModal = closeModal;\r\n\t\tvm.getSelectedCount = getSelectedCount;\r\n\t\tvm.listSelectedCount = 0;\r\n\t\tvm.selectAll = false;\r\n\t\tvm.searchListData = search_exceptions;\r\n\t\tvm.loadLensUsersFlag = true;\r\n\r\n if($state.current.name =='showCompany'){\r\n\t vm.viewUserText = true;\r\n\t} \r\n\r\n\r\n vm.globals={};\r\n vm.globals.tableParams1 = new NgTableParams({}, {\r\n debugId: \"Table 1\",\r\n dataset: []\r\n });\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n\t vm.showAllClientExceptionOrg = [];\r\n\t vm.currentPage = 0;\r\n\t vm.showAllClientExceptionFlag = false; \r\n\r\n \tvm.addAllClientRow = addAllClientRow; \r\n function subscribeToTable(tableParams){\r\n\r\n if($state.current.name =='showCompany')\r\n \t\t vm.showAllClientExceptionFlag = false;\r\n \tif (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n \t angular.forEach(p2,function(v,k){\r\n \t\t if(v.current)\r\n \t\t\tvm.currentPage = v.number;\r\n \t });\r\n \t if(vm.currentPage<=1){\r\n \t angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n \t vm.showAllClientException= []; \r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.approver_level ==\"all_clients_approver\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n \r\n if($state.current.name == 'showCompany'){\r\n\r\n \t$scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = CslExceptionService.getExceptions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n \t});\r\n\t\t} \r\n\r\n function getSelectedCount() { \r\n\r\n \t return vm.listSelectedCount;\r\n }\r\n\r\n\t function addExceptions(ev){\r\n\r\n\t var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\t $mdDialog.show({\r\n\t templateUrl: '/app/admin/lensview/csl_exceptions/add-exception.html',\r\n\t parent: angular.element(document.body),\r\n\r\n\t targetEvent: ev,\r\n\t clickOutsideToClose:true,\r\n\t fullscreen: useFullScreen\r\n\t })\r\n\t .then(function(answer) {\r\n\r\n\t }, function() {\r\n\r\n\t });\r\n\r\n\t } \r\n \r\n\t function search_exceptions(isClear){\r\n\t \tvm.searchflag = !vm.searchflag;\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search);\r\n\t CslExceptionService.setQuery(search);\r\n\t } \r\n\r\n function getTable(){\r\n\t\t\tif($state.current.name =='showCompany'){\r\n\t\t \t\tvm.showAllClientExceptionFlag = false;\r\n\t\t\t }\r\n\t\t else{\r\n\t\t \t vm.showAllClientExceptionFlag = true;\r\n\t\t }\r\n\t vm.exceptionTable = CslExceptionService.getExceptionTable();\r\n\t //vm.exceptionTable.data = vm.addAllClientRow(vm.getList, $state.current.name);\r\n return vm.exceptionTable; \r\n\t }\r\n\r\n\t function addAllClientRow(getList,state){\r\n\r\n\t \t/*angular.forEach(vm.exceptionTable.data, function(v,k){\r\n \tif(v.approver_level==='all_clients_approver'){ \r\n var oldData =vm.exceptionTable.data[k];\r\n var newData = vm.exceptionTable.data[k];\r\n vm.exceptionTable.data[k] = oldData;\r\n \tvm.showAllClientException= [];\r\n \tvm.showAllClientException.push(vm.exceptionTable.data[k]); \r\n \tvm.showAllClientExceptionOrg =[];\r\n \tvm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]);\r\n\r\n \tif(state=='showCompany'){\r\n vm.showAllClientException.push(\"\");\r\n vm.showAllClientExceptionOrg.push(\"\");\r\n }\r\n \r\n } \r\n\r\n });\r\n if(vm.currentPage<=1){\r\n \t angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n \t vm.showAllClientException= []; \r\n }\r\n return vm.exceptionTable.data;*/ \r\n\r\n \t\tvm.exceptionTable.data = getList;\r\n \t\tvm.showAllClientException= [];\r\n \t\tvm.showAllClientExceptionOrg =[];\r\n \r\n \t for(var i=0; i0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n \t //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n \t if($state.current.name == 'showCompany'){\r\n \t\t angular.forEach(vm.exceptionTable.data, function(v,k){\r\n \t\t\t if(v.approver_level=='all_clients_approver'){\r\n \t\t\t\t vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n \t\t });\r\n \t }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n \tvm.listSelectedCount = 0;\r\n \t}\r\n\r\n\r\n\t function clearAll(){\r\n\r\n search_deptlens_criteria(true);\r\n\t CslExceptionService.getUsers('lens_group');\r\n\t }\r\n\r\n\t function cancel() {\r\n\t $mdDialog.cancel(); \r\n\t }\r\n \r\n\r\n\t function gotoSelectUser(ev,data){\r\n\r\n var lensGroupId = data; \r\n $location.url(\"/users/\"+data.id);\r\n\r\n }\r\n\r\n\t function selected(index){ \r\n \tvm.lastSelected = index;\r\n \tif (vm.exceptionTable.data.length){\r\n \t vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n \t}\r\n \t}\r\n\r\n \tfunction shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n \t}\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.approver_level!=\"all_clients_approver\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].approver_level==\"all_clients_approver\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n function bulkDelete(){\r\n\t \tvm.listSelectedCount = 0;\r\n\t \tvm.selectAll = false;\r\n\t \t$mdDialog.cancel(); \r\n\r\n\t \tvar params = {};\r\n\t\t\tparams.approver_ids = CslExceptionService.getSelectedException().map(function(exception){return exception.id;});\r\n\t\t\tparams.customer_type = 'csl'\r\n\t CslExceptionService.bulkDeleteExceptions(params).then(function(res){\r\n\t if (!res.errors){\r\n\t vm.closeModal(); \r\n\t showToastWithFile('delete-exception.success.html', ''); \r\n\t setTimeout(function(){ \r\n\t\t $state.reload();\t\t \r\n\t\t },2500);\r\n\t } else {\r\n\t vm.closeModal(); \r\n\t }\r\n\t }); \r\n\r\n\t} \r\n\r\n\r\n function showModal(ev, modal){\r\n\t /* Show the modal */\r\n\t var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\t $mdDialog.show({\r\n\t templateUrl: '/app/admin/lensview/modals/'+ modal + '.modal.html',\r\n\t parent: angular.element(document.body),\r\n\t targetEvent: ev,\r\n\t clickOutsideToClose:true,\r\n\t fullscreen: useFullScreen,\r\n\t scope: $scope,\r\n\t preserveScope: true\r\n\t });\r\n\t } \r\n\r\n function closeModal(){\r\n $mdDialog.cancel();\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n\t}\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name CompanyManagementService\r\n *\r\n * @description\r\n * The CompanyManagementService does stuff\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('LensviewCompanyPopUpService', LensviewCompanyPopUpService);\r\n\r\n /** @ngInject */\r\n LensviewCompanyPopUpService.$inject = ['$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService'];\r\n function LensviewCompanyPopUpService($http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService) {\r\n var query,\r\n selectedLensCompanies = [],\r\n deletedLensCompanies = [],\r\n timeoutTid = false,\r\n loading = false,\r\n isEmpty = true,\r\n deferred = $q.defer(),\r\n companyTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n\r\n // $timeout(function() {\r\n // deferred.resolve();\r\n // }, 60000);\r\n\r\n /* CRANE TABLE PARAMS */\r\n\r\n // function sortFields(orderBy, sorting){\r\n // var result = [];\r\n // for (var i in orderBy){\r\n // if (!isNaN(+i)){\r\n // var x = orderBy[i].replace(/[+-]/g,\"\");\r\n // var p = {};\r\n // p[x] = sorting[x];\r\n // result.push(p);\r\n // }\r\n // }\r\n // return result;\r\n // }\r\n\r\n return {\r\n getCompany: getCompany,\r\n getCompanies: getCompanies,\r\n getCompanyDetails: getCompanyDetails,\r\n getCompanyTable: function(){return companyTable;},\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n deleteCompany: deleteCompany,\r\n getSelectedCompanies : getSelectedCompanies,\r\n setSelectedLensCompanies : setSelectedLensCompanies,\r\n getSelectedLensCompanies : getSelectedLensCompanies,\r\n setDeletedLensCompanies : setDeletedLensCompanies,\r\n getDeletedLensCompanies : getDeletedLensCompanies,\r\n resetSelectedLensCompanies : resetSelectedLensCompanies\r\n\r\n };\r\n\r\n\r\n\r\n function setQuery(q){\r\n // query = q;\r\n // companyTable.page(1);\r\n // companyTable.reload();\r\n // Added by Abheesh\r\n companyTable.filter({});\r\n companyTable.filter(q)\r\n companyTable.page(1)\r\n companyTable.reload();\r\n }\r\n\r\n\r\n // ---------------------\r\n // Retrieve a list of companies\r\n // // ------------------\r\n function getCompanies(param){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n var company_url = api.url_v2+\"/companies\";\r\n\r\n\r\n if(param == 'lens_group'){\r\n //company_url = company_url+\"?lens_group=true\";\r\n company_url = api.url_v2+'/lens_groups/'+$stateParams.id+'/excluded_company';\r\n }else if(params == 'lens_group_users'){\r\n company_url = api.url_v2+'/lens_groups/'+$stateParams.id+'/edit';\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n // if(param == 'lens_group'){\r\n // // company_url = company_url+\"?lens_group=true\";\r\n // // company_url = api.url+'/lens_groups/excluded_company?id='+$stateParams.id;\r\n // company_url = api.url+'/lens_groups/excluded_company?id='+$stateParams.id;\r\n\r\n // }else if(param == 'lens_group_companies'){\r\n // company_url = api.url+'/lens_groups/'+$stateParams.id+'/edit';\r\n // }\r\n $rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n var promise = $http({url: company_url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n\r\n companyTable.total(response.headers().total);\r\n companyTable.settings({data: response.data.companies});\r\n companyTable.data = response.data.companies;\r\n isEmpty = companyTable.data.length === 0;\r\n loading = false;\r\n //$rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n // $rootScope.$broadcast(\"companiesTable:loaded\", companyTable.data);\r\n return companyTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a company\r\n // // ------------------\r\n function getCompany(id){\r\n company = getCompanyObject();\r\n return $http.get(api.url_v2 + '/companies/' + id, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n company = unpackageCompany(response.data);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n company = null;\r\n });\r\n }\r\n\r\n function getCompanyDetails() {\r\n return company;\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n // --------------------------------------\r\n // Delete company\r\n // --------------------------------------\r\n function deleteCompany(id){\r\n $timeout.cancel(deferred.promise);\r\n var promise = $q.defer();\r\n $http.delete(api.url_v2 + '/companies/' + id, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n\r\n\r\n\r\n\r\n function unpackageUser(user_data){\r\n for (var field in user_data){\r\n user[field] = user_data[field];\r\n }\r\n if (!user.contact.ccs) user.contact.ccs = [];\r\n //debugger\r\n user.company_id = user.company.id;\r\n }\r\n\r\n\r\n\r\n function getSelectedCompanies(){\r\n if(companyTable.settings().data){\r\n return companyTable.settings().data\r\n .filter(function(company){\r\n\r\n return company.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setSelectedLensCompanies(data){\r\n selectedLensCompanies = data;\r\n }\r\n function getSelectedLensCompanies(){\r\n return selectedLensCompanies ;\r\n }\r\n\r\n function setDeletedLensCompanies(data){\r\n deletedLensCompanies = data;\r\n }\r\n\r\n function getDeletedLensCompanies(){\r\n return deletedLensCompanies;\r\n }\r\n\r\n function resetSelectedLensCompanies(){\r\n selectedLensCompanies =[];\r\n }\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('lensviewCompaniesController', lensviewCompaniesController);\r\n lensviewCompaniesController.$inject = ['$scope', '$location', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http', '$state', '$stateParams', 'api', 'lensviewService', 'CompanyManagementService', 'LensviewCompanyPopUpService' ,'$filter' ,'$rootScope' ,'$window', 'UserService','userLensGroupService','ngTableEventsChannel',\"NgTableParams\"];\r\n function lensviewCompaniesController($scope, $location, $mdDialog, $mdMedia, $mdToast, $q, $http, $state, $stateParams, api, lensviewService, CompanyManagementService, LensviewCompanyPopUpService,$filter,$rootScope,$window,UserService,userLensGroupService,ngTableEventsChannel,NgTableParam){\r\n var vm = this;\r\n\r\n\r\n //if((lensviewService.getReadOnly()) || (lensviewService.getNameData() == 'ALL CLIENTS')){\r\n var columns = [\r\n //{\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"name\", \"title\": 'ADMIN.LENS.NAME', \"sortable\": \"name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\":\"customer_types\", \"title\": 'Customer Type', \"sortable\": \"customer_types\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"is_active\", \"title\": 'ADMIN.LENS.STATUS', \"sortable\": \"company\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n //{\"field\":\"actionremove\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n //{\"field\":\"selecteditems\", \"title\": '', \"sortable\": \"\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n ];\r\n\r\n if(!userLensGroupService.getReadOnly()){\r\n columns.push({\"field\":\"actionremove\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false});\r\n }\r\n\r\n if(!lensviewService.getReadOnly() && !userLensGroupService.getReadOnly()){\r\n columns.unshift({\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false});\r\n }\r\n\r\n vm.columns = columns;\r\n vm.buttons = [\r\n {id: 0, action: add_companieslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n {id: 1, action: search_companieslens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n vm.icon=\"\"\r\n vm.lensviewtitle = \"Companies in this Lens Group\";\r\n vm.lensviewAddTitle = \"Add Companies to this Lens Group\";\r\n vm.getList = [];\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.getClass = getClass;\r\n vm.selected = selected;\r\n vm.currentStateObj = lensviewService.getNameData();\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.selectUser = selectUser;\r\n vm.addSectedCompanies = addSectedCompanies;\r\n vm.checkAll = checkAll;\r\n vm.clearAll = clearAll;\r\n vm.cancel = cancel;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.getSelectedCount = getSelectedCount;\r\n // vm.getLink = getLink;\r\n // vm.isLink = isLink;\r\n vm.removeElem = removeElem;\r\n vm.bulkDelete = bulkDelete;\r\n vm.lastSelected = 0;\r\n vm.lastSelectedValue = true;\r\n vm.params= undefined;\r\n vm.companiesList = [];\r\n\r\n vm.link = {field: \"id\", column: \"name\", url: \"companies\"};\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n vm.searchListData = search_companieslens_criteria;\r\n\r\n vm.globals={};\r\n vm.globals.tableParams1 = new NgTableParam({}, {\r\n debugId: \"Table 1\",\r\n dataset: []\r\n });\r\n\r\n $scope.companiesListData = [];\r\n\r\n if(vm.companyTable){\r\n vm.companyTable.data=[];\r\n }\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n\r\n function subscribeToTable(tableParams){\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n var tmp = 0\r\n angular.forEach(vm.companyTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.companyTable.data.length == tmp && tmp > 0)\r\n }, $scope, tableParams);\r\n }\r\n\r\n $rootScope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n if((params1 != params2 || UserService.getCompanyRouteStatus())\r\n && ($stateParams.id != undefined && params1 != \"/companies\" && params1 != \"/users\"))\r\n {\r\n var res=CompanyManagementService.getCompanies('lens_group_companies_view');\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n \t if(userLensGroupService.getReadOnly()){\r\n \t\t vm.buttons = [];\r\n \t\t angular.forEach(vm.columns, function(v,k){\r\n \t \tif(v.field===\"actionremove\"){\r\n \t \t\tvm.columns.splice(k,1);\r\n \t \t}\r\n \t });\r\n\r\n \t }\r\n });\r\n //UserService.companyRouteChanged(false);\r\n }\r\n\r\n });\r\n\r\n\r\n function selected(index){\r\n vm.lastSelected = index;\r\n if (vm.companyTable.data.length){\r\n vm.lastSelectedValue = vm.companyTable.data[index].selected;\r\n }\r\n }\r\n\r\n function selectUser($event, index){\r\n \t vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n if(vm.companyTable != undefined){\r\n var count;\r\n var count1 = CompanyManagementService.getSelectedCompanies().length;\r\n var count2 = $filter('filter')(vm.companyTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n \tvm.listSelectedCount = count;\r\n\r\n // vm.companyTable.data.map(function(objCompany){\r\n // if(objCompany.selected == true)\r\n // $scope.companiesListData.push(objCompany);\r\n // });\r\n \t \t}\r\n \t \telse vm.listSelectedCount = 0;\r\n }\r\n\r\n function shiftSelect(index){\r\n\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.companyTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.companyTable.settings().data.map(function(user){\r\n user.selected = false;\r\n });\r\n }\r\n\r\n\r\n\r\n\r\n\r\n\r\n function add_companieslens(ev){\r\n //vm.searchflag = true;\r\n\r\n // loadContent();\r\n //CompanyManagementService.getCompanies('lens_group');\r\n vm.listSelectedCount = 0;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/companies/add-companies.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n\r\n })\r\n .then(function(answer) {\r\n \tvm.listSelectedCount = 0;\r\n }, function() {\r\n \tvm.listSelectedCount = 0;\r\n });\r\n\r\n\r\n }\r\n\r\n function search_companieslens(){\r\n\t \tvm.searchflag = !vm.searchflag;\r\n }\r\n\r\n function search_companieslens_criteria(isClear){\r\n\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search);\r\n //LensviewCompanyPopUpService.setQuery(search);\r\n vm.companyTable.filter({});\r\n vm.companyTable.filter(search)\r\n vm.companyTable.page(1)\r\n vm.companyTable.reload();\r\n\t }\r\n\r\n // function loadContent(){\r\n // \tlensviewService.companiesList()\r\n // .then(function(response){\r\n // \tvm.companiesList = response;\r\n // \t// console.log(vm.companiesList);\r\n\r\n // });\r\n // }\r\n\r\n function getTable(){\r\n // var companies = {i:{data:vm.companiesList}};\r\n //return vm.companiesList;\r\n\r\n //// console.log(CompanyManagementService.getCompanyTable());\r\n // if($state.current.name == 'showLensGroup'){\r\n // \treturn lensviewService.getCompanyDetails();\r\n // }else{\r\n\r\n // }\r\n // if($state.current.name.includes('new')){\r\n // return false;\r\n // }\r\n vm.companyTable = CompanyManagementService.getCompanyTable();\r\n return CompanyManagementService.getCompanyTable();\r\n // var selectedCompanies = [];\r\n // selectedCompanies = $scope.companiesListData;\r\n // var companyList = CompanyManagementService.getCompanyTable();\r\n // vm.companyTable = companyList;\r\n\r\n // companyList.data.map(function(objCompany){\r\n // selectedCompanies.map(function(item){\r\n // if(objCompany.id == item.id)\r\n // objCompany.selected = true;\r\n // })\r\n // });\r\n\r\n // return companyList;\r\n\r\n }\r\n function getField(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"customer_types\":\r\n if(item[field].length > 0){\r\n return item[field].join(',').toUpperCase();\r\n }\r\n default:\r\n return item[field];\r\n }\r\n }\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"active-user\" : \"inactive-user\";\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function checkAll(selected){\r\n\r\n //$scope.companiesListData = [];\r\n vm.companyTable.data.map(function(company){\r\n company.selected = selected;\r\n //$scope.companiesListData.push(company);\r\n });\r\n\r\n var count;\r\n var count1 = CompanyManagementService.getSelectedCompanies().length;\r\n var count2 = vm.companyTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(selected)\r\n \tvm.listSelectedCount = count;\r\n else\r\n \tvm.listSelectedCount = 0;\r\n }\r\n\r\n function addSectedCompanies(){\r\n\r\n // vm.selectedCompanies = CompanyManagementService.getSelectedCompanies().map(function(company){return company.id;});\r\n // CompanyManagementService.setSelectedLensCompanies(vm.selectedCompanies);\r\n // CompanyManagementService.getCompanies('lens_group');\r\n var companyTable = CompanyManagementService.getCompanyTable();\r\n if(vm.getList.length >0) var countCompany = vm.getList;\r\n vm.selectedCompanies = LensviewCompanyPopUpService.getSelectedCompanies().map(function(company){\r\n //var companyExists = $filter('filter')(companyTable.data, {id: company.id });\r\n var companyExists = companyTable.data.map(function(data){ return data[\"id\"]; }).includes(company.id);\r\n var tempCompany = angular.copy(company);\r\n tempCompany.selected = false;\r\n if(companyExists == false) {\r\n tempCompany.new = true;\r\n if(countCompany != undefined) countCompany.push(tempCompany);\r\n CompanyManagementService.addCompanytable(tempCompany,vm.getList.length);\r\n }\r\n return company.id;\r\n });\r\n\r\n var all_Ids = CompanyManagementService.getCompanyTable();\r\n if(countCompany != undefined) all_Ids.data = countCompany;\r\n //vm.selectedCompanies =CompanyManagementService.getSelectedCompanies();\r\n vm.selectedCompanies = [];\r\n\r\n angular.forEach(all_Ids.data,function(data){\r\n vm.selectedCompanies.push(data.id);\r\n\r\n });\r\n\r\n var del_company_ids = LensviewCompanyPopUpService.getDeletedLensCompanies();\r\n\r\n if(del_company_ids.length >0){\r\n for( var i=vm.selectedCompanies.length - 1; i>=0; i--){\r\n for( var j=0; j totalCompanies.length){ totalCompanies = vm.getList;}\r\n //if(vm.getList.length >0) totalCompanies = vm.getList;\r\n\r\n\r\n for( var i=totalCompanies.length - 1; i>=0; i--){\r\n if(totalCompanies[i].selected == true && totalCompanies[i].new == undefined){\r\n databaseCompanies = databaseCompanies.concat(totalCompanies[i].id);\r\n }\r\n if((totalCompanies[i].selected == true && totalCompanies[i].new == true)){\r\n newCompanies = newCompanies.concat(totalCompanies[i].id);\r\n }\r\n\r\n }\r\n\r\n if(newCompanies.length > 0 && databaseCompanies.length == 0){\r\n LensviewCompanyPopUpService.setDeletedLensCompanies(newCompanies);\r\n }\r\n else if(databaseCompanies.length >0 && newCompanies.length == 0){\r\n LensviewCompanyPopUpService.setDeletedLensCompanies(databaseCompanies);\r\n }\r\n else if(newCompanies.length > 0 && databaseCompanies.length >0)\r\n {\r\n LensviewCompanyPopUpService.setDeletedLensCompanies(newCompanies.concat(databaseCompanies));\r\n }\r\n\r\n\r\n if(newCompanies.length > 0){\r\n\r\n var params_newCompanies = {\r\n company_ids: newCompanies\r\n };\r\n\r\n if(databaseCompanies.length == 0){\r\n showToastWithFile('company-delete.success.html');\r\n }\r\n\r\n setTimeout(function(){\r\n $state.reload();\r\n angular.forEach(params_newCompanies.company_ids, function(value1,key1){\r\n angular.forEach(vm.companyTable.data, function(value2,key2){\r\n // CompanyManagementService.DeleteCompanytable(vm.companyTable.data);\r\n if(value2.id==value1)\r\n vm.companyTable.data.splice(key2, 1);\r\n CompanyManagementService.DeleteLensGroupTable(vm.companyTable.data);\r\n\r\n });\r\n\r\n if(vm.companyTable.data.length==0) {\r\n vm.selectAll=false;\r\n }\r\n\r\n });\r\n },2500);\r\n\r\n }\r\n\r\n if(databaseCompanies.length > 0){\r\n var params = {\r\n company_ids: databaseCompanies\r\n };\r\n\r\n $http({\r\n method:'DELETE',\r\n url:api.url_v2 + '/lens_groups/'+$stateParams.id,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :params\r\n }).success(function(data){\r\n vm.listSelectedCount = 0;\r\n\r\n\r\n showToastWithFile('company-delete.success.html');\r\n setTimeout(function(){\r\n if(newCompanies.length > 0 && databaseCompanies.length > 0){\r\n\r\n }else if(databaseCompanies.length > 0){\r\n $state.reload();\r\n }\r\n //$state.reload();\r\n \tangular.forEach(params.company_ids, function(value1,key1){\r\n \t\tangular.forEach(vm.companyTable.data, function(value2,key2){\r\n if(value2.id==value1)\r\n\r\n \t\t\t\tvm.companyTable.data.splice(key2, 1);\r\n CompanyManagementService.DeleteLensGroupTable(vm.companyTable.data);\r\n\r\n \t\t});\r\n if(vm.companyTable.data.length==0) {\r\n vm.selectAll=false;\r\n }\r\n \t});\r\n },2500);\r\n\r\n if(vm.companyTable!=undefined){\r\n \t\t angular.forEach(vm.companyTable.data, function(v,k){\r\n \t\t\t vm.companyTable.data[k].selected = false;\r\n \t\t });\r\n \t}\r\n })\r\n .error(function(data){\r\n\t showToastWithFile('delete-company.error.html', data.error);\r\n\t setTimeout(function(){\r\n //location.reload();\r\n\t },2500);\r\n\r\n\t });\r\n\r\n }\r\n\r\n }\r\n function getSelectedCount() {\r\n \t\t//return CompanyManagementService.getSelectedCompanies().length;\r\n \t/*if(vm.companyTable != undefined){\r\n \t\t return $filter('filter')(vm.companyTable.data, {selected: true}).length;\r\n \t \t}\r\n \telse return 0;*/\r\n \treturn vm.listSelectedCount;\r\n }\r\n\r\n function showModal(ev){\r\n\r\n var count;\r\n var count1 = CompanyManagementService.getSelectedCompanies().length;\r\n var count2 = $filter('filter')(vm.companyTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n //var selectedCompanies = CompanyManagementService.getSelectedCompanies();\r\n //// console.log(selectedCompanies);\r\n //vm.getSelectedCount = selectedCompanies.length;\r\n vm.getSelectedCount = count;\r\n vm.listSelectedCount = count;\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/companies/modals/delete-companies.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.cancel();\r\n }\r\n\r\n function showToastWithFile(file, messages, delay) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: delay ? delay : 3000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n function getselectedCompaniesCount(){\r\n if(vm.getTable().data){\r\n return vm.getTable().data\r\n .filter(function(user){\r\n return user.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('lensviewCompaniesPopUpController', lensviewCompaniesPopUpController);\r\n lensviewCompaniesPopUpController.$inject = ['$scope', '$location', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http', '$state', 'api', 'lensviewService', 'LensviewCompanyPopUpService','CompanyManagementService', '$filter','ngTableEventsChannel','NgTableParams'];\r\n function lensviewCompaniesPopUpController($scope, $location, $mdDialog, $mdMedia, $mdToast, $q, $http, $state, api, lensviewService, LensviewCompanyPopUpService,CompanyManagementService,$filter,ngTableEventsChannel,NgTableParam){\r\n\t var vm = this;\r\n\r\n\t vm.columns = [\r\n\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"name\", \"title\": 'ADMIN.LENS.NAME', \"sortable\": \"name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"is_active\", \"title\": 'ADMIN.LENS.STATUS', \"sortable\": \"company\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t // {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t //{\"field\":\"selecteditems\", \"title\": '', \"sortable\": \"\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n\r\n\t ];\r\n\r\n\r\n\t vm.buttons = [\r\n\t // {id: 0, action: add_companieslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t {id: 0, action: search_companieslens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t ];\r\n\r\n\t vm.icon=\"\"\r\n\t vm.lensviewtitle = \"This Company Contains the following Departments:\";\r\n\t vm.lensviewAddTitle = \"Add Companies to this Lens Group\";\r\n\t vm.lensviewtable = true;\r\n\t vm.clearbtn = true;\r\n vm.searchflag = false;\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n\t vm.getClass = getClass;\r\n\t vm.addSectedCompanies = addSectedCompanies;\r\n\t vm.checkAll = checkAll;\r\n\t vm.clearAll = clearAll;\r\n\t vm.cancel = cancel;\r\n\t vm.searchListData = search_companieslens;\r\n\t // vm.getLink = getLink;\r\n\t // vm.isLink = isLink;\r\n vm.companiesList = [];\r\n vm.link = {field: \"id\", column: \"name\", url: \"companies\"};\r\n\r\n LensviewCompanyPopUpService.getCompanies('lens_group');\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n\t \tfunction subscribeToTable(tableParams){ \r\n\t ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){ \r\n\t \tvar tmp = 0\r\n angular.forEach(vm.companyTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.companyTable.data.length == tmp && tmp > 0) \t \r\n\t }, $scope, tableParams);\r\n\t }\r\n\r\n\r\n\r\n\t function search_companieslens(isClear){\r\n\t \t//vm.searchflag = !vm.searchflag;\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search);\r\n\t LensviewCompanyPopUpService.setQuery(search);\r\n\t }\r\n\r\n\r\n\r\n\t\tfunction getTable(){ \r\n var selectedCompanies = CompanyManagementService.getCompanyTable();\r\n var companyList = LensviewCompanyPopUpService.getCompanyTable();\r\n vm.companyTable = companyList;\r\n companyList.data.map(function(objCompany){\r\n \tselectedCompanies.data.map(function(item){\r\n \t\tif(objCompany.id == item.id)\r\n\t\t objCompany.selected = true;\r\n \t}) \r\n });\r\n\t\t\t return companyList;\r\n\r\n\r\n\t\t}\r\n\t\t function getField(item, field){\r\n\t\t switch (field){\r\n\t\t case \"is_active\":\r\n\t\t return item[field] ? \"Active\" : \"Inactive\";\r\n\t\t default:\r\n\t\t return item[field];\r\n\t\t }\r\n\t\t}\r\n\t\tfunction getLink(data){\r\n\t return vm.link.url+\"/\"+data[vm.link.field];\r\n\t }\r\n\t function isLink(field){\r\n\t return field == vm.link.column;\r\n\t }\r\n\r\n\t function getClass(item, field){\r\n\t switch (field){\r\n\t case \"is_active\":\r\n\t return item[field] ? \"active-user\" : \"inactive-user\";\r\n\t default:\r\n\t return '';\r\n\t }\r\n\t }\r\n\r\n\t function checkAll(selected){\r\n vm.companyTable.data.map(function(company){\r\n company.selected = selected;\r\n });\r\n\t }\r\n\t function addSectedCompanies(){\r\n vm.selectedCompanies = LensviewCompanyPopUpService.getSelectedCompanies().map(function(company){return company.id;});\r\n LensviewCompanyPopUpService.setSelectedLensCompanies(vm.selectedCompanies);\r\n //LensviewCompanyPopUpService.getCompanies('lens_group');\r\n cancel();\r\n\t }\r\n\t function clearAll(){ \r\n\t \tsearch_companieslens(true);\r\n\t LensviewCompanyPopUpService.getCompanies('lens_group');\r\n\t }\r\n\t function cancel() {\r\n\t $mdDialog.cancel();\r\n\t search_companieslens(true);\r\n\t }\r\n\r\n\r\n\r\n\r\n\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('CmtsExceptionService', CmtsExceptionService);\r\n\r\n /** @ngInject */\r\n CmtsExceptionService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function CmtsExceptionService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var isEmpty = true,\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n \treturn {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n \t\tgetExceptionObject : getExceptionObject,\r\n \t\tgetExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getExceptions : getExceptions\r\n \t}\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/remove_exception_approvers';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n \tfunction getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true};\r\n }\r\n\r\n function getExceptions(){\r\n loading = true;\r\n timeoutTid = false;\r\n \t //var url=api.url+\"/companies/\"+$stateParams.id+\"/departments\";\r\n var url=api.url_v2+\"/companies/\"+$stateParams.id;\r\n \t var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.cmts_exception_approvers.length);\r\n exceptionTable.settings({data: response.data.cmts_exception_approvers});\r\n exceptionTable.data = response.data.cmts_exception_approvers;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", exceptionTable.data);\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response){\r\n var data_settings = response.data.exceptions.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n userTable.total(response.headers().total);\r\n userTable.settings({data: data_settings });\r\n userTable.data = data_settings; //response.data.users;\r\n isEmpty = userTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return userTable.data;\r\n }\r\n\r\n\r\n }\r\n\r\n})();\r\n\r\n\n\r\n\r\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('cmtsExceptionController', cmtsExceptionController);\r\n cmtsExceptionController.$inject = ['$scope', '$window', '$location', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http','$state', 'api', 'UserManagementService' , 'lensviewUsersPopupService' ,\r\n '$rootScope', 'UserService','$filter','ngTableEventsChannel','NgTableParams','lensviewService','CmtsExceptionService'];\r\n function cmtsExceptionController($scope, $window, $location,$stateParams, $mdDialog, $mdMedia, $mdToast, $q, $http,$state, api, UserManagementService, lensviewUsersPopupService, $rootScope,\r\n UserService, $filter,ngTableEventsChannel,NgTableParams,lensviewService,CmtsExceptionService){\r\n\r\n\t var vm = this;\r\n //vm.readAccess = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n\r\n try{\r\n //vm.readAccess = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n\t\t\tif(JSON.parse(localStorage.getItem(\"user\")).permissions.cww.Company.includes('read') || \r\n\t\t\t\t\tJSON.parse(localStorage.getItem(\"user\")).permissions.csl.Company.includes('read') || \r\n\t\t\t\t\tJSON.parse(localStorage.getItem(\"user\")).permissions.cfs.Company.includes('read') || \r\n JSON.parse(localStorage.getItem(\"user\")).permissions.cmts.Company.includes('read')){\r\n vm.readAccess = true;\r\n }else{\r\n vm.readAccess = false;\r\n }\r\n }\r\n catch(e){\r\n vm.readAccess = false;\r\n }\r\n\r\n //// console.log($state.current.name);\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n if(vm.readAccess){\r\n\t \tvm.columns = [\t\t \t\t \r\n\t\t {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"user_status\", \"title\": 'STATUS', \"sortable\": \"user_status\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"approver_level\", \"title\": 'APPROVER LEVEL', \"sortable\": \"approver_level\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\t \r\n\t\t ];\r\n\t }\r\n\t if(!vm.readAccess){\r\n\t \tvm.columns = [\r\n\t\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"user_status\", \"title\": 'STATUS', \"sortable\": \"user_status\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"approver_level\", \"title\": 'APPROVER LEVEL', \"sortable\": \"approver_level\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false} \r\n\t\t ];\r\n\t }\r\n\r\n\t if(vm.readAccess){\r\n\t\t vm.buttons = [\t\t \r\n\t\t {id: 1, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t\t ];\r\n\t\t}\r\n\t\tif(!vm.readAccess){\r\n\t\t\tvm.buttons = [\r\n\t\t {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t\t {id: 1, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t\t ];\r\n\t\t}\r\n \r\n\r\n } \r\n\r\n\t\tvm.link = {field: \"id\", column: \"name\", url: \"users\"};\r\n\t\tvm.icon=\"\" \r\n\t\tvm.lensviewtable = true;\r\n\t\tvm.getList = [];\r\n\t\tvm.getLink = getLink;\r\n\t\tvm.getTable = getTable;\r\n\t\tvm.getField = getField;\r\n\t\tvm.getClass = getClass;\r\n\t\tvm.checkAll = checkAll;\r\n\t\tvm.clearAll = clearAll;\r\n\t\tvm.searchflag = false; \r\n\t\tvm.exception = CmtsExceptionService.getExceptionObject();\r\n\t\tvm.addExceptions = addExceptions; \r\n\t\tvm.cancel = cancel; \r\n\t\tvm.gotoSelectUser = gotoSelectUser;\r\n\t\tvm.selectUser = selectUser;\r\n\t\tvm.selected = selected;\r\n\t\tvm.shiftSelect = shiftSelect;\r\n\t\tvm.resetSelected = resetSelected;\r\n\t\tvm.bulkDelete = bulkDelete;\r\n\t\tvm.showModal = showModal;\r\n\t\tvm.closeModal = closeModal;\r\n\t\tvm.getSelectedCount = getSelectedCount;\r\n\t\tvm.listSelectedCount = 0;\r\n\t\tvm.selectAll = false;\r\n\t\tvm.searchListData = search_exceptions;\r\n\t\tvm.loadLensUsersFlag = true;\r\n\r\n if($state.current.name =='showCompany'){\r\n\t vm.viewUserText = true;\r\n\t} \r\n\r\n\r\n vm.globals={};\r\n vm.globals.tableParams1 = new NgTableParams({}, {\r\n debugId: \"Table 1\",\r\n dataset: []\r\n });\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n\t vm.showAllClientExceptionOrg = [];\r\n\t vm.currentPage = 0;\r\n\t vm.showAllClientExceptionFlag = false; \r\n\r\n \tvm.addAllClientRow = addAllClientRow; \r\n function subscribeToTable(tableParams){\r\n\r\n if($state.current.name =='showCompany')\r\n \t\t vm.showAllClientExceptionFlag = false;\r\n \tif (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n \t angular.forEach(p2,function(v,k){\r\n \t\t if(v.current)\r\n \t\t\tvm.currentPage = v.number;\r\n \t });\r\n \t if(vm.currentPage<=1){\r\n \t angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n \t vm.showAllClientException= []; \r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.approver_level ==\"all_clients_approver\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n \r\n if($state.current.name == 'showCompany'){\r\n\r\n \t$scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = CmtsExceptionService.getExceptions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n \t});\r\n\t\t} \r\n\r\n function getSelectedCount() { \r\n\r\n \t return vm.listSelectedCount;\r\n }\r\n\r\n\t function addExceptions(ev){\r\n\r\n\t var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\t $mdDialog.show({\r\n\t templateUrl: '/app/admin/lensview/cmts_exceptions/add-cmts-exception.html',\r\n\t parent: angular.element(document.body),\r\n\r\n\t targetEvent: ev,\r\n\t clickOutsideToClose:true,\r\n\t fullscreen: useFullScreen\r\n\t })\r\n\t .then(function(answer) {\r\n\r\n\t }, function() {\r\n\r\n\t });\r\n\r\n\t } \r\n \r\n\t function search_exceptions(isClear){\r\n\t \tvm.searchflag = !vm.searchflag;\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search);\r\n\t CmtsExceptionService.setQuery(search);\r\n\t } \r\n\r\n function getTable(){\r\n\t\t\tif($state.current.name =='showCompany'){\r\n\t\t \t\tvm.showAllClientExceptionFlag = false;\r\n\t\t\t }\r\n\t\t else{\r\n\t\t \t vm.showAllClientExceptionFlag = true;\r\n\t\t }\r\n\t vm.exceptionTable = CmtsExceptionService.getExceptionTable();\r\n\t //vm.exceptionTable.data = vm.addAllClientRow(vm.getList, $state.current.name);\r\n return vm.exceptionTable; \r\n\t }\r\n\r\n\t function addAllClientRow(getList,state){\r\n\r\n \t\tvm.exceptionTable.data = getList;\r\n \t\tvm.showAllClientException= [];\r\n \t\tvm.showAllClientExceptionOrg =[];\r\n \r\n \t for(var i=0; i0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n \t //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n \t if($state.current.name == 'showCompany'){\r\n \t\t angular.forEach(vm.exceptionTable.data, function(v,k){\r\n \t\t\t if(v.approver_level=='all_clients_approver'){\r\n \t\t\t\t vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n \t\t });\r\n \t }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n \tvm.listSelectedCount = 0;\r\n \t}\r\n\r\n\r\n\t function clearAll(){\r\n\r\n search_deptlens_criteria(true);\r\n\t\t\t\tCmtsExceptionService.getUsers('lens_group');\r\n\t }\r\n\r\n\t function cancel() {\r\n\t $mdDialog.cancel(); \r\n\t }\r\n \r\n\r\n\t function gotoSelectUser(ev,data){\r\n\r\n var lensGroupId = data; \r\n $location.url(\"/users/\"+data.id);\r\n\r\n }\r\n\r\n\t function selected(index){ \r\n \tvm.lastSelected = index;\r\n \tif (vm.exceptionTable.data.length){\r\n \t vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n \t}\r\n \t}\r\n\r\n \tfunction shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n \t}\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.approver_level!=\"all_clients_approver\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].approver_level==\"all_clients_approver\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n function bulkDelete(){\r\n\t \tvm.listSelectedCount = 0;\r\n\t \tvm.selectAll = false;\r\n\t \t$mdDialog.cancel(); \r\n\r\n\t \tvar params = {};\r\n\t\t\tparams.approver_ids = CmtsExceptionService.getSelectedException().map(function(exception){return exception.id;});\r\n\t\t\tparams.customer_type = 'cmts'\r\n\t CmtsExceptionService.bulkDeleteExceptions(params).then(function(res){\r\n\t if (!res.errors){\r\n\t vm.closeModal(); \r\n\t showToastWithFile('cmts-delete-exception.success.html', ''); \r\n\t setTimeout(function(){ \r\n\t\t $state.reload();\t\t \r\n\t\t },2500);\r\n\t } else {\r\n\t vm.closeModal(); \r\n\t }\r\n\t }); \r\n\r\n\t} \r\n\r\n\r\n function showModal(ev, modal){\r\n\t /* Show the modal */\r\n\t var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\t $mdDialog.show({\r\n\t templateUrl: '/app/admin/lensview/modals/cmts-'+ modal + '.modal.html',\r\n\t parent: angular.element(document.body),\r\n\t targetEvent: ev,\r\n\t clickOutsideToClose:true,\r\n\t fullscreen: useFullScreen,\r\n\t scope: $scope,\r\n\t preserveScope: true\r\n\t });\r\n\t } \r\n\r\n function closeModal(){\r\n $mdDialog.cancel();\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('CfsExceptionService', CfsExceptionService);\r\n\r\n /** @ngInject */\r\n CfsExceptionService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function CfsExceptionService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var isEmpty = true,\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n \treturn {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n \t\tgetExceptionObject : getExceptionObject,\r\n \t\tgetExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getExceptions : getExceptions\r\n \t}\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/remove_exception_approvers';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n \tfunction getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true};\r\n }\r\n\r\n function getExceptions(){\r\n loading = true;\r\n timeoutTid = false;\r\n \t //var url=api.url+\"/companies/\"+$stateParams.id+\"/departments\";\r\n var url=api.url_v2+\"/companies/\"+$stateParams.id;\r\n \t var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.cfs_exception_approvers.length);\r\n exceptionTable.settings({data: response.data.cfs_exception_approvers});\r\n exceptionTable.data = response.data.cfs_exception_approvers;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", exceptionTable.data);\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response){\r\n var data_settings = response.data.exceptions.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n userTable.total(response.headers().total);\r\n userTable.settings({data: data_settings });\r\n userTable.data = data_settings; //response.data.users;\r\n isEmpty = userTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return userTable.data;\r\n }\r\n\r\n\r\n }\r\n\r\n})();\r\n\r\n\n\r\n\r\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('cfsExceptionController', cfsExceptionController);\r\n cfsExceptionController.$inject = ['$scope', '$window', '$location', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http','$state', 'api', 'UserManagementService' , 'lensviewUsersPopupService' ,\r\n '$rootScope', 'UserService','$filter','ngTableEventsChannel','NgTableParams','lensviewService','CfsExceptionService'];\r\n function cfsExceptionController($scope, $window, $location,$stateParams, $mdDialog, $mdMedia, $mdToast, $q, $http,$state, api, UserManagementService, lensviewUsersPopupService, $rootScope,\r\n UserService, $filter,ngTableEventsChannel,NgTableParams,lensviewService,CfsExceptionService){\r\n\r\n\t var vm = this;\r\n //vm.readAccess = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n\r\n try{\r\n //vm.readAccess = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n\t\t\tif(JSON.parse(localStorage.getItem(\"user\")).permissions.cww.Company.includes('read') || \r\n\t\t\t\t\tJSON.parse(localStorage.getItem(\"user\")).permissions.csl.Company.includes('read') || \r\n\t\t\t\t\tJSON.parse(localStorage.getItem(\"user\")).permissions.cfs.Company.includes('read') || \r\n JSON.parse(localStorage.getItem(\"user\")).permissions.cmts.Company.includes('read')){\r\n vm.readAccess = true;\r\n }else{\r\n vm.readAccess = false;\r\n }\r\n }\r\n catch(e){\r\n vm.readAccess = false;\r\n }\r\n\r\n //// console.log($state.current.name);\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n if(vm.readAccess){\r\n\t \tvm.columns = [\t\t \t\t \r\n\t\t {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"user_status\", \"title\": 'STATUS', \"sortable\": \"user_status\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"approver_level\", \"title\": 'APPROVER LEVEL', \"sortable\": \"approver_level\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\t \r\n\t\t ];\r\n\t }\r\n\t if(!vm.readAccess){\r\n\t \tvm.columns = [\r\n\t\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t\t {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"user_status\", \"title\": 'STATUS', \"sortable\": \"user_status\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\": \"approver_level\", \"title\": 'APPROVER LEVEL', \"sortable\": \"approver_level\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t\t {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false} \r\n\t\t ];\r\n\t }\r\n\r\n\t if(vm.readAccess){\r\n\t\t vm.buttons = [\t\t \r\n\t\t {id: 1, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t\t ];\r\n\t\t}\r\n\t\tif(!vm.readAccess){\r\n\t\t\tvm.buttons = [\r\n\t\t {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t\t {id: 1, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t\t ];\r\n\t\t}\r\n \r\n\r\n } \r\n\r\n\t\tvm.link = {field: \"id\", column: \"name\", url: \"users\"};\r\n\t\tvm.icon=\"\" \r\n\t\tvm.lensviewtable = true;\r\n\t\tvm.getList = [];\r\n\t\tvm.getLink = getLink;\r\n\t\tvm.getTable = getTable;\r\n\t\tvm.getField = getField;\r\n\t\tvm.getClass = getClass;\r\n\t\tvm.checkAll = checkAll;\r\n\t\tvm.clearAll = clearAll;\r\n\t\tvm.searchflag = false; \r\n\t\tvm.exception = CfsExceptionService.getExceptionObject();\r\n\t\tvm.addExceptions = addExceptions; \r\n\t\tvm.cancel = cancel; \r\n\t\tvm.gotoSelectUser = gotoSelectUser;\r\n\t\tvm.selectUser = selectUser;\r\n\t\tvm.selected = selected;\r\n\t\tvm.shiftSelect = shiftSelect;\r\n\t\tvm.resetSelected = resetSelected;\r\n\t\tvm.bulkDelete = bulkDelete;\r\n\t\tvm.showModal = showModal;\r\n\t\tvm.closeModal = closeModal;\r\n\t\tvm.getSelectedCount = getSelectedCount;\r\n\t\tvm.listSelectedCount = 0;\r\n\t\tvm.selectAll = false;\r\n\t\tvm.searchListData = search_exceptions;\r\n\t\tvm.loadLensUsersFlag = true;\r\n\r\n if($state.current.name =='showCompany'){\r\n\t vm.viewUserText = true;\r\n\t} \r\n\r\n\r\n vm.globals={};\r\n vm.globals.tableParams1 = new NgTableParams({}, {\r\n debugId: \"Table 1\",\r\n dataset: []\r\n });\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n\t vm.showAllClientExceptionOrg = [];\r\n\t vm.currentPage = 0;\r\n\t vm.showAllClientExceptionFlag = false; \r\n\r\n \tvm.addAllClientRow = addAllClientRow; \r\n function subscribeToTable(tableParams){\r\n\r\n if($state.current.name =='showCompany')\r\n \t\t vm.showAllClientExceptionFlag = false;\r\n \tif (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n \t angular.forEach(p2,function(v,k){\r\n \t\t if(v.current)\r\n \t\t\tvm.currentPage = v.number;\r\n \t });\r\n \t if(vm.currentPage<=1){\r\n \t angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n \t vm.showAllClientException= []; \r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.approver_level ==\"all_clients_approver\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n \r\n if($state.current.name == 'showCompany'){\r\n\r\n \t$scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = CfsExceptionService.getExceptions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n \t});\r\n\t\t} \r\n\r\n function getSelectedCount() { \r\n\r\n \t return vm.listSelectedCount;\r\n }\r\n\r\n\t function addExceptions(ev){\r\n\r\n\t var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\t $mdDialog.show({\r\n\t templateUrl: '/app/admin/lensview/cfs_exceptions/add-cfs-exception.html',\r\n\t parent: angular.element(document.body),\r\n\r\n\t targetEvent: ev,\r\n\t clickOutsideToClose:true,\r\n\t fullscreen: useFullScreen\r\n\t })\r\n\t .then(function(answer) {\r\n\r\n\t }, function() {\r\n\r\n\t });\r\n\r\n\t } \r\n \r\n\t function search_exceptions(isClear){\r\n\t \tvm.searchflag = !vm.searchflag;\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search);\r\n\t CfsExceptionService.setQuery(search);\r\n\t } \r\n\r\n function getTable(){\r\n\t\t\tif($state.current.name =='showCompany'){\r\n\t\t \t\tvm.showAllClientExceptionFlag = false;\r\n\t\t\t }\r\n\t\t else{\r\n\t\t \t vm.showAllClientExceptionFlag = true;\r\n\t\t }\r\n\t vm.exceptionTable = CfsExceptionService.getExceptionTable();\r\n\t //vm.exceptionTable.data = vm.addAllClientRow(vm.getList, $state.current.name);\r\n return vm.exceptionTable; \r\n\t }\r\n\r\n\t function addAllClientRow(getList,state){\r\n\r\n\t \t/*angular.forEach(vm.exceptionTable.data, function(v,k){\r\n \tif(v.approver_level==='all_clients_approver'){ \r\n var oldData =vm.exceptionTable.data[k];\r\n var newData = vm.exceptionTable.data[k];\r\n vm.exceptionTable.data[k] = oldData;\r\n \tvm.showAllClientException= [];\r\n \tvm.showAllClientException.push(vm.exceptionTable.data[k]); \r\n \tvm.showAllClientExceptionOrg =[];\r\n \tvm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]);\r\n\r\n \tif(state=='showCompany'){\r\n vm.showAllClientException.push(\"\");\r\n vm.showAllClientExceptionOrg.push(\"\");\r\n }\r\n \r\n } \r\n\r\n });\r\n if(vm.currentPage<=1){\r\n \t angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n \t vm.showAllClientException= []; \r\n }\r\n return vm.exceptionTable.data;*/ \r\n\r\n \t\tvm.exceptionTable.data = getList;\r\n \t\tvm.showAllClientException= [];\r\n \t\tvm.showAllClientExceptionOrg =[];\r\n \r\n \t for(var i=0; i0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n \t //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n \t if($state.current.name == 'showCompany'){\r\n \t\t angular.forEach(vm.exceptionTable.data, function(v,k){\r\n \t\t\t if(v.approver_level=='all_clients_approver'){\r\n \t\t\t\t vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n \t\t });\r\n \t }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n \tvm.listSelectedCount = 0;\r\n \t}\r\n\r\n\r\n\t function clearAll(){\r\n\r\n search_deptlens_criteria(true);\r\n\t\t\t\tCfsExceptionService.getUsers('lens_group');\r\n\t }\r\n\r\n\t function cancel() {\r\n\t $mdDialog.cancel(); \r\n\t }\r\n \r\n\r\n\t function gotoSelectUser(ev,data){\r\n\r\n var lensGroupId = data; \r\n $location.url(\"/users/\"+data.id);\r\n\r\n }\r\n\r\n\t function selected(index){ \r\n \tvm.lastSelected = index;\r\n \tif (vm.exceptionTable.data.length){\r\n \t vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n \t}\r\n \t}\r\n\r\n \tfunction shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n \t}\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.approver_level!=\"all_clients_approver\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].approver_level==\"all_clients_approver\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n function bulkDelete(){\r\n\t \tvm.listSelectedCount = 0;\r\n\t \tvm.selectAll = false;\r\n\t \t$mdDialog.cancel(); \r\n\r\n\t \tvar params = {};\r\n\t\t\tparams.approver_ids = CfsExceptionService.getSelectedException().map(function(exception){return exception.id;});\r\n\t\t\tparams.customer_type = 'cfs'\r\n\t CfsExceptionService.bulkDeleteExceptions(params).then(function(res){\r\n\t if (!res.errors){\r\n\t vm.closeModal(); \r\n\t showToastWithFile('cfs-delete-exception.success.html', ''); \r\n\t setTimeout(function(){ \r\n\t\t $state.reload();\t\t \r\n\t\t },2500);\r\n\t } else {\r\n\t vm.closeModal(); \r\n\t }\r\n\t }); \r\n\r\n\t} \r\n\r\n\r\n function showModal(ev, modal){\r\n\t /* Show the modal */\r\n\t var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\t $mdDialog.show({\r\n\t templateUrl: '/app/admin/lensview/modals/cfs-'+ modal + '.modal.html',\r\n\t parent: angular.element(document.body),\r\n\t targetEvent: ev,\r\n\t clickOutsideToClose:true,\r\n\t fullscreen: useFullScreen,\r\n\t scope: $scope,\r\n\t preserveScope: true\r\n\t });\r\n\t } \r\n\r\n function closeModal(){\r\n $mdDialog.cancel();\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('util.router', [\r\n 'ui.router'\r\n //'blocks.logger'\r\n ]);\r\n})();\n/* Help configure the state-base ui.router */\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('util.router')\r\n .provider('routerHelper', routerHelperProvider);\r\n\r\n routerHelperProvider.$inject = ['$locationProvider', '$stateProvider', '$urlRouterProvider', '$windowProvider'];\r\n /* @ngInject */\r\n function routerHelperProvider($locationProvider, $stateProvider, $urlRouterProvider, $windowProvider) {\r\n /* jshint validthis:true */\r\n var $window = $windowProvider.$get(),\r\n config = {\r\n docTitle: undefined,\r\n resolveAlways: {}\r\n };\r\n\r\n if (!($window.history && $window.history.pushState)) {\r\n $window.location.hash = '/';\r\n }\r\n\r\n this.configure = function(cfg) {\r\n angular.extend(config, cfg);\r\n };\r\n\r\n this.$get = ['$location', '$rootScope', '$state', '$document', 'logger', RouterHelper];\r\n RouterHelper.$inject = ['$location', '$rootScope', '$state', '$document', 'logger'];\r\n /* @ngInject */\r\n function RouterHelper($location, $rootScope, $state, $document, logger) {\r\n var handlingStateChangeError = false;\r\n var hasOtherwise = false;\r\n var stateCounts = {\r\n errors: 0,\r\n changes: 0\r\n };\r\n\r\n var service = {\r\n configureStates: configureStates,\r\n getStates: getStates,\r\n stateCounts: stateCounts\r\n };\r\n\r\n init();\r\n\r\n return service;\r\n\r\n ///////////////\r\n\r\n function configureStates(states, otherwisePath) {\r\n states.forEach(function(state) {\r\n state.config.resolve =\r\n angular.extend(state.config.resolve || {}, config.resolveAlways);\r\n $stateProvider.state(state.state, state.config);\r\n });\r\n if (otherwisePath && !hasOtherwise) {\r\n hasOtherwise = true;\r\n $urlRouterProvider.otherwise(otherwisePath);\r\n }\r\n }\r\n\r\n function handleRoutingErrors() {\r\n // Route cancellation:\r\n // On routing error, go to the dashboard.\r\n // Provide an exit clause if it tries to do it twice.\r\n $rootScope.$on('$stateChangeError',\r\n function(event, toState, toParams, fromState, fromParams, error) {\r\n if (handlingStateChangeError) {\r\n return;\r\n }\r\n stateCounts.errors++;\r\n handlingStateChangeError = true;\r\n var destination = (toState &&\r\n (toState.title || toState.name || toState.loadedTemplateUrl)) ||\r\n 'unknown target';\r\n var msg = 'Error routing to ' + destination + '. ' +\r\n (error.data || '') + '.
' + (error.statusText || '') +\r\n ': ' + (error.status || '');\r\n logger.warning(msg, [toState]);\r\n $location.path('/');\r\n }\r\n );\r\n }\r\n\r\n function init() {\r\n handleRoutingErrors();\r\n updateDocTitle();\r\n }\r\n\r\n function getStates() { return $state.get(); }\r\n\r\n function updateDocTitle() {\r\n $rootScope.$on('$stateChangeSuccess',\r\n function(event, toState, toParams, fromState, fromParams) {\r\n stateCounts.changes++;\r\n handlingStateChangeError = false;\r\n var title = (toState.title || '') + ' | ' + config.docTitle;\r\n $rootScope.title = title; // data bind to \r\n $document[0].title = title;\r\n }\r\n );\r\n }\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('util.logger', []);\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('util.logger')\r\n .factory('logger', logger);\r\n\r\n logger.$inject = ['$log', 'toastr'];\r\n\r\n /* @ngInject */\r\n function logger($log, toastr) {\r\n var service = {\r\n showToasts: true,\r\n\r\n error: error,\r\n info: info,\r\n success: success,\r\n warning: warning,\r\n\r\n // straight to console; bypass toastr\r\n log: $log.log\r\n };\r\n\r\n return service;\r\n /////////////////////\r\n\r\n function error(message, data, title) {\r\n toastr.error(message, title);\r\n $log.error('Error: ' + message, data);\r\n }\r\n\r\n function info(message, data, title) {\r\n toastr.info(message, title);\r\n $log.info('Info: ' + message, data);\r\n }\r\n\r\n function success(message, data, title) {\r\n toastr.success(message, title);\r\n $log.info('Success: ' + message, data);\r\n }\r\n\r\n function warning(message, data, title) {\r\n toastr.warning(message, title);\r\n $log.warn('Warning: ' + message, data);\r\n }\r\n }\r\n} ());\r\n\n/**\r\n * @ngdoc module\r\n * @name TrackTraceCslService\r\n *\r\n * @description The TrackTraceCslService module communciates with the Rails API to\r\n * procure search data on shipments to the user.\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslService.isCollapsed\r\n * @description method that queries whether collapisble exceptions component is\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslService.setCollapsed\r\n * @description method that sets the collapsibility of the above component\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslService.getShipments\r\n * @description method that returns the last query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslService.getPotentialExceptions\r\n * @description method that returns a list of potential exceptions\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslService.queryShipments\r\n * @params {query}\r\n * @description method that returns a complicated json object containing shipments\r\n * and pagination information\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslService.isNoResults\r\n * @decription returns true or false depending on if the shipment query has results\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslService.getShipTotal\r\n * @decription returns total number of shipments returned from the query\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('TrackTraceCslService', TrackTraceCslService);\r\n\r\n /** @ngInject */\r\n TrackTraceCslService.$inject = ['$http', '$location', '$log', 'api', '$rootScope', '$q', '$timeout', 'AJAX', '$filter'];\r\n function TrackTraceCslService($http, $location, $log, api, $rootScope, $q, $timeout, AJAX, $filter) {\r\n var shipments = [{'shippercountry': 'United States', 'servicetype': '', 'shipdate': '11-AUG-08', 'consigneeaddress4': '', 'shipperaddress1': '1234 MAIN', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': '1234 MAIN', 'consigneeaddress2': '', 'consigneeaddress3': '', 'jobunid': '100', 'departuredate': '', 'shipperzipcode': '30033', 'shippername': 'TEST customer', 'customername': 'TEST customer', 'bookingnumber': '', 'consigneezipcode': '30033', 'consigneename': 'TEST customer', 'servicetypecode': '', 'gshpid': 'G0000000000000000094', 'shipperpartyid': 'TESTCUSTOM', 'awb': 'H00030', 'origin': 'Dallas Ft. Worth', 'destination': '', 'totalchargeableweight': '', 'consigneepartyid': 'TESTCUSTOM', 'businesstype': 'Air Export', 'consigneecity': 'Atlanta', 'totalgrossweight': '', 'consigneecountry': 'United States', 'customergroup': '', 'totalpieces': '', 'duedate': '', 'shippercity': 'Atlanta', 'servicelevelcode': '', 'customerpartyid': 'TESTCUSTOM', 'servicelevel': ''}, {'shippercountry': 'United States', 'servicetype': 'Door To Door', 'shipdate': '22-AUG-08', 'consigneeaddress4': '', 'shipperaddress1': '5401 S 39th Street, #1', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': 'for onforwarding with DHX', 'consigneeaddress2': 'to Cameula, Hawaii 96743', 'consigneeaddress3': '', 'jobunid': '388', 'departuredate': '21-AUG-08', 'shipperzipcode': '85040', 'shippername': 'Ozone Water Systems', 'customername': 'DCI Logistics, Inc.', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': '', 'servicetypeCODE': 'DTD', 'gshpid': 'G0000000000000000352', 'shipperpartyid': 'OZON540ATL', 'awb': 'AATL0808000001', 'origin': 'Phoenix', 'destination': 'Honolulu', 'totalchargeableweight': '263', 'consigneepartyid': '', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '260', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '1', 'duedate': '05-SEP-08', 'shippercity': 'Phoenix', 'servicelevelCODE': 'DEFR', 'customerpartyid': 'DCIL608ATL', 'servicelevel': 'Deferred Service'}, {'shipperCOUNTRY': '', 'servicetype': 'Door To Door', 'shipdate': '15-AUG-08', 'consigneeaddress4': '', 'shipperaddress1': '', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': '', 'consigneeaddress2': '', 'consigneeaddress3': '', 'jobunid': '353', 'departuredate': '15-AUG-08', 'shipperzipcode': '', 'shippername': 'Dell Dallas DC', 'customername': 'Dell Dallas DC', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': 'Test One', 'servicetypeCODE': 'DTD', 'gshpid': 'G0000000000000000320', 'shipperpartyid': 'DELL321DFW', 'awb': 'H00055', 'origin': 'Dallas Ft. Worth', 'destination': 'Phoenix', 'totalchargeableweight': '55', 'consigneepartyid': 'TEST123PHX', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '55', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '10', 'duedate': '21-AUG-08', 'shippercity': '', 'servicelevelCODE': 'ECO', 'customerpartyid': 'DELL321DFW', 'servicelevel': 'Economy Service'}, {'shipperCOUNTRY': 'United States', 'servicetype': 'Door To Port', 'shipdate': '04-SEP-08', 'consigneeaddress4': 'United Kingdom', 'shipperaddress1': '10805 Painter Avenue', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': 'PTF No. 7 Gate', 'consigneeaddress2': 'Wilmore Road', 'consigneeaddress3': 'Derby, England DE248BJ', 'jobunid': '383', 'departuredate': '10-SEP-08', 'shipperzipcode': '90670', 'shippername': 'Advanced Ground Systems Engineering', 'customername': 'MCH Transportation LLC', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': '', 'servicetypeCODE': 'DTP', 'gshpid': 'G0000000000000000347', 'shipperpartyid': 'ADVA108ATL', 'awb': '172 70503016', 'origin': 'Atlanta', 'destination': 'East Midlands', 'totalchargeableweight': '2858', 'consigneepartyid': '', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '2858', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '1', 'duedate': '13-SEP-08', 'shippercity': 'Santa Fe Springs', 'servicelevelCODE': 'IECO', 'customerpartyid': 'MCHT577ATL', 'servicelevel': 'International Economy Service'}, {'shipperCOUNTRY': 'United States', 'servicetype': '', 'shipdate': '05-SEP-08', 'consigneeaddress4': 'United Kingdom', 'shipperaddress1': '10805 Painter Avenue', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': 'PTF No. 7 Gate', 'consigneeaddress2': 'Wilmore Road', 'consigneeaddress3': 'Derby, England DE248BJ', 'jobunid': '386', 'departuredate': '10-SEP-08', 'shipperzipcode': '90670', 'shippername': 'Advanced Ground Systems Engineering', 'customername': 'MCH Transportation LLC', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': '', 'servicetypeCODE': '', 'gshpid': 'G0000000000000000350', 'shipperpartyid': 'ADVA108ATL', 'awb': '172 70503020', 'origin': 'Houston', 'destination': 'East Midlands', 'totalchargeableweight': '2858', 'consigneepartyid': '', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '2858', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '1', 'duedate': '12-SEP-08', 'shippercity': 'Santa Fe Springs', 'servicelevelCODE': '', 'customerpartyid': 'MCHT577ATL', 'servicelevel': ''}];\r\n var globalSearchData = [];\r\n\r\n var blankData = {\r\n shipments: [],\r\n total: 0,\r\n service_level_codes: [],\r\n reason_codes: [],\r\n search_params: [],\r\n business_type_codes: [],\r\n active: [],\r\n exceptions: [],\r\n potential: [],\r\n active_count: 0,\r\n results_count: 0,\r\n results_filtered: false,\r\n exception_count: 0,\r\n potential_exception_count: 0\r\n };\r\n\r\n var queryState = {\r\n displayNoResults: true,\r\n isFilterLoading: {\r\n active: false,\r\n exception: false,\r\n potential: false\r\n }\r\n };\r\n\r\n var data = angular.copy(blankData),\r\n activeTimeoutPromise = false;\r\n var pins = [];\r\n var collapsed = true, noResults = false;\r\n\r\n var totalShipments = 0;\r\n\r\n var page = 1;\r\n\r\n var potentialExceptions = [\r\n {\r\n name: \"Tidal Wave\",\r\n lat: 30.194444,\r\n long: -97.67,\r\n },\r\n {\r\n name: \"Hurricane\",\r\n lat: 40.639722,\r\n long: -122.375,\r\n },\r\n {\r\n name: \"Godzilla\",\r\n lat: 39.861667,\r\n long: -80.290556,\r\n }\r\n ];\r\n\r\n function processPins(pinData){\r\n pins.length = 0;\r\n pinData.map(function(d){\r\n d.geocodes.map(function(datum){\r\n datum.type = d.geotype;\r\n pins.push(datum);\r\n });\r\n });\r\n }\r\n\r\n function queryShipments(query, timeoutPromise, sort_params){\r\n var timeoutTid = false;\r\n // TODO: come up with something that will make it not fire multiple requests, but also not trigger the timeout messages\r\n // if (activeTimeoutPromise) activeTimeoutPromise.resolve('newSearch');\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n activeTimeoutPromise = timeoutPromise;\r\n // $log.debug(query);\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+encodeURIComponent(localStorage.switchEmail);\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompany);\r\n // }\r\n\r\n if(localStorage.customerType == 'csl'){\r\n\r\n if(localStorage.switchEmailCslType){\r\n params +=\"?userEmail=\"+encodeURIComponent(localStorage.switchEmailCslType)+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCsl){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=csl\";\r\n }\r\n\r\n var new_parameters = \"\";\r\n var new_query = \"\";\r\n\r\n for (var key in query) {\r\n if (query.hasOwnProperty(key)) {\r\n //new_query = new_query+'&'+key=query[key];\r\n if(key != ''){\r\n new_query = new_query+'&'+key+'='+encodeURIComponent(query[key]);\r\n }\r\n\r\n }\r\n }\r\n\r\n /*for (var key in sort_params) {\r\n //new_query = new_query+'&'+key=query[key];\r\n if(key != ''){\r\n new_query = new_query+'&'+key+'='+encodeURIComponent(sort_params[key]);\r\n }\r\n }*/\r\n\r\n //$location.search(query);\r\n // Base64 encode - btoa();\r\n if(params){\r\n params = params+new_query;\r\n } else{\r\n new_query = new_query.substring(1);\r\n params = '?'+new_query;\r\n }\r\n\r\n var promise = $http.get(api.url_v2 + '/csl/search'+params, query, {timeout:timeoutPromise.promise}).then(function(res){\r\n\r\n page = query.page ? query.page : 1;\r\n //data.total = res.headers().total;\r\n noResults = res.data.loads.length == 0;\r\n queryState.displayNoResults = noResults;\r\n data.error = null;\r\n data.isTimeout = false;\r\n data.shipments.total = 0;\r\n data.potential_exception_count = 0;\r\n data.exception_count = res.data.exception_count;\r\n data.active_count = res.data.active_count;\r\n data.unfiltered_counts = res.data.unfiltered_counts;\r\n data.shipments = res.data.loads;\r\n data.total = res.data.total;\r\n data.per_page = res.data.per_page;\r\n data.page = res.data.page;\r\n\r\n\r\n data.shipments = data.shipments.map(function(d){\r\n var s = d;\r\n\r\n if (s.flags) {\r\n if (s.flags.indexOf('current_exception') !== -1) s.flag = 'current_exception';\r\n else if (s.flags.indexOf('potential_exception') !== -1) s.flag = 'potential_exception';\r\n }\r\n if (!s.jobno){\r\n\r\n s.isdelivered = 'booking';\r\n }\r\n\r\n //To display last check call date/time location\r\n var lastcheckcall_date = (s.lastcheckcalldate)?$filter(\"date\")(s.lastcheckcalldate, 'dd-MMM-yyyy'):'';\r\n var lastcheckcall_time = (s.lastcheckcalltime)? '/ '+$filter(\"date\")(s.lastcheckcalltime, 'hh:mm'):'';\r\n var lastcheckcall_location = (s.lastcheckcalllocation)?(' <br> '+ s.lastcheckcalllocation):'';\r\n var lastcheckcall_state = (s.lastcheckcallstate)?', '+s.lastcheckcallstate:'';\r\n\r\n s.lastcheckcalldetails_new = (s.lastcheckcalldetails);\r\n\r\n //To display delivery DATE / TIME\r\n var delivery_date = (s.deliverydate)?$filter(\"date\")(s.deliverydate, 'dd-MMM-yyyy'):'';\r\n var delivery_time = (s.deliverytime)?$filter(\"date\")(s.deliverytime, 'hh:mm'):'';\r\n\r\n s.deliverydatetime_new = delivery_date+\"\\n \"+delivery_time;\r\n\r\n //To display pickup APPT. DATE / TIME\r\n var pickup_appt_date = (s.pickupapptdate)?$filter(\"date\")(s.pickupapptdate, 'dd-MMM-yyyy'):'';\r\n var pickup_appt_time = (s.pickupappttime)?$filter(\"date\")(s.pickupappttime, 'hh:mm'):'';\r\n\r\n s.pickupappointmentdatetime_new = pickup_appt_date+' <br> '+pickup_appt_time;\r\n\r\n // To display delivery Appt date/time\r\n var deliveryAppt_date = (s.consigneeapptdate)?$filter(\"date\")(s.consigneeapptdate, 'dd-MMM-yyyy'):'';\r\n var deliveryAppt_time = (s.consigneeappttime)? ' '+$filter(\"date\")(s.consigneeappttime, 'hh:mm'):'';\r\n\r\n s.consigneeapptdatetime_new = (deliveryAppt_date+' <br> '+deliveryAppt_time);\r\n\r\n\r\n return s;\r\n });\r\n $log.debug(data);\r\n\r\n return data;\r\n }, function(e){\r\n\r\n return $q.reject(e);\r\n\r\n }).catch(function(res){\r\n\r\n if(res.config.timeout.$$state || res.config.timeout.$$state != null || res.config.timeout.$$state != undefined) {\r\n if(res.config.timeout.$$state.value != 'newSearch') {\r\n data = angular.copy(blankData);\r\n pins.length = 0;\r\n data.error = res.data ? (res.data.error ? res.data.error : null ): \"TRACKTRACE.TIMEOUT\";\r\n data.total = 0;\r\n page = 1;\r\n noResults = true;\r\n }\r\n }\r\n\r\n if ([422, 500, 503].includes(res.status)){\r\n return res\r\n }\r\n else {\r\n return new Error(\"Boom\");\r\n }\r\n }).finally(function() {\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n timeoutPromise = false;\r\n activeTimeoutPromise = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (timeoutPromise) timeoutPromise.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n\r\n }\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/cfs_csl_city_state_autocomplete', query).then(function(response){\r\n /*var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });*/\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n return {\r\n isNoResults: function(){\r\n return noResults;\r\n },\r\n isCollapsed: function(){\r\n return collapsed;\r\n },\r\n setCollapsed: function(collapse){\r\n collapsed = collapse;\r\n },\r\n getShipments: function(){\r\n return data;\r\n },\r\n getPotentialExceptions: function(){\r\n return potentialExceptions;\r\n },\r\n setGlobalSearchData: function(data) {/*Added by Abheesh*/\r\n globalSearchData = data;\r\n },\r\n getGlobalSearchData: function() {/*Added by Abheesh*/\r\n return globalSearchData;\r\n },\r\n getShipTotal: function(){\r\n return totalShipments;\r\n },\r\n setResultsCount: function(num) {\r\n data.results_count = num;\r\n },\r\n setResultsFiltered: function(bool) {\r\n data.results_filtered = bool;\r\n },\r\n getQueryState: function() {return queryState;},\r\n\r\n queryShipments: queryShipments,\r\n\r\n getPins: function(){\r\n return pins;\r\n },\r\n getStatusOptions:function(){\r\n\r\n var url = api.url_v2+\"/csl/status_options\";\r\n\r\n var dfd = $q.defer();\r\n $http.get(url).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n },\r\n autoComplete:autoComplete\r\n };\r\n }\r\n\r\n})();\r\n\r\n// 'servicetype': '',\r\n// 'shipdate': '11-AUG-08',\r\n// 'consigneeaddress4': '',\r\n// 'shipperaddress1': '1234 MAIN',\r\n// 'shipperaddress2': '',\r\n// 'shipperaddress3': '',\r\n// 'shipperaddress4': '',\r\n// 'consigneeaddress1': '1234 MAIN',\r\n// 'consigneeaddress2': '',\r\n// 'consigneeaddress3': '',\r\n// 'jobunid': '100',\r\n// 'departuredate': '',\r\n// 'shipperzipcode': '30033',\r\n// 'shippername': 'test customer',\r\n// 'customername': 'test customer',\r\n// 'bookingnumber': '',\r\n// 'consigneezipcode': '30033',\r\n// 'consigneename': 'test customer',\r\n// 'servicetypecode': '',\r\n// 'gshpid': 'g0000000000000000094',\r\n// 'shipperpartyid': 'testcustom',\r\n// 'awb': 'h00030',\r\n// 'origin': 'dallas ft. worth',\r\n// 'destination': '',\r\n// 'totalchargeableweight': '',\r\n// 'consigneepartyid': 'testcustom',\r\n// 'businesstype': 'air export',\r\n// 'consigneecity': 'atlanta',\r\n// 'totalgrossweight': '',\r\n// 'consigneecountry': 'united states',\r\n// 'customergroup': '',\r\n// 'totalpieces': '',\r\n// 'duedate': '',\r\n// 'shippercity': 'atlanta',\r\n// 'servicelevelcode': '',\r\n// 'customerpartyid': 'testcustom',\r\n// 'servicelevel': ''\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.showAdvSearch\r\n * @description to display the advanced search md-dialog\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.showCustomizeResults\r\n * @description to display the customize results md-dialog\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.selectRange\r\n * @description sets quick search fields to a preselected range of dates\r\n * @param {$event} - md-select ng-change triggered event\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.getActiveShipments\r\n * @description queries the database for shipments that are UNDELIVERED and active now\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.getShipments\r\n * @description gets the shipments from TrackTraceService\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.hideLoadAnimation\r\n * @description hides the load animation\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.quickSearch\r\n * @description makes the query for a quick search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.search\r\n * @description runs the search from AdvSearchCslService\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.showAdvSearch\r\n * @description shows the advance search modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.showCustomizeResults\r\n * @description shows the customize results modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.showLoadAnimation\r\n * @description shows the load animation\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.showNoShippmentsAlert\r\n * @description shows an alert when there is no shippents back from the query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCslController.toggleLimitOptions\r\n * @description toggles how many shipments are shown\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('TrackTraceCslController', TrackTraceCslController);\r\n\r\n /** @ngInject */\r\n TrackTraceCslController.$inject = ['$scope', 'mdSelectHelper', 'TrackTraceCslService','UserService', 'CustomResultsCslService', 'AdvSearchCslService', \"ServerTableCslService\", '$log', '$filter', '$translatePartialLoader', '$mdDialog', '$mdMedia', '$location', '$http', \"$stateParams\", '$q', '$translate', 'ContactsService', 'permissions', 'TrackTraceCslPaginationService'];\r\n function TrackTraceCslController($scope, mdSelectHelper, TrackTraceCslService, UserService, CustomResultsCslService, AdvSearchCslService, ServerTableCslService, $log, $filter ,$translatePartialLoader, $mdDialog, $mdMedia, $location, $http, $stateParams, $q, $translate, ContactsService, permissions, TrackTraceCslPaginationService) {\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('tracktrace');\r\n\r\n //variables\r\n var vm = this;\r\n vm.data;\r\n vm.loading = false; //flag to activate the loading screen\r\n vm.loadingState = ServerTableCslService.getState(); //flag to activate the module loading screen\r\n vm.aljex_due_start_date = null;\r\n vm.aljex_due_end_date = null;\r\n vm.ship_start_date = null;\r\n vm.ship_end_date = null;\r\n vm.aljex_estimated_start_date = null;\r\n vm.aljex_estimated_end_date = null;\r\n vm.isAwbBolQuickSearch = false;\r\n vm.quickFilters = [];\r\n vm.isFilteredOut = {active: false, potential: false, exception: false};\r\n vm.isFilterActive = {active: false, potential: false, exception: false}; // fricken angular..no why would I want to || something in a view?!\r\n //vm.isFilterLoading = {active: false, potential: false, exception: false};\r\n\r\n vm.queryState = TrackTraceCslService.getQueryState();\r\n //.isFilterLoading = TrackTraceService.getFilterLoading();\r\n vm.getMatch = getMatch;\r\n vm.queryVal = '';\r\n\r\n vm.statusOptionsVar = [];\r\n\r\n TrackTraceCslService.getStatusOptions().then(function(response){\r\n\r\n vm.statusOptionsVar = response;\r\n\r\n }).catch(function(error) {\r\n //debugger;\r\n });\r\n\r\n\r\n\r\n // Set initial search type to reference number\r\n //vm.aljexSearchType = 'reference';\r\n vm.aljexSearchType = 'shipment_status';\r\n vm.aljexDueDateRangeSelect = null;\r\n vm.consigneeDateRangeSelect = null;\r\n vm.pickupDateRangeSelect = null;\r\n vm.hasExportPermissions = UserService.canAccess(permissions.shipment.export);\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n vm.aljexMinDate = \"'\" + (moment().subtract(13, 'months').format('YYYY-MM-DD')) + \"'\";\r\n vm.filterLabels = {\r\n active: 'TRACKTRACE.FILTER',\r\n exception: 'TRACKTRACE.FILTER',\r\n potential: 'TRACKTRACE.FILTER',\r\n }\r\n\r\n // Quarter math\r\n var quarterAdjustment= (moment().month() % 3) + 1;\r\n var lastQuarterEndDate = moment().subtract({ months: quarterAdjustment }).endOf('month');\r\n var lastQuarterStartDate = lastQuarterEndDate.clone().subtract({ months: 2 }).startOf('month');\r\n\r\n // Set up predetermined ranges for user to select from\r\n vm.aljexRanges = [\r\n {\r\n name: 'Last Year',\r\n start: moment().subtract(1, 'y'),\r\n end: moment()\r\n },\r\n {\r\n name: 'Last Quarter',\r\n start: lastQuarterStartDate,\r\n end: lastQuarterEndDate\r\n },\r\n {\r\n name: 'Last Month',\r\n start: moment().subtract({ months: 1 }).startOf('month'),\r\n end: moment().subtract({ months: 1 }).endOf('month'),\r\n }\r\n ];\r\n\r\n // Functions\r\n vm.filter = filter;\r\n // vm.isFiltered = isFiltered;\r\n vm.getActiveShipments = getActiveShipments;\r\n vm.getShipment = getShipment;\r\n vm.getShipments = getShipments;\r\n vm.hideLoadAnimation = hideLoadAnimation;\r\n vm.quickSearch = quickSearch;\r\n // vm.search = search;\r\n vm.showCustomizeResults = showCustomizeResults;\r\n vm.showLoadAnimation = showLoadAnimation;\r\n vm.showNoShippmentsAlert = showNoShippmentsAlert;\r\n vm.toggleLimitOptions = toggleLimitOptions;\r\n vm.showExportCSV = showExportCSV;\r\n vm.selectRange = selectRange;\r\n vm.dateChanged = dateChanged;\r\n vm.visualize = visualize;\r\n vm.hardRefresh = hardRefresh;\r\n vm.refresh = function(){ServerTableCslService.reloadTable()};\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n vm.aljexSearchChange = aljexSearchChange;\r\n\r\n /* Run Setup services */\r\n vm.getShipments();\r\n AdvSearchCslService.getSearch();\r\n ContactsService.setSubjectStatuses({trackTrace: {exceptions: false, results: true}});\r\n\r\n /** Customize Results Call **/\r\n vm.customFullscreen = $mdMedia('xs') || $mdMedia('sm');\r\n\r\n var queries = $location.search();\r\n\r\n var page_number = 1;\r\n if(UserService.getUserTableSettings()){\r\n var per_page = UserService.getUserTableSettings();\r\n }else{\r\n var per_page = 10;\r\n }\r\n\r\n TrackTraceCslPaginationService.save_page_number(page_number);\r\n TrackTraceCslPaginationService.save_per_page(per_page);\r\n\r\n var searchParamsCount = 0;\r\n\r\n for(var test in queries){\r\n\r\n if(test){\r\n searchParamsCount += 1;\r\n }\r\n\r\n }\r\n\r\n queries.page = page_number;\r\n queries.per_page = per_page;\r\n\r\n var newParams = {};\r\n\r\n angular.forEach(queries, function(obj, key) {\r\n\r\n if(obj){\r\n newParams[key] = obj;\r\n }\r\n\r\n });\r\n\r\n if(searchParamsCount <= 0 ){\r\n\r\n var currentSearchFields = JSON.parse(AdvSearchCslService.getLastSearchLocally());\r\n\r\n if(currentSearchFields){\r\n\r\n angular.forEach(Object.keys(currentSearchFields), function(k) {\r\n\r\n if (currentSearchFields[k].value) {\r\n newParams[k] = currentSearchFields[k].value;\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n $location.search(newParams);\r\n\r\n\r\n // see if we have paramters in the toolbar\r\n var paramSearchFields = AdvSearchCslService.getEmptySearchFields(),\r\n foundParamSearch = false,\r\n disableUrlReplacement = false;\r\n angular.forEach(paramSearchFields, function(obj, key) {\r\n var v = $location.search()[key] || $location.search()[key + \"[]\"];\r\n\r\n if (v !== undefined) {\r\n\r\n foundParamSearch = true;\r\n if(key.includes('date')){\r\n //paramSearchFields[key].value = new Date(v);\r\n var findAndTextInDateRange = v.search(\"and\");\r\n\r\n if(findAndTextInDateRange == -1){\r\n //debugger;\r\n //paramSearchFields[key].value = v;\r\n\r\n var newV = new Date(v);\r\n newV = newV.toString().split(\" \");\r\n\r\n v = newV[1]+' '+newV[2]+' '+newV[3];\r\n\r\n paramSearchFields[key].value = v;\r\n\r\n\r\n }else{\r\n //debugger;\r\n paramSearchFields[key].value = v;\r\n }\r\n\r\n //paramSearchFields[key].value = v;\r\n } else {\r\n //For some reason when filtering by ?status=0 via the active shipments widgets\r\n // the param is not being set as part of the search params\r\n paramSearchFields[key].value = v === 0 ? v.toString() : v;\r\n }\r\n }\r\n\r\n });\r\n if ($stateParams.potential){\r\n var searchFields = AdvSearchCslService.getEmptySearchFields();\r\n searchFields.potential_exception_id.value = $stateParams.potential;\r\n AdvSearchCslService.setCurrentSearchFields(searchFields);\r\n }\r\n\r\n if (foundParamSearch || $stateParams.potential) {\r\n disableUrlReplacement = true;\r\n AdvSearchCslService.setCurrentSearchFields(paramSearchFields, true);\r\n if ($location.search()['current_exception']) {\r\n filter('exception', true);\r\n }\r\n else if ($location.search()['potential_exception']){\r\n filter('potential', true);\r\n }\r\n // else {\r\n // vm.search({});\r\n // }\r\n disableUrlReplacement = false;\r\n }\r\n // no URLsearch parameters\r\n else {\r\n //load the default search if there is one\r\n AdvSearchCslService.listSavedSearches().then(function(res){\r\n var isSavedSearch = res['data'].length > 0;\r\n // var searchFields = JSON.parse(localStorage.getItem(\"query\"));\r\n // AdvSearchCslService.setCurrentSearchFields(searchFields);\r\n if( AdvSearchCslService.getIsFirstSearch() && isSavedSearch) { //if there is a default search\r\n AdvSearchCslService.loadSearch((res['data'])['0'].id).then(function(res) {\r\n var searchFields = AdvSearchCslService.getCurrentSearchFields();\r\n var data = res['data'];\r\n for (var field in searchFields) {\r\n if(data[field] != null) searchFields[field].value = data[field];\r\n }\r\n AdvSearchCslService.setCurrentSearchFields(searchFields);\r\n // vm.search({});\r\n AdvSearchCslService.setIsFirstSearch(false); //Not the first search anymore\r\n });\r\n } else if(AdvSearchCslService.getLastSearchLocally()) { //run the last saved search\r\n\r\n AdvSearchCslService.setCurrentSearchFields(JSON.parse(AdvSearchCslService.getLastSearchLocally()));\r\n setFilterButtons(); //sets the top filter buttons if there is one in the searchFields\r\n } else { //else run the normal search\r\n // vm.search({});\r\n setFilterButtons(); //sets the top filter buttons if there is one in the searchFields\r\n }\r\n });\r\n }\r\n\r\n function aljexSearchChange(searchType){\r\n\r\n vm.searchDestinationText = '';\r\n vm.searchOriginText = '';\r\n vm.queryVal = '';\r\n\r\n //consignee date\r\n vm.consigneeapptdateRangeIsSelected = false;\r\n vm.consigneeDateRangeSelect = null;\r\n vm.consigneeapptdate_start_date = null;\r\n vm.consigneeapptdate_end_date = null;\r\n vm.consigneeapptdate_start_date_new = null;\r\n vm.consigneeapptdate_end_date_new = null;\r\n\r\n //delivery date\r\n vm.deliverydateRangeIsSelected = false;\r\n vm.deliveryDateRangeSelect = null;\r\n vm.deliverydate_start_date = null;\r\n vm.deliverydate_end_date = null;\r\n vm.deliverydate_start_date_new = null;\r\n vm.deliverydate_end_date_new = null;\r\n\r\n //pickup appt date\r\n vm.pickupapptdateRangeIsSelected = false;\r\n vm.pickupDateRangeSelect = null;\r\n vm.pickupapptdate_start_date = null;\r\n vm.pickupapptdate_end_date = null;\r\n vm.pickupapptdate_start_date_new = null;\r\n vm.pickupapptdate_end_date_new = null;\r\n\r\n angular.element(document.querySelectorAll('.clear-fields')).val('');\r\n\r\n vm.aljexSearchType = searchType;\r\n }\r\n\r\n function getMatch(query){\r\n\r\n if(query != undefined && query != null){\r\n return TrackTraceCslService.autoComplete({value: query});\r\n }\r\n\r\n }\r\n\r\n function visualize() {\r\n $location.url($location.url().replace('track-trace', 'track-trace/viz'));\r\n }\r\n\r\n function hardRefresh(keyCodeString){\r\n var hardRefreshCodes = ['116-shiftKey', '82-metaKey-shiftKey', '116-ctrlKey'];\r\n\r\n // hard_refresh_codes.forEach(function(val){\r\n // var key_arr = val.split('-');\r\n // var key = key_arr.shift();\r\n // var modifiers_pressed = eval(key_arr.map(\r\n // function(val){return event[val]}).join(' & '));\r\n\r\n if (hardRefreshCodes.includes(keyCodeString)) {\r\n event.preventDefault();\r\n localStorage.setItem('invalidateCache', true);\r\n location.reload(true);\r\n\r\n }\r\n\r\n }\r\n\r\n function selectRange() {\r\n\r\n if (vm.aljexSearchType == 'consigneeapptdate') {\r\n vm.consigneeapptdateRangeIsSelected = true;\r\n // Reset other search values\r\n vm.pickupDateRangeSelect = null;\r\n vm.pickupapptdate_start_date = null;\r\n vm.pickupapptdate_end_date = null;\r\n vm.pickupapptdate_start_date_new = null;\r\n vm.pickupapptdate_end_date_new = null;\r\n vm.deliveryDateRangeSelect = null;\r\n vm.deliverydate_start_date = null;\r\n vm.deliverydate_end_date = null;\r\n vm.deliverydate_start_date_new = null;\r\n vm.deliverydate_end_date_new = null;\r\n\r\n var range = JSON.parse(vm.consigneeDateRangeSelect);\r\n\r\n vm.consigneeapptdate_start_date = new Date(range.start);\r\n vm.consigneeapptdate_end_date = new Date(range.end);\r\n\r\n vm.consigneeapptdate_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.consigneeapptdate_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n } else if (vm.aljexSearchType == 'pickupapptdate') {\r\n vm.pickupapptdateRangeIsSelected = true;\r\n // Reset other search values\r\n vm.consigneeDateRangeSelect = null;\r\n vm.consigneeapptdate_start_date = null;\r\n vm.consigneeapptdate_end_date = null;\r\n vm.consigneeapptdate_start_date_new = null;\r\n vm.consigneeapptdate_end_date_new = null;\r\n vm.deliveryDateRangeSelect = null;\r\n vm.deliverydate_start_date = null;\r\n vm.deliverydate_end_date = null;\r\n vm.deliverydate_start_date_new = null;\r\n vm.deliverydate_end_date_new = null;\r\n\r\n\r\n //vm.pickupDateRangeSelect = null;\r\n //vm.aljex_estimated_start_date = null;\r\n //vm.aljex_estimated_end_date = null;\r\n\r\n var range = JSON.parse(vm.pickupDateRangeSelect);\r\n\r\n vm.pickupapptdate_start_date = new Date(range.start);\r\n vm.pickupapptdate_end_date = new Date(range.end);\r\n\r\n vm.pickupapptdate_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.pickupapptdate_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n } else if(vm.aljexSearchType == 'deliverydate'){\r\n\r\n vm.pickupDateRangeSelect = null;\r\n vm.pickupapptdate_start_date = null;\r\n vm.pickupapptdate_end_date = null;\r\n vm.pickupapptdate_start_date_new = null;\r\n vm.pickupapptdate_end_date_new = null;\r\n vm.consigneeDateRangeSelect = null;\r\n vm.consigneeapptdate_start_date = null;\r\n vm.consigneeapptdate_end_date = null;\r\n vm.consigneeapptdate_start_date_new = null;\r\n vm.consigneeapptdate_end_date_new = null;\r\n\r\n vm.deliverydateRangeIsSelected = true;\r\n\r\n var range = JSON.parse(vm.deliveryDateRangeSelect);\r\n\r\n vm.deliverydate_start_date = new Date(range.start);\r\n vm.deliverydate_end_date = new Date(range.end);\r\n\r\n vm.deliverydate_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.deliverydate_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n }\r\n\r\n }\r\n\r\n function dateChanged() {\r\n\r\n vm.pickupDateRangeSelect = '';\r\n vm.pickupapptdateRangeIsSelected = false;\r\n vm.consigneeDateRangeSelect = '';\r\n vm.consigneeapptdateRangeIsSelected = false;\r\n vm.deliveryDateRangeSelect = '';\r\n vm.deliverydateRangeIsSelected = false;\r\n\r\n vm.pickupapptdate_start_date_new = '';\r\n vm.pickupapptdate_end_date_new = '';\r\n\r\n vm.consigneeapptdate_start_date_new = '';\r\n vm.consigneeapptdate_end_date_new = '';\r\n\r\n vm.deliverydate_start_date_new = '';\r\n vm.deliverydate_end_date_new = '';\r\n\r\n }\r\n\r\n function toggleLimitOptions() {\r\n vm.limitOptions = vm.limitOptions ? undefined : [10, 25, 50];\r\n }\r\n\r\n //function to display alert if there are now shipments form the search\r\n function showNoShippmentsAlert() {\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.querySelector('#popupContainer')))\r\n .clickOutsideToClose(true)\r\n .title('No shipment Results!')\r\n .textContent('Try a different search to get more results.')\r\n .ariaLabel('Alert Dialog Demo')\r\n .ok('Got it!')\r\n );\r\n }\r\n\r\n // function isFiltered(type) {\r\n // if (vm.quickFilters.length > 0) {\r\n // if (vm.quickFilters.indexOf(type) !== -1) {\r\n // return true;\r\n // } else {\r\n // return false;\r\n // }\r\n // } else {\r\n // return true;\r\n // }\r\n // }\r\n\r\n function filter(type, disableUrlReplacement){\r\n vm.quickFilters = [];\r\n var searchFields = angular.copy(AdvSearchCslService.getCurrentSearchFields());\r\n\r\n // only allow one filter at a time\r\n searchFields.quick_filter.value.length = 0;\r\n\r\n switch (type){\r\n case \"exception\":\r\n if (vm.filterLabels.exception == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('exception');\r\n searchFields.quick_filter.value.push(\"exception\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n }\r\n break;\r\n case \"potential\":\r\n if (vm.filterLabels.potential == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('potential');\r\n searchFields.quick_filter.value.push(\"potential\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n }\r\n break;\r\n case \"active\":\r\n if (vm.filterLabels.active == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('active');\r\n searchFields.quick_filter.value.push(\"active\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n // var index = searchFields.quick_filter.value.indexOf('active');\r\n // if(index > -1) {\r\n // searchFields.quick_filter.value.splice(index, 1);\r\n // }\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n vm.quickFilters = searchFields.quick_filter.value;\r\n AdvSearchCslService.setCurrentSearchFields(searchFields, disableUrlReplacement);\r\n vm.queryState.isFilterLoading[type] = true;\r\n }\r\n\r\n //sets the attributes of a filtered search\r\n function setFilterDisplayWithActiveFilter(filteredType) {\r\n var isActive = filteredType == 'active',\r\n isException = filteredType == 'exception',\r\n isPotentialException = filteredType == 'potential';\r\n\r\n vm.filterLabels.active = isActive ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n vm.filterLabels.exception = isException ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n vm.filterLabels.potential = isPotentialException ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n\r\n vm.isFilteredOut.active = !isActive && filteredType;\r\n vm.isFilteredOut.exception = !isException && filteredType;\r\n vm.isFilteredOut.potential = !isPotentialException && filteredType;\r\n\r\n vm.isFilterActive.active = isActive;\r\n vm.isFilterActive.exception = isException;\r\n vm.isFilterActive.potential = isPotentialException;\r\n }\r\n\r\n //sets the filter buttons on first time track and trace came in\r\n function setFilterButtons() {\r\n var searchFields = AdvSearchCslService.getCurrentSearchFields();\r\n searchFields.quick_filter.value.forEach(function(filterType) {\r\n setFilterDisplayWithActiveFilter(filterType);\r\n }, this);\r\n }\r\n\r\n function getActiveColumns(){\r\n return CustomResultsCslService.getActiveColumns();\r\n }\r\n\r\n function getShipments(){\r\n vm.data = TrackTraceCslService.getShipments();\r\n }\r\n\r\n function getActiveShipments(){\r\n var searchFields = angular.copy(AdvSearchCslService.getCurrentSearchFields());\r\n for (var field in searchFields) {\r\n searchFields[field].value = \"\"; //reset the fields\r\n }\r\n searchFields.status.value = \"1\"; //set the status for active shipments\r\n AdvSearchCslService.setCurrentSearchFields(searchFields);\r\n }\r\n\r\n function getShipment(shipment, event){\r\n if (event.button == 1) return; // ignore middle clicks\r\n if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'a') return; // ignore clicks on the links\r\n window.open(\"/shipping-details/\"+shipment.gshpid);\r\n }\r\n\r\n var searchTimeoutPromise = false;\r\n\r\n // function search(query){\r\n // // vm.queryState.showLoading = true;\r\n // // AdvSearchCslService.search(query, searchTimeoutPromise);\r\n\r\n // // if(vm.isAwbBolQuickSearch && result.length == 1) { //if only one shipment and searched with AWB/BOL redirect them to the details\r\n // // $location.url('/shipping-details/' + result[0].gshpid);\r\n // // vm.isAwbBolQuickSearch = false;\r\n // // }\r\n // }\r\n\r\n function quickSearch(query){\r\n\r\n var searchFields = angular.copy(AdvSearchCslService.getEmptySearchFields());\r\n\r\n /* */\r\n if(vm.pickupapptdate_start_date){\r\n vm.pickupapptdate_start_date_new = moment(vm.pickupapptdate_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.pickupapptdate_end_date){\r\n vm.pickupapptdate_end_date_new = moment(vm.pickupapptdate_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.consigneeapptdate_start_date){\r\n vm.consigneeapptdate_start_date_new = moment(vm.consigneeapptdate_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.consigneeapptdate_end_date){\r\n vm.consigneeapptdate_end_date_new = moment(vm.consigneeapptdate_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.deliverydate_start_date){\r\n vm.deliverydate_start_date_new = moment(vm.deliverydate_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.deliverydate_end_date){\r\n vm.deliverydate_end_date_new = moment(vm.deliverydate_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n\r\n\r\n\r\n if(vm.aljexSearchType == 'pickupapptdate') { //if its a due date add the inputs filtered to dates\r\n if (vm.pickupapptdate_start_date_new) {\r\n searchFields['pickupapptdate_from'].value = vm.pickupapptdate_start_date_new;\r\n }\r\n if (vm.pickupapptdate_end_date_new) {\r\n searchFields['pickupapptdate_to'].value = vm.pickupapptdate_end_date_new;\r\n }\r\n } else if(vm.aljexSearchType == 'consigneeapptdate') {\r\n if (vm.consigneeapptdate_start_date_new) {\r\n searchFields['consigneeapptdate_from'].value = vm.consigneeapptdate_start_date_new;\r\n }\r\n if (vm.consigneeapptdate_end_date_new) {\r\n searchFields['consigneeapptdate_to'].value = vm.consigneeapptdate_end_date_new;\r\n }\r\n }else if(vm.aljexSearchType == 'deliverydate') {\r\n if (vm.deliverydate_start_date_new) {\r\n searchFields['deliverydate_from'].value = vm.deliverydate_start_date_new;\r\n }\r\n if (vm.deliverydate_end_date_new) {\r\n searchFields['deliverydate_to'].value = vm.deliverydate_end_date_new;\r\n }\r\n }else if(vm.aljexSearchType == 'originstate'){\r\n searchFields['originstate'].value = vm.searchOriginText;\r\n }\r\n else if(vm.aljexSearchType == 'destinationstate'){\r\n searchFields['destinationstate'].value = vm.searchDestinationText;\r\n }\r\n else {\r\n searchFields[vm.aljexSearchType].value = query;\r\n }\r\n\r\n TrackTraceCslPaginationService.save_page_number(1);\r\n TrackTraceCslPaginationService.save_per_page(10);\r\n\r\n AdvSearchCslService.setCurrentSearchFields(searchFields);\r\n\r\n }\r\n\r\n function showExportCSV(ev){\r\n if (vm.queryState.displayNoResults) { return; }\r\n\r\n var params = ServerTableCslService.getParams();\r\n $scope.exportCsvLoaded = false;\r\n AdvSearchCslService.exportSearchFields([], params).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n }).catch(function() {\r\n $mdDialog.hide();\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n\r\n // Show the advanced search md-dialog\r\n function showCustomizeResults(ev) {\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/track-trace/track-trace-csl/customize-results/customize-results-csl.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n vm.status = 'You said the information was \"' + answer + '\".';\r\n }, function() {\r\n vm.status = 'You cancelled the dialog.';\r\n });\r\n }\r\n\r\n // shows the loading animation\r\n function showLoadAnimation() {\r\n vm.loading = true;\r\n }\r\n\r\n //hides the loading animation\r\n function hideLoadAnimation(ev) {\r\n vm.loading = false;\r\n }\r\n }\r\n})();\r\n\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('TrackTraceCslPaginationService', TrackTraceCslPaginationService);\r\n\r\n /** @ngInject */\r\n TrackTraceCslPaginationService.$inject = ['$http', '$log', 'api', '$q', '$timeout', 'AJAX', 'UserService' ];\r\n function TrackTraceCslPaginationService($http, $log, api, $q, $timeout , AJAX, UserService) { \t\r\n \t\r\n \tvar vm = this;\r\n\r\n \tvm.page_number = 1;\r\n\r\n \tif(UserService.getUserTableSettings()){\r\n vm.per_page = UserService.getUserTableSettings();\r\n }else{\r\n vm.per_page = 10;\r\n }\r\n\r\n\tfunction get_page_number(){\r\n\t\treturn parseInt(vm.page_number);\r\n\t}\r\n\r\n\tfunction get_per_page(){\r\n\t\treturn parseInt(vm.per_page);\r\n\t}\r\n\r\n\tfunction save_page_number(paginate){\t\t\r\n\t\tvm.page_number = paginate;\r\n\t\treturn true;\t\t\r\n\t}\r\n\r\n\tfunction save_per_page(paginate){\r\n\t\tvm.per_page = paginate;\r\n\t\tvm.page_number = 1;\r\n\t\treturn true;\r\n\t\t//$rootScope.page_number = $rootScope.page_number + 1;\r\n\t}\r\n\r\n\treturn{\r\n \t\tget_page_number: get_page_number,\r\n \t\tget_per_page: get_per_page,\r\n \t\tsave_page_number: save_page_number,\r\n \t\tsave_per_page: save_per_page\r\n \t}\r\n \r\n \r\n }\r\n\r\n})();\r\n\r\n// 'servicetype': '',\r\n// 'shipdate': '11-AUG-08',\r\n// 'consigneeaddress4': '',\r\n// 'shipperaddress1': '1234 MAIN',\r\n// 'shipperaddress2': '',\r\n// 'shipperaddress3': '',\r\n// 'shipperaddress4': '',\r\n// 'consigneeaddress1': '1234 MAIN',\r\n// 'consigneeaddress2': '',\r\n// 'consigneeaddress3': '',\r\n// 'jobunid': '100',\r\n// 'departuredate': '',\r\n// 'shipperzipcode': '30033',\r\n// 'shippername': 'test customer',\r\n// 'customername': 'test customer',\r\n// 'bookingnumber': '',\r\n// 'consigneezipcode': '30033',\r\n// 'consigneename': 'test customer',\r\n// 'servicetypecode': '',\r\n// 'gshpid': 'g0000000000000000094',\r\n// 'shipperpartyid': 'testcustom',\r\n// 'awb': 'h00030',\r\n// 'origin': 'dallas ft. worth',\r\n// 'destination': '',\r\n// 'totalchargeableweight': '',\r\n// 'consigneepartyid': 'testcustom',\r\n// 'businesstype': 'air export',\r\n// 'consigneecity': 'atlanta',\r\n// 'totalgrossweight': '',\r\n// 'consigneecountry': 'united states',\r\n// 'customergroup': '',\r\n// 'totalpieces': '',\r\n// 'duedate': '',\r\n// 'shippercity': 'atlanta',\r\n// 'servicelevelcode': '',\r\n// 'customerpartyid': 'testcustom',\r\n// 'servicelevel': ''\r\n\n/**\r\n * @ngdoc module\r\n * @name TrackTraceCmtsService\r\n *\r\n * @description The TrackTraceCmtsService module communciates with the Rails API to\r\n * procure search data on shipments to the user.\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsService.isCollapsed\r\n * @description method that queries whether collapisble exceptions component is\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsService.setCollapsed\r\n * @description method that sets the collapsibility of the above component\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsService.getShipments\r\n * @description method that returns the last query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsService.getPotentialExceptions\r\n * @description method that returns a list of potential exceptions\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsService.queryShipments\r\n * @params {query}\r\n * @description method that returns a complicated json object containing shipments\r\n * and pagination information\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsService.isNoResults\r\n * @decription returns true or false depending on if the shipment query has results\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsService.getShipTotal\r\n * @decription returns total number of shipments returned from the query\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('TrackTraceCmtsService', TrackTraceCmtsService);\r\n\r\n /** @ngInject */\r\n TrackTraceCmtsService.$inject = ['$http', '$location', '$log', 'api', '$rootScope', '$q', '$timeout', 'AJAX', '$filter'];\r\n function TrackTraceCmtsService($http, $location, $log, api, $rootScope, $q, $timeout, AJAX, $filter) {\r\n var shipments = [];\r\n var globalSearchData = [];\r\n\r\n var blankData = {\r\n shipments: [],\r\n total: 0,\r\n //service_level_codes: [],\r\n //reason_codes: [],\r\n search_params: [],\r\n //business_type_codes: [],\r\n active: [],\r\n exceptions: [],\r\n active_count: 0,\r\n results_count: 0,\r\n results_filtered: false,\r\n exception_count: 0\r\n };\r\n\r\n var queryState = {\r\n displayNoResults: true,\r\n isFilterLoading: {\r\n active: false,\r\n exception: false\r\n }\r\n };\r\n\r\n var data = angular.copy(blankData),\r\n activeTimeoutPromise = false;\r\n var pins = [];\r\n var collapsed = true, noResults = false;\r\n\r\n var totalShipments = 0;\r\n\r\n var page = 1;\r\n\r\n\r\n\r\n\r\n function queryShipments(query, timeoutPromise, sort_params){\r\n var timeoutTid = false;\r\n // TODO: come up with something that will make it not fire multiple requests, but also not trigger the timeout messages\r\n // if (activeTimeoutPromise) activeTimeoutPromise.resolve('newSearch');\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n activeTimeoutPromise = timeoutPromise;\r\n // $log.debug(query);\r\n var params = \"\";\r\n\r\n if(localStorage.customerType == 'cmts'){\r\n\r\n if(localStorage.switchEmailCmtsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCmtsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCmts){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts)+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userDepartmentCmts){\r\n params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCmts)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCmts+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.dummyUser){\r\n params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=cmts\";\r\n }\r\n\r\n var new_parameters = \"\";\r\n var new_query = \"\";\r\n\r\n for (var key in query) {\r\n if (query.hasOwnProperty(key)) {\r\n //new_query = new_query+'&'+key=query[key];\r\n if(key != ''){\r\n new_query = new_query+'&'+key+'='+encodeURIComponent(query[key]);\r\n }\r\n\r\n }\r\n }\r\n\r\n /*for (var key in sort_params) {\r\n //new_query = new_query+'&'+key=query[key];\r\n if(key != ''){\r\n new_query = new_query+'&'+key+'='+encodeURIComponent(sort_params[key]);\r\n }\r\n }*/\r\n\r\n //$location.search(query);\r\n // Base64 encode - btoa();\r\n if(params){\r\n params = params+new_query;\r\n } else{\r\n new_query = new_query.substring(1);\r\n params = '?'+new_query;\r\n }\r\n\r\n var promise = $http.get(api.url_v2 + '/cmts/search'+params, query, {timeout:timeoutPromise.promise}).then(function(res){\r\n\r\n page = query.page ? query.page : 1;\r\n //data.total = res.headers().total;\r\n noResults = res.data.load_cmts.length == 0;\r\n queryState.displayNoResults = noResults;\r\n data.error = null;\r\n data.isTimeout = false;\r\n data.shipments.total = 0;\r\n data.exception_count = res.data.exception_count;\r\n data.active_count = res.data.active_count;\r\n data.unfiltered_counts = res.data.unfiltered_counts;\r\n data.shipments = res.data.load_cmts;\r\n data.total = res.data.total;\r\n data.per_page = res.data.per_page;\r\n data.page = res.data.page;\r\n\r\n data.shipments = data.shipments.map(function(d){\r\n var s=d;\r\n s.planned_start= (s.planned_start)?$filter(\"date\")(s.planned_start, 'dd-MMM-yyyy hh:mm'):'';\r\n s.planned_end= (s.planned_end)?$filter(\"date\")(s.planned_end, 'dd-MMM-yyyy hh:mm'):'';\r\n return s;\r\n });\r\n $log.debug(data);\r\n\r\n return data;\r\n }, function(e){\r\n\r\n return $q.reject(e);\r\n\r\n }).catch(function(res){\r\n\r\n if(res.config.timeout.$$state.value != 'newSearch') {\r\n data = angular.copy(blankData);\r\n pins.length = 0;\r\n data.error = res.data ? (res.data.error ? res.data.error : null ): \"TRACKTRACE.TIMEOUT\";\r\n data.total = 0;\r\n page = 1;\r\n noResults = true;\r\n }\r\n\r\n if ([422, 500, 503].includes(res.status)){\r\n return res\r\n }\r\n else {\r\n return new Error(\"Boom\");\r\n }\r\n }).finally(function() {\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n timeoutPromise = false;\r\n activeTimeoutPromise = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (timeoutPromise) timeoutPromise.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n\r\n }\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/cmts_autocomplete', query).then(function(response){\r\n /*var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });*/\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n return {\r\n isNoResults: function(){\r\n return noResults;\r\n },\r\n isCollapsed: function(){\r\n return collapsed;\r\n },\r\n setCollapsed: function(collapse){\r\n collapsed = collapse;\r\n },\r\n getShipments: function(){\r\n return data;\r\n },\r\n setGlobalSearchData: function(data) {/*Added by Abheesh*/\r\n globalSearchData = data;\r\n },\r\n getGlobalSearchData: function() {/*Added by Abheesh*/\r\n return globalSearchData;\r\n },\r\n getShipTotal: function(){\r\n return totalShipments;\r\n },\r\n setResultsCount: function(num) {\r\n data.results_count = num;\r\n },\r\n setResultsFiltered: function(bool) {\r\n data.results_filtered = bool;\r\n },\r\n getQueryState: function() {return queryState;},\r\n\r\n queryShipments: queryShipments,\r\n\r\n getPins: function(){\r\n return pins;\r\n },\r\n getStatusOptions:function(){\r\n\r\n var url = api.url_v2+\"/cmts/status_options\";\r\n\r\n var dfd = $q.defer();\r\n $http.get(url).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n },\r\n autoComplete:autoComplete\r\n };\r\n }\r\n\r\n})();\r\n\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.showAdvSearch\r\n * @description to display the advanced search md-dialog\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.showCustomizeResults\r\n * @description to display the customize results md-dialog\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.selectRange\r\n * @description sets quick search fields to a preselected range of dates\r\n * @param {$event} - md-select ng-change triggered event\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.getActiveShipments\r\n * @description queries the database for shipments that are UNDELIVERED and active now\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.getShipments\r\n * @description gets the shipments from TrackTraceService\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.hideLoadAnimation\r\n * @description hides the load animation\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.quickSearch\r\n * @description makes the query for a quick search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.search\r\n * @description runs the search from AdvSearchCmtsService\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.showAdvSearch\r\n * @description shows the advance search modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.showCustomizeResults\r\n * @description shows the customize results modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.showLoadAnimation\r\n * @description shows the load animation\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.showNoShippmentsAlert\r\n * @description shows an alert when there is no shippents back from the query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCmtsController.toggleLimitOptions\r\n * @description toggles how many shipments are shown\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('TrackTraceCmtsController', TrackTraceCmtsController);\r\n\r\n /** @ngInject */\r\n TrackTraceCmtsController.$inject = ['$scope','$rootScope', 'mdSelectHelper', 'TrackTraceCmtsService','UserService', 'CustomResultsCmtsService', 'AdvSearchCmtsService', \"ServerTableCmtsService\", '$log', '$filter', '$translatePartialLoader', '$mdDialog', '$mdMedia', '$location', '$http', \"$stateParams\", '$q', '$translate', 'ContactsService', 'permissions', 'TrackTraceCmtsPaginationService'];\r\n function TrackTraceCmtsController($scope, $rootScope, mdSelectHelper, TrackTraceCmtsService, UserService, CustomResultsCmtsService, AdvSearchCmtsService, ServerTableCmtsService, $log, $filter ,$translatePartialLoader, $mdDialog, $mdMedia, $location, $http, $stateParams, $q, $translate, ContactsService, permissions, TrackTraceCmtsPaginationService) {\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('tracktrace');\r\n\r\n //variables\r\n var vm = this;\r\n vm.data;\r\n vm.loading = false; //flag to activate the loading screen\r\n vm.loadingState = ServerTableCmtsService.getState(); //flag to activate the module loading screen\r\n\r\n vm.planned_start_start_date=null;\r\n vm.planned_start_end_date=null;\r\n vm.planned_end_start_date=null;\r\n vm.planned_end_end_date=null;\r\n vm.plannedSatrtDateRangeSelect=null;\r\n vm.plannedEndDateRangeSelect=null;\r\n\r\n vm.isAwbBolQuickSearch = false;\r\n vm.quickFilters = [];\r\n vm.isFilteredOut = {active: false, potential: false, exception: false};\r\n vm.isFilterActive = {active: false, potential: false, exception: false}; // fricken angular..no why would I want to || something in a view?!\r\n //vm.isFilterLoading = {active: false, potential: false, exception: false};\r\n\r\n vm.queryState = TrackTraceCmtsService.getQueryState();\r\n //.isFilterLoading = TrackTraceService.getFilterLoading();\r\n vm.getMatch = getMatch;\r\n vm.queryVal = '';\r\n\r\n vm.statusOptVar = [\"delivered\",\"undelivered\"];\r\n\r\n vm.statusOptionsVar = [];\r\n\r\n vm.isBookedOptionsVar = [\"Yes\", \"No\"];\r\n\r\n vm.billingStatusVar=[\"Paid\", \"NoInvoice\", \"Billed\", \"Canceled\"];\r\n\r\n vm.transportModeVar=[\"TL\", \"LTL\"];\r\n\r\n vm.serviceOptionVar=[\"MAGA\", \"HotShot\"];\r\n\r\n vm.equipmentNameVar=[\"CARGO VAN\", \"PARTIAL\", \"REMOVABLE GOOSENECK\", \"STRETCH TRAILER\", \"40 Ft Dry Van\", \"40 ft Flatbed\", \"48 ft Dry Van\", \"48 ft Flatbed\", \"48 ft Stepdeck\", \"53 ft Dry Van\", \"53 ft Flatbed\", \"53 ft Reefer\", \"53 ft Stepdeck\", \"Box Truck\", \"Car\", \"Gooseneck\", \"Lowboy\", \"Mini-Float\", \"One-Ton\", \"Pickup Truck\", \"Single-Axle\", \"Sprinter\", \"Straight Truck\", \"Tandem\"];\r\n\r\n TrackTraceCmtsService.getStatusOptions().then(function(response){\r\n\r\n vm.statusOptionsVar = response;\r\n\r\n }).catch(function(error) {\r\n //debugger;\r\n });\r\n\r\n\r\n\r\n // Set initial search type to reference number\r\n //vm.aljexSearchType = 'reference';\r\n vm.aljexSearchType = 'load_status';\r\n vm.aljexDueDateRangeSelect = null;\r\n vm.hasExportPermissions = UserService.canAccess(permissions.shipment.export);\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n vm.aljexMinDate = \"'\" + (moment().subtract(13, 'months').format('YYYY-MM-DD')) + \"'\";\r\n vm.filterLabels = {\r\n active: 'TRACKTRACE.FILTER',\r\n exception: 'TRACKTRACE.FILTER',\r\n potential: 'TRACKTRACE.FILTER'\r\n }\r\n\r\n // Quarter math\r\n var quarterAdjustment= (moment().month() % 3) + 1;\r\n var lastQuarterEndDate = moment().subtract({ months: quarterAdjustment }).endOf('month');\r\n var lastQuarterStartDate = lastQuarterEndDate.clone().subtract({ months: 2 }).startOf('month');\r\n\r\n // Set up predetermined ranges for user to select from\r\n vm.aljexRanges = [\r\n {\r\n name: 'Last Year',\r\n start: moment().subtract(1, 'y'),\r\n end: moment()\r\n },\r\n {\r\n name: 'Last Quarter',\r\n start: lastQuarterStartDate,\r\n end: lastQuarterEndDate\r\n },\r\n {\r\n name: 'Last Month',\r\n start: moment().subtract({ months: 1 }).startOf('month'),\r\n end: moment().subtract({ months: 1 }).endOf('month')\r\n }\r\n ];\r\n\r\n // Functions\r\n vm.filter = filter;\r\n // vm.isFiltered = isFiltered;\r\n vm.getActiveShipments = getActiveShipments;\r\n vm.getShipments = getShipments;\r\n vm.hideLoadAnimation = hideLoadAnimation;\r\n vm.quickSearch = quickSearch;\r\n // vm.search = search;\r\n vm.showCustomizeResults = showCustomizeResults;\r\n vm.showLoadAnimation = showLoadAnimation;\r\n vm.showNoShippmentsAlert = showNoShippmentsAlert;\r\n vm.toggleLimitOptions = toggleLimitOptions;\r\n vm.showExportCSV = showExportCSV;\r\n vm.selectRange = selectRange;\r\n vm.dateChanged = dateChanged;\r\n vm.visualize = visualize;\r\n vm.hardRefresh = hardRefresh;\r\n vm.refresh = function(){ServerTableCmtsService.reloadTable()};\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n vm.aljexSearchChange = aljexSearchChange;\r\n\r\n /* Run Setup services */\r\n vm.getShipments();\r\n AdvSearchCmtsService.getSearch();\r\n ContactsService.setSubjectStatuses({trackTrace: {exceptions: false, results: true}});\r\n\r\n $rootScope.$on('cleared_quicksearch', function(ev, logs){\r\n vm.searchRouteNumberText='';\r\n vm.searchLoadNumberText='';\r\n vm.searchBolNumberText='';\r\n vm.searchProNumberText='';\r\n vm.searchTPCNameText='';\r\n vm.searchTPCNumberText='';\r\n vm.searchTPClientNameText='';\r\n vm.searchTPClientNumberText='';\r\n vm.queryVal = '';\r\n\r\n //planned start date\r\n vm.plannedstartdateRangeIsSelected=false;\r\n vm.planned_start_start_date=null;\r\n vm.planned_start_end_date=null;\r\n vm.plannedSatrtDateRangeSelect=null;\r\n\r\n //planned end date\r\n vm.plannedenddateRangeIsSelected=false;\r\n vm.planned_end_start_date=null;\r\n vm.planned_end_end_date=null;\r\n vm.plannedEndDateRangeSelect=null;\r\n\r\n angular.element(document.querySelectorAll('.clear-fields')).val('');\r\n });\r\n\r\n /** Customize Results Call **/\r\n vm.customFullscreen = $mdMedia('xs') || $mdMedia('sm');\r\n\r\n var queries = $location.search();\r\n\r\n var page_number = 1;\r\n if(UserService.getUserTableSettings()){\r\n var per_page = UserService.getUserTableSettings();\r\n }else{\r\n var per_page = 10;\r\n }\r\n\r\n TrackTraceCmtsPaginationService.save_page_number(page_number);\r\n TrackTraceCmtsPaginationService.save_per_page(per_page);\r\n\r\n var searchParamsCount = 0;\r\n\r\n for(var test in queries){\r\n\r\n if(test){\r\n searchParamsCount += 1;\r\n }\r\n\r\n }\r\n\r\n queries.page = page_number;\r\n queries.per_page = per_page;\r\n\r\n var newParams = {};\r\n\r\n angular.forEach(queries, function(obj, key) {\r\n\r\n if(obj){\r\n newParams[key] = obj;\r\n }\r\n\r\n });\r\n\r\n if(searchParamsCount <= 0 ){\r\n\r\n var currentSearchFields = JSON.parse(AdvSearchCmtsService.getLastSearchLocally());\r\n\r\n if(currentSearchFields){\r\n\r\n angular.forEach(Object.keys(currentSearchFields), function(k) {\r\n\r\n if (currentSearchFields[k].value) {\r\n newParams[k] = currentSearchFields[k].value;\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n $location.search(newParams);\r\n\r\n\r\n // see if we have paramters in the toolbar\r\n var paramSearchFields = AdvSearchCmtsService.getEmptySearchFields(),\r\n foundParamSearch = false,\r\n disableUrlReplacement = false;\r\n angular.forEach(paramSearchFields, function(obj, key) {\r\n var v = $location.search()[key] || $location.search()[key + \"[]\"];\r\n\r\n if (v !== undefined) {\r\n\r\n foundParamSearch = true;\r\n if(key.includes('date')){\r\n //paramSearchFields[key].value = new Date(v);\r\n var findAndTextInDateRange = v.search(\"and\");\r\n\r\n if(findAndTextInDateRange == -1){\r\n //debugger;\r\n //paramSearchFields[key].value = v;\r\n\r\n var newV = new Date(v);\r\n newV = newV.toString().split(\" \");\r\n\r\n v = newV[1]+' '+newV[2]+' '+newV[3];\r\n\r\n paramSearchFields[key].value = v;\r\n\r\n\r\n }else{\r\n //debugger;\r\n paramSearchFields[key].value = v;\r\n }\r\n\r\n //paramSearchFields[key].value = v;\r\n } else {\r\n //For some reason when filtering by ?status=0 via the active shipments widgets\r\n // the param is not being set as part of the search params\r\n paramSearchFields[key].value = v === 0 ? v.toString() : v;\r\n }\r\n }\r\n\r\n });\r\n\r\n if (foundParamSearch || $stateParams.potential) {\r\n disableUrlReplacement = true;\r\n AdvSearchCmtsService.setCurrentSearchFields(paramSearchFields, true);\r\n if ($location.search()['current_exception']) {\r\n filter('exception', true);\r\n }\r\n disableUrlReplacement = false;\r\n }\r\n // no URLsearch parameters\r\n else {\r\n //load the default search if there is one\r\n AdvSearchCmtsService.listSavedSearches().then(function(res){\r\n var isSavedSearch = res['data'].length > 0;\r\n // var searchFields = JSON.parse(localStorage.getItem(\"query\"));\r\n // AdvSearchCmtsService.setCurrentSearchFields(searchFields);\r\n if( AdvSearchCmtsService.getIsFirstSearch() && isSavedSearch) { //if there is a default search\r\n AdvSearchCmtsService.loadSearch((res['data'])['0'].id).then(function(res) {\r\n var searchFields = AdvSearchCmtsService.getCurrentSearchFields();\r\n var data = res['data'];\r\n for (var field in searchFields) {\r\n if(data[field] != null) searchFields[field].value = data[field];\r\n }\r\n AdvSearchCmtsService.setCurrentSearchFields(searchFields);\r\n // vm.search({});\r\n AdvSearchCmtsService.setIsFirstSearch(false); //Not the first search anymore\r\n });\r\n } else if(AdvSearchCmtsService.getLastSearchLocally()) { //run the last saved search\r\n\r\n AdvSearchCmtsService.setCurrentSearchFields(JSON.parse(AdvSearchCmtsService.getLastSearchLocally()));\r\n setFilterButtons(); //sets the top filter buttons if there is one in the searchFields\r\n } else { //else run the normal search\r\n // vm.search({});\r\n setFilterButtons(); //sets the top filter buttons if there is one in the searchFields\r\n }\r\n });\r\n }\r\n\r\n function aljexSearchChange(searchType){\r\n vm.searchRouteNumberText='';\r\n vm.searchLoadNumberText='';\r\n vm.searchBolNumberText='';\r\n vm.searchProNumberText='';\r\n vm.searchTPCNameText='';\r\n vm.searchTPCNumberText='';\r\n vm.searchTPClientNameText='';\r\n vm.searchTPClientNumberText='';\r\n vm.queryVal = '';\r\n\r\n //planned start date\r\n vm.plannedstartdateRangeIsSelected=false;\r\n vm.planned_start_start_date=null;\r\n vm.planned_start_end_date=null;\r\n vm.plannedSatrtDateRangeSelect=null;\r\n\r\n //planned end date\r\n vm.plannedenddateRangeIsSelected=false;\r\n vm.planned_end_start_date=null;\r\n vm.planned_end_end_date=null;\r\n vm.plannedEndDateRangeSelect=null;\r\n\r\n angular.element(document.querySelectorAll('.clear-fields')).val('');\r\n\r\n vm.aljexSearchType = searchType;\r\n }\r\n\r\n function getMatch(key,query){\r\n\r\n if(query != undefined && query != null){\r\n return TrackTraceCmtsService.autoComplete({field:key , value: query});\r\n }\r\n\r\n }\r\n\r\n function visualize() {\r\n $location.url($location.url().replace('track-trace', 'track-trace/viz'));\r\n }\r\n\r\n function hardRefresh(keyCodeString){\r\n var hardRefreshCodes = ['116-shiftKey', '82-metaKey-shiftKey', '116-ctrlKey'];\r\n\r\n // hard_refresh_codes.forEach(function(val){\r\n // var key_arr = val.split('-');\r\n // var key = key_arr.shift();\r\n // var modifiers_pressed = eval(key_arr.map(\r\n // function(val){return event[val]}).join(' & '));\r\n\r\n if (hardRefreshCodes.includes(keyCodeString)) {\r\n event.preventDefault();\r\n localStorage.setItem('invalidateCache', true);\r\n location.reload(true);\r\n\r\n }\r\n\r\n }\r\n\r\n function selectRange() {\r\n if (vm.aljexSearchType == 'planned_start') {\r\n vm.plannedstartdateRangeIsSelected=true;\r\n // Reset other search values\r\n vm.plannedenddateRangeIsSelected=false;\r\n vm.planned_end_start_date=null;\r\n vm.planned_end_end_date=null;\r\n vm.plannedEndDateRangeSelect=null;\r\n\r\n var range = JSON.parse(vm.plannedSatrtDateRangeSelect);\r\n\r\n vm.planned_start_start_date = new Date(range.start);\r\n vm.planned_start_end_date = new Date(range.end);\r\n\r\n vm.planned_start_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.planned_start_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n } else if (vm.aljexSearchType == 'planned_end') {\r\n vm.plannedenddateRangeIsSelected=true;\r\n // Reset other search values\r\n vm.plannedstartdateRangeIsSelected=false;\r\n vm.planned_start_start_date=null;\r\n vm.planned_start_end_date=null;\r\n vm.plannedSatrtDateRangeSelect=null;\r\n\r\n var range = JSON.parse(vm.plannedEndDateRangeSelect);\r\n\r\n vm.planned_end_start_date = new Date(range.start);\r\n vm.planned_end_end_date = new Date(range.end);\r\n\r\n vm.planned_end_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.planned_end_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n }\r\n\r\n }\r\n\r\n function dateChanged() {\r\n vm.plannedstartdateRangeIsSelected=false;\r\n vm.plannedenddateRangeIsSelected=false;\r\n\r\n vm.plannedSatrtDateRangeSelect='';\r\n vm.plannedEndDateRangeSelect='';\r\n vm.planned_start_start_date_new = '';\r\n vm.planned_start_end_date_new ='';\r\n\r\n vm.planned_end_start_date_new = '';\r\n vm.planned_end_end_date_new ='';\r\n }\r\n\r\n function toggleLimitOptions() {\r\n vm.limitOptions = vm.limitOptions ? undefined : [10, 25, 50];\r\n }\r\n\r\n //function to display alert if there are now shipments form the search\r\n function showNoShippmentsAlert() {\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.querySelector('#popupContainer')))\r\n .clickOutsideToClose(true)\r\n .title('No shipment Results!')\r\n .textContent('Try a different search to get more results.')\r\n .ariaLabel('Alert Dialog Demo')\r\n .ok('Got it!')\r\n );\r\n }\r\n\r\n // function isFiltered(type) {\r\n // if (vm.quickFilters.length > 0) {\r\n // if (vm.quickFilters.indexOf(type) !== -1) {\r\n // return true;\r\n // } else {\r\n // return false;\r\n // }\r\n // } else {\r\n // return true;\r\n // }\r\n // }\r\n\r\n function filter(type, disableUrlReplacement){\r\n vm.quickFilters = [];\r\n var searchFields = angular.copy(AdvSearchCmtsService.getCurrentSearchFields());\r\n\r\n // only allow one filter at a time\r\n searchFields.quick_filter.value.length = 0;\r\n\r\n switch (type){\r\n case \"exception\":\r\n if (vm.filterLabels.exception == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('exception');\r\n searchFields.quick_filter.value.push(\"exception\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n }\r\n break;\r\n case \"active\":\r\n if (vm.filterLabels.active == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('active');\r\n searchFields.quick_filter.value.push(\"active\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n // var index = searchFields.quick_filter.value.indexOf('active');\r\n // if(index > -1) {\r\n // searchFields.quick_filter.value.splice(index, 1);\r\n // }\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n vm.quickFilters = searchFields.quick_filter.value;\r\n AdvSearchCmtsService.setCurrentSearchFields(searchFields, disableUrlReplacement);\r\n vm.queryState.isFilterLoading[type] = true;\r\n }\r\n\r\n //sets the attributes of a filtered search\r\n function setFilterDisplayWithActiveFilter(filteredType) {\r\n var isActive = filteredType == 'active',\r\n isException = filteredType == 'exception',\r\n isPotentialException = filteredType == 'potential';\r\n\r\n vm.filterLabels.active = isActive ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n vm.filterLabels.exception = isException ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n\r\n vm.isFilteredOut.active = !isActive && filteredType;\r\n vm.isFilteredOut.exception = !isException && filteredType;\r\n\r\n vm.isFilterActive.active = isActive;\r\n vm.isFilterActive.exception = isException;\r\n }\r\n\r\n //sets the filter buttons on first time track and trace came in\r\n function setFilterButtons() {\r\n var searchFields = AdvSearchCmtsService.getCurrentSearchFields();\r\n searchFields.quick_filter.value.forEach(function(filterType) {\r\n setFilterDisplayWithActiveFilter(filterType);\r\n }, this);\r\n }\r\n\r\n function getActiveColumns(){\r\n return CustomResultsCmtsService.getActiveColumns();\r\n }\r\n\r\n function getShipments(){\r\n vm.data = TrackTraceCmtsService.getShipments();\r\n }\r\n\r\n function getActiveShipments(){\r\n var searchFields = angular.copy(AdvSearchCmtsService.getCurrentSearchFields());\r\n for (var field in searchFields) {\r\n searchFields[field].value = \"\"; //reset the fields\r\n }\r\n searchFields.status.value = \"1\"; //set the status for active shipments\r\n AdvSearchCmtsService.setCurrentSearchFields(searchFields);\r\n }\r\n\r\n var searchTimeoutPromise = false;\r\n\r\n function quickSearch(query){\r\n\r\n var searchFields = angular.copy(AdvSearchCmtsService.getEmptySearchFields());\r\n\r\n if(vm.planned_start_start_date){\r\n vm.planned_start_start_date_new = moment(vm.planned_start_start_date).format('DD-MMM-YYYY');\r\n }\r\n\r\n if(vm.planned_start_end_date){\r\n vm.planned_start_end_date_new = moment(vm.planned_start_end_date).format('DD-MMM-YYYY');\r\n }\r\n\r\n if(vm.planned_end_start_date){\r\n vm.planned_end_start_date_new = moment(vm.planned_end_start_date).format('DD-MMM-YYYY');\r\n }\r\n\r\n if(vm.planned_end_end_date){\r\n vm.planned_end_end_date_new = moment(vm.planned_end_end_date).format('DD-MMM-YYYY');\r\n }\r\n\r\n\r\n if(vm.aljexSearchType == 'planned_start') {\r\n if(vm.planned_start_start_date_new!=undefined && vm.planned_start_start_date_new!=\"\"\r\n && vm.planned_start_end_date_new!=undefined && vm.planned_start_end_date_new!=\"\" )\r\n {\r\n searchFields['planned_start_range'].value = vm.planned_start_start_date_new +\" 00:00 AND \"+vm.planned_start_end_date_new + \" 23:59\";\r\n\r\n }else if (vm.planned_start_start_date_new) {\r\n searchFields['planned_start_from'].value = vm.planned_start_start_date_new;\r\n } else if (vm.planned_start_end_date_new) {\r\n searchFields['planned_start_to'].value = vm.planned_start_end_date_new;\r\n }\r\n } else if(vm.aljexSearchType == 'planned_end') {\r\n if(vm.planned_end_start_date_new!=undefined && vm.planned_end_start_date_new!=\"\"\r\n && vm.planned_end_end_date_new!=undefined && vm.planned_end_end_date_new!=\"\" )\r\n {\r\n searchFields['planned_end_range'].value = vm.planned_end_start_date_new +\" 00:00 AND \"+vm.planned_end_end_date_new + \" 23:59\";\r\n\r\n }else if (vm.planned_end_start_date_new) {\r\n searchFields['planned_end_from'].value = vm.planned_end_start_date_new;\r\n }else if (vm.planned_end_end_date_new) {\r\n searchFields['planned_end_to'].value = vm.planned_end_end_date_new;\r\n }\r\n }\r\n else if(vm.aljexSearchType == 'route_number'){\r\n searchFields['route_number'].value = vm.searchRouteNumberText;\r\n }\r\n else if(vm.aljexSearchType == 'load_number'){\r\n searchFields['load_number'].value = vm.searchLoadNumberText;\r\n }\r\n else if(vm.aljexSearchType == 'bol_number'){\r\n searchFields['bol_number'].value = vm.searchBolNumberText;\r\n }\r\n else if(vm.aljexSearchType == 'pro_number'){\r\n searchFields['pro_number'].value = vm.searchProNumberText;\r\n }\r\n else if(vm.aljexSearchType == 'trading_partner_carrier_name'){\r\n searchFields['trading_partner_carrier_name'].value = vm.searchTPCNameText;\r\n }\r\n else if(vm.aljexSearchType == 'trading_partner_carrier_number'){\r\n searchFields['trading_partner_carrier_number'].value = vm.searchTPCNumberText;\r\n }\r\n else if(vm.aljexSearchType == 'trading_partner_client_name'){\r\n searchFields['trading_partner_client_name'].value = vm.searchTPClientNameText;\r\n }\r\n else if(vm.aljexSearchType == 'trading_partner_client_number'){\r\n searchFields['trading_partner_client_number'].value = vm.searchTPClientNumberText;\r\n }\r\n else {\r\n searchFields[vm.aljexSearchType].value = query;\r\n }\r\n\r\n TrackTraceCmtsPaginationService.save_page_number(1);\r\n TrackTraceCmtsPaginationService.save_per_page(10);\r\n\r\n AdvSearchCmtsService.setCurrentSearchFields(searchFields);\r\n\r\n }\r\n\r\n function showExportCSV(ev){\r\n if (vm.queryState.displayNoResults) { return; }\r\n\r\n var params = ServerTableCmtsService.getParams();\r\n $scope.exportCsvLoaded = false;\r\n AdvSearchCmtsService.exportSearchFields([], params).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n }).catch(function() {\r\n $mdDialog.hide();\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n\r\n // Show the advanced search md-dialog\r\n function showCustomizeResults(ev) {\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/track-trace/track-trace-cmts/customize-results/customize-results-cmts.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n vm.status = 'You said the information was \"' + answer + '\".';\r\n }, function() {\r\n vm.status = 'You cancelled the dialog.';\r\n });\r\n }\r\n\r\n // shows the loading animation\r\n function showLoadAnimation() {\r\n vm.loading = true;\r\n }\r\n\r\n //hides the loading animation\r\n function hideLoadAnimation(ev) {\r\n vm.loading = false;\r\n }\r\n }\r\n})();\r\n\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('TrackTraceCmtsPaginationService', TrackTraceCmtsPaginationService);\r\n\r\n /** @ngInject */\r\n TrackTraceCmtsPaginationService.$inject = ['$http', '$log', 'api', '$q', '$timeout', 'AJAX', 'UserService' ];\r\n function TrackTraceCmtsPaginationService($http, $log, api, $q, $timeout , AJAX, UserService) { \r\n \r\n var vm = this;\r\n\r\n vm.page_number = 1;\r\n\r\n if(UserService.getUserTableSettings()){\r\n vm.per_page = UserService.getUserTableSettings();\r\n }else{\r\n vm.per_page = 10;\r\n }\r\n\r\n function get_page_number(){\r\n return parseInt(vm.page_number);\r\n }\r\n\r\n function get_per_page(){\r\n return parseInt(vm.per_page);\r\n }\r\n\r\n function save_page_number(paginate){ \r\n vm.page_number = paginate;\r\n return true; \r\n }\r\n\r\n function save_per_page(paginate){\r\n vm.per_page = paginate;\r\n vm.page_number = 1;\r\n return true;\r\n //$rootScope.page_number = $rootScope.page_number + 1;\r\n }\r\n\r\n return{\r\n get_page_number: get_page_number,\r\n get_per_page: get_per_page,\r\n save_page_number: save_page_number,\r\n save_per_page: save_per_page\r\n }\r\n \r\n \r\n }\r\n\r\n})();\r\n\r\n// 'servicetype': '',\r\n// 'shipdate': '11-AUG-08',\r\n// 'consigneeaddress4': '',\r\n// 'shipperaddress1': '1234 MAIN',\r\n// 'shipperaddress2': '',\r\n// 'shipperaddress3': '',\r\n// 'shipperaddress4': '',\r\n// 'consigneeaddress1': '1234 MAIN',\r\n// 'consigneeaddress2': '',\r\n// 'consigneeaddress3': '',\r\n// 'jobunid': '100',\r\n// 'departuredate': '',\r\n// 'shipperzipcode': '30033',\r\n// 'shippername': 'test customer',\r\n// 'customername': 'test customer',\r\n// 'bookingnumber': '',\r\n// 'consigneezipcode': '30033',\r\n// 'consigneename': 'test customer',\r\n// 'servicetypecode': '',\r\n// 'gshpid': 'g0000000000000000094',\r\n// 'shipperpartyid': 'testcustom',\r\n// 'awb': 'h00030',\r\n// 'origin': 'dallas ft. worth',\r\n// 'destination': '',\r\n// 'totalchargeableweight': '',\r\n// 'consigneepartyid': 'testcustom',\r\n// 'businesstype': 'air export',\r\n// 'consigneecity': 'atlanta',\r\n// 'totalgrossweight': '',\r\n// 'consigneecountry': 'united states',\r\n// 'customergroup': '',\r\n// 'totalpieces': '',\r\n// 'duedate': '',\r\n// 'shippercity': 'atlanta',\r\n// 'servicelevelcode': '',\r\n// 'customerpartyid': 'testcustom',\r\n// 'servicelevel': ''\r\n\n/**\r\n * @ngdoc module\r\n * @name TrackTraceCfsService\r\n *\r\n * @description The TrackTraceCfsService module communciates with the Rails API to\r\n * procure search data on shipments to the user.\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsService.isCollapsed\r\n * @description method that queries whether collapisble exceptions component is\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsService.setCollapsed\r\n * @description method that sets the collapsibility of the above component\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsService.getShipments\r\n * @description method that returns the last query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsService.getPotentialExceptions\r\n * @description method that returns a list of potential exceptions\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsService.queryShipments\r\n * @params {query}\r\n * @description method that returns a complicated json object containing shipments\r\n * and pagination information\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsService.isNoResults\r\n * @decription returns true or false depending on if the shipment query has results\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsService.getShipTotal\r\n * @decription returns total number of shipments returned from the query\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('TrackTraceCfsService', TrackTraceCfsService);\r\n\r\n /** @ngInject */\r\n TrackTraceCfsService.$inject = ['$http', '$location', '$log', 'api', '$rootScope', '$q', '$timeout', 'AJAX', '$filter'];\r\n function TrackTraceCfsService($http, $location, $log, api, $rootScope, $q, $timeout, AJAX, $filter) {\r\n var shipments = [{'shippercountry': 'United States', 'servicetype': '', 'shipdate': '11-AUG-08', 'consigneeaddress4': '', 'shipperaddress1': '1234 MAIN', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': '1234 MAIN', 'consigneeaddress2': '', 'consigneeaddress3': '', 'jobunid': '100', 'departuredate': '', 'shipperzipcode': '30033', 'shippername': 'TEST customer', 'customername': 'TEST customer', 'bookingnumber': '', 'consigneezipcode': '30033', 'consigneename': 'TEST customer', 'servicetypecode': '', 'gshpid': 'G0000000000000000094', 'shipperpartyid': 'TESTCUSTOM', 'awb': 'H00030', 'origin': 'Dallas Ft. Worth', 'destination': '', 'totalchargeableweight': '', 'consigneepartyid': 'TESTCUSTOM', 'businesstype': 'Air Export', 'consigneecity': 'Atlanta', 'totalgrossweight': '', 'consigneecountry': 'United States', 'customergroup': '', 'totalpieces': '', 'duedate': '', 'shippercity': 'Atlanta', 'servicelevelcode': '', 'customerpartyid': 'TESTCUSTOM', 'servicelevel': ''}, {'shippercountry': 'United States', 'servicetype': 'Door To Door', 'shipdate': '22-AUG-08', 'consigneeaddress4': '', 'shipperaddress1': '5401 S 39th Street, #1', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': 'for onforwarding with DHX', 'consigneeaddress2': 'to Cameula, Hawaii 96743', 'consigneeaddress3': '', 'jobunid': '388', 'departuredate': '21-AUG-08', 'shipperzipcode': '85040', 'shippername': 'Ozone Water Systems', 'customername': 'DCI Logistics, Inc.', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': '', 'servicetypeCODE': 'DTD', 'gshpid': 'G0000000000000000352', 'shipperpartyid': 'OZON540ATL', 'awb': 'AATL0808000001', 'origin': 'Phoenix', 'destination': 'Honolulu', 'totalchargeableweight': '263', 'consigneepartyid': '', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '260', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '1', 'duedate': '05-SEP-08', 'shippercity': 'Phoenix', 'servicelevelCODE': 'DEFR', 'customerpartyid': 'DCIL608ATL', 'servicelevel': 'Deferred Service'}, {'shipperCOUNTRY': '', 'servicetype': 'Door To Door', 'shipdate': '15-AUG-08', 'consigneeaddress4': '', 'shipperaddress1': '', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': '', 'consigneeaddress2': '', 'consigneeaddress3': '', 'jobunid': '353', 'departuredate': '15-AUG-08', 'shipperzipcode': '', 'shippername': 'Dell Dallas DC', 'customername': 'Dell Dallas DC', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': 'Test One', 'servicetypeCODE': 'DTD', 'gshpid': 'G0000000000000000320', 'shipperpartyid': 'DELL321DFW', 'awb': 'H00055', 'origin': 'Dallas Ft. Worth', 'destination': 'Phoenix', 'totalchargeableweight': '55', 'consigneepartyid': 'TEST123PHX', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '55', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '10', 'duedate': '21-AUG-08', 'shippercity': '', 'servicelevelCODE': 'ECO', 'customerpartyid': 'DELL321DFW', 'servicelevel': 'Economy Service'}, {'shipperCOUNTRY': 'United States', 'servicetype': 'Door To Port', 'shipdate': '04-SEP-08', 'consigneeaddress4': 'United Kingdom', 'shipperaddress1': '10805 Painter Avenue', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': 'PTF No. 7 Gate', 'consigneeaddress2': 'Wilmore Road', 'consigneeaddress3': 'Derby, England DE248BJ', 'jobunid': '383', 'departuredate': '10-SEP-08', 'shipperzipcode': '90670', 'shippername': 'Advanced Ground Systems Engineering', 'customername': 'MCH Transportation LLC', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': '', 'servicetypeCODE': 'DTP', 'gshpid': 'G0000000000000000347', 'shipperpartyid': 'ADVA108ATL', 'awb': '172 70503016', 'origin': 'Atlanta', 'destination': 'East Midlands', 'totalchargeableweight': '2858', 'consigneepartyid': '', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '2858', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '1', 'duedate': '13-SEP-08', 'shippercity': 'Santa Fe Springs', 'servicelevelCODE': 'IECO', 'customerpartyid': 'MCHT577ATL', 'servicelevel': 'International Economy Service'}, {'shipperCOUNTRY': 'United States', 'servicetype': '', 'shipdate': '05-SEP-08', 'consigneeaddress4': 'United Kingdom', 'shipperaddress1': '10805 Painter Avenue', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': 'PTF No. 7 Gate', 'consigneeaddress2': 'Wilmore Road', 'consigneeaddress3': 'Derby, England DE248BJ', 'jobunid': '386', 'departuredate': '10-SEP-08', 'shipperzipcode': '90670', 'shippername': 'Advanced Ground Systems Engineering', 'customername': 'MCH Transportation LLC', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': '', 'servicetypeCODE': '', 'gshpid': 'G0000000000000000350', 'shipperpartyid': 'ADVA108ATL', 'awb': '172 70503020', 'origin': 'Houston', 'destination': 'East Midlands', 'totalchargeableweight': '2858', 'consigneepartyid': '', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '2858', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '1', 'duedate': '12-SEP-08', 'shippercity': 'Santa Fe Springs', 'servicelevelCODE': '', 'customerpartyid': 'MCHT577ATL', 'servicelevel': ''}];\r\n var globalSearchData = [];\r\n\r\n var blankData = {\r\n shipments: [],\r\n total: 0,\r\n service_level_codes: [],\r\n reason_codes: [],\r\n search_params: [],\r\n business_type_codes: [],\r\n active: [],\r\n exceptions: [],\r\n potential: [],\r\n active_count: 0,\r\n results_count: 0,\r\n results_filtered: false,\r\n exception_count: 0,\r\n potential_exception_count: 0\r\n };\r\n\r\n var queryState = {\r\n displayNoResults: true,\r\n isFilterLoading: {\r\n active: false,\r\n exception: false,\r\n potential: false\r\n }\r\n };\r\n\r\n var data = angular.copy(blankData),\r\n activeTimeoutPromise = false;\r\n var pins = [];\r\n var collapsed = true, noResults = false;\r\n\r\n var totalShipments = 0;\r\n\r\n var page = 1;\r\n\r\n var potentialExceptions = [\r\n {\r\n name: \"Tidal Wave\",\r\n lat: 30.194444,\r\n long: -97.67,\r\n },\r\n {\r\n name: \"Hurricane\",\r\n lat: 40.639722,\r\n long: -122.375,\r\n },\r\n {\r\n name: \"Godzilla\",\r\n lat: 39.861667,\r\n long: -80.290556,\r\n }\r\n ];\r\n\r\n function processPins(pinData){\r\n pins.length = 0;\r\n pinData.map(function(d){\r\n d.geocodes.map(function(datum){\r\n datum.type = d.geotype;\r\n pins.push(datum);\r\n });\r\n });\r\n }\r\n\r\n function queryShipments(query, timeoutPromise, sort_params){\r\n var timeoutTid = false;\r\n // TODO: come up with something that will make it not fire multiple requests, but also not trigger the timeout messages\r\n // if (activeTimeoutPromise) activeTimeoutPromise.resolve('newSearch');\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n activeTimeoutPromise = timeoutPromise;\r\n // $log.debug(query);\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+encodeURIComponent(localStorage.switchEmail);\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompany);\r\n // }\r\n\r\n if(localStorage.customerType == 'cfs'){\r\n\r\n if(localStorage.switchEmailCfsType){\r\n params +=\"?userEmail=\"+encodeURIComponent(localStorage.switchEmailCfsType)+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCfs){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=cfs\";\r\n }\r\n\r\n var new_parameters = \"\";\r\n var new_query = \"\";\r\n\r\n for (var key in query) {\r\n if (query.hasOwnProperty(key)) {\r\n //new_query = new_query+'&'+key=query[key];\r\n if(key != ''){\r\n new_query = new_query+'&'+key+'='+encodeURIComponent(query[key]);\r\n }\r\n\r\n }\r\n }\r\n\r\n /*for (var key in sort_params) {\r\n //new_query = new_query+'&'+key=query[key];\r\n if(key != ''){\r\n new_query = new_query+'&'+key+'='+encodeURIComponent(sort_params[key]);\r\n }\r\n }*/\r\n\r\n //$location.search(query);\r\n // Base64 encode - btoa();\r\n if(params){\r\n params = params+new_query;\r\n } else{\r\n new_query = new_query.substring(1);\r\n params = '?'+new_query;\r\n }\r\n\r\n var promise = $http.get(api.url_v2 + '/cfs/search'+params, query, {timeout:timeoutPromise.promise}).then(function(res){\r\n\r\n page = query.page ? query.page : 1;\r\n //data.total = res.headers().total;\r\n noResults = res.data.loads.length == 0;\r\n queryState.displayNoResults = noResults;\r\n data.error = null;\r\n data.isTimeout = false;\r\n data.shipments.total = 0;\r\n data.potential_exception_count = 0;\r\n data.exception_count = res.data.exception_count;\r\n data.active_count = res.data.active_count;\r\n data.unfiltered_counts = res.data.unfiltered_counts;\r\n data.shipments = res.data.loads;\r\n data.total = res.data.total;\r\n data.per_page = res.data.per_page;\r\n data.page = res.data.page;\r\n\r\n\r\n data.shipments = data.shipments.map(function(d){\r\n var s = d;\r\n\r\n if (s.flags) {\r\n if (s.flags.indexOf('current_exception') !== -1) s.flag = 'current_exception';\r\n else if (s.flags.indexOf('potential_exception') !== -1) s.flag = 'potential_exception';\r\n }\r\n if (!s.jobno){\r\n\r\n s.isdelivered = 'booking';\r\n }\r\n\r\n //To display last check call date/time location\r\n var lastcheckcall_date = (s.lastcheckcalldate)?$filter(\"date\")(s.lastcheckcalldate, 'dd-MMM-yyyy'):'';\r\n var lastcheckcall_time = (s.lastcheckcalltime)? '/ '+$filter(\"date\")(s.lastcheckcalltime, 'hh:mm'):'';\r\n var lastcheckcall_location = (s.lastcheckcalllocation)?(\"\\n \"+ s.lastcheckcalllocation):'';\r\n var lastcheckcall_state = (s.lastcheckcallstate)?', '+s.lastcheckcallstate:'';\r\n\r\n s.lastcheckcalldetails_new = (s.lastcheckcalldetails);\r\n\r\n\r\n //To display delivery DATE / TIME\r\n var delivery_date = (s.deliverydate)?$filter(\"date\")(s.deliverydate, 'dd-MMM-yyyy'):'';\r\n var delivery_time = (s.deliverytime)?$filter(\"date\")(s.deliverytime, 'hh:mm'):'';\r\n\r\n s.deliverydatetime_new = delivery_date+\"\\n \"+delivery_time;\r\n\r\n //To display pickup APPT. DATE / TIME\r\n var pickup_appt_date = (s.pickupapptdate)?$filter(\"date\")(s.pickupapptdate, 'dd-MMM-yyyy'):'';\r\n var pickup_appt_time = (s.pickupappttime)?$filter(\"date\")(s.pickupappttime, 'hh:mm'):'';\r\n\r\n s.pickupappointmentdatetime_new = pickup_appt_date+\"\\n \"+pickup_appt_time;\r\n\r\n // To display delivery Appt date/time\r\n var deliveryAppt_date = (s.consigneeapptdate)?$filter(\"date\")(s.consigneeapptdate, 'dd-MMM-yyyy'):'';\r\n var deliveryAppt_time = (s.consigneeappttime)? ' '+$filter(\"date\")(s.consigneeappttime, 'hh:mm'):'';\r\n\r\n s.consigneeapptdatetime_new = (deliveryAppt_date+\"\\n \"+deliveryAppt_time);\r\n\r\n\r\n return s;\r\n });\r\n $log.debug(data);\r\n\r\n return data;\r\n }, function(e){\r\n\r\n return $q.reject(e);\r\n\r\n }).catch(function(res){\r\n\r\n if(res.config.timeout.$$state.value != 'newSearch') {\r\n data = angular.copy(blankData);\r\n pins.length = 0;\r\n data.error = res.data ? (res.data.error ? res.data.error : null ): \"TRACKTRACE.TIMEOUT\";\r\n data.total = 0;\r\n page = 1;\r\n noResults = true;\r\n }\r\n\r\n if ([422, 500, 503].includes(res.status)){\r\n return res\r\n }\r\n else {\r\n return new Error(\"Boom\");\r\n }\r\n }).finally(function() {\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n timeoutPromise = false;\r\n activeTimeoutPromise = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (timeoutPromise) timeoutPromise.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n\r\n }\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/cfs_csl_city_state_autocomplete', query).then(function(response){\r\n /*var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });*/\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n return {\r\n isNoResults: function(){\r\n return noResults;\r\n },\r\n isCollapsed: function(){\r\n return collapsed;\r\n },\r\n setCollapsed: function(collapse){\r\n collapsed = collapse;\r\n },\r\n getShipments: function(){\r\n return data;\r\n },\r\n getPotentialExceptions: function(){\r\n return potentialExceptions;\r\n },\r\n setGlobalSearchData: function(data) {/*Added by Abheesh*/\r\n globalSearchData = data;\r\n },\r\n getGlobalSearchData: function() {/*Added by Abheesh*/\r\n return globalSearchData;\r\n },\r\n getShipTotal: function(){\r\n return totalShipments;\r\n },\r\n setResultsCount: function(num) {\r\n data.results_count = num;\r\n },\r\n setResultsFiltered: function(bool) {\r\n data.results_filtered = bool;\r\n },\r\n getQueryState: function() {return queryState;},\r\n\r\n queryShipments: queryShipments,\r\n\r\n getPins: function(){\r\n return pins;\r\n },\r\n getStatusOptions:function(){\r\n\r\n var url = api.url_v2+\"/cfs/status_options\";\r\n\r\n var dfd = $q.defer();\r\n $http.get(url).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n },\r\n autoComplete:autoComplete\r\n };\r\n }\r\n\r\n})();\r\n\r\n// 'servicetype': '',\r\n// 'shipdate': '11-AUG-08',\r\n// 'consigneeaddress4': '',\r\n// 'shipperaddress1': '1234 MAIN',\r\n// 'shipperaddress2': '',\r\n// 'shipperaddress3': '',\r\n// 'shipperaddress4': '',\r\n// 'consigneeaddress1': '1234 MAIN',\r\n// 'consigneeaddress2': '',\r\n// 'consigneeaddress3': '',\r\n// 'jobunid': '100',\r\n// 'departuredate': '',\r\n// 'shipperzipcode': '30033',\r\n// 'shippername': 'test customer',\r\n// 'customername': 'test customer',\r\n// 'bookingnumber': '',\r\n// 'consigneezipcode': '30033',\r\n// 'consigneename': 'test customer',\r\n// 'servicetypecode': '',\r\n// 'gshpid': 'g0000000000000000094',\r\n// 'shipperpartyid': 'testcustom',\r\n// 'awb': 'h00030',\r\n// 'origin': 'dallas ft. worth',\r\n// 'destination': '',\r\n// 'totalchargeableweight': '',\r\n// 'consigneepartyid': 'testcustom',\r\n// 'businesstype': 'air export',\r\n// 'consigneecity': 'atlanta',\r\n// 'totalgrossweight': '',\r\n// 'consigneecountry': 'united states',\r\n// 'customergroup': '',\r\n// 'totalpieces': '',\r\n// 'duedate': '',\r\n// 'shippercity': 'atlanta',\r\n// 'servicelevelcode': '',\r\n// 'customerpartyid': 'testcustom',\r\n// 'servicelevel': ''\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.showAdvSearch\r\n * @description to display the advanced search md-dialog\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.showCustomizeResults\r\n * @description to display the customize results md-dialog\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.selectRange\r\n * @description sets quick search fields to a preselected range of dates\r\n * @param {$event} - md-select ng-change triggered event\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.getActiveShipments\r\n * @description queries the database for shipments that are UNDELIVERED and active now\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.getShipments\r\n * @description gets the shipments from TrackTraceService\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.hideLoadAnimation\r\n * @description hides the load animation\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.quickSearch\r\n * @description makes the query for a quick search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.search\r\n * @description runs the search from AdvSearchCfsService\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.showAdvSearch\r\n * @description shows the advance search modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.showCustomizeResults\r\n * @description shows the customize results modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.showLoadAnimation\r\n * @description shows the load animation\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.showNoShippmentsAlert\r\n * @description shows an alert when there is no shippents back from the query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceCfsController.toggleLimitOptions\r\n * @description toggles how many shipments are shown\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('TrackTraceCfsController', TrackTraceCfsController);\r\n\r\n /** @ngInject */\r\n TrackTraceCfsController.$inject = ['$scope','$rootScope', 'mdSelectHelper', 'TrackTraceCfsService','UserService', 'CustomResultsCfsService', 'AdvSearchCfsService', \"ServerTableCfsService\", '$log', '$filter', '$translatePartialLoader', '$mdDialog', '$mdMedia', '$location', '$http', \"$stateParams\", '$q', '$translate', 'ContactsService', 'permissions', 'TrackTraceCfsPaginationService'];\r\n function TrackTraceCfsController($scope, $rootScope, mdSelectHelper, TrackTraceCfsService, UserService, CustomResultsCfsService, AdvSearchCfsService, ServerTableCfsService, $log, $filter ,$translatePartialLoader, $mdDialog, $mdMedia, $location, $http, $stateParams, $q, $translate, ContactsService, permissions, TrackTraceCfsPaginationService) {\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('tracktrace');\r\n\r\n //variables\r\n var vm = this;\r\n vm.data;\r\n vm.loading = false; //flag to activate the loading screen\r\n vm.loadingState = ServerTableCfsService.getState(); //flag to activate the module loading screen\r\n vm.aljex_due_start_date = null;\r\n vm.aljex_due_end_date = null;\r\n vm.ship_start_date = null;\r\n vm.ship_end_date = null;\r\n vm.aljex_estimated_start_date = null;\r\n vm.aljex_estimated_end_date = null;\r\n vm.isAwbBolQuickSearch = false;\r\n vm.quickFilters = [];\r\n vm.isFilteredOut = {active: false, potential: false, exception: false};\r\n vm.isFilterActive = {active: false, potential: false, exception: false}; // fricken angular..no why would I want to || something in a view?!\r\n //vm.isFilterLoading = {active: false, potential: false, exception: false};\r\n\r\n vm.queryState = TrackTraceCfsService.getQueryState();\r\n //.isFilterLoading = TrackTraceService.getFilterLoading();\r\n vm.getMatch = getMatch;\r\n vm.queryVal = '';\r\n\r\n vm.statusOptionsVar = [];\r\n\r\n TrackTraceCfsService.getStatusOptions().then(function(response){\r\n\r\n vm.statusOptionsVar = response;\r\n\r\n }).catch(function(error) {\r\n //debugger;\r\n });\r\n\r\n\r\n\r\n // Set initial search type to reference number\r\n //vm.aljexSearchType = 'reference';\r\n vm.aljexSearchType = 'shipment_status';\r\n vm.aljexDueDateRangeSelect = null;\r\n vm.consigneeDateRangeSelect = null;\r\n vm.pickupDateRangeSelect = null;\r\n vm.hasExportPermissions = UserService.canAccess(permissions.shipment.export);\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n vm.aljexMinDate = \"'\" + (moment().subtract(13, 'months').format('YYYY-MM-DD')) + \"'\";\r\n vm.filterLabels = {\r\n active: 'TRACKTRACE.FILTER',\r\n exception: 'TRACKTRACE.FILTER',\r\n potential: 'TRACKTRACE.FILTER',\r\n }\r\n\r\n // Quarter math\r\n var quarterAdjustment= (moment().month() % 3) + 1;\r\n var lastQuarterEndDate = moment().subtract({ months: quarterAdjustment }).endOf('month');\r\n var lastQuarterStartDate = lastQuarterEndDate.clone().subtract({ months: 2 }).startOf('month');\r\n\r\n // Set up predetermined ranges for user to select from\r\n vm.aljexRanges = [\r\n {\r\n name: 'Last Year',\r\n start: moment().subtract(1, 'y'),\r\n end: moment()\r\n },\r\n {\r\n name: 'Last Quarter',\r\n start: lastQuarterStartDate,\r\n end: lastQuarterEndDate\r\n },\r\n {\r\n name: 'Last Month',\r\n start: moment().subtract({ months: 1 }).startOf('month'),\r\n end: moment().subtract({ months: 1 }).endOf('month'),\r\n }\r\n ];\r\n\r\n // Functions\r\n vm.filter = filter;\r\n // vm.isFiltered = isFiltered;\r\n vm.getActiveShipments = getActiveShipments;\r\n vm.getShipment = getShipment;\r\n vm.getShipments = getShipments;\r\n vm.hideLoadAnimation = hideLoadAnimation;\r\n vm.quickSearch = quickSearch;\r\n // vm.search = search;\r\n vm.showCustomizeResults = showCustomizeResults;\r\n vm.showLoadAnimation = showLoadAnimation;\r\n vm.showNoShippmentsAlert = showNoShippmentsAlert;\r\n vm.toggleLimitOptions = toggleLimitOptions;\r\n vm.showExportCSV = showExportCSV;\r\n vm.selectRange = selectRange;\r\n vm.dateChanged = dateChanged;\r\n vm.visualize = visualize;\r\n vm.hardRefresh = hardRefresh;\r\n vm.refresh = function(){ServerTableCfsService.reloadTable()};\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n vm.aljexSearchChange = aljexSearchChange;\r\n\r\n /* Run Setup services */\r\n vm.getShipments();\r\n AdvSearchCfsService.getSearch();\r\n ContactsService.setSubjectStatuses({trackTrace: {exceptions: false, results: true}});\r\n\r\n $rootScope.$on('cleared_quicksearch', function(ev, logs){\r\n vm.searchDestinationText = '';\r\n vm.searchOriginText = '';\r\n vm.queryVal = '';\r\n\r\n //consignee date\r\n vm.consigneeapptdateRangeIsSelected = false;\r\n vm.consigneeDateRangeSelect = null;\r\n vm.consigneeapptdate_start_date = null;\r\n vm.consigneeapptdate_end_date = null;\r\n vm.consigneeapptdate_start_date_new = null;\r\n vm.consigneeapptdate_end_date_new = null;\r\n\r\n //delivery date\r\n vm.deliverydateRangeIsSelected = false;\r\n vm.deliveryDateRangeSelect = null;\r\n vm.deliverydate_start_date = null;\r\n vm.deliverydate_end_date = null;\r\n vm.deliverydate_start_date_new = null;\r\n vm.deliverydate_end_date_new = null;\r\n\r\n //pickup appt date\r\n vm.pickupapptdateRangeIsSelected = false;\r\n vm.pickupDateRangeSelect = null;\r\n vm.pickupapptdate_start_date = null;\r\n vm.pickupapptdate_end_date = null;\r\n vm.pickupapptdate_start_date_new = null;\r\n vm.pickupapptdate_end_date_new = null;\r\n\r\n angular.element(document.querySelectorAll('.clear-fields')).val('');\r\n });\r\n\r\n /** Customize Results Call **/\r\n vm.customFullscreen = $mdMedia('xs') || $mdMedia('sm');\r\n\r\n var queries = $location.search();\r\n\r\n var page_number = 1;\r\n if(UserService.getUserTableSettings()){\r\n var per_page = UserService.getUserTableSettings();\r\n }else{\r\n var per_page = 10;\r\n }\r\n\r\n TrackTraceCfsPaginationService.save_page_number(page_number);\r\n TrackTraceCfsPaginationService.save_per_page(per_page);\r\n\r\n var searchParamsCount = 0;\r\n\r\n for(var test in queries){\r\n\r\n if(test){\r\n searchParamsCount += 1;\r\n }\r\n\r\n }\r\n\r\n queries.page = page_number;\r\n queries.per_page = per_page;\r\n\r\n var newParams = {};\r\n\r\n angular.forEach(queries, function(obj, key) {\r\n\r\n if(obj){\r\n newParams[key] = obj;\r\n }\r\n\r\n });\r\n\r\n if(searchParamsCount <= 0 ){\r\n\r\n var currentSearchFields = JSON.parse(AdvSearchCfsService.getLastSearchLocally());\r\n\r\n if(currentSearchFields){\r\n\r\n angular.forEach(Object.keys(currentSearchFields), function(k) {\r\n\r\n if (currentSearchFields[k].value) {\r\n newParams[k] = currentSearchFields[k].value;\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n $location.search(newParams);\r\n\r\n\r\n // see if we have paramters in the toolbar\r\n var paramSearchFields = AdvSearchCfsService.getEmptySearchFields(),\r\n foundParamSearch = false,\r\n disableUrlReplacement = false;\r\n angular.forEach(paramSearchFields, function(obj, key) {\r\n var v = $location.search()[key] || $location.search()[key + \"[]\"];\r\n\r\n if (v !== undefined) {\r\n\r\n foundParamSearch = true;\r\n if(key.includes('date')){\r\n //paramSearchFields[key].value = new Date(v);\r\n var findAndTextInDateRange = v.search(\"and\");\r\n\r\n if(findAndTextInDateRange == -1){\r\n //debugger;\r\n //paramSearchFields[key].value = v;\r\n\r\n var newV = new Date(v);\r\n newV = newV.toString().split(\" \");\r\n\r\n v = newV[1]+' '+newV[2]+' '+newV[3];\r\n\r\n paramSearchFields[key].value = v;\r\n\r\n\r\n }else{\r\n //debugger;\r\n paramSearchFields[key].value = v;\r\n }\r\n\r\n //paramSearchFields[key].value = v;\r\n } else {\r\n //For some reason when filtering by ?status=0 via the active shipments widgets\r\n // the param is not being set as part of the search params\r\n paramSearchFields[key].value = v === 0 ? v.toString() : v;\r\n }\r\n }\r\n\r\n });\r\n if ($stateParams.potential){\r\n var searchFields = AdvSearchCfsService.getEmptySearchFields();\r\n searchFields.potential_exception_id.value = $stateParams.potential;\r\n AdvSearchCfsService.setCurrentSearchFields(searchFields);\r\n }\r\n\r\n if (foundParamSearch || $stateParams.potential) {\r\n disableUrlReplacement = true;\r\n AdvSearchCfsService.setCurrentSearchFields(paramSearchFields, true);\r\n if ($location.search()['current_exception']) {\r\n filter('exception', true);\r\n }\r\n else if ($location.search()['potential_exception']){\r\n filter('potential', true);\r\n }\r\n // else {\r\n // vm.search({});\r\n // }\r\n disableUrlReplacement = false;\r\n }\r\n // no URLsearch parameters\r\n else {\r\n //load the default search if there is one\r\n AdvSearchCfsService.listSavedSearches().then(function(res){\r\n var isSavedSearch = res['data'].length > 0;\r\n // var searchFields = JSON.parse(localStorage.getItem(\"query\"));\r\n // AdvSearchCfsService.setCurrentSearchFields(searchFields);\r\n if( AdvSearchCfsService.getIsFirstSearch() && isSavedSearch) { //if there is a default search\r\n AdvSearchCfsService.loadSearch((res['data'])['0'].id).then(function(res) {\r\n var searchFields = AdvSearchCfsService.getCurrentSearchFields();\r\n var data = res['data'];\r\n for (var field in searchFields) {\r\n if(data[field] != null) searchFields[field].value = data[field];\r\n }\r\n AdvSearchCfsService.setCurrentSearchFields(searchFields);\r\n // vm.search({});\r\n AdvSearchCfsService.setIsFirstSearch(false); //Not the first search anymore\r\n });\r\n } else if(AdvSearchCfsService.getLastSearchLocally()) { //run the last saved search\r\n\r\n AdvSearchCfsService.setCurrentSearchFields(JSON.parse(AdvSearchCfsService.getLastSearchLocally()));\r\n setFilterButtons(); //sets the top filter buttons if there is one in the searchFields\r\n } else { //else run the normal search\r\n // vm.search({});\r\n setFilterButtons(); //sets the top filter buttons if there is one in the searchFields\r\n }\r\n });\r\n }\r\n\r\n function aljexSearchChange(searchType){\r\n\r\n vm.searchDestinationText = '';\r\n vm.searchOriginText = '';\r\n vm.queryVal = '';\r\n\r\n //consignee date\r\n vm.consigneeapptdateRangeIsSelected = false;\r\n vm.consigneeDateRangeSelect = null;\r\n vm.consigneeapptdate_start_date = null;\r\n vm.consigneeapptdate_end_date = null;\r\n vm.consigneeapptdate_start_date_new = null;\r\n vm.consigneeapptdate_end_date_new = null;\r\n\r\n //delivery date\r\n vm.deliverydateRangeIsSelected = false;\r\n vm.deliveryDateRangeSelect = null;\r\n vm.deliverydate_start_date = null;\r\n vm.deliverydate_end_date = null;\r\n vm.deliverydate_start_date_new = null;\r\n vm.deliverydate_end_date_new = null;\r\n\r\n //pickup appt date\r\n vm.pickupapptdateRangeIsSelected = false;\r\n vm.pickupDateRangeSelect = null;\r\n vm.pickupapptdate_start_date = null;\r\n vm.pickupapptdate_end_date = null;\r\n vm.pickupapptdate_start_date_new = null;\r\n vm.pickupapptdate_end_date_new = null;\r\n\r\n angular.element(document.querySelectorAll('.clear-fields')).val('');\r\n\r\n vm.aljexSearchType = searchType;\r\n }\r\n\r\n function getMatch(query){\r\n\r\n if(query != undefined && query != null){\r\n return TrackTraceCfsService.autoComplete({value: query});\r\n }\r\n\r\n }\r\n\r\n function visualize() {\r\n $location.url($location.url().replace('track-trace', 'track-trace/viz'));\r\n }\r\n\r\n function hardRefresh(keyCodeString){\r\n var hardRefreshCodes = ['116-shiftKey', '82-metaKey-shiftKey', '116-ctrlKey'];\r\n\r\n // hard_refresh_codes.forEach(function(val){\r\n // var key_arr = val.split('-');\r\n // var key = key_arr.shift();\r\n // var modifiers_pressed = eval(key_arr.map(\r\n // function(val){return event[val]}).join(' & '));\r\n\r\n if (hardRefreshCodes.includes(keyCodeString)) {\r\n event.preventDefault();\r\n localStorage.setItem('invalidateCache', true);\r\n location.reload(true);\r\n\r\n }\r\n\r\n }\r\n\r\n function selectRange() {\r\n\r\n if (vm.aljexSearchType == 'consigneeapptdate') {\r\n vm.consigneeapptdateRangeIsSelected = true;\r\n // Reset other search values\r\n vm.pickupDateRangeSelect = null;\r\n vm.pickupapptdate_start_date = null;\r\n vm.pickupapptdate_end_date = null;\r\n vm.pickupapptdate_start_date_new = null;\r\n vm.pickupapptdate_end_date_new = null;\r\n vm.deliveryDateRangeSelect = null;\r\n vm.deliverydate_start_date = null;\r\n vm.deliverydate_end_date = null;\r\n vm.deliverydate_start_date_new = null;\r\n vm.deliverydate_end_date_new = null;\r\n\r\n var range = JSON.parse(vm.consigneeDateRangeSelect);\r\n\r\n vm.consigneeapptdate_start_date = new Date(range.start);\r\n vm.consigneeapptdate_end_date = new Date(range.end);\r\n\r\n vm.consigneeapptdate_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.consigneeapptdate_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n } else if (vm.aljexSearchType == 'pickupapptdate') {\r\n vm.pickupapptdateRangeIsSelected = true;\r\n // Reset other search values\r\n vm.consigneeDateRangeSelect = null;\r\n vm.consigneeapptdate_start_date = null;\r\n vm.consigneeapptdate_end_date = null;\r\n vm.consigneeapptdate_start_date_new = null;\r\n vm.consigneeapptdate_end_date_new = null;\r\n vm.deliveryDateRangeSelect = null;\r\n vm.deliverydate_start_date = null;\r\n vm.deliverydate_end_date = null;\r\n vm.deliverydate_start_date_new = null;\r\n vm.deliverydate_end_date_new = null;\r\n\r\n\r\n //vm.pickupDateRangeSelect = null;\r\n //vm.aljex_estimated_start_date = null;\r\n //vm.aljex_estimated_end_date = null;\r\n\r\n var range = JSON.parse(vm.pickupDateRangeSelect);\r\n\r\n vm.pickupapptdate_start_date = new Date(range.start);\r\n vm.pickupapptdate_end_date = new Date(range.end);\r\n\r\n vm.pickupapptdate_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.pickupapptdate_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n } else if(vm.aljexSearchType == 'deliverydate'){\r\n\r\n vm.pickupDateRangeSelect = null;\r\n vm.pickupapptdate_start_date = null;\r\n vm.pickupapptdate_end_date = null;\r\n vm.pickupapptdate_start_date_new = null;\r\n vm.pickupapptdate_end_date_new = null;\r\n vm.consigneeDateRangeSelect = null;\r\n vm.consigneeapptdate_start_date = null;\r\n vm.consigneeapptdate_end_date = null;\r\n vm.consigneeapptdate_start_date_new = null;\r\n vm.consigneeapptdate_end_date_new = null;\r\n\r\n vm.deliverydateRangeIsSelected = true;\r\n\r\n var range = JSON.parse(vm.deliveryDateRangeSelect);\r\n\r\n vm.deliverydate_start_date = new Date(range.start);\r\n vm.deliverydate_end_date = new Date(range.end);\r\n\r\n vm.deliverydate_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.deliverydate_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n }\r\n\r\n }\r\n\r\n function dateChanged() {\r\n\r\n vm.pickupDateRangeSelect = '';\r\n vm.pickupapptdateRangeIsSelected = false;\r\n vm.consigneeDateRangeSelect = '';\r\n vm.consigneeapptdateRangeIsSelected = false;\r\n vm.deliveryDateRangeSelect = '';\r\n vm.deliverydateRangeIsSelected = false;\r\n\r\n vm.pickupapptdate_start_date_new = '';\r\n vm.pickupapptdate_end_date_new = '';\r\n\r\n vm.consigneeapptdate_start_date_new = '';\r\n vm.consigneeapptdate_end_date_new = '';\r\n\r\n vm.deliverydate_start_date_new = '';\r\n vm.deliverydate_end_date_new = '';\r\n\r\n }\r\n\r\n function toggleLimitOptions() {\r\n vm.limitOptions = vm.limitOptions ? undefined : [10, 25, 50];\r\n }\r\n\r\n //function to display alert if there are now shipments form the search\r\n function showNoShippmentsAlert() {\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.querySelector('#popupContainer')))\r\n .clickOutsideToClose(true)\r\n .title('No shipment Results!')\r\n .textContent('Try a different search to get more results.')\r\n .ariaLabel('Alert Dialog Demo')\r\n .ok('Got it!')\r\n );\r\n }\r\n\r\n // function isFiltered(type) {\r\n // if (vm.quickFilters.length > 0) {\r\n // if (vm.quickFilters.indexOf(type) !== -1) {\r\n // return true;\r\n // } else {\r\n // return false;\r\n // }\r\n // } else {\r\n // return true;\r\n // }\r\n // }\r\n\r\n function filter(type, disableUrlReplacement){\r\n vm.quickFilters = [];\r\n var searchFields = angular.copy(AdvSearchCfsService.getCurrentSearchFields());\r\n\r\n // only allow one filter at a time\r\n searchFields.quick_filter.value.length = 0;\r\n\r\n switch (type){\r\n case \"exception\":\r\n if (vm.filterLabels.exception == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('exception');\r\n searchFields.quick_filter.value.push(\"exception\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n }\r\n break;\r\n case \"potential\":\r\n if (vm.filterLabels.potential == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('potential');\r\n searchFields.quick_filter.value.push(\"potential\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n }\r\n break;\r\n case \"active\":\r\n if (vm.filterLabels.active == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('active');\r\n searchFields.quick_filter.value.push(\"active\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n // var index = searchFields.quick_filter.value.indexOf('active');\r\n // if(index > -1) {\r\n // searchFields.quick_filter.value.splice(index, 1);\r\n // }\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n vm.quickFilters = searchFields.quick_filter.value;\r\n AdvSearchCfsService.setCurrentSearchFields(searchFields, disableUrlReplacement);\r\n vm.queryState.isFilterLoading[type] = true;\r\n }\r\n\r\n //sets the attributes of a filtered search\r\n function setFilterDisplayWithActiveFilter(filteredType) {\r\n var isActive = filteredType == 'active',\r\n isException = filteredType == 'exception',\r\n isPotentialException = filteredType == 'potential';\r\n\r\n vm.filterLabels.active = isActive ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n vm.filterLabels.exception = isException ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n vm.filterLabels.potential = isPotentialException ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n\r\n vm.isFilteredOut.active = !isActive && filteredType;\r\n vm.isFilteredOut.exception = !isException && filteredType;\r\n vm.isFilteredOut.potential = !isPotentialException && filteredType;\r\n\r\n vm.isFilterActive.active = isActive;\r\n vm.isFilterActive.exception = isException;\r\n vm.isFilterActive.potential = isPotentialException;\r\n }\r\n\r\n //sets the filter buttons on first time track and trace came in\r\n function setFilterButtons() {\r\n var searchFields = AdvSearchCfsService.getCurrentSearchFields();\r\n searchFields.quick_filter.value.forEach(function(filterType) {\r\n setFilterDisplayWithActiveFilter(filterType);\r\n }, this);\r\n }\r\n\r\n function getActiveColumns(){\r\n return CustomResultsCfsService.getActiveColumns();\r\n }\r\n\r\n function getShipments(){\r\n vm.data = TrackTraceCfsService.getShipments();\r\n }\r\n\r\n function getActiveShipments(){\r\n var searchFields = angular.copy(AdvSearchCfsService.getCurrentSearchFields());\r\n for (var field in searchFields) {\r\n searchFields[field].value = \"\"; //reset the fields\r\n }\r\n searchFields.status.value = \"1\"; //set the status for active shipments\r\n AdvSearchCfsService.setCurrentSearchFields(searchFields);\r\n }\r\n\r\n function getShipment(shipment, event){\r\n if (event.button == 1) return; // ignore middle clicks\r\n if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'a') return; // ignore clicks on the links\r\n window.open(\"/shipping-details/\"+shipment.gshpid);\r\n }\r\n\r\n var searchTimeoutPromise = false;\r\n\r\n // function search(query){\r\n // // vm.queryState.showLoading = true;\r\n // // AdvSearchCfsService.search(query, searchTimeoutPromise);\r\n\r\n // // if(vm.isAwbBolQuickSearch && result.length == 1) { //if only one shipment and searched with AWB/BOL redirect them to the details\r\n // // $location.url('/shipping-details/' + result[0].gshpid);\r\n // // vm.isAwbBolQuickSearch = false;\r\n // // }\r\n // }\r\n\r\n function quickSearch(query){\r\n\r\n var searchFields = angular.copy(AdvSearchCfsService.getEmptySearchFields());\r\n\r\n /* */\r\n if(vm.pickupapptdate_start_date){\r\n vm.pickupapptdate_start_date_new = moment(vm.pickupapptdate_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.pickupapptdate_end_date){\r\n vm.pickupapptdate_end_date_new = moment(vm.pickupapptdate_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.consigneeapptdate_start_date){\r\n vm.consigneeapptdate_start_date_new = moment(vm.consigneeapptdate_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.consigneeapptdate_end_date){\r\n vm.consigneeapptdate_end_date_new = moment(vm.consigneeapptdate_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.deliverydate_start_date){\r\n vm.deliverydate_start_date_new = moment(vm.deliverydate_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.deliverydate_end_date){\r\n vm.deliverydate_end_date_new = moment(vm.deliverydate_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n\r\n\r\n\r\n if(vm.aljexSearchType == 'pickupapptdate') { //if its a due date add the inputs filtered to dates\r\n if (vm.pickupapptdate_start_date_new) {\r\n searchFields['pickupapptdate_from'].value = vm.pickupapptdate_start_date_new;\r\n }\r\n if (vm.pickupapptdate_end_date_new) {\r\n searchFields['pickupapptdate_to'].value = vm.pickupapptdate_end_date_new;\r\n }\r\n } else if(vm.aljexSearchType == 'consigneeapptdate') {\r\n if (vm.consigneeapptdate_start_date_new) {\r\n searchFields['consigneeapptdate_from'].value = vm.consigneeapptdate_start_date_new;\r\n }\r\n if (vm.consigneeapptdate_end_date_new) {\r\n searchFields['consigneeapptdate_to'].value = vm.consigneeapptdate_end_date_new;\r\n }\r\n }else if(vm.aljexSearchType == 'deliverydate') {\r\n if (vm.deliverydate_start_date_new) {\r\n searchFields['deliverydate_from'].value = vm.deliverydate_start_date_new;\r\n }\r\n if (vm.deliverydate_end_date_new) {\r\n searchFields['deliverydate_to'].value = vm.deliverydate_end_date_new;\r\n }\r\n }else if(vm.aljexSearchType == 'originstate'){\r\n searchFields['originstate'].value = vm.searchOriginText;\r\n }\r\n else if(vm.aljexSearchType == 'destinationstate'){\r\n searchFields['destinationstate'].value = vm.searchDestinationText;\r\n }\r\n else {\r\n searchFields[vm.aljexSearchType].value = query;\r\n }\r\n\r\n TrackTraceCfsPaginationService.save_page_number(1);\r\n TrackTraceCfsPaginationService.save_per_page(10);\r\n\r\n AdvSearchCfsService.setCurrentSearchFields(searchFields);\r\n\r\n }\r\n\r\n function showExportCSV(ev){\r\n if (vm.queryState.displayNoResults) { return; }\r\n\r\n var params = ServerTableCfsService.getParams();\r\n $scope.exportCsvLoaded = false;\r\n AdvSearchCfsService.exportSearchFields([], params).then(function () {\r\n $scope.exportCsvLoaded = true;\r\n }).catch(function() {\r\n $mdDialog.hide();\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n\r\n // Show the advanced search md-dialog\r\n function showCustomizeResults(ev) {\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/track-trace/track-trace-cfs/customize-results/customize-results-cfs.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n vm.status = 'You said the information was \"' + answer + '\".';\r\n }, function() {\r\n vm.status = 'You cancelled the dialog.';\r\n });\r\n }\r\n\r\n // shows the loading animation\r\n function showLoadAnimation() {\r\n vm.loading = true;\r\n }\r\n\r\n //hides the loading animation\r\n function hideLoadAnimation(ev) {\r\n vm.loading = false;\r\n }\r\n }\r\n})();\r\n\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('TrackTraceCfsPaginationService', TrackTraceCfsPaginationService);\r\n\r\n /** @ngInject */\r\n TrackTraceCfsPaginationService.$inject = ['$http', '$log', 'api', '$q', '$timeout', 'AJAX', 'UserService' ];\r\n function TrackTraceCfsPaginationService($http, $log, api, $q, $timeout , AJAX, UserService) { \r\n \r\n var vm = this;\r\n\r\n vm.page_number = 1;\r\n\r\n if(UserService.getUserTableSettings()){\r\n vm.per_page = UserService.getUserTableSettings();\r\n }else{\r\n vm.per_page = 10;\r\n }\r\n\r\n function get_page_number(){\r\n return parseInt(vm.page_number);\r\n }\r\n\r\n function get_per_page(){\r\n return parseInt(vm.per_page);\r\n }\r\n\r\n function save_page_number(paginate){ \r\n vm.page_number = paginate;\r\n return true; \r\n }\r\n\r\n function save_per_page(paginate){\r\n vm.per_page = paginate;\r\n vm.page_number = 1;\r\n return true;\r\n //$rootScope.page_number = $rootScope.page_number + 1;\r\n }\r\n\r\n return{\r\n get_page_number: get_page_number,\r\n get_per_page: get_per_page,\r\n save_page_number: save_page_number,\r\n save_per_page: save_per_page\r\n }\r\n \r\n \r\n }\r\n\r\n})();\r\n\r\n// 'servicetype': '',\r\n// 'shipdate': '11-AUG-08',\r\n// 'consigneeaddress4': '',\r\n// 'shipperaddress1': '1234 MAIN',\r\n// 'shipperaddress2': '',\r\n// 'shipperaddress3': '',\r\n// 'shipperaddress4': '',\r\n// 'consigneeaddress1': '1234 MAIN',\r\n// 'consigneeaddress2': '',\r\n// 'consigneeaddress3': '',\r\n// 'jobunid': '100',\r\n// 'departuredate': '',\r\n// 'shipperzipcode': '30033',\r\n// 'shippername': 'test customer',\r\n// 'customername': 'test customer',\r\n// 'bookingnumber': '',\r\n// 'consigneezipcode': '30033',\r\n// 'consigneename': 'test customer',\r\n// 'servicetypecode': '',\r\n// 'gshpid': 'g0000000000000000094',\r\n// 'shipperpartyid': 'testcustom',\r\n// 'awb': 'h00030',\r\n// 'origin': 'dallas ft. worth',\r\n// 'destination': '',\r\n// 'totalchargeableweight': '',\r\n// 'consigneepartyid': 'testcustom',\r\n// 'businesstype': 'air export',\r\n// 'consigneecity': 'atlanta',\r\n// 'totalgrossweight': '',\r\n// 'consigneecountry': 'united states',\r\n// 'customergroup': '',\r\n// 'totalpieces': '',\r\n// 'duedate': '',\r\n// 'shippercity': 'atlanta',\r\n// 'servicelevelcode': '',\r\n// 'customerpartyid': 'testcustom',\r\n// 'servicelevel': ''\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('ServerTableService', ServerTableService);\r\n\r\n /** @ngInject */\r\n ServerTableService.$inject = ['ngTableDefaults', '$rootScope', '$q', '$http', '$log', 'api', 'NgTableParams', \"TrackTraceService\", 'AdvSearchService', 'UserService', '$location', 'TrackTracePaginationService', '$timeout'];\r\n function ServerTableService(ngTableDefaults, $rootScope, $q, $http, $log, api, NgTableParams, TrackTraceService, AdvSearchService, UserService, $location, TrackTracePaginationService, $timeout) {\r\n\r\n $rootScope.ngTableChangess = 0 ;\r\n $rootScope.shipmentDatas = '';\r\n $rootScope.resps = '';\r\n $rootScope.totals = 0;\r\n\r\n var table_filters = {};\r\n\r\n var query = {},\r\n data,\r\n isEmpty = true,\r\n // ngTable = genTable(),\r\n state = {\r\n loading: false\r\n },\r\n timeoutPromise,\r\n searchRequest,\r\n query = AdvSearchService.getCurrentSearch(),\r\n ngTable = new NgTableParams(\r\n {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: { duedate: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n // *** TURNED THIS FEATURE OFF TO MAKE ALL TABLES HAVE UNIFORM COUNTS\r\n // var pageSizes = [\r\n // { label: \"5 10 20\", sizes: [5,10,20] },\r\n // { label: \"10 20 50\", sizes: [10,20,50] }\r\n // ];\r\n var defaultSettings = {\r\n counts: [10,25,50,100],\r\n defaultSort: \"asc\",\r\n filterOptions: {\r\n filterComparator: true\r\n }\r\n };\r\n\r\n var initialSorting = [\r\n { label: \"Id ASC\", value: { id: \"asc\"} },\r\n { label: \"Id DESC\", value: { id: \"desc\"} },\r\n { label: \"Name ASC\", value: { name: \"asc\"} },\r\n { label: \"Name DESC\", value: { name: \"desc\"} }\r\n ];\r\n var initialParams = {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n sorting: undefined\r\n };\r\n\r\n function genTable(){\r\n return new NgTableParams(\r\n {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: { duedate: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n getData: getData\r\n });\r\n }\r\n\r\n\r\n function sortFields(orderBy, sorting){\r\n var result = [];\r\n for (var i in orderBy){\r\n if (!isNaN(+i)){\r\n var x = orderBy[i].replace(/[+-]/g,\"\");\r\n var p = {};\r\n p[x] = sorting[x];\r\n result.push(p);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function getQuery() {return query;}\r\n\r\n function getData(params, queryParameterName, queryParameterValue, sort_params ){\r\n if(queryParameterName){\r\n table_filters[queryParameterName] = queryParameterValue;\r\n }\r\n\r\n query = AdvSearchService.getCurrentSearch();\r\n\r\n var search = {};\r\n var new_url = {};\r\n \r\n /*for (var q in query){\r\n search[q] = query[q];\r\n }*/\r\n\r\n if (params && params['invalidate_cache'] === true || localStorage.getItem('invalidateCache') === 'true'){\r\n search['invalidate_cache'] = true;\r\n localStorage.setItem('invalidateCache', false);\r\n }\r\n\r\n state.loading = true;\r\n $rootScope.$broadcast(\"serverTable:stateChanged\", state);\r\n\r\n //$location.search(query);\r\n\r\n for (var r in table_filters){\r\n search[r] = table_filters[r];\r\n }\r\n\r\n for (var q in query){\r\n if(q == 'quick_filter'){\r\n\r\n if(query.quick_filter[0] == 'active'){\r\n search['status'] = 0;\r\n }\r\n\r\n if(query.quick_filter[0] == 'exception'){\r\n search['current_exception'] = 1;\r\n }\r\n\r\n if(query.quick_filter[0] == 'potential'){\r\n search['potential_exception'] = 1;\r\n }\r\n \r\n }else{\r\n search[q] = query[q];\r\n }\r\n \r\n }\r\n\r\n for (var q in sort_params){\r\n search[q] = sort_params[q];\r\n }\r\n\r\n //To clean[remove] null and undefined params values\r\n for (var propName in search) {\r\n if (search[propName] === null || search[propName] === undefined || search[propName] === '' ) {\r\n delete search[propName];\r\n }\r\n }\r\n\r\n var page_number = TrackTracePaginationService.get_page_number();\r\n var per_page = TrackTracePaginationService.get_per_page();\r\n var searchCriteria = TrackTracePaginationService.get_sort_params();\r\n search.page = page_number;\r\n search.per_page = per_page;\r\n if(searchCriteria){\r\n search.key = searchCriteria.key;\r\n search.criteria = searchCriteria.criteria;\r\n }\r\n\r\n new_url.page = page_number;\r\n new_url.per_page = per_page;\r\n \r\n // URL Rewriting with new params\r\n //$location.search(search);\r\n\r\n return TrackTraceService.queryShipments(search, timeoutPromise).then(\r\n function(resp){\r\n\r\n if (resp && resp.name && resp.name === \"Error\"){\r\n resp.total = 0;\r\n return [];\r\n // // console.log(resp.message);\r\n\r\n }\r\n\r\n if (resp && ![422, 500, 503].every(function(status){ return status != resp.status;})){\r\n resp.total = 0;\r\n resp.error = \"The search returned no results.\";\r\n }\r\n\r\n if(query['reference_number']=='Global Search'){\r\n resp.total = localStorage.getItem(\"globalSearchCount\");\r\n resp.shipments = JSON.parse(localStorage.getItem(\"globalSearchData\"));\r\n }\r\n\r\n isEmpty = resp.total == 0;\r\n state.loading = false;\r\n var error = resp.error ? resp.error : undefined;\r\n /*ngTable.settings({data: resp.shipments})\r\n ngTable.data = resp.shipments;\r\n var total_shipments = isEmpty ? 0 : resp.shipments.length;\r\n ngTable.total(total_shipments);\r\n ngTable.reload();\r\n $rootScope.$broadcast(\"serverTable:stateChanged\", state);\r\n $rootScope.$broadcast(\"serverTable:loaded\", resp.shipments, error, resp);\r\n AdvSearchService.clearTimeout();*/\r\n\r\n ngTable.settings({data: resp.shipments});\r\n ngTable.total(resp.total);\r\n ngTable.page(page_number);\r\n ngTable.count(per_page);\r\n\r\n ngTable.reload();\r\n\r\n\r\n ngTable = new NgTableParams(\r\n {\r\n page: TrackTracePaginationService.get_page_number(),\r\n count: TrackTracePaginationService.get_per_page(), // count per page\r\n }, {\r\n total: resp.total, // length of data\r\n getData: function ($defer, params) {\r\n params.total(resp.total);\r\n\r\n //var filtered_data = $filter('filter')($rootScope.shipmentDatas, params.filter());\r\n //var ordered_data = $filter('orderBy')($rootScope.shipmentDatas, params.orderBy());\r\n\r\n $defer.resolve(resp.shipments);\r\n\r\n }\r\n });\r\n\r\n ngTable.reload();\r\n\r\n $rootScope.$broadcast(\"serverTable:stateChanged\", state);\r\n $rootScope.$broadcast(\"serverTable:loaded\", resp.shipments, error, resp);\r\n AdvSearchService.clearTimeout();\r\n\r\n $timeout(function () {\r\n\r\n ngTable = new NgTableParams(\r\n {\r\n page: TrackTracePaginationService.get_page_number(),\r\n count: TrackTracePaginationService.get_per_page() // count per page\r\n });\r\n\r\n ngTable.reload();\r\n\r\n }, 2000);\r\n\r\n return resp.shipments;\r\n });\r\n\r\n }\r\n\r\n\r\n\r\n return {\r\n getState: function(){return state;},\r\n // genTable: genTable,\r\n sortFields: sortFields,\r\n getData: getData,\r\n getParams: function(){\r\n return ngTable.parameters();\r\n },\r\n isEmpty: function(){return isEmpty;},\r\n getTable: function(){ return ngTable;},\r\n getTableParams: function(){return ngTable;},\r\n reloadTable: function(){\r\n\r\n\r\n // $rootScope.$broadcast(\"ngTableParamsChanged\", ngTableDefaults);\r\n return getData({\"invalidate_cache\":true});\r\n //\r\n //return ngTable.reload();\r\n },\r\n getQuery: getQuery,\r\n setQuery: function() {\r\n if (searchRequest){\r\n timeoutPromise.resolve('newSearch');\r\n timeoutPromise = $q.defer();\r\n } else {\r\n timeoutPromise = $q.defer();\r\n }\r\n ngTableDefaults.settings = angular.extend({}, ngTableDefaults.settings, defaultSettings);\r\n ngTableDefaults.params = angular.extend({}, ngTableDefaults.params, initialParams);\r\n $rootScope.$broadcast(\"ngTableParamsChanged\", ngTableDefaults);\r\n searchRequest = getData();\r\n return searchRequest;\r\n }\r\n };\r\n }\r\n\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name ServerTableController.getData()\r\n * @description method retrieves data from the AdvSearchService to generate the table\r\n * @param {params} - provides an object of parameters to the server, this is a function that\r\n * exposes many table parameters.\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('ServerTableController', ServerTableController);\r\n\r\n /** @ngInject */\r\n\r\n ServerTableController.$inject = ['$scope', '$rootScope', '$http', '$resource', '$location', 'TrackTraceService','CustomResultsService', '$translatePartialLoader', '$log', '$filter', '$translate', 'NgTableParams', 'ServerTableService', '$q', 'ContactsService', 'ShippingDetailsService', 'slug', 'TrackTracePaginationService', 'mdSelectHelper'];\r\n function ServerTableController($scope, $rootScope, $http, $resource, $location, TrackTraceService, CustomResultsService, $translatePartialLoader,$log, $filter, $translate, NgTableParams, ServerTableService, $q, ContactsService, ShippingDetailsService, slug, TrackTracePaginationService, mdSelectHelper) {\r\n\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('shipment');\r\n $translatePartialLoader.addPart('tracktrace');\r\n\r\n /* Variables */\r\n var vm = this;\r\n vm.query = {};\r\n vm.response = {};\r\n vm.isEmpty = ServerTableService.isEmpty();\r\n\t\tvm.filters = {shipdate: \"\", duedate: \"\"}\r\n vm.query = ServerTableService.getQuery();\r\n $scope.$watch('vm.query', function(){\r\n vm.query;\r\n vm.isLoading = true;\r\n ServerTableService.setQuery();\r\n }, true);\r\n\r\n CustomResultsService.loadColumns();\r\n vm.columns = CustomResultsService.getColumnHeaders();\r\n\r\n $scope.$on(\"customisedResultsHeaderChanged\", function(event, tabName){ \r\n vm.columns = CustomResultsService.getColumnHeaders();\r\n });\r\n\r\n vm.filtersVisible = false;\r\n vm.isLoading = false;\r\n vm.checkStatus = checkStatus;\r\n\r\n vm.per_page = per_page;\r\n vm.page_number = page_number;\r\n\r\n /* Function call for Tooltip exceptions */\r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n $scope.getHeaderWidth = getHeaderWidth;\r\n vm.tableParams = ServerTableService.getTable();\r\n $scope.sortClickable = sortClickable;\r\n $scope.cwwSortBy = cwwSortBy;\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n $rootScope.searchParamStatusVal = ($location.search().status) ? parseInt($location.search().status) : 'none' ; \r\n\r\n $scope.$on(\"angular-resizable.resizeEnd\", onResizeEnd);\r\n $scope.$on(\"angular-resizable.resizeStart\", function(event){\r\n event.preventDefault();\r\n event.stopPropagation();\r\n });\r\n\r\n function page_number(paginate_no){\r\n\r\n var queries = $location.search();\r\n queries.page = paginate_no;\r\n $location.search(queries);\r\n TrackTracePaginationService.save_page_number(paginate_no);\r\n ServerTableService.getData();\r\n\r\n }\r\n\r\n function per_page(paginate_record){\r\n\r\n var queries = $location.search();\r\n queries.per_page = paginate_record;\r\n $location.search(queries);\r\n\r\n TrackTracePaginationService.save_per_page(paginate_record);\r\n\r\n var returnData = ServerTableService.getData();\r\n\r\n /*if(returnData){\r\n // To Avoid wrong page number highligh during page count change.\r\n vm.tableParams.page($rootScope.pageNumber);\r\n vm.tableParams.reload();\r\n }*/\r\n\r\n }\r\n\r\n function sortClickable(event){\r\n return event.target.parentElement.className != \"rg-right\";\r\n }\r\n\r\n function cwwSortBy($column, event) {\r\n \r\n var parsedSortable = $column.sortable && $column.sortable();\r\n if (!parsedSortable) {\r\n return;\r\n }\r\n var defaultSort = vm.tableParams.settings().defaultSort;\r\n //var defaultSort = $scope.params.settings().defaultSort;\r\n var inverseSort = (defaultSort === 'asc' ? 'desc' : 'asc');\r\n var sorting = vm.tableParams.sorting() && vm.tableParams.sorting()[parsedSortable] && (vm.tableParams.sorting()[parsedSortable] === defaultSort);\r\n var sortingParams = (event.ctrlKey || event.metaKey) ? vm.tableParams.sorting() : {};\r\n sortingParams[parsedSortable] = (sorting ? inverseSort : defaultSort);\r\n vm.tableParams.parameters({\r\n sorting: sortingParams\r\n });\r\n var sort_params = {key: parsedSortable, criteria: sortingParams[parsedSortable]}\r\n TrackTracePaginationService.save_sort_params(sort_params);\r\n ServerTableService.getData('','','', sort_params).then(function(resp){ \r\n vm.tableParams.page(TrackTracePaginationService.get_page_number());\r\n vm.tableParams.reload();\r\n\r\n });\r\n\r\n /*var returnData = ServerTableService.getData('','','', sort_params);\r\n\r\n if(returnData){\r\n vm.tableParams.page(TrackTracePaginationService.get_page_number());\r\n vm.tableParams.reload();\r\n }*/\r\n\r\n }\r\n\r\n function onResizeEnd(event, args){\r\n event.preventDefault();\r\n event.stopPropagation();\r\n localStorage.setItem( \"resize-tt-\" + args.id, args.width );\r\n }\r\n\r\n function getHeaderWidth(item){\r\n var width = localStorage.getItem(\"resize-tt-\" + slug(item));\r\n return width ? \"width: \" + width + \"px;\" : \"\";\r\n }\r\n\r\n\t\tvm.filterDate = filterDate;\r\n vm.tableParams = ServerTableService.getTable();\r\n vm.updateFilteredCounts = updateFilteredCounts;\r\n\r\n\t\tfunction filterDate(key){\r\n\t\t\t/*var filter_by = {};\r\n\t\t\tif (vm.filters[key]){\r\n\t\t\t\tfilter_by[key] = moment(vm.filters[key]).format(\"YYYY-MM-DD\");\r\n\t\t\t}\r\n\t\t\tvm.tableParams.filter(filter_by);\r\n updateFilteredCounts();*/\r\n\r\n var filter_by = {};\r\n if (vm.filters[key]){\r\n filter_by[key] = moment(vm.filters[key]).format(\"YYYY-MM-DD\");\r\n }\r\n\r\n updateFilteredCounts(key,filter_by[key]);\r\n\r\n\r\n\t\t}\r\n\r\n \r\n\r\n function checkStatus(row){\r\n\r\n return (row.isdelivered === 'booking' || row.isdelivered == 'n/a') ? 'N/A' : 'Undelivered'\r\n\r\n }\r\n\r\n function updateFilteredCounts(paramName, paramValue){\r\n /*vm.tableParams.reload();\r\n var results_filtered = Object.values(vm.tableParams.filter()).filter(function(v, i){ return v && v !== ''}).length !== 0\r\n\r\n TrackTraceService.setResultsCount(vm.tableParams.total());\r\n TrackTraceService.setResultsFiltered(results_filtered);*/\r\n\r\n //Changing Field name to filter only\r\n paramName = paramName+'_filter';\r\n\r\n //$timeout(function () {\r\n //$rootScope.pageNumber = 1;\r\n TrackTracePaginationService.save_page_number(1);\r\n\r\n ServerTableService.getData('',paramName,paramValue).then(function(resp){\r\n\r\n // To Avoid wrong page number highlight during ngTable Filter.\r\n vm.tableParams.page(TrackTracePaginationService.get_page_number());\r\n\r\n vm.tableParams.reload();\r\n\r\n }); \r\n \r\n\r\n //}, 500);\r\n\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n var codeArray = [];\r\n var descArray = [];\r\n resp.exceptions.forEach(function(item, index, array){\r\n if(!codeArray.includes(item.code)){\r\n codeArray.push(item.code);\r\n }\r\n if(!descArray.includes(item.description)){\r\n descArray.push(item.description);\r\n }\r\n });\r\n vm.response = {\"code\": codeArray.join(\", \"), \"description\": descArray.join(\", \")};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n $scope.$on(\"ngTableParamsChanged\", function(){\r\n vm.tableParams = ServerTableService.getTable();\r\n vm.isEmpty = ServerTableService.isEmpty();\r\n vm.tableParams.reload();\r\n\r\n });\r\n\r\n $scope.$on(\"serverTable:stateChanged\", function(event, state) {\r\n vm.isLoading = state.loading;\r\n if(vm.isLoading === false){\r\n vm.tableParams.reload();\r\n }\r\n });\r\n\r\n $scope.$on(\"serverTable:loaded\", function(event, data, error, response) {\r\n /* Added by Abheesh */\r\n if(vm.query['reference_number']=='Global Search'){\r\n // // console.log('Global search');\r\n // vm.tableParams.data = TrackTraceService.getGlobalSearchData();\r\n data = JSON.parse(localStorage.getItem(\"globalSearchData\"));\r\n vm.tableParams['data'] = data;\r\n }\r\n if ($location.path().indexOf('/track-trace') === -1) return;\r\n // Check filters for actual values and tell our service that we are filtering\r\n angular.forEach(vm.tableParams.filter(), function(v, k) {\r\n var isFiltered = false;\r\n if (v != \"\" && v != null && v != undefined) {\r\n isFiltered = true;\r\n }\r\n\r\n TrackTraceService.setResultsFiltered(isFiltered);\r\n });\r\n // Tell our service how many results we have total\r\n TrackTraceService.setResultsCount(vm.tableParams.total());\r\n ContactsService.setSubjectStatuses({trackTrace: {exceptions: response.exception_count + response.potential_exception_count > 0, results: true}});\r\n\r\n vm.noResults = !data || data.length == 0;\r\n vm.isError = !!error;\r\n vm.error = vm.isError ? error : \"\";\r\n });\r\n }\r\n}) ();\r\n\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <esvit666@gmail.com>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name ServerTable.ngTableSorterRow\r\n * @description directive that sorts the rows of a table\r\n * @restrict E\r\n */\r\n\r\n(function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableSorterRowServerTable', ngTableSorterRow);\r\n\r\n ngTableSorterRow.$inject = [];\r\n\r\n function ngTableSorterRow(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/track-trace/server-table/sorterHeader.html',\r\n scope: true,\r\n controller: 'ngTableSorterRowController'\r\n };\r\n return directive;\r\n }\r\n})();\r\n\n// /**\r\n// * ngTable: Table + Angular JS\r\n// *\r\n// * @author Vitalii Savchuk <esvit666@gmail.com>\r\n// * @url https://github.com/esvit/ng-table/\r\n// * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n// */\r\n\r\n// /**\r\n// * @ngdoc directive\r\n// * @name ServerTable.ngTableFilterRow\r\n// * @description directive that filters the rows of a table\r\n// * @restrict E\r\n// */\r\n\r\n// (function(){\r\n// 'use strict';\r\n\r\n// angular.module('ngTable')\r\n// .directive('ngTableFilterRowCview', ngTableFilterRow);\r\n\r\n// ngTableFilterRow.$inject = [];\r\n\r\n// function ngTableFilterRow(){\r\n// var directive = {\r\n// restrict: 'E',\r\n// replace: true,\r\n// templateUrl: 'app/track-trace/server-table/filterHeader.html',\r\n// scope: true,\r\n// controller: 'ngTableFilterRowController'\r\n// };\r\n// return directive;\r\n// }\r\n// })();\n// Based on exmple from: https://medium.com/breaking-tiles/advanced-key-event-handling-in-angular-64efa6b36a85#.ghqfbwzf4\r\n//Creates directive that can be used in any scope to bind keypresses to document\r\n'use strict';\r\nangular.module('app')\r\n.directive('multipleKeyPress', [\r\n '$document',\r\n function(\r\n $document\r\n ) {\r\n return {\r\n restrict: 'A',\r\n scope: {\r\n multipleKeyPress: '&'\r\n },\r\n link: function(scope, element, attrs) {\r\n\r\n $document.bind('keydown', function(event) {\r\n \r\n var modifiers = [\"ctrlKey\", \"metaKey\", \"shiftKey\"];\r\n var keyEvent = String(event.which);\r\n modifiers.map(function(val){\r\n if (event[val]){\r\n keyEvent += \"-\" + val;\r\n }\r\n });\r\n keyEvent = keyEvent.replace(/-$/,\"\");\r\n \r\n scope.multipleKeyPress({keyEvent:keyEvent});\r\n });\r\n }\r\n };\r\n }\r\n]);\n\r\n/**\r\n * @ngdoc method\r\n * @name InMemoryTableController.queryShipments\r\n * @description querys shipments\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name InMemoryTableController.toggleLimitOptions\r\n * @description toggles how many shipments are queried\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('InMemoryTableController', InMemoryTableController);\r\n\r\n /** @ngInject */\r\n InMemoryTableController.$inject = ['TrackTraceService', 'CustomResultsService', '$log', '$translatePartialLoader', '$mdDialog', '$mdMedia', '$http' ];\r\n function InMemoryTableController(TrackTraceService, CustomResultsService, $log, $translatePartialLoader, $mdDialog, $mdMedia, $http) {\r\n \r\n /* Variables */\r\n var vm = this;\r\n /* Using Angular Material Table Data */\r\n vm.selected = [];\r\n vm.limitOptions = [10, 25, 50];\r\n vm.status = ' ';\r\n vm.options = {\r\n rowSelection: true,\r\n multiSelect: true,\r\n autoSelect: true,\r\n decapitate: false,\r\n largeEditDialog: false,\r\n boundaryLinks: true,\r\n limitSelect: true,\r\n pageSelect: true\r\n };\r\n\r\n vm.query = {\r\n order: 'SHIPPERNAME',\r\n limit: 25,\r\n page: 1\r\n }\r\n\r\n /* Functions */\r\n vm.queryShipments = queryShipments;\r\n vm.toggleLimitOptions = toggleLimitOptions;\r\n\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('tracktrace');\r\n\r\n vm.queryShipments();\r\n \r\n //pulls the columns from the custom results service\r\n vm.columns = CustomResultsService.getActiveColumns();\r\n\r\n function toggleLimitOptions() {\r\n vm.limitOptions = vm.limitOptions ? undefined : [10, 25, 50];\r\n }\r\n\r\n function queryShipments(){\r\n var deferred = $http.get('data.json').then(function(res){vm.shipments=res.data;});\r\n vm.promise = deferred.promise;\r\n\r\n }\r\n }\r\n}) ();\n\r\n//TODO: Add the Docs\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('ExceptionMapController', ExceptionMapController);\r\n\r\n /** @ngInject */\r\n ExceptionMapController.$inject = ['TrackTraceService', '$log', '$scope', '$window'];\r\n function ExceptionMapController(TrackTraceService, $log, $scope, $window) {\r\n\r\n function setSize() {\r\n if ($window.innerWidth < 961) {\r\n return $window.innerWidth * 0.9;\r\n } else {\r\n return $window.innerWidth * 0.3;\r\n }\r\n }\r\n\r\n\r\n /* Handle Track-Trace Map */\r\n $scope.mapObject = {\r\n scope: 'world',\r\n responsive: true,\r\n options: {\r\n width: setSize()\r\n //legendHeight: 80 // optionally set the padding for the legend\r\n },\r\n\r\n // TODO ZOOM function\r\n // done: function(datamap){\r\n // datamap.svg.call(d3.behavior.zoom().on(\"zoom\", redraw));\r\n // function redraw() {\r\n // datamap.svg.selectAll(\"g\").attr(\"transform\", \"translate(\" + d3.event.translate + \")scale(\" + d3.event.scale + \")\");\r\n\r\n // };\r\n // },\r\n\r\n geographyConfig: {\r\n popupOnHover: false,\r\n highlightOnHover: false,\r\n borderColor: '#050B24',\r\n borderWidth: 1\r\n },\r\n fills: {\r\n 'HIGH': 'yellow',\r\n 'MEDIUM': 'yellow',\r\n 'LOW': 'yellow',\r\n 'defaultFill': '#3F4C59'\r\n }\r\n };\r\n\r\n $scope.mapPlugins = {\r\n exceptionMapPin: function(layer, data, options) {\r\n var self = this;\r\n var height = 28, width = 22;\r\n // debugger;\r\n var pins = layer.selectAll(\"g.node\")\r\n .data(data)\r\n .enter()\r\n .append(\"g\")\r\n .attr(\"transform\", function (d){\r\n if (!d.latitude || !d.longitude) return 'translate(-100, -100)';\r\n var pos = self.latLngToXY(d.latitude, d.longitude),\r\n x = (pos[0] - width/2), y = (pos[1] - height/2);\r\n if (isNaN(x) || isNaN(y)) return 'translate(-100, -100)';\r\n return \"translate(\"+x+\",\"+y+\")\";\r\n });\r\n pins.append(\"svg:image\")\r\n .attr(\"xlink:href\", function(d){\r\n switch(d.type){\r\n case \"active\":\r\n return \"/app/components/svg/active.svg\";\r\n case \"exception\":\r\n return \"/app/components/svg/exception.svg\";\r\n case \"potential\":\r\n return \"/app/components/svg/potential.svg\";\r\n }\r\n })\r\n .attr(\"width\", width)\r\n .attr(\"height\", height);\r\n\r\n window.addEventListener('resize', function(event){\r\n pins.attr(\"transform\", function (d){\r\n if (!d.latitude || !d.longitude) return 'translate(-100, -100)';\r\n var pos = self.latLngToXY(d.latitude, d.longitude),\r\n x = (pos[0] - width/2), y = (pos[1] - height/2);\r\n if (isNaN(x) || isNaN(y)) return 'translate(-100, -100)';\r\n return \"translate(\"+x+\",\"+y+\")\";\r\n });\r\n });\r\n }\r\n };\r\n\r\n $scope.mapPluginData = {\r\n exceptionMapPin: TrackTraceService.getPins()\r\n };\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.setColumnHeaders\r\n * @description sets the headers of the shipments table in track and trace\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.getColumnHeaders\r\n * @description gets the column headers variable\r\n */\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.setActiveColumns\r\n* @description setActiveColumns() set the activeColumns variable\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getActiveColumns\r\n* @description getActiveColumns() returns the active columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getDefaultColumns\r\n* @description getDefaultColumns() returns the default columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getAvailableColumns\r\n* @description getAvailableColumns returns the availableColumns\r\n*/\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('CustomResultsService', customResultsService);\r\n\r\n /** @ngInject */\r\n customResultsService.$inject = ['$log', '$http', '$state'];\r\n function customResultsService($log, $http, $state) {\r\n /* fake data */\r\n //var $translate = $filter('translate');\r\n // function loadColumns(){\r\n // return $http.get('./app/track-trace/customize-results/columns.json').then(function(res){return res.data;});\r\n // //promise = deferred.promise;\r\n // }\r\n var vm = this;\r\n\r\n\r\n loadColumns();\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n function loadColumns(){\r\n\r\n vm.columnHeaders = [];\r\n vm.cookiedata = null;\r\n vm.activeColumns = [];\r\n vm.savedDefaults = [];\r\n vm.savedData;\r\n vm.defaultColumns = [];\r\n\r\n\r\n load_columns();\r\n load_defaultColumns();\r\n load_activeColumns();\r\n }\r\n\r\n\r\n function load_columns(){\r\n\r\n vm.columns = [\r\n {field:\"servicetype\", title: \"SHIPMENT.SERVICETYPE\", sortable: \"servicetype\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shipdate\", title: 'SHIPMENT.SHIPDATE', sortable: \"shipdate\", filter: {}, show:true, tdClass: \"td-15\", class: \"td-15\", isDate: true, static: true},\r\n {field:\"consigneeaddress4\", title: \"SHIPMENT.CONSIGNEEADDRESS4\", sortable: \"consigneeaddress4\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"shipperaddress1\", title: \"SHIPMENT.SHIPPERADDRESS1\", sortable: \"shipperaddress1\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"shipperaddress2\", title: \"SHIPMENT.SHIPPERADDRESS2\", sortable: \"shipperaddress2\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"shipperaddress3\", title: \"SHIPMENT.SHIPPERADDRESS3\", sortable: \"shipperaddress3\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"shipperaddress4\", title: \"SHIPMENT.SHIPPERADDRESS4\", sortable: \"shipperaddress4\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"consigneeaddress1\", title: \"SHIPMENT.CONSIGNEEADDRESS1\", sortable: \"consigneeaddress1\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"consigneeaddress2\", title: \"SHIPMENT.CONSIGNEEADDRESS2\", sortable: \"consigneeaddress2\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"consigneeaddress3\", title: \"SHIPMENT.CONSIGNEEADDRESS3\", sortable: \"consigneeaddress3\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"jobunid\", title: \"SHIPMENT.JOBUNID\", sortable: \"jobunid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"isdelivered\", title: \"SHIPMENT.ISDELIVERED\", sortable: \"isdelivered\", filter: {}, show:true, disabled:true, tdClass: \"td-15\", class: \"td-15\", static: true},\r\n {field:\"departuredate\", title: \"SHIPMENT.DEPARTUREDATE\", sortable: \"departuredate\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", isDate: true, static: true},\r\n {field:\"delivereddate\", title: \"SHIPMENT.DELIVEREDDATE\", sortable: \"delivereddate\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", isDate: true, static: true},\r\n {field:\"shipperzipcode\", title: \"SHIPMENT.SHIPPERZIPCODE\", sortable: \"shipperzipcode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shippername\", title: \"SHIPMENT.SHIPPERNAME\", sortable: \"shippername\", filter: {}, show:true, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"customername\", title: \"SHIPMENT.CUSTOMERNAME\", sortable: \"customername\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"bookingnumber\", title: \"SHIPMENT.BOOKINGNUMBER\", sortable: \"bookingnumber\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"consigneezipcode\", title: \"SHIPMENT.CONSIGNEEZIPCODE\", sortable: \"consigneezipcode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneename\", title: \"SHIPMENT.CONSIGNEENAME\", sortable: \"consigneename\", filter: {}, show:true, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"servicetypecode\", title: \"SHIPMENT.SERVICETYPECODE\", sortable: \"servicetypecode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"gshpid\", title: \"SHIPMENT.GSHPID\", sortable: \"gshpid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"shipperpartyid\", title: \"SHIPMENT.SHIPPERPARTYID\", sortable: \"shipperpartyid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"awb\", title: \"SHIPMENT.AWB\", sortable: \"awb\", filter: {}, show:true, tdClass: \"td-15\", class: \"td-15\", link_class: \"text-strong\", static: true},\r\n {field:\"invoicenumber\", title: \"SHIPMENT.INVOICENUMBER\", sortable: \"invoicenumber\", filter: {}, show:true, tdClass: \"td-20\", class: \"td-15\", link_class: \"text-strong\", static: true},\r\n {field:\"origin\", title: \"SHIPMENT.ORIGIN\", sortable: \"origin\", filter: {}, show:true, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"destination\", title: \"SHIPMENT.DESTINATION\", sortable: \"destination\", filter: {}, show:true, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"totalchargeableweight\", title: \"SHIPMENT.TOTALCHARGEABLEWEIGHT\", sortable: \"totalchargeableweight\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneepartyid\", title: \"SHIPMENT.CONSIGNEEPARTYID\", sortable: \"consigneepartyid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"businesstype\", title: \"SHIPMENT.BUSINESSTYPE\", sortable: \"businesstype\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneecity\", title: \"SHIPMENT.CONSIGNEECITY\", sortable: \"consigneecity\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"totalgrossweight\", title: \"SHIPMENT.TOTALGROSSWEIGHT\", sortable: \"totalgrossweight\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"consigneecountry\", title: \"SHIPMENT.CONSIGNEECOUNTRY\", sortable: \"consigneecountry\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"customergroup\", title: \"SHIPMENT.CUSTOMERGROUP\", sortable: \"customergroup\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"totalpieces\", title: \"SHIPMENT.TOTALPIECES\", sortable: \"totalpieces\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"duedate\", title: \"SHIPMENT.DUEDATE\", sortable: \"duedate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", isDate: true, static: true},\r\n {field:\"shippercity\", title: \"SHIPMENT.SHIPPERCITY\", sortable: \"shippercity\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n {field:\"servicelevelcode\", title: \"SHIPMENT.SERVICELEVELCODE\", sortable: \"servicelevelcode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true, static: true},\r\n {field:\"customerpartyid\", title: \"SHIPMENT.CUSTOMERPARTYID\", sortable: \"customerpartyid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"servicelevel\", title: \"SHIPMENT.SERVICELEVEL\", sortable: \"servicelevel\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"estimateddate\", title: \"SHIPMENT.ESTIMATED_DATE\", sortable: \"estimateddate\", filter: {}, show:false, tdClass: \"td-20\", isDate: true, class: \"td-20\", static: true},\r\n {field:\"actualdate\", title: \"SHIPMENT.ACTUAL_DATE\", sortable: \"actualdate\", filter: {}, show:false, tdClass: \"td-20\", isDate: true, class: \"td-20\", static: true},\r\n {field:\"milestonedescription\", title: \"SHIPMENT.MILESTONE\", sortable: \"milestone\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"totalinvoiceamount\", title: \"SHIPMENT.TOTAL_INVOICE_AMOUNT\", sortable: \"totalinvoiceamount\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shipment_contnos\", title: \"Container #\", sortable: \"shipment_contnos\", filter: {}, show:true, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"podname\", title: \"Port of Discharge\", sortable: \"podname\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"podetadate\", title: \"POD ETA Date\", sortable: \"podetadate\", filter: {}, show:false, tdClass: \"td-20\", isDate: true, class: \"td-20\", static: true},\r\n {field:\"polname\", title: \"Port of Load\", sortable: \"polname\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"poletddate\", title: \"POL ETD Date\", sortable: \"poletddate\", filter: {}, show:false, tdClass: \"td-20\", isDate: true, class: \"td-20\", static: true},\r\n {field:\"shipment_cust_ref_number\", title: \"CUST Reference\", sortable: \"shipment_cust_ref_number\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shipment_inv_ref_number\", title: \"INV Reference\", sortable: \"shipment_inv_ref_number\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"shipment_po_ref_number\", title: \"PO Reference\", sortable: \"shipment_po_ref_number\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"incoterm\", title: \"INCO TERM\", sortable: \"incoterm\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"vesselname\", title: \"Vessel Name\", sortable: \"vesselname\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"voyage\", title: \"Voyage\", sortable: \"voyage\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", static: true},\r\n {field:\"reference\", title: \"Reference #\", sortable: \"reference\", filter: {}, show:true, tdClass: \"td-20\", class: \"td-20\", static: true}\r\n ];\r\n\r\n vm.columns.map(function(d){\r\n if (d.field.indexOf('date') !== -1) {\r\n d.filter[d.field] = '/app/track-trace/server-table/filterDate.html';\r\n } else if (d.disabled) {\r\n d.filter[d.field] = '/app/track-trace/server-table/filterStatus.html';\r\n } else {\r\n d.filter[d.field] = '/app/track-trace/server-table/filterDefault.html';\r\n }\r\n })\r\n\r\n }\r\n\r\n function load_defaultColumns(){\r\n\r\n if($state.current.name == 'track-trace-booking'){\r\n\r\n vm.defaultColumns = [\r\n {field:\"isdelivered\", title: \"SHIPMENT.ISDELIVERED\"},\r\n {field:\"bookingnumber\", title: \"SHIPMENT.BOOKINGNUMBER\"},\r\n {field:\"shippername\", title: \"SHIPMENT.SHIPPERNAME\"},\r\n {field:\"awb\", title: \"SHIPMENT.AWB\"},\r\n {field:\"invoicenumber\", title: \"SHIPMENT.INVOICENUMBER\"},\r\n {field:\"shipdate\", title: 'SHIPMENT.SHIPDATE'},\r\n {field:\"consigneename\", title: \"SHIPMENT.CONSIGNEENAME\"},\r\n {field:\"origin\", title: \"SHIPMENT.ORIGIN\"},\r\n {field:\"destination\", title: \"SHIPMENT.DESTINATION\"},\r\n {field:\"shipment_contnos\", title: \"SHIPMENT.CONTAINERNUMBER\"},\r\n {field:\"reference\", title: \"SHIPMENT.REFERENCE\"}\r\n ];\r\n\r\n } else{\r\n\r\n vm.defaultColumns = [\r\n {field:\"isdelivered\", title: \"SHIPMENT.ISDELIVERED\"},\r\n {field:\"shippername\", title: \"SHIPMENT.SHIPPERNAME\"},\r\n {field:\"awb\", title: \"SHIPMENT.AWB\"},\r\n {field:\"invoicenumber\", title: \"SHIPMENT.INVOICENUMBER\"},\r\n {field:\"shipdate\", title: \"SHIPMENT.SHIPDATE\"},\r\n {field:\"consigneename\", title: \"SHIPMENT.CONSIGNEENAME\"},\r\n {field:\"estimateddate\", title: \"SHIPMENT.ESTIMATED_DATE\"},\r\n {field:\"actualdate\", title: \"SHIPMENT.ACTUAL_DATE\"},\r\n {field:\"origin\", title: \"SHIPMENT.ORIGIN\"},\r\n {field:\"destination\", title: \"SHIPMENT.DESTINATION\"},\r\n {field:\"shipment_contnos\", title: \"SHIPMENT.CONTAINERNUMBER\"},\r\n {field:\"reference\", title: \"SHIPMENT.REFERENCE\"}\r\n ];\r\n\r\n }\r\n\r\n }\r\n\r\n function load_activeColumns(){\r\n vm.activeColumns = vm.defaultColumns;\r\n setColumnHeaders(vm.activeColumns);\r\n }\r\n\r\n\r\n\r\n /* functions */\r\n function setColumnHeaders(activeCol) {\r\n vm.columnHeaders.length = 0;\r\n vm.columns.map(function(d){d.show = false});\r\n for (var j in vm.activeColumns){\r\n for (var i in vm.columns) {\r\n if (vm.activeColumns[j].field === vm.columns[i].field){\r\n vm.columns[i].show = true;\r\n vm.columnHeaders.push(vm.columns[i]);\r\n }\r\n }\r\n }\r\n vm.columnHeaders.unshift({field:\"flag\", title: \"TRACKTRACE.EXCEPTION_HEADER\", show:true, tdClass: \"td-5\", class: \"td-5\", static: true});\r\n }\r\n\r\n function setActiveColumns(activeCol){\r\n vm.activeColumns = activeCol;\r\n }\r\n\r\n function setDefaultColumns(activeCol){\r\n vm.activeColumns = vm.defaultColumns;\r\n }\r\n\r\n setColumnHeaders(vm.activeColumns);\r\n\r\n return {\r\n setColumnHeaders: setColumnHeaders,\r\n loadColumns:loadColumns,\r\n getColumnHeaders: function() {\r\n return vm.columnHeaders;\r\n },\r\n setActiveColumns: setActiveColumns,\r\n getActiveColumns: function() {\r\n return vm.activeColumns;\r\n },\r\n getDefaultColumns: function(){\r\n return vm.defaultColumns;\r\n },\r\n getAllColumns: function(){\r\n return vm.columns;\r\n },\r\n getAvailableColumns: function() {\r\n return vm.columns.filter(function(d){\r\n if (!d.show){\r\n return {\r\n field: d.field,\r\n title: d.title\r\n };\r\n }\r\n }).sort(function(a, b) {\r\n return a.title > b.title ? 1 : (a.title < b.title ? -1 : 0);\r\n });\r\n }\r\n };\r\n\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.add\r\n * @description method adds a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.remove\r\n * @description method removes a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.dragListener\r\n * @description method that is the listener for drag events\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.saveToDefault\r\n * @description method saves the layout to default\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.submit\r\n * @description method submits the custom search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.activeSearchChange\r\n * @description method called when the active search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.availableSearchChange\r\n * @description method called when the available search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.clickedActiveSearchX\r\n * @description method called the X by the activeSearchField is clicked and deletes the value in activeSearchField\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.clickedAvailableSearchX\r\n * @description method called the X by the availableSearchField is clicked and deletes the value in availableSearchField\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('CustomizeResultsController', CustomizeResultsController);\r\n\r\n /** @ngInject */\r\n CustomizeResultsController.$inject = ['$rootScope', '$state', 'CustomResultsService', 'api', '$log', '$mdDialog', '$window','$http', '$mdToast', 'UserService', 'permissions'];\r\n function CustomizeResultsController($rootScope, $state, CustomResultsService, api, $log, $mdDialog, $window, $http, $mdToast,UserService, permissions) {\r\n\r\n /* variables */\r\n var vm = this;\r\n\r\n vm.user = UserService.getUserData();\r\n vm.activeColumns = CustomResultsService.getActiveColumns();\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.availableColumns = CustomResultsService.getAvailableColumns();\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns); //used for search of availableColumns\r\n vm.allColumns = CustomResultsService.getAllColumns();\r\n vm.availableSearchField = \"\";\r\n //vm.activeSearchField = \"\";\r\n //need copies of the orignal lists for setting the service back if canceled\r\n vm.activeColumnsCopy = angular.copy(vm.activeColumns);\r\n\r\n vm.colHeight = colHeight();\r\n\r\n /* functions */\r\n vm.cancel = cancel;\r\n vm.add = add;\r\n vm.remove = remove;\r\n vm.dragListener = dragListener;\r\n vm.saveToDefault = saveToDefault;\r\n vm.restoreDefault = restoreDefault;\r\n vm.submit = submit;\r\n //vm.activeSearchChange = activeSearchChange;\r\n vm.availableSearchChange = availableSearchChange;\r\n vm.showToastWithFile = showToastWithFile\r\n //vm.clickedActiveSearchX = clickedActiveSearchX;\r\n vm.clickedAvailableSearchX = clickedAvailableSearchX;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n vm.is_consignee_user = UserService.check_consignee_user();\r\n\r\n function cancel() {\r\n CustomResultsService.setActiveColumns(vm.activeColumnsCopy);\r\n $mdDialog.cancel();\r\n }\r\n\r\n colHeight();\r\n function colHeight() {\r\n //// console.log($window.innerHeight);\r\n return ($window.innerHeight * 0.5);\r\n }\r\n\r\n //add to the active column\r\n function add(column) {\r\n vm.activeColumns.push(column);\r\n var index = vm.availableColumns.indexOf(column);\r\n vm.availableColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.allColumns.filter(compare(vm.activeColumns)));\r\n // vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n localStorage.setItem(\"mycookie\", JSON.stringify(vm.activeColumns));\r\n }\r\n\r\n //remove from the active column\r\n function remove(column) {\r\n $log.debug(\"column name: \" + column.name + \" column width: \" + column.width);\r\n vm.availableColumns.push(column);\r\n var index = vm.activeColumns.indexOf(column);\r\n vm.activeColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.allColumns.filter(compare(vm.activeColumns)));\r\n // vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n localStorage.setItem(\"mycookie\", JSON.stringify(vm.activeColumns));\r\n }\r\n\r\n //function for the event when the active column is dragged\r\n function dragListener() {\r\n return {\r\n accept: function (sourceItemHandleScope, destSortableScope) {return true}, //override to determine drag is allowed or not. default is true.\r\n itemMoved: function () {\r\n // vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.allColumns.filter(compare(vm.activeColumns)));\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n localStorage.setItem(\"mycookie\", JSON.stringify(vm.activeColumns));\r\n },\r\n orderChanged: function() {},\r\n allowDuplicates: false //optional param allows duplicates to be dropped.\r\n }\r\n }\r\n\r\n function showToastWithFile(file, messages, delay) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: delay ? delay : 2000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/users/toast/' + file,\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n //saves the current custimization to default\r\n function saveToDefault() {\r\n $log.debug(\"save to default: \" + vm.activeColumns);\r\n var column_array =[]\r\n vm.activeColumns.forEach(function(element, index){\r\n column_array.push(element.field)\r\n })\r\n\r\n if($state.current.name == 'track-trace-booking'){\r\n var column_type = 'booking';\r\n }else if($state.current.name == 'track-trace-transit'){\r\n var column_type = 'in_transit';\r\n }else{\r\n var column_type = 'normal';\r\n }\r\n\r\n $http({\r\n method: 'PUT',\r\n url: api.url + '/users/'+vm.user.id+'/set_def_colms',\r\n data: {\r\n default_columns: column_array,\r\n 'default_column_type':column_type\r\n }\r\n }).success(function(response){\r\n showToastWithFile('default-columns-save-sucess.html', \"Default Columns Saved\");\r\n\r\n if($state.current.name == 'track-trace-booking'){\r\n localStorage.setItem(\"adv_search_booked_cols\", JSON.stringify(response.default_columns));\r\n }else if($state.current.name == 'track-trace-transit'){\r\n localStorage.setItem(\"adv_search_transit_cols\", JSON.stringify(response.default_columns));\r\n }else{\r\n localStorage.setItem(\"adv_search_cols\", JSON.stringify(response.default_columns));\r\n }\r\n\r\n window.localStorage.removeItem('mycookie');\r\n\r\n }).error(function(response){\r\n showToastWithFile('default-columns-save-error.html', \"Error saving Default Columns\");\r\n });\r\n }\r\n\r\n function restoreDefault(){\r\n\r\n if($state.current.name == 'track-trace-booking'){\r\n\r\n vm.activeColumns = [\r\n {field:\"isdelivered\", title: \"SHIPMENT.ISDELIVERED\"},\r\n {field:\"bookingnumber\", title: \"SHIPMENT.BOOKINGNUMBER\"},\r\n {field:\"shippername\", title: \"SHIPMENT.SHIPPERNAME\"},\r\n {field:\"awb\", title: \"SHIPMENT.AWB\"},\r\n {field:\"invoicenumber\", title: \"SHIPMENT.INVOICENUMBER\"},\r\n {field:\"shipdate\", title: 'SHIPMENT.SHIPDATE'},\r\n {field:\"consigneename\", title: \"SHIPMENT.CONSIGNEENAME\"},\r\n {field:\"origin\", title: \"SHIPMENT.ORIGIN\"}\r\n ];\r\n\r\n }else{\r\n\r\n vm.activeColumns = [\r\n {field:\"isdelivered\", title: \"SHIPMENT.ISDELIVERED\"},\r\n {field:\"shippername\", title: \"SHIPMENT.SHIPPERNAME\"},\r\n {field:\"awb\", title: \"SHIPMENT.AWB\"},\r\n {field:\"invoicenumber\", title: \"SHIPMENT.INVOICENUMBER\"},\r\n {field:\"shipdate\", title: \"SHIPMENT.SHIPDATE\"},\r\n {field:\"consigneename\", title: \"SHIPMENT.CONSIGNEENAME\"},\r\n {field:\"estimateddate\", title: \"SHIPMENT.ESTIMATED_DATE\"},\r\n {field:\"origin\", title: \"SHIPMENT.ORIGIN\"}\r\n ];\r\n\r\n }\r\n\r\n var onlyInA = vm.allColumns.filter(compare(vm.activeColumns));\r\n var onlyInB = vm.activeColumns.filter(compare(vm.allColumns));\r\n\r\n var result = onlyInA.concat(onlyInB);\r\n\r\n vm.availableColumns = angular.copy(result);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n saveToDefault();\r\n }\r\n\r\n //the submit button\r\n function submit() {\r\n $log.debug(\"submited \" + vm.activeColumns);\r\n //vm.availableColumns = vm.tempAvailableColumns;\r\n CustomResultsService.setActiveColumns(vm.activeColumns);\r\n CustomResultsService.setColumnHeaders(vm.activeColumns); //sends the object\r\n $rootScope.$broadcast(\"customisedResultsHeaderChanged\", vm.activeColumns);\r\n $mdDialog.hide();\r\n }\r\n\r\n //changes the activeColumns to be shown based on what the search field is\r\n // function activeSearchChange() {\r\n // var results = [];\r\n // var lcs = vm.activeSearchField.toLowerCase();\r\n // for (var index = 0; index < vm.tempActiveColumns.length; index++) {\r\n // var name = vm.tempActiveColumns[index].title.toLowerCase();\r\n // if (name.indexOf(lcs) > -1) { //if the string contains the name\r\n // results.push(vm.tempActiveColumns[index]);\r\n // }\r\n // }\r\n // vm.activeColumns = results;\r\n // }\r\n\r\n //changes the availableColumns to be shown based on what the search field is\r\n function availableSearchChange() {\r\n var results = [];\r\n var lcs = vm.availableSearchField.toLowerCase();\r\n for (var index = 0; index < vm.tempAvailableColumns.length; index++) {\r\n var name = vm.tempAvailableColumns[index].title.toLowerCase();\r\n if (name.indexOf(lcs) > -1) { //if the string contains the name\r\n results.push(vm.tempAvailableColumns[index]);\r\n }\r\n }\r\n vm.availableColumns = results;\r\n }\r\n\r\n //clears the active search field\r\n // function clickedActiveSearchX() {\r\n // vm.activeSearchField = '';\r\n // vm.activeSearchChange();\r\n // }\r\n\r\n //clears the available search field\r\n function clickedAvailableSearchX() {\r\n vm.availableSearchField = '';\r\n\r\n var onlyInA = vm.allColumns.filter(compare(vm.activeColumns));\r\n var onlyInB = vm.activeColumns.filter(compare(vm.allColumns));\r\n\r\n var result = onlyInA.concat(onlyInB);\r\n\r\n vm.tempAvailableColumns = angular.copy(result);\r\n\r\n // CustomResultsService.getAvailableColumns();\r\n vm.availableSearchChange();\r\n }\r\n\r\n function compare(otherArray){\r\n return function(current){\r\n return otherArray.filter(function(other){\r\n return other.field == current.field\r\n }).length == 0;\r\n }\r\n }\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name anchorSmoothScroll\r\n *\r\n * @description\r\n * The anchorSmoothScroll does stuff\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n \r\n angular\r\n .module('app.trackTrace')\r\n .service('anchorSmoothScroll', anchorSmoothScroll);\r\n \r\n /** @ngInject */\r\n anchorSmoothScroll.$inject = ['$location'];\r\n function anchorSmoothScroll( $location) {\r\n this.scrollTo = function(eID) {\r\n\r\n // This scrolling function \r\n // is from http://www.itnewb.com/tutorial/Creating-the-Smooth-Scroll-Effect-with-JavaScript\r\n \r\n var startY = currentYPosition();\r\n var stopY = elmYPosition(eID);\r\n var distance = stopY > startY ? stopY - startY : startY - stopY;\r\n if (distance < 100) {\r\n scrollTo(0, stopY); return;\r\n }\r\n var speed = Math.round(distance / 100);\r\n if (speed >= 20) speed = 20;\r\n var step = Math.round(distance / 25);\r\n var leapY = stopY > startY ? startY + step : startY - step;\r\n var timer = 0;\r\n if (stopY > startY) {\r\n for ( var i=startY; i<stopY; i+=step ) {\r\n setTimeout(\"window.scrollTo(0, \"+leapY+\")\", timer * speed);\r\n leapY += step; if (leapY > stopY) leapY = stopY; timer++;\r\n } return;\r\n }\r\n for ( var i=startY; i>stopY; i-=step ) {\r\n setTimeout(\"window.scrollTo(0, \"+leapY+\")\", timer * speed);\r\n leapY -= step; if (leapY < stopY) leapY = stopY; timer++;\r\n }\r\n \r\n function currentYPosition() {\r\n // Firefox, Chrome, Opera, Safari\r\n if (self.pageYOffset) return self.pageYOffset;\r\n // Internet Explorer 6 - standards mode\r\n if (document.documentElement && document.documentElement.scrollTop)\r\n return document.documentElement.scrollTop;\r\n // Internet Explorer 6, 7 and 8\r\n if (document.body.scrollTop) return document.body.scrollTop;\r\n return 0;\r\n }\r\n \r\n function elmYPosition(eID) {\r\n \r\n // var elm = document.getElementById(eID);\r\n var elm = angular.element(document.getElementById(eID));\r\n var y = elm.offsetTop;\r\n //var y = (elm.offsetTop != null)?elm.offsetTop : elm.scrollingElement.offsetTop;\r\n var node = elm;\r\n while (node.offsetParent && node.offsetParent != document.body) {\r\n node = node.offsetParent;\r\n y += node.offsetTop;\r\n } return y;\r\n }\r\n \r\n };\r\n \r\n \r\n }\r\n })();\r\n \n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <esvit666@gmail.com>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name ServerTable.ngTableActionBoard\r\n * @description directive that sorts the rows of a table\r\n * @restrict E\r\n */\r\n\r\n(function(){\r\n 'use strict';\r\n\r\n angular.module('app.trackTrace')\r\n .directive('ngTableActionBoardTable', ngTableActionBoard);\r\n \r\n ngTableActionBoard.$inject = [];\r\n\r\n function ngTableActionBoard(){\r\n var directive = {\r\n restrict: 'E', \r\n templateUrl: '/app/track-trace/action-board/server-table/server-table.html',\r\n scope: {\r\n actionTableData: '=day',\r\n actionBoardCtrl:'=actionboardctrl'\r\n }\r\n \r\n };\r\n return directive;\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name ActionBoardService\r\n *\r\n * @description\r\n * The ActionBoardService does stuff\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('ActionBoardService', ActionBoardService);\r\n\r\n /** @ngInject */\r\n ActionBoardService.$inject = ['$http', '$log', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX',\r\n 'DownloadService', '$state','Upload'];\r\n function ActionBoardService($http, $log, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api,\r\n AJAX, DownloadService, $state,Upload) {\r\n\r\n\r\n \r\n\r\n }\r\n})();\r\n\n//\r\n// (function () {\r\n// 'use strict';\r\n// angular\r\n// .module ('app.trackTrace')\r\n// .controller ('oldActionBoardController', oldActionBoardController);\r\n\r\n// /** @ngInject */\r\n// oldActionBoardController.$inject = [\r\n// '$rootScope',\r\n// '$scope',\r\n// 'TrackTraceService',\r\n// 'UserService',\r\n// '$mdDialog',\r\n// '$mdMedia',\r\n// '$location',\r\n// '$anchorScroll',\r\n// 'anchorSmoothScroll',\r\n// '$interval',\r\n// '$document'\r\n// ];\r\n// function oldActionBoardController (\r\n// $rootScope,\r\n// $scope,\r\n// TrackTraceService,\r\n// UserService,\r\n// $mdDialog,\r\n// $mdMedia,\r\n// $location,\r\n// $anchorScroll,\r\n// anchorSmoothScroll,\r\n// $interval,\r\n// $document\r\n// ) {\r\n// $scope.init = function () {\r\n// $scope.notAuthorize = false;\r\n// $scope.all_Action_boardData = '';\r\n// $scope.showList = false;\r\n// vm.user = UserService.getUserData ();\r\n// vm.link = '/track-trace-action-board';\r\n// if (vm.user.view_action_board == true) {\r\n// $scope.getAllForecastData (true);\r\n// var autoRefershTime;\r\n// autoRefershTime = vm.user.action_board_time * 60000;\r\n// $scope.refreshData (autoRefershTime);\r\n// } else {\r\n// $scope.errorMessage = 'You are not authorize to view this action';\r\n// $scope.notAuthorize = true;\r\n// }\r\n\r\n// $scope.autoReferesh ();\r\n// //$scope.autoScroll();\r\n// // if($location.path () == '/track-trace-action-board') {\r\n// // //scrollDown($(\"html,body\"));\r\n// // $scope.autoScroll();\r\n// // }\r\n// };\r\n// var vm = this;\r\n// vm.dataRefresher;\r\n\r\n// $scope.toggleTime = 60000;\r\n// $scope.sessionTime = 1500000;\r\n\r\n// vm.hardRefresh = hardRefresh;\r\n// vm.heading_text = 'Action Board';\r\n// vm.filtersVisible = false;\r\n// vm.showCustomizeResults = showCustomizeResults;\r\n\r\n// function hardRefresh (keyCodeString) {\r\n// var hardRefreshCodes = [\r\n// '116-shiftKey',\r\n// '82-metaKey-shiftKey',\r\n// '116-ctrlKey',\r\n// ];\r\n\r\n// if (hardRefreshCodes.includes (keyCodeString)) {\r\n// event.preventDefault ();\r\n// localStorage.setItem ('invalidateCache', true);\r\n// location.reload (true);\r\n// }\r\n// }\r\n\r\n// $scope.getAllForecastData = function (setPageFlag) {\r\n// if (setPageFlag) {\r\n// $scope.loader = true;\r\n// $scope.showList = true;\r\n// } else {\r\n// $scope.loader = false;\r\n// $scope.showList = false;\r\n// }\r\n\r\n// TrackTraceService.getAction_board_Data ().then (function (response) {\r\n// $scope.showList = false;\r\n// $scope.loader = false;\r\n\r\n// var someDate = '';\r\n// $scope.all_Action_boardData = response.action_board_records;\r\n// if (setPageFlag) {\r\n// $scope.openAllShipment = false;\r\n// angular.forEach ($scope.all_Action_boardData, function (val, key) {\r\n// someDate = $scope.getDayOfWeek (new Date (val.date));\r\n// var today = $scope.getDayOfWeek (new Date ());\r\n\r\n// if (someDate === today) {\r\n// $scope.makeToggleActive (key);\r\n// }\r\n// });\r\n// } else {\r\n// $scope.openAllShipment = true;\r\n// }\r\n\r\n// });\r\n// };\r\n\r\n// $scope.refreshData = function (refereshTime) {\r\n// vm.dataRefresher = $interval (function () {\r\n// $scope.getAllForecastData (false);\r\n// }, refereshTime);\r\n// };\r\n// $scope.makeToggleActive = function (idx) {\r\n// $scope.scrollToPosition (idx);\r\n// $scope.expandShipment ($scope.all_Action_boardData[idx], idx);\r\n\r\n// };\r\n\r\n// $scope.expandShipment = function (data, ids) {\r\n// if (ids >= $scope.all_Action_boardData.length) {\r\n// ids = 0;\r\n// setTimeout (function () {\r\n// $scope.makeToggleActive (ids);\r\n// }, $scope.toggleTime);\r\n// } else {\r\n// setTimeout (function () {\r\n// $scope.makeToggleActive (ids + 1);\r\n// }, $scope.toggleTime);\r\n// }\r\n// if (data != undefined && !data.expandMoreShipping) {\r\n// data.expandMoreShipping = true;\r\n\r\n// }\r\n// };\r\n\r\n\r\n// $scope.scrollToPosition = function (id) {\r\n// //$location.hash('mdCard-' + id);\r\n// //$anchorScroll('mdCard-' + id);\r\n\r\n// // anchorSmoothScroll.scrollTo('mdCard-'+id);\r\n\r\n// $scope.slowScroll (id);\r\n// };\r\n// var targetOffset;\r\n// $scope.slowScroll = function (id) {\r\n// $ (document).ready (function () {\r\n\r\n// if (id && $location.path () == '/track-trace-action-board') {\r\n// var scrollPostion ;\r\n// if ($ ('#mdCard-' + id).offset ()) {\r\n// targetOffset = $ ('#mdCard-' + id).offset ().top;\r\n\r\n// //scrollPostion = $(document).height() + targetOffset;\r\n// }\r\n// else {\r\n// targetOffset = $ ('#mdCard-0').offset ().top;\r\n// scrollPostion = $(document).height() - targetOffset;\r\n// }\r\n\r\n\r\n// $ ('html, body').animate (\r\n// {\r\n// scrollTop: targetOffset - 50,\r\n// },\r\n// ($(document).height() * 10)\r\n// );\r\n\r\n// // $scope.newAutoScroll(scrollPostion);\r\n// //$scope.autoScroll(scrollPostion);\r\n// }\r\n\r\n// // $(window).on('scroll',function(){\r\n// // var y_scroll_pos = window.pageYOffset;\r\n// // var scroll_pos_test = 150;\r\n\r\n// // // set to whatever you want it to be\r\n\r\n\r\n\r\n// // })\r\n// $ (window).on ('mousewheel', function () {\r\n// $ ('html,body').stop ();\r\n// });\r\n// $ (window).on ('mousedown', function () {\r\n// $ ('html,body').stop ();\r\n// });\r\n\r\n// return false;\r\n// });\r\n// };\r\n\r\n\r\n\r\n\r\n\r\n// $scope.autoScroll = function(bottom){\r\n// var delay = 120000;\r\n\r\n// if($location.path () == '/track-trace-action-board'){\r\n\r\n// $(\"html, body\").animate({ scrollTop: bottom }, delay);\r\n// setTimeout(function() {\r\n// $('html, body').animate({scrollTop:0}, delay);\r\n// },60000);\r\n// setInterval(function(){\r\n// // delay - it will take 4 secound in total from the top of the page to the bottom\r\n// $(\"html, body\").animate({ scrollTop: bottom }, delay);\r\n// setTimeout(function() {\r\n// $('html, body').animate({scrollTop:0}, delay);\r\n// },60000);\r\n\r\n// },80000);\r\n// }\r\n// // scrollDown($(\"html,body\"));\r\n\r\n// }\r\n\r\n\r\n\r\n// //Require jQuery\r\n// function scrollSmoothToBottom () {\r\n// $(scrollingElement).animate({\r\n// scrollTop: document.body.scrollHeight\r\n// }, 50000);\r\n// }\r\n\r\n// //Require jQuery\r\n// function scrollSmoothToTop () {\r\n// $(scrollingElement).animate({\r\n// scrollTop: 0\r\n// }, 50000);\r\n// }\r\n\r\n\r\n\r\n// function scrollDown(el) {\r\n// el.animate({\r\n// scrollTop: (el[0].scrollHeight + targetOffset)\r\n// }, 30000, function() {\r\n\r\n// scrollUp(el)\r\n// });\r\n// }\r\n\r\n// function scrollUp(el) {\r\n// el.animate({\r\n// scrollTop: 0\r\n// }, 30000, function() {\r\n// scrollDown(el);\r\n// });\r\n// }\r\n\r\n\r\n\r\n// $scope.getExceptions = function (exc) {\r\n// if (exc == []) {\r\n// return '';\r\n// }\r\n// };\r\n\r\n// // Show the advanced search md-dialog\r\n// function showCustomizeResults (ev) {\r\n// var useFullScreen =\r\n// ($mdMedia ('sm') || $mdMedia ('xs')) && vm.customFullscreen;\r\n// $mdDialog\r\n// .show ({\r\n// templateUrl: '/app/track-trace/action-board/customize-results/customize-results.html',\r\n// parent: angular.element (document.body),\r\n// targetEvent: ev,\r\n// clickOutsideToClose: true,\r\n// fullscreen: useFullScreen,\r\n// })\r\n// .then (\r\n// function (answer) {\r\n// vm.status = 'You said the information was \"' + answer + '\".';\r\n// },\r\n// function () {\r\n// vm.status = 'You cancelled the dialog.';\r\n// }\r\n// );\r\n// }\r\n\r\n// $scope.getDayOfWeek = function (date) {\r\n// var dayOfWeek = new Date (date).getUTCDay ();\r\n// return isNaN (dayOfWeek)\r\n// ? null\r\n// : [\r\n// 'Sunday',\r\n// 'Monday',\r\n// 'Tuesday',\r\n// 'Wednesday',\r\n// 'Thursday',\r\n// 'Friday',\r\n// 'Saturday',\r\n// ][dayOfWeek];\r\n// };\r\n\r\n// $scope.autoReferesh = function () {\r\n// $interval (function () {\r\n// UserService.getAction_board_autoRefereshed ().then (function (res) {\r\n// var resetAuth = {\r\n// uid: res.config.headers.uid,\r\n// client: res.config.headers.client,\r\n// 'access-token': res.config.headers['access-token'],\r\n// expiry: res.config.headers.expiry,\r\n// };\r\n// UserService.storeResetAuth (resetAuth);\r\n// setTimeout (function () {\r\n// $scope.getAllForecastData (false);\r\n// }, 30000);\r\n// });\r\n// }, $scope.sessionTime);\r\n// };\r\n// // =======================================New Scroll changes =====================\r\n\r\n\r\n// // $scope.ScrollRate = 100;\r\n\r\n// // $scope.scrollDiv_init = function() {\r\n// // var test = document.getElementById(\"content-scroller\").scrollHeight;\r\n// // // var queryResult = $document[0].getElementById('Action-container')\r\n// // // $scope.DivElmnt = angular.element(queryResult);\r\n// // \t$scope.DivElmnt = angular.element(document.getElementById('Action-container'));\r\n// // // console.log(\"$scope.DivElmnt\",$scope.DivElmnt)\r\n// // \t$scope.ReachedMaxScroll = false;\r\n// // \tif($scope.DivElmnt)\r\n// // \t$scope.DivElmnt.scrollTop = 0;\r\n// // \t$scope.PreviousScrollTop = 0;\r\n\r\n\r\n// // $scope.ScrollInterval = $interval( function(){ $scope.scrollDiv(); }, $scope.ScrollRate);\r\n// // }\r\n\r\n// // $scope.scrollDiv = function() {\r\n\r\n// // \tif (!$scope.ReachedMaxScroll) {\r\n// // \t\t$scope.DivElmnt.scrollTop = $scope.PreviousScrollTop;\r\n// // \t\t$scope.PreviousScrollTop++;\r\n\r\n// // \t\t$scope.ReachedMaxScroll = $scope.DivElmnt.scrollTop >= ($scope.DivElmnt.scrollHeight - $scope.DivElmnt.offsetHeight);\r\n// // \t}\r\n// // \telse {\r\n// // \t\t$scope.ReachedMaxScroll = ($scope.DivElmnt.scrollTop == 0)?false:true;\r\n\r\n// // \t\t$scope.DivElmnt.scrollTop = $scope.PreviousScrollTop;\r\n// // \t\t$scope.PreviousScrollTop--;\r\n// // \t}\r\n// // }\r\n\r\n// // $scope.pauseDiv = function() {\r\n// // \t$interval.cancel($scope.ScrollInterval);\r\n// // }\r\n\r\n// // $scope.resumeDiv = function() {\r\n// // \t$scope.PreviousScrollTop = $scope.DivElmnt.scrollTop;\r\n// // $scope.ScrollInterval = $interval( function(){ $scope.scrollDiv(); }, $scope.ScrollRate);\r\n// // }\r\n// $scope.init ();\r\n// }\r\n// }) ();\r\n\n(function () {\r\n\t'use strict';\r\n\tangular\r\n\t\t.module('app.trackTrace')\r\n\t\t.controller('ActionBoardController', ActionBoardController);\r\n\r\n\t/** @ngInject */\r\n\tActionBoardController.$inject = [\r\n\t\t'$rootScope',\r\n\t\t'$scope',\r\n\t\t'TrackTraceService',\r\n\t\t'UserService',\r\n\t\t'$mdDialog',\r\n\t\t'$mdMedia',\r\n\t\t'$location',\r\n\t\t'$anchorScroll',\r\n\t\t'anchorSmoothScroll',\r\n\t\t'$interval',\r\n\t\t'$document'\r\n\t];\r\n\tfunction ActionBoardController(\r\n\t\t$rootScope,\r\n\t\t$scope,\r\n\t\tTrackTraceService,\r\n\t\tUserService,\r\n\t\t$mdDialog,\r\n\t\t$mdMedia,\r\n\t\t$location,\r\n\t\t$anchorScroll,\r\n\t\tanchorSmoothScroll,\r\n\t\t$interval,\r\n\t\t$document\r\n\t) {\r\n\t\t$scope.init = function () {\r\n\t\t\t$scope.notAuthorize = false;\r\n\t\t\t$scope.beforeLoad = true;\r\n\t\t\tif($scope.beforeLoad){\r\n\t\t\t\t$scope.loader = true;\r\n\t\t\t}else{\r\n\t\t\t\t$scope.loader = false;\r\n\t\t\t}\r\n\t\t\t$scope.showList = false;\r\n\t\t\tvm.user = UserService.getUserData();\r\n\t\t\tvm.link = '/track-trace-action-board';\r\n\t\t\tif (vm.user.view_action_board == true) {\r\n\t\t\t\t \r\n\t\t\t\t$scope.getAllActionBoardData(true);\r\n\t\t\t\tvar autoRefershTime;\r\n\t\t\t\tautoRefershTime = vm.user.action_board_time * 60000;\r\n\t\t\t\t$scope.refreshData(autoRefershTime);\r\n\t\t\t} else {\r\n\t\t\t\t$scope.errorMessage = 'You are not authorize to view this action';\r\n\t\t\t\t$scope.notAuthorize = true;\r\n\t\t\t}\r\n\r\n\t\t\t$scope.autoReferesh();\r\n\t\t\t\r\n\r\n\t\t};\r\n\t\tvar vm = this;\r\n\t\tvm.dataRefresher;\r\n\r\n\t\t$scope.toggleTime = 60000;\r\n\t\t$scope.sessionTime = 1500000;\r\n\t\t$scope.initTableData = false;\r\n\t\t// vm.hardRefresh = hardRefresh;\r\n\t\tvm.heading_text = 'Action Board';\r\n\t\tvm.filtersVisible = false;\r\n\t\t$scope.openAllShipment = false;\r\n\t\tvm.showCustomizeResults = showCustomizeResults;\r\n\t\t$scope.is_OnLoadApiCall = false;\r\n\t\t$scope.is_onRefereshApiCall = false;\r\n\t\t$scope.all_Action_boardData = [];\r\n\t\t$scope.tableData = [];\r\n\t\t\r\n\r\n\t\t$scope.getDataByDate = function () {\r\n\t\t\tvar ActionBoardRecords = [];\r\n\t\t\tvar $today = new Date();\r\n\r\n\t\t\tActionBoardRecords[0] = { 'dates': $today.subDays(1), 'days': $scope.getDayOfWeek(new Date($today.subDays(1))) };\r\n\t\t\tActionBoardRecords[1] = { 'dates': $today, 'days': $scope.getDayOfWeek(new Date($today)) };\r\n\t\t\tActionBoardRecords[2] = { 'dates': $today.addDays(1), 'days': $scope.getDayOfWeek(new Date($today.addDays(1))) };\r\n\t\t\tActionBoardRecords[3] = { 'dates': $today.addDays(2), 'days': $scope.getDayOfWeek(new Date($today.addDays(2))) };\r\n\t\t\tActionBoardRecords[4] = { 'dates': $today.addDays(3), 'days': $scope.getDayOfWeek(new Date($today.addDays(3))) };\r\n\t\t\tActionBoardRecords[5] = { 'dates': $today.addDays(4), 'days': $scope.getDayOfWeek(new Date($today.addDays(4))) };\r\n\t\t\treturn ActionBoardRecords;\r\n\r\n\t\t}\r\n\t\t$scope.refereshID = 0;\r\n\t\t$scope.refereshVal = '';\r\n\t\t$scope.getAllActionBoardData = function (setPageFlag) {\r\n\r\n\t\t\tvar someDate = '';\r\n\t\t\t$scope.all_Action_boardData = $scope.getDataByDate();\r\n\t\t\tangular.forEach($scope.all_Action_boardData, function (val, key) {\r\n\t\t\t\tsomeDate = $scope.getDayOfWeek(new Date(val.dates));\r\n\t\t\t\tvar today = $scope.getDayOfWeek(new Date());\r\n\t\t\t\t$scope.refereshID = key;\r\n\t\t\t\t$scope.refereshVal = val;\r\n\t\t\t\tif (someDate === today) {\r\n\t\t\t\t\t$scope.makeToggleActive(key, val);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\r\n\r\n\r\n\t\t$scope.refreshData = function (refereshTime) {\r\n\t\t\tconsole.log('auto-referesh called')\r\n\t\t\tvm.dataRefresher = $interval(function () {\r\n\r\n\t\t\t\t$scope.is_OnLoadApiCall = false;\r\n\t\t\t\t$scope.makeToggleActive($scope.refereshID, $scope.refereshVal);\r\n\t\t\t}, refereshTime);\r\n\t\t};\r\n\r\n\t\t$scope.makeToggleActive = function (idx, val) {\r\n\t\t\t$scope.scrollToPosition(idx);\r\n\t\t\tif(vm.dataRefresher != undefined){\r\n\t\t\t$scope.expandShipment($scope.all_Action_boardData[idx], idx);\r\n\t\t\t// console.log('$scope.is_OnLoadApiCall',$scope.is_OnLoadApiCall)\r\n\t\t\tif (idx < $scope.all_Action_boardData.length && !$scope.is_OnLoadApiCall) {\r\n\r\n\t\t\t\t$scope.loadTableData(idx, $scope.all_Action_boardData[idx])\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t\t};\r\n\r\n\t\t$scope.shipment_records = [];\r\n\t\t$scope.dataLoading = false;\r\n\r\n\t\t$scope.loadTableData = function (indx, val) {\r\n\r\n\t\t\tvar currentDate = $scope.getDateFormat(val.dates);\r\n\t\t\tTrackTraceService.getAction_board_Data(currentDate).then(function (response) {\r\n\t\t\t\tif(response == 401){\r\n\t\t\t $interval.cancel(vm.dataRefresher);\r\n\t\t\t vm.dataRefresher=undefined;\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t$scope.initTableData = true;\r\n\t\t\t\tval.dataLoading = false;\r\n\t\t\t\t$scope.beforeLoad = false\r\n\t\t\t\t$scope.loader = false;\r\n\t\t\t\t$scope.tableData[indx] = response.action_board_records[0];\r\n\t\t\t }\r\n\t\t\t});\r\n\t\t}\r\n\r\n\t\t$scope.expandShipment = function (data, ids) {\r\n\t\t\tif(vm.dataRefresher != undefined){\r\n\t\t\tif (ids >= $scope.all_Action_boardData.length) {\r\n\t\t\t\tids = 0;\r\n\t\t\t\t// setTimeout (function () {\r\n\t\t\t\t$scope.makeToggleActive(ids, $scope.all_Action_boardData[ids]);\r\n\t\t\t\t// }, $scope.toggleTime);\r\n\t\t\t\t$scope.is_OnLoadApiCall = true;\r\n\t\t\t} else {\r\n\t\t\t\tsetTimeout(function () {\r\n\r\n\t\t\t\t\t$scope.makeToggleActive(ids + 1, data);\r\n\r\n\t\t\t\t}, $scope.toggleTime);\r\n\t\t\t}\r\n\t\t\tif (data != undefined && !data.expandMoreShipping) {\r\n\t\t\t\tdata.expandMoreShipping = true;\r\n\t\t\t\tdata.dataLoading = true;\r\n\t\t\t}\r\n\t\t }\r\n\t\t};\r\n\r\n\t\t$scope.scrollToPosition = function (id) {\r\n\r\n\t\t\t$scope.slowScroll(id);\r\n\t\t};\r\n\t\tvar targetOffset;\r\n\t\t$scope.slowScroll = function (id) {\r\n\t\t\t$(document).ready(function () {\r\n\r\n\t\t\t\tif (id && $location.path() == '/track-trace-action-board') {\r\n\t\t\t\t\tvar scrollPostion;\r\n\t\t\t\t\tif ($('#mdCard-' + id).offset()) {\r\n\t\t\t\t\t\ttargetOffset = $('#mdCard-' + id).offset().top;\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttargetOffset = $('#mdCard-0').offset().top;\r\n\t\t\t\t\t\tscrollPostion = $(document).height() - targetOffset;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$('html, body').animate(\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tscrollTop: targetOffset - 50,\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t($(document).height() * 10)\r\n\t\t\t\t\t);\r\n\r\n\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t\t$(window).on('mousewheel', function () {\r\n\t\t\t\t\t$('html,body').stop();\r\n\t\t\t\t});\r\n\t\t\t\t$(window).on('mousedown', function () {\r\n\t\t\t\t\t$('html,body').stop();\r\n\t\t\t\t});\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t});\r\n\t\t};\r\n\r\n\r\n\r\n\t\t$scope.autoScroll = function (bottom) {\r\n\t\t\tvar delay = 120000;\r\n\r\n\t\t\tif ($location.path() == '/track-trace-action-board') {\r\n\r\n\t\t\t\t$(\"html, body\").animate({ scrollTop: bottom }, delay);\r\n\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t$('html, body').animate({ scrollTop: 0 }, delay);\r\n\t\t\t\t}, 60000);\r\n\t\t\t\tsetInterval(function () {\r\n\t\t\t\t\t// delay - it will take 4 secound in total from the top of the page to the bottom\r\n\t\t\t\t\t$(\"html, body\").animate({ scrollTop: bottom }, delay);\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$('html, body').animate({ scrollTop: 0 }, delay);\r\n\t\t\t\t\t}, 60000);\r\n\r\n\t\t\t\t}, 80000);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\r\n\r\n\r\n\r\n\t\t$scope.getExceptions = function (exc) {\r\n\t\t\tif (exc == []) {\r\n\t\t\t\treturn '';\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t// Show the advanced search md-dialog\r\n\t\tfunction showCustomizeResults(ev) {\r\n\t\t\tvar useFullScreen =\r\n\t\t\t\t($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\t\t\t$mdDialog\r\n\t\t\t\t.show({\r\n\t\t\t\t\ttemplateUrl: '/app/track-trace/action-board/customize-results/customize-results.html',\r\n\t\t\t\t\tparent: angular.element(document.body),\r\n\t\t\t\t\ttargetEvent: ev,\r\n\t\t\t\t\tclickOutsideToClose: true,\r\n\t\t\t\t\tfullscreen: useFullScreen,\r\n\t\t\t\t})\r\n\t\t\t\t.then(\r\n\t\t\t\t\tfunction (answer) {\r\n\t\t\t\t\t\tvm.status = 'You said the information was \"' + answer + '\".';\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfunction () {\r\n\t\t\t\t\t\tvm.status = 'You cancelled the dialog.';\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t}\r\n\r\n\t\t$scope.getDayOfWeek = function (date) {\r\n\t\t\tvar dayOfWeek = new Date(date).getUTCDay();\r\n\t\t\treturn isNaN(dayOfWeek)\r\n\t\t\t\t? null\r\n\t\t\t\t: [\r\n\t\t\t\t\t'Sunday',\r\n\t\t\t\t\t'Monday',\r\n\t\t\t\t\t'Tuesday',\r\n\t\t\t\t\t'Wednesday',\r\n\t\t\t\t\t'Thursday',\r\n\t\t\t\t\t'Friday',\r\n\t\t\t\t\t'Saturday',\r\n\t\t\t\t][dayOfWeek];\r\n\t\t};\r\n\r\n\t\t$scope.autoReferesh = function () {\r\n\t\t\t$interval(function () {\r\n\t\t\t\tUserService.getAction_board_autoRefereshed().then(function (res) {\r\n\t\t\t\t\tvar resetAuth = {\r\n\t\t\t\t\t\tuid: res.config.headers.uid,\r\n\t\t\t\t\t\tclient: res.config.headers.client,\r\n\t\t\t\t\t\t'access-token': res.config.headers['access-token'],\r\n\t\t\t\t\t\texpiry: res.config.headers.expiry,\r\n\t\t\t\t\t};\r\n\t\t\t\t\tUserService.storeResetAuth(resetAuth);\r\n\t\t\t\t\tsetTimeout(function () {\r\n\t\t\t\t\t\t$scope.is_OnLoadApiCall = false;\r\n\t\t\t\t\t\t$scope.makeToggleActive($scope.refereshID, $scope.refereshVal);\r\n\t\t\t\t\t}, 30000);\r\n\t\t\t\t});\r\n\t\t\t}, $scope.sessionTime);\r\n\t\t};\r\n\r\n\r\n\t\t$scope.getDateFormat = function (dates) {\r\n\t\t\tvar today = new Date(dates);\r\n\t\t\tvar dd = today.getDate();\r\n\t\t\tvar mm = today.getMonth() + 1;\r\n\t\t\tvar yyyy = today.getFullYear();\r\n\t\t\tif (dd < 10) { dd = '0' + dd } if (mm < 10) { mm = '0' + mm }\r\n\t\t\tvar currentDate = dd + '/' + mm + '/' + yyyy;\r\n\t\t\treturn currentDate;\r\n\t\t}\r\n\r\n\r\n\t\tDate.prototype.addDays = function (days) {\r\n\t\t\tvar dat = new Date(this.valueOf() + days * 24 * 60 * 60 * 1000);\r\n\t\t\treturn dat;\r\n\t\t}\r\n\r\n\t\tDate.prototype.subDays = function (days) {\r\n\t\t\tvar dat = new Date(this.valueOf() - days * 24 * 60 * 60 * 1000);\r\n\t\t\treturn dat;\r\n\t\t}\r\n\r\n\t\t$scope.init();\r\n\t}\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name shippingDetails\r\n *\r\n * @description The module that handles the details of a shippment\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular.module('app.shippingDetails', [\r\n 'app.core',\r\n 'md.data.table',\r\n 'ngTable',\r\n 'datamaps',\r\n 'ngAnimate'\r\n ]);\r\n\r\n})();\r\n\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.calcArc\r\n * @description calculates the longitude and latitude from the addresses\r\n * @param {source_addr} - the source address\r\n * @param {destination_addr} - the destination address\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getLatLong\r\n * @description gets the longitude and latitude from the google api\r\n * @param {address} - the address to get the longitude and latitude for\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.bookmarkShipment\r\n * @description gets the bookmarked shipments from the database\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getNumBookedShipments\r\n * @description returns the number of bookmarked shipments\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getShipment\r\n * @description returns a shipments details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getArc\r\n * @description returns the arc variable\r\n */\r\n\r\n (function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .service('ShippingDetailsCslService', ShippingDetailsCslService);\r\n\r\n /** @ngInject */\r\n ShippingDetailsCslService.$inject = ['$http', '$log', 'api', '$window', '$q'];\r\n function ShippingDetailsCslService($http, $log, api, $window, $q) {\r\n var shipment,\r\n shipment_summary,\r\n arc = [], pins = [],\r\n cachedBookmarks = false,\r\n check_calls=false;\r\n\r\n function calcArc(source_addr, destination_addr){\r\n getLatLong(source_addr).then(function(source){\r\n getLatLong(destination_addr).then(function (destination){\r\n arc.push([{origin: source, destination: destination}]);\r\n });});\r\n }\r\n\r\n function getLatLong(address){\r\n var url = 'https://maps.googleapis.com/maps/api/geocode/json?address='+address;\r\n var promise = $http.get(url).then(function(res){\r\n $log.debug(res);\r\n return res.data.results[0].geometry.location;\r\n });\r\n return promise;\r\n }\r\n\r\n return {\r\n getBookmarks: function(type){\r\n\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'csl'){\r\n\r\n if(localStorage.switchEmailCslType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCslType+\"&customer_type=\"+localStorage.customerType+\"&bookmark_type=\"+type;\r\n }else if(localStorage.userCompanyCsl){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl)+\"&customer_type=\"+localStorage.customerType+\"&bookmark_type=\"+type;\r\n }\r\n }else{\r\n params +=\"?customer_type=csl&bookmark_type=\"+type;\r\n }\r\n\r\n\r\n var url = '/load_bookmarks'+params;\r\n var promise = $http.get(api.url_v2+url).then(function(res){\r\n cachedBookmarks = res.data;\r\n return res.data;\r\n });\r\n return promise;\r\n },\r\n getUserBookmarks: function(quer){\r\n var params = \"\";\r\n angular.forEach(quer, function(val, key) {\r\n params += \"&\" + key + \"=\" + val\r\n });\r\n\r\n var url = '/load_bookmarks?customer_type=csl'+params;\r\n var promise = $http.get(api.url_v2+url).then(function(res){\r\n cachedBookmarks = res.data;\r\n return res.data;\r\n });\r\n return promise;\r\n },\r\n getStatusColors: function(){\r\n\r\n var status_colors = {\r\n\r\n 'PLANNED':{'color-code':'#30C268','icon':'','hover_icon':''},\r\n 'PICKUP':{'color-code':'#30C268','icon':'/assets/images/icons/covered.png','hover_icon':'/assets/images/icons/hover/covered.png'},\r\n 'LOADED':{'color-code':'#30C268','icon':'/assets/images/icons/dispatched.png','hover_icon':'/assets/images/icons/hover/dispatched.png'},\r\n 'CONSIGNEE':{'color-code':'#30C268','icon':'/assets/images/icons/pickup.png','hover_icon':'/assets/images/icons/hover/pickup.png'},\r\n 'UNDELIVERED':{'color-code':'#30C268','icon':'/assets/images/icons/loaded.png','hover_icon':'/assets/images/icons/hover/loaded.png'},\r\n 'DELIVERED':{'color-code':'#5E6163','icon':'/assets/images/icons/delivered.png','hover_icon':'/assets/images/icons/hover/delivered.png'}\r\n\r\n };\r\n\r\n return status_colors;\r\n\r\n },\r\n getCheckCalls: function(url){\r\n /*var params = \"\";\r\n angular.forEach(quer, function(val, key) {\r\n params += \"?\" + key + \"=\" + val\r\n });*/\r\n\r\n var url = '/check_calls_csl?'+url;\r\n var promise = $http.get(api.url_v2+url).then(function(res1){\r\n\r\n check_calls = res1.data.check_calls;\r\n\r\n return check_calls;\r\n });\r\n return promise;\r\n\r\n },\r\n hasCachedBookmarks: function() {\r\n return !!cachedBookmarks;\r\n },\r\n getCachedBookmarks: function() {\r\n return cachedBookmarks;\r\n },\r\n bookmarkShipment: function(type){\r\n var url = '/load_bookmarks';\r\n var promise = $http.post(api.url_v2 + url, {pro:shipment.pro, bookmark_type: type, customer_type: 'csl'}).then(function(res){\r\n if(res.data.bookmark_type == 'normal') { shipment.bookmark_id = res.data.id; }\r\n if(res.data.bookmark_type == 'discussion') { shipment.discussion_bookmark_id = res.data.id; }\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n bookmarkNotification: function(uid){\r\n var type = 'csl';\r\n var url = '/shipments/'+shipment.pro+'/user_shipment_discussions/create_discussion';\r\n var promise = $http.put(api.url_v2+url, {user_id: uid, active: true, shipment_type: type}).then(function(res){\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n unBookmarkNotification: function(uid){\r\n var type = 'csl';\r\n var url = '/shipments/'+shipment.pro+'/user_shipment_discussions/create_discussion';\r\n var promise = $http.put(api.url_v2+url, {user_id: uid, active: false, shipment_type: type}).then(function(res){\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n markAsRead: function(){\r\n var type = 'csl';\r\n var url = '/shipments/'+shipment.pro+'/shipment_comments/mark_as_read';\r\n var promise = $http.put(api.url_v2+url, {shipment_type: type}).then(function(res){\r\n return res;\r\n });\r\n return promise;\r\n },\r\n unBookmarkShipment: function(type){\r\n var url = '/load_bookmarks/' + shipment.pro+\"?bookmark_type=\"+type+\"&customer_type=csl\";\r\n var promise = $http.delete(api.url_v2+url).then(function(res){\r\n if (res.data.bookmark.pro == shipment.pro){\r\n shipment.bookmark_id = 0;\r\n }\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n unBookmarkShipmentDiscussion: function(type){\r\n var url = '/load_bookmarks/' + shipment.pro+\"?bookmark_type=\"+type+\"&customer_type=csl\";\r\n var promise = $http.delete(api.url_v2+url).then(function(res){\r\n if (res.data.bookmark.pro == shipment.pro){\r\n shipment.discussion_bookmark_id = 0;\r\n }\r\n return shipment;\r\n });\r\n return promise;\r\n\r\n },\r\n unBookmarkId: function(pro,type){\r\n var url = '/load_bookmarks/' + pro+\"?bookmark_type=\"+type+\"&customer_type=csl\";\r\n\r\n var promise = $http.delete(api.url_v2+url).then(function(res){\r\n\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n getShipment: function(ref_num){\r\n\r\n var params = \"\";\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'csl'){\r\n\r\n if(localStorage.switchEmailCslType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCslType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCsl){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=csl\";\r\n }\r\n\r\n var promise = $http.get(api.url+'/shipments/'+ref_num+params).then(function(res){\r\n shipment = res.data;\r\n shipment.pro = shipment.pro.toString();\r\n $log.debug(shipment);\r\n //calcArc(shipment.shippercity, shipment.destination);\r\n // debugger;\r\n arc.length = 0;\r\n arc.push({ origin: {\r\n name: shipment.origincity,\r\n // latitude: shipment.geocodes.origin_lat,\r\n // longitude: shipment.geocodes.origin_lng,\r\n },\r\n destination: {\r\n name: shipment.destinationcity,\r\n // latitude: shipment.geocodes.dest_lat,\r\n // longitude: shipment.geocodes.dest_lng,\r\n },\r\n options: {\r\n strokeWidth: 3,\r\n strokeColor: 'rgba(133, 217, 164, 1)',\r\n greatArc: false,\r\n arcSharpness: 0.25\r\n }\r\n });\r\n arc.map(function(d){\r\n var origin = d.origin;\r\n origin.radius = 5;\r\n origin.fillKey = 'bubble';\r\n var dest = d.destination;\r\n dest.radius = 5;\r\n dest.fillKey = 'bubble';\r\n pins.push(origin);\r\n pins.push(dest);\r\n });\r\n shipment_summary = [ //summary used in contact message\r\n {display: 'SHIPPINGDETAILS.CUSTOMER_NAME', text: 'Customer Name', value: shipment.customername},\r\n {display: 'SHIPPINGDETAILS.SHIP_DATE', text: 'Ship Date', value: shipment.shipdate},\r\n {display: 'SHIPPINGDETAILS.DUE_DATE', text: 'Due Date', value: shipment.duedate},\r\n {display: 'SHIPPINGDETAILS.ORIGIN', text: 'Origin', value: shipment.origin},\r\n {display: 'SHIPPINGDETAILS.DESTINATION', text: 'Destination', value: shipment.destination},\r\n {display: 'SHIPPINGDETAILS.AWB', text: 'AWB', value: shipment.awb}\r\n //{display: 'SHIPPINGDETAILS.INVOICE_NUM', value: shipment.shipment_invoices[0].invoicenumber}\r\n ];\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n\r\n getInvoice:function(ref_num){\r\n\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'csl'){\r\n\r\n if(localStorage.switchEmailCslType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCslType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCsl){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=csl\";\r\n }\r\n\r\n\r\n var promise = $http.get(api.url_v2+'/invoices_csl/'+ref_num+params).then(function(res){\r\n return res.data;\r\n });\r\n\r\n return promise;\r\n\r\n },\r\n\r\n getLineCharges:function(ref_num){\r\n //csl/milestones\r\n var promise = $http.get(api.url_v2+'/invoices_csl/'+ref_num+'/line_charges').then(function(res){\r\n return res.data;\r\n });\r\n\r\n return promise;\r\n },\r\n\r\n getMilestone:function(ref_num){\r\n //csl/milestones\r\n var params = \"\";\r\n\r\n if(localStorage.customerType == 'csl'){\r\n\r\n if(localStorage.switchEmailCslType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCslType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCsl){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=csl\";\r\n }\r\n var promise = $http.get(api.url_v2+'/csl/milestones'+ params +'&pro_number='+ref_num).then(function(res){\r\n return res.data;\r\n });\r\n\r\n return promise;\r\n },\r\n\r\n getShipmentSummary: function() { //summary used for contact message\r\n return shipment_summary;\r\n },\r\n getShipmentVariable: function() { //used for contact message\r\n return shipment;\r\n },\r\n getArc: function(){\r\n return arc;\r\n },\r\n resetArc: function(){\r\n arc.length = 0;\r\n },\r\n getPins: function(){\r\n return pins;\r\n },\r\n resetPins: function(){\r\n pins.length = 0;\r\n },\r\n getShipmentPro: function(){\r\n if(typeof(shipment) != 'undefined'){\r\n return shipment.pro;\r\n }else{\r\n return 'no';\r\n }\r\n },\r\n\r\n getLoad: function(ref_num) {\r\n\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'csl'){\r\n\r\n if(localStorage.switchEmailCslType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCslType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCsl){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=csl\";\r\n }\r\n\r\n var promise = $http.get(api.url_v2+'/csl/loads/'+ref_num+params).then(function(res){\r\n\r\n shipment = res.data;\r\n shipment.pro = shipment.pro.toString();\r\n\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n\r\n downloadDocument: function(id,pro,filename){\r\n var url = \"/csl/loads/\" + pro + \"/download_csl_document?document_id=\"+id+\"&filename=\"+filename;\r\n $http.get(api.url_v2+url,{responseType: 'blob'}).then(function(res){\r\n var a = document.createElement(\"a\");\r\n document.body.appendChild(a);\r\n a.style = \"display: none\";\r\n var blob = new Blob([res.data], {type: \"application/pdf\"}),\r\n url = window.URL.createObjectURL(blob);\r\n a.href = url;\r\n a.download = filename;\r\n a.click();\r\n });\r\n },\r\n\r\n chunkArray: function(myArray, chunk_size){\r\n\r\n var index = 0;\r\n var arrayLength = myArray.length;\r\n var tempArray = [];\r\n var myChunk;\r\n\r\n for (index = 0; index < arrayLength; index += chunk_size) {\r\n myChunk = myArray.slice(index, index+chunk_size);\r\n // Do something if you want with the group\r\n tempArray.push(myChunk);\r\n }\r\n\r\n return tempArray;\r\n\r\n },\r\n saveDiscussionText: function(id,query,url){\r\n\r\n var dfd = $q.defer();\r\n //var dfd = $q.defer();\r\n $http.post(url,query).then(function(response){\r\n\r\n dfd.resolve(response.data);\r\n\r\n }, function errorCallback(error){\r\n\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n },\r\n getDiscussionData: function(url){\r\n\r\n var dfd = $q.defer();\r\n\r\n $http.get(url).then(function(response){\r\n\r\n dfd.resolve(response.data);\r\n\r\n }, function errorCallback(error){\r\n\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n\r\n },\r\n\r\n getSuffixDate: function(number){\r\n\r\n if (isNaN(number) || number < 1){\r\n return '';\r\n } else if (number % 100 == 11 || number % 100 == 12) {\r\n return 'th';\r\n } else {\r\n var lastDigit = number % 10;\r\n if (lastDigit === 1) {\r\n return 'st';\r\n } else if (lastDigit === 2) {\r\n return 'nd';\r\n } else if (lastDigit === 3) {\r\n return 'rd';\r\n } else if (lastDigit > 3) {\r\n return 'th';\r\n }\r\n }\r\n\r\n }\r\n\r\n };\r\n\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getShipment\r\n * @description calls the getShipment function from ShippingDetailsCslService and returns the shipping details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.docDate\r\n * @description returns the date of the document\r\n * @param {path} - the path to the document\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.bookmarkShipment\r\n * @description bookmarks the current shipment.\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.convertDate\r\n * @description converts dates to have dashes in it\r\n * @param {date} - the date that is being converted\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.convertTime\r\n * @description converts the time to have a colon in the middle\r\n * @param {time} - the time to be converted\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getReasonDescription\r\n * @description Gets a Reason Description for a milestone based on the milestone\r\n * itself, or an exception\r\n * @param {object} - the milestone\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.docName\r\n * @description returns the name of the document\r\n * @param {path} - the path of the document\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getInvoiceAddress\r\n * @description returns a list of the consignee address\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getToastPosition\r\n * @description returns the toast position (toast is a notification)\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getBarPercentage\r\n * @description gets the perecentage of days since shipper date divided by the total shipping period. percentage is used for the bar visualization\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.setDaysRemaining\r\n * @description sets days reamining based on the duedate and current date\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.sanitizePosition\r\n * @description sets the last position\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showBookmarkToast\r\n * @description shows the toast for a bookmark (toast is a notification)\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showContainerDetails\r\n * @description shows the container details modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showDocumentModal\r\n * @description shows the modal for document details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.closeDocumentModal\r\n * @description closes the modal for document details\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .filter('unique', function() {\r\n return function(collection, keyname) {\r\n var output = [],\r\n keys = [];\r\n angular.forEach(collection, function(item) {\r\n var key = item[keyname];\r\n if(keys.indexOf(key) === -1) {\r\n keys.push(key);\r\n output.push(item);\r\n }\r\n });\r\n return output;\r\n };\r\n })\r\n .directive('scrollToBottomCsl', function($timeout, $window) {\r\n return {\r\n scope: {\r\n scrollToBottomCsl: \"=\"\r\n },\r\n restrict: 'A',\r\n link: function(scope, element, attr) {\r\n scope.$watchCollection('scrollToBottomCsl', function(newVal) {\r\n if (newVal) {\r\n $timeout(function() {\r\n element[0].scrollTop = element[0].scrollHeight;\r\n }, 0);\r\n }\r\n\r\n });\r\n }\r\n };\r\n })\r\n // .directive('shipmentDiscussionChatKeyPress', function() {\r\n // return function( scope, elem ) {\r\n\r\n // elem.bind('keydown', function( event ) {\r\n // if(event.keyCode == 13 && !event.shiftKey){\r\n // scope.$broadcast('keydown', { code: event } );\r\n // return false;\r\n // }\r\n // else if(event.keyCode == 38 || event.keyCode == 40 || event.keyCode == 27 || event.keyCode == 13 || event.keyCode == 8){\r\n // scope.$broadcast('keydown', { code: event } );\r\n // }\r\n\r\n // });\r\n\r\n // elem.bind('click', function(event){\r\n\r\n // scope.focusIndex = 0;\r\n // angular.element('.chatMainInput .userLists').addClass(\"hide\");\r\n // angular.element('.chatSubInput .userLists').addClass(\"hide\");\r\n\r\n // });\r\n\r\n // };\r\n // })\r\n .directive( 'checkCallsHeight', function( $parse ) {\r\n return {\r\n restrict: 'A',\r\n link: function( $scope, elem, attrs ) {\r\n elem.ready(function(){\r\n\r\n $scope.verticalLineHeight = 0;\r\n\r\n $scope.$watch('reCalVerticalGreenLine',function(){\r\n //$scope.$apply(function(){\r\n\r\n //// console.log(1111);\r\n //// console.log($scope.checkCalls);\r\n //// console.log(1);\r\n\r\n var height = 0;\r\n var checkCallsCount = $scope.checkCallsCount;\r\n\r\n if(checkCallsCount > 0){\r\n\r\n var element = angular.element(document.querySelector('.location10000'));\r\n height = parseInt(height) + parseInt((element[0].offsetHeight)/2);\r\n\r\n for(var i=0; i<checkCallsCount; i++){\r\n\r\n var element = angular.element(document.querySelector('.location'+i));\r\n // Height in px\r\n height = parseInt(element[0].offsetHeight) + parseInt(height);\r\n\r\n }\r\n\r\n // adding margin-bottom height\r\n height = height + (10 * checkCallsCount) + 10;\r\n\r\n // Removing the 50% height in the last div\r\n\r\n var element = angular.element(document.querySelector('.location'+(checkCallsCount - 1)));\r\n var heightDeduct = parseInt((element[0].offsetHeight)/2);\r\n\r\n //var element = angular.element(document.querySelector('#location'+(checkCallsCount - 1)));\r\n //var heightDeduct = parseInt((element[0].offsetHeight)/2);\r\n\r\n height = height - heightDeduct;\r\n\r\n // adjustment\r\n height = height - 10;\r\n\r\n }\r\n\r\n $scope.verticalLineHeight = height;\r\n\r\n })\r\n })\r\n }\r\n }\r\n })\r\n .directive('scrollToTop', function() {\r\n return {\r\n restrict: 'A',\r\n link: function(scope, elem, attr) {\r\n elem.ready(function(){\r\n elem[0].scrollTop = 200;\r\n })\r\n\r\n }\r\n };\r\n })\r\n .animation('.slide', function() {\r\n var NG_HIDE_CLASS = 'ng-hide';\r\n return {\r\n beforeAddClass: function(element, className, done) {\r\n if(className === NG_HIDE_CLASS) {\r\n element.slideUp(done);\r\n }\r\n },\r\n removeClass: function(element, className, done) {\r\n if(className === NG_HIDE_CLASS) {\r\n element.hide().slideDown(done);\r\n }\r\n }\r\n }\r\n })\r\n .filter('userTagHighlight', function() {\r\n return function(input,names) {\r\n\r\n angular.forEach(names, function(value, key){\r\n\r\n if((input.search('@'+value.full_name) > -1) && (input.search(\"<span class='user_name_highlight'>\"+'@'+value.full_name+\"</span>\") < 0) ){\r\n // to highlight tagged user names in chat comments\r\n input = input.replace('@'+value.full_name, \"<span class='user_name_highlight'>\"+'@'+value.full_name+\"</span>\");\r\n\r\n }\r\n\r\n });\r\n\r\n //Hypertext link creating\r\n\r\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\r\n\r\n // //URLs starting with http://, https://, or ftp://\r\n // replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\r\n // replacedText = input.replace(replacePattern1, '<a href=\"$1\" target=\"_blank\">$1</a>');\r\n\r\n // //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\r\n // replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\r\n // replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\r\n\r\n //Change email addresses to mailto:: links.\r\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\r\n replacedText = input.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\r\n\r\n return replacedText;\r\n };\r\n\r\n })\r\n .controller('ShippingDetailsCslController', ShippingDetailsCslController)\r\n .controller('ToastCtrl', function($scope, $mdToast){\r\n $scope.closeToast = function(){ $mdToast.hide();};\r\n });\r\n\r\n /** @ngInject */\r\n ShippingDetailsCslController.$inject = ['NgMap', '$http', '$sce', '$mdpTimePicker', '$window', '$document', '$stateParams', '$location', '$anchorScroll', 'ShippingDetailsCslService', 'UserService', '$log', '$translatePartialLoader', '$mdDialog', '$mdMedia', '$scope', '$rootScope', '$mdToast', '$timeout', 'NgTableParams', '$filter', 'ContactsService', 'permissions', 'mdSelectHelper', 'api', 'downloadLink', 'google_api_url'];\r\n function ShippingDetailsCslController(NgMap, $http, $sce, $mdpTimePicker, $window, $document, $stateParams, $location, $anchorScroll, ShippingDetailsCslService, UserService, $log, $translatePartialLoader, $mdDialog, $mdMedia, $scope, $rootScope, $mdToast, $timeout, NgTableParams, $filter, ContactsService, permissions, mdSelectHelper, api, downloadLink, google_api_url) {\r\n\r\n var vm = this;\r\n\r\n /*NgMap.getMap({id: 'aljex_shipping_map'}).then(function(map) {\r\n\r\n\r\n });*/\r\n\r\n //https://developers.google.com/maps/documentation/javascript/styling\r\n\r\n vm.mapStyle = [\r\n\r\n { \"featureType\":\"all\", \"elementType\":\"all\", \"stylers\":[ { \"invert_lightness\":true },{ \"saturation\":10 }, { \"lightness\":30 }, { \"gamma\":0.5 }, { \"hue\":\"#435158\"}]},\r\n { \"featureType\":\"administrative\", \"elementType\":\"all\", \"stylers\":[ { \"color\":\"#89c0eb\" }, { \"visibility\":\"on\" }]},\r\n { \"featureType\":\"administrative\", \"elementType\":\"geometry.stroke\", \"stylers\":[ { \"gamma\":\"0.97\" } ] },\r\n { \"featureType\":\"administrative\", \"elementType\":\"labels.text.fill\", \"stylers\":[ { \"lightness\":\"16\" }, { \"saturation\":\"-100\" } ] },\r\n { \"featureType\":\"administrative\", \"elementType\":\"labels.text.stroke\", \"stylers\":[ { \"gamma\":\"0.00\" } ] },\r\n { \"featureType\":\"administrative.locality\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"on\" } ] },\r\n { \"featureType\":\"administrative.land_parcel\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"off\" } ] },\r\n { \"featureType\":\"landscape\", \"elementType\":\"all\", \"stylers\":[ { \"color\":\"#404e5a\" }, { \"visibility\":\"on\" } ] },\r\n { \"featureType\":\"landscape.man_made\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"off\" } ] },\r\n { \"featureType\":\"poi\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"off\" } ] },\r\n { \"featureType\":\"road\", \"elementType\":\"geometry.fill\", \"stylers\":[ { \"lightness\":\"-100\" } ] },\r\n { \"featureType\":\"road\", \"elementType\":\"geometry.stroke\", \"stylers\":[ { \"lightness\":\"-4\" }, { \"gamma\":\"1.21\" } ] },\r\n { \"featureType\":\"water\", \"elementType\":\"geometry.fill\", \"stylers\":[ { \"color\":\"#080e27\" } ] }\r\n\r\n ];\r\n\r\n vm.way1 = [{ location: { lat: 12.5644, lng: 76.7337 }, stopover: true }, { location: { lat: 12.4929, lng: 76.6643 }, stopover: true }];\r\n vm.way2 = [{ location: { lat: 34.5199973, lng: -115.5127662 }, stopover: true,\"originStatus\":false,\"destinationStatus\":false },{ location: { lat: 42.8080616, lng: -89.1276138 }, stopover: true,originStatus:false,destinationStatus:false }];\r\n\r\n /* Variables */\r\n\r\n vm.data = {};\r\n vm.downloadlink = downloadLink.url;\r\n vm.referenceNumberObject = {};\r\n vm.bookmarkType = 'normal';\r\n vm.doneBookmark = doneBookmark;\r\n vm.isReferenceNumbers = false;\r\n vm.containerHistory = {};\r\n vm.data.potential_exceptions = {};\r\n vm.ref_num = $stateParams.ref_num;\r\n vm.isBookmarked = false;\r\n vm.isBookmarkedDiscussion = false;\r\n vm.isBookmarkedNotification = false;\r\n vm.isAttachmentsNotification = false;\r\n vm.isBookmarking = false;\r\n vm.isBookmarkingDiscussion = false;\r\n vm.bookmarks = {};\r\n vm.bookmarksCount = 0;\r\n vm.bookmarksCount1 = 0;\r\n vm.bookmarkButtonText = '';\r\n vm.bookmarkButtonTextDiscussion = '';\r\n vm.googleMapsUrl = google_api_url;\r\n vm.barPercentage = 0;\r\n vm.daysRemaining = 0;\r\n vm.exceptionList = true;\r\n vm.isLoading = false;\r\n vm.show_class_access = (localStorage.getItem(\"show_shipment_class\") == 'true')? true : false;\r\n $log.debug($stateParams);\r\n vm.last = {\r\n bottom: false,\r\n top: true,\r\n left: false,\r\n right: true\r\n };\r\n vm.toastPosition = angular.extend({}, vm.last);\r\n vm.user = UserService.getUserData();\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n // TODO - Rig these up to store permanently to userservice\r\n vm.expandedInvoices = UserService.invoicesIsExpanded();\r\n vm.expandedShippingDetails = UserService.shippingDetailsIsExpanded();\r\n vm.expandedRefNumbers = UserService.refNumbersIsExpanded();\r\n\r\n if(vm.user.permissions.csl){\r\n vm.hasFinancialPermissions = (getPermissionsValue(vm.user.permissions, 'csl').hasOwnProperty('Shipment'))? vm.user.permissions.csl.Shipment.includes('financial') :false;\r\n }else{\r\n vm.hasFinancialPermissions = false;\r\n }\r\n //vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n vm.isFinancialPermission = isFinancialPermission;\r\n vm.getDocumentsCount = getDocumentsCount;\r\n vm.tagged_users = [];\r\n\r\n vm.setInvoicesExpanded = function() {\r\n UserService.setInvoicesExpanded(vm.expandedInvoices);\r\n };\r\n\r\n vm.setShippingDetailsExpanded = function() {\r\n UserService.setShippingDetailsExpanded(vm.expandedShippingDetails);\r\n };\r\n\r\n vm.setRefNumbersExpanded = function() {\r\n UserService.setRefNumbersExpanded(vm.expandedRefNumbers);\r\n };\r\n\r\n vm.is_consignee_user = UserService.check_consignee_user();\r\n\r\n /*\r\n * Redirect the user to track and trace if no id was provided\r\n * TODO - Should we vocally fail?\r\n **/\r\n if (!$stateParams.ref_num){\r\n $location.path('track-trace-csl');\r\n }\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('shipment');\r\n $translatePartialLoader.addPart('shippingdetails');\r\n $translatePartialLoader.addPart('admin'); //used for potential exceptions\r\n\r\n /* Functions */\r\n vm.bookmarkShipment = bookmarkShipment;\r\n vm.bookmarkShipmentDiscussion = bookmarkShipmentDiscussion;\r\n vm.calcInvoiceTotal = calcInvoiceTotal;\r\n vm.closeModal = closeModal;\r\n vm.convertDate = convertDate;\r\n vm.convertTime = convertTime;\r\n vm.getReasonDescription = getReasonDescription;\r\n vm.docDate = docDate;\r\n vm.docName = docName;\r\n vm.getBarPercentage = getBarPercentage;\r\n vm.getBookmarks = getBookmarks('normal');\r\n vm.getConsigneeAddress = getConsigneeAddress;\r\n vm.getShipperAddress = getShipperAddress;\r\n vm.getShipment = getShipment;\r\n vm.getMilestone = getMilestone;\r\n vm.getStatusColors = getStatusColors;\r\n vm.getCheckCalls = getCheckCalls;\r\n vm.getInvoice = getInvoice;\r\n vm.getContainers = getContainers;\r\n vm.getToastPosition = getToastPosition;\r\n vm.sanitizePosition = sanitizePosition;\r\n vm.setBookmarkButton = setBookmarkButton;\r\n vm.setBookmarkButtonDiscussion = setBookmarkButtonDiscussion;\r\n vm.setBookmarkButtonNotification = setBookmarkButtonNotification;\r\n vm.setDaysRemaining = setDaysRemaining;\r\n vm.showBookmarkToastWithUrl = showBookmarkToastWithUrl;\r\n vm.showContainerDetails = showContainerDetails;\r\n vm.showModal = showModal;\r\n vm.showExceptionsModal = showExceptionsModal;\r\n vm.showInvoice = showInvoice;\r\n vm.jumpToDashboard = jumpToDashboard;\r\n vm.isEmpty = isEmpty;\r\n vm.progressStatusText = \"\";\r\n vm.gotoMilestome = gotoMilestome;\r\n vm.goToReference = goToReference;\r\n\r\n vm.showWayPointDiv = false;\r\n vm.showListFilter = false;\r\n vm.showListViewChange = showListViewChange;\r\n vm.showListFilterChange = showListFilterChange;\r\n vm.getDetailsHighlight = getDetailsHighlight;\r\n vm.previousMarker;\r\n vm.downloadDocument = downloadDocument;\r\n\r\n vm.check_calls_filter = check_calls_filter;\r\n vm.filter_requested_data = new Object();\r\n\r\n $scope.checkCallsCount = 0;\r\n $scope.verticalLineHeight = 0;\r\n $scope.reCalVerticalGreenLine = false;\r\n vm.verticalGreenLine = verticalGreenLine;\r\n $scope.highlight_check_call_pt = 'dummy';\r\n vm.highlight_check_call_pt_jquery = highlight_check_call_pt_jquery;\r\n\r\n /* Using Angular Material Table Data */\r\n vm.selected = [];\r\n ShippingDetailsCslService.resetArc();\r\n ShippingDetailsCslService.resetPins();\r\n\r\n vm.getShipment($stateParams.ref_num);\r\n vm.getInvoice($stateParams.ref_num);\r\n vm.getMilestone($stateParams.ref_num);\r\n vm.getStatusColors();\r\n\r\n vm.invoiceDetails = {};\r\n vm.invoiceLineCharges = {};\r\n vm.shipment_milestones = {};\r\n\r\n vm.expandInvoice = false;\r\n\r\n //discussion\r\n //vm.checkTagWord = checkTagWord;\r\n vm.userListOpen = false;\r\n vm.searchDiscussionNew = false;\r\n vm.searchDiscussionOld = true;\r\n vm.findText = \"\";\r\n vm.findData = findData;\r\n vm.cancelFindData = cancelFindData;\r\n vm.sendNotification = sendNotification;\r\n vm.chat_text_submit = chat_text_submit;\r\n vm.discussion_chat = new Object();\r\n vm.chatSoket = chatSoket;\r\n vm.getSuffixDate = getSuffixDate;\r\n vm.showReplyTextBox = showReplyTextBox;\r\n vm.discussion_comment_text = '';\r\n vm.removeFile = removeFile;\r\n vm.attachments = [];\r\n vm.clearChatForm = clearChatForm;\r\n vm.user_id = localStorage.getItem(\"user_id\");\r\n vm.findAttachmentComments = findAttachmentComments;\r\n vm.company_contacts = [];\r\n $scope.files = [];\r\n vm.unseen_discussion_count = \"\";\r\n\r\n vm.reply_comment_display = reply_comment_display;\r\n vm.markRead = markRead;\r\n vm.markReadCheck = true;\r\n vm.file_size_array = new Object();\r\n vm.discussion_file_format = ['jpg', 'jpeg', 'gif', 'png', 'pdf', 'doc', 'docx', 'csv', 'xlsx', 'txt', 'xls'];\r\n vm.discussion_file_format1 = ['jpg', 'jpeg', 'gif', 'png', 'pdf', 'doc', 'docx', 'csv', 'xlsx', 'txt', 'xls',\r\n 'vnd.openxmlformats-officedocument.spreadsheetml.sheet','vnd.ms-excel','plain','msword',\r\n 'vnd.openxmlformats-officedocument.wordprocessingml.document'];\r\n vm.chatContactsAutocompleteCsl = chatContactsAutocompleteCsl;\r\n vm.submitBtn = true;\r\n vm.submitBtnReply = true;\r\n vm.discussion_text = \"\";\r\n\r\n chatSoket();\r\n getComments();\r\n\r\n\r\n ContactsService.setSubjectStatuses({shipmentDetails:{potentialException: false, currentException: false, shipmentDetails: true}});\r\n\r\n var currentShipment = false;\r\n\r\n if(vm.user.customer_types.length > 0){\r\n if(vm.user.customer_types.includes('csl')){\r\n vm.discussion_visibility = vm.user.customer_type_setup.csl.discussion_enabled;\r\n }else{\r\n vm.discussion_visibility = false;\r\n }\r\n }\r\n\r\n //Google Map Icons\r\n\r\n var icons = {\r\n checkpoints: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-unselected.png',\r\n status: 'checkpoints'\r\n },\r\n lastCheckPt: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-enroute.png',\r\n status: 'lastCheckPt'\r\n },\r\n origin: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-origin.png',\r\n status: 'origin'\r\n },\r\n destination: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-destination.png',\r\n status: 'destination'\r\n }\r\n };\r\n\r\n var mouseOverIcons = {\r\n checkpoints: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-selected.png',\r\n status: 'checkpoints'\r\n },\r\n lastCheckPt: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-enroute.png',\r\n status: 'lastCheckPt'\r\n },\r\n origin: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-origin.png',\r\n status: 'origin'\r\n },\r\n destination: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-destination.png',\r\n status: 'destination'\r\n }\r\n };\r\n\r\n var selectedMarkerIcons = {\r\n checkpoints: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-selected-showlist.png',\r\n status: 'checkpoints'\r\n },\r\n lastCheckPt: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-selected-showlist.png',\r\n status: 'lastCheckPt'\r\n },\r\n origin: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-origin.png',\r\n status: 'origin'\r\n },\r\n destination: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-destination.png',\r\n status: 'destination'\r\n }\r\n };\r\n\r\n\r\n $scope.fileNameChanged = function(messageData) {\r\n\r\n var id = messageData.attributes['msg_id'].value;\r\n\r\n var name = document.getElementById('fileOne');\r\n $scope.message_id = 'none';\r\n\r\n if(id){\r\n name = document.getElementById('file'+id);\r\n $scope.message_id = parseInt(id);\r\n if(name.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n }\r\n }else{\r\n if(name.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n }\r\n }\r\n var file_upload_error = false;\r\n\r\n if($scope.files){\r\n\r\n //jpg, jpeg, gif, png, pdf, docs, dox, csv, xlsx, txt, xls\r\n\r\n for(var i=0; i<name.files.length; i++){\r\n\r\n if((name.files[i].size/1024/1024) > 5 || (name.files[i].type == '') ||\r\n (vm.discussion_file_format1.indexOf((name.files[i].type.split('/'))[1]) == -1) ){\r\n\r\n file_upload_error = true\r\n\r\n } else{\r\n\r\n $scope.files.push(name.files[i]);\r\n\r\n var bytes = name.files[i].size;\r\n\r\n if(bytes < 1024) {\r\n bytes + \" Bytes\";\r\n }\r\n\r\n else if(bytes < 1048576) {\r\n bytes = (bytes / 1024).toFixed(0) + \" KB\";\r\n }\r\n\r\n else if(bytes < 1073741824) {\r\n bytes = (bytes / 1048576).toFixed(0) + \" MB\";\r\n }\r\n\r\n else {\r\n bytes = (bytes / 1073741824).toFixed(0) + \" GB\";\r\n }\r\n\r\n vm.file_size_array[name.files[i].name] = {'name':name.files[i].name,'size':bytes}\r\n\r\n }\r\n\r\n }\r\n\r\n if(file_upload_error){\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/discussion/file_size_error.html');\r\n }\r\n\r\n }else{\r\n $scope.files = name.files;\r\n }\r\n\r\n $scope.files = removeDuplicateFiles($scope.files);\r\n\r\n }\r\n\r\n function removeFile(filename,index,id){\r\n angular.forEach($scope.files, function(v,k){\r\n if(v.type == 'savedFile' && v.name===filename){\r\n vm.attachments.push(v.name);\r\n }\r\n if(v.name===filename){\r\n $scope.files.splice(k,1);\r\n }\r\n });\r\n // Removing element\r\n var myEl = angular.element( document.querySelector( '.savedFile'+index ) );\r\n myEl.remove();\r\n\r\n if(id){\r\n if($scope.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n }\r\n }else{\r\n if($scope.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n }\r\n }\r\n }\r\n\r\n function clearChatForm(){\r\n $scope.files = [];\r\n vm.submitBtn = true;\r\n }\r\n\r\n function removeDuplicateFiles(origArr) {\r\n var newArr = [],\r\n origLen = origArr.length,\r\n found, x, y;\r\n for (x = 0; x < origLen; x++) {\r\n found = undefined;\r\n for (y = 0; y < newArr.length; y++) {\r\n if (origArr[x].name === newArr[y].name) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n newArr.push(origArr[x]);\r\n }\r\n }\r\n return newArr;\r\n }\r\n\r\n function findData(text){\r\n try{\r\n vm.searchDiscussionNew = true;\r\n vm.searchDiscussionOld = false;\r\n }catch(e){ }\r\n }\r\n\r\n function cancelFindData(){\r\n try{\r\n vm.searchDiscussionNew = false;\r\n vm.searchDiscussionOld = true;\r\n vm.findText = \"\";\r\n }catch(e){ }\r\n }\r\n\r\n function sendNotification(){\r\n // /shipment_id: nil, user_id: nil, active: true\r\n var userId = vm.user.id;\r\n\r\n if (!vm.isBookmarkedNotification){\r\n\r\n /* Notify the shipment */\r\n ShippingDetailsCslService.bookmarkNotification(userId).then(function(shipment){\r\n vm.setBookmarkButtonNotification(true);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-notification-toast.html');\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-toast.error.html');\r\n });\r\n\r\n /* Remove the bookmark */\r\n } else {\r\n ShippingDetailsCslService.unBookmarkNotification(userId).then(function(shipment){\r\n vm.setBookmarkButtonNotification(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/remove-bookmark-notification-toast.html');\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n\r\n }\r\n\r\n function findAttachmentComments(val){\r\n\r\n vm.isAttachmentsNotification = !vm.isAttachmentsNotification;\r\n\r\n if(vm.isAttachmentsNotification){\r\n\r\n var deleted_array2 = [];\r\n\r\n var prevMainIndex = null;\r\n\r\n for (var val1 in vm.discussion_chat) {\r\n\r\n if(vm.discussion_chat[val1].length > 0){\r\n\r\n var deleted_array1 = [];\r\n\r\n for(var j=0; j<vm.discussion_chat[val1].length; j++){\r\n\r\n var deleted_array = [];\r\n\r\n // looping replies array\r\n if(vm.discussion_chat[val1][j].replies.length > 0){\r\n\r\n var prevReplyIndex = null;\r\n\r\n for(var k=0; k<vm.discussion_chat[val1][j].replies.length; k++){\r\n\r\n if(vm.discussion_chat[val1][j].replies[k]){\r\n\r\n if(vm.discussion_chat[val1][j].replies[k].attachments.length == 0){\r\n // to delete replies array;\r\n //prevReplyIndex = k;\r\n vm.discussion_chat[val1][j].replies.splice(k,1);\r\n k--;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // to delete replies parent array;\r\n if(vm.discussion_chat[val1][j].attachments.length == 0 && vm.discussion_chat[val1][j].replies.length == 0 ){\r\n\r\n vm.discussion_chat[val1].splice(j,1);\r\n //prevReplyParentIndex = j;\r\n j--;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n // to delete main array;\r\n if(vm.discussion_chat[val1].length == 0 ){\r\n //deleted_array2.push(val1);\r\n delete vm.discussion_chat[val1];\r\n }\r\n\r\n }\r\n\r\n }else{\r\n\r\n //getComments();\r\n vm.discussion_chat = angular.copy(vm.original_discussion_chat);\r\n\r\n }\r\n\r\n }\r\n\r\n $scope.highlight = function(haystack) {\r\n if(!vm.findText) {\r\n return $sce.trustAsHtml(haystack);\r\n }\r\n return $sce.trustAsHtml(haystack.replace(new RegExp(vm.findText, \"gi\"), function(match) {\r\n return '<span class=\"highlightedText\">' + match + '</span>';\r\n }));\r\n };\r\n\r\n function getPermissionsValue(responsePermissionsData, type){\r\n return responsePermissionsData[type] || {}\r\n }\r\n\r\n function downloadDocument(id,pro,filename) {\r\n ShippingDetailsCslService.downloadDocument(id,pro,filename);\r\n }\r\n\r\n\r\n function verticalGreenLine(){\r\n $scope.reCalVerticalGreenLine = !$scope.reCalVerticalGreenLine;\r\n }\r\n\r\n function getStatusColors(){\r\n vm.status_colors = ShippingDetailsCslService.getStatusColors();\r\n }\r\n\r\n function isCurrentShipment(obj) {\r\n\r\n if(obj.pro == $stateParams.ref_num) {\r\n currentShipment = true;\r\n }\r\n if (currentShipment) {\r\n vm.isBookmarked = true;\r\n } else {\r\n vm.isBookmarked = false;\r\n }\r\n }\r\n\r\n function isFinancialPermission(documenttype){\r\n var row_length = documenttype.split(\" \").length\r\n return vm.hasFinancialPermissions && documenttype.split(\" \")[row_length - 1] == 'Invoice' || documenttype.split(\" \")[row_length - 1] != 'Invoice'\r\n }\r\n\r\n function getDocumentsCount(data){\r\n var count = 0;\r\n if (data != undefined && data != 'undefined') {\r\n for(var i = 1; i <= data.length ; i++){\r\n if (!vm.hasFinancialPermissions && data[i - 1].documenttype.split(\" \")[data[i - 1].documenttype.split(\" \").length - 1] == 'Invoice'){\r\n count=count+1;\r\n }\r\n }\r\n return data.length - count\r\n }\r\n else {\r\n return count\r\n }\r\n }\r\n\r\n // After the promise is completed, return the bookmarks from the service and determine how many there are\r\n function getBookmarks(type) {\r\n\r\n ShippingDetailsCslService.getBookmarks(type).then(function(successResponse){\r\n vm.bookmarksCount = 0;\r\n vm.bookmarks = successResponse.load_bookmarks;\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount += 1;\r\n });\r\n\r\n });\r\n }\r\n\r\n function showBookmarkToastWithUrl(url) {\r\n var pinTo = vm.getToastPosition();\r\n var toast = $mdToast.show({\r\n position: pinTo,\r\n hideDelay: 3000,\r\n templateUrl: url,\r\n parent: angular.element(document.getElementById('toast-parent')),\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n $mdToast.show(toast);\r\n }\r\n\r\n function setProgressStatus() {\r\n var now = new Date();\r\n if (moment(vm.data.departuredate).isAfter(now)) {\r\n vm.progressStatus = \"Upcoming\";\r\n } else if (vm.data.isdelivered == \"true\") {\r\n vm.progressStatus = \"Delivered\"\r\n } else if (vm.daysRemaining > 0) {\r\n vm.progressStatus = vm.daysRemaining + \" Days Remaining\";\r\n } else if (moment(vm.data.departuredate).isBefore(now)) {\r\n vm.progressStatus = \"In Progress\";\r\n } else if (moment(vm.data.duedate).isBefore(now)) {\r\n vm.progressStatus = \"Overdue\";\r\n } else {\r\n vm.progressStatus = \"\";\r\n }\r\n }\r\n\r\n // function showRemoveBookmarkToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/remove-bookmark-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n // function showBookmarkLimitToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/bookmark-limit-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n // function showBookmarkedAlreadyToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/bookmark-already-removed-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n var data=angular.element($window);\r\n data.bind('resize',function(){\r\n\r\n verticalGreenLine();\r\n\r\n });\r\n\r\n function bookmarkShipment(type){\r\n\r\n // Update our current list of bookmarks before attempting to add a new one\r\n // So we can verify the bookmarks prior to trying to add / remove this one\r\n vm.bookmarksCount = 0;\r\n currentShipment = false;\r\n var startBookmarked = vm.isBookmarked;\r\n ShippingDetailsCslService.getBookmarks(type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse.load_bookmarks;\r\n vm.bookmarks.filter(isCurrentShipment);\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount += 1;\r\n });\r\n\r\n if (!vm.isBookmarked){\r\n // The bookmark has already been removed elsewhere, don't try it again\r\n if (startBookmarked) {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-already-removed-toast.html');\r\n vm.setBookmarkButton(false);\r\n } else if(vm.bookmarksCount < 5) {\r\n /* Bookmark the shipment */\r\n vm.bookmarkButtonText = \"SHIPPINGDETAILS.BOOKMARKING\";\r\n vm.isBookmarking = true; // Disable the button\r\n ShippingDetailsCslService.bookmarkShipment(type).then(function(shipment){\r\n vm.setBookmarkButton(true);\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-toast.html');\r\n }).catch(function(err) {\r\n vm.isBookmarking = false;\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-toast.error.html');\r\n });\r\n /* We've hit our limit, we need to remove bookmarks */\r\n } else {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-limit-toast.html');\r\n ShippingDetailsCslService.getBookmarks(type);\r\n }\r\n /* Remove the bookmark */\r\n } else {\r\n vm.isBookmarking = true; // Disable the button\r\n ShippingDetailsCslService.unBookmarkShipment(type).then(function(shipment){\r\n if (shipment.bookmark_id < 1){\r\n vm.setBookmarkButton(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/remove-bookmark-toast.html');\r\n }\r\n vm.isBookmarking = false;\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n function bookmarkShipmentDiscussion(type){\r\n // Update our current list of bookmarks before attempting to add a new one\r\n // So we can verify the bookmarks prior to trying to add / remove this one\r\n\r\n vm.bookmarksCount1 = 0;\r\n currentShipment = false;\r\n var startBookmarked = vm.isBookmarkedDiscussion;\r\n ShippingDetailsCslService.getBookmarks(type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse.discussion_bookmarks;\r\n vm.bookmarks.filter(isCurrentShipment);\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount1 += 1;\r\n });\r\n if (!vm.isBookmarkedDiscussion){\r\n // The bookmark has already been removed elsewhere, don't try it again\r\n if (startBookmarked) {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-already-removed-toast.html');\r\n vm.setBookmarkButtonDiscussion(false);\r\n } else if(vm.bookmarksCount1 || vm.bookmarksCount1 == 0) {\r\n /* Bookmark the shipment */\r\n //vm.bookmarkButtonText = \"SHIPPINGDETAILS.BOOKMARKING\";\r\n vm.isBookmarkingDiscussion = true; // Disable the button\r\n ShippingDetailsCslService.bookmarkShipment(type).then(function(shipment){\r\n vm.setBookmarkButtonDiscussion(true);\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-discussion-toast.html');\r\n }).catch(function(err) {\r\n vm.isBookmarkingDiscussion = false;\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-discussion-toast.error.html');\r\n });\r\n /* We've hit our limit, we need to remove bookmarks */\r\n } else {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-limit-toast.html');\r\n ShippingDetailsCslService.getBookmarks(type);\r\n }\r\n /* Remove the bookmark */\r\n } else {\r\n vm.isBookmarkingDiscussion = true; // Disable the button\r\n ShippingDetailsCslService.unBookmarkShipmentDiscussion(type).then(function(shipment){\r\n if (shipment.discussion_bookmark_id < 1){\r\n vm.setBookmarkButtonDiscussion(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/remove-bookmark-discussion-toast.html');\r\n }\r\n vm.isBookmarkingDiscussion = false;\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-csl/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n function getConsigneeAddress(data){\r\n var address_labels = [\"consigneeaddress1\", \"consigneeaddress2\", \"consigneeaddress3\", \"consigneeaddress4\", \"consigneecity\", \"consigneecountry\"];\r\n return address_labels.map(function(d){return data[d];})\r\n .filter(function(d){return d && d !== null && d !== \"\";});\r\n }\r\n\r\n function getShipperAddress(data){\r\n var address_labels = [\"shipperaddress1\", \"shipperaddress2\", \"shipperaddress3\", \"shipperaddress4\", \"shippercity\", \"shippercountry\"];\r\n return address_labels.map(function(d){return data[d];})\r\n .filter(function(d){return d && d !== null && d !== \"\";});\r\n }\r\n\r\n function calcInvoiceTotal(){\r\n var inv = vm.data ? (vm.data.shipment_invoices ? vm.data.shipment_invoices : undefined) : undefined;\r\n var sum = 0;\r\n if (inv){\r\n inv.map(function(d){sum += +d.totalinvoiceamount;});\r\n return sum;\r\n } else {\r\n return sum;\r\n }\r\n }\r\n\r\n function setBookmarkButton(isMarked){\r\n if (isMarked){\r\n vm.isBookmarked = true;\r\n vm.bookmarkButtonText = 'SHIPPINGDETAILS.REMOVE_BOOKMARK';\r\n } else {\r\n vm.isBookmarked = false;\r\n vm.bookmarkButtonText ='SHIPPINGDETAILS.BOOKMARK_SHIPMENT';\r\n }\r\n }\r\n\r\n function setBookmarkButtonDiscussion(isMarked){\r\n if (isMarked){\r\n vm.isBookmarkedDiscussion = true;\r\n vm.bookmarkButtonTextDiscussion = 'SHIPPINGDETAILS.REMOVE_BOOKMARK_DISCUSSION';\r\n } else {\r\n vm.isBookmarkedDiscussion = false;\r\n vm.bookmarkButtonTextDiscussion ='SHIPPINGDETAILS.BOOKMARK_SHIPMENT_DISCUSSION';\r\n }\r\n }\r\n\r\n function setBookmarkButtonNotification(isMarked){\r\n if (isMarked){\r\n vm.isBookmarkedNotification = true;\r\n } else {\r\n vm.isBookmarkedNotification = false;\r\n }\r\n }\r\n\r\n\r\n function getInvoice(ref_num){\r\n vm.isLoading = true;\r\n\r\n ShippingDetailsCslService.getInvoice(ref_num).then(function(invoiceData){\r\n\r\n if ($location.path().indexOf('/shipping-details-csl') === -1) return;\r\n\r\n vm.invoiceDetails = invoiceData;\r\n\r\n getLineCharges(ref_num);\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n //vm.failedToRetrieveData = err.data.error;\r\n //alert('34534');\r\n });\r\n\r\n }\r\n\r\n function getLineCharges(ref_num){\r\n ShippingDetailsCslService.getLineCharges(ref_num).then(function(lineChargesData){\r\n\r\n vm.invoiceLineCharges = lineChargesData.line_charges;\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n //vm.failedToRetrieveData = err.data.error;\r\n //alert('34534');\r\n });\r\n }\r\n\r\n function getMilestone(ref_num){\r\n vm.isLoading = true;\r\n\r\n ShippingDetailsCslService.getMilestone(ref_num).then(function(milestoneData){\r\n\r\n vm.shipment_milestones = milestoneData.milestones;\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n //vm.failedToRetrieveData = err.data.error;\r\n //alert('34534');\r\n });\r\n }\r\n\r\n function getShipment(ref_num){\r\n\r\n vm.isLoading = true;\r\n ShippingDetailsCslService.getLoad(ref_num).then(function(d){\r\n\r\n if ($location.path().indexOf('/shipping-details-csl') === -1) return;\r\n\r\n //var updatedData = {},\r\n // arrival = d.destinationcountrycode + d.destinationcitycode,\r\n // departure = d.origincountrycode + d.origincitycode;\r\n\r\n //if (d.potential_exceptions) {\r\n // // Loop through potential exceptions and set the city\r\n // // and the arrival/departure\r\n // angular.forEach(d.potential_exceptions, function(exc) {\r\n // //// console.log(exc);\r\n // if (exc.city_codes.indexOf(arrival) !== -1) {\r\n // exc['city'] = d.destination;\r\n // exc['port_usage'] = 'Arrival'\r\n // } else if (exc.city_codes.indexOf(departure) !== -1) {\r\n // exc['city'] = d.origin;\r\n // exc['port_usage'] = 'Departure'\r\n // }\r\n // })\r\n // updatedData = d;\r\n //} else {\r\n // updatedData = d;\r\n //}\r\n\r\n /* Parse shipping dates by their concatenated nonformat */\r\n function parseDate(datetime){ return moment(datetime, 'YYYYMMDDHHmm').valueOf();}\r\n\r\n /* Retrieve Milestones sortable attribute by actual date + time, then by estimated date + time, and finally by sno */\r\n //function sortMilestonesBy(milestone){\r\n // return milestone.actualdate ?\r\n // parseDate(milestone.actualdate + milestone.actualtime) :\r\n // milestone.estimateddate ?\r\n // parseDate(milestone.estimateddate + milestone.estimatedtime) :\r\n // milestone.sno;\r\n //}\r\n\r\n //updatedData.shipment_milestones.sort(function(a, b) {\r\n // var milestone_a = sortMilestonesBy(a), milestone_b = sortMilestonesBy(b);\r\n // if (milestone_a == milestone_b){\r\n // return a.sno < b.sno ? -1 : (a.sno > b.sno ? 1 : 0);\r\n // } else {\r\n // return milestone_a < milestone_b ? -1 : (milestone_a > milestone_b ? 1 : 0);\r\n // }\r\n //});\r\n\r\n vm.data = d;\r\n\r\n var timezone_name = moment.tz.guess(vm.data.last_status_details['actual_time']);\r\n var timezone_symbol = moment.tz(vm.data.last_status_details['actual_time'], timezone_name).format('z');\r\n\r\n vm.data.last_status_details['timezone'] = timezone_symbol;\r\n\r\n if(!vm.data.isdelivered){\r\n var timezone_name = moment.tz.guess(vm.data.next_status_details['estimated_time']);\r\n var timezone_symbol = moment.tz(vm.data.next_status_details['estimated_time'], timezone_name).format('z');\r\n\r\n vm.data.next_status_details['timezone'] = timezone_symbol;\r\n }\r\n\r\n if(vm.data.estimateddelivery){\r\n var timezone_name = moment.tz.guess(vm.data.estimateddelivery);\r\n var timezone_symbol = moment.tz(vm.data.estimateddelivery, timezone_name).format('z');\r\n\r\n vm.data['estimateddeliverytimezone'] = timezone_symbol;\r\n }\r\n\r\n if(vm.data.deliverydate){\r\n var timezone_name = moment.tz.guess(vm.data.deliverydate);\r\n var timezone_symbol = moment.tz(vm.data.deliverydate, timezone_name).format('z');\r\n\r\n vm.data['deliverydatetimezone'] = timezone_symbol;\r\n }\r\n\r\n //vm.data.shipmentstatus = 'DELIVERED';\r\n //vm.data.origin_geocode.origin_lat=\"\";\r\n //vm.data.origin_geocode.origin_lng = \"\";\r\n\r\n //if(vm.data.origin_geocode){\r\n vm.data.origin_geocode.origin_lat = parseFloat(vm.data.origin_geocode.origin_lat);\r\n vm.data.origin_geocode.origin_lng = parseFloat(vm.data.origin_geocode.origin_lng);\r\n //}\r\n\r\n //vm.data.destination_geocode.dest_lat = \"\";\r\n //vm.data.destination_geocode.dest_lng = \"\";\r\n\r\n //if(vm.data.destination_geocode){\r\n vm.data.destination_geocode.dest_lat = parseFloat(vm.data.destination_geocode.dest_lat);\r\n vm.data.destination_geocode.dest_lng = parseFloat(vm.data.destination_geocode.dest_lng);\r\n //}\r\n\r\n\r\n // calling check calls\r\n var filtersData = new Object;\r\n filtersData['pro'] = $stateParams.ref_num;\r\n\r\n vm.getCheckCalls(filtersData);\r\n\r\n vm.data.pickupdate = $filter('date')(vm.data.pickupdate, \"dd-MMM-yyyy\");\r\n vm.data.duedate = $filter('date')(vm.data.duedate, \"dd-MMM-yyyy\");\r\n vm.data.shipdate = $filter('date')(vm.data.shipdate, \"dd-MMM-yyyy\");\r\n\r\n //vm.data.under_exception = (vm.data.potential_exceptions && vm.data.potential_exceptions.length > 0) || (vm.data.exceptions && vm.data.exceptions.length > 0);\r\n vm.referenceNumberObject = getReferenceNumberObject(vm.data.shipment_references);\r\n vm.isReferenceNumbers = !isEmpty(vm.referenceNumberObject);\r\n vm.isLoading = false;\r\n setDaysRemaining(); //sets the variable for days remaining\r\n setProgressStatus();\r\n //// console.log(d.potential_exceptions[0]);\r\n //vm.data.potential_exceptions = d.potential_exceptions[0];\r\n //call bar animation after we have data\r\n //vm.isBookmarked = (vm.data.load_bookmarks && vm.data.load_bookmarks[0])\r\n\r\n vm.unseen_discussion_count = vm.data.unseen_discussion_count;\r\n if(vm.unseen_discussion_count > 0){\r\n vm.markReadCheck = false;\r\n }\r\n ShippingDetailsCslService.getUserBookmarks({pro: vm.data.pro}).then(function(res){\r\n if (res && res.load_bookmarks && res.load_bookmarks[0])\r\n {\r\n vm.isBookmarked = true\r\n setBookmarkButton(true) ;\r\n }\r\n else\r\n {\r\n vm.isBookmarked = false\r\n setBookmarkButton(false)\r\n }\r\n\r\n if (res && res.discussion_bookmarks && res.discussion_bookmarks[0])\r\n {\r\n vm.isBookmarkedDiscussion = true;\r\n setBookmarkButtonDiscussion(true);\r\n }\r\n else\r\n {\r\n vm.isBookmarkedDiscussion = false;\r\n setBookmarkButtonDiscussion(false);\r\n }\r\n\r\n })\r\n\r\n //setBookmarkButton(vm.data.load_bookmarks && vm.data.load_bookmarks[0]);\r\n //set the bar percentage and give it animation\r\n vm.barPercentage = getBarPercentage();\r\n\r\n vm.chatContactsAutocompleteCsl(vm.data.pro,'');\r\n\r\n //ContactsService.setSubjectStatuses({shipmentDetails:{\r\n // potentialException: vm.data.potential_exceptions && vm.data.potential_exceptions.length > 0,\r\n // currentException: vm.data.exceptions && vm.data.exceptions.length > 0,\r\n // shipmentDetails: true\r\n //}});\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n vm.failedToRetrieveData = err.data.error;\r\n });\r\n }\r\n\r\n function check_calls_filter(value,field_name,time){\r\n\r\n //$timeout( function(){\r\n vm.filter_requested_data['pro'] = $stateParams.ref_num;\r\n\r\n //if(value != undefined){\r\n\r\n if(field_name == 'time'){\r\n\r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n //vm.filter_requested_data['timezone'] = timezone_symbol;\r\n\r\n\r\n if((value == undefined) || (value == '')){\r\n\r\n value = '';\r\n\r\n } else{\r\n\r\n value = moment(value).format('hh:mm a')+' '+timezone_symbol;\r\n\r\n }\r\n }\r\n\r\n vm.filter_requested_data[field_name] = value;\r\n\r\n //if((value.length % 2 === 0) || (value.length > 5)){\r\n getCheckCalls(vm.filter_requested_data);\r\n //}\r\n\r\n\r\n //}\r\n\r\n //}, time );\r\n\r\n }\r\n\r\n function getCheckCalls(filterData){\r\n\r\n var url = '';\r\n\r\n angular.forEach(filterData,function(value,index){\r\n\r\n if(value){\r\n if(url){\r\n url += '&'+index+'='+value;\r\n }else{\r\n url = index+'='+value\r\n }\r\n }\r\n\r\n });\r\n\r\n vm.ngMapway = [];\r\n vm.ngGpsMapway = [];\r\n vm.ngmap = new Array();\r\n $scope.ngMapLocations = new Array();\r\n $scope.checkPtsLocation = new Array();\r\n\r\n ShippingDetailsCslService.getCheckCalls(url).then(function(res){\r\n\r\n vm.check_calls = [];\r\n vm.gps_check_calls = [];\r\n\r\n if(vm.data.status != 'PLANNED' ){\r\n vm.check_calls = res;\r\n }\r\n\r\n $scope.checkCallsCount = 0;\r\n\r\n if(vm.check_calls.length > 0){\r\n\r\n vm.gps_check_calls = vm.check_calls.filter(function (check_calls) {\r\n\r\n $scope.checkCallsCount = $scope.checkCallsCount + 1;\r\n //return check_calls.trackingtype === \"GPS\";\r\n return true;\r\n\r\n });\r\n\r\n }\r\n\r\n vm.check_calls_status = new Array();\r\n\r\n vm.check_calls_status.push(\"In Transit\",\"Arrived Terminal\", \"DROPPED\", \"IN TRANSIT\", \"AT SHIPPER\", \"At Shipper\",\r\n \"MARGIN ALERT\", \"On Time\", \"TRACKING\", \"At Consignee\", \"Margin Alert\", \"EMPTY\", \"AT CONSIGNEE\", \"Delayed\", \"DOT Shutdown\",\r\n \"Out for Delivery\", \"Appt Needed/Chan\" );\r\n\r\n //Pushing Origin\r\n $scope.ngMapLocations = [\r\n {\r\n pos: [parseFloat(vm.data.origin_geocode.origin_lat), parseFloat(vm.data.origin_geocode.origin_lng)],\r\n originStatus:true,\r\n destinationStatus:false,\r\n position:new google.maps.LatLng(parseFloat(vm.data.origin_geocode.origin_lat), parseFloat(vm.data.origin_geocode.origin_lng)),\r\n type:'origin',\r\n state_name:vm.data.origin_state_name,\r\n serial_no:10000\r\n }\r\n ];\r\n\r\n if(vm.gps_check_calls.length){\r\n\r\n angular.forEach(vm.gps_check_calls,function(value,index){\r\n //if(value.trackingtype == 'GPS') {\r\n if(true) {\r\n\r\n vm.ngMapway.push({location:{lat:parseFloat(value.geocodes.lat),lng:parseFloat(value.geocodes.lng)}, stopover:true});\r\n\r\n var imageType='';\r\n\r\n if((vm.gps_check_calls.length - 1) == index){\r\n imageType=(!vm.data.isdelivered)?'lastCheckPt':'checkpoints';\r\n }else{\r\n imageType='checkpoints';\r\n }\r\n\r\n //Pushing checkpoints\r\n /*$scope.ngMapLocations.push({\r\n pos:[parseFloat(value.geocodes.lat), parseFloat(value.geocodes.lng)],\r\n originStatus:false,\r\n destinationStatus:false,\r\n\r\n position:new google.maps.LatLng(parseFloat(value.geocodes.lat), parseFloat(value.geocodes.lng)),\r\n type: imageType,\r\n serial_no:index,\r\n state_name:value.state_name\r\n });*/\r\n\r\n //Pushing only checkpoints to $scope.checkPtsLocation\r\n $scope.checkPtsLocation.push({\r\n pos:[(value.geocodes.lat), (value.geocodes.lng)],\r\n originStatus:false,\r\n destinationStatus:false,\r\n\r\n position:new google.maps.LatLng(parseFloat(value.geocodes.lat), parseFloat(value.geocodes.lng)),\r\n type: imageType,\r\n serial_no:index,\r\n state_name:value.state_name\r\n });\r\n }\r\n })\r\n\r\n }\r\n\r\n vm.chunk_array = ShippingDetailsCslService.chunkArray(vm.ngMapway, 23);\r\n\r\n //Pushing destination\r\n $scope.ngMapLocations.push({\r\n pos:[parseFloat(vm.data.destination_geocode.dest_lat), parseFloat(vm.data.destination_geocode.dest_lng)],\r\n originStatus:false,\r\n destinationStatus:true,\r\n position:new google.maps.LatLng(parseFloat(vm.data.destination_geocode.dest_lat), parseFloat(vm.data.destination_geocode.dest_lng)),\r\n type:'destination',\r\n state_name:vm.data.destination_state_name,\r\n serial_no:10001\r\n });\r\n\r\n /* NG MAP */\r\n googleMap();\r\n\r\n }).catch(function(err) {\r\n\r\n });\r\n\r\n }\r\n\r\n function googleMap(){\r\n /* NG MAP */\r\n NgMap.getMap().then(function (map) {\r\n\r\n vm.ngmap = map;\r\n\r\n $timeout(function () {\r\n $scope.initMarkerClusterer();\r\n }, 3000);\r\n\r\n //$scope.initMarkerClusterer();\r\n\r\n $timeout( function(){\r\n vm.verticalGreenLine();\r\n vm.ngmap = map;\r\n }, 50 );\r\n\r\n });\r\n\r\n }\r\n\r\n //Google Map Init Code\r\n $scope.initMarkerClusterer = function () {\r\n\r\n vm.markers = [];\r\n\r\n // to Remove old marker icons\r\n if(vm.removableMarkers){\r\n\r\n angular.forEach(vm.removableMarkers, function(value, key) {\r\n\r\n var latlng = new google.maps.LatLng('', '');\r\n value.setPosition(latlng);\r\n value.setIcon('');\r\n value.title= '';\r\n value.status= '';\r\n value.originStatus='';\r\n value.destinationStatus='';\r\n value.serial_no='';\r\n value.state_name='';\r\n value.isHighlight=false;\r\n value.map = vm.ngmap;\r\n });\r\n\r\n }\r\n\r\n var markerCluster = new Array();\r\n\r\n // vm.markers contain only origin and destination\r\n vm.markers = $scope.ngMapLocations.map(function (city) {\r\n return $scope.createMarkerForCity(city);\r\n });\r\n\r\n\r\n // vm.clusterMarkers contains only checkpoints\r\n vm.clusterMarkers = $scope.checkPtsLocation.map(function (city) {\r\n return $scope.createMarkerForCity(city);\r\n });\r\n\r\n // to Remove old marker icons\r\n vm.removableMarkers = vm.clusterMarkers;\r\n\r\n var clusterMarkerIcons = [{\r\n url: '/assets/images/icons/shipment/showListView/icon-oval-selected.png',\r\n width: 14,\r\n height: 14\r\n }];\r\n\r\n var clusterOptions = {\r\n zoomOnClick:false,\r\n //imagePath: 'https://cdn.rawgit.com/googlemaps/v3-utility-library/master/markerclustererplus/images/m',\r\n styles: clusterMarkerIcons,\r\n gridSize:30\r\n };\r\n\r\n vm.infowindow = new google.maps.InfoWindow();\r\n\r\n markerCluster = new MarkerClusterer(vm.ngmap, vm.clusterMarkers, clusterOptions);\r\n\r\n var clusteredMarkers = vm.clusterMarkers;\r\n\r\n // To Hide the display number of counts in clusetr image.\r\n markerCluster.setCalculator(function(clusteredMarkers, numStyles){\r\n\r\n var index = 0,\r\n count = clusteredMarkers.length,\r\n total = count;\r\n\r\n while (total !== 0) {\r\n total = parseInt(total / 5, 10);\r\n index++;\r\n }\r\n\r\n index = Math.min(index, numStyles);\r\n return {\r\n text: \"\",\r\n index: index,\r\n title: count\r\n };\r\n });\r\n\r\n // markerCluster Image OnClick Method\r\n google.maps.event.addListener(markerCluster, 'clusterclick', function(cluster) {\r\n\r\n //event.cancelBubble = true;\r\n event.stopPropagation();\r\n\r\n //if(vm.showWayPointDiv){\r\n\r\n // Removing Marker highligth icon\r\n if(vm.previousMarker){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n var content = '';\r\n\r\n // Convert lat/long from cluster object to a usable MVCObject\r\n var info = new google.maps.MVCObject;\r\n info.set('position', cluster.center_);\r\n\r\n //----\r\n //Get markers\r\n var markers = cluster.getMarkers();\r\n\r\n var state_names = '';\r\n\r\n angular.forEach(markers, function(value, key) {\r\n //state_names += (value.state_name != '')? (state_names == '')?value.state_name:(' , '+value.state_name):'';\r\n state_names = (value.state_name != '')?value.state_name:'';\r\n });\r\n\r\n var count = (markers.length);\r\n\r\n vm.cursorPointer = 'cursor:pointer';\r\n //vm.cursorPointer = 'cursor:normal';\r\n /*if(vm.showWayPointDiv){\r\n vm.cursorPointer = 'cursor:pointer';\r\n }*/\r\n\r\n var content = \"<div class='gmailToolTip' style=\"+vm.cursorPointer+\";border-radius:5px;display:block' ng-click='scrollCheckptDetails(\"+markers[0].status+\",\"+markers[0].latlng+\")' >\"+\r\n \"<input type='hidden' class='status' value='\"+markers[0].status+\"' />\"+\r\n \"<input type='hidden' class='serial_no' value='\"+markers[0].serial_no+\"' />\"+\r\n \"<input type='hidden' class='latlng' value='\"+markers[0].latlng+\"' />\"+\r\n \"<span style='color:rgb(66,66,66);background-color:#DCDCDC;padding: 3px 25px 3px 25px;'> \"+state_names+\" </span>\"+\r\n \"<h2 style='color:rgb(66,66,66);font-size: 18px;font-weight:normal;margin:0px;margin-top: 5px;'>\"+\r\n \"<span style='font-weight:bold'>\"+count.toString()+\"</span> \"+\r\n \"Last Check Calls</h2>\"+\r\n \"<div style='position:absolute;right:0;top:0;height:100%;width: 23px;box-sizing:border-box;padding:5px;'>\"+\r\n \"<i class='material-icons' style='position: absolute;color: #DCDCDC;top: -3px;left: -10px;font-size: 50px;' ></i>\"+\r\n \"<!--<img src='/assets/images/icons/shipment/showListView/icon-arrow-right.png' style='margin-top:4px;' />--?\"+\r\n \"</div></div>\";\r\n\r\n vm.infowindow.close();\r\n vm.infowindow.setContent(content); //set infowindow content to titles\r\n vm.infowindow.open(vm.ngmap, info);\r\n\r\n //}\r\n\r\n });\r\n\r\n //Zoom change method\r\n google.maps.event.addListener(vm.ngmap, 'zoom_changed', function() {\r\n vm.infowindow.close()\r\n });\r\n\r\n // Cluster Image Mouseover Method\r\n google.maps.event.addListener(markerCluster,'mouseover',function(){\r\n //debugger;\r\n });\r\n\r\n google.maps.event.addListener(vm.ngmap, 'click', function(){\r\n vm.infowindow.close();\r\n });\r\n\r\n };\r\n\r\n //Set Different Icons for marker\r\n $scope.createMarkerForCity = function (city,index) {\r\n\r\n var marker = new google.maps.Marker({\r\n position: new google.maps.LatLng(city.pos[0], city.pos[1]),\r\n icon: icons[city.type].icon,\r\n title: '',\r\n status: icons[city.type].status,\r\n latlng:city.pos[0].toString().replace('.','-')+city.pos[1].toString().replace('.','-'),\r\n originStatus:city.originStatus,\r\n destinationStatus:city.destinationStatus,\r\n serial_no:city.serial_no,\r\n state_name:city.state_name,\r\n isHighlight:false,\r\n map:vm.ngmap\r\n });\r\n\r\n google.maps.event.addListener(marker, 'mouseover', function () {\r\n\r\n if(!this.isHighlight){\r\n var icon_new = mouseOverIcons[this.status].icon;\r\n marker.setIcon(icon_new);\r\n }\r\n\r\n });\r\n\r\n google.maps.event.addListener(marker, 'mouseout', function () {\r\n\r\n if(!this.isHighlight){\r\n var icon_new = icons[marker.status].icon;\r\n marker.setIcon(icon_new);\r\n }\r\n\r\n });\r\n\r\n google.maps.event.addListener(marker, 'click', function () {\r\n update_highlight_image(marker.latlng);\r\n //event.cancelBubble = true;\r\n vm.infowindow.close();\r\n\r\n if(vm.showWayPointDiv){\r\n var latitude = marker.position.lat();\r\n var longitude = marker.position.lng();\r\n\r\n if(!marker.originStatus && !marker.destinationStatus && !marker.isHighlight){\r\n\r\n var image = {\r\n url: selectedMarkerIcons[marker.status].icon,\r\n size: new google.maps.Size(36, 36),\r\n origin: new google.maps.Point(0, 0),\r\n anchor: new google.maps.Point(18, 25),\r\n scaledSize: new google.maps.Size(36, 36)\r\n };\r\n\r\n marker.isHighlight = true;\r\n var icon_new = selectedMarkerIcons[marker.status].icon;\r\n marker.setIcon(image);\r\n marker.setPosition(new google.maps.LatLng(latitude, longitude));\r\n\r\n }else{\r\n marker.isHighlight = false;\r\n var icon_new = icons[marker.status].icon;\r\n marker.setIcon(icon_new);\r\n marker.setPosition(new google.maps.LatLng(latitude, longitude));\r\n }\r\n\r\n if(vm.previousMarker && (marker.position.lat() != vm.previousMarker.position.lat()) ){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n vm.previousMarker = marker;\r\n\r\n if(marker.originStatus || marker.destinationStatus || marker.isHighlight){\r\n scrollCheckptDetails(marker.status,marker.latlng);\r\n }\r\n }\r\n\r\n });\r\n\r\n return marker;\r\n }\r\n\r\n function highlight_check_call_pt_jquery(){\r\n $scope.highlight_check_call_pt = angular.element('.update_highlight_img_from_jquery').val();\r\n scrollCheckptDetails('checkpoints', angular.element('.update_highlight_img_from_jquery').val());\r\n }\r\n\r\n function update_highlight_image(latlng){\r\n $scope.highlight_check_call_pt = latlng;\r\n }\r\n\r\n function scrollCheckptDetails(name,serial_nos){\r\n\r\n var container = angular.element(document.getElementById('checkPtsDetails'));\r\n\r\n if(name == 'origin' || name == 'destination'){\r\n //scroll to top #checkPtsDetails\r\n //container.scrollTop(0, 5000);\r\n var element = angular.element(document.getElementById('location'+serial_nos));\r\n container.scrollTo(element, 0, 1000);\r\n }\r\n\r\n else{\r\n //Checkpoints [will get index number]\r\n //this.serial_no\r\n //scroll to location+serial_no (#checkPtsDetails)\r\n var element = angular.element(document.getElementById('location'+serial_nos));\r\n container.scrollTo(element, 0, 1000);\r\n }\r\n\r\n }\r\n\r\n function getReferenceNumberObject(data) {\r\n // // console.log(data);\r\n var object = {};\r\n for (var k in data) {\r\n //// console.log(data[k].referencenumber);\r\n if(!objectContainsKey(data[k].referencenumber, object)) {\r\n if((data[k].referencecode) && !object[data[k].referencecode])\r\n object[data[k].referencecode] = [];\r\n }\r\n if(object[data[k].referencecode] && (data[k].referencenumber !='N/A') && data[k].referencenumber) object[data[k].referencecode].push(data[k].referencenumber);\r\n }\r\n //// console.log(object);\r\n return object;\r\n }\r\n\r\n //checks if the key is in the object\r\n function objectContainsKey(key, object) {\r\n //// console.log(key);\r\n //// console.log(object)\r\n for (var k in object) {\r\n for(var j in object[k]){\r\n //// console.log(object[k][j] + ' '+ key);\r\n if(object[k][j] == key) return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function isEmpty(obj) {\r\n for(var prop in obj) {\r\n if(obj.hasOwnProperty(prop))\r\n return false;\r\n }\r\n return true;\r\n // return Object.keys(obj).length === 0;\r\n }\r\n\r\n function getToastPosition() {\r\n sanitizePosition();\r\n return Object.keys(vm.toastPosition)\r\n .filter(function(pos) { return vm.toastPosition[pos]; })\r\n .join(' ');\r\n }\r\n\r\n function getBarPercentage() {\r\n //get the percentage for the days reamining bar\r\n var percentage = 0;\r\n var today = new Date();\r\n var duedate = new Date(vm.data.duedate);\r\n var departdate = new Date(vm.data.departuredate);\r\n var denomDiff = duedate.getTime() - departdate.getTime();\r\n var numDiff = today.getTime() - departdate.getTime();\r\n if(numDiff > denomDiff) {\r\n percentage = 100;\r\n } else {\r\n percentage = (numDiff / denomDiff) * 100;\r\n }\r\n return percentage;\r\n }\r\n\r\n function setDaysRemaining() {\r\n var today = new Date();\r\n var duedate = new Date(vm.data.duedate);\r\n var timeDiff = duedate.getTime() - today.getTime();\r\n var diffDays = 0;\r\n if(timeDiff > 0) diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));\r\n vm.daysRemaining = diffDays;\r\n }\r\n\r\n function convertDate(date){\r\n if (date && date.length == 8 && !isNaN(date)){\r\n return date.substring(0,4)+'-'+ date.substring(4,6)+'-'+date.substring(6,8);\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n function convertTime(time){\r\n if (time && time.length == 4 && !isNaN(time)){\r\n return time.substring(0,2)+':'+time.substring(2,4);\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n function getReasonDescription(milestone) {\r\n if (!milestone.reasoncode) return '';\r\n if (milestone.reasondescription) return milestone.reasondescription;\r\n // see if we can find it in the exceptions and give that description back\r\n var desc = '';\r\n angular.forEach(vm.data.exceptions, function(e) {\r\n if (e.milestonecode == milestone.milestonecode) {\r\n desc = e.description;\r\n }\r\n });\r\n return desc;\r\n }\r\n\r\n function docDate(path){\r\n var pad = \"00\";\r\n var content = path.split(\"/\");\r\n return convertDate(content[1]+\r\n pad.substring(0,pad.length-content[2].length)+content[2]+\r\n pad.substring(0,pad.length-content[3].length)+content[3]);\r\n }\r\n\r\n function docName(path){\r\n var content = path.split(\"/\");\r\n return content[content.length-1];\r\n }\r\n\r\n function sanitizePosition() {\r\n var current = vm.toastPosition;\r\n if ( current.bottom && vm.last.top ) current.top = false;\r\n if ( current.top && vm.last.bottom ) current.bottom = false;\r\n if ( current.right && vm.last.left ) current.left = false;\r\n if ( current.left && vm.last.right ) current.right = false;\r\n vm.last = angular.extend({},current);\r\n }\r\n\r\n function showInvoice(ev, _invoice_){\r\n $log.debug(_invoice_);\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/invoices/invoice.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n locals: {\r\n invoice: _invoice_,\r\n address: vm.getShipperAddress(_invoice_),\r\n invoice_date: vm.convertDate(_invoice_.invoicedate)\r\n },\r\n controller: function DialogController($scope, $mdDialog, invoice, address, invoice_date){\r\n $scope.invoice = invoice;\r\n $scope.address = address;\r\n $scope.invoice_date = invoice_date;\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n }\r\n\r\n function getContainers(){\r\n var containers = vm.data.shipment_containers;\r\n var containerHistory = {};\r\n /* Build a container history */\r\n for (var i in containers){\r\n if (containers[i].eventtime && containers[i].eventtime.length == 4){\r\n containers[i].eventtime = vm.convertTime(containers[i].eventtime);\r\n }\r\n if (containerHistory[containers[i].contno]){\r\n containerHistory[containers[i].contno].push(containers[i]);\r\n } else {\r\n containerHistory[containers[i].contno] = [containers[i]];\r\n }\r\n }\r\n /* Reorder all the containers by descending order for their sno (serial number) value */\r\n for (var container in containerHistory){\r\n containerHistory[container] = $filter('orderBy')(containerHistory[container], '-sno');\r\n }\r\n /* Generate the list of containers */\r\n var containers2 = [];\r\n for (container in containerHistory){\r\n containers2.push(containerHistory[container][0]);\r\n }\r\n containers2.sort(function(a,b){\r\n return b.length - a.length;\r\n });\r\n containers2.reverse();\r\n /* Keep the history for details access */\r\n vm.containerHistory = containerHistory;\r\n return containers2;\r\n }\r\n\r\n function showContainerDetails(ev, container) {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/containers/container-details.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n locals: {\r\n history: vm.containerHistory[container]\r\n },\r\n controller: function DialogController($scope, $mdDialog, history){\r\n $scope.history = history;\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n }\r\n\r\n function showModal(ev, modal,data) {\r\n vm.currentMilestone = data;\r\n vm.ref_no = $stateParams.ref_num;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/shipping-details-csl/' + modal + '.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n scope: $scope,\r\n preserveScope: true,\r\n fullscreen: useFullScreen,\r\n controller: function () {\r\n return vm;\r\n },\r\n controllerAs: 'vm'\r\n });\r\n }\r\n\r\n function showExceptionsModal(ev, list) {\r\n vm.exceptionList = list;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n scope: $scope.$new(),\r\n templateUrl: '/app/shipping-details/potential-exceptions/potential-exceptions.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n preserveScope: true,\r\n clickOutsideToClose: true,\r\n controller: 'ShipmentPotentialExceptionsController',\r\n controllerAs: 'sdpeCtrl',\r\n fullscreen: useFullScreen\r\n });\r\n }\r\n\r\n // function closeModal(event) {\r\n // if (event && event.button == 1) return; // ignore middle clicks\r\n // $mdDialog.cancel();\r\n // }\r\n\r\n $rootScope.$on('doneBookmark', function(event, data) {\r\n\r\n if(data){\r\n $rootScope.$broadcast('doneBookmark', false);\r\n doneBookmark(bookmarkType);\r\n }\r\n\r\n });\r\n\r\n function doneBookmark(type){\r\n ShippingDetailsCslService.getBookmarks(type).then(function(){\r\n vm.setBookmarkButton(false);\r\n\r\n angular.forEach(vm.bookmarks.load_bookmarks,function(data){\r\n ShippingDetailsCslService.getUserBookmarks({pro: data.pro}).then(function(res){\r\n if (res && res.load_bookmarks && res.load_bookmarks[0])\r\n {\r\n vm.setBookmarkButton(true);\r\n }\r\n })\r\n\r\n //if(data && vm.data.load_bookmarks[0] && data.id == vm.data.load_bookmarks[0].id){\r\n // vm.setBookmarkButton(true);\r\n //}\r\n });\r\n\r\n }).catch(function(err){\r\n });\r\n }\r\n\r\n function closeModal(event) {\r\n if (event && event.button == 1) return; // ignore middle clicks\r\n //doneBookmark();\r\n $mdDialog.cancel();\r\n }\r\n\r\n //links to the dashboard\r\n function jumpToDashboard() {\r\n $location.url('/');\r\n $mdDialog.cancel();\r\n }\r\n\r\n function gotoMilestome() {\r\n // set the location.hash to the id of\r\n // the element you wish to scroll to.\r\n $location.hash('milestones-area');\r\n\r\n // call $anchorScroll()\r\n $anchorScroll();\r\n }\r\n\r\n function goToReference(){\r\n $location.hash('reference-area');\r\n $anchorScroll();\r\n\r\n vm.expandInvoice = true;\r\n\r\n //UserService.setRefNumbersExpanded(true);\r\n //vm.expandedRefNumbers = UserService.refNumbersIsExpanded();\r\n }\r\n\r\n function showListViewChange(){\r\n\r\n if(vm.showListView){\r\n vm.showWayPointDiv = true;\r\n\r\n if(vm.infowindow){\r\n //vm.infowindow.close();\r\n }\r\n\r\n if(vm.previousMarker){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n }else{\r\n vm.showWayPointDiv = false;\r\n vm.showListFilter = false;\r\n\r\n //Removing Cluster Tooltip and disabling marker highlight.\r\n\r\n if(vm.infowindow){\r\n //vm.infowindow.close();\r\n }\r\n\r\n if(vm.previousMarker){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n function showListFilterChange(){\r\n vm.showListFilter = !vm.showListFilter;\r\n }\r\n\r\n function getDetailsHighlight(indexNo, latitude, longitude){\r\n\r\n //if(vm.showWayPointDiv){\r\n //$('#scrollElement').scrollTop(0);\r\n //alert(latitude);\r\n //document.getElementById('#scrollElement').scrollTo(0, 0);\r\n\r\n //var old = $location.hash();\r\n //$location.hash('locationDetDiv5');\r\n //$anchorScroll();\r\n //reset to old to keep any additional routing logic from kicking in\r\n //$location.hash(null);\r\n\r\n //}\r\n\r\n\r\n }\r\n\r\n vm.switchUser = false;\r\n if(localStorage.switchEmailCslType){\r\n vm.switchUser = true;\r\n }else if(localStorage.userCompanyCsl){\r\n vm.switchUser = true;\r\n }else if(localStorage.userDepartmentCsl){\r\n vm.switchUser = true;\r\n }\r\n\r\n\r\n function getComments(){\r\n\r\n var url = api.url_v2+'/shipments/'+vm.ref_num+'/shipment_comments?customer_type=csl';\r\n\r\n if(localStorage.customerType == 'csl'){\r\n if(localStorage.switchEmailCslType){\r\n url +=\"&userEmail=\"+localStorage.switchEmailCslType;\r\n }else if(localStorage.userCompanyCsl){\r\n url +=\"&userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl);\r\n }else if(localStorage.userDepartmentCsl){\r\n url +=\"&userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCsl)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCsl;\r\n }else if(localStorage.dummyUser){\r\n url +=\"&dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser);\r\n }\r\n }\r\n\r\n ShippingDetailsCslService.getDiscussionData(url).then(function(resp){\r\n\r\n vm.discussion_chat = angular.copy(resp);\r\n vm.original_discussion_chat = angular.copy(resp);\r\n\r\n }).catch(function(err) {\r\n\r\n console.log(err);\r\n\r\n });\r\n\r\n }\r\n\r\n vm.autocompletetimer = null\r\n function chatContactsAutocompleteCsl(id, searchText){\r\n //if(searchText.length > 2){\r\n vm.autocompleteData=\"\";\r\n\r\n if(searchText == \"\"){\r\n var query = {field: 'load_contacts', pro_number:id, value: searchText};\r\n chatContactsListCsl(query);\r\n }\r\n if(searchText.length!=0){\r\n var query = {field: 'load_contacts', pro_number:id, value: searchText};\r\n if(query.value != \"\"){\r\n if(vm.autocompletetimer)\r\n clearTimeout(vm.autocompletetimer)\r\n vm.autocompletetimer = setTimeout(function(){\r\n chatContactsListCsl(query);\r\n },500);\r\n }\r\n }else{\r\n if(vm.autocompletetimer)\r\n clearTimeout(vm.autocompletetimer)\r\n }\r\n }\r\n\r\n function chatContactsListCsl(query){\r\n\r\n $http.post(api.url_v2 + '/aljex_autocomplete', query).then(function(response){\r\n\r\n vm.company_contacts = response.data;\r\n\r\n }, function errorCallback(error){\r\n\r\n });\r\n\r\n }\r\n\r\n\r\n function chatSoket(){\r\n\r\n //shipment_commnets/#{self.shipment_id}/comments/new\r\n var url = '/shipment_comments/'+vm.ref_num+'/comments/new';\r\n\r\n try {\r\n\r\n var faye = new Faye.Client(downloadLink.url+'/faye/faye');\r\n\r\n faye.subscribe(url, function (data) {\r\n\r\n var dataComment = JSON.parse(data);\r\n\r\n var tempArray = angular.copy(vm.original_discussion_chat);\r\n\r\n\r\n\r\n var current_date = moment().format(\"YYYY-MM-DD\");\r\n\r\n if(!dataComment.parent_id){\r\n\r\n dataComment.replies = dataComment.replies || [];\r\n if(vm.discussion_chat[current_date]){\r\n\r\n vm.discussion_chat[current_date].push(dataComment);\r\n tempArray[current_date].push(angular.copy(dataComment));\r\n\r\n }else{\r\n\r\n var new_object = new Object();\r\n\r\n //new_object[current_date] = [dataComment];\r\n vm.discussion_chat[current_date] = [dataComment];\r\n tempArray[current_date] = angular.copy([dataComment]);\r\n }\r\n\r\n }else{\r\n\r\n vm.discussion_chat = angular.forEach(vm.discussion_chat, function(chat_data,i) {\r\n\r\n angular.forEach(chat_data, function(chat_msgs,k) {\r\n\r\n if(chat_msgs.id == dataComment.parent_id){\r\n\r\n chat_msgs.replies = chat_msgs.replies || [];\r\n chat_msgs.replies.push(dataComment);\r\n\r\n tempArray[i][k].replies = tempArray[i][k].replies || [];\r\n tempArray[i][k].replies.push(angular.copy(data));\r\n\r\n }\r\n\r\n });\r\n\r\n });\r\n\r\n }\r\n\r\n vm.original_discussion_chat = angular.copy(tempArray);\r\n\r\n /*$timeout(function () {\r\n\r\n //scroll comment section.\r\n\r\n if(dataComment.parent_id){\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+dataComment.id));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_text'+dataComment.parent_id ) )[0].innerHTML=\"\";\r\n\r\n }else{\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.msg_section'+dataComment.id));\r\n\r\n container.scrollTo(scrollElement, 0, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML=\"\";\r\n\r\n }\r\n\r\n showReplyTextBox('', '');\r\n\r\n }, 200);*/\r\n\r\n\r\n });\r\n }\r\n\r\n catch(e) {\r\n console.log(\"Error loading faye.js\");\r\n }\r\n\r\n }\r\n\r\n $scope.userFilter = \"\";\r\n\r\n $scope.focusIndex = 0;\r\n\r\n $scope.keys = [];\r\n\r\n vm.comment_text_array = [];\r\n\r\n $scope.replyId = '';\r\n $scope.cursorPointerLocation = 0;\r\n\r\n\r\n\r\n function showReplyTextBox(msg_id, usr_id){\r\n\r\n $scope.replyId = msg_id;\r\n\r\n $scope.focusIndex = 0;\r\n //vm.discussion_comment_text = '';\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML = \"\";\r\n vm.tagged_users = [];\r\n $scope.cursorPointerLocation=0;\r\n\r\n $timeout(function () {\r\n\r\n angular.element('.chat_input_text'+msg_id)[0].innerHTML = '';\r\n angular.element( document.querySelector('.chatMainInput .userLists' )).addClass('hide');\r\n angular.element( document.querySelector('.chatSubInput .userLists' )).addClass('hide');\r\n\r\n angular.element('.replyTextBoxDiv').addClass(\"hide\");\r\n\r\n\r\n if(msg_id && usr_id){\r\n angular.element('.replyTextBoxDiv'+msg_id).removeClass(\"hide\");\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.replyTextBoxDiv'+msg_id));\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n }\r\n\r\n }, 100);\r\n\r\n }\r\n\r\n $scope.userSelect = function (event, index, name, parentId, email ) {\r\n\r\n //$scope.focusIndex = index;\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n var discussion_text = angular.element( document.querySelectorAll( '.chat_input_main_text' ) );\r\n\r\n if(parentId){\r\n\r\n element = document.querySelector('.chatSubInput'+parentId+' .userLists' );\r\n //var discussion_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n discussion_text = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) );\r\n vm.replyTagPopup = false;\r\n }\r\n\r\n vm.commentTagPopup = false;\r\n\r\n vm.tagged_users.push(email);\r\n\r\n angular.element( element ).addClass('hide');\r\n vm.userListOpen = false;\r\n //angular.element( element ).blur();\r\n //event.preventDefault();\r\n //discussion_text.focus();\r\n set_cursor(discussion_text[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n //event.preventDefault();\r\n var test = getPrecedingChar(discussion_text[0]);\r\n\r\n var range = window.getSelection().getRangeAt(0),\r\n content = range.extractContents(),\r\n span = document.createElement('SPAN');\r\n\r\n span.appendChild(content);\r\n var htmlContent = span.innerHTML;\r\n\r\n range.insertNode(span);\r\n\r\n\r\n\r\n var currentCursorPoint = range.startOffset;\r\n\r\n var currentLineStringsAfterCursor = range.startContainer.textContent.slice(range.startOffset,range.startContainer.textContent.length);\r\n\r\n var currentLineStringsUptoCursor = range.startContainer.textContent.slice(0,range.startOffset);\r\n\r\n var textAfterAtSymbol = currentLineStringsUptoCursor.slice(currentLineStringsUptoCursor.lastIndexOf(\"@\")+1,range.startOffset);\r\n\r\n var removeStringAftreAtSymbol = textAfterAtSymbol.length;\r\n\r\n //adjusting cursor point\r\n\r\n $scope.cursorPointerLocation = $scope.cursorPointerLocation - removeStringAftreAtSymbol;\r\n\r\n var lastAtSymbolPosition = currentLineStringsUptoCursor.lastIndexOf(\"@\")+1;\r\n\r\n var beforeAtSymbol = currentLineStringsUptoCursor.slice(0,currentLineStringsUptoCursor.lastIndexOf(\"@\")+1);\r\n var afterAtSymbol = currentLineStringsUptoCursor.slice(lastAtSymbolPosition,currentCursorPoint);\r\n\r\n afterAtSymbol = name+' ';\r\n\r\n currentLineStringsUptoCursor = beforeAtSymbol+afterAtSymbol;\r\n\r\n range.startContainer.textContent = currentLineStringsUptoCursor+currentLineStringsAfterCursor;\r\n\r\n //adjusting cursor point\r\n $scope.cursorPointerLocation = $scope.cursorPointerLocation + name.length+1;\r\n\r\n //.lastIndexOf(\"@\")+1,range.startOffset = name;\r\n\r\n //$scope.pasteHtmlAtCaret(name+' ');\r\n\r\n set_cursor(discussion_text[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n\r\n };\r\n\r\n\r\n $scope.pasteHtmlAtCaret = function(html) {\r\n\r\n var sel, range;\r\n if (window.getSelection) {\r\n // IE9 and non-IE\r\n sel = window.getSelection();\r\n if (sel.getRangeAt && sel.rangeCount) {\r\n range = sel.getRangeAt(0);\r\n range.deleteContents();\r\n\r\n // Range.createContextualFragment() would be useful here but is\r\n // non-standard and not supported in all browsers (IE9, for one)\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = html;\r\n var frag = document.createDocumentFragment(), node, lastNode;\r\n while ( (node = el.firstChild) ) {\r\n lastNode = frag.appendChild(node);\r\n }\r\n range.insertNode(frag);\r\n\r\n // Preserve the selection\r\n if (lastNode) {\r\n range = range.cloneRange();\r\n range.setStartAfter(lastNode);\r\n\r\n range.collapse(true);\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n }\r\n }\r\n } else if (document.selection && document.selection.type != \"Control\") {\r\n // IE < 9\r\n document.selection.createRange().pasteHTML(html);\r\n }\r\n }\r\n\r\n\r\n $scope.openUserTagsDiv = function(ev, msgId){\r\n\r\n if(msgId){\r\n\r\n var element = angular.element('.chat_input_text'+msgId);\r\n\r\n }else{\r\n\r\n var element = angular.element('.chat_input_main_text');\r\n\r\n }\r\n\r\n //ev.preventDefault();\r\n\r\n //element.focus();\r\n\r\n set_cursor(element[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n\r\n //$scope.checkTagWord('',msgId,appendElement);*/\r\n\r\n $scope.pasteHtmlAtCaret('@');\r\n\r\n }\r\n\r\n $scope.checkTagWord = function(ev, parentId, node){\r\n\r\n var discussion_comment_html = angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML;\r\n var discussion_comment_text = angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerText;\r\n\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n\r\n vm.discussion_text = discussion_comment_text;\r\n //console.log(\">>\", ev.keyCode, angular.element(element).hasClass('hide') )\r\n\r\n if(discussion_comment_text.trim() != \"\" || $scope.files.length > 0){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n vm.commentTagPopup = false;\r\n }\r\n\r\n if(parentId){\r\n //discussion_comment_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n discussion_comment_html = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerHTML;\r\n discussion_comment_text = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerText;\r\n element = document.querySelector('.chatSubInput'+parentId+' .userLists' );\r\n\r\n vm.discussion_text = discussion_comment_text;\r\n\r\n if(discussion_comment_text.trim() != \"\" || $scope.files.length > 0){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n vm.replyTagPopup = false;\r\n }\r\n }\r\n\r\n if(ev){\r\n //ev.stopPropagation;\r\n }\r\n\r\n\r\n if(discussion_comment_text){\r\n\r\n if(discussion_comment_text.length > 0){\r\n\r\n /*if((discussion_comment_text[discussion_comment_text.length - 1] == '@') ){\r\n vm.userListOpen = true;\r\n }*/\r\n\r\n vm.curserPointData = getPrecedingChar(ev.target);\r\n\r\n if((ev.key == 'Shift') || (ev.key == '@') ){\r\n\r\n if(vm.curserPointData[vm.curserPointData.length -1] == '@' ){\r\n vm.userListOpen = true;\r\n if(parentId){ vm.replyTagPopup = true; vm.commentTagPopup = false; }\r\n else{ vm.commentTagPopup = true; vm.replyTagPopup = false; }\r\n }\r\n\r\n }else{\r\n if(vm.curserPointData[vm.curserPointData.length - 1] == '@'){\r\n vm.userListOpen = true;\r\n if(parentId){ vm.replyTagPopup = true; vm.commentTagPopup = false; }\r\n else{ vm.commentTagPopup = true; vm.replyTagPopup = false; }\r\n }\r\n }\r\n\r\n if(vm.userListOpen && (vm.curserPointData.slice(0,vm.curserPointData.length).lastIndexOf('@') > -1) ){\r\n\r\n //if(discussion_comment_text[vm.curserPointData]){\r\n\r\n $scope.userFilter = vm.curserPointData.slice(vm.curserPointData.lastIndexOf('@') + 1, vm.curserPointData.length);\r\n\r\n if($scope.userFilter != \"\"){\r\n vm.chatContactsAutocompleteCsl(vm.data.pro,$scope.userFilter);\r\n }\r\n // if($scope.userFilter == \"\"){\r\n // vm.chatContactsAutocompleteCsl(vm.data.pro,$scope.userFilter);\r\n // }\r\n\r\n //$scope.userFilter = a.slice((a.lastIndexOf('@') + 1),a.length);\r\n\r\n if($scope.userFilter.indexOf(' ') > -1){\r\n $scope.userFilter = $scope.userFilter.replace(' ',' ');\r\n }\r\n\r\n $timeout(function () {\r\n\r\n if($scope.focusIndex > (element.getElementsByTagName('article').length - 1)){\r\n $scope.focusIndex = 0;\r\n }\r\n\r\n }, 100);\r\n\r\n if((angular.element(element).hasClass('hide')) && vm.company_contacts.length){\r\n\r\n angular.element( element ).removeClass('hide');\r\n scrollContainer(10,500);\r\n\r\n\r\n if(!parentId){\r\n var container = document.querySelector(\".chatMainInput\");\r\n }else{\r\n var container = document.querySelector(\".chatSubInput\"+parentId);\r\n }\r\n\r\n if(node){\r\n ev.target = node;\r\n }\r\n\r\n var clientX,clientY;\r\n var cursor_point_length = getCursorCoOrdinates(ev.target,'','',element);\r\n\r\n clientX = cursor_point_length.x;\r\n clientY = cursor_point_length.y;\r\n\r\n if(angular.element('.sidebar').hasClass('md-locked-open')) {\r\n\r\n element.style.left = (clientX - 260) + \"px\";\r\n\r\n if((element.offsetWidth + (clientX -260)) > container.offsetWidth ) {\r\n element.style.right = \"0px\";\r\n element.style.left = null;\r\n }else{\r\n element.style.left = (clientX - 260) + \"px\";\r\n }\r\n\r\n } else{\r\n\r\n if((element.offsetWidth + (clientX -25)) > container.offsetWidth ) {\r\n\r\n element.style.right = \"0px\";\r\n element.style.left = null;\r\n\r\n }else{\r\n element.style.left = (clientX - 25) + \"px\";\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n //}\r\n\r\n }else{\r\n\r\n $scope.userFilter = '';\r\n //$scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n\r\n }\r\n\r\n }else{\r\n $scope.userFilter = '';\r\n $scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n //angular.element('body').css('position', 'relative');\r\n }\r\n\r\n }else{\r\n $scope.userFilter = '';\r\n $scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n //angular.element('body').css('position', 'relative');\r\n }\r\n\r\n }\r\n\r\n function getPrecedingChar(element) {\r\n\r\n var precedingChar = \"\", sel, range, precedingRange;\r\n\r\n if (window.getSelection) {\r\n sel = window.getSelection();\r\n if (sel.rangeCount > 0) {\r\n range = sel.getRangeAt(0).cloneRange();\r\n range.collapse(true);\r\n range.setStart(element, 0);\r\n precedingChar = range.toString();\r\n }\r\n } else if ( (sel = document.selection) && sel.type != \"Control\") {\r\n range = sel.createRange();\r\n precedingRange = range.duplicate();\r\n precedingRange.moveToElementText(element);\r\n precedingRange.setEndPoint(\"EndToStart\", range);\r\n precedingChar = precedingRange.text;\r\n }\r\n\r\n //if(precedingChar.length > 0){\r\n\r\n $scope.cursorPointerLocation = precedingChar.length;\r\n\r\n //}\r\n\r\n return precedingChar;\r\n\r\n }\r\n\r\n $scope.setManualCrusorPoint = function(ev, className){\r\n\r\n //ev.preventDefault();\r\n var targetPt = getPrecedingChar(document.getElementsByClassName(className)[0]);\r\n vm.userListOpen = false;\r\n\r\n //set_cursor(document.getElementsByClassName(className)[0],targetPt.length,targetPt.length);\r\n //event.preventDefault();\r\n\r\n }\r\n\r\n function set_cursor(containerEl,start,end){\r\n\r\n var charIndex = 0, range = document.createRange();\r\n range.setStart(containerEl, 0);\r\n range.collapse(true);\r\n var nodeStack = [containerEl], node, foundStart = false, stop = false;\r\n\r\n while (!stop && (node = nodeStack.pop())) {\r\n if (node.nodeType == 3) {\r\n var nextCharIndex = charIndex + node.length;\r\n if (!foundStart && start >= charIndex && start <= nextCharIndex) {\r\n range.setStart(node, start - charIndex);\r\n foundStart = true;\r\n }\r\n if (foundStart && end >= charIndex && end <= nextCharIndex) {\r\n range.setEnd(node, end - charIndex);\r\n stop = true;\r\n }\r\n charIndex = nextCharIndex;\r\n } else {\r\n var i = node.childNodes.length;\r\n while (i--) {\r\n nodeStack.push(node.childNodes[i]);\r\n }\r\n }\r\n }\r\n\r\n var sel = window.getSelection();\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n\r\n }\r\n\r\n function getCursorCoOrdinates(){\r\n\r\n var sel = document.selection, range, rect;\r\n var x = 0, y = 0;\r\n if (sel) {\r\n if (sel.type != \"Control\") {\r\n range = sel.createRange();\r\n range.collapse(true);\r\n x = range.boundingLeft;\r\n y = range.boundingTop;\r\n }\r\n } else if (window.getSelection) {\r\n sel = window.getSelection();\r\n if (sel.rangeCount) {\r\n range = sel.getRangeAt(0).cloneRange();\r\n if (range.getClientRects) {\r\n range.collapse(true);\r\n if (range.getClientRects().length>0){\r\n rect = range.getClientRects()[0];\r\n x = rect.left;\r\n y = rect.top;\r\n }\r\n }\r\n // Fall back to inserting a temporary element\r\n if (x == 0 && y == 0) {\r\n var span = document.createElement(\"span\");\r\n if (span.getClientRects) {\r\n // Ensure span has dimensions and position by\r\n // adding a zero-width space character\r\n span.appendChild( document.createTextNode(\"\\u200b\") );\r\n range.insertNode(span);\r\n rect = span.getClientRects()[0];\r\n x = rect.left;\r\n y = rect.top;\r\n var spanParent = span.parentNode;\r\n spanParent.removeChild(span);\r\n\r\n // Glue any broken text nodes back together\r\n spanParent.normalize();\r\n }\r\n }\r\n }\r\n }\r\n\r\n return {'x':x,'y':y};\r\n\r\n }\r\n\r\n $scope.$on('keydown', function( msg, obj ) {\r\n\r\n //https://next.plnkr.co/edit/C6KL3JdCkhgTMCH3trZb?p=preview&preview\r\n //https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes\r\n\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n var replyMsg = false;\r\n\r\n if($scope.replyId){\r\n if(!(angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide'))){\r\n\r\n element = document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' );\r\n var replyMsg = true;\r\n\r\n }\r\n\r\n if((angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide')\r\n && obj.code.keyCode == 13 && !obj.code.shiftKey)){\r\n document.getElementById(\"replyBtn\").click();\r\n }\r\n }\r\n\r\n if(angular.element(element).hasClass('hide') && obj.code.keyCode == 8 ){\r\n vm.userListOpen = true;\r\n }\r\n else if(angular.element(element).hasClass('hide') && obj.code.keyCode == 13 && !obj.code.shiftKey){\r\n document.getElementById(\"commentBtn\").click();\r\n }\r\n else if(!angular.element(element).hasClass('hide')) {\r\n\r\n switch (obj.code.keyCode){\r\n\r\n case 8:\r\n\r\n // BACKSPACE\r\n vm.userListOpen = true;\r\n\r\n break;\r\n\r\n case 38 :\r\n\r\n //UP ARROW\r\n obj.code.preventDefault();\r\n\r\n if($scope.focusIndex == 0){\r\n\r\n $scope.focusIndex = 0;\r\n scrollContainer(10,500);\r\n }\r\n else{\r\n $scope.focusIndex--;\r\n scrollContainer(100,500);\r\n }\r\n\r\n break;\r\n\r\n case 40 :\r\n //debugger;\r\n //DOWN ARROW\r\n obj.code.preventDefault();\r\n\r\n if($scope.focusIndex == (element.getElementsByTagName('article').length - 1)){\r\n $scope.focusIndex = (element.getElementsByTagName('article').length - 1);\r\n }\r\n\r\n else{\r\n $scope.focusIndex++;\r\n }\r\n\r\n scrollContainer(10,500);\r\n\r\n break;\r\n\r\n case 27 :\r\n\r\n //ESCAPE\r\n //$scope.focusIndex = 0;\r\n //angular.element( element ).addClass('hide');\r\n //angular.element('.discussion_layout').triggerHandler('click');\r\n //vm.userListOpen = false;\r\n break;\r\n\r\n case 13 :\r\n\r\n //ENTER\r\n obj.code.preventDefault();\r\n\r\n //$scope.open( $scope.focusIndex , '');\r\n\r\n if(replyMsg){\r\n\r\n angular.element('.chatSubInput'+$scope.replyId+' .userLists .active-highlight').triggerHandler('click');\r\n angular.element( document.querySelector('.chatSubInput'+$scope.replyId+' .userLists')).addClass('hide');\r\n vm.replyTagPopup = false;\r\n\r\n }else{\r\n\r\n angular.element('.chatMainInput .userLists .active-highlight').triggerHandler('click');\r\n angular.element( document.querySelector('.chatMainInput .userLists' )).addClass('hide');\r\n vm.commentTagPopup = false;\r\n\r\n }\r\n\r\n vm.userListOpen = false;\r\n\r\n break;\r\n\r\n\r\n }\r\n\r\n\r\n $scope.$apply();\r\n\r\n }\r\n var val = window.document.querySelectorAll('.chat_input_main_text')[0].innerText\r\n if(val.trim() == \"\")\r\n window.document.querySelectorAll('.chat_input_main_text')[0].innerHTML = \"\"\r\n\r\n });\r\n\r\n function scrollContainer(fromPt, toPt){\r\n\r\n var container = angular.element(document.querySelector('.chatMainInput .userLists' ));\r\n\r\n var scrollElement = angular.element(document.querySelector('.chatMainInput .userLists .active-highlight'));\r\n\r\n if($scope.replyId){\r\n if(!(angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide'))){\r\n\r\n container = angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' ));\r\n scrollElement = angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists .active-highlight'));\r\n\r\n }\r\n }\r\n\r\n container.scrollTo(scrollElement, fromPt, toPt);\r\n\r\n }\r\n\r\n function chat_text_submit(parentId){\r\n\r\n //var discussion_comment_text = vm.discussion_comment_text;\r\n\r\n var discussion_comment_text = window.document.querySelectorAll('.chat_input_main_text')[0].innerHTML;\r\n\r\n if(parentId){\r\n //discussion_comment_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n\r\n discussion_comment_text = window.document.querySelector('.chat_input_text'+parentId).innerHTML;\r\n }\r\n\r\n if(discussion_comment_text.trim() != \"\" || ($scope.files.length > 0)){\r\n if(discussion_comment_text.length <= 2200){\r\n\r\n\r\n //Hypertext link creating\r\n\r\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\r\n\r\n //Removing the existing anchor tags\r\n discussion_comment_text = discussion_comment_text.replace(/<[^>]+>/g, '');\r\n\r\n //URLs starting with http://, https://, or ftp://\r\n replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\r\n replacedText = discussion_comment_text.replace(replacePattern1, '<a href=\"$1\" target=\"_blank\">$1</a>');\r\n\r\n //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\r\n replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\r\n replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\r\n\r\n //Change email addresses to mailto:: links.\r\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\r\n replacedText = replacedText.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\r\n\r\n\r\n var user_name = ((vm.user.first_name)?vm.user.first_name:'')+' '+((vm.user.last_name)?vm.user.last_name:'');\r\n $http({\r\n method: 'POST',\r\n url: api.url_v2 +'/shipments/'+vm.ref_num+'/shipment_comments',\r\n headers: { 'Content-Type': undefined },\r\n\r\n transformRequest: function (data) {\r\n var formData = new FormData();\r\n if(data.files && data.files.length > 0){\r\n for (var i = 0; i < data.files.length; i++) {\r\n if(data.files[i].type != \"savedFile\")\r\n formData.append(\"attachments[]\", data.files[i]);\r\n }\r\n }\r\n formData.append(\"comment_text\", replacedText);\r\n formData.append(\"user_id\", localStorage.getItem(\"user_id\"));\r\n formData.append(\"user_name\", user_name);\r\n formData.append(\"user_email\", localStorage.getItem(\"user_emailId\"));\r\n formData.append(\"parent_id\", (parentId?parentId:null));\r\n formData.append(\"tagged_users\", (vm.tagged_users?vm.tagged_users:[]));\r\n formData.append(\"shipment_type\", \"csl\");\r\n return formData;\r\n },\r\n data: { files: $scope.files }\r\n }).\r\n success(function (data, status, headers, config) {\r\n\r\n //var tempArray = angular.copy(vm.original_discussion_chat);\r\n\r\n vm.clearChatForm();\r\n vm.discussion_comment_text = '';\r\n discussion_comment_text = \"\";\r\n\r\n /*var current_date = moment().format(\"YYYY-MM-DD\");\r\n\r\n if(!data.comment.parent_id){\r\n\r\n data.comment.replies = data.comment.replies || [];\r\n\r\n if(vm.discussion_chat[current_date]){\r\n\r\n vm.discussion_chat[current_date].push(data.comment);\r\n tempArray[current_date].push(angular.copy(data.comment));\r\n //vm.original_discussion_chat[current_date].push(data.comment);\r\n\r\n }else{\r\n\r\n var new_object = new Object();\r\n\r\n //new_object[current_date] = [data.comment];\r\n vm.discussion_chat[current_date] = [data.comment];\r\n tempArray[current_date] = angular.copy([data.comment]);\r\n //vm.original_discussion_chat[current_date] = [data.comment];\r\n }\r\n\r\n }else{\r\n\r\n var index = 0;\r\n\r\n vm.discussion_chat = angular.forEach(vm.discussion_chat, function(chat_data,i) {\r\n\r\n angular.forEach(chat_data, function(chat_msgs,k) {\r\n\r\n if(chat_msgs.id == data.comment.parent_id){\r\n\r\n chat_msgs.replies = chat_msgs.replies || [];\r\n chat_msgs.replies.push(data.comment);\r\n\r\n tempArray[i][k].replies = tempArray[i][k].replies || [];\r\n tempArray[i][k].replies.push(angular.copy(data.comment));\r\n\r\n }\r\n\r\n });\r\n\r\n index++;\r\n\r\n });\r\n\r\n }\r\n\r\n vm.original_discussion_chat = angular.copy(tempArray);*/\r\n\r\n //scroll\r\n\r\n $timeout(function () {\r\n\r\n //scroll comment section.\r\n\r\n if(parentId){\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+data.comment.id));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerHTML=\"\";\r\n\r\n }else{\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.msg_section'+data.comment.id));\r\n\r\n container.scrollTo(scrollElement, 0, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML=\"\";\r\n\r\n }\r\n\r\n showReplyTextBox('', '');\r\n\r\n }, 300);\r\n\r\n //chatSoket();\r\n }).\r\n error(function (data, status, headers, config) {\r\n //vm.clearChatForm();\r\n if(data.messages[0]) vm.chatShipmentError = data.messages[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/chat-toast.error.html');\r\n });\r\n }else{\r\n vm.chatShipmentError = \"Character string exceeds. Maximum character string allowed: 2200\"\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/chat-toast.error.html');\r\n }\r\n }\r\n }\r\n\r\n\r\n function getSuffixDate(number){\r\n\r\n number = $filter('date')(number, \"dd\");\r\n\r\n return ShippingDetailsCslService.getSuffixDate(number);\r\n }\r\n\r\n function reply_comment_display(msg_id,type,key,index_no){\r\n\r\n if(type == 'less'){\r\n\r\n angular.element('.expand_more'+msg_id).removeClass(\"hide\");\r\n angular.element('.expand_less'+msg_id).addClass(\"hide\");\r\n\r\n //expand_div1 sub_msg_details\r\n angular.element('.expand_div'+msg_id).addClass(\"hide\");\r\n angular.element('.sub_msg_details'+msg_id).removeClass(\"hide\");\r\n\r\n var replyCommentId = vm.discussion_chat[key][index_no].replies[vm.discussion_chat[key][index_no].replies.length-1].id;\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+replyCommentId));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n }\r\n\r\n if(type == 'more'){\r\n\r\n angular.element('.expand_more'+msg_id).addClass(\"hide\");\r\n angular.element('.expand_less'+msg_id).removeClass(\"hide\");\r\n\r\n //expand_div1 sub_msg_details\r\n angular.element('.expand_div'+msg_id).removeClass(\"hide\");\r\n angular.element('.sub_msg_details'+msg_id).addClass(\"hide\");\r\n }\r\n\r\n }\r\n\r\n function markRead(){\r\n if(!vm.markReadCheck){\r\n var csl_discussion_count = parseInt(localStorage.getItem('csl_discussion_count'));\r\n ShippingDetailsCslService.markAsRead().then(function(res){\r\n if(res.status == 200){\r\n var count = csl_discussion_count - vm.unseen_discussion_count;\r\n vm.markReadCheck = true;\r\n localStorage.setItem('csl_discussion_count',count);\r\n vm.unseen_discussion_count = 0;\r\n }\r\n }).catch(function(err) {\r\n });\r\n }\r\n }\r\n\r\n $(window).scroll(function() {\r\n var hT = $('#reference-area').offset().top,\r\n hH = $('#reference-area').outerHeight(),\r\n wH = $(window).height(),\r\n wS = $(this).scrollTop();\r\n //console.log((hT-wH) , wS);\r\n if (wS > (hT+hH-wH)){\r\n if(!vm.markReadCheck){\r\n var csl_discussion_count = parseInt(localStorage.getItem('csl_discussion_count'));\r\n ShippingDetailsCslService.markAsRead().then(function(res){\r\n if(res.status == 200){\r\n var count = csl_discussion_count - vm.unseen_discussion_count;\r\n vm.markReadCheck = true;\r\n localStorage.setItem('csl_discussion_count',count);\r\n vm.unseen_discussion_count = 0;\r\n }\r\n }).catch(function(err) {\r\n });\r\n }\r\n }\r\n });\r\n\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.calcArc\r\n * @description calculates the longitude and latitude from the addresses\r\n * @param {source_addr} - the source address\r\n * @param {destination_addr} - the destination address\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getLatLong\r\n * @description gets the longitude and latitude from the google api\r\n * @param {address} - the address to get the longitude and latitude for\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.bookmarkShipment\r\n * @description gets the bookmarked shipments from the database\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getNumBookedShipments\r\n * @description returns the number of bookmarked shipments\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getShipment\r\n * @description returns a shipments details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getArc\r\n * @description returns the arc variable\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .service('ShippingDetailsCmtsService', ShippingDetailsCmtsService);\r\n\r\n /** @ngInject */\r\n ShippingDetailsCmtsService.$inject = ['$http', '$log', 'api', '$window', '$q'];\r\n function ShippingDetailsCmtsService($http, $log, api, $window, $q) {\r\n var shipment,\r\n shipment_summary,\r\n arc = [], pins = [],\r\n cachedBookmarks = false,\r\n check_calls=false;\r\n\r\n function calcArc(source_addr, destination_addr){\r\n getLatLong(source_addr).then(function(source){\r\n getLatLong(destination_addr).then(function (destination){\r\n arc.push([{origin: source, destination: destination}]);\r\n });});\r\n }\r\n\r\n function getLatLong(address){\r\n var url = 'https://maps.googleapis.com/maps/api/geocode/json?address='+address;\r\n var promise = $http.get(url).then(function(res){\r\n $log.debug(res);\r\n return res.data.results[0].geometry.location;\r\n });\r\n return promise;\r\n }\r\n\r\n return {\r\n getBookmarks: function(type){\r\n\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'cmts'){\r\n\r\n if(localStorage.switchEmailCmtsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCmtsType+\"&customer_type=\"+localStorage.customerType+\"&bookmark_type=\"+type;\r\n }else if(localStorage.userCompanyCmts){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts)+\"&customer_type=\"+localStorage.customerType+\"&bookmark_type=\"+type;\r\n }\r\n }else{\r\n params +=\"?customer_type=cmts&bookmark_type=\"+type;\r\n }\r\n\r\n\r\n var url = '/cmts/load_cmts_bookmarks?customer_type=cmts'+params;\r\n var promise = $http.get(api.url_v2+url).then(function(res){\r\n cachedBookmarks = res.data;\r\n return res.data;\r\n });\r\n return promise;\r\n },\r\n getUserBookmarks: function(quer){\r\n var params = \"\";\r\n angular.forEach(quer, function(val, key) {\r\n params += \"&\" + key + \"=\" + val\r\n });\r\n\r\n var url = ('/cmts/load_cmts_bookmarks?'+params).replace('?&','?');\r\n var promise = $http.get(api.url_v2+url).then(function(res){\r\n cachedBookmarks = res.data;\r\n return res.data;\r\n });\r\n return promise;\r\n },\r\n getStatusColors: function(){\r\n\r\n var status_colors = {\r\n\r\n 'PLANNED':{'color-code':'#30C268','icon':'','hover_icon':''},\r\n 'PICKUP':{'color-code':'#30C268','icon':'/assets/images/icons/covered.png','hover_icon':'/assets/images/icons/hover/covered.png'},\r\n 'LOADED':{'color-code':'#30C268','icon':'/assets/images/icons/dispatched.png','hover_icon':'/assets/images/icons/hover/dispatched.png'},\r\n 'CONSIGNEE':{'color-code':'#30C268','icon':'/assets/images/icons/pickup.png','hover_icon':'/assets/images/icons/hover/pickup.png'},\r\n 'UNDELIVERED':{'color-code':'#30C268','icon':'/assets/images/icons/loaded.png','hover_icon':'/assets/images/icons/hover/loaded.png'},\r\n 'DELIVERED':{'color-code':'#5E6163','icon':'/assets/images/icons/delivered.png','hover_icon':'/assets/images/icons/hover/delivered.png'}\r\n\r\n };\r\n\r\n return status_colors;\r\n\r\n },\r\n getCheckCalls: function(url){\r\n /*var params = \"\";\r\n angular.forEach(quer, function(val, key) {\r\n params += \"?\" + key + \"=\" + val\r\n });*/\r\n\r\n var url = '/check_calls_cmts?'+url;\r\n var promise = $http.get(api.url_v2+url).then(function(res1){\r\n\r\n check_calls = res1.data.check_calls;\r\n\r\n return check_calls;\r\n });\r\n return promise;\r\n\r\n },\r\n hasCachedBookmarks: function() {\r\n return !!cachedBookmarks;\r\n },\r\n getCachedBookmarks: function() {\r\n return cachedBookmarks;\r\n },\r\n bookmarkShipment: function(type){\r\n var url = '/cmts/load_cmts_bookmarks';\r\n var promise = $http.post(api.url_v2+url, {load_id:shipment.load_id, bookmark_type: type, customer_type: 'cmts'}).then(function(res){\r\n if(res.data.bookmark_type == 'normal') { shipment.bookmark_id = res.data.id; }\r\n if(res.data.bookmark_type == 'discussion') { shipment.discussion_bookmark_id = res.data.id; }\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n bookmarkNotification: function(uid){\r\n var type = 'cmts';\r\n var url = '/shipments/'+shipment.load_id+'/user_shipment_discussions/create_discussion';\r\n var promise = $http.put(api.url_v2+url, {user_id: uid, active: true, shipment_type: type}).then(function(res){\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n unBookmarkNotification: function(uid){\r\n var type = 'cmts';\r\n var url = '/shipments/'+shipment.load_id+'/user_shipment_discussions/create_discussion';\r\n var promise = $http.put(api.url_v2+url, {user_id: uid, active: false, shipment_type: type}).then(function(res){\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n markAsRead: function(){\r\n var type = 'cmts';\r\n var url = '/shipments/'+shipment.load_id+'/shipment_comments/mark_as_read';\r\n var promise = $http.put(api.url_v2+url, {shipment_type: type}).then(function(res){\r\n return res;\r\n });\r\n return promise;\r\n },\r\n unBookmarkShipment: function(type){\r\n var url = '/cmts/load_cmts_bookmarks/' + shipment.load_id+\"?bookmark_type=\"+type+\"&customer_type=cmts\";\r\n var promise = $http.delete(api.url_v2+url).then(function(res){\r\n if (res.data.bookmark.pro == shipment.pro_number){\r\n shipment.bookmark_id = 0;\r\n }\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n unBookmarkShipmentDiscussion: function(type){\r\n var url = '/cmts/load_cmts_bookmarks/' + shipment.load_id+\"?bookmark_type=\"+type+\"&customer_type=cmts\";\r\n var promise = $http.delete(api.url_v2+url).then(function(res){\r\n if (res.data.bookmark.pro == shipment.pro_number){\r\n shipment.discussion_bookmark_id = 0;\r\n }\r\n return shipment;\r\n });\r\n return promise;\r\n\r\n },\r\n unBookmarkId: function(load_id,type){\r\n var url = '/cmts/load_cmts_bookmarks/' + load_id+\"?bookmark_type=\"+type+\"&customer_type=cmts\";\r\n\r\n var promise = $http.delete(api.url_v2+url).then(function(res){\r\n\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n getShipment: function(ref_num){\r\n\r\n var params = \"\";\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'cmts'){\r\n\r\n if(localStorage.switchEmailCmtsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCmtsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCmts){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=cmts\";\r\n }\r\n\r\n var promise = $http.get(api.url+'/shipments/'+ref_num+params).then(function(res){\r\n shipment = res.data;\r\n shipment.pro_number = shipment.pro_number.toString();\r\n $log.debug(shipment);\r\n //calcArc(shipment.shippercity, shipment.destination);\r\n // debugger;\r\n arc.length = 0;\r\n arc.push({ origin: {\r\n name: shipment.origincity\r\n // latitude: shipment.geocodes.origin_lat,\r\n // longitude: shipment.geocodes.origin_lng,\r\n },\r\n destination: {\r\n name: shipment.destinationcity\r\n // latitude: shipment.geocodes.dest_lat,\r\n // longitude: shipment.geocodes.dest_lng,\r\n },\r\n options: {\r\n strokeWidth: 3,\r\n strokeColor: 'rgba(133, 217, 164, 1)',\r\n greatArc: false,\r\n arcSharpness: 0.25\r\n }\r\n });\r\n arc.map(function(d){\r\n var origin = d.origin;\r\n origin.radius = 5;\r\n origin.fillKey = 'bubble';\r\n var dest = d.destination;\r\n dest.radius = 5;\r\n dest.fillKey = 'bubble';\r\n pins.push(origin);\r\n pins.push(dest);\r\n });\r\n shipment_summary = [ //summary used in contact message\r\n {display: 'SHIPPINGDETAILS.CUSTOMER_NAME', text: 'Customer Name', value: shipment.customername},\r\n {display: 'SHIPPINGDETAILS.SHIP_DATE', text: 'Ship Date', value: shipment.shipdate},\r\n {display: 'SHIPPINGDETAILS.DUE_DATE', text: 'Due Date', value: shipment.duedate},\r\n {display: 'SHIPPINGDETAILS.ORIGIN', text: 'Origin', value: shipment.origin},\r\n {display: 'SHIPPINGDETAILS.DESTINATION', text: 'Destination', value: shipment.destination},\r\n {display: 'SHIPPINGDETAILS.AWB', text: 'AWB', value: shipment.awb}\r\n //{display: 'SHIPPINGDETAILS.INVOICE_NUM', value: shipment.shipment_invoices[0].invoicenumber}\r\n ];\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n\r\n getInvoice:function(ref_num){\r\n\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'cmts'){\r\n\r\n if(localStorage.switchEmailCmtsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCmtsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCmts){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }\r\n\r\n var promise = $http.get(api.url_v2+'/invoices_cmts/'+ref_num+params).then(function(res){\r\n return res.data;\r\n });\r\n\r\n return promise;\r\n\r\n },\r\n\r\n getLineCharges:function(ref_num){\r\n //cmts/milestones\r\n var promise = $http.get(api.url_v2+'/invoices_cmts/'+ref_num+'/line_charges').then(function(res){\r\n return res.data;\r\n });\r\n\r\n return promise;\r\n },\r\n\r\n getStops:function(ref_num){\r\n var params = \"\";\r\n if(localStorage.customerType == 'cmts'){\r\n\r\n if(localStorage.switchEmailCmtsType){\r\n params +=\"&userEmail=\"+localStorage.switchEmailCmtsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCmts){\r\n params +=\"&userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }\r\n else{\r\n params +=\"&customer_type=cmts\";\r\n }\r\n //cmts/milestones\r\n var promise = $http.get(api.url_v2+'/cmts/stops?load_id='+ ref_num + params).then(function(res){\r\n return res.data;\r\n });\r\n\r\n return promise;\r\n },\r\n getMilestone:function(ref_num){\r\n var params = \"\";\r\n if(localStorage.customerType == 'cmts'){\r\n\r\n if(localStorage.switchEmailCmtsType){\r\n params +=\"&userEmail=\"+localStorage.switchEmailCmtsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCmts){\r\n params +=\"&userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }\r\n else{\r\n params +=\"&customer_type=cmts\";\r\n }\r\n //cmts/milestones\r\n var promise = $http.get(api.url_v2+'/cmts/milestones?load_id='+ ref_num + params).then(function(res){\r\n return res.data;\r\n });\r\n\r\n return promise;\r\n },\r\n\r\n getShipmentSummary: function() { //summary used for contact message\r\n return shipment_summary;\r\n },\r\n getShipmentVariable: function() { //used for contact message\r\n return shipment;\r\n },\r\n getArc: function(){\r\n return arc;\r\n },\r\n resetArc: function(){\r\n arc.length = 0;\r\n },\r\n getPins: function(){\r\n return pins;\r\n },\r\n resetPins: function(){\r\n pins.length = 0;\r\n },\r\n getShipmentLoadID: function(){\r\n if(typeof(shipment) != 'undefined'){\r\n return shipment.load_id;\r\n }else{\r\n return 'no';\r\n }\r\n },\r\n\r\n getLoad: function(ref_num) {\r\n\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'cmts'){\r\n\r\n if(localStorage.switchEmailCmtsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCmtsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCmts){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }\r\n else{\r\n params +=\"?customer_type=cmts\";\r\n }\r\n\r\n var promise = $http.get(api.url_v2+'/cmts/loads/'+ref_num+params).then(function(res){\r\n\r\n shipment = res.data;\r\n shipment.load_id = shipment.load_id.toString();\r\n\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n\r\n downloadDocument: function(id,load_id,filename, entity){\r\n var url = \"/cmts/loads/\" + load_id + \"/download_cmts_document?document_id=\" + id + \"&entity=\" + entity;\r\n $http.get(api.url_v2+url,{responseType: 'blob'}).then(function(res){\r\n var a = document.createElement(\"a\");\r\n document.body.appendChild(a);\r\n a.style = \"display: none\";\r\n var blob = new Blob([res.data], {type: \"application/pdf\"}),\r\n url = window.URL.createObjectURL(blob);\r\n a.href = url;\r\n a.download = filename;\r\n a.click();\r\n });\r\n },\r\n\r\n chunkArray: function(myArray, chunk_size){\r\n\r\n var index = 0;\r\n var arrayLength = myArray.length;\r\n var tempArray = [];\r\n var myChunk;\r\n\r\n for (index = 0; index < arrayLength; index += chunk_size) {\r\n myChunk = myArray.slice(index, index+chunk_size);\r\n // Do something if you want with the group\r\n tempArray.push(myChunk);\r\n }\r\n\r\n return tempArray;\r\n\r\n },\r\n saveDiscussionText: function(id,query,url){\r\n\r\n var dfd = $q.defer();\r\n //var dfd = $q.defer();\r\n $http.post(url,query).then(function(response){\r\n\r\n dfd.resolve(response.data);\r\n\r\n }, function errorCallback(error){\r\n\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n },\r\n getDiscussionData: function(url){\r\n\r\n var dfd = $q.defer();\r\n\r\n $http.get(url).then(function(response){\r\n\r\n dfd.resolve(response.data);\r\n\r\n }, function errorCallback(error){\r\n\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n\r\n },\r\n\r\n getSuffixDate: function(number){\r\n\r\n if (isNaN(number) || number < 1){\r\n return '';\r\n } else if (number % 100 == 11 || number % 100 == 12) {\r\n return 'th';\r\n } else {\r\n var lastDigit = number % 10;\r\n if (lastDigit === 1) {\r\n return 'st';\r\n } else if (lastDigit === 2) {\r\n return 'nd';\r\n } else if (lastDigit === 3) {\r\n return 'rd';\r\n } else if (lastDigit > 3) {\r\n return 'th';\r\n }\r\n }\r\n\r\n }\r\n\r\n };\r\n\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getShipment\r\n * @description calls the getShipment function from ShippingDetailsCmtsService and returns the shipping details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.docDate\r\n * @description returns the date of the document\r\n * @param {path} - the path to the document\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.bookmarkShipment\r\n * @description bookmarks the current shipment.\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.convertDate\r\n * @description converts dates to have dashes in it\r\n * @param {date} - the date that is being converted\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.convertTime\r\n * @description converts the time to have a colon in the middle\r\n * @param {time} - the time to be converted\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getReasonDescription\r\n * @description Gets a Reason Description for a milestone based on the milestone\r\n * itself, or an exception\r\n * @param {object} - the milestone\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.docName\r\n * @description returns the name of the document\r\n * @param {path} - the path of the document\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getInvoiceAddress\r\n * @description returns a list of the consignee address\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getToastPosition\r\n * @description returns the toast position (toast is a notification)\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getBarPercentage\r\n * @description gets the perecentage of days since shipper date divided by the total shipping period. percentage is used for the bar visualization\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.setDaysRemaining\r\n * @description sets days reamining based on the duedate and current date\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.sanitizePosition\r\n * @description sets the last position\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showBookmarkToast\r\n * @description shows the toast for a bookmark (toast is a notification)\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showContainerDetails\r\n * @description shows the container details modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showDocumentModal\r\n * @description shows the modal for document details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.closeDocumentModal\r\n * @description closes the modal for document details\r\n */\r\n\r\n (function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .filter('unique', function() {\r\n return function(collection, keyname) {\r\n var output = [],\r\n keys = [];\r\n angular.forEach(collection, function(item) {\r\n var key = item[keyname];\r\n if(keys.indexOf(key) === -1) {\r\n keys.push(key);\r\n output.push(item);\r\n }\r\n });\r\n return output;\r\n };\r\n })\r\n .directive('scrollToBottomCmts', function($timeout, $window) {\r\n return {\r\n scope: {\r\n scrollToBottomCmts: \"=\"\r\n },\r\n restrict: 'A',\r\n link: function(scope, element, attr) {\r\n scope.$watchCollection('scrollToBottomCmts', function(newVal) {\r\n if (newVal) {\r\n $timeout(function() {\r\n element[0].scrollTop = element[0].scrollHeight;\r\n }, 0);\r\n }\r\n\r\n });\r\n }\r\n };\r\n })\r\n // .directive('shipmentDiscussionChatKeyPress', function() {\r\n // return function( scope, elem ) {\r\n\r\n // elem.bind('keydown', function( event ) {\r\n // if(event.keyCode == 13 && !event.shiftKey){\r\n // scope.$broadcast('keydown', { code: event } );\r\n // return false;\r\n // }\r\n // else if(event.keyCode == 38 || event.keyCode == 40 || event.keyCode == 27 || event.keyCode == 13 || event.keyCode == 8){\r\n // scope.$broadcast('keydown', { code: event } );\r\n // }\r\n\r\n // });\r\n\r\n // elem.bind('click', function(event){\r\n\r\n // scope.focusIndex = 0;\r\n // angular.element('.chatMainInput .userLists').addClass(\"hide\");\r\n // angular.element('.chatSubInput .userLists').addClass(\"hide\");\r\n\r\n // });\r\n\r\n // };\r\n // })\r\n .directive( 'checkCallsHeight', function( $parse ) {\r\n return {\r\n restrict: 'A',\r\n link: function( $scope, elem, attrs ) {\r\n elem.ready(function(){\r\n\r\n $scope.verticalLineHeight = 0;\r\n\r\n $scope.$watch('reCalVerticalGreenLine',function(){\r\n //$scope.$apply(function(){\r\n\r\n\r\n var height = 0;\r\n var checkCallsCount = $scope.checkCallsCount;\r\n\r\n if(checkCallsCount > 0){\r\n\r\n var element = angular.element(document.querySelector('.location10000'));\r\n height = parseInt(height) + parseInt((element[0].offsetHeight)/2);\r\n\r\n for(var i=0; i<checkCallsCount; i++){\r\n\r\n var element = angular.element(document.querySelector('.location'+i));\r\n // Height in px\r\n height = parseInt(element[0].offsetHeight) + parseInt(height);\r\n\r\n }\r\n\r\n // adding margin-bottom height\r\n height = height + (10 * checkCallsCount) + 10;\r\n\r\n // Removing the 50% height in the last div\r\n\r\n var element = angular.element(document.querySelector('.location'+(checkCallsCount - 1)));\r\n var heightDeduct = parseInt((element[0].offsetHeight)/2);\r\n\r\n //var element = angular.element(document.querySelector('#location'+(checkCallsCount - 1)));\r\n //var heightDeduct = parseInt((element[0].offsetHeight)/2);\r\n\r\n height = height - heightDeduct;\r\n\r\n // adjustment\r\n height = height - 10;\r\n\r\n }\r\n\r\n $scope.verticalLineHeight = height;\r\n\r\n })\r\n })\r\n }\r\n }\r\n })\r\n .directive('scrollToTop', function() {\r\n return {\r\n restrict: 'A',\r\n link: function(scope, elem, attr) {\r\n elem.ready(function(){\r\n elem[0].scrollTop = 200;\r\n })\r\n\r\n }\r\n };\r\n })\r\n .animation('.slide', function() {\r\n var NG_HIDE_CLASS = 'ng-hide';\r\n return {\r\n beforeAddClass: function(element, className, done) {\r\n if(className === NG_HIDE_CLASS) {\r\n element.slideUp(done);\r\n }\r\n },\r\n removeClass: function(element, className, done) {\r\n if(className === NG_HIDE_CLASS) {\r\n element.hide().slideDown(done);\r\n }\r\n }\r\n }\r\n })\r\n .filter('userTagHighlight', function() {\r\n return function(input,names) {\r\n\r\n angular.forEach(names, function(value, key){\r\n\r\n if((input.search('@'+value.full_name) > -1) && (input.search(\"<span class='user_name_highlight'>\"+'@'+value.full_name+\"</span>\") < 0) ){\r\n // to highlight tagged user names in chat comments\r\n input = input.replace('@'+value.full_name, \"<span class='user_name_highlight'>\"+'@'+value.full_name+\"</span>\");\r\n\r\n }\r\n\r\n });\r\n\r\n //Hypertext link creating\r\n\r\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\r\n\r\n // //URLs starting with http://, https://, or ftp://\r\n // replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\r\n // replacedText = input.replace(replacePattern1, '<a href=\"$1\" target=\"_blank\">$1</a>');\r\n\r\n // //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\r\n // replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\r\n // replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\r\n\r\n //Change email addresses to mailto:: links.\r\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\r\n replacedText = input.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\r\n\r\n return replacedText;\r\n };\r\n\r\n })\r\n .controller('ShippingDetailsCmtsController', ShippingDetailsCmtsController)\r\n .controller('ToastCtrl', function($scope, $mdToast){\r\n $scope.closeToast = function(){ $mdToast.hide();};\r\n });\r\n\r\n /** @ngInject */\r\n ShippingDetailsCmtsController.$inject = ['NgMap', '$http', '$sce', '$mdpTimePicker', '$window', '$document', '$stateParams', '$location', '$anchorScroll', 'ShippingDetailsCmtsService', 'UserService', '$log', '$translatePartialLoader', '$mdDialog', '$mdMedia', '$scope', '$rootScope', '$mdToast', '$timeout', 'NgTableParams', '$filter', 'ContactsService', 'permissions', 'mdSelectHelper', 'api', 'downloadLink', 'google_api_url'];\r\n function ShippingDetailsCmtsController(NgMap, $http, $sce, $mdpTimePicker, $window, $document, $stateParams, $location, $anchorScroll, ShippingDetailsCmtsService, UserService, $log, $translatePartialLoader, $mdDialog, $mdMedia, $scope, $rootScope, $mdToast, $timeout, NgTableParams, $filter, ContactsService, permissions, mdSelectHelper, api, downloadLink, google_api_url) {\r\n\r\n var vm = this;\r\n\r\n /*NgMap.getMap({id: 'aljex_shipping_map'}).then(function(map) {\r\n\r\n\r\n });*/\r\n\r\n //https://developers.google.com/maps/documentation/javascript/styling\r\n\r\n vm.mapStyle = [\r\n\r\n { \"featureType\":\"all\", \"elementType\":\"all\", \"stylers\":[ { \"invert_lightness\":true },{ \"saturation\":10 }, { \"lightness\":30 }, { \"gamma\":0.5 }, { \"hue\":\"#435158\"}]},\r\n { \"featureType\":\"administrative\", \"elementType\":\"all\", \"stylers\":[ { \"color\":\"#89c0eb\" }, { \"visibility\":\"on\" }]},\r\n { \"featureType\":\"administrative\", \"elementType\":\"geometry.stroke\", \"stylers\":[ { \"gamma\":\"0.97\" } ] },\r\n { \"featureType\":\"administrative\", \"elementType\":\"labels.text.fill\", \"stylers\":[ { \"lightness\":\"16\" }, { \"saturation\":\"-100\" } ] },\r\n { \"featureType\":\"administrative\", \"elementType\":\"labels.text.stroke\", \"stylers\":[ { \"gamma\":\"0.00\" } ] },\r\n { \"featureType\":\"administrative.locality\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"on\" } ] },\r\n { \"featureType\":\"administrative.land_parcel\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"off\" } ] },\r\n { \"featureType\":\"landscape\", \"elementType\":\"all\", \"stylers\":[ { \"color\":\"#404e5a\" }, { \"visibility\":\"on\" } ] },\r\n { \"featureType\":\"landscape.man_made\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"off\" } ] },\r\n { \"featureType\":\"poi\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"off\" } ] },\r\n { \"featureType\":\"road\", \"elementType\":\"geometry.fill\", \"stylers\":[ { \"lightness\":\"-100\" } ] },\r\n { \"featureType\":\"road\", \"elementType\":\"geometry.stroke\", \"stylers\":[ { \"lightness\":\"-4\" }, { \"gamma\":\"1.21\" } ] },\r\n { \"featureType\":\"water\", \"elementType\":\"geometry.fill\", \"stylers\":[ { \"color\":\"#080e27\" } ] }\r\n\r\n ];\r\n\r\n vm.way1 = [{ location: { lat: 12.5644, lng: 76.7337 }, stopover: true }, { location: { lat: 12.4929, lng: 76.6643 }, stopover: true }];\r\n vm.way2 = [{ location: { lat: 34.5199973, lng: -115.5127662 }, stopover: true,\"originStatus\":false,\"destinationStatus\":false },{ location: { lat: 42.8080616, lng: -89.1276138 }, stopover: true,originStatus:false,destinationStatus:false }];\r\n\r\n /* Variables */\r\n\r\n vm.data = {};\r\n vm.downloadlink = downloadLink.url;\r\n vm.referenceNumberObject = {};\r\n vm.bookmarkType = 'normal';\r\n vm.doneBookmark = doneBookmark;\r\n vm.isReferenceNumbers = false;\r\n vm.containerHistory = {};\r\n vm.data.potential_exceptions = {};\r\n vm.ref_num = $stateParams.ref_num;\r\n vm.isBookmarked = false;\r\n vm.isBookmarkedDiscussion = false;\r\n vm.isBookmarkedNotification = false;\r\n vm.isAttachmentsNotification = false;\r\n vm.isBookmarking = false;\r\n vm.isBookmarkingDiscussion = false;\r\n vm.bookmarks = {};\r\n vm.bookmarksCount = 0;\r\n vm.bookmarksCount1 = 0;\r\n vm.bookmarkButtonText = '';\r\n vm.bookmarkButtonTextDiscussion = '';\r\n vm.barPercentage = 0;\r\n vm.daysRemaining = 0;\r\n vm.exceptionList = true;\r\n vm.isLoading = false;\r\n vm.show_class_access = (localStorage.getItem(\"show_cmts_class\") == 'true')? true : false;\r\n $log.debug($stateParams);\r\n vm.last = {\r\n bottom: false,\r\n top: true,\r\n left: false,\r\n right: true\r\n };\r\n vm.toastPosition = angular.extend({}, vm.last);\r\n vm.user = UserService.getUserData();\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n // TODO - Rig these up to store permanently to userservice\r\n vm.expandedInvoices = UserService.invoicesIsExpanded();\r\n vm.expandedShippingDetails = UserService.shippingDetailsIsExpanded();\r\n vm.expandedRefNumbers = UserService.refNumbersIsExpanded();\r\n\r\n if(vm.user.permissions.cmts){\r\n vm.hasFinancialPermissions = (getPermissionsValue(vm.user.permissions, 'cmts').hasOwnProperty('Shipment'))? vm.user.permissions.cmts.Shipment.includes('financial') :false;\r\n }else{\r\n vm.hasFinancialPermissions = false;\r\n }\r\n //vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n vm.isFinancialPermission = isFinancialPermission;\r\n vm.getDocumentsCount = getDocumentsCount;\r\n vm.tagged_users = [];\r\n\r\n vm.setInvoicesExpanded = function() {\r\n UserService.setInvoicesExpanded(vm.expandedInvoices);\r\n };\r\n\r\n vm.setShippingDetailsExpanded = function() {\r\n UserService.setShippingDetailsExpanded(vm.expandedShippingDetails);\r\n };\r\n\r\n vm.setRefNumbersExpanded = function() {\r\n UserService.setRefNumbersExpanded(vm.expandedRefNumbers);\r\n };\r\n\r\n vm.is_consignee_user = UserService.check_consignee_user();\r\n\r\n /*\r\n * Redirect the user to track and trace if no id was provided\r\n * TODO - Should we vocally fail?\r\n **/\r\n if (!$stateParams.ref_num){\r\n $location.path('track-trace-cmts');\r\n }\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('shipment');\r\n $translatePartialLoader.addPart('shippingdetails');\r\n $translatePartialLoader.addPart('admin'); //used for potential exceptions\r\n\r\n /* Functions */\r\n vm.bookmarkShipment = bookmarkShipment;\r\n vm.bookmarkShipmentDiscussion = bookmarkShipmentDiscussion;\r\n vm.calcInvoiceTotal = calcInvoiceTotal;\r\n vm.closeModal = closeModal;\r\n vm.convertDate = convertDate;\r\n vm.convertTime = convertTime;\r\n vm.getReasonDescription = getReasonDescription;\r\n vm.docDate = docDate;\r\n vm.docName = docName;\r\n vm.getBarPercentage = getBarPercentage;\r\n vm.getBookmarks = getBookmarks('normal');\r\n vm.getConsigneeAddress = getConsigneeAddress;\r\n vm.getShipperAddress = getShipperAddress;\r\n vm.getShipment = getShipment;\r\n vm.getStops = getStops;\r\n vm.getMilestone = getMilestone;\r\n vm.getStatusColors = getStatusColors;\r\n vm.getCheckCalls = getCheckCalls;\r\n vm.getInvoice = getInvoice;\r\n vm.getContainers = getContainers;\r\n vm.getToastPosition = getToastPosition;\r\n vm.sanitizePosition = sanitizePosition;\r\n vm.setBookmarkButton = setBookmarkButton;\r\n vm.setBookmarkButtonDiscussion = setBookmarkButtonDiscussion;\r\n vm.setBookmarkButtonNotification = setBookmarkButtonNotification;\r\n vm.setDaysRemaining = setDaysRemaining;\r\n vm.showBookmarkToastWithUrl = showBookmarkToastWithUrl;\r\n vm.showContainerDetails = showContainerDetails;\r\n vm.showModal = showModal;\r\n vm.showExceptionsModal = showExceptionsModal;\r\n vm.showInvoice = showInvoice;\r\n vm.jumpToDashboard = jumpToDashboard;\r\n vm.isEmpty = isEmpty;\r\n vm.progressStatusText = \"\";\r\n vm.gotoMilestome = gotoMilestome;\r\n vm.goToReference = goToReference;\r\n vm.googleMapsUrl = google_api_url;\r\n vm.showWayPointDiv = false;\r\n vm.showListFilter = false;\r\n vm.showListViewChange = showListViewChange;\r\n vm.showListFilterChange = showListFilterChange;\r\n vm.getDetailsHighlight = getDetailsHighlight;\r\n vm.previousMarker;\r\n vm.downloadDocument = downloadDocument;\r\n\r\n vm.check_calls_filter = check_calls_filter;\r\n vm.filter_requested_data = new Object();\r\n\r\n $scope.checkCallsCount = 0;\r\n $scope.verticalLineHeight = 0;\r\n $scope.reCalVerticalGreenLine = false;\r\n vm.verticalGreenLine = verticalGreenLine;\r\n $scope.highlight_check_call_pt = 'dummy';\r\n vm.highlight_check_call_pt_jquery = highlight_check_call_pt_jquery;\r\n\r\n /* Using Angular Material Table Data */\r\n vm.selected = [];\r\n ShippingDetailsCmtsService.resetArc();\r\n ShippingDetailsCmtsService.resetPins();\r\n\r\n vm.getShipment($stateParams.ref_num);\r\n vm.getInvoice($stateParams.ref_num);\r\n vm.getStops($stateParams.ref_num);\r\n vm.getMilestone($stateParams.ref_num);\r\n vm.getStatusColors();\r\n\r\n vm.invoiceDetails = {};\r\n vm.invoiceLineCharges = {};\r\n vm.shipment_stops = {};\r\n vm.shipment_milestones = {};\r\n vm.expandInvoice = false;\r\n\r\n //discussion\r\n //vm.checkTagWord = checkTagWord;\r\n vm.userListOpen = false;\r\n vm.searchDiscussionNew = false;\r\n vm.searchDiscussionOld = true;\r\n vm.findText = \"\";\r\n vm.findData = findData;\r\n vm.cancelFindData = cancelFindData;\r\n vm.sendNotification = sendNotification;\r\n vm.chat_text_submit = chat_text_submit;\r\n vm.discussion_chat = new Object();\r\n vm.chatSoket = chatSoket;\r\n vm.getSuffixDate = getSuffixDate;\r\n vm.showReplyTextBox = showReplyTextBox;\r\n vm.discussion_comment_text = '';\r\n vm.removeFile = removeFile;\r\n vm.attachments = [];\r\n vm.clearChatForm = clearChatForm;\r\n vm.user_id = localStorage.getItem(\"user_id\");\r\n vm.findAttachmentComments = findAttachmentComments;\r\n vm.company_contacts = [];\r\n $scope.files = [];\r\n vm.unseen_discussion_count = \"\";\r\n\r\n vm.reply_comment_display = reply_comment_display;\r\n vm.markRead = markRead;\r\n vm.markReadCheck = true;\r\n vm.file_size_array = new Object();\r\n vm.discussion_file_format = ['jpg', 'jpeg', 'gif', 'png', 'pdf', 'doc', 'docx', 'csv', 'xlsx', 'txt', 'xls'];\r\n vm.discussion_file_format1 = ['jpg', 'jpeg', 'gif', 'png', 'pdf', 'doc', 'docx', 'csv', 'xlsx', 'txt', 'xls',\r\n 'vnd.openxmlformats-officedocument.spreadsheetml.sheet','vnd.ms-excel','plain','msword',\r\n 'vnd.openxmlformats-officedocument.wordprocessingml.document'];\r\n vm.chatContactsAutocompleteCmts = chatContactsAutocompleteCmts;\r\n vm.submitBtn = true;\r\n vm.submitBtnReply = true;\r\n vm.discussion_text = \"\";\r\n\r\n chatSoket();\r\n getComments();\r\n\r\n\r\n ContactsService.setSubjectStatuses({shipmentDetails:{potentialException: false, currentException: false, shipmentDetails: true}});\r\n\r\n var currentShipment = false;\r\n\r\n if(vm.user.customer_types.length > 0){\r\n if(vm.user.customer_types.includes('cmts')){\r\n vm.discussion_visibility = vm.user.customer_type_setup.cmts.discussion_enabled;\r\n }else{\r\n vm.discussion_visibility = false;\r\n }\r\n }\r\n\r\n //Google Map Icons\r\n\r\n var icons = {\r\n checkpoints: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-unselected.png',\r\n status: 'checkpoints'\r\n },\r\n lastCheckPt: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-enroute.png',\r\n status: 'lastCheckPt'\r\n },\r\n origin: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-origin.png',\r\n status: 'origin'\r\n },\r\n destination: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-destination.png',\r\n status: 'destination'\r\n }\r\n };\r\n\r\n var mouseOverIcons = {\r\n checkpoints: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-selected.png',\r\n status: 'checkpoints'\r\n },\r\n lastCheckPt: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-enroute.png',\r\n status: 'lastCheckPt'\r\n },\r\n origin: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-origin.png',\r\n status: 'origin'\r\n },\r\n destination: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-destination.png',\r\n status: 'destination'\r\n }\r\n };\r\n\r\n var selectedMarkerIcons = {\r\n checkpoints: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-selected-showlist.png',\r\n status: 'checkpoints'\r\n },\r\n lastCheckPt: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-selected-showlist.png',\r\n status: 'lastCheckPt'\r\n },\r\n origin: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-origin.png',\r\n status: 'origin'\r\n },\r\n destination: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-destination.png',\r\n status: 'destination'\r\n }\r\n };\r\n\r\n\r\n $scope.fileNameChanged = function(messageData) {\r\n\r\n var id = messageData.attributes['msg_id'].value;\r\n\r\n var name = document.getElementById('fileOne');\r\n $scope.message_id = 'none';\r\n\r\n if(id){\r\n name = document.getElementById('file'+id);\r\n $scope.message_id = parseInt(id);\r\n if(name.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n }\r\n }else{\r\n if(name.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n }\r\n }\r\n var file_upload_error = false;\r\n\r\n if($scope.files){\r\n\r\n //jpg, jpeg, gif, png, pdf, docs, dox, csv, xlsx, txt, xls\r\n\r\n for(var i=0; i<name.files.length; i++){\r\n\r\n if((name.files[i].size/1024/1024) > 5 || (name.files[i].type == '') ||\r\n (vm.discussion_file_format1.indexOf((name.files[i].type.split('/'))[1]) == -1) ){\r\n\r\n file_upload_error = true\r\n\r\n } else{\r\n\r\n $scope.files.push(name.files[i]);\r\n\r\n var bytes = name.files[i].size;\r\n\r\n if(bytes < 1024) {\r\n bytes + \" Bytes\";\r\n }\r\n\r\n else if(bytes < 1048576) {\r\n bytes = (bytes / 1024).toFixed(0) + \" KB\";\r\n }\r\n\r\n else if(bytes < 1073741824) {\r\n bytes = (bytes / 1048576).toFixed(0) + \" MB\";\r\n }\r\n\r\n else {\r\n bytes = (bytes / 1073741824).toFixed(0) + \" GB\";\r\n }\r\n\r\n vm.file_size_array[name.files[i].name] = {'name':name.files[i].name,'size':bytes}\r\n\r\n }\r\n\r\n }\r\n\r\n if(file_upload_error){\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/discussion/file_size_error.html');\r\n }\r\n\r\n }else{\r\n $scope.files = name.files;\r\n }\r\n\r\n $scope.files = removeDuplicateFiles($scope.files);\r\n\r\n }\r\n\r\n function removeFile(filename,index,id){\r\n angular.forEach($scope.files, function(v,k){\r\n if(v.type == 'savedFile' && v.name===filename){\r\n vm.attachments.push(v.name);\r\n }\r\n if(v.name===filename){\r\n $scope.files.splice(k,1);\r\n }\r\n });\r\n // Removing element\r\n var myEl = angular.element( document.querySelector( '.savedFile'+index ) );\r\n myEl.remove();\r\n\r\n if(id){\r\n if($scope.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n }\r\n }else{\r\n if($scope.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n }\r\n }\r\n }\r\n\r\n function clearChatForm(){\r\n $scope.files = [];\r\n vm.submitBtn = true;\r\n }\r\n\r\n function removeDuplicateFiles(origArr) {\r\n var newArr = [],\r\n origLen = origArr.length,\r\n found, x, y;\r\n for (x = 0; x < origLen; x++) {\r\n found = undefined;\r\n for (y = 0; y < newArr.length; y++) {\r\n if (origArr[x].name === newArr[y].name) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n newArr.push(origArr[x]);\r\n }\r\n }\r\n return newArr;\r\n }\r\n\r\n function findData(text){\r\n try{\r\n vm.searchDiscussionNew = true;\r\n vm.searchDiscussionOld = false;\r\n }catch(e){ }\r\n }\r\n\r\n function cancelFindData(){\r\n try{\r\n vm.searchDiscussionNew = false;\r\n vm.searchDiscussionOld = true;\r\n vm.findText = \"\";\r\n }catch(e){ }\r\n }\r\n\r\n function sendNotification(){\r\n // /shipment_id: nil, user_id: nil, active: true\r\n var userId = vm.user.id;\r\n\r\n if (!vm.isBookmarkedNotification){\r\n\r\n /* Notify the shipment */\r\n ShippingDetailsCmtsService.bookmarkNotification(userId).then(function(shipment){\r\n vm.setBookmarkButtonNotification(true);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-notification-toast.html');\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-toast.error.html');\r\n });\r\n\r\n /* Remove the bookmark */\r\n } else {\r\n ShippingDetailsCmtsService.unBookmarkNotification(userId).then(function(shipment){\r\n vm.setBookmarkButtonNotification(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/remove-bookmark-notification-toast.html');\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n\r\n }\r\n\r\n function findAttachmentComments(val){\r\n\r\n vm.isAttachmentsNotification = !vm.isAttachmentsNotification;\r\n\r\n if(vm.isAttachmentsNotification){\r\n\r\n var deleted_array2 = [];\r\n\r\n var prevMainIndex = null;\r\n\r\n for (var val1 in vm.discussion_chat) {\r\n\r\n if(vm.discussion_chat[val1].length > 0){\r\n\r\n var deleted_array1 = [];\r\n\r\n for(var j=0; j<vm.discussion_chat[val1].length; j++){\r\n\r\n var deleted_array = [];\r\n\r\n // looping replies array\r\n if(vm.discussion_chat[val1][j].replies.length > 0){\r\n\r\n var prevReplyIndex = null;\r\n\r\n for(var k=0; k<vm.discussion_chat[val1][j].replies.length; k++){\r\n\r\n if(vm.discussion_chat[val1][j].replies[k]){\r\n\r\n if(vm.discussion_chat[val1][j].replies[k].attachments.length == 0){\r\n // to delete replies array;\r\n //prevReplyIndex = k;\r\n vm.discussion_chat[val1][j].replies.splice(k,1);\r\n k--;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // to delete replies parent array;\r\n if(vm.discussion_chat[val1][j].attachments.length == 0 && vm.discussion_chat[val1][j].replies.length == 0 ){\r\n\r\n vm.discussion_chat[val1].splice(j,1);\r\n //prevReplyParentIndex = j;\r\n j--;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n // to delete main array;\r\n if(vm.discussion_chat[val1].length == 0 ){\r\n //deleted_array2.push(val1);\r\n delete vm.discussion_chat[val1];\r\n }\r\n\r\n }\r\n\r\n }else{\r\n\r\n //getComments();\r\n vm.discussion_chat = angular.copy(vm.original_discussion_chat);\r\n\r\n }\r\n\r\n }\r\n\r\n $scope.highlight = function(haystack) {\r\n if(!vm.findText) {\r\n return $sce.trustAsHtml(haystack);\r\n }\r\n return $sce.trustAsHtml(haystack.replace(new RegExp(vm.findText, \"gi\"), function(match) {\r\n return '<span class=\"highlightedText\">' + match + '</span>';\r\n }));\r\n };\r\n\r\n function getPermissionsValue(responsePermissionsData, type){\r\n return responsePermissionsData[type] || {}\r\n }\r\n\r\n function downloadDocument(id,pro,filename, entity) {\r\n ShippingDetailsCmtsService.downloadDocument(id,pro,filename, entity);\r\n }\r\n\r\n\r\n function verticalGreenLine(){\r\n $scope.reCalVerticalGreenLine = !$scope.reCalVerticalGreenLine;\r\n }\r\n\r\n function getStatusColors(){\r\n vm.status_colors = ShippingDetailsCmtsService.getStatusColors();\r\n }\r\n\r\n function isCurrentShipment(obj) {\r\n\r\n if(obj.load_id == $stateParams.ref_num) {\r\n currentShipment = true;\r\n }\r\n if (currentShipment) {\r\n vm.isBookmarked = true;\r\n } else {\r\n vm.isBookmarked = false;\r\n }\r\n }\r\n\r\n function isFinancialPermission(documenttype){\r\n var row_length = documenttype.split(\" \").length\r\n return vm.hasFinancialPermissions && documenttype.split(\" \")[row_length - 1] == 'Invoice' || documenttype.split(\" \")[row_length - 1] != 'Invoice'\r\n }\r\n\r\n function getDocumentsCount(data){\r\n var count = 0;\r\n if (data != undefined && data != 'undefined') {\r\n for(var i = 1; i <= data.length ; i++){\r\n if (!vm.hasFinancialPermissions && data[i - 1].documenttype.split(\" \")[data[i - 1].documenttype.split(\" \").length - 1] == 'Invoice'){\r\n count=count+1;\r\n }\r\n }\r\n return data.length - count\r\n }\r\n else {\r\n return count\r\n }\r\n }\r\n\r\n // After the promise is completed, return the bookmarks from the service and determine how many there are\r\n function getBookmarks(type) {\r\n\r\n ShippingDetailsCmtsService.getBookmarks(type).then(function(successResponse){\r\n vm.bookmarksCount = 0;\r\n vm.bookmarks = successResponse.load_cmts_bookmarks;\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount += 1;\r\n });\r\n\r\n });\r\n }\r\n\r\n function showBookmarkToastWithUrl(url) {\r\n var pinTo = vm.getToastPosition();\r\n var toast = $mdToast.show({\r\n position: pinTo,\r\n hideDelay: 3000,\r\n templateUrl: url,\r\n parent: angular.element(document.getElementById('toast-parent')),\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n $mdToast.show(toast);\r\n }\r\n\r\n function setProgressStatus() {\r\n var now = new Date();\r\n if (moment(vm.data.departuredate).isAfter(now)) {\r\n vm.progressStatus = \"Upcoming\";\r\n } else if (vm.data.isdelivered == \"true\") {\r\n vm.progressStatus = \"Delivered\"\r\n } else if (vm.daysRemaining > 0) {\r\n vm.progressStatus = vm.daysRemaining + \" Days Remaining\";\r\n } else if (moment(vm.data.departuredate).isBefore(now)) {\r\n vm.progressStatus = \"In Progress\";\r\n } else if (moment(vm.data.duedate).isBefore(now)) {\r\n vm.progressStatus = \"Overdue\";\r\n } else {\r\n vm.progressStatus = \"\";\r\n }\r\n }\r\n\r\n // function showRemoveBookmarkToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/remove-bookmark-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n // function showBookmarkLimitToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/bookmark-limit-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n // function showBookmarkedAlreadyToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/bookmark-already-removed-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n var data=angular.element($window);\r\n data.bind('resize',function(){\r\n\r\n verticalGreenLine();\r\n\r\n });\r\n\r\n function bookmarkShipment(type){\r\n\r\n // Update our current list of bookmarks before attempting to add a new one\r\n // So we can verify the bookmarks prior to trying to add / remove this one\r\n vm.bookmarksCount = 0;\r\n currentShipment = false;\r\n var startBookmarked = vm.isBookmarked;\r\n ShippingDetailsCmtsService.getBookmarks(type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse.load_cmts_bookmarks;\r\n vm.bookmarks.filter(isCurrentShipment);\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount += 1;\r\n });\r\n\r\n if (!vm.isBookmarked){\r\n // The bookmark has already been removed elsewhere, don't try it again\r\n if (startBookmarked) {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-already-removed-toast.html');\r\n vm.setBookmarkButton(false);\r\n } else if(vm.bookmarksCount < 5) {\r\n /* Bookmark the shipment */\r\n vm.bookmarkButtonText = \"SHIPPINGDETAILS.BOOKMARKING\";\r\n vm.isBookmarking = true; // Disable the button\r\n ShippingDetailsCmtsService.bookmarkShipment(type).then(function(shipment){\r\n vm.setBookmarkButton(true);\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-toast.html');\r\n }).catch(function(err) {\r\n vm.isBookmarking = false;\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-toast.error.html');\r\n });\r\n /* We've hit our limit, we need to remove bookmarks */\r\n } else {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-limit-toast.html');\r\n ShippingDetailsCmtsService.getBookmarks(type);\r\n }\r\n /* Remove the bookmark */\r\n } else {\r\n vm.isBookmarking = true; // Disable the button\r\n ShippingDetailsCmtsService.unBookmarkShipment(type).then(function(shipment){\r\n vm.setBookmarkButton(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/remove-bookmark-toast.html');\r\n vm.isBookmarking = false;\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n function bookmarkShipmentDiscussion(type){\r\n // Update our current list of bookmarks before attempting to add a new one\r\n // So we can verify the bookmarks prior to trying to add / remove this one\r\n\r\n vm.bookmarksCount1 = 0;\r\n currentShipment = false;\r\n var startBookmarked = vm.isBookmarkedDiscussion;\r\n ShippingDetailsCmtsService.getBookmarks(type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse.discussion_bookmarks;\r\n vm.bookmarks.filter(isCurrentShipment);\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount1 += 1;\r\n });\r\n if (!vm.isBookmarkedDiscussion){\r\n // The bookmark has already been removed elsewhere, don't try it again\r\n if (startBookmarked) {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-already-removed-toast.html');\r\n vm.setBookmarkButtonDiscussion(false);\r\n } else if(vm.bookmarksCount1 || vm.bookmarksCount1 == 0) {\r\n /* Bookmark the shipment */\r\n //vm.bookmarkButtonText = \"SHIPPINGDETAILS.BOOKMARKING\";\r\n vm.isBookmarkingDiscussion = true; // Disable the button\r\n ShippingDetailsCmtsService.bookmarkShipment(type).then(function(shipment){\r\n vm.setBookmarkButtonDiscussion(true);\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-discussion-toast.html');\r\n }).catch(function(err) {\r\n vm.isBookmarkingDiscussion = false;\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-discussion-toast.error.html');\r\n });\r\n /* We've hit our limit, we need to remove bookmarks */\r\n } else {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-limit-toast.html');\r\n ShippingDetailsCmtsService.getBookmarks(type);\r\n }\r\n /* Remove the bookmark */\r\n } else {\r\n vm.isBookmarkingDiscussion = true; // Disable the button\r\n ShippingDetailsCmtsService.unBookmarkShipmentDiscussion(type).then(function(shipment){\r\n vm.setBookmarkButtonDiscussion(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/remove-bookmark-discussion-toast.html');\r\n vm.isBookmarkingDiscussion = false;\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cmts/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n function getConsigneeAddress(data){\r\n var address_labels = [\"consigneeaddress1\", \"consigneeaddress2\", \"consigneeaddress3\", \"consigneeaddress4\", \"consigneecity\", \"consigneecountry\"];\r\n return address_labels.map(function(d){return data[d];})\r\n .filter(function(d){return d && d !== null && d !== \"\";});\r\n }\r\n\r\n function getShipperAddress(data){\r\n var address_labels = [\"shipperaddress1\", \"shipperaddress2\", \"shipperaddress3\", \"shipperaddress4\", \"shippercity\", \"shippercountry\"];\r\n return address_labels.map(function(d){return data[d];})\r\n .filter(function(d){return d && d !== null && d !== \"\";});\r\n }\r\n\r\n function calcInvoiceTotal(){\r\n var inv = vm.data ? (vm.data.shipment_invoices ? vm.data.shipment_invoices : undefined) : undefined;\r\n var sum = 0;\r\n if (inv){\r\n inv.map(function(d){sum += +d.totalinvoiceamount;});\r\n return sum;\r\n } else {\r\n return sum;\r\n }\r\n }\r\n\r\n function setBookmarkButton(isMarked){\r\n if (isMarked){\r\n vm.isBookmarked = true;\r\n vm.bookmarkButtonText = 'SHIPPINGDETAILS.REMOVE_BOOKMARK';\r\n } else {\r\n vm.isBookmarked = false;\r\n vm.bookmarkButtonText ='SHIPPINGDETAILS.BOOKMARK_SHIPMENT';\r\n }\r\n }\r\n\r\n function setBookmarkButtonDiscussion(isMarked){\r\n if (isMarked){\r\n vm.isBookmarkedDiscussion = true;\r\n vm.bookmarkButtonTextDiscussion = 'SHIPPINGDETAILS.REMOVE_BOOKMARK_DISCUSSION';\r\n } else {\r\n vm.isBookmarkedDiscussion = false;\r\n vm.bookmarkButtonTextDiscussion ='SHIPPINGDETAILS.BOOKMARK_SHIPMENT_DISCUSSION';\r\n }\r\n }\r\n\r\n function setBookmarkButtonNotification(isMarked){\r\n if (isMarked){\r\n vm.isBookmarkedNotification = true;\r\n } else {\r\n vm.isBookmarkedNotification = false;\r\n }\r\n }\r\n\r\n\r\n function getInvoice(ref_num){\r\n vm.isLoading = true;\r\n\r\n ShippingDetailsCmtsService.getInvoice(ref_num).then(function(invoiceData){\r\n\r\n if ($location.path().indexOf('/shipping-details-cmts') === -1) return;\r\n\r\n vm.invoiceDetails = invoiceData;\r\n\r\n getLineCharges(ref_num);\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n //vm.failedToRetrieveData = err.data.error;\r\n //alert('34534');\r\n });\r\n\r\n }\r\n\r\n function getLineCharges(ref_num){\r\n ShippingDetailsCmtsService.getLineCharges(ref_num).then(function(lineChargesData){\r\n\r\n vm.invoiceLineCharges = lineChargesData.line_charges;\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n //vm.failedToRetrieveData = err.data.error;\r\n //alert('34534');\r\n });\r\n }\r\n\r\n function getStops(ref_num){\r\n vm.isLoading = true;\r\n\r\n ShippingDetailsCmtsService.getStops(ref_num).then(function(stopsData){\r\n\r\n vm.shipment_stops = stopsData.stops;\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n //vm.failedToRetrieveData = err.data.error;\r\n //alert('34534');\r\n });\r\n }\r\n\r\n function getMilestone(ref_num){\r\n vm.isLoading = true;\r\n\r\n ShippingDetailsCmtsService.getMilestone(ref_num).then(function(milestoneData){\r\n\r\n vm.shipment_milestones = milestoneData.milestones;\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n //vm.failedToRetrieveData = err.data.error;\r\n //alert('34534');\r\n });\r\n }\r\n\r\n function getShipment(ref_num){\r\n\r\n vm.isLoading = true;\r\n ShippingDetailsCmtsService.getLoad(ref_num).then(function(d){\r\n\r\n if ($location.path().indexOf('/shipping-details-cmts') === -1) return;\r\n\r\n //var updatedData = {},\r\n // arrival = d.destinationcountrycode + d.destinationcitycode,\r\n // departure = d.origincountrycode + d.origincitycode;\r\n\r\n //if (d.potential_exceptions) {\r\n // // Loop through potential exceptions and set the city\r\n // // and the arrival/departure\r\n // angular.forEach(d.potential_exceptions, function(exc) {\r\n // //// console.log(exc);\r\n // if (exc.city_codes.indexOf(arrival) !== -1) {\r\n // exc['city'] = d.destination;\r\n // exc['port_usage'] = 'Arrival'\r\n // } else if (exc.city_codes.indexOf(departure) !== -1) {\r\n // exc['city'] = d.origin;\r\n // exc['port_usage'] = 'Departure'\r\n // }\r\n // })\r\n // updatedData = d;\r\n //} else {\r\n // updatedData = d;\r\n //}\r\n\r\n /* Parse shipping dates by their concatenated nonformat */\r\n function parseDate(datetime){ return moment(datetime, 'YYYYMMDDHHmm').valueOf();}\r\n\r\n /* Retrieve Milestones sortable attribute by actual date + time, then by estimated date + time, and finally by sno */\r\n //function sortMilestonesBy(milestone){\r\n // return milestone.actualdate ?\r\n // parseDate(milestone.actualdate + milestone.actualtime) :\r\n // milestone.estimateddate ?\r\n // parseDate(milestone.estimateddate + milestone.estimatedtime) :\r\n // milestone.sno;\r\n //}\r\n\r\n //updatedData.shipment_milestones.sort(function(a, b) {\r\n // var milestone_a = sortMilestonesBy(a), milestone_b = sortMilestonesBy(b);\r\n // if (milestone_a == milestone_b){\r\n // return a.sno < b.sno ? -1 : (a.sno > b.sno ? 1 : 0);\r\n // } else {\r\n // return milestone_a < milestone_b ? -1 : (milestone_a > milestone_b ? 1 : 0);\r\n // }\r\n //});\r\n\r\n vm.data = d;\r\n\r\n if(vm.data.last_status_details!=null && vm.data.last_status_details!=undefined){\r\n var timezone_name = moment.tz.guess(vm.data.last_status_details['actual_time']);\r\n var timezone_symbol = moment.tz(vm.data.last_status_details['actual_time'], timezone_name).format('z');\r\n vm.data.last_status_details['timezone'] = timezone_symbol;\r\n }\r\n\r\n //vm.data.shipmentstatus = 'DELIVERED';\r\n //vm.data.origin_geocode.origin_lat=\"\";\r\n //vm.data.origin_geocode.origin_lng = \"\";\r\n\r\n //if(vm.data.origin_geocode){\r\n vm.data.origin_geocode.origin_lat = parseFloat(vm.data.origin_geocode.origin_lat);\r\n vm.data.origin_geocode.origin_lng = parseFloat(vm.data.origin_geocode.origin_lng);\r\n //}\r\n\r\n //vm.data.destination_geocode.dest_lat = \"\";\r\n //vm.data.destination_geocode.dest_lng = \"\";\r\n\r\n //if(vm.data.destination_geocode){\r\n vm.data.destination_geocode.dest_lat = parseFloat(vm.data.destination_geocode.dest_lat);\r\n vm.data.destination_geocode.dest_lng = parseFloat(vm.data.destination_geocode.dest_lng);\r\n //}\r\n\r\n\r\n // calling check calls\r\n var filtersData = new Object;\r\n filtersData['pro'] = $stateParams.ref_num;\r\n\r\n vm.getCheckCalls(filtersData);\r\n\r\n vm.data.pickupdate = $filter('date')(vm.data.pickupdate, \"dd-MMM-yyyy\");\r\n vm.data.duedate = $filter('date')(vm.data.duedate, \"dd-MMM-yyyy\");\r\n vm.data.shipdate = $filter('date')(vm.data.shipdate, \"dd-MMM-yyyy\");\r\n\r\n //vm.data.under_exception = (vm.data.potential_exceptions && vm.data.potential_exceptions.length > 0) || (vm.data.exceptions && vm.data.exceptions.length > 0);\r\n vm.referenceNumberObject = getReferenceNumberObject(vm.data.shipment_references);\r\n vm.isReferenceNumbers = !isEmpty(vm.referenceNumberObject);\r\n vm.isLoading = false;\r\n setDaysRemaining(); //sets the variable for days remaining\r\n setProgressStatus();\r\n //// console.log(d.potential_exceptions[0]);\r\n //vm.data.potential_exceptions = d.potential_exceptions[0];\r\n //call bar animation after we have data\r\n //vm.isBookmarked = (vm.data.load_bookmarks && vm.data.load_bookmarks[0])\r\n\r\n vm.unseen_discussion_count = vm.data.unseen_discussion_count;\r\n if(vm.unseen_discussion_count > 0){\r\n vm.markReadCheck = false;\r\n }\r\n ShippingDetailsCmtsService.getUserBookmarks({load_id: vm.data.load_id}).then(function(res){\r\n if (res && res.load_cmts_bookmarks && res.load_cmts_bookmarks[0])\r\n {\r\n vm.isBookmarked = true\r\n setBookmarkButton(true) ;\r\n }\r\n else\r\n {\r\n vm.isBookmarked = false\r\n setBookmarkButton(false)\r\n }\r\n\r\n if (res && res.discussion_bookmarks && res.discussion_bookmarks[0])\r\n {\r\n vm.isBookmarkedDiscussion = true;\r\n setBookmarkButtonDiscussion(true);\r\n }\r\n else\r\n {\r\n vm.isBookmarkedDiscussion = false;\r\n setBookmarkButtonDiscussion(false);\r\n }\r\n\r\n })\r\n\r\n //setBookmarkButton(vm.data.load_bookmarks && vm.data.load_bookmarks[0]);\r\n //set the bar percentage and give it animation\r\n vm.barPercentage = getBarPercentage();\r\n\r\n vm.chatContactsAutocompleteCmts(vm.data.load_id,'');\r\n\r\n //ContactsService.setSubjectStatuses({shipmentDetails:{\r\n // potentialException: vm.data.potential_exceptions && vm.data.potential_exceptions.length > 0,\r\n // currentException: vm.data.exceptions && vm.data.exceptions.length > 0,\r\n // shipmentDetails: true\r\n //}});\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n vm.failedToRetrieveData = err.data.error;\r\n });\r\n }\r\n\r\n function check_calls_filter(value,field_name,time){\r\n\r\n //$timeout( function(){\r\n vm.filter_requested_data['pro'] = $stateParams.ref_num;\r\n\r\n //if(value != undefined){\r\n\r\n if(field_name == 'time'){\r\n\r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n //vm.filter_requested_data['timezone'] = timezone_symbol;\r\n\r\n\r\n if((value == undefined) || (value == '')){\r\n\r\n value = '';\r\n\r\n } else{\r\n\r\n value = moment(value).format('hh:mm a')+' '+timezone_symbol;\r\n\r\n }\r\n }\r\n\r\n vm.filter_requested_data[field_name] = value;\r\n\r\n //if((value.length % 2 === 0) || (value.length > 5)){\r\n getCheckCalls(vm.filter_requested_data);\r\n //}\r\n\r\n\r\n //}\r\n\r\n //}, time );\r\n\r\n }\r\n\r\n function getCheckCalls(filterData){\r\n\r\n var url = '';\r\n\r\n angular.forEach(filterData,function(value,index){\r\n\r\n if(value){\r\n if(url){\r\n url += '&'+index+'='+value;\r\n }else{\r\n url = index+'='+value\r\n }\r\n }\r\n\r\n });\r\n\r\n vm.ngMapway = [];\r\n vm.ngGpsMapway = [];\r\n vm.ngmap = new Array();\r\n $scope.ngMapLocations = new Array();\r\n $scope.checkPtsLocation = new Array();\r\n\r\n ShippingDetailsCmtsService.getCheckCalls(url).then(function(res){\r\n\r\n vm.check_calls = [];\r\n vm.gps_check_calls = [];\r\n\r\n if(vm.data.status != 'PLANNED' ){\r\n vm.check_calls = res;\r\n }\r\n\r\n $scope.checkCallsCount = 0;\r\n\r\n if(vm.check_calls.length > 0){\r\n\r\n vm.gps_check_calls = vm.check_calls.filter(function (check_calls) {\r\n\r\n $scope.checkCallsCount = $scope.checkCallsCount + 1;\r\n //return check_calls.trackingtype === \"GPS\";\r\n return true;\r\n\r\n });\r\n\r\n }\r\n\r\n vm.check_calls_status = new Array();\r\n\r\n vm.check_calls_status.push(\"In Transit\",\"Arrived Terminal\", \"DROPPED\", \"IN TRANSIT\", \"AT SHIPPER\", \"At Shipper\",\r\n \"MARGIN ALERT\", \"On Time\", \"TRACKING\", \"At Consignee\", \"Margin Alert\", \"EMPTY\", \"AT CONSIGNEE\", \"Delayed\", \"DOT Shutdown\",\r\n \"Out for Delivery\", \"Appt Needed/Chan\" );\r\n\r\n //Pushing Origin\r\n $scope.ngMapLocations = [\r\n {\r\n pos: [parseFloat(vm.data.origin_geocode.origin_lat), parseFloat(vm.data.origin_geocode.origin_lng)],\r\n originStatus:true,\r\n destinationStatus:false,\r\n position:new google.maps.LatLng(parseFloat(vm.data.origin_geocode.origin_lat), parseFloat(vm.data.origin_geocode.origin_lng)),\r\n type:'origin',\r\n state_name:vm.data.origin_state_name,\r\n serial_no:10000\r\n }\r\n ];\r\n\r\n if(vm.gps_check_calls.length){\r\n\r\n angular.forEach(vm.gps_check_calls,function(value,index){\r\n //if(value.trackingtype == 'GPS') {\r\n if(true) {\r\n\r\n vm.ngMapway.push({location:{lat:parseFloat(value.geocodes.lat),lng:parseFloat(value.geocodes.lng)}, stopover:true});\r\n\r\n var imageType='';\r\n\r\n if((vm.gps_check_calls.length - 1) == index){\r\n imageType=(!vm.data.isdelivered)?'lastCheckPt':'checkpoints';\r\n }else{\r\n imageType='checkpoints';\r\n }\r\n\r\n //Pushing only checkpoints to $scope.checkPtsLocation\r\n $scope.checkPtsLocation.push({\r\n pos:[(value.geocodes.lat), (value.geocodes.lng)],\r\n originStatus:false,\r\n destinationStatus:false,\r\n\r\n position:new google.maps.LatLng(parseFloat(value.geocodes.lat), parseFloat(value.geocodes.lng)),\r\n type: imageType,\r\n serial_no:index,\r\n state_name:value.state_name\r\n });\r\n }\r\n })\r\n\r\n }\r\n\r\n vm.chunk_array = ShippingDetailsCmtsService.chunkArray(vm.ngMapway, 23);\r\n\r\n //Pushing destination\r\n $scope.ngMapLocations.push({\r\n pos:[parseFloat(vm.data.destination_geocode.dest_lat), parseFloat(vm.data.destination_geocode.dest_lng)],\r\n originStatus:false,\r\n destinationStatus:true,\r\n position:new google.maps.LatLng(parseFloat(vm.data.destination_geocode.dest_lat), parseFloat(vm.data.destination_geocode.dest_lng)),\r\n type:'destination',\r\n state_name:vm.data.destination_state_name,\r\n serial_no:10001\r\n });\r\n\r\n /* NG MAP */\r\n googleMap();\r\n\r\n }).catch(function(err) {\r\n\r\n });\r\n\r\n }\r\n\r\n function googleMap(){\r\n /* NG MAP */\r\n NgMap.getMap().then(function (map) {\r\n vm.ngmap = map;\r\n\r\n\r\n $timeout(function () {\r\n $scope.initMarkerClusterer();\r\n }, 3000);\r\n\r\n //$scope.initMarkerClusterer();\r\n\r\n $timeout( function(){\r\n vm.verticalGreenLine();\r\n vm.ngmap = map;\r\n }, 50 );\r\n\r\n });\r\n\r\n }\r\n\r\n //Google Map Init Code\r\n $scope.initMarkerClusterer = function () {\r\n\r\n vm.markers = [];\r\n\r\n // to Remove old marker icons\r\n if(vm.removableMarkers){\r\n\r\n angular.forEach(vm.removableMarkers, function(value, key) {\r\n\r\n var latlng = new google.maps.LatLng('', '');\r\n value.setPosition(latlng);\r\n value.setIcon('');\r\n value.title= '';\r\n value.status= '';\r\n value.originStatus='';\r\n value.destinationStatus='';\r\n value.serial_no='';\r\n value.state_name='';\r\n value.isHighlight=false;\r\n value.map = vm.ngmap;\r\n });\r\n\r\n }\r\n\r\n var markerCluster = new Array();\r\n\r\n // vm.markers contain only origin and destination\r\n vm.markers = $scope.ngMapLocations.map(function (city) {\r\n return $scope.createMarkerForCity(city);\r\n });\r\n\r\n\r\n // vm.clusterMarkers contains only checkpoints\r\n vm.clusterMarkers = $scope.checkPtsLocation.map(function (city) {\r\n return $scope.createMarkerForCity(city);\r\n });\r\n\r\n // to Remove old marker icons\r\n vm.removableMarkers = vm.clusterMarkers;\r\n\r\n var clusterMarkerIcons = [{\r\n url: '/assets/images/icons/shipment/showListView/icon-oval-selected.png',\r\n width: 14,\r\n height: 14\r\n }];\r\n\r\n var clusterOptions = {\r\n zoomOnClick:false,\r\n //imagePath: 'https://cdn.rawgit.com/googlemaps/v3-utility-library/master/markerclustererplus/images/m',\r\n styles: clusterMarkerIcons,\r\n gridSize:30\r\n };\r\n\r\n vm.infowindow = new google.maps.InfoWindow();\r\n\r\n markerCluster = new MarkerClusterer(vm.ngmap, vm.clusterMarkers, clusterOptions);\r\n\r\n var clusteredMarkers = vm.clusterMarkers;\r\n\r\n // To Hide the display number of counts in clusetr image.\r\n markerCluster.setCalculator(function(clusteredMarkers, numStyles){\r\n\r\n var index = 0,\r\n count = clusteredMarkers.length,\r\n total = count;\r\n\r\n while (total !== 0) {\r\n total = parseInt(total / 5, 10);\r\n index++;\r\n }\r\n\r\n index = Math.min(index, numStyles);\r\n return {\r\n text: \"\",\r\n index: index,\r\n title: count\r\n };\r\n });\r\n\r\n // markerCluster Image OnClick Method\r\n google.maps.event.addListener(markerCluster, 'clusterclick', function(cluster) {\r\n\r\n //event.cancelBubble = true;\r\n event.stopPropagation();\r\n\r\n //if(vm.showWayPointDiv){\r\n\r\n // Removing Marker highligth icon\r\n if(vm.previousMarker){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n var content = '';\r\n\r\n // Convert lat/long from cluster object to a usable MVCObject\r\n var info = new google.maps.MVCObject;\r\n info.set('position', cluster.center_);\r\n\r\n //----\r\n //Get markers\r\n var markers = cluster.getMarkers();\r\n\r\n var state_names = '';\r\n\r\n angular.forEach(markers, function(value, key) {\r\n //state_names += (value.state_name != '')? (state_names == '')?value.state_name:(' , '+value.state_name):'';\r\n state_names = (value.state_name != '')?value.state_name:'';\r\n });\r\n\r\n var count = (markers.length);\r\n\r\n vm.cursorPointer = 'cursor:pointer';\r\n //vm.cursorPointer = 'cursor:normal';\r\n /*if(vm.showWayPointDiv){\r\n vm.cursorPointer = 'cursor:pointer';\r\n }*/\r\n\r\n var content = \"<div class='gmailToolTip' style=\"+vm.cursorPointer+\";border-radius:5px;display:block' ng-click='scrollCheckptDetails(\"+markers[0].status+\",\"+markers[0].latlng+\")' >\"+\r\n \"<input type='hidden' class='status' value='\"+markers[0].status+\"' />\"+\r\n \"<input type='hidden' class='serial_no' value='\"+markers[0].serial_no+\"' />\"+\r\n \"<input type='hidden' class='latlng' value='\"+markers[0].latlng+\"' />\"+\r\n \"<span style='color:rgb(66,66,66);background-color:#DCDCDC;padding: 3px 25px 3px 25px;'> \"+state_names+\" </span>\"+\r\n //\"<h2 style='color:rgb(66,66,66);font-size: 18px;font-weight:normal;margin:0px;margin-top: 5px;'>\"+\r\n //\"<span style='font-weight:bold'>\"+count.toString()+\"</span> \"+\r\n //\"Last Check Calls</h2>\"+\r\n \"<div style='position:absolute;right:0;top:0;height:100%;width: 23px;box-sizing:border-box;padding:5px;'>\"+\r\n \"<i class='material-icons' style='position: absolute;color: #DCDCDC;top: -3px;left: -10px;font-size: 50px;' ></i>\"+\r\n \"<!--<img src='/assets/images/icons/shipment/showListView/icon-arrow-right.png' style='margin-top:4px;' />--?\"+\r\n \"</div></div>\";\r\n\r\n vm.infowindow.close();\r\n vm.infowindow.setContent(content); //set infowindow content to titles\r\n vm.infowindow.open(vm.ngmap, info);\r\n\r\n //}\r\n\r\n });\r\n\r\n //Zoom change method\r\n google.maps.event.addListener(vm.ngmap, 'zoom_changed', function() {\r\n vm.infowindow.close()\r\n });\r\n\r\n // Cluster Image Mouseover Method\r\n google.maps.event.addListener(markerCluster,'mouseover',function(){\r\n //debugger;\r\n });\r\n\r\n google.maps.event.addListener(vm.ngmap, 'click', function(){\r\n vm.infowindow.close();\r\n });\r\n\r\n };\r\n\r\n //Set Different Icons for marker\r\n $scope.createMarkerForCity = function (city,index) {\r\n\r\n var marker = new google.maps.Marker({\r\n position: new google.maps.LatLng(city.pos[0], city.pos[1]),\r\n icon: icons[city.type].icon,\r\n title: '',\r\n status: icons[city.type].status,\r\n latlng:city.pos[0].toString().replace('.','-')+city.pos[1].toString().replace('.','-'),\r\n originStatus:city.originStatus,\r\n destinationStatus:city.destinationStatus,\r\n serial_no:city.serial_no,\r\n state_name:city.state_name,\r\n isHighlight:false,\r\n map:vm.ngmap\r\n });\r\n\r\n google.maps.event.addListener(marker, 'mouseover', function () {\r\n\r\n if(!this.isHighlight){\r\n var icon_new = mouseOverIcons[this.status].icon;\r\n marker.setIcon(icon_new);\r\n }\r\n\r\n });\r\n\r\n google.maps.event.addListener(marker, 'mouseout', function () {\r\n\r\n if(!this.isHighlight){\r\n var icon_new = icons[marker.status].icon;\r\n marker.setIcon(icon_new);\r\n }\r\n\r\n });\r\n\r\n google.maps.event.addListener(marker, 'click', function () {\r\n update_highlight_image(marker.latlng);\r\n //event.cancelBubble = true;\r\n vm.infowindow.close();\r\n\r\n if(vm.showWayPointDiv){\r\n var latitude = marker.position.lat();\r\n var longitude = marker.position.lng();\r\n\r\n if(!marker.originStatus && !marker.destinationStatus && !marker.isHighlight){\r\n\r\n var image = {\r\n url: selectedMarkerIcons[marker.status].icon,\r\n size: new google.maps.Size(36, 36),\r\n origin: new google.maps.Point(0, 0),\r\n anchor: new google.maps.Point(18, 25),\r\n scaledSize: new google.maps.Size(36, 36)\r\n };\r\n\r\n marker.isHighlight = true;\r\n var icon_new = selectedMarkerIcons[marker.status].icon;\r\n marker.setIcon(image);\r\n marker.setPosition(new google.maps.LatLng(latitude, longitude));\r\n\r\n }else{\r\n marker.isHighlight = false;\r\n var icon_new = icons[marker.status].icon;\r\n marker.setIcon(icon_new);\r\n marker.setPosition(new google.maps.LatLng(latitude, longitude));\r\n }\r\n\r\n if(vm.previousMarker && (marker.position.lat() != vm.previousMarker.position.lat()) ){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n vm.previousMarker = marker;\r\n\r\n if(marker.originStatus || marker.destinationStatus || marker.isHighlight){\r\n scrollCheckptDetails(marker.status,marker.latlng);\r\n }\r\n }\r\n\r\n });\r\n\r\n return marker;\r\n }\r\n\r\n function highlight_check_call_pt_jquery(){\r\n $scope.highlight_check_call_pt = angular.element('.update_highlight_img_from_jquery').val();\r\n scrollCheckptDetails('checkpoints', angular.element('.update_highlight_img_from_jquery').val());\r\n }\r\n\r\n function update_highlight_image(latlng){\r\n $scope.highlight_check_call_pt = latlng;\r\n }\r\n\r\n function scrollCheckptDetails(name,serial_nos){\r\n\r\n var container = angular.element(document.getElementById('checkPtsDetails'));\r\n\r\n if(name == 'origin' || name == 'destination'){\r\n //scroll to top #checkPtsDetails\r\n //container.scrollTop(0, 5000);\r\n var element = angular.element(document.getElementById('location'+serial_nos));\r\n container.scrollTo(element, 0, 1000);\r\n }\r\n\r\n else{\r\n //Checkpoints [will get index number]\r\n //this.serial_no\r\n //scroll to location+serial_no (#checkPtsDetails)\r\n var element = angular.element(document.getElementById('location'+serial_nos));\r\n container.scrollTo(element, 0, 1000);\r\n }\r\n\r\n }\r\n\r\n function getReferenceNumberObject(data) {\r\n // // console.log(data);\r\n var object = {};\r\n for (var k in data) {\r\n //// console.log(data[k].referencenumber);\r\n if(!objectContainsKey(data[k].referencenumber, object)) {\r\n if((data[k].referencecode) && !object[data[k].referencecode])\r\n object[data[k].referencecode] = [];\r\n }\r\n if(object[data[k].referencecode] && (data[k].referencenumber !='N/A') && data[k].referencenumber) object[data[k].referencecode].push(data[k].referencenumber);\r\n }\r\n //// console.log(object);\r\n return object;\r\n }\r\n\r\n //checks if the key is in the object\r\n function objectContainsKey(key, object) {\r\n //// console.log(key);\r\n //// console.log(object)\r\n for (var k in object) {\r\n for(var j in object[k]){\r\n //// console.log(object[k][j] + ' '+ key);\r\n if(object[k][j] == key) return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function isEmpty(obj) {\r\n for(var prop in obj) {\r\n if(obj.hasOwnProperty(prop))\r\n return false;\r\n }\r\n return true;\r\n // return Object.keys(obj).length === 0;\r\n }\r\n\r\n function getToastPosition() {\r\n sanitizePosition();\r\n return Object.keys(vm.toastPosition)\r\n .filter(function(pos) { return vm.toastPosition[pos]; })\r\n .join(' ');\r\n }\r\n\r\n function getBarPercentage() {\r\n //get the percentage for the days reamining bar\r\n var percentage = 0;\r\n var today = new Date();\r\n var duedate = new Date(vm.data.duedate);\r\n var departdate = new Date(vm.data.departuredate);\r\n var denomDiff = duedate.getTime() - departdate.getTime();\r\n var numDiff = today.getTime() - departdate.getTime();\r\n if(numDiff > denomDiff) {\r\n percentage = 100;\r\n } else {\r\n percentage = (numDiff / denomDiff) * 100;\r\n }\r\n return percentage;\r\n }\r\n\r\n function setDaysRemaining() {\r\n var today = new Date();\r\n var duedate = new Date(vm.data.duedate);\r\n var timeDiff = duedate.getTime() - today.getTime();\r\n var diffDays = 0;\r\n if(timeDiff > 0) diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));\r\n vm.daysRemaining = diffDays;\r\n }\r\n\r\n function convertDate(date){\r\n if (date && date.length == 8 && !isNaN(date)){\r\n return date.substring(0,4)+'-'+ date.substring(4,6)+'-'+date.substring(6,8);\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n function convertTime(time){\r\n if (time && time.length == 4 && !isNaN(time)){\r\n return time.substring(0,2)+':'+time.substring(2,4);\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n function getReasonDescription(milestone) {\r\n if (!milestone.reasoncode) return '';\r\n if (milestone.reasondescription) return milestone.reasondescription;\r\n // see if we can find it in the exceptions and give that description back\r\n var desc = '';\r\n angular.forEach(vm.data.exceptions, function(e) {\r\n if (e.milestonecode == milestone.milestonecode) {\r\n desc = e.description;\r\n }\r\n });\r\n return desc;\r\n }\r\n\r\n function docDate(path){\r\n var pad = \"00\";\r\n var content = path.split(\"/\");\r\n return convertDate(content[1]+\r\n pad.substring(0,pad.length-content[2].length)+content[2]+\r\n pad.substring(0,pad.length-content[3].length)+content[3]);\r\n }\r\n\r\n function docName(path){\r\n var content = path.split(\"/\");\r\n return content[content.length-1];\r\n }\r\n\r\n function sanitizePosition() {\r\n var current = vm.toastPosition;\r\n if ( current.bottom && vm.last.top ) current.top = false;\r\n if ( current.top && vm.last.bottom ) current.bottom = false;\r\n if ( current.right && vm.last.left ) current.left = false;\r\n if ( current.left && vm.last.right ) current.right = false;\r\n vm.last = angular.extend({},current);\r\n }\r\n\r\n function showInvoice(ev, _invoice_){\r\n $log.debug(_invoice_);\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/invoices/invoice.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n locals: {\r\n invoice: _invoice_,\r\n address: vm.getShipperAddress(_invoice_),\r\n invoice_date: vm.convertDate(_invoice_.invoicedate)\r\n },\r\n controller: function DialogController($scope, $mdDialog, invoice, address, invoice_date){\r\n $scope.invoice = invoice;\r\n $scope.address = address;\r\n $scope.invoice_date = invoice_date;\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n }\r\n\r\n function getContainers(){\r\n var containers = vm.data.shipment_containers;\r\n var containerHistory = {};\r\n /* Build a container history */\r\n for (var i in containers){\r\n if (containers[i].eventtime && containers[i].eventtime.length == 4){\r\n containers[i].eventtime = vm.convertTime(containers[i].eventtime);\r\n }\r\n if (containerHistory[containers[i].contno]){\r\n containerHistory[containers[i].contno].push(containers[i]);\r\n } else {\r\n containerHistory[containers[i].contno] = [containers[i]];\r\n }\r\n }\r\n /* Reorder all the containers by descending order for their sno (serial number) value */\r\n for (var container in containerHistory){\r\n containerHistory[container] = $filter('orderBy')(containerHistory[container], '-sno');\r\n }\r\n /* Generate the list of containers */\r\n var containers2 = [];\r\n for (container in containerHistory){\r\n containers2.push(containerHistory[container][0]);\r\n }\r\n containers2.sort(function(a,b){\r\n return b.length - a.length;\r\n });\r\n containers2.reverse();\r\n /* Keep the history for details access */\r\n vm.containerHistory = containerHistory;\r\n return containers2;\r\n }\r\n\r\n function showContainerDetails(ev, container) {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/containers/container-details.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n locals: {\r\n history: vm.containerHistory[container]\r\n },\r\n controller: function DialogController($scope, $mdDialog, history){\r\n $scope.history = history;\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n }\r\n\r\n function showModal(ev, modal,data) {\r\n vm.currentMilestone = data;\r\n vm.ref_no = $stateParams.ref_num;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/shipping-details-cmts/' + modal + '.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n scope: $scope,\r\n preserveScope: true,\r\n fullscreen: useFullScreen,\r\n controller: function () {\r\n return vm;\r\n },\r\n controllerAs: 'vm'\r\n });\r\n }\r\n\r\n function showExceptionsModal(ev, list) {\r\n vm.exceptionList = list;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n scope: $scope.$new(),\r\n templateUrl: '/app/shipping-details/potential-exceptions/potential-exceptions.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n preserveScope: true,\r\n clickOutsideToClose: true,\r\n controller: 'ShipmentPotentialExceptionsController',\r\n controllerAs: 'sdpeCtrl',\r\n fullscreen: useFullScreen\r\n });\r\n }\r\n\r\n // function closeModal(event) {\r\n // if (event && event.button == 1) return; // ignore middle clicks\r\n // $mdDialog.cancel();\r\n // }\r\n\r\n $rootScope.$on('doneBookmark', function(event, data) {\r\n\r\n if(data){\r\n $rootScope.$broadcast('doneBookmark', false);\r\n doneBookmark(bookmarkType);\r\n }\r\n\r\n });\r\n\r\n function doneBookmark(type){\r\n ShippingDetailsCmtsService.getBookmarks(type).then(function(){\r\n vm.setBookmarkButton(false);\r\n\r\n angular.forEach(vm.bookmarks.load_cmts_bookmarks,function(data){\r\n ShippingDetailsCmtsService.getUserBookmarks({pro: data.pro}).then(function(res){\r\n if (res && res.load_cmts_bookmarks && res.load_cmts_bookmarks[0])\r\n {\r\n vm.setBookmarkButton(true);\r\n }\r\n })\r\n\r\n //if(data && vm.data.load_bookmarks[0] && data.id == vm.data.load_bookmarks[0].id){\r\n // vm.setBookmarkButton(true);\r\n //}\r\n });\r\n\r\n }).catch(function(err){\r\n });\r\n }\r\n\r\n function closeModal(event) {\r\n if (event && event.button == 1) return; // ignore middle clicks\r\n //doneBookmark();\r\n $mdDialog.cancel();\r\n }\r\n\r\n //links to the dashboard\r\n function jumpToDashboard() {\r\n $location.url('/');\r\n $mdDialog.cancel();\r\n }\r\n\r\n function gotoMilestome() {\r\n // set the location.hash to the id of\r\n // the element you wish to scroll to.\r\n $location.hash('milestones-area');\r\n\r\n // call $anchorScroll()\r\n $anchorScroll();\r\n }\r\n\r\n function goToReference(){\r\n $location.hash('reference-area');\r\n $anchorScroll();\r\n\r\n vm.expandInvoice = true;\r\n\r\n //UserService.setRefNumbersExpanded(true);\r\n //vm.expandedRefNumbers = UserService.refNumbersIsExpanded();\r\n }\r\n\r\n function showListViewChange(){\r\n\r\n if(vm.showListView){\r\n vm.showWayPointDiv = true;\r\n\r\n if(vm.infowindow){\r\n //vm.infowindow.close();\r\n }\r\n\r\n if(vm.previousMarker){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n }else{\r\n vm.showWayPointDiv = false;\r\n vm.showListFilter = false;\r\n\r\n //Removing Cluster Tooltip and disabling marker highlight.\r\n\r\n if(vm.infowindow){\r\n //vm.infowindow.close();\r\n }\r\n\r\n if(vm.previousMarker){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n function showListFilterChange(){\r\n vm.showListFilter = !vm.showListFilter;\r\n }\r\n\r\n function getDetailsHighlight(indexNo, latitude, longitude){\r\n\r\n //if(vm.showWayPointDiv){\r\n //$('#scrollElement').scrollTop(0);\r\n //alert(latitude);\r\n //document.getElementById('#scrollElement').scrollTo(0, 0);\r\n\r\n //var old = $location.hash();\r\n //$location.hash('locationDetDiv5');\r\n //$anchorScroll();\r\n //reset to old to keep any additional routing logic from kicking in\r\n //$location.hash(null);\r\n\r\n //}\r\n\r\n\r\n }\r\n\r\n vm.switchUser = false;\r\n if(localStorage.switchEmailCmtsType){\r\n vm.switchUser = true;\r\n }else if(localStorage.userCompanyCmts){\r\n vm.switchUser = true;\r\n }else if(localStorage.userDepartmentCmts){\r\n vm.switchUser = true;\r\n }\r\n\r\n\r\n function getComments(){\r\n\r\n var url = api.url_v2+'/shipments/'+vm.ref_num+'/shipment_comments?customer_type=cmts';\r\n\r\n if(localStorage.customerType == 'cmts'){\r\n if(localStorage.switchEmailCmtsType){\r\n url +=\"&userEmail=\"+localStorage.switchEmailCmtsType;\r\n }else if(localStorage.userCompanyCmts){\r\n url +=\"&userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts);\r\n }else if(localStorage.userDepartmentCmts){\r\n url +=\"&userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCmts)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCmts;\r\n }else if(localStorage.dummyUser){\r\n url +=\"&dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser);\r\n }\r\n }\r\n\r\n ShippingDetailsCmtsService.getDiscussionData(url).then(function(resp){\r\n\r\n vm.discussion_chat = angular.copy(resp);\r\n vm.original_discussion_chat = angular.copy(resp);\r\n\r\n }).catch(function(err) {\r\n\r\n console.log(err);\r\n\r\n });\r\n\r\n }\r\n\r\n vm.autocompletetimer = null\r\n function chatContactsAutocompleteCmts(id, searchText){\r\n //if(searchText.length > 2){\r\n vm.autocompleteData=\"\";\r\n\r\n if(searchText == \"\"){\r\n var query = {field: 'load_cmts_contacts', load_id:id, value: searchText};\r\n chatContactsListCmts(query);\r\n }\r\n if(searchText.length!=0){\r\n var query = {field: 'load_cmts_contacts', load_id:id, value: searchText};\r\n if(query.value != \"\"){\r\n if(vm.autocompletetimer)\r\n clearTimeout(vm.autocompletetimer)\r\n vm.autocompletetimer = setTimeout(function(){\r\n chatContactsListCmts(query);\r\n },500);\r\n }\r\n }else{\r\n if(vm.autocompletetimer)\r\n clearTimeout(vm.autocompletetimer)\r\n }\r\n }\r\n\r\n function chatContactsListCmts(query){\r\n\r\n $http.post(api.url_v2 + '/cmts_autocomplete', query).then(function(response){\r\n\r\n vm.company_contacts = response.data;\r\n\r\n }, function errorCallback(error){\r\n\r\n });\r\n\r\n }\r\n\r\n\r\n function chatSoket(){\r\n\r\n //shipment_commnets/#{self.shipment_id}/comments/new\r\n var url = '/shipment_comments/'+vm.ref_num+'/comments/new';\r\n\r\n try {\r\n\r\n var faye = new Faye.Client(downloadLink.url+'/faye/faye');\r\n\r\n faye.subscribe(url, function (data) {\r\n\r\n var dataComment = JSON.parse(data);\r\n\r\n var tempArray = angular.copy(vm.original_discussion_chat);\r\n\r\n /* appending */\r\n\r\n var current_date = moment().format(\"YYYY-MM-DD\");\r\n\r\n if(!dataComment.parent_id){\r\n\r\n dataComment.replies = dataComment.replies || [];\r\n\r\n if(vm.discussion_chat[current_date]){\r\n\r\n vm.discussion_chat[current_date].push(dataComment);\r\n tempArray[current_date].push(angular.copy(dataComment));\r\n\r\n }else{\r\n\r\n var new_object = new Object();\r\n\r\n //new_object[current_date] = [dataComment];\r\n vm.discussion_chat[current_date] = [dataComment];\r\n tempArray[current_date] = angular.copy([dataComment]);\r\n }\r\n\r\n }else{\r\n\r\n vm.discussion_chat = angular.forEach(vm.discussion_chat, function(chat_data,i) {\r\n\r\n angular.forEach(chat_data, function(chat_msgs,k) {\r\n\r\n if(chat_msgs.id == dataComment.parent_id){\r\n\r\n chat_msgs.replies = chat_msgs.replies || [];\r\n chat_msgs.replies.push(dataComment);\r\n\r\n tempArray[i][k].replies = tempArray[i][k].replies || [];\r\n tempArray[i][k].replies.push(angular.copy(data));\r\n\r\n }\r\n\r\n });\r\n\r\n });\r\n\r\n }\r\n\r\n vm.original_discussion_chat = angular.copy(tempArray);\r\n\r\n /*$timeout(function () {\r\n\r\n //scroll comment section.\r\n\r\n if(dataComment.parent_id){\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+dataComment.id));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_text'+dataComment.parent_id ) )[0].innerHTML=\"\";\r\n\r\n }else{\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.msg_section'+dataComment.id));\r\n\r\n container.scrollTo(scrollElement, 0, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML=\"\";\r\n\r\n }\r\n\r\n showReplyTextBox('', '');\r\n\r\n }, 200);*/\r\n\r\n\r\n });\r\n }\r\n\r\n catch(e) {\r\n console.log(\"Error loading faye.js\");\r\n }\r\n\r\n }\r\n\r\n $scope.userFilter = \"\";\r\n\r\n $scope.focusIndex = 0;\r\n\r\n $scope.keys = [];\r\n\r\n vm.comment_text_array = [];\r\n\r\n $scope.replyId = '';\r\n $scope.cursorPointerLocation = 0;\r\n\r\n\r\n\r\n function showReplyTextBox(msg_id, usr_id){\r\n\r\n $scope.replyId = msg_id;\r\n\r\n $scope.focusIndex = 0;\r\n //vm.discussion_comment_text = '';\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML = \"\";\r\n vm.tagged_users = [];\r\n $scope.cursorPointerLocation=0;\r\n\r\n $timeout(function () {\r\n\r\n angular.element('.chat_input_text'+msg_id)[0].innerHTML = '';\r\n angular.element( document.querySelector('.chatMainInput .userLists' )).addClass('hide');\r\n angular.element( document.querySelector('.chatSubInput .userLists' )).addClass('hide');\r\n\r\n angular.element('.replyTextBoxDiv').addClass(\"hide\");\r\n\r\n\r\n if(msg_id && usr_id){\r\n angular.element('.replyTextBoxDiv'+msg_id).removeClass(\"hide\");\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.replyTextBoxDiv'+msg_id));\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n }\r\n\r\n }, 100);\r\n\r\n }\r\n\r\n $scope.userSelect = function (event, index, name, parentId, email ) {\r\n\r\n //$scope.focusIndex = index;\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n var discussion_text = angular.element( document.querySelectorAll( '.chat_input_main_text' ) );\r\n\r\n if(parentId){\r\n\r\n element = document.querySelector('.chatSubInput'+parentId+' .userLists' );\r\n //var discussion_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n discussion_text = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) );\r\n vm.replyTagPopup = false;\r\n }\r\n\r\n vm.commentTagPopup = false;\r\n\r\n vm.tagged_users.push(email);\r\n\r\n angular.element( element ).addClass('hide');\r\n vm.userListOpen = false;\r\n //angular.element( element ).blur();\r\n //event.preventDefault();\r\n //discussion_text.focus();\r\n set_cursor(discussion_text[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n //event.preventDefault();\r\n var test = getPrecedingChar(discussion_text[0]);\r\n\r\n var range = window.getSelection().getRangeAt(0),\r\n content = range.extractContents(),\r\n span = document.createElement('SPAN');\r\n\r\n span.appendChild(content);\r\n var htmlContent = span.innerHTML;\r\n\r\n range.insertNode(span);\r\n\r\n\r\n\r\n var currentCursorPoint = range.startOffset;\r\n\r\n var currentLineStringsAfterCursor = range.startContainer.textContent.slice(range.startOffset,range.startContainer.textContent.length);\r\n\r\n var currentLineStringsUptoCursor = range.startContainer.textContent.slice(0,range.startOffset);\r\n\r\n var textAfterAtSymbol = currentLineStringsUptoCursor.slice(currentLineStringsUptoCursor.lastIndexOf(\"@\")+1,range.startOffset);\r\n\r\n var removeStringAftreAtSymbol = textAfterAtSymbol.length;\r\n\r\n //adjusting cursor point\r\n\r\n $scope.cursorPointerLocation = $scope.cursorPointerLocation - removeStringAftreAtSymbol;\r\n\r\n var lastAtSymbolPosition = currentLineStringsUptoCursor.lastIndexOf(\"@\")+1;\r\n\r\n var beforeAtSymbol = currentLineStringsUptoCursor.slice(0,currentLineStringsUptoCursor.lastIndexOf(\"@\")+1);\r\n var afterAtSymbol = currentLineStringsUptoCursor.slice(lastAtSymbolPosition,currentCursorPoint);\r\n\r\n afterAtSymbol = name+' ';\r\n\r\n currentLineStringsUptoCursor = beforeAtSymbol+afterAtSymbol;\r\n\r\n range.startContainer.textContent = currentLineStringsUptoCursor+currentLineStringsAfterCursor;\r\n\r\n //adjusting cursor point\r\n $scope.cursorPointerLocation = $scope.cursorPointerLocation + name.length+1;\r\n\r\n //.lastIndexOf(\"@\")+1,range.startOffset = name;\r\n\r\n //$scope.pasteHtmlAtCaret(name+' ');\r\n\r\n set_cursor(discussion_text[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n\r\n };\r\n\r\n\r\n $scope.pasteHtmlAtCaret = function(html) {\r\n\r\n var sel, range;\r\n if (window.getSelection) {\r\n // IE9 and non-IE\r\n sel = window.getSelection();\r\n if (sel.getRangeAt && sel.rangeCount) {\r\n range = sel.getRangeAt(0);\r\n range.deleteContents();\r\n\r\n // Range.createContextualFragment() would be useful here but is\r\n // non-standard and not supported in all browsers (IE9, for one)\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = html;\r\n var frag = document.createDocumentFragment(), node, lastNode;\r\n while ( (node = el.firstChild) ) {\r\n lastNode = frag.appendChild(node);\r\n }\r\n range.insertNode(frag);\r\n\r\n // Preserve the selection\r\n if (lastNode) {\r\n range = range.cloneRange();\r\n range.setStartAfter(lastNode);\r\n\r\n range.collapse(true);\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n }\r\n }\r\n } else if (document.selection && document.selection.type != \"Control\") {\r\n // IE < 9\r\n document.selection.createRange().pasteHTML(html);\r\n }\r\n }\r\n\r\n\r\n $scope.openUserTagsDiv = function(ev, msgId){\r\n\r\n if(msgId){\r\n\r\n var element = angular.element('.chat_input_text'+msgId);\r\n\r\n }else{\r\n\r\n var element = angular.element('.chat_input_main_text');\r\n\r\n }\r\n\r\n //ev.preventDefault();\r\n\r\n //element.focus();\r\n\r\n set_cursor(element[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n\r\n //$scope.checkTagWord('',msgId,appendElement);*/\r\n\r\n $scope.pasteHtmlAtCaret('@');\r\n\r\n }\r\n\r\n $scope.checkTagWord = function(ev, parentId, node){\r\n\r\n var discussion_comment_html = angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML;\r\n var discussion_comment_text = angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerText;\r\n\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n\r\n vm.discussion_text = discussion_comment_text;\r\n //console.log(\">>\", ev.keyCode, angular.element(element).hasClass('hide') )\r\n\r\n if(discussion_comment_text.trim() != \"\" || $scope.files.length > 0){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n vm.commentTagPopup = false;\r\n }\r\n\r\n if(parentId){\r\n //discussion_comment_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n discussion_comment_html = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerHTML;\r\n discussion_comment_text = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerText;\r\n element = document.querySelector('.chatSubInput'+parentId+' .userLists' );\r\n\r\n vm.discussion_text = discussion_comment_text;\r\n\r\n if(discussion_comment_text.trim() != \"\" || $scope.files.length > 0){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n vm.replyTagPopup = false;\r\n }\r\n }\r\n\r\n if(ev){\r\n //ev.stopPropagation;\r\n }\r\n\r\n\r\n if(discussion_comment_text){\r\n\r\n if(discussion_comment_text.length > 0){\r\n\r\n /*if((discussion_comment_text[discussion_comment_text.length - 1] == '@') ){\r\n vm.userListOpen = true;\r\n }*/\r\n\r\n vm.curserPointData = getPrecedingChar(ev.target);\r\n\r\n if((ev.key == 'Shift') || (ev.key == '@') ){\r\n\r\n if(vm.curserPointData[vm.curserPointData.length -1] == '@' ){\r\n vm.userListOpen = true;\r\n if(parentId){ vm.replyTagPopup = true; vm.commentTagPopup = false; }\r\n else{ vm.commentTagPopup = true; vm.replyTagPopup = false; }\r\n }\r\n\r\n }else{\r\n if(vm.curserPointData[vm.curserPointData.length - 1] == '@'){\r\n vm.userListOpen = true;\r\n if(parentId){ vm.replyTagPopup = true; vm.commentTagPopup = false; }\r\n else{ vm.commentTagPopup = true; vm.replyTagPopup = false; }\r\n }\r\n }\r\n\r\n if(vm.userListOpen && (vm.curserPointData.slice(0,vm.curserPointData.length).lastIndexOf('@') > -1) ){\r\n\r\n //if(discussion_comment_text[vm.curserPointData]){\r\n\r\n $scope.userFilter = vm.curserPointData.slice(vm.curserPointData.lastIndexOf('@') + 1, vm.curserPointData.length);\r\n\r\n if($scope.userFilter != \"\"){\r\n vm.chatContactsAutocompleteCmts(vm.data.load_id,$scope.userFilter);\r\n }\r\n\r\n if($scope.userFilter.indexOf(' ') > -1){\r\n $scope.userFilter = $scope.userFilter.replace(' ',' ');\r\n }\r\n\r\n $timeout(function () {\r\n\r\n if($scope.focusIndex > (element.getElementsByTagName('article').length - 1)){\r\n $scope.focusIndex = 0;\r\n }\r\n\r\n }, 100);\r\n\r\n if((angular.element(element).hasClass('hide')) && vm.company_contacts.length){\r\n\r\n angular.element( element ).removeClass('hide');\r\n scrollContainer(10,500);\r\n\r\n\r\n if(!parentId){\r\n var container = document.querySelector(\".chatMainInput\");\r\n }else{\r\n var container = document.querySelector(\".chatSubInput\"+parentId);\r\n }\r\n\r\n if(node){\r\n ev.target = node;\r\n }\r\n\r\n var clientX,clientY;\r\n var cursor_point_length = getCursorCoOrdinates(ev.target,'','',element);\r\n\r\n clientX = cursor_point_length.x;\r\n clientY = cursor_point_length.y;\r\n\r\n if(angular.element('.sidebar').hasClass('md-locked-open')) {\r\n\r\n element.style.left = (clientX - 260) + \"px\";\r\n\r\n if((element.offsetWidth + (clientX -260)) > container.offsetWidth ) {\r\n element.style.right = \"0px\";\r\n element.style.left = null;\r\n }else{\r\n element.style.left = (clientX - 260) + \"px\";\r\n }\r\n\r\n } else{\r\n\r\n if((element.offsetWidth + (clientX -25)) > container.offsetWidth ) {\r\n\r\n element.style.right = \"0px\";\r\n element.style.left = null;\r\n\r\n }else{\r\n element.style.left = (clientX - 25) + \"px\";\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n //}\r\n\r\n }else{\r\n\r\n $scope.userFilter = '';\r\n //$scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n\r\n }\r\n\r\n }else{\r\n $scope.userFilter = '';\r\n $scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n //angular.element('body').css('position', 'relative');\r\n }\r\n\r\n }else{\r\n $scope.userFilter = '';\r\n $scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n //angular.element('body').css('position', 'relative');\r\n }\r\n\r\n }\r\n\r\n function getPrecedingChar(element) {\r\n\r\n var precedingChar = \"\", sel, range, precedingRange;\r\n\r\n if (window.getSelection) {\r\n sel = window.getSelection();\r\n if (sel.rangeCount > 0) {\r\n range = sel.getRangeAt(0).cloneRange();\r\n range.collapse(true);\r\n range.setStart(element, 0);\r\n precedingChar = range.toString();\r\n }\r\n } else if ( (sel = document.selection) && sel.type != \"Control\") {\r\n range = sel.createRange();\r\n precedingRange = range.duplicate();\r\n precedingRange.moveToElementText(element);\r\n precedingRange.setEndPoint(\"EndToStart\", range);\r\n precedingChar = precedingRange.text;\r\n }\r\n\r\n //if(precedingChar.length > 0){\r\n\r\n $scope.cursorPointerLocation = precedingChar.length;\r\n\r\n //}\r\n\r\n return precedingChar;\r\n\r\n }\r\n\r\n $scope.setManualCrusorPoint = function(ev, className){\r\n\r\n //ev.preventDefault();\r\n var targetPt = getPrecedingChar(document.getElementsByClassName(className)[0]);\r\n vm.userListOpen = false;\r\n\r\n //set_cursor(document.getElementsByClassName(className)[0],targetPt.length,targetPt.length);\r\n //event.preventDefault();\r\n\r\n }\r\n\r\n function set_cursor(containerEl,start,end){\r\n\r\n var charIndex = 0, range = document.createRange();\r\n range.setStart(containerEl, 0);\r\n range.collapse(true);\r\n var nodeStack = [containerEl], node, foundStart = false, stop = false;\r\n\r\n while (!stop && (node = nodeStack.pop())) {\r\n if (node.nodeType == 3) {\r\n var nextCharIndex = charIndex + node.length;\r\n if (!foundStart && start >= charIndex && start <= nextCharIndex) {\r\n range.setStart(node, start - charIndex);\r\n foundStart = true;\r\n }\r\n if (foundStart && end >= charIndex && end <= nextCharIndex) {\r\n range.setEnd(node, end - charIndex);\r\n stop = true;\r\n }\r\n charIndex = nextCharIndex;\r\n } else {\r\n var i = node.childNodes.length;\r\n while (i--) {\r\n nodeStack.push(node.childNodes[i]);\r\n }\r\n }\r\n }\r\n\r\n var sel = window.getSelection();\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n\r\n }\r\n\r\n function getCursorCoOrdinates(){\r\n\r\n var sel = document.selection, range, rect;\r\n var x = 0, y = 0;\r\n if (sel) {\r\n if (sel.type != \"Control\") {\r\n range = sel.createRange();\r\n range.collapse(true);\r\n x = range.boundingLeft;\r\n y = range.boundingTop;\r\n }\r\n } else if (window.getSelection) {\r\n sel = window.getSelection();\r\n if (sel.rangeCount) {\r\n range = sel.getRangeAt(0).cloneRange();\r\n if (range.getClientRects) {\r\n range.collapse(true);\r\n if (range.getClientRects().length>0){\r\n rect = range.getClientRects()[0];\r\n x = rect.left;\r\n y = rect.top;\r\n }\r\n }\r\n // Fall back to inserting a temporary element\r\n if (x == 0 && y == 0) {\r\n var span = document.createElement(\"span\");\r\n if (span.getClientRects) {\r\n // Ensure span has dimensions and position by\r\n // adding a zero-width space character\r\n span.appendChild( document.createTextNode(\"\\u200b\") );\r\n range.insertNode(span);\r\n rect = span.getClientRects()[0];\r\n x = rect.left;\r\n y = rect.top;\r\n var spanParent = span.parentNode;\r\n spanParent.removeChild(span);\r\n\r\n // Glue any broken text nodes back together\r\n spanParent.normalize();\r\n }\r\n }\r\n }\r\n }\r\n\r\n return {'x':x,'y':y};\r\n\r\n }\r\n\r\n $scope.$on('keydown', function( msg, obj ) {\r\n\r\n //https://next.plnkr.co/edit/C6KL3JdCkhgTMCH3trZb?p=preview&preview\r\n //https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes\r\n\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n var replyMsg = false;\r\n\r\n if($scope.replyId){\r\n if(!(angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide'))){\r\n\r\n element = document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' );\r\n var replyMsg = true;\r\n\r\n }\r\n\r\n if((angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide')\r\n && obj.code.keyCode == 13 && !obj.code.shiftKey)){\r\n document.getElementById(\"replyBtn\").click();\r\n }\r\n }\r\n\r\n if(angular.element(element).hasClass('hide') && obj.code.keyCode == 8 ){\r\n vm.userListOpen = true;\r\n }\r\n else if(angular.element(element).hasClass('hide') && obj.code.keyCode == 13 && !obj.code.shiftKey){\r\n document.getElementById(\"commentBtn\").click();\r\n }\r\n else if(!angular.element(element).hasClass('hide')) {\r\n\r\n switch (obj.code.keyCode){\r\n\r\n case 8:\r\n\r\n // BACKSPACE\r\n vm.userListOpen = true;\r\n\r\n break;\r\n\r\n case 38 :\r\n\r\n //UP ARROW\r\n obj.code.preventDefault();\r\n\r\n if($scope.focusIndex == 0){\r\n\r\n $scope.focusIndex = 0;\r\n scrollContainer(10,500);\r\n }\r\n else{\r\n $scope.focusIndex--;\r\n scrollContainer(100,500);\r\n }\r\n\r\n break;\r\n\r\n case 40 :\r\n //debugger;\r\n //DOWN ARROW\r\n obj.code.preventDefault();\r\n\r\n if($scope.focusIndex == (element.getElementsByTagName('article').length - 1)){\r\n $scope.focusIndex = (element.getElementsByTagName('article').length - 1);\r\n }\r\n\r\n else{\r\n $scope.focusIndex++;\r\n }\r\n\r\n scrollContainer(10,500);\r\n\r\n break;\r\n\r\n case 27 :\r\n\r\n //ESCAPE\r\n //$scope.focusIndex = 0;\r\n //angular.element( element ).addClass('hide');\r\n //angular.element('.discussion_layout').triggerHandler('click');\r\n //vm.userListOpen = false;\r\n break;\r\n\r\n case 13 :\r\n\r\n //ENTER\r\n obj.code.preventDefault();\r\n\r\n //$scope.open( $scope.focusIndex , '');\r\n\r\n if(replyMsg){\r\n\r\n angular.element('.chatSubInput'+$scope.replyId+' .userLists .active-highlight').triggerHandler('click');\r\n angular.element( document.querySelector('.chatSubInput'+$scope.replyId+' .userLists')).addClass('hide');\r\n vm.replyTagPopup = false;\r\n\r\n }else{\r\n\r\n angular.element('.chatMainInput .userLists .active-highlight').triggerHandler('click');\r\n angular.element( document.querySelector('.chatMainInput .userLists' )).addClass('hide');\r\n vm.commentTagPopup = false;\r\n\r\n }\r\n\r\n vm.userListOpen = false;\r\n\r\n break;\r\n\r\n\r\n };\r\n\r\n\r\n $scope.$apply();\r\n\r\n }\r\n var val = window.document.querySelectorAll('.chat_input_main_text')[0].innerText\r\n if(val.trim() == \"\")\r\n window.document.querySelectorAll('.chat_input_main_text')[0].innerHTML = \"\"\r\n\r\n });\r\n\r\n function scrollContainer(fromPt, toPt){\r\n\r\n var container = angular.element(document.querySelector('.chatMainInput .userLists' ));\r\n\r\n var scrollElement = angular.element(document.querySelector('.chatMainInput .userLists .active-highlight'));\r\n\r\n if($scope.replyId){\r\n if(!(angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide'))){\r\n\r\n container = angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' ));\r\n scrollElement = angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists .active-highlight'));\r\n\r\n }\r\n }\r\n\r\n container.scrollTo(scrollElement, fromPt, toPt);\r\n\r\n }\r\n\r\n function chat_text_submit(parentId){\r\n\r\n //var discussion_comment_text = vm.discussion_comment_text;\r\n\r\n var discussion_comment_text = window.document.querySelectorAll('.chat_input_main_text')[0].innerHTML;\r\n\r\n if(parentId){\r\n //discussion_comment_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n\r\n discussion_comment_text = window.document.querySelector('.chat_input_text'+parentId).innerHTML;\r\n }\r\n\r\n if(discussion_comment_text.trim() != \"\" || ($scope.files.length > 0)){\r\n if(discussion_comment_text.length <= 2200){\r\n\r\n\r\n //Hypertext link creating\r\n\r\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\r\n\r\n //Removing the existing anchor tags\r\n discussion_comment_text = discussion_comment_text.replace(/<[^>]+>/g, '');\r\n\r\n //URLs starting with http://, https://, or ftp://\r\n replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\r\n replacedText = discussion_comment_text.replace(replacePattern1, '<a href=\"$1\" target=\"_blank\">$1</a>');\r\n\r\n //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\r\n replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\r\n replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\r\n\r\n //Change email addresses to mailto:: links.\r\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\r\n replacedText = replacedText.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\r\n\r\n\r\n var user_name = ((vm.user.first_name)?vm.user.first_name:'')+' '+((vm.user.last_name)?vm.user.last_name:'');\r\n $http({\r\n method: 'POST',\r\n url: api.url_v2 +'/shipments/'+vm.ref_num+'/shipment_comments',\r\n headers: { 'Content-Type': undefined },\r\n\r\n transformRequest: function (data) {\r\n var formData = new FormData();\r\n if(data.files && data.files.length > 0){\r\n for (var i = 0; i < data.files.length; i++) {\r\n if(data.files[i].type != \"savedFile\")\r\n formData.append(\"attachments[]\", data.files[i]);\r\n }\r\n }\r\n formData.append(\"comment_text\", replacedText);\r\n formData.append(\"user_id\", localStorage.getItem(\"user_id\"));\r\n formData.append(\"user_name\", user_name);\r\n formData.append(\"user_email\", localStorage.getItem(\"user_emailId\"));\r\n formData.append(\"parent_id\", (parentId?parentId:null));\r\n formData.append(\"tagged_users\", (vm.tagged_users?vm.tagged_users:[]));\r\n formData.append(\"shipment_type\", \"cmts\");\r\n return formData;\r\n },\r\n data: { files: $scope.files }\r\n }).\r\n success(function (data, status, headers, config) {\r\n\r\n //var tempArray = angular.copy(vm.original_discussion_chat);\r\n\r\n vm.clearChatForm();\r\n vm.discussion_comment_text = '';\r\n discussion_comment_text = \"\";\r\n\r\n /*var current_date = moment().format(\"YYYY-MM-DD\");\r\n\r\n if(!data.comment.parent_id){\r\n\r\n data.comment.replies = data.comment.replies || [];\r\n\r\n if(vm.discussion_chat[current_date]){\r\n\r\n vm.discussion_chat[current_date].push(data.comment);\r\n tempArray[current_date].push(angular.copy(data.comment));\r\n //vm.original_discussion_chat[current_date].push(data.comment);\r\n\r\n }else{\r\n\r\n var new_object = new Object();\r\n\r\n //new_object[current_date] = [data.comment];\r\n vm.discussion_chat[current_date] = [data.comment];\r\n tempArray[current_date] = angular.copy([data.comment]);\r\n //vm.original_discussion_chat[current_date] = [data.comment];\r\n }\r\n\r\n }else{\r\n\r\n var index = 0;\r\n\r\n vm.discussion_chat = angular.forEach(vm.discussion_chat, function(chat_data,i) {\r\n\r\n angular.forEach(chat_data, function(chat_msgs,k) {\r\n\r\n if(chat_msgs.id == data.comment.parent_id){\r\n\r\n chat_msgs.replies = chat_msgs.replies || [];\r\n chat_msgs.replies.push(data.comment);\r\n\r\n tempArray[i][k].replies = tempArray[i][k].replies || [];\r\n tempArray[i][k].replies.push(angular.copy(data.comment));\r\n\r\n }\r\n\r\n });\r\n\r\n index++;\r\n\r\n });\r\n\r\n }\r\n\r\n vm.original_discussion_chat = angular.copy(tempArray);*/\r\n\r\n //scroll\r\n\r\n $timeout(function () {\r\n\r\n //scroll comment section.\r\n\r\n if(parentId){\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+data.comment.id));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerHTML=\"\";\r\n\r\n }else{\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.msg_section'+data.comment.id));\r\n\r\n container.scrollTo(scrollElement, 0, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML=\"\";\r\n\r\n }\r\n\r\n showReplyTextBox('', '');\r\n\r\n }, 300);\r\n\r\n //chatSoket();\r\n }).\r\n error(function (data, status, headers, config) {\r\n //vm.clearChatForm();\r\n if(data.messages[0]) vm.chatShipmentError = data.messages[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/chat-toast.error.html');\r\n });\r\n }else{\r\n vm.chatShipmentError = \"Character string exceeds. Maximum character string allowed: 2200\"\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/chat-toast.error.html');\r\n }\r\n }\r\n }\r\n\r\n\r\n function getSuffixDate(number){\r\n\r\n number = $filter('date')(number, \"dd\");\r\n\r\n return ShippingDetailsCmtsService.getSuffixDate(number);\r\n }\r\n\r\n function reply_comment_display(msg_id,type,key,index_no){\r\n\r\n if(type == 'less'){\r\n\r\n angular.element('.expand_more'+msg_id).removeClass(\"hide\");\r\n angular.element('.expand_less'+msg_id).addClass(\"hide\");\r\n\r\n //expand_div1 sub_msg_details\r\n angular.element('.expand_div'+msg_id).addClass(\"hide\");\r\n angular.element('.sub_msg_details'+msg_id).removeClass(\"hide\");\r\n\r\n var replyCommentId = vm.discussion_chat[key][index_no].replies[vm.discussion_chat[key][index_no].replies.length-1].id;\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+replyCommentId));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n }\r\n\r\n if(type == 'more'){\r\n\r\n angular.element('.expand_more'+msg_id).addClass(\"hide\");\r\n angular.element('.expand_less'+msg_id).removeClass(\"hide\");\r\n\r\n //expand_div1 sub_msg_details\r\n angular.element('.expand_div'+msg_id).removeClass(\"hide\");\r\n angular.element('.sub_msg_details'+msg_id).addClass(\"hide\");\r\n }\r\n\r\n }\r\n\r\n function markRead(){\r\n if(!vm.markReadCheck){\r\n var cmts_discussion_count = parseInt(localStorage.getItem('cmts_discussion_count'));\r\n ShippingDetailsCmtsService.markAsRead().then(function(res){\r\n if(res.status == 200){\r\n var count = cmts_discussion_count - vm.unseen_discussion_count;\r\n vm.markReadCheck = true;\r\n localStorage.setItem('cmts_discussion_count',count);\r\n vm.unseen_discussion_count = 0;\r\n }\r\n }).catch(function(err) {\r\n });\r\n }\r\n }\r\n\r\n $(window).scroll(function() {\r\n var hT = $('#reference-area').offset().top,\r\n hH = $('#reference-area').outerHeight(),\r\n wH = $(window).height(),\r\n wS = $(this).scrollTop();\r\n //console.log((hT-wH) , wS);\r\n if (wS > (hT+hH-wH)){\r\n if(!vm.markReadCheck){\r\n var cmts_discussion_count = parseInt(localStorage.getItem('cmts_discussion_count'));\r\n ShippingDetailsCmtsService.markAsRead().then(function(res){\r\n if(res.status == 200){\r\n var count = cmts_discussion_count - vm.unseen_discussion_count;\r\n vm.markReadCheck = true;\r\n localStorage.setItem('cmts_discussion_count',count);\r\n vm.unseen_discussion_count = 0;\r\n }\r\n }).catch(function(err) {\r\n });\r\n }\r\n }\r\n });\r\n\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.calcArc\r\n * @description calculates the longitude and latitude from the addresses\r\n * @param {source_addr} - the source address\r\n * @param {destination_addr} - the destination address\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getLatLong\r\n * @description gets the longitude and latitude from the google api\r\n * @param {address} - the address to get the longitude and latitude for\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.bookmarkShipment\r\n * @description gets the bookmarked shipments from the database\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getNumBookedShipments\r\n * @description returns the number of bookmarked shipments\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getShipment\r\n * @description returns a shipments details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getArc\r\n * @description returns the arc variable\r\n */\r\n\r\n (function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .service('ShippingDetailsCfsService', ShippingDetailsCfsService);\r\n\r\n /** @ngInject */\r\n ShippingDetailsCfsService.$inject = ['$http', '$log', 'api', '$window', '$q'];\r\n function ShippingDetailsCfsService($http, $log, api, $window, $q) {\r\n var shipment,\r\n shipment_summary,\r\n arc = [], pins = [],\r\n cachedBookmarks = false,\r\n check_calls=false;\r\n\r\n function calcArc(source_addr, destination_addr){\r\n getLatLong(source_addr).then(function(source){\r\n getLatLong(destination_addr).then(function (destination){\r\n arc.push([{origin: source, destination: destination}]);\r\n });});\r\n }\r\n\r\n function getLatLong(address){\r\n var url = 'https://maps.googleapis.com/maps/api/geocode/json?address='+address;\r\n var promise = $http.get(url).then(function(res){\r\n $log.debug(res);\r\n return res.data.results[0].geometry.location;\r\n });\r\n return promise;\r\n }\r\n\r\n return {\r\n getBookmarks: function(type){\r\n\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'cfs'){\r\n\r\n if(localStorage.switchEmailCfsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCfsType+\"&customer_type=\"+localStorage.customerType+\"&bookmark_type=\"+type;\r\n }else if(localStorage.userCompanyCfs){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs)+\"&customer_type=\"+localStorage.customerType+\"&bookmark_type=\"+type;\r\n }\r\n }else{\r\n params +=\"?customer_type=cfs&bookmark_type=\"+type;\r\n }\r\n\r\n\r\n var url = '/load_bookmarks'+params;\r\n var promise = $http.get(api.url_v2+url).then(function(res){\r\n cachedBookmarks = res.data;\r\n return res.data;\r\n });\r\n return promise;\r\n },\r\n getUserBookmarks: function(quer){\r\n var params = \"\";\r\n angular.forEach(quer, function(val, key) {\r\n params += \"&\" + key + \"=\" + val\r\n });\r\n\r\n var url = '/load_bookmarks?customer_type=cfs'+params;\r\n var promise = $http.get(api.url_v2+url).then(function(res){\r\n cachedBookmarks = res.data;\r\n return res.data;\r\n });\r\n return promise;\r\n },\r\n getStatusColors: function(){\r\n\r\n var status_colors = {\r\n\r\n 'PLANNED':{'color-code':'#30C268','icon':'','hover_icon':''},\r\n 'PICKUP':{'color-code':'#30C268','icon':'/assets/images/icons/covered.png','hover_icon':'/assets/images/icons/hover/covered.png'},\r\n 'LOADED':{'color-code':'#30C268','icon':'/assets/images/icons/dispatched.png','hover_icon':'/assets/images/icons/hover/dispatched.png'},\r\n 'CONSIGNEE':{'color-code':'#30C268','icon':'/assets/images/icons/pickup.png','hover_icon':'/assets/images/icons/hover/pickup.png'},\r\n 'UNDELIVERED':{'color-code':'#30C268','icon':'/assets/images/icons/loaded.png','hover_icon':'/assets/images/icons/hover/loaded.png'},\r\n 'DELIVERED':{'color-code':'#5E6163','icon':'/assets/images/icons/delivered.png','hover_icon':'/assets/images/icons/hover/delivered.png'}\r\n\r\n };\r\n\r\n return status_colors;\r\n\r\n },\r\n getCheckCalls: function(url){\r\n /*var params = \"\";\r\n angular.forEach(quer, function(val, key) {\r\n params += \"?\" + key + \"=\" + val\r\n });*/\r\n\r\n var url = '/check_calls_cfs?'+url;\r\n var promise = $http.get(api.url_v2+url).then(function(res1){\r\n\r\n check_calls = res1.data.check_calls;\r\n\r\n return check_calls;\r\n });\r\n return promise;\r\n\r\n },\r\n hasCachedBookmarks: function() {\r\n return !!cachedBookmarks;\r\n },\r\n getCachedBookmarks: function() {\r\n return cachedBookmarks;\r\n },\r\n bookmarkShipment: function(type){\r\n var url = '/load_bookmarks';\r\n var promise = $http.post(api.url_v2 + url, {pro:shipment.pro, bookmark_type: type, customer_type: 'cfs'}).then(function(res){\r\n if(res.data.bookmark_type == 'normal') { shipment.bookmark_id = res.data.id; }\r\n if(res.data.bookmark_type == 'discussion') { shipment.discussion_bookmark_id = res.data.id; }\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n bookmarkNotification: function(uid){\r\n var type = 'cfs';\r\n var url = '/shipments/'+shipment.pro+'/user_shipment_discussions/create_discussion';\r\n var promise = $http.put(api.url_v2+url, {user_id: uid, active: true, shipment_type: type}).then(function(res){\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n unBookmarkNotification: function(uid){\r\n var type = 'cfs';\r\n var url = '/shipments/'+shipment.pro+'/user_shipment_discussions/create_discussion';\r\n var promise = $http.put(api.url_v2+url, {user_id: uid, active: false, shipment_type: type}).then(function(res){\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n markAsRead: function(){\r\n var type = 'cfs';\r\n var url = '/shipments/'+shipment.pro+'/shipment_comments/mark_as_read';\r\n var promise = $http.put(api.url_v2+url, {shipment_type: type}).then(function(res){\r\n return res;\r\n });\r\n return promise;\r\n },\r\n unBookmarkShipment: function(type){\r\n var url = '/load_bookmarks/' + shipment.pro+\"?bookmark_type=\"+type+\"&customer_type=cfs\";\r\n var promise = $http.delete(api.url_v2+url).then(function(res){\r\n if (res.data.bookmark.pro == shipment.pro){\r\n shipment.bookmark_id = 0;\r\n }\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n unBookmarkShipmentDiscussion: function(type){\r\n var url = '/load_bookmarks/' + shipment.pro+\"?bookmark_type=\"+type+\"&customer_type=cfs\";\r\n var promise = $http.delete(api.url_v2+url).then(function(res){\r\n if (res.data.bookmark.pro == shipment.pro){\r\n shipment.discussion_bookmark_id = 0;\r\n }\r\n return shipment;\r\n });\r\n return promise;\r\n\r\n },\r\n unBookmarkId: function(pro,type){\r\n var url = '/load_bookmarks/' + pro+\"?bookmark_type=\"+type+\"&customer_type=cfs\";\r\n\r\n var promise = $http.delete(api.url_v2+url).then(function(res){\r\n\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n getShipment: function(ref_num){\r\n\r\n var params = \"\";\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'cfs'){\r\n\r\n if(localStorage.switchEmailCfsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCfsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCfs){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=cfs\";\r\n }\r\n\r\n var promise = $http.get(api.url+'/shipments/'+ref_num+params).then(function(res){\r\n shipment = res.data;\r\n shipment.pro = shipment.pro.toString();\r\n $log.debug(shipment);\r\n //calcArc(shipment.shippercity, shipment.destination);\r\n // debugger;\r\n arc.length = 0;\r\n arc.push({ origin: {\r\n name: shipment.origincity,\r\n // latitude: shipment.geocodes.origin_lat,\r\n // longitude: shipment.geocodes.origin_lng,\r\n },\r\n destination: {\r\n name: shipment.destinationcity,\r\n // latitude: shipment.geocodes.dest_lat,\r\n // longitude: shipment.geocodes.dest_lng,\r\n },\r\n options: {\r\n strokeWidth: 3,\r\n strokeColor: 'rgba(133, 217, 164, 1)',\r\n greatArc: false,\r\n arcSharpness: 0.25\r\n }\r\n });\r\n arc.map(function(d){\r\n var origin = d.origin;\r\n origin.radius = 5;\r\n origin.fillKey = 'bubble';\r\n var dest = d.destination;\r\n dest.radius = 5;\r\n dest.fillKey = 'bubble';\r\n pins.push(origin);\r\n pins.push(dest);\r\n });\r\n shipment_summary = [ //summary used in contact message\r\n {display: 'SHIPPINGDETAILS.CUSTOMER_NAME', text: 'Customer Name', value: shipment.customername},\r\n {display: 'SHIPPINGDETAILS.SHIP_DATE', text: 'Ship Date', value: shipment.shipdate},\r\n {display: 'SHIPPINGDETAILS.DUE_DATE', text: 'Due Date', value: shipment.duedate},\r\n {display: 'SHIPPINGDETAILS.ORIGIN', text: 'Origin', value: shipment.origin},\r\n {display: 'SHIPPINGDETAILS.DESTINATION', text: 'Destination', value: shipment.destination},\r\n {display: 'SHIPPINGDETAILS.AWB', text: 'AWB', value: shipment.awb}\r\n //{display: 'SHIPPINGDETAILS.INVOICE_NUM', value: shipment.shipment_invoices[0].invoicenumber}\r\n ];\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n\r\n getInvoice:function(ref_num){\r\n\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'cfs'){\r\n\r\n if(localStorage.switchEmailCfsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCfsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCfs){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=cfs\";\r\n }\r\n\r\n\r\n var promise = $http.get(api.url_v2+'/invoices_cfs/'+ref_num+params).then(function(res){\r\n return res.data;\r\n });\r\n\r\n return promise;\r\n\r\n },\r\n\r\n getLineCharges:function(ref_num){\r\n //cfs/milestones\r\n var promise = $http.get(api.url_v2+'/invoices_cfs/'+ref_num+'/line_charges').then(function(res){\r\n return res.data;\r\n });\r\n\r\n return promise;\r\n },\r\n\r\n getMilestone:function(ref_num){\r\n var params = \"\";\r\n if(localStorage.customerType == 'cfs'){\r\n\r\n if(localStorage.switchEmailCfsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCfsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCfs){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=cfs\";\r\n }\r\n //cfs/milestones\r\n var promise = $http.get(api.url_v2+'/cfs/milestones'+ params +'&pro_number='+ref_num).then(function(res){\r\n return res.data;\r\n });\r\n\r\n return promise;\r\n },\r\n\r\n getShipmentSummary: function() { //summary used for contact message\r\n return shipment_summary;\r\n },\r\n getShipmentVariable: function() { //used for contact message\r\n return shipment;\r\n },\r\n getArc: function(){\r\n return arc;\r\n },\r\n resetArc: function(){\r\n arc.length = 0;\r\n },\r\n getPins: function(){\r\n return pins;\r\n },\r\n resetPins: function(){\r\n pins.length = 0;\r\n },\r\n getShipmentPro: function(){\r\n if(typeof(shipment) != 'undefined'){\r\n return shipment.pro;\r\n }else{\r\n return 'no';\r\n }\r\n },\r\n\r\n getLoad: function(ref_num) {\r\n\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if(localStorage.customerType == 'cfs'){\r\n\r\n if(localStorage.switchEmailCfsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCfsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCfs){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=cfs\";\r\n }\r\n\r\n var promise = $http.get(api.url_v2+'/cfs/loads/'+ref_num+params).then(function(res){\r\n\r\n shipment = res.data;\r\n shipment.pro = shipment.pro.toString();\r\n\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n\r\n downloadDocument: function(id,pro,filename){\r\n var url = \"/cfs/loads/\" + pro + \"/download_cfs_document?document_id=\"+id+\"&filename=\"+filename;\r\n $http.get(api.url_v2+url,{responseType: 'blob'}).then(function(res){\r\n var a = document.createElement(\"a\");\r\n document.body.appendChild(a);\r\n a.style = \"display: none\";\r\n var blob = new Blob([res.data], {type: \"application/pdf\"}),\r\n url = window.URL.createObjectURL(blob);\r\n a.href = url;\r\n a.download = filename;\r\n a.click();\r\n });\r\n },\r\n\r\n chunkArray: function(myArray, chunk_size){\r\n\r\n var index = 0;\r\n var arrayLength = myArray.length;\r\n var tempArray = [];\r\n var myChunk;\r\n\r\n for (index = 0; index < arrayLength; index += chunk_size) {\r\n myChunk = myArray.slice(index, index+chunk_size);\r\n // Do something if you want with the group\r\n tempArray.push(myChunk);\r\n }\r\n\r\n return tempArray;\r\n\r\n },\r\n saveDiscussionText: function(id,query,url){\r\n\r\n var dfd = $q.defer();\r\n //var dfd = $q.defer();\r\n $http.post(url,query).then(function(response){\r\n\r\n dfd.resolve(response.data);\r\n\r\n }, function errorCallback(error){\r\n\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n },\r\n getDiscussionData: function(url){\r\n\r\n var dfd = $q.defer();\r\n\r\n $http.get(url).then(function(response){\r\n\r\n dfd.resolve(response.data);\r\n\r\n }, function errorCallback(error){\r\n\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n\r\n },\r\n\r\n getSuffixDate: function(number){\r\n\r\n if (isNaN(number) || number < 1){\r\n return '';\r\n } else if (number % 100 == 11 || number % 100 == 12) {\r\n return 'th';\r\n } else {\r\n var lastDigit = number % 10;\r\n if (lastDigit === 1) {\r\n return 'st';\r\n } else if (lastDigit === 2) {\r\n return 'nd';\r\n } else if (lastDigit === 3) {\r\n return 'rd';\r\n } else if (lastDigit > 3) {\r\n return 'th';\r\n }\r\n }\r\n\r\n }\r\n\r\n };\r\n\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getShipment\r\n * @description calls the getShipment function from ShippingDetailsCfsService and returns the shipping details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.docDate\r\n * @description returns the date of the document\r\n * @param {path} - the path to the document\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.bookmarkShipment\r\n * @description bookmarks the current shipment.\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.convertDate\r\n * @description converts dates to have dashes in it\r\n * @param {date} - the date that is being converted\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.convertTime\r\n * @description converts the time to have a colon in the middle\r\n * @param {time} - the time to be converted\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getReasonDescription\r\n * @description Gets a Reason Description for a milestone based on the milestone\r\n * itself, or an exception\r\n * @param {object} - the milestone\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.docName\r\n * @description returns the name of the document\r\n * @param {path} - the path of the document\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getInvoiceAddress\r\n * @description returns a list of the consignee address\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getToastPosition\r\n * @description returns the toast position (toast is a notification)\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getBarPercentage\r\n * @description gets the perecentage of days since shipper date divided by the total shipping period. percentage is used for the bar visualization\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.setDaysRemaining\r\n * @description sets days reamining based on the duedate and current date\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.sanitizePosition\r\n * @description sets the last position\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showBookmarkToast\r\n * @description shows the toast for a bookmark (toast is a notification)\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showContainerDetails\r\n * @description shows the container details modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showDocumentModal\r\n * @description shows the modal for document details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.closeDocumentModal\r\n * @description closes the modal for document details\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .filter('unique', function() {\r\n return function(collection, keyname) {\r\n var output = [],\r\n keys = [];\r\n angular.forEach(collection, function(item) {\r\n var key = item[keyname];\r\n if(keys.indexOf(key) === -1) {\r\n keys.push(key);\r\n output.push(item);\r\n }\r\n });\r\n return output;\r\n };\r\n })\r\n .directive('scrollToBottomCfs', function($timeout, $window) {\r\n return {\r\n scope: {\r\n scrollToBottomCfs: \"=\"\r\n },\r\n restrict: 'A',\r\n link: function(scope, element, attr) {\r\n scope.$watchCollection('scrollToBottomCfs', function(newVal) {\r\n if (newVal) {\r\n $timeout(function() {\r\n element[0].scrollTop = element[0].scrollHeight;\r\n }, 0);\r\n }\r\n\r\n });\r\n }\r\n };\r\n })\r\n // .directive('shipmentDiscussionChatKeyPress', function() {\r\n // return function( scope, elem ) {\r\n\r\n // elem.bind('keydown', function( event ) {\r\n // if(event.keyCode == 13 && !event.shiftKey){\r\n // scope.$broadcast('keydown', { code: event } );\r\n // return false;\r\n // }\r\n // else if(event.keyCode == 38 || event.keyCode == 40 || event.keyCode == 27 || event.keyCode == 13 || event.keyCode == 8){\r\n // scope.$broadcast('keydown', { code: event } );\r\n // }\r\n\r\n // });\r\n\r\n // elem.bind('click', function(event){\r\n\r\n // scope.focusIndex = 0;\r\n // angular.element('.chatMainInput .userLists').addClass(\"hide\");\r\n // angular.element('.chatSubInput .userLists').addClass(\"hide\");\r\n\r\n // });\r\n\r\n // };\r\n // })\r\n .directive( 'checkCallsHeight', function( $parse ) {\r\n return {\r\n restrict: 'A',\r\n link: function( $scope, elem, attrs ) {\r\n elem.ready(function(){\r\n\r\n $scope.verticalLineHeight = 0;\r\n\r\n $scope.$watch('reCalVerticalGreenLine',function(){\r\n //$scope.$apply(function(){\r\n\r\n\r\n var height = 0;\r\n var checkCallsCount = $scope.checkCallsCount;\r\n\r\n if(checkCallsCount > 0){\r\n\r\n var element = angular.element(document.querySelector('.location10000'));\r\n height = parseInt(height) + parseInt((element[0].offsetHeight)/2);\r\n\r\n for(var i=0; i<checkCallsCount; i++){\r\n\r\n var element = angular.element(document.querySelector('.location'+i));\r\n // Height in px\r\n height = parseInt(element[0].offsetHeight) + parseInt(height);\r\n\r\n }\r\n\r\n // adding margin-bottom height\r\n height = height + (10 * checkCallsCount) + 10;\r\n\r\n // Removing the 50% height in the last div\r\n\r\n var element = angular.element(document.querySelector('.location'+(checkCallsCount - 1)));\r\n var heightDeduct = parseInt((element[0].offsetHeight)/2);\r\n\r\n //var element = angular.element(document.querySelector('#location'+(checkCallsCount - 1)));\r\n //var heightDeduct = parseInt((element[0].offsetHeight)/2);\r\n\r\n height = height - heightDeduct;\r\n\r\n // adjustment\r\n height = height - 10;\r\n\r\n }\r\n\r\n $scope.verticalLineHeight = height;\r\n\r\n })\r\n })\r\n }\r\n }\r\n })\r\n .directive('scrollToTop', function() {\r\n return {\r\n restrict: 'A',\r\n link: function(scope, elem, attr) {\r\n elem.ready(function(){\r\n elem[0].scrollTop = 200;\r\n })\r\n\r\n }\r\n };\r\n })\r\n .animation('.slide', function() {\r\n var NG_HIDE_CLASS = 'ng-hide';\r\n return {\r\n beforeAddClass: function(element, className, done) {\r\n if(className === NG_HIDE_CLASS) {\r\n element.slideUp(done);\r\n }\r\n },\r\n removeClass: function(element, className, done) {\r\n if(className === NG_HIDE_CLASS) {\r\n element.hide().slideDown(done);\r\n }\r\n }\r\n }\r\n })\r\n .filter('userTagHighlight', function() {\r\n return function(input,names) {\r\n\r\n angular.forEach(names, function(value, key){\r\n\r\n if((input.search('@'+value.full_name) > -1) && (input.search(\"<span class='user_name_highlight'>\"+'@'+value.full_name+\"</span>\") < 0) ){\r\n // to highlight tagged user names in chat comments\r\n input = input.replace('@'+value.full_name, \"<span class='user_name_highlight'>\"+'@'+value.full_name+\"</span>\");\r\n\r\n }\r\n\r\n });\r\n\r\n //Hypertext link creating\r\n\r\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\r\n\r\n // //URLs starting with http://, https://, or ftp://\r\n // replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\r\n // replacedText = input.replace(replacePattern1, '<a href=\"$1\" target=\"_blank\">$1</a>');\r\n\r\n // //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\r\n // replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\r\n // replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\r\n\r\n //Change email addresses to mailto:: links.\r\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\r\n replacedText = input.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\r\n\r\n return replacedText;\r\n };\r\n\r\n })\r\n .controller('ShippingDetailsCfsController', ShippingDetailsCfsController)\r\n .controller('ToastCtrl', function($scope, $mdToast){\r\n $scope.closeToast = function(){ $mdToast.hide();};\r\n });\r\n\r\n /** @ngInject */\r\n ShippingDetailsCfsController.$inject = ['NgMap', '$http', '$sce', '$mdpTimePicker', '$window', '$document', '$stateParams', '$location', '$anchorScroll', 'ShippingDetailsCfsService', 'UserService', '$log', '$translatePartialLoader', '$mdDialog', '$mdMedia', '$scope', '$rootScope', '$mdToast', '$timeout', 'NgTableParams', '$filter', 'ContactsService', 'permissions', 'mdSelectHelper', 'api', 'downloadLink', 'google_api_url'];\r\n function ShippingDetailsCfsController(NgMap, $http, $sce, $mdpTimePicker, $window, $document, $stateParams, $location, $anchorScroll, ShippingDetailsCfsService, UserService, $log, $translatePartialLoader, $mdDialog, $mdMedia, $scope, $rootScope, $mdToast, $timeout, NgTableParams, $filter, ContactsService, permissions, mdSelectHelper, api, downloadLink, google_api_url) {\r\n\r\n var vm = this;\r\n\r\n /*NgMap.getMap({id: 'aljex_shipping_map'}).then(function(map) {\r\n\r\n\r\n });*/\r\n\r\n //https://developers.google.com/maps/documentation/javascript/styling\r\n\r\n vm.mapStyle = [\r\n\r\n { \"featureType\":\"all\", \"elementType\":\"all\", \"stylers\":[ { \"invert_lightness\":true },{ \"saturation\":10 }, { \"lightness\":30 }, { \"gamma\":0.5 }, { \"hue\":\"#435158\"}]},\r\n { \"featureType\":\"administrative\", \"elementType\":\"all\", \"stylers\":[ { \"color\":\"#89c0eb\" }, { \"visibility\":\"on\" }]},\r\n { \"featureType\":\"administrative\", \"elementType\":\"geometry.stroke\", \"stylers\":[ { \"gamma\":\"0.97\" } ] },\r\n { \"featureType\":\"administrative\", \"elementType\":\"labels.text.fill\", \"stylers\":[ { \"lightness\":\"16\" }, { \"saturation\":\"-100\" } ] },\r\n { \"featureType\":\"administrative\", \"elementType\":\"labels.text.stroke\", \"stylers\":[ { \"gamma\":\"0.00\" } ] },\r\n { \"featureType\":\"administrative.locality\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"on\" } ] },\r\n { \"featureType\":\"administrative.land_parcel\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"off\" } ] },\r\n { \"featureType\":\"landscape\", \"elementType\":\"all\", \"stylers\":[ { \"color\":\"#404e5a\" }, { \"visibility\":\"on\" } ] },\r\n { \"featureType\":\"landscape.man_made\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"off\" } ] },\r\n { \"featureType\":\"poi\", \"elementType\":\"all\", \"stylers\":[ { \"visibility\":\"off\" } ] },\r\n { \"featureType\":\"road\", \"elementType\":\"geometry.fill\", \"stylers\":[ { \"lightness\":\"-100\" } ] },\r\n { \"featureType\":\"road\", \"elementType\":\"geometry.stroke\", \"stylers\":[ { \"lightness\":\"-4\" }, { \"gamma\":\"1.21\" } ] },\r\n { \"featureType\":\"water\", \"elementType\":\"geometry.fill\", \"stylers\":[ { \"color\":\"#080e27\" } ] }\r\n\r\n ];\r\n\r\n vm.way1 = [{ location: { lat: 12.5644, lng: 76.7337 }, stopover: true }, { location: { lat: 12.4929, lng: 76.6643 }, stopover: true }];\r\n vm.way2 = [{ location: { lat: 34.5199973, lng: -115.5127662 }, stopover: true,\"originStatus\":false,\"destinationStatus\":false },{ location: { lat: 42.8080616, lng: -89.1276138 }, stopover: true,originStatus:false,destinationStatus:false }];\r\n\r\n /* Variables */\r\n\r\n vm.data = {};\r\n vm.downloadlink = downloadLink.url;\r\n vm.referenceNumberObject = {};\r\n vm.bookmarkType = 'normal';\r\n vm.doneBookmark = doneBookmark;\r\n vm.isReferenceNumbers = false;\r\n vm.containerHistory = {};\r\n vm.data.potential_exceptions = {};\r\n vm.ref_num = $stateParams.ref_num;\r\n vm.isBookmarked = false;\r\n vm.isBookmarkedDiscussion = false;\r\n vm.isBookmarkedNotification = false;\r\n vm.isAttachmentsNotification = false;\r\n vm.isBookmarking = false;\r\n vm.isBookmarkingDiscussion = false;\r\n vm.bookmarks = {};\r\n vm.bookmarksCount = 0;\r\n vm.bookmarksCount1 = 0;\r\n vm.bookmarkButtonText = '';\r\n vm.bookmarkButtonTextDiscussion = '';\r\n vm.googleMapsUrl = google_api_url;\r\n vm.barPercentage = 0;\r\n vm.daysRemaining = 0;\r\n vm.exceptionList = true;\r\n vm.isLoading = false;\r\n vm.show_class_access = (localStorage.getItem(\"show_cfs_class\") == 'true')? true : false;\r\n $log.debug($stateParams);\r\n vm.last = {\r\n bottom: false,\r\n top: true,\r\n left: false,\r\n right: true\r\n };\r\n vm.toastPosition = angular.extend({}, vm.last);\r\n vm.user = UserService.getUserData();\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n // TODO - Rig these up to store permanently to userservice\r\n vm.expandedInvoices = UserService.invoicesIsExpanded();\r\n vm.expandedShippingDetails = UserService.shippingDetailsIsExpanded();\r\n vm.expandedRefNumbers = UserService.refNumbersIsExpanded();\r\n\r\n if(vm.user.permissions.cfs){\r\n vm.hasFinancialPermissions = (getPermissionsValue(vm.user.permissions, 'cfs').hasOwnProperty('Shipment'))? vm.user.permissions.cfs.Shipment.includes('financial') :false;\r\n }else{\r\n vm.hasFinancialPermissions = false;\r\n }\r\n //vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n vm.isFinancialPermission = isFinancialPermission;\r\n vm.getDocumentsCount = getDocumentsCount;\r\n vm.tagged_users = [];\r\n\r\n vm.setInvoicesExpanded = function() {\r\n UserService.setInvoicesExpanded(vm.expandedInvoices);\r\n };\r\n\r\n vm.setShippingDetailsExpanded = function() {\r\n UserService.setShippingDetailsExpanded(vm.expandedShippingDetails);\r\n };\r\n\r\n vm.setRefNumbersExpanded = function() {\r\n UserService.setRefNumbersExpanded(vm.expandedRefNumbers);\r\n };\r\n\r\n vm.is_consignee_user = UserService.check_consignee_user();\r\n\r\n /*\r\n * Redirect the user to track and trace if no id was provided\r\n * TODO - Should we vocally fail?\r\n **/\r\n if (!$stateParams.ref_num){\r\n $location.path('track-trace-cfs');\r\n }\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('shipment');\r\n $translatePartialLoader.addPart('shippingdetails');\r\n $translatePartialLoader.addPart('admin'); //used for potential exceptions\r\n\r\n /* Functions */\r\n vm.bookmarkShipment = bookmarkShipment;\r\n vm.bookmarkShipmentDiscussion = bookmarkShipmentDiscussion;\r\n vm.calcInvoiceTotal = calcInvoiceTotal;\r\n vm.closeModal = closeModal;\r\n vm.convertDate = convertDate;\r\n vm.convertTime = convertTime;\r\n vm.getReasonDescription = getReasonDescription;\r\n vm.docDate = docDate;\r\n vm.docName = docName;\r\n vm.getBarPercentage = getBarPercentage;\r\n vm.getBookmarks = getBookmarks('normal');\r\n vm.getConsigneeAddress = getConsigneeAddress;\r\n vm.getShipperAddress = getShipperAddress;\r\n vm.getShipment = getShipment;\r\n vm.getMilestone = getMilestone;\r\n vm.getStatusColors = getStatusColors;\r\n vm.getCheckCalls = getCheckCalls;\r\n vm.getInvoice = getInvoice;\r\n vm.getContainers = getContainers;\r\n vm.getToastPosition = getToastPosition;\r\n vm.sanitizePosition = sanitizePosition;\r\n vm.setBookmarkButton = setBookmarkButton;\r\n vm.setBookmarkButtonDiscussion = setBookmarkButtonDiscussion;\r\n vm.setBookmarkButtonNotification = setBookmarkButtonNotification;\r\n vm.setDaysRemaining = setDaysRemaining;\r\n vm.showBookmarkToastWithUrl = showBookmarkToastWithUrl;\r\n vm.showContainerDetails = showContainerDetails;\r\n vm.showModal = showModal;\r\n vm.showExceptionsModal = showExceptionsModal;\r\n vm.showInvoice = showInvoice;\r\n vm.jumpToDashboard = jumpToDashboard;\r\n vm.isEmpty = isEmpty;\r\n vm.progressStatusText = \"\";\r\n vm.gotoMilestome = gotoMilestome;\r\n vm.goToReference = goToReference;\r\n\r\n vm.showWayPointDiv = false;\r\n vm.showListFilter = false;\r\n vm.showListViewChange = showListViewChange;\r\n vm.showListFilterChange = showListFilterChange;\r\n vm.getDetailsHighlight = getDetailsHighlight;\r\n vm.previousMarker;\r\n vm.downloadDocument = downloadDocument;\r\n\r\n vm.check_calls_filter = check_calls_filter;\r\n vm.filter_requested_data = new Object();\r\n\r\n $scope.checkCallsCount = 0;\r\n $scope.verticalLineHeight = 0;\r\n $scope.reCalVerticalGreenLine = false;\r\n vm.verticalGreenLine = verticalGreenLine;\r\n $scope.highlight_check_call_pt = 'dummy';\r\n vm.highlight_check_call_pt_jquery = highlight_check_call_pt_jquery;\r\n\r\n /* Using Angular Material Table Data */\r\n vm.selected = [];\r\n ShippingDetailsCfsService.resetArc();\r\n ShippingDetailsCfsService.resetPins();\r\n\r\n vm.getShipment($stateParams.ref_num);\r\n vm.getInvoice($stateParams.ref_num);\r\n vm.getMilestone($stateParams.ref_num);\r\n vm.getStatusColors();\r\n\r\n vm.invoiceDetails = {};\r\n vm.invoiceLineCharges = {};\r\n vm.shipment_milestones = {};\r\n\r\n vm.expandInvoice = false;\r\n\r\n //discussion\r\n //vm.checkTagWord = checkTagWord;\r\n vm.userListOpen = false;\r\n vm.searchDiscussionNew = false;\r\n vm.searchDiscussionOld = true;\r\n vm.findText = \"\";\r\n vm.findData = findData;\r\n vm.cancelFindData = cancelFindData;\r\n vm.sendNotification = sendNotification;\r\n vm.chat_text_submit = chat_text_submit;\r\n vm.discussion_chat = new Object();\r\n vm.chatSoket = chatSoket;\r\n vm.getSuffixDate = getSuffixDate;\r\n vm.showReplyTextBox = showReplyTextBox;\r\n vm.discussion_comment_text = '';\r\n vm.removeFile = removeFile;\r\n vm.attachments = [];\r\n vm.clearChatForm = clearChatForm;\r\n vm.user_id = localStorage.getItem(\"user_id\");\r\n vm.findAttachmentComments = findAttachmentComments;\r\n vm.company_contacts = [];\r\n $scope.files = [];\r\n vm.unseen_discussion_count = \"\";\r\n\r\n vm.reply_comment_display = reply_comment_display;\r\n vm.markRead = markRead;\r\n vm.markReadCheck = true;\r\n vm.file_size_array = new Object();\r\n vm.discussion_file_format = ['jpg', 'jpeg', 'gif', 'png', 'pdf', 'doc', 'docx', 'csv', 'xlsx', 'txt', 'xls'];\r\n vm.discussion_file_format1 = ['jpg', 'jpeg', 'gif', 'png', 'pdf', 'doc', 'docx', 'csv', 'xlsx', 'txt', 'xls',\r\n 'vnd.openxmlformats-officedocument.spreadsheetml.sheet','vnd.ms-excel','plain','msword',\r\n 'vnd.openxmlformats-officedocument.wordprocessingml.document'];\r\n vm.chatContactsAutocompleteCfs = chatContactsAutocompleteCfs;\r\n vm.submitBtn = true;\r\n vm.submitBtnReply = true;\r\n vm.discussion_text = \"\";\r\n\r\n chatSoket();\r\n getComments();\r\n\r\n\r\n ContactsService.setSubjectStatuses({shipmentDetails:{potentialException: false, currentException: false, shipmentDetails: true}});\r\n\r\n var currentShipment = false;\r\n\r\n if(vm.user.customer_types.length > 0){\r\n if(vm.user.customer_types.includes('cfs')){\r\n vm.discussion_visibility = vm.user.customer_type_setup.cfs.discussion_enabled;\r\n }else{\r\n vm.discussion_visibility = false;\r\n }\r\n }\r\n\r\n //Google Map Icons\r\n\r\n var icons = {\r\n checkpoints: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-unselected.png',\r\n status: 'checkpoints'\r\n },\r\n lastCheckPt: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-enroute.png',\r\n status: 'lastCheckPt'\r\n },\r\n origin: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-origin.png',\r\n status: 'origin'\r\n },\r\n destination: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-destination.png',\r\n status: 'destination'\r\n }\r\n };\r\n\r\n var mouseOverIcons = {\r\n checkpoints: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-selected.png',\r\n status: 'checkpoints'\r\n },\r\n lastCheckPt: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-enroute.png',\r\n status: 'lastCheckPt'\r\n },\r\n origin: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-origin.png',\r\n status: 'origin'\r\n },\r\n destination: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-destination.png',\r\n status: 'destination'\r\n }\r\n };\r\n\r\n var selectedMarkerIcons = {\r\n checkpoints: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-selected-showlist.png',\r\n status: 'checkpoints'\r\n },\r\n lastCheckPt: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-oval-selected-showlist.png',\r\n status: 'lastCheckPt'\r\n },\r\n origin: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-origin.png',\r\n status: 'origin'\r\n },\r\n destination: {\r\n icon: '/assets/images/icons/shipment/showListView/icon-destination.png',\r\n status: 'destination'\r\n }\r\n };\r\n\r\n\r\n $scope.fileNameChanged = function(messageData) {\r\n\r\n var id = messageData.attributes['msg_id'].value;\r\n\r\n var name = document.getElementById('fileOne');\r\n $scope.message_id = 'none';\r\n\r\n if(id){\r\n name = document.getElementById('file'+id);\r\n $scope.message_id = parseInt(id);\r\n if(name.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n }\r\n }else{\r\n if(name.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n }\r\n }\r\n var file_upload_error = false;\r\n\r\n if($scope.files){\r\n\r\n //jpg, jpeg, gif, png, pdf, docs, dox, csv, xlsx, txt, xls\r\n\r\n for(var i=0; i<name.files.length; i++){\r\n\r\n if((name.files[i].size/1024/1024) > 5 || (name.files[i].type == '') ||\r\n (vm.discussion_file_format1.indexOf((name.files[i].type.split('/'))[1]) == -1) ){\r\n\r\n file_upload_error = true\r\n\r\n } else{\r\n\r\n $scope.files.push(name.files[i]);\r\n\r\n var bytes = name.files[i].size;\r\n\r\n if(bytes < 1024) {\r\n bytes + \" Bytes\";\r\n }\r\n\r\n else if(bytes < 1048576) {\r\n bytes = (bytes / 1024).toFixed(0) + \" KB\";\r\n }\r\n\r\n else if(bytes < 1073741824) {\r\n bytes = (bytes / 1048576).toFixed(0) + \" MB\";\r\n }\r\n\r\n else {\r\n bytes = (bytes / 1073741824).toFixed(0) + \" GB\";\r\n }\r\n\r\n vm.file_size_array[name.files[i].name] = {'name':name.files[i].name,'size':bytes}\r\n\r\n }\r\n\r\n }\r\n\r\n if(file_upload_error){\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/discussion/file_size_error.html');\r\n }\r\n\r\n }else{\r\n $scope.files = name.files;\r\n }\r\n\r\n $scope.files = removeDuplicateFiles($scope.files);\r\n\r\n }\r\n\r\n function removeFile(filename,index,id){\r\n angular.forEach($scope.files, function(v,k){\r\n if(v.type == 'savedFile' && v.name===filename){\r\n vm.attachments.push(v.name);\r\n }\r\n if(v.name===filename){\r\n $scope.files.splice(k,1);\r\n }\r\n });\r\n // Removing element\r\n var myEl = angular.element( document.querySelector( '.savedFile'+index ) );\r\n myEl.remove();\r\n\r\n if(id){\r\n if($scope.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n }\r\n }else{\r\n if($scope.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n }\r\n }\r\n }\r\n\r\n function clearChatForm(){\r\n $scope.files = [];\r\n vm.submitBtn = true;\r\n }\r\n\r\n function removeDuplicateFiles(origArr) {\r\n var newArr = [],\r\n origLen = origArr.length,\r\n found, x, y;\r\n for (x = 0; x < origLen; x++) {\r\n found = undefined;\r\n for (y = 0; y < newArr.length; y++) {\r\n if (origArr[x].name === newArr[y].name) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n newArr.push(origArr[x]);\r\n }\r\n }\r\n return newArr;\r\n }\r\n\r\n function findData(text){\r\n try{\r\n vm.searchDiscussionNew = true;\r\n vm.searchDiscussionOld = false;\r\n }catch(e){ }\r\n }\r\n\r\n function cancelFindData(){\r\n try{\r\n vm.searchDiscussionNew = false;\r\n vm.searchDiscussionOld = true;\r\n vm.findText = \"\";\r\n }catch(e){ }\r\n }\r\n\r\n function sendNotification(){\r\n // /shipment_id: nil, user_id: nil, active: true\r\n var userId = vm.user.id;\r\n\r\n if (!vm.isBookmarkedNotification){\r\n\r\n /* Notify the shipment */\r\n ShippingDetailsCfsService.bookmarkNotification(userId).then(function(shipment){\r\n vm.setBookmarkButtonNotification(true);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-notification-toast.html');\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-toast.error.html');\r\n });\r\n\r\n /* Remove the bookmark */\r\n } else {\r\n ShippingDetailsCfsService.unBookmarkNotification(userId).then(function(shipment){\r\n vm.setBookmarkButtonNotification(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/remove-bookmark-notification-toast.html');\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n\r\n }\r\n\r\n function findAttachmentComments(val){\r\n\r\n vm.isAttachmentsNotification = !vm.isAttachmentsNotification;\r\n\r\n if(vm.isAttachmentsNotification){\r\n\r\n var deleted_array2 = [];\r\n\r\n var prevMainIndex = null;\r\n\r\n for (var val1 in vm.discussion_chat) {\r\n\r\n if(vm.discussion_chat[val1].length > 0){\r\n\r\n var deleted_array1 = [];\r\n\r\n for(var j=0; j<vm.discussion_chat[val1].length; j++){\r\n\r\n var deleted_array = [];\r\n\r\n // looping replies array\r\n if(vm.discussion_chat[val1][j].replies.length > 0){\r\n\r\n var prevReplyIndex = null;\r\n\r\n for(var k=0; k<vm.discussion_chat[val1][j].replies.length; k++){\r\n\r\n if(vm.discussion_chat[val1][j].replies[k]){\r\n\r\n if(vm.discussion_chat[val1][j].replies[k].attachments.length == 0){\r\n // to delete replies array;\r\n //prevReplyIndex = k;\r\n vm.discussion_chat[val1][j].replies.splice(k,1);\r\n k--;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // to delete replies parent array;\r\n if(vm.discussion_chat[val1][j].attachments.length == 0 && vm.discussion_chat[val1][j].replies.length == 0 ){\r\n\r\n vm.discussion_chat[val1].splice(j,1);\r\n //prevReplyParentIndex = j;\r\n j--;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n // to delete main array;\r\n if(vm.discussion_chat[val1].length == 0 ){\r\n //deleted_array2.push(val1);\r\n delete vm.discussion_chat[val1];\r\n }\r\n\r\n }\r\n\r\n }else{\r\n\r\n //getComments();\r\n vm.discussion_chat = angular.copy(vm.original_discussion_chat);\r\n\r\n }\r\n\r\n }\r\n\r\n $scope.highlight = function(haystack) {\r\n if(!vm.findText) {\r\n return $sce.trustAsHtml(haystack);\r\n }\r\n return $sce.trustAsHtml(haystack.replace(new RegExp(vm.findText, \"gi\"), function(match) {\r\n return '<span class=\"highlightedText\">' + match + '</span>';\r\n }));\r\n };\r\n\r\n function getPermissionsValue(responsePermissionsData, type){\r\n return responsePermissionsData[type] || {}\r\n }\r\n\r\n function downloadDocument(id,pro,filename) {\r\n ShippingDetailsCfsService.downloadDocument(id,pro,filename);\r\n }\r\n\r\n\r\n function verticalGreenLine(){\r\n $scope.reCalVerticalGreenLine = !$scope.reCalVerticalGreenLine;\r\n }\r\n\r\n function getStatusColors(){\r\n vm.status_colors = ShippingDetailsCfsService.getStatusColors();\r\n }\r\n\r\n function isCurrentShipment(obj) {\r\n\r\n if(obj.pro == $stateParams.ref_num) {\r\n currentShipment = true;\r\n }\r\n if (currentShipment) {\r\n vm.isBookmarked = true;\r\n } else {\r\n vm.isBookmarked = false;\r\n }\r\n }\r\n\r\n function isFinancialPermission(documenttype){\r\n var row_length = documenttype.split(\" \").length\r\n return vm.hasFinancialPermissions && documenttype.split(\" \")[row_length - 1] == 'Invoice' || documenttype.split(\" \")[row_length - 1] != 'Invoice'\r\n }\r\n\r\n function getDocumentsCount(data){\r\n var count = 0;\r\n if (data != undefined && data != 'undefined') {\r\n for(var i = 1; i <= data.length ; i++){\r\n if (!vm.hasFinancialPermissions && data[i - 1].documenttype.split(\" \")[data[i - 1].documenttype.split(\" \").length - 1] == 'Invoice'){\r\n count=count+1;\r\n }\r\n }\r\n return data.length - count\r\n }\r\n else {\r\n return count\r\n }\r\n }\r\n\r\n // After the promise is completed, return the bookmarks from the service and determine how many there are\r\n function getBookmarks(type) {\r\n\r\n ShippingDetailsCfsService.getBookmarks(type).then(function(successResponse){\r\n vm.bookmarksCount = 0;\r\n vm.bookmarks = successResponse.load_bookmarks;\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount += 1;\r\n });\r\n\r\n });\r\n }\r\n\r\n function showBookmarkToastWithUrl(url) {\r\n var pinTo = vm.getToastPosition();\r\n var toast = $mdToast.show({\r\n position: pinTo,\r\n hideDelay: 3000,\r\n templateUrl: url,\r\n parent: angular.element(document.getElementById('toast-parent')),\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n $mdToast.show(toast);\r\n }\r\n\r\n function setProgressStatus() {\r\n var now = new Date();\r\n if (moment(vm.data.departuredate).isAfter(now)) {\r\n vm.progressStatus = \"Upcoming\";\r\n } else if (vm.data.isdelivered == \"true\") {\r\n vm.progressStatus = \"Delivered\"\r\n } else if (vm.daysRemaining > 0) {\r\n vm.progressStatus = vm.daysRemaining + \" Days Remaining\";\r\n } else if (moment(vm.data.departuredate).isBefore(now)) {\r\n vm.progressStatus = \"In Progress\";\r\n } else if (moment(vm.data.duedate).isBefore(now)) {\r\n vm.progressStatus = \"Overdue\";\r\n } else {\r\n vm.progressStatus = \"\";\r\n }\r\n }\r\n\r\n // function showRemoveBookmarkToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/remove-bookmark-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n // function showBookmarkLimitToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/bookmark-limit-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n // function showBookmarkedAlreadyToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/bookmark-already-removed-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n var data=angular.element($window);\r\n data.bind('resize',function(){\r\n\r\n verticalGreenLine();\r\n\r\n });\r\n\r\n function bookmarkShipment(type){\r\n\r\n // Update our current list of bookmarks before attempting to add a new one\r\n // So we can verify the bookmarks prior to trying to add / remove this one\r\n vm.bookmarksCount = 0;\r\n currentShipment = false;\r\n var startBookmarked = vm.isBookmarked;\r\n ShippingDetailsCfsService.getBookmarks(type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse.load_bookmarks;\r\n vm.bookmarks.filter(isCurrentShipment);\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount += 1;\r\n });\r\n\r\n if (!vm.isBookmarked){\r\n // The bookmark has already been removed elsewhere, don't try it again\r\n if (startBookmarked) {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-already-removed-toast.html');\r\n vm.setBookmarkButton(false);\r\n } else if(vm.bookmarksCount < 5) {\r\n /* Bookmark the shipment */\r\n vm.bookmarkButtonText = \"SHIPPINGDETAILS.BOOKMARKING\";\r\n vm.isBookmarking = true; // Disable the button\r\n ShippingDetailsCfsService.bookmarkShipment(type).then(function(shipment){\r\n vm.setBookmarkButton(true);\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-toast.html');\r\n }).catch(function(err) {\r\n vm.isBookmarking = false;\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-toast.error.html');\r\n });\r\n /* We've hit our limit, we need to remove bookmarks */\r\n } else {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-limit-toast.html');\r\n ShippingDetailsCfsService.getBookmarks(type);\r\n }\r\n /* Remove the bookmark */\r\n } else {\r\n vm.isBookmarking = true; // Disable the button\r\n ShippingDetailsCfsService.unBookmarkShipment(type).then(function(shipment){\r\n if (shipment.bookmark_id < 1){\r\n vm.setBookmarkButton(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/remove-bookmark-toast.html');\r\n }\r\n vm.isBookmarking = false;\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n function bookmarkShipmentDiscussion(type){\r\n // Update our current list of bookmarks before attempting to add a new one\r\n // So we can verify the bookmarks prior to trying to add / remove this one\r\n\r\n vm.bookmarksCount1 = 0;\r\n currentShipment = false;\r\n var startBookmarked = vm.isBookmarkedDiscussion;\r\n ShippingDetailsCfsService.getBookmarks(type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse.discussion_bookmarks;\r\n vm.bookmarks.filter(isCurrentShipment);\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount1 += 1;\r\n });\r\n if (!vm.isBookmarkedDiscussion){\r\n // The bookmark has already been removed elsewhere, don't try it again\r\n if (startBookmarked) {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-already-removed-toast.html');\r\n vm.setBookmarkButtonDiscussion(false);\r\n } else if(vm.bookmarksCount1 || vm.bookmarksCount1 == 0) {\r\n /* Bookmark the shipment */\r\n //vm.bookmarkButtonText = \"SHIPPINGDETAILS.BOOKMARKING\";\r\n vm.isBookmarkingDiscussion = true; // Disable the button\r\n ShippingDetailsCfsService.bookmarkShipment(type).then(function(shipment){\r\n vm.setBookmarkButtonDiscussion(true);\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-discussion-toast.html');\r\n }).catch(function(err) {\r\n vm.isBookmarkingDiscussion = false;\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-discussion-toast.error.html');\r\n });\r\n /* We've hit our limit, we need to remove bookmarks */\r\n } else {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-limit-toast.html');\r\n ShippingDetailsCfsService.getBookmarks(type);\r\n }\r\n /* Remove the bookmark */\r\n } else {\r\n vm.isBookmarkingDiscussion = true; // Disable the button\r\n ShippingDetailsCfsService.unBookmarkShipmentDiscussion(type).then(function(shipment){\r\n if (shipment.discussion_bookmark_id < 1){\r\n vm.setBookmarkButtonDiscussion(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/remove-bookmark-discussion-toast.html');\r\n }\r\n vm.isBookmarkingDiscussion = false;\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/shipping-details-cfs/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n function getConsigneeAddress(data){\r\n var address_labels = [\"consigneeaddress1\", \"consigneeaddress2\", \"consigneeaddress3\", \"consigneeaddress4\", \"consigneecity\", \"consigneecountry\"];\r\n return address_labels.map(function(d){return data[d];})\r\n .filter(function(d){return d && d !== null && d !== \"\";});\r\n }\r\n\r\n function getShipperAddress(data){\r\n var address_labels = [\"shipperaddress1\", \"shipperaddress2\", \"shipperaddress3\", \"shipperaddress4\", \"shippercity\", \"shippercountry\"];\r\n return address_labels.map(function(d){return data[d];})\r\n .filter(function(d){return d && d !== null && d !== \"\";});\r\n }\r\n\r\n function calcInvoiceTotal(){\r\n var inv = vm.data ? (vm.data.shipment_invoices ? vm.data.shipment_invoices : undefined) : undefined;\r\n var sum = 0;\r\n if (inv){\r\n inv.map(function(d){sum += +d.totalinvoiceamount;});\r\n return sum;\r\n } else {\r\n return sum;\r\n }\r\n }\r\n\r\n function setBookmarkButton(isMarked){\r\n if (isMarked){\r\n vm.isBookmarked = true;\r\n vm.bookmarkButtonText = 'SHIPPINGDETAILS.REMOVE_BOOKMARK';\r\n } else {\r\n vm.isBookmarked = false;\r\n vm.bookmarkButtonText ='SHIPPINGDETAILS.BOOKMARK_SHIPMENT';\r\n }\r\n }\r\n\r\n function setBookmarkButtonDiscussion(isMarked){\r\n if (isMarked){\r\n vm.isBookmarkedDiscussion = true;\r\n vm.bookmarkButtonTextDiscussion = 'SHIPPINGDETAILS.REMOVE_BOOKMARK_DISCUSSION';\r\n } else {\r\n vm.isBookmarkedDiscussion = false;\r\n vm.bookmarkButtonTextDiscussion ='SHIPPINGDETAILS.BOOKMARK_SHIPMENT_DISCUSSION';\r\n }\r\n }\r\n\r\n function setBookmarkButtonNotification(isMarked){\r\n if (isMarked){\r\n vm.isBookmarkedNotification = true;\r\n } else {\r\n vm.isBookmarkedNotification = false;\r\n }\r\n }\r\n\r\n\r\n function getInvoice(ref_num){\r\n vm.isLoading = true;\r\n\r\n ShippingDetailsCfsService.getInvoice(ref_num).then(function(invoiceData){\r\n\r\n if ($location.path().indexOf('/shipping-details-cfs') === -1) return;\r\n\r\n vm.invoiceDetails = invoiceData;\r\n\r\n getLineCharges(ref_num);\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n //vm.failedToRetrieveData = err.data.error;\r\n //alert('34534');\r\n });\r\n\r\n }\r\n\r\n function getLineCharges(ref_num){\r\n ShippingDetailsCfsService.getLineCharges(ref_num).then(function(lineChargesData){\r\n\r\n vm.invoiceLineCharges = lineChargesData.line_charges;\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n //vm.failedToRetrieveData = err.data.error;\r\n //alert('34534');\r\n });\r\n }\r\n\r\n function getMilestone(ref_num){\r\n vm.isLoading = true;\r\n\r\n ShippingDetailsCfsService.getMilestone(ref_num).then(function(milestoneData){\r\n\r\n vm.shipment_milestones = milestoneData.milestones;\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n //vm.failedToRetrieveData = err.data.error;\r\n //alert('34534');\r\n });\r\n }\r\n\r\n function getShipment(ref_num){\r\n\r\n vm.isLoading = true;\r\n ShippingDetailsCfsService.getLoad(ref_num).then(function(d){\r\n\r\n if ($location.path().indexOf('/shipping-details-cfs') === -1) return;\r\n\r\n //var updatedData = {},\r\n // arrival = d.destinationcountrycode + d.destinationcitycode,\r\n // departure = d.origincountrycode + d.origincitycode;\r\n\r\n //if (d.potential_exceptions) {\r\n // // Loop through potential exceptions and set the city\r\n // // and the arrival/departure\r\n // angular.forEach(d.potential_exceptions, function(exc) {\r\n // //// console.log(exc);\r\n // if (exc.city_codes.indexOf(arrival) !== -1) {\r\n // exc['city'] = d.destination;\r\n // exc['port_usage'] = 'Arrival'\r\n // } else if (exc.city_codes.indexOf(departure) !== -1) {\r\n // exc['city'] = d.origin;\r\n // exc['port_usage'] = 'Departure'\r\n // }\r\n // })\r\n // updatedData = d;\r\n //} else {\r\n // updatedData = d;\r\n //}\r\n\r\n /* Parse shipping dates by their concatenated nonformat */\r\n function parseDate(datetime){ return moment(datetime, 'YYYYMMDDHHmm').valueOf();}\r\n\r\n /* Retrieve Milestones sortable attribute by actual date + time, then by estimated date + time, and finally by sno */\r\n //function sortMilestonesBy(milestone){\r\n // return milestone.actualdate ?\r\n // parseDate(milestone.actualdate + milestone.actualtime) :\r\n // milestone.estimateddate ?\r\n // parseDate(milestone.estimateddate + milestone.estimatedtime) :\r\n // milestone.sno;\r\n //}\r\n\r\n //updatedData.shipment_milestones.sort(function(a, b) {\r\n // var milestone_a = sortMilestonesBy(a), milestone_b = sortMilestonesBy(b);\r\n // if (milestone_a == milestone_b){\r\n // return a.sno < b.sno ? -1 : (a.sno > b.sno ? 1 : 0);\r\n // } else {\r\n // return milestone_a < milestone_b ? -1 : (milestone_a > milestone_b ? 1 : 0);\r\n // }\r\n //});\r\n\r\n vm.data = d;\r\n\r\n var timezone_name = moment.tz.guess(vm.data.last_status_details['actual_time']);\r\n var timezone_symbol = moment.tz(vm.data.last_status_details['actual_time'], timezone_name).format('z');\r\n\r\n vm.data.last_status_details['timezone'] = timezone_symbol;\r\n\r\n if(!vm.data.isdelivered){\r\n var timezone_name = moment.tz.guess(vm.data.next_status_details['estimated_time']);\r\n var timezone_symbol = moment.tz(vm.data.next_status_details['estimated_time'], timezone_name).format('z');\r\n\r\n vm.data.next_status_details['timezone'] = timezone_symbol;\r\n }\r\n\r\n if(vm.data.estimateddelivery){\r\n var timezone_name = moment.tz.guess(vm.data.estimateddelivery);\r\n var timezone_symbol = moment.tz(vm.data.estimateddelivery, timezone_name).format('z');\r\n\r\n vm.data['estimateddeliverytimezone'] = timezone_symbol;\r\n }\r\n\r\n if(vm.data.deliverydate){\r\n var timezone_name = moment.tz.guess(vm.data.deliverydate);\r\n var timezone_symbol = moment.tz(vm.data.deliverydate, timezone_name).format('z');\r\n\r\n vm.data['deliverydatetimezone'] = timezone_symbol;\r\n }\r\n\r\n //vm.data.shipmentstatus = 'DELIVERED';\r\n //vm.data.origin_geocode.origin_lat=\"\";\r\n //vm.data.origin_geocode.origin_lng = \"\";\r\n\r\n //if(vm.data.origin_geocode){\r\n vm.data.origin_geocode.origin_lat = parseFloat(vm.data.origin_geocode.origin_lat);\r\n vm.data.origin_geocode.origin_lng = parseFloat(vm.data.origin_geocode.origin_lng);\r\n //}\r\n\r\n //vm.data.destination_geocode.dest_lat = \"\";\r\n //vm.data.destination_geocode.dest_lng = \"\";\r\n\r\n //if(vm.data.destination_geocode){\r\n vm.data.destination_geocode.dest_lat = parseFloat(vm.data.destination_geocode.dest_lat);\r\n vm.data.destination_geocode.dest_lng = parseFloat(vm.data.destination_geocode.dest_lng);\r\n //}\r\n\r\n\r\n // calling check calls\r\n var filtersData = new Object;\r\n filtersData['pro'] = $stateParams.ref_num;\r\n\r\n vm.getCheckCalls(filtersData);\r\n\r\n vm.data.pickupdate = $filter('date')(vm.data.pickupdate, \"dd-MMM-yyyy\");\r\n vm.data.duedate = $filter('date')(vm.data.duedate, \"dd-MMM-yyyy\");\r\n vm.data.shipdate = $filter('date')(vm.data.shipdate, \"dd-MMM-yyyy\");\r\n\r\n //vm.data.under_exception = (vm.data.potential_exceptions && vm.data.potential_exceptions.length > 0) || (vm.data.exceptions && vm.data.exceptions.length > 0);\r\n vm.referenceNumberObject = getReferenceNumberObject(vm.data.shipment_references);\r\n vm.isReferenceNumbers = !isEmpty(vm.referenceNumberObject);\r\n vm.isLoading = false;\r\n setDaysRemaining(); //sets the variable for days remaining\r\n setProgressStatus();\r\n //// console.log(d.potential_exceptions[0]);\r\n //vm.data.potential_exceptions = d.potential_exceptions[0];\r\n //call bar animation after we have data\r\n //vm.isBookmarked = (vm.data.load_bookmarks && vm.data.load_bookmarks[0])\r\n\r\n vm.unseen_discussion_count = vm.data.unseen_discussion_count;\r\n if(vm.unseen_discussion_count > 0){\r\n vm.markReadCheck = false;\r\n }\r\n ShippingDetailsCfsService.getUserBookmarks({pro: vm.data.pro}).then(function(res){\r\n if (res && res.load_bookmarks && res.load_bookmarks[0])\r\n {\r\n vm.isBookmarked = true\r\n setBookmarkButton(true) ;\r\n }\r\n else\r\n {\r\n vm.isBookmarked = false\r\n setBookmarkButton(false)\r\n }\r\n\r\n if (res && res.discussion_bookmarks && res.discussion_bookmarks[0])\r\n {\r\n vm.isBookmarkedDiscussion = true;\r\n setBookmarkButtonDiscussion(true);\r\n }\r\n else\r\n {\r\n vm.isBookmarkedDiscussion = false;\r\n setBookmarkButtonDiscussion(false);\r\n }\r\n\r\n })\r\n\r\n //setBookmarkButton(vm.data.load_bookmarks && vm.data.load_bookmarks[0]);\r\n //set the bar percentage and give it animation\r\n vm.barPercentage = getBarPercentage();\r\n\r\n vm.chatContactsAutocompleteCfs(vm.data.pro,'');\r\n\r\n //ContactsService.setSubjectStatuses({shipmentDetails:{\r\n // potentialException: vm.data.potential_exceptions && vm.data.potential_exceptions.length > 0,\r\n // currentException: vm.data.exceptions && vm.data.exceptions.length > 0,\r\n // shipmentDetails: true\r\n //}});\r\n\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n vm.failedToRetrieveData = err.data.error;\r\n });\r\n }\r\n\r\n function check_calls_filter(value,field_name,time){\r\n\r\n //$timeout( function(){\r\n vm.filter_requested_data['pro'] = $stateParams.ref_num;\r\n\r\n //if(value != undefined){\r\n\r\n if(field_name == 'time'){\r\n\r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n //vm.filter_requested_data['timezone'] = timezone_symbol;\r\n\r\n\r\n if((value == undefined) || (value == '')){\r\n\r\n value = '';\r\n\r\n } else{\r\n\r\n value = moment(value).format('hh:mm a')+' '+timezone_symbol;\r\n\r\n }\r\n }\r\n\r\n vm.filter_requested_data[field_name] = value;\r\n\r\n //if((value.length % 2 === 0) || (value.length > 5)){\r\n getCheckCalls(vm.filter_requested_data);\r\n //}\r\n\r\n\r\n //}\r\n\r\n //}, time );\r\n\r\n }\r\n\r\n function getCheckCalls(filterData){\r\n\r\n var url = '';\r\n\r\n angular.forEach(filterData,function(value,index){\r\n\r\n if(value){\r\n if(url){\r\n url += '&'+index+'='+value;\r\n }else{\r\n url = index+'='+value\r\n }\r\n }\r\n\r\n });\r\n\r\n vm.ngMapway = [];\r\n vm.ngGpsMapway = [];\r\n vm.ngmap = new Array();\r\n $scope.ngMapLocations = new Array();\r\n $scope.checkPtsLocation = new Array();\r\n\r\n ShippingDetailsCfsService.getCheckCalls(url).then(function(res){\r\n\r\n vm.check_calls = [];\r\n vm.gps_check_calls = [];\r\n\r\n if(vm.data.status != 'PLANNED' ){\r\n vm.check_calls = res;\r\n }\r\n\r\n $scope.checkCallsCount = 0;\r\n\r\n if(vm.check_calls.length > 0){\r\n\r\n vm.gps_check_calls = vm.check_calls.filter(function (check_calls) {\r\n\r\n $scope.checkCallsCount = $scope.checkCallsCount + 1;\r\n //return check_calls.trackingtype === \"GPS\";\r\n return true;\r\n\r\n });\r\n\r\n }\r\n\r\n vm.check_calls_status = new Array();\r\n\r\n vm.check_calls_status.push(\"In Transit\",\"Arrived Terminal\", \"DROPPED\", \"IN TRANSIT\", \"AT SHIPPER\", \"At Shipper\",\r\n \"MARGIN ALERT\", \"On Time\", \"TRACKING\", \"At Consignee\", \"Margin Alert\", \"EMPTY\", \"AT CONSIGNEE\", \"Delayed\", \"DOT Shutdown\",\r\n \"Out for Delivery\", \"Appt Needed/Chan\" );\r\n\r\n //Pushing Origin\r\n $scope.ngMapLocations = [\r\n {\r\n pos: [parseFloat(vm.data.origin_geocode.origin_lat), parseFloat(vm.data.origin_geocode.origin_lng)],\r\n originStatus:true,\r\n destinationStatus:false,\r\n position:new google.maps.LatLng(parseFloat(vm.data.origin_geocode.origin_lat), parseFloat(vm.data.origin_geocode.origin_lng)),\r\n type:'origin',\r\n state_name:vm.data.origin_state_name,\r\n serial_no:10000\r\n }\r\n ];\r\n\r\n if(vm.gps_check_calls.length){\r\n\r\n angular.forEach(vm.gps_check_calls,function(value,index){\r\n //if(value.trackingtype == 'GPS') {\r\n if(true) {\r\n\r\n vm.ngMapway.push({location:{lat:parseFloat(value.geocodes.lat),lng:parseFloat(value.geocodes.lng)}, stopover:true});\r\n\r\n var imageType='';\r\n\r\n if((vm.gps_check_calls.length - 1) == index){\r\n imageType=(!vm.data.isdelivered)?'lastCheckPt':'checkpoints';\r\n }else{\r\n imageType='checkpoints';\r\n }\r\n\r\n //Pushing checkpoints\r\n /*$scope.ngMapLocations.push({\r\n pos:[parseFloat(value.geocodes.lat), parseFloat(value.geocodes.lng)],\r\n originStatus:false,\r\n destinationStatus:false,\r\n\r\n position:new google.maps.LatLng(parseFloat(value.geocodes.lat), parseFloat(value.geocodes.lng)),\r\n type: imageType,\r\n serial_no:index,\r\n state_name:value.state_name\r\n });*/\r\n\r\n //Pushing only checkpoints to $scope.checkPtsLocation\r\n $scope.checkPtsLocation.push({\r\n pos:[(value.geocodes.lat), (value.geocodes.lng)],\r\n originStatus:false,\r\n destinationStatus:false,\r\n\r\n position:new google.maps.LatLng(parseFloat(value.geocodes.lat), parseFloat(value.geocodes.lng)),\r\n type: imageType,\r\n serial_no:index,\r\n state_name:value.state_name\r\n });\r\n }\r\n })\r\n\r\n }\r\n\r\n vm.chunk_array = ShippingDetailsCfsService.chunkArray(vm.ngMapway, 23);\r\n\r\n //Pushing destination\r\n $scope.ngMapLocations.push({\r\n pos:[parseFloat(vm.data.destination_geocode.dest_lat), parseFloat(vm.data.destination_geocode.dest_lng)],\r\n originStatus:false,\r\n destinationStatus:true,\r\n position:new google.maps.LatLng(parseFloat(vm.data.destination_geocode.dest_lat), parseFloat(vm.data.destination_geocode.dest_lng)),\r\n type:'destination',\r\n state_name:vm.data.destination_state_name,\r\n serial_no:10001\r\n });\r\n\r\n /* NG MAP */\r\n googleMap();\r\n\r\n }).catch(function(err) {\r\n\r\n });\r\n\r\n }\r\n\r\n function googleMap(){\r\n /* NG MAP */\r\n NgMap.getMap().then(function (map) {\r\n\r\n vm.ngmap = map;\r\n\r\n $timeout(function () {\r\n $scope.initMarkerClusterer();\r\n }, 3000);\r\n\r\n //$scope.initMarkerClusterer();\r\n\r\n $timeout( function(){\r\n vm.verticalGreenLine();\r\n vm.ngmap = map;\r\n }, 50 );\r\n\r\n });\r\n\r\n }\r\n\r\n //Google Map Init Code\r\n $scope.initMarkerClusterer = function () {\r\n\r\n vm.markers = [];\r\n\r\n // to Remove old marker icons\r\n if(vm.removableMarkers){\r\n\r\n angular.forEach(vm.removableMarkers, function(value, key) {\r\n\r\n var latlng = new google.maps.LatLng('', '');\r\n value.setPosition(latlng);\r\n value.setIcon('');\r\n value.title= '';\r\n value.status= '';\r\n value.originStatus='';\r\n value.destinationStatus='';\r\n value.serial_no='';\r\n value.state_name='';\r\n value.isHighlight=false;\r\n value.map = vm.ngmap;\r\n });\r\n\r\n }\r\n\r\n var markerCluster = new Array();\r\n\r\n // vm.markers contain only origin and destination\r\n vm.markers = $scope.ngMapLocations.map(function (city) {\r\n return $scope.createMarkerForCity(city);\r\n });\r\n\r\n\r\n // vm.clusterMarkers contains only checkpoints\r\n vm.clusterMarkers = $scope.checkPtsLocation.map(function (city) {\r\n return $scope.createMarkerForCity(city);\r\n });\r\n\r\n // to Remove old marker icons\r\n vm.removableMarkers = vm.clusterMarkers;\r\n\r\n var clusterMarkerIcons = [{\r\n url: '/assets/images/icons/shipment/showListView/icon-oval-selected.png',\r\n width: 14,\r\n height: 14\r\n }];\r\n\r\n var clusterOptions = {\r\n zoomOnClick:false,\r\n //imagePath: 'https://cdn.rawgit.com/googlemaps/v3-utility-library/master/markerclustererplus/images/m',\r\n styles: clusterMarkerIcons,\r\n gridSize:30\r\n };\r\n\r\n vm.infowindow = new google.maps.InfoWindow();\r\n\r\n markerCluster = new MarkerClusterer(vm.ngmap, vm.clusterMarkers, clusterOptions);\r\n\r\n var clusteredMarkers = vm.clusterMarkers;\r\n\r\n // To Hide the display number of counts in clusetr image.\r\n markerCluster.setCalculator(function(clusteredMarkers, numStyles){\r\n\r\n var index = 0,\r\n count = clusteredMarkers.length,\r\n total = count;\r\n\r\n while (total !== 0) {\r\n total = parseInt(total / 5, 10);\r\n index++;\r\n }\r\n\r\n index = Math.min(index, numStyles);\r\n return {\r\n text: \"\",\r\n index: index,\r\n title: count\r\n };\r\n });\r\n\r\n // markerCluster Image OnClick Method\r\n google.maps.event.addListener(markerCluster, 'clusterclick', function(cluster) {\r\n\r\n //event.cancelBubble = true;\r\n event.stopPropagation();\r\n\r\n //if(vm.showWayPointDiv){\r\n\r\n // Removing Marker highligth icon\r\n if(vm.previousMarker){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n var content = '';\r\n\r\n // Convert lat/long from cluster object to a usable MVCObject\r\n var info = new google.maps.MVCObject;\r\n info.set('position', cluster.center_);\r\n\r\n //----\r\n //Get markers\r\n var markers = cluster.getMarkers();\r\n\r\n var state_names = '';\r\n\r\n angular.forEach(markers, function(value, key) {\r\n //state_names += (value.state_name != '')? (state_names == '')?value.state_name:(' , '+value.state_name):'';\r\n state_names = (value.state_name != '')?value.state_name:'';\r\n });\r\n\r\n var count = (markers.length);\r\n\r\n vm.cursorPointer = 'cursor:pointer';\r\n //vm.cursorPointer = 'cursor:normal';\r\n /*if(vm.showWayPointDiv){\r\n vm.cursorPointer = 'cursor:pointer';\r\n }*/\r\n\r\n var content = \"<div class='gmailToolTip' style=\"+vm.cursorPointer+\";border-radius:5px;display:block' ng-click='scrollCheckptDetails(\"+markers[0].status+\",\"+markers[0].latlng+\")' >\"+\r\n \"<input type='hidden' class='status' value='\"+markers[0].status+\"' />\"+\r\n \"<input type='hidden' class='serial_no' value='\"+markers[0].serial_no+\"' />\"+\r\n \"<input type='hidden' class='latlng' value='\"+markers[0].latlng+\"' />\"+\r\n \"<span style='color:rgb(66,66,66);background-color:#DCDCDC;padding: 3px 25px 3px 25px;'> \"+state_names+\" </span>\"+\r\n \"<h2 style='color:rgb(66,66,66);font-size: 18px;font-weight:normal;margin:0px;margin-top: 5px;'>\"+\r\n \"<span style='font-weight:bold'>\"+count.toString()+\"</span> \"+\r\n \"Last Check Calls</h2>\"+\r\n \"<div style='position:absolute;right:0;top:0;height:100%;width: 23px;box-sizing:border-box;padding:5px;'>\"+\r\n \"<i class='material-icons' style='position: absolute;color: #DCDCDC;top: -3px;left: -10px;font-size: 50px;' ></i>\"+\r\n \"<!--<img src='/assets/images/icons/shipment/showListView/icon-arrow-right.png' style='margin-top:4px;' />--?\"+\r\n \"</div></div>\";\r\n\r\n vm.infowindow.close();\r\n vm.infowindow.setContent(content); //set infowindow content to titles\r\n vm.infowindow.open(vm.ngmap, info);\r\n\r\n //}\r\n\r\n });\r\n\r\n //Zoom change method\r\n google.maps.event.addListener(vm.ngmap, 'zoom_changed', function() {\r\n vm.infowindow.close()\r\n });\r\n\r\n // Cluster Image Mouseover Method\r\n google.maps.event.addListener(markerCluster,'mouseover',function(){\r\n //debugger;\r\n });\r\n\r\n google.maps.event.addListener(vm.ngmap, 'click', function(){\r\n vm.infowindow.close();\r\n });\r\n\r\n };\r\n\r\n //Set Different Icons for marker\r\n $scope.createMarkerForCity = function (city,index) {\r\n\r\n var marker = new google.maps.Marker({\r\n position: new google.maps.LatLng(city.pos[0], city.pos[1]),\r\n icon: icons[city.type].icon,\r\n title: '',\r\n status: icons[city.type].status,\r\n latlng:city.pos[0].toString().replace('.','-')+city.pos[1].toString().replace('.','-'),\r\n originStatus:city.originStatus,\r\n destinationStatus:city.destinationStatus,\r\n serial_no:city.serial_no,\r\n state_name:city.state_name,\r\n isHighlight:false,\r\n map:vm.ngmap\r\n });\r\n\r\n google.maps.event.addListener(marker, 'mouseover', function () {\r\n\r\n if(!this.isHighlight){\r\n var icon_new = mouseOverIcons[this.status].icon;\r\n marker.setIcon(icon_new);\r\n }\r\n\r\n });\r\n\r\n google.maps.event.addListener(marker, 'mouseout', function () {\r\n\r\n if(!this.isHighlight){\r\n var icon_new = icons[marker.status].icon;\r\n marker.setIcon(icon_new);\r\n }\r\n\r\n });\r\n\r\n google.maps.event.addListener(marker, 'click', function () {\r\n update_highlight_image(marker.latlng);\r\n //event.cancelBubble = true;\r\n vm.infowindow.close();\r\n\r\n if(vm.showWayPointDiv){\r\n var latitude = marker.position.lat();\r\n var longitude = marker.position.lng();\r\n\r\n if(!marker.originStatus && !marker.destinationStatus && !marker.isHighlight){\r\n\r\n var image = {\r\n url: selectedMarkerIcons[marker.status].icon,\r\n size: new google.maps.Size(36, 36),\r\n origin: new google.maps.Point(0, 0),\r\n anchor: new google.maps.Point(18, 25),\r\n scaledSize: new google.maps.Size(36, 36)\r\n };\r\n\r\n marker.isHighlight = true;\r\n var icon_new = selectedMarkerIcons[marker.status].icon;\r\n marker.setIcon(image);\r\n marker.setPosition(new google.maps.LatLng(latitude, longitude));\r\n\r\n }else{\r\n marker.isHighlight = false;\r\n var icon_new = icons[marker.status].icon;\r\n marker.setIcon(icon_new);\r\n marker.setPosition(new google.maps.LatLng(latitude, longitude));\r\n }\r\n\r\n if(vm.previousMarker && (marker.position.lat() != vm.previousMarker.position.lat()) ){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n vm.previousMarker = marker;\r\n\r\n if(marker.originStatus || marker.destinationStatus || marker.isHighlight){\r\n scrollCheckptDetails(marker.status,marker.latlng);\r\n }\r\n }\r\n\r\n });\r\n\r\n return marker;\r\n }\r\n\r\n function highlight_check_call_pt_jquery(){\r\n $scope.highlight_check_call_pt = angular.element('.update_highlight_img_from_jquery').val();\r\n scrollCheckptDetails('checkpoints', angular.element('.update_highlight_img_from_jquery').val());\r\n }\r\n\r\n function update_highlight_image(latlng){\r\n $scope.highlight_check_call_pt = latlng;\r\n }\r\n\r\n function scrollCheckptDetails(name,serial_nos){\r\n\r\n var container = angular.element(document.getElementById('checkPtsDetails'));\r\n\r\n if(name == 'origin' || name == 'destination'){\r\n //scroll to top #checkPtsDetails\r\n //container.scrollTop(0, 5000);\r\n var element = angular.element(document.getElementById('location'+serial_nos));\r\n container.scrollTo(element, 0, 1000);\r\n }\r\n\r\n else{\r\n //Checkpoints [will get index number]\r\n //this.serial_no\r\n //scroll to location+serial_no (#checkPtsDetails)\r\n var element = angular.element(document.getElementById('location'+serial_nos));\r\n container.scrollTo(element, 0, 1000);\r\n }\r\n\r\n }\r\n\r\n function getReferenceNumberObject(data) {\r\n // // console.log(data);\r\n var object = {};\r\n for (var k in data) {\r\n //// console.log(data[k].referencenumber);\r\n if(!objectContainsKey(data[k].referencenumber, object)) {\r\n if((data[k].referencecode) && !object[data[k].referencecode])\r\n object[data[k].referencecode] = [];\r\n }\r\n if(object[data[k].referencecode] && (data[k].referencenumber !='N/A') && data[k].referencenumber) object[data[k].referencecode].push(data[k].referencenumber);\r\n }\r\n //// console.log(object);\r\n return object;\r\n }\r\n\r\n //checks if the key is in the object\r\n function objectContainsKey(key, object) {\r\n //// console.log(key);\r\n //// console.log(object)\r\n for (var k in object) {\r\n for(var j in object[k]){\r\n //// console.log(object[k][j] + ' '+ key);\r\n if(object[k][j] == key) return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function isEmpty(obj) {\r\n for(var prop in obj) {\r\n if(obj.hasOwnProperty(prop))\r\n return false;\r\n }\r\n return true;\r\n // return Object.keys(obj).length === 0;\r\n }\r\n\r\n function getToastPosition() {\r\n sanitizePosition();\r\n return Object.keys(vm.toastPosition)\r\n .filter(function(pos) { return vm.toastPosition[pos]; })\r\n .join(' ');\r\n }\r\n\r\n function getBarPercentage() {\r\n //get the percentage for the days reamining bar\r\n var percentage = 0;\r\n var today = new Date();\r\n var duedate = new Date(vm.data.duedate);\r\n var departdate = new Date(vm.data.departuredate);\r\n var denomDiff = duedate.getTime() - departdate.getTime();\r\n var numDiff = today.getTime() - departdate.getTime();\r\n if(numDiff > denomDiff) {\r\n percentage = 100;\r\n } else {\r\n percentage = (numDiff / denomDiff) * 100;\r\n }\r\n return percentage;\r\n }\r\n\r\n function setDaysRemaining() {\r\n var today = new Date();\r\n var duedate = new Date(vm.data.duedate);\r\n var timeDiff = duedate.getTime() - today.getTime();\r\n var diffDays = 0;\r\n if(timeDiff > 0) diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));\r\n vm.daysRemaining = diffDays;\r\n }\r\n\r\n function convertDate(date){\r\n if (date && date.length == 8 && !isNaN(date)){\r\n return date.substring(0,4)+'-'+ date.substring(4,6)+'-'+date.substring(6,8);\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n function convertTime(time){\r\n if (time && time.length == 4 && !isNaN(time)){\r\n return time.substring(0,2)+':'+time.substring(2,4);\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n function getReasonDescription(milestone) {\r\n if (!milestone.reasoncode) return '';\r\n if (milestone.reasondescription) return milestone.reasondescription;\r\n // see if we can find it in the exceptions and give that description back\r\n var desc = '';\r\n angular.forEach(vm.data.exceptions, function(e) {\r\n if (e.milestonecode == milestone.milestonecode) {\r\n desc = e.description;\r\n }\r\n });\r\n return desc;\r\n }\r\n\r\n function docDate(path){\r\n var pad = \"00\";\r\n var content = path.split(\"/\");\r\n return convertDate(content[1]+\r\n pad.substring(0,pad.length-content[2].length)+content[2]+\r\n pad.substring(0,pad.length-content[3].length)+content[3]);\r\n }\r\n\r\n function docName(path){\r\n var content = path.split(\"/\");\r\n return content[content.length-1];\r\n }\r\n\r\n function sanitizePosition() {\r\n var current = vm.toastPosition;\r\n if ( current.bottom && vm.last.top ) current.top = false;\r\n if ( current.top && vm.last.bottom ) current.bottom = false;\r\n if ( current.right && vm.last.left ) current.left = false;\r\n if ( current.left && vm.last.right ) current.right = false;\r\n vm.last = angular.extend({},current);\r\n }\r\n\r\n function showInvoice(ev, _invoice_){\r\n $log.debug(_invoice_);\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/invoices/invoice.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n locals: {\r\n invoice: _invoice_,\r\n address: vm.getShipperAddress(_invoice_),\r\n invoice_date: vm.convertDate(_invoice_.invoicedate)\r\n },\r\n controller: function DialogController($scope, $mdDialog, invoice, address, invoice_date){\r\n $scope.invoice = invoice;\r\n $scope.address = address;\r\n $scope.invoice_date = invoice_date;\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n }\r\n\r\n function getContainers(){\r\n var containers = vm.data.shipment_containers;\r\n var containerHistory = {};\r\n /* Build a container history */\r\n for (var i in containers){\r\n if (containers[i].eventtime && containers[i].eventtime.length == 4){\r\n containers[i].eventtime = vm.convertTime(containers[i].eventtime);\r\n }\r\n if (containerHistory[containers[i].contno]){\r\n containerHistory[containers[i].contno].push(containers[i]);\r\n } else {\r\n containerHistory[containers[i].contno] = [containers[i]];\r\n }\r\n }\r\n /* Reorder all the containers by descending order for their sno (serial number) value */\r\n for (var container in containerHistory){\r\n containerHistory[container] = $filter('orderBy')(containerHistory[container], '-sno');\r\n }\r\n /* Generate the list of containers */\r\n var containers2 = [];\r\n for (container in containerHistory){\r\n containers2.push(containerHistory[container][0]);\r\n }\r\n containers2.sort(function(a,b){\r\n return b.length - a.length;\r\n });\r\n containers2.reverse();\r\n /* Keep the history for details access */\r\n vm.containerHistory = containerHistory;\r\n return containers2;\r\n }\r\n\r\n function showContainerDetails(ev, container) {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/containers/container-details.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n locals: {\r\n history: vm.containerHistory[container]\r\n },\r\n controller: function DialogController($scope, $mdDialog, history){\r\n $scope.history = history;\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n }\r\n\r\n function showModal(ev, modal,data) {\r\n vm.currentMilestone = data;\r\n vm.ref_no = $stateParams.ref_num;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/shipping-details-cfs/' + modal + '.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n scope: $scope,\r\n preserveScope: true,\r\n fullscreen: useFullScreen,\r\n controller: function () {\r\n return vm;\r\n },\r\n controllerAs: 'vm'\r\n });\r\n }\r\n\r\n function showExceptionsModal(ev, list) {\r\n vm.exceptionList = list;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n scope: $scope.$new(),\r\n templateUrl: '/app/shipping-details/potential-exceptions/potential-exceptions.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n preserveScope: true,\r\n clickOutsideToClose: true,\r\n controller: 'ShipmentPotentialExceptionsController',\r\n controllerAs: 'sdpeCtrl',\r\n fullscreen: useFullScreen\r\n });\r\n }\r\n\r\n // function closeModal(event) {\r\n // if (event && event.button == 1) return; // ignore middle clicks\r\n // $mdDialog.cancel();\r\n // }\r\n\r\n $rootScope.$on('doneBookmark', function(event, data) {\r\n\r\n if(data){\r\n $rootScope.$broadcast('doneBookmark', false);\r\n doneBookmark(bookmarkType);\r\n }\r\n\r\n });\r\n\r\n function doneBookmark(type){\r\n ShippingDetailsCfsService.getBookmarks(type).then(function(){\r\n vm.setBookmarkButton(false);\r\n\r\n angular.forEach(vm.bookmarks.load_bookmarks,function(data){\r\n ShippingDetailsCfsService.getUserBookmarks({pro: data.pro}).then(function(res){\r\n if (res && res.load_bookmarks && res.load_bookmarks[0])\r\n {\r\n vm.setBookmarkButton(true);\r\n }\r\n })\r\n\r\n //if(data && vm.data.load_bookmarks[0] && data.id == vm.data.load_bookmarks[0].id){\r\n // vm.setBookmarkButton(true);\r\n //}\r\n });\r\n\r\n }).catch(function(err){\r\n });\r\n }\r\n\r\n function closeModal(event) {\r\n if (event && event.button == 1) return; // ignore middle clicks\r\n //doneBookmark();\r\n $mdDialog.cancel();\r\n }\r\n\r\n //links to the dashboard\r\n function jumpToDashboard() {\r\n $location.url('/');\r\n $mdDialog.cancel();\r\n }\r\n\r\n function gotoMilestome() {\r\n // set the location.hash to the id of\r\n // the element you wish to scroll to.\r\n $location.hash('milestones-area');\r\n\r\n // call $anchorScroll()\r\n $anchorScroll();\r\n }\r\n\r\n function goToReference(){\r\n $location.hash('reference-area');\r\n $anchorScroll();\r\n\r\n vm.expandInvoice = true;\r\n\r\n //UserService.setRefNumbersExpanded(true);\r\n //vm.expandedRefNumbers = UserService.refNumbersIsExpanded();\r\n }\r\n\r\n function showListViewChange(){\r\n\r\n if(vm.showListView){\r\n vm.showWayPointDiv = true;\r\n\r\n if(vm.infowindow){\r\n //vm.infowindow.close();\r\n }\r\n\r\n if(vm.previousMarker){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n }else{\r\n vm.showWayPointDiv = false;\r\n vm.showListFilter = false;\r\n\r\n //Removing Cluster Tooltip and disabling marker highlight.\r\n\r\n if(vm.infowindow){\r\n //vm.infowindow.close();\r\n }\r\n\r\n if(vm.previousMarker){\r\n var previousMarker = vm.previousMarker;\r\n var icon_new = icons[previousMarker.status].icon;\r\n previousMarker.setIcon(icon_new);\r\n previousMarker.isHighlight = false;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n function showListFilterChange(){\r\n vm.showListFilter = !vm.showListFilter;\r\n }\r\n\r\n function getDetailsHighlight(indexNo, latitude, longitude){\r\n\r\n //if(vm.showWayPointDiv){\r\n //$('#scrollElement').scrollTop(0);\r\n //alert(latitude);\r\n //document.getElementById('#scrollElement').scrollTo(0, 0);\r\n\r\n //var old = $location.hash();\r\n //$location.hash('locationDetDiv5');\r\n //$anchorScroll();\r\n //reset to old to keep any additional routing logic from kicking in\r\n //$location.hash(null);\r\n\r\n //}\r\n\r\n\r\n }\r\n\r\n vm.switchUser = false;\r\n if(localStorage.switchEmailCfsType){\r\n vm.switchUser = true;\r\n }else if(localStorage.userCompanyCfs){\r\n vm.switchUser = true;\r\n }else if(localStorage.userDepartmentCfs){\r\n vm.switchUser = true;\r\n }\r\n\r\n\r\n function getComments(){\r\n\r\n var url = api.url_v2+'/shipments/'+vm.ref_num+'/shipment_comments?customer_type=cfs';\r\n\r\n if(localStorage.customerType == 'cfs'){\r\n if(localStorage.switchEmailCfsType){\r\n url +=\"&userEmail=\"+localStorage.switchEmailCfsType;\r\n }else if(localStorage.userCompanyCfs){\r\n url +=\"&userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs);\r\n }else if(localStorage.userDepartmentCfs){\r\n url +=\"&userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCfs)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCfs;\r\n }else if(localStorage.dummyUser){\r\n url +=\"&dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser);\r\n }\r\n }\r\n\r\n ShippingDetailsCfsService.getDiscussionData(url).then(function(resp){\r\n\r\n vm.discussion_chat = angular.copy(resp);\r\n vm.original_discussion_chat = angular.copy(resp);\r\n\r\n }).catch(function(err) {\r\n\r\n console.log(err);\r\n\r\n });\r\n\r\n }\r\n\r\n vm.autocompletetimer = null\r\n function chatContactsAutocompleteCfs(id, searchText){\r\n //if(searchText.length > 2){\r\n vm.autocompleteData=\"\";\r\n\r\n if(searchText == \"\"){\r\n var query = {field: 'load_contacts', pro_number:id, value: searchText};\r\n chatContactsListCfs(query);\r\n }\r\n if(searchText.length!=0){\r\n var query = {field: 'load_contacts', pro_number:id, value: searchText};\r\n if(query.value != \"\"){\r\n if(vm.autocompletetimer)\r\n clearTimeout(vm.autocompletetimer)\r\n vm.autocompletetimer = setTimeout(function(){\r\n chatContactsListCfs(query);\r\n },500);\r\n }\r\n }else{\r\n if(vm.autocompletetimer)\r\n clearTimeout(vm.autocompletetimer)\r\n }\r\n }\r\n\r\n function chatContactsListCfs(query){\r\n\r\n $http.post(api.url_v2 + '/aljex_autocomplete', query).then(function(response){\r\n\r\n vm.company_contacts = response.data;\r\n\r\n }, function errorCallback(error){\r\n\r\n });\r\n\r\n }\r\n\r\n\r\n function chatSoket(){\r\n\r\n //shipment_commnets/#{self.shipment_id}/comments/new\r\n var url = '/shipment_comments/'+vm.ref_num+'/comments/new';\r\n\r\n try {\r\n\r\n var faye = new Faye.Client(downloadLink.url+'/faye/faye');\r\n\r\n faye.subscribe(url, function (data) {\r\n\r\n var dataComment = JSON.parse(data);\r\n\r\n var tempArray = angular.copy(vm.original_discussion_chat);\r\n\r\n /* appending */\r\n\r\n var current_date = moment().format(\"YYYY-MM-DD\");\r\n\r\n if(!dataComment.parent_id){\r\n\r\n dataComment.replies = dataComment.replies || [];\r\n\r\n if(vm.discussion_chat[current_date]){\r\n\r\n vm.discussion_chat[current_date].push(dataComment);\r\n tempArray[current_date].push(angular.copy(dataComment));\r\n\r\n }else{\r\n\r\n var new_object = new Object();\r\n\r\n //new_object[current_date] = [dataComment];\r\n vm.discussion_chat[current_date] = [dataComment];\r\n tempArray[current_date] = angular.copy([dataComment]);\r\n }\r\n\r\n }else{\r\n\r\n vm.discussion_chat = angular.forEach(vm.discussion_chat, function(chat_data,i) {\r\n\r\n angular.forEach(chat_data, function(chat_msgs,k) {\r\n\r\n if(chat_msgs.id == dataComment.parent_id){\r\n\r\n chat_msgs.replies = chat_msgs.replies || [];\r\n chat_msgs.replies.push(dataComment);\r\n\r\n tempArray[i][k].replies = tempArray[i][k].replies || [];\r\n tempArray[i][k].replies.push(angular.copy(data));\r\n\r\n }\r\n\r\n });\r\n\r\n });\r\n\r\n }\r\n\r\n vm.original_discussion_chat = angular.copy(tempArray);\r\n\r\n /*$timeout(function () {\r\n\r\n //scroll comment section.\r\n\r\n if(dataComment.parent_id){\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+dataComment.id));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_text'+dataComment.parent_id ) )[0].innerHTML=\"\";\r\n\r\n }else{\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.msg_section'+dataComment.id));\r\n\r\n container.scrollTo(scrollElement, 0, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML=\"\";\r\n\r\n }\r\n\r\n showReplyTextBox('', '');\r\n\r\n }, 200);*/\r\n\r\n\r\n });\r\n }\r\n\r\n catch(e) {\r\n console.log(\"Error loading faye.js\");\r\n }\r\n\r\n }\r\n\r\n $scope.userFilter = \"\";\r\n\r\n $scope.focusIndex = 0;\r\n\r\n $scope.keys = [];\r\n\r\n vm.comment_text_array = [];\r\n\r\n $scope.replyId = '';\r\n $scope.cursorPointerLocation = 0;\r\n\r\n\r\n\r\n function showReplyTextBox(msg_id, usr_id){\r\n\r\n $scope.replyId = msg_id;\r\n\r\n $scope.focusIndex = 0;\r\n //vm.discussion_comment_text = '';\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML = \"\";\r\n vm.tagged_users = [];\r\n $scope.cursorPointerLocation=0;\r\n\r\n $timeout(function () {\r\n\r\n angular.element('.chat_input_text'+msg_id)[0].innerHTML = '';\r\n angular.element( document.querySelector('.chatMainInput .userLists' )).addClass('hide');\r\n angular.element( document.querySelector('.chatSubInput .userLists' )).addClass('hide');\r\n\r\n angular.element('.replyTextBoxDiv').addClass(\"hide\");\r\n\r\n\r\n if(msg_id && usr_id){\r\n angular.element('.replyTextBoxDiv'+msg_id).removeClass(\"hide\");\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.replyTextBoxDiv'+msg_id));\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n }\r\n\r\n }, 100);\r\n\r\n }\r\n\r\n $scope.userSelect = function (event, index, name, parentId, email ) {\r\n\r\n //$scope.focusIndex = index;\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n var discussion_text = angular.element( document.querySelectorAll( '.chat_input_main_text' ) );\r\n\r\n if(parentId){\r\n\r\n element = document.querySelector('.chatSubInput'+parentId+' .userLists' );\r\n //var discussion_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n discussion_text = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) );\r\n vm.replyTagPopup = false;\r\n }\r\n\r\n vm.commentTagPopup = false;\r\n\r\n vm.tagged_users.push(email);\r\n\r\n angular.element( element ).addClass('hide');\r\n vm.userListOpen = false;\r\n //angular.element( element ).blur();\r\n //event.preventDefault();\r\n //discussion_text.focus();\r\n set_cursor(discussion_text[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n //event.preventDefault();\r\n var test = getPrecedingChar(discussion_text[0]);\r\n\r\n var range = window.getSelection().getRangeAt(0),\r\n content = range.extractContents(),\r\n span = document.createElement('SPAN');\r\n\r\n span.appendChild(content);\r\n var htmlContent = span.innerHTML;\r\n\r\n range.insertNode(span);\r\n\r\n\r\n\r\n var currentCursorPoint = range.startOffset;\r\n\r\n var currentLineStringsAfterCursor = range.startContainer.textContent.slice(range.startOffset,range.startContainer.textContent.length);\r\n\r\n var currentLineStringsUptoCursor = range.startContainer.textContent.slice(0,range.startOffset);\r\n\r\n var textAfterAtSymbol = currentLineStringsUptoCursor.slice(currentLineStringsUptoCursor.lastIndexOf(\"@\")+1,range.startOffset);\r\n\r\n var removeStringAftreAtSymbol = textAfterAtSymbol.length;\r\n\r\n //adjusting cursor point\r\n\r\n $scope.cursorPointerLocation = $scope.cursorPointerLocation - removeStringAftreAtSymbol;\r\n\r\n var lastAtSymbolPosition = currentLineStringsUptoCursor.lastIndexOf(\"@\")+1;\r\n\r\n var beforeAtSymbol = currentLineStringsUptoCursor.slice(0,currentLineStringsUptoCursor.lastIndexOf(\"@\")+1);\r\n var afterAtSymbol = currentLineStringsUptoCursor.slice(lastAtSymbolPosition,currentCursorPoint);\r\n\r\n afterAtSymbol = name+' ';\r\n\r\n currentLineStringsUptoCursor = beforeAtSymbol+afterAtSymbol;\r\n\r\n range.startContainer.textContent = currentLineStringsUptoCursor+currentLineStringsAfterCursor;\r\n\r\n //adjusting cursor point\r\n $scope.cursorPointerLocation = $scope.cursorPointerLocation + name.length+1;\r\n\r\n //.lastIndexOf(\"@\")+1,range.startOffset = name;\r\n\r\n //$scope.pasteHtmlAtCaret(name+' ');\r\n\r\n set_cursor(discussion_text[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n\r\n };\r\n\r\n\r\n $scope.pasteHtmlAtCaret = function(html) {\r\n\r\n var sel, range;\r\n if (window.getSelection) {\r\n // IE9 and non-IE\r\n sel = window.getSelection();\r\n if (sel.getRangeAt && sel.rangeCount) {\r\n range = sel.getRangeAt(0);\r\n range.deleteContents();\r\n\r\n // Range.createContextualFragment() would be useful here but is\r\n // non-standard and not supported in all browsers (IE9, for one)\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = html;\r\n var frag = document.createDocumentFragment(), node, lastNode;\r\n while ( (node = el.firstChild) ) {\r\n lastNode = frag.appendChild(node);\r\n }\r\n range.insertNode(frag);\r\n\r\n // Preserve the selection\r\n if (lastNode) {\r\n range = range.cloneRange();\r\n range.setStartAfter(lastNode);\r\n\r\n range.collapse(true);\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n }\r\n }\r\n } else if (document.selection && document.selection.type != \"Control\") {\r\n // IE < 9\r\n document.selection.createRange().pasteHTML(html);\r\n }\r\n }\r\n\r\n\r\n $scope.openUserTagsDiv = function(ev, msgId){\r\n\r\n if(msgId){\r\n\r\n var element = angular.element('.chat_input_text'+msgId);\r\n\r\n }else{\r\n\r\n var element = angular.element('.chat_input_main_text');\r\n\r\n }\r\n\r\n //ev.preventDefault();\r\n\r\n //element.focus();\r\n\r\n set_cursor(element[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n\r\n //$scope.checkTagWord('',msgId,appendElement);*/\r\n\r\n $scope.pasteHtmlAtCaret('@');\r\n\r\n }\r\n\r\n $scope.checkTagWord = function(ev, parentId, node){\r\n\r\n var discussion_comment_html = angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML;\r\n var discussion_comment_text = angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerText;\r\n\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n\r\n vm.discussion_text = discussion_comment_text;\r\n //console.log(\">>\", ev.keyCode, angular.element(element).hasClass('hide') )\r\n\r\n if(discussion_comment_text.trim() != \"\" || $scope.files.length > 0){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n vm.commentTagPopup = false;\r\n }\r\n\r\n if(parentId){\r\n //discussion_comment_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n discussion_comment_html = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerHTML;\r\n discussion_comment_text = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerText;\r\n element = document.querySelector('.chatSubInput'+parentId+' .userLists' );\r\n\r\n vm.discussion_text = discussion_comment_text;\r\n\r\n if(discussion_comment_text.trim() != \"\" || $scope.files.length > 0){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n vm.replyTagPopup = false;\r\n }\r\n }\r\n\r\n if(ev){\r\n //ev.stopPropagation;\r\n }\r\n\r\n\r\n if(discussion_comment_text){\r\n\r\n if(discussion_comment_text.length > 0){\r\n\r\n /*if((discussion_comment_text[discussion_comment_text.length - 1] == '@') ){\r\n vm.userListOpen = true;\r\n }*/\r\n\r\n vm.curserPointData = getPrecedingChar(ev.target);\r\n\r\n if((ev.key == 'Shift') || (ev.key == '@') ){\r\n\r\n if(vm.curserPointData[vm.curserPointData.length -1] == '@' ){\r\n vm.userListOpen = true;\r\n if(parentId){ vm.replyTagPopup = true; vm.commentTagPopup = false; }\r\n else{ vm.commentTagPopup = true; vm.replyTagPopup = false; }\r\n }\r\n\r\n }else{\r\n if(vm.curserPointData[vm.curserPointData.length - 1] == '@'){\r\n vm.userListOpen = true;\r\n if(parentId){ vm.replyTagPopup = true; vm.commentTagPopup = false; }\r\n else{ vm.commentTagPopup = true; vm.replyTagPopup = false; }\r\n }\r\n }\r\n\r\n if(vm.userListOpen && (vm.curserPointData.slice(0,vm.curserPointData.length).lastIndexOf('@') > -1) ){\r\n\r\n //if(discussion_comment_text[vm.curserPointData]){\r\n\r\n $scope.userFilter = vm.curserPointData.slice(vm.curserPointData.lastIndexOf('@') + 1, vm.curserPointData.length);\r\n\r\n if($scope.userFilter != \"\"){\r\n vm.chatContactsAutocompleteCfs(vm.data.pro,$scope.userFilter);\r\n }\r\n // if($scope.userFilter == \"\"){\r\n // vm.chatContactsAutocompleteCfs(vm.data.pro,$scope.userFilter);\r\n // }\r\n\r\n //$scope.userFilter = a.slice((a.lastIndexOf('@') + 1),a.length);\r\n\r\n if($scope.userFilter.indexOf(' ') > -1){\r\n $scope.userFilter = $scope.userFilter.replace(' ',' ');\r\n }\r\n\r\n $timeout(function () {\r\n\r\n if($scope.focusIndex > (element.getElementsByTagName('article').length - 1)){\r\n $scope.focusIndex = 0;\r\n }\r\n\r\n }, 100);\r\n\r\n if((angular.element(element).hasClass('hide')) && vm.company_contacts.length){\r\n\r\n angular.element( element ).removeClass('hide');\r\n scrollContainer(10,500);\r\n\r\n\r\n if(!parentId){\r\n var container = document.querySelector(\".chatMainInput\");\r\n }else{\r\n var container = document.querySelector(\".chatSubInput\"+parentId);\r\n }\r\n\r\n if(node){\r\n ev.target = node;\r\n }\r\n\r\n var clientX,clientY;\r\n var cursor_point_length = getCursorCoOrdinates(ev.target,'','',element);\r\n\r\n clientX = cursor_point_length.x;\r\n clientY = cursor_point_length.y;\r\n\r\n if(angular.element('.sidebar').hasClass('md-locked-open')) {\r\n\r\n element.style.left = (clientX - 260) + \"px\";\r\n\r\n if((element.offsetWidth + (clientX -260)) > container.offsetWidth ) {\r\n element.style.right = \"0px\";\r\n element.style.left = null;\r\n }else{\r\n element.style.left = (clientX - 260) + \"px\";\r\n }\r\n\r\n } else{\r\n\r\n if((element.offsetWidth + (clientX -25)) > container.offsetWidth ) {\r\n\r\n element.style.right = \"0px\";\r\n element.style.left = null;\r\n\r\n }else{\r\n element.style.left = (clientX - 25) + \"px\";\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n //}\r\n\r\n }else{\r\n\r\n $scope.userFilter = '';\r\n //$scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n\r\n }\r\n\r\n }else{\r\n $scope.userFilter = '';\r\n $scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n //angular.element('body').css('position', 'relative');\r\n }\r\n\r\n }else{\r\n $scope.userFilter = '';\r\n $scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n //angular.element('body').css('position', 'relative');\r\n }\r\n\r\n }\r\n\r\n function getPrecedingChar(element) {\r\n\r\n var precedingChar = \"\", sel, range, precedingRange;\r\n\r\n if (window.getSelection) {\r\n sel = window.getSelection();\r\n if (sel.rangeCount > 0) {\r\n range = sel.getRangeAt(0).cloneRange();\r\n range.collapse(true);\r\n range.setStart(element, 0);\r\n precedingChar = range.toString();\r\n }\r\n } else if ( (sel = document.selection) && sel.type != \"Control\") {\r\n range = sel.createRange();\r\n precedingRange = range.duplicate();\r\n precedingRange.moveToElementText(element);\r\n precedingRange.setEndPoint(\"EndToStart\", range);\r\n precedingChar = precedingRange.text;\r\n }\r\n\r\n //if(precedingChar.length > 0){\r\n\r\n $scope.cursorPointerLocation = precedingChar.length;\r\n\r\n //}\r\n\r\n return precedingChar;\r\n\r\n }\r\n\r\n $scope.setManualCrusorPoint = function(ev, className){\r\n\r\n //ev.preventDefault();\r\n var targetPt = getPrecedingChar(document.getElementsByClassName(className)[0]);\r\n vm.userListOpen = false;\r\n\r\n //set_cursor(document.getElementsByClassName(className)[0],targetPt.length,targetPt.length);\r\n //event.preventDefault();\r\n\r\n }\r\n\r\n function set_cursor(containerEl,start,end){\r\n\r\n var charIndex = 0, range = document.createRange();\r\n range.setStart(containerEl, 0);\r\n range.collapse(true);\r\n var nodeStack = [containerEl], node, foundStart = false, stop = false;\r\n\r\n while (!stop && (node = nodeStack.pop())) {\r\n if (node.nodeType == 3) {\r\n var nextCharIndex = charIndex + node.length;\r\n if (!foundStart && start >= charIndex && start <= nextCharIndex) {\r\n range.setStart(node, start - charIndex);\r\n foundStart = true;\r\n }\r\n if (foundStart && end >= charIndex && end <= nextCharIndex) {\r\n range.setEnd(node, end - charIndex);\r\n stop = true;\r\n }\r\n charIndex = nextCharIndex;\r\n } else {\r\n var i = node.childNodes.length;\r\n while (i--) {\r\n nodeStack.push(node.childNodes[i]);\r\n }\r\n }\r\n }\r\n\r\n var sel = window.getSelection();\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n\r\n }\r\n\r\n function getCursorCoOrdinates(){\r\n\r\n var sel = document.selection, range, rect;\r\n var x = 0, y = 0;\r\n if (sel) {\r\n if (sel.type != \"Control\") {\r\n range = sel.createRange();\r\n range.collapse(true);\r\n x = range.boundingLeft;\r\n y = range.boundingTop;\r\n }\r\n } else if (window.getSelection) {\r\n sel = window.getSelection();\r\n if (sel.rangeCount) {\r\n range = sel.getRangeAt(0).cloneRange();\r\n if (range.getClientRects) {\r\n range.collapse(true);\r\n if (range.getClientRects().length>0){\r\n rect = range.getClientRects()[0];\r\n x = rect.left;\r\n y = rect.top;\r\n }\r\n }\r\n // Fall back to inserting a temporary element\r\n if (x == 0 && y == 0) {\r\n var span = document.createElement(\"span\");\r\n if (span.getClientRects) {\r\n // Ensure span has dimensions and position by\r\n // adding a zero-width space character\r\n span.appendChild( document.createTextNode(\"\\u200b\") );\r\n range.insertNode(span);\r\n rect = span.getClientRects()[0];\r\n x = rect.left;\r\n y = rect.top;\r\n var spanParent = span.parentNode;\r\n spanParent.removeChild(span);\r\n\r\n // Glue any broken text nodes back together\r\n spanParent.normalize();\r\n }\r\n }\r\n }\r\n }\r\n\r\n return {'x':x,'y':y};\r\n\r\n }\r\n\r\n $scope.$on('keydown', function( msg, obj ) {\r\n\r\n //https://next.plnkr.co/edit/C6KL3JdCkhgTMCH3trZb?p=preview&preview\r\n //https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes\r\n\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n var replyMsg = false;\r\n\r\n if($scope.replyId){\r\n if(!(angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide'))){\r\n\r\n element = document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' );\r\n var replyMsg = true;\r\n\r\n }\r\n\r\n if((angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide')\r\n && obj.code.keyCode == 13 && !obj.code.shiftKey)){\r\n document.getElementById(\"replyBtn\").click();\r\n }\r\n }\r\n\r\n if(angular.element(element).hasClass('hide') && obj.code.keyCode == 8 ){\r\n vm.userListOpen = true;\r\n }\r\n else if(angular.element(element).hasClass('hide') && obj.code.keyCode == 13 && !obj.code.shiftKey){\r\n document.getElementById(\"commentBtn\").click();\r\n }\r\n else if(!angular.element(element).hasClass('hide')) {\r\n\r\n switch (obj.code.keyCode){\r\n\r\n case 8:\r\n\r\n // BACKSPACE\r\n vm.userListOpen = true;\r\n\r\n break;\r\n\r\n case 38 :\r\n\r\n //UP ARROW\r\n obj.code.preventDefault();\r\n\r\n if($scope.focusIndex == 0){\r\n\r\n $scope.focusIndex = 0;\r\n scrollContainer(10,500);\r\n }\r\n else{\r\n $scope.focusIndex--;\r\n scrollContainer(100,500);\r\n }\r\n\r\n break;\r\n\r\n case 40 :\r\n //debugger;\r\n //DOWN ARROW\r\n obj.code.preventDefault();\r\n\r\n if($scope.focusIndex == (element.getElementsByTagName('article').length - 1)){\r\n $scope.focusIndex = (element.getElementsByTagName('article').length - 1);\r\n }\r\n\r\n else{\r\n $scope.focusIndex++;\r\n }\r\n\r\n scrollContainer(10,500);\r\n\r\n break;\r\n\r\n case 27 :\r\n\r\n //ESCAPE\r\n //$scope.focusIndex = 0;\r\n //angular.element( element ).addClass('hide');\r\n //angular.element('.discussion_layout').triggerHandler('click');\r\n //vm.userListOpen = false;\r\n break;\r\n\r\n case 13 :\r\n\r\n //ENTER\r\n obj.code.preventDefault();\r\n\r\n //$scope.open( $scope.focusIndex , '');\r\n\r\n if(replyMsg){\r\n\r\n angular.element('.chatSubInput'+$scope.replyId+' .userLists .active-highlight').triggerHandler('click');\r\n angular.element( document.querySelector('.chatSubInput'+$scope.replyId+' .userLists')).addClass('hide');\r\n vm.replyTagPopup = false;\r\n\r\n }else{\r\n\r\n angular.element('.chatMainInput .userLists .active-highlight').triggerHandler('click');\r\n angular.element( document.querySelector('.chatMainInput .userLists' )).addClass('hide');\r\n vm.commentTagPopup = false;\r\n\r\n }\r\n\r\n vm.userListOpen = false;\r\n\r\n break;\r\n\r\n\r\n };\r\n\r\n\r\n $scope.$apply();\r\n\r\n }\r\n var val = window.document.querySelectorAll('.chat_input_main_text')[0].innerText\r\n if(val.trim() == \"\")\r\n window.document.querySelectorAll('.chat_input_main_text')[0].innerHTML = \"\"\r\n\r\n });\r\n\r\n function scrollContainer(fromPt, toPt){\r\n\r\n var container = angular.element(document.querySelector('.chatMainInput .userLists' ));\r\n\r\n var scrollElement = angular.element(document.querySelector('.chatMainInput .userLists .active-highlight'));\r\n\r\n if($scope.replyId){\r\n if(!(angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide'))){\r\n\r\n container = angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' ));\r\n scrollElement = angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists .active-highlight'));\r\n\r\n }\r\n }\r\n\r\n container.scrollTo(scrollElement, fromPt, toPt);\r\n\r\n }\r\n\r\n function chat_text_submit(parentId){\r\n\r\n //var discussion_comment_text = vm.discussion_comment_text;\r\n\r\n var discussion_comment_text = window.document.querySelectorAll('.chat_input_main_text')[0].innerHTML;\r\n\r\n if(parentId){\r\n //discussion_comment_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n\r\n discussion_comment_text = window.document.querySelector('.chat_input_text'+parentId).innerHTML;\r\n }\r\n\r\n if(discussion_comment_text.trim() != \"\" || ($scope.files.length > 0)){\r\n if(discussion_comment_text.length <= 2200){\r\n\r\n\r\n //Hypertext link creating\r\n\r\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\r\n\r\n //Removing the existing anchor tags\r\n discussion_comment_text = discussion_comment_text.replace(/<[^>]+>/g, '');\r\n\r\n //URLs starting with http://, https://, or ftp://\r\n replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\r\n replacedText = discussion_comment_text.replace(replacePattern1, '<a href=\"$1\" target=\"_blank\">$1</a>');\r\n\r\n //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\r\n replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\r\n replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\r\n\r\n //Change email addresses to mailto:: links.\r\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\r\n replacedText = replacedText.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\r\n\r\n\r\n var user_name = ((vm.user.first_name)?vm.user.first_name:'')+' '+((vm.user.last_name)?vm.user.last_name:'');\r\n $http({\r\n method: 'POST',\r\n url: api.url_v2 +'/shipments/'+vm.ref_num+'/shipment_comments',\r\n headers: { 'Content-Type': undefined },\r\n\r\n transformRequest: function (data) {\r\n var formData = new FormData();\r\n if(data.files && data.files.length > 0){\r\n for (var i = 0; i < data.files.length; i++) {\r\n if(data.files[i].type != \"savedFile\")\r\n formData.append(\"attachments[]\", data.files[i]);\r\n }\r\n }\r\n formData.append(\"comment_text\", replacedText);\r\n formData.append(\"user_id\", localStorage.getItem(\"user_id\"));\r\n formData.append(\"user_name\", user_name);\r\n formData.append(\"user_email\", localStorage.getItem(\"user_emailId\"));\r\n formData.append(\"parent_id\", (parentId?parentId:null));\r\n formData.append(\"tagged_users\", (vm.tagged_users?vm.tagged_users:[]));\r\n formData.append(\"shipment_type\", \"cfs\");\r\n return formData;\r\n },\r\n data: { files: $scope.files }\r\n }).\r\n success(function (data, status, headers, config) {\r\n\r\n //var tempArray = angular.copy(vm.original_discussion_chat);\r\n\r\n vm.clearChatForm();\r\n vm.discussion_comment_text = '';\r\n discussion_comment_text = \"\";\r\n\r\n /*var current_date = moment().format(\"YYYY-MM-DD\");\r\n\r\n if(!data.comment.parent_id){\r\n\r\n data.comment.replies = data.comment.replies || [];\r\n\r\n if(vm.discussion_chat[current_date]){\r\n\r\n vm.discussion_chat[current_date].push(data.comment);\r\n tempArray[current_date].push(angular.copy(data.comment));\r\n //vm.original_discussion_chat[current_date].push(data.comment);\r\n\r\n }else{\r\n\r\n var new_object = new Object();\r\n\r\n //new_object[current_date] = [data.comment];\r\n vm.discussion_chat[current_date] = [data.comment];\r\n tempArray[current_date] = angular.copy([data.comment]);\r\n //vm.original_discussion_chat[current_date] = [data.comment];\r\n }\r\n\r\n }else{\r\n\r\n var index = 0;\r\n\r\n vm.discussion_chat = angular.forEach(vm.discussion_chat, function(chat_data,i) {\r\n\r\n angular.forEach(chat_data, function(chat_msgs,k) {\r\n\r\n if(chat_msgs.id == data.comment.parent_id){\r\n\r\n chat_msgs.replies = chat_msgs.replies || [];\r\n chat_msgs.replies.push(data.comment);\r\n\r\n tempArray[i][k].replies = tempArray[i][k].replies || [];\r\n tempArray[i][k].replies.push(angular.copy(data.comment));\r\n\r\n }\r\n\r\n });\r\n\r\n index++;\r\n\r\n });\r\n\r\n }\r\n\r\n vm.original_discussion_chat = angular.copy(tempArray);*/\r\n\r\n //scroll\r\n\r\n $timeout(function () {\r\n\r\n //scroll comment section.\r\n\r\n if(parentId){\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+data.comment.id));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerHTML=\"\";\r\n\r\n }else{\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.msg_section'+data.comment.id));\r\n\r\n container.scrollTo(scrollElement, 0, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML=\"\";\r\n\r\n }\r\n\r\n showReplyTextBox('', '');\r\n\r\n }, 300);\r\n\r\n //chatSoket();\r\n }).\r\n error(function (data, status, headers, config) {\r\n //vm.clearChatForm();\r\n if(data.messages[0]) vm.chatShipmentError = data.messages[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/chat-toast.error.html');\r\n });\r\n }else{\r\n vm.chatShipmentError = \"Character string exceeds. Maximum character string allowed: 2200\"\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/chat-toast.error.html');\r\n }\r\n }\r\n }\r\n\r\n\r\n function getSuffixDate(number){\r\n\r\n number = $filter('date')(number, \"dd\");\r\n\r\n return ShippingDetailsCfsService.getSuffixDate(number);\r\n }\r\n\r\n function reply_comment_display(msg_id,type,key,index_no){\r\n\r\n if(type == 'less'){\r\n\r\n angular.element('.expand_more'+msg_id).removeClass(\"hide\");\r\n angular.element('.expand_less'+msg_id).addClass(\"hide\");\r\n\r\n //expand_div1 sub_msg_details\r\n angular.element('.expand_div'+msg_id).addClass(\"hide\");\r\n angular.element('.sub_msg_details'+msg_id).removeClass(\"hide\");\r\n\r\n var replyCommentId = vm.discussion_chat[key][index_no].replies[vm.discussion_chat[key][index_no].replies.length-1].id;\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+replyCommentId));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n }\r\n\r\n if(type == 'more'){\r\n\r\n angular.element('.expand_more'+msg_id).addClass(\"hide\");\r\n angular.element('.expand_less'+msg_id).removeClass(\"hide\");\r\n\r\n //expand_div1 sub_msg_details\r\n angular.element('.expand_div'+msg_id).removeClass(\"hide\");\r\n angular.element('.sub_msg_details'+msg_id).addClass(\"hide\");\r\n }\r\n\r\n }\r\n\r\n function markRead(){\r\n if(!vm.markReadCheck){\r\n var cfs_discussion_count = parseInt(localStorage.getItem('cfs_discussion_count'));\r\n ShippingDetailsCfsService.markAsRead().then(function(res){\r\n if(res.status == 200){\r\n var count = cfs_discussion_count - vm.unseen_discussion_count;\r\n vm.markReadCheck = true;\r\n localStorage.setItem('cfs_discussion_count',count);\r\n vm.unseen_discussion_count = 0;\r\n }\r\n }).catch(function(err) {\r\n });\r\n }\r\n }\r\n\r\n $(window).scroll(function() {\r\n var hT = $('#reference-area').offset().top,\r\n hH = $('#reference-area').outerHeight(),\r\n wH = $(window).height(),\r\n wS = $(this).scrollTop();\r\n //console.log((hT-wH) , wS);\r\n if (wS > (hT+hH-wH)){\r\n if(!vm.markReadCheck){\r\n var cfs_discussion_count = parseInt(localStorage.getItem('cfs_discussion_count'));\r\n ShippingDetailsCfsService.markAsRead().then(function(res){\r\n if(res.status == 200){\r\n var count = cfs_discussion_count - vm.unseen_discussion_count;\r\n vm.markReadCheck = true;\r\n localStorage.setItem('cfs_discussion_count',count);\r\n vm.unseen_discussion_count = 0;\r\n }\r\n }).catch(function(err) {\r\n });\r\n }\r\n }\r\n });\r\n\r\n }\r\n})();\r\n\n// unique filter used for the reference numbers\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .filter('uniqueRef', uniqueRef);\r\n\r\n /* @ngInject */\r\n function uniqueRef() {\r\n return function (object, field) {\r\n var uniqueArray = [];\r\n for (var key in object) {\r\n if(object[key][field] && uniqueArray.indexOf(object[key][field]) == -1) {\r\n uniqueArray.push(object[key][field]);\r\n }\r\n }\r\n if(uniqueArray.length < 1) uniqueArray.push('N/a');\r\n return uniqueArray;\r\n };\r\n \r\n }\r\n\r\n})();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .controller('ShipmentPotentialExceptionsController', ShipmentPotentialExceptionsController);\r\n\r\n /** @ngInject */\r\n ShipmentPotentialExceptionsController.$inject = ['$stateParams', 'ShippingDetailsService', '$log', '$mdDialog','$translatePartialLoader', '$scope'];\r\n function ShipmentPotentialExceptionsController($stateParams, ShippingDetailsService, $log, $mdDialog, $translatePartialLoader, $scope, dataToPass) {\r\n\r\n /* variables */\r\n var vm = this;\r\n // Grab the current state of the dialog from parent\r\n vm.showList = $scope.$parent.vm.exceptionList;\r\n\r\n vm.setHeight = setHeight;\r\n vm.closeModal = closeModal;\r\n\r\n vm.dataToPass = dataToPass;\r\n\r\n // Check the array for the matching state/country code to determine location\r\n function getLocation(codes, departure, arrival) {\r\n if (codes.indexOf(vm.data.arrival) !== -1) {\r\n return vm.data.destination;\r\n } else if (codes.indexOf(vm.data.departure) !== -1) {\r\n return vm.data.origin;\r\n }\r\n }\r\n\r\n // Check the array for the matching state/country code to set whether arrival or departure\r\n function getLocationType(codes, departure, arrival) {\r\n if (codes.indexOf(vm.data.arrival) !== -1) {\r\n return \"Arrival\";\r\n } else if (codes.indexOf(vm.data.departure) !== -1) {\r\n return \"Departure\";\r\n }\r\n }\r\n\r\n // Sets the height of the dialog to a static number so that it doesn't grow and shrink\r\n // while a user navigates between the list and details\r\n function setHeight() {\r\n var el = angular.element(document.getElementsByClassName(\"potential-exceptions\")[0]);\r\n el.scrollTop = 0;\r\n angular.element(el).css('height', el.offsetHeight + 'px');\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n }\r\n})();\r\n /* Not needed until we can view details and list\r\n .animation('.exception-list-slide', ['$animateCss', function ($animateCss) {\r\n return {\r\n enter: function (element, doneFn) {\r\n var height = element[0].offsetHeight;\r\n return $animateCss(element, {\r\n from: {transform: 'translate3d(-100%, 0, 0)'},\r\n to: {transform: 'translate3d(0%, 0, 0)'},\r\n easing: 'ease-in-out',\r\n cleanupStyles: true,\r\n duration: 0.33\r\n });\r\n },\r\n leave: function (element, doneFn) {\r\n var height = element[0].offsetHeight;\r\n return $animateCss(element, {\r\n from: {transform: 'translate3d(0%, 0, 0)'},\r\n to: {transform: 'translate3d(-100%, 0, 0)'},\r\n easing: 'ease-in-out',\r\n cleanupStyles: true,\r\n duration: 0.33\r\n });\r\n }\r\n };\r\n }])\r\n .animation('.exception-slide', ['$animateCss', function ($animateCss) {\r\n return {\r\n enter: function (element, doneFn) {\r\n var height = element[0].offsetHeight;\r\n return $animateCss(element, {\r\n from: {transform: 'translate3d(100%, 0, 0)'},\r\n to: {transform: 'translate3d(0%, 0, 0)'},\r\n easing: 'ease-in-out',\r\n cleanupStyles: true,\r\n duration: 0.33\r\n });\r\n },\r\n leave: function (element, doneFn) {\r\n var height = element[0].offsetHeight;\r\n return $animateCss(element, {\r\n from: {transform: 'translate3d(0%, 0, 0)'},\r\n to: {transform: 'translate3d(100%, 0, 0)'},\r\n easing: 'ease-in-out',\r\n cleanupStyles: true,\r\n duration: 0.33\r\n });\r\n }\r\n };\r\n }])\r\n */\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .directive('shippingDetailsMap', shippingDetailsMap);\r\n\r\n /* @ngInject */\r\n shippingDetailsMap.$inject = ['$filter', '$interval', '$timeout', '$window', '$location'];\r\n function shippingDetailsMap($filter, $interval, $timeout, $window, $location) {\r\n var directive = {\r\n restrict: 'EA',\r\n scope: {\r\n arcs: \"=\",\r\n data: \"=\",\r\n land: '=',\r\n settings: \"=\",\r\n boundary: '='\r\n },\r\n link: link\r\n };\r\n return directive;\r\n\r\n function link(scope, iElement, attr){ \r\n\r\n var el = iElement[0];\r\n var rendering = false, map = false;\r\n var width, height, elHeight, legend_height_offset, legend_width_offset, duration;\r\n var projection;\r\n var svg = d3.select(el)\r\n .append('svg')\r\n .attr(\"width\", \"100%\"); \r\n\r\n angular.element($window).bind('resize', function(){\r\n if (rendering) $timeout.cancel(rendering);\r\n renderMap();\r\n rendering = renderChart(scope.data);\r\n });\r\n\r\n scope.$watch('data', function(newVals, oldVals) {\r\n if(newVals != undefined){\r\n if (rendering) $timeout.cancel(rendering);\r\n if (!map) map = renderMap();\r\n rendering = renderChart(newVals);\r\n }\r\n }, true);\r\n\r\n function renderChart(data){\r\n if(data != undefined){\r\n return $timeout(function(){\r\n rendering = true;\r\n if (data && data.length > 0){\r\n scope.render(data);\r\n } else if (scope.data && scope.data.length > 0){\r\n scope.render(scope.data);\r\n }\r\n $timeout(function() {scope.$apply();});\r\n }, 150).finally(function(){rendering = false;});\r\n }\r\n }\r\n\r\n /* Renders the map */\r\n function renderMap(){\r\n svg.attr(\"width\", 0);\r\n\r\n // dimensioning the map and legend\r\n width = iElement.parent()[0].offsetWidth;\r\n height= Math.ceil(width / 16 * 8);\r\n elHeight = height;\r\n duration = 1000;\r\n\r\n svg.attr(\"width\", width )\r\n .attr(\"height\", elHeight);\r\n\r\n // Remove all current elements\r\n svg.selectAll('*').remove();\r\n\r\n // Set map projection\r\n \r\n projection = d3.geo.equirectangular()\r\n .scale(height/ Math.PI)\r\n .translate([width/2, height/2]); \r\n\r\n var path = d3.geo.path()\r\n .projection(projection);\r\n\r\n // Add the main elements\r\n var g = svg.append('g');\r\n var land = g.append('path');\r\n var boundary = g.append('path');\r\n\r\n land\r\n .style(\"fill\", function(d, i) {return '#3f4c59';})\r\n .style(\"stroke\", \"#050b24\")\r\n .style(\"stroke-width\", 1);\r\n\r\n boundary\r\n .attr(\"class\", \"map-boundary\")\r\n .style(\"stroke\", \"#050b24\")\r\n .style(\"stroke-width\", 1);\r\n\r\n scope.$watch('land', function(geo){\r\n if(!geo) return;\r\n land.datum(geo).attr('class', 'map-land').attr('d', path);\r\n });\r\n return true;\r\n }\r\n\r\n scope.render = function(data){\r\n if(data != undefined){\r\n /* Wrap the data in a removable data layer */\r\n svg.selectAll(\"#shipment-details-map\").remove();\r\n var layer = svg.append('g').attr(\"id\", \"shipment-details-map\");\r\n \r\n // be responsive!\r\n if (width < 620) {\r\n elHeight += 120; \r\n }\r\n\r\n // Interpolate a middle point that rests above the line\r\n function calcMid(p1, p2){\r\n var d1 = Math.abs(p1[0] - p2[0]),\r\n d2 = Math.abs(p1[1] - p2[1]),\r\n d3 = Math.pow(d1 * d1 + d2 * d2, 0.5),\r\n mid = [ ((p1[0]+p2[0])/2)+(d3/8), ((p1[1]+p2[1])/2)-(d3/8)];\r\n return mid;\r\n }\r\n\r\n //Container for the gradients\r\n var defs = layer.append(\"defs\");\r\n\r\n //Filter for the outside glow\r\n var filter = defs.append(\"filter\").attr(\"id\",\"glow\");\r\n filter.append(\"feGaussianBlur\").attr(\"stdDeviation\",\"10\").attr(\"result\",\"coloredBlur\");\r\n var feMerge = filter.append(\"feMerge\");\r\n feMerge.append(\"feMergeNode\").attr(\"in\",\"coloredBlur\");\r\n feMerge.append(\"feMergeNode\").attr(\"in\",\"SourceGraphic\");\r\n\r\n if (scope.arcs) {\r\n // Get current lane pairs\r\n var arc_data = scope.arcs.map(function(pair){\r\n var line = [];\r\n var p1 = projection([pair.origin.longitude, pair.origin.latitude]),\r\n p2 = projection([pair.destination.longitude, pair.destination.latitude]),\r\n mid = calcMid(p1, p2);\r\n if (p1[0] == p2[0] && p1[1] == p2[1]){\r\n var m1 = [p1[0]+20, p1[1]], m2 = [p1[0], p1[1]+20];\r\n line = [p1, m1, m2, p2];\r\n } else {\r\n line = [p1, mid, p2];\r\n }\r\n return {label: pair.label, data: line.map(function(d){return {x:d[0], y:d[1]};})};\r\n // [{x:p1[0], y:p1[1]}, {x:mid[0], y:mid[1]}, {x:p2[0], y:p2[1]}]};\r\n });\r\n\r\n // Our line function\r\n var line = d3.svg.line()\r\n .interpolate('basis')\r\n .x(function(d,i) { return d.x; })\r\n .y(function(d,i) { return d.y; });\r\n\r\n var i = 0, colors = scope.settings.laneColor;\r\n // Draw the arcs\r\n var arcs = layer.selectAll(\"g.arcs\")\r\n .data(arc_data)\r\n .enter()\r\n .append(\"path\")\r\n .attr(\"class\", \"arclink\")\r\n .attr(\"id\", function(d, i){\r\n return \"arc\"+i;\r\n })\r\n .attr(\"d\", function(e){\r\n return line(e.data);\r\n })\r\n\r\n .style(\"cursor\", \"auto\")\r\n .style(\"fill\", \"transparent\")\r\n .style(\"stroke-width\", 3)\r\n .style(\"stroke\", function(d,i){return colors[i++];}) \r\n\r\n var circle_radius = 8;\r\n var ls_h = 20;\r\n\r\n arcs.each(function(d,i){\r\n // debugger;\r\n var totalLength = d3.select(\"#arc\"+i).node().getTotalLength(),\r\n interpolate = d3.interpolateString(\"0,\" + totalLength, totalLength + \",\" + totalLength);\r\n\r\n d3.selectAll(\"#arc\"+i)//.attr(\"stroke-dash-array\", totalLength + \" \" + totalLength)\r\n //.attr(\"stroke-dashoffset\", totalLength)\r\n .transition()\r\n .duration(duration)\r\n // .delay(100*i)\r\n .attrTween(\"stroke-dasharray\", function(){\r\n return function(t) { return interpolate(t);};\r\n });\r\n });\r\n }\r\n\r\n\r\n layer.call(tip);\r\n\r\n // Draw the pins\r\n var pWidth = 22, pHeight = 28;\r\n var pins = layer.selectAll(\"g.pins\")\r\n .data(scope.data)\r\n .enter()\r\n .append(\"g\")\r\n .attr(\"transform\", function(d){\r\n var pos = projection([d.longitude, d.latitude]), x = (pos[0] - pWidth/2), y = pos[1] - pHeight/1.25+1;\r\n return \"translate(\"+x+\",\"+y+\")\";\r\n })\r\n .append(\"svg:image\")\r\n .attr(\"xlink:href\",\"/app/components/svg/pin.svg\")\r\n .attr(\"width\", 0)\r\n .attr(\"height\", 0)\r\n \r\n .transition()\r\n .delay(function(d,i) {\r\n if (d.type === 'origin'){\r\n return 0;\r\n } else {\r\n //return duration - duration/10;\r\n return 0;\r\n }\r\n })\r\n .ease(\"linear\")\r\n .attr(\"width\", 22)\r\n .attr(\"height\", 28);\r\n\r\n } \r\n } // End scope.render\r\n d3.select('.map-tip').remove();\r\n var tip = d3.tip()\r\n .attr('class', 'd3-tip map-tip')\r\n .style(\"background-color\", \"#616161\")\r\n .offset([-10, 0])\r\n // }); // End Angular Ready\r\n } // End Link\r\n } // End Directive\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .controller('SDMapController', SDMapController);\r\n\r\n /** @ngInject */\r\n SDMapController.$inject = ['ShippingDetailsService', '$log', '$translatePartialLoader', '$scope', '$timeout' ];\r\n function SDMapController(ShippingDetailsService, $log, $translatePartialLoader, $scope, $timeout) {\r\n\r\n $scope.mapObject = {\r\n scope: 'world',\r\n // projection: 'mercator',\r\n responsive: true,\r\n options: {\r\n legendHeight: 1\r\n },\r\n arcConfig: {\r\n animationSpeed: 2000,\r\n popupOnHover: true,\r\n strokeWidth: 5,\r\n arcSharpness: 1.4,\r\n popupTemplate: function(geography, data){\r\n if ((data.origin && data.destination) && data.origin.name && data.destination.name){\r\n return '<div class=\"hoverinfo\"><strong>Lane Pair</strong><br>Origin: '+data.origin.name+'<br>Destination: '+data.destination.name+'</div>'; }\r\n }\r\n },\r\n pinsConfig: {\r\n popupOnHover: false,\r\n strokeWidth: 0,\r\n fillColor: 'rgb(10,10,10,0)',\r\n popupTemplate: function(geography, data){\r\n $log.debug(data.name);\r\n var tooltip = '<div class=hoverinfo><strong>hello</strong>'+'<br>Port</br>'+'</div>'\r\n $log.debug(tooltip)\r\n return tooltip;\r\n }\r\n },\r\n geographyConfig: {\r\n popupOnHover: false,\r\n highlightOnHover: false,\r\n borderColor: '#050B24',\r\n borderWidth: 1\r\n },\r\n fills: {\r\n 'HIGH': '#CC4731',\r\n 'MEDIUM': '#306596',\r\n 'LOW': '#667FAF',\r\n 'defaultFill': '#3F4C59'\r\n }\r\n\r\n //data: ShippingDetailsService.getLegend(),\r\n };\r\n\r\n $scope.mapPlugins = {\r\n arc: null,\r\n shippingDetailsLegend: function(layer, data, options){\r\n var html = ['<ul class=\"list-inline\">'],\r\n label = '';\r\n for (var lanePair in this.options.data) {\r\n var d = this.options.data;\r\n $log.debug(lanePair.name);\r\n html.push('<li class=\"key\" ',\r\n 'style=\"border-top: 10px solid '+d[lanePair].color+'\">',\r\n d[lanePair].origin+'<->'+d[lanePair].destination,\r\n '</li>');\r\n }\r\n html.push('</ul>');\r\n d3.select(this.options.element).append('div')\r\n .attr('class', 'datamaps-legend')\r\n .html(html.join(''));\r\n },\r\n shippingDetailsPin: function(layer, data, options) {\r\n var self = this;\r\n var height = 28, width = 22;\r\n var pins = layer.selectAll(\"g.node\")\r\n .data(data)\r\n .enter()\r\n .append(\"g\")\r\n\r\n .attr(\"transform\", function (d){\r\n var pos = self.latLngToXY(d.latitude, d.longitude),\r\n x = (pos[0] - width/2), y = (pos[1] - height/2 - 7);\r\n if (isNaN(x) || isNaN(y)) return 'translate(0, 0)';\r\n return \"translate(\"+x+\",\"+y+\")\";\r\n });\r\n pins.append(\"svg:image\")\r\n .attr(\"xlink:href\",\"/app/components/svg/pin.svg\")\r\n .attr(\"width\", width)\r\n .attr(\"height\", height);\r\n\r\n window.addEventListener('resize', function(event){\r\n pins.attr(\"transform\", function (d){\r\n var pos = self.latLngToXY(d.latitude, d.longitude),\r\n x = (pos[0] - width/2), y = (pos[1] - height/2 - 7);\r\n if (isNaN(x) || isNaN(y)) return 'translate(0, 0)';\r\n return \"translate(\"+x+\",\"+y+\")\";\r\n });\r\n });\r\n }\r\n };\r\n $scope.mapPluginData = {\r\n arc: ShippingDetailsService.getArc(),\r\n shippingDetailsPin: ShippingDetailsService.getPins(),\r\n };\r\n }\r\n}) ();\r\n\n/**\r\n * @ngdoc method\r\n * @ngname ContainerDetailsService.getTableData\r\n * @description returns table data\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .service('ContainerDetailsService', ContainerDetailsService);\r\n\r\n /** @ngInject */\r\n ContainerDetailsService.$inject = ['$http', '$log', 'api'];\r\n function ContainerDetailsService($http, $log, api) {\r\n \r\n var tableData = {\r\n event1: {\r\n name: 'name1',\r\n date: 'date1',\r\n time: 'time1'\r\n },\r\n event2: {\r\n name: 'name2',\r\n date: 'date2',\r\n time: 'time2'\r\n },\r\n event3: {\r\n name: 'name3',\r\n date: 'date3',\r\n time: 'time3'\r\n },\r\n event4: {\r\n name: 'name4',\r\n date: 'date4',\r\n time: 'time4'\r\n }\r\n };\r\n\r\n return {\r\n getTableData: function() {\r\n return tableData;\r\n }\r\n };\r\n }\r\n})();\n/**\r\n * @ngdoc method\r\n * @ngname ContainerDetailsController.closeContainerDetails\r\n * @description closes the modal for the container details\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .controller('ContainerDetailsController', ContainerDetailsController);\r\n\r\n /** @ngInject */\r\n ContainerDetailsController.$inject = ['ContainerDetailsService', '$log', '$mdDialog','$translatePartialLoader', '$scope' ];\r\n function ContainerDetailsController(ContainerDetailsService, $log, $mdDialog, $translatePartialLoader, $scope) {\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('shippingdetails');\r\n\r\n /* variables */\r\n var vm = this;\r\n vm.data = ContainerDetailsService.getTableData();\r\n\r\n /* functins */\r\n vm.closeContainerDetails = closeContainerDetails;\r\n\r\n function closeContainerDetails() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n }\r\n})();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .directive('lensview', lensview)\r\n .controller('lensviewController', lensviewController);\r\n\r\n\r\n /* @ngInject */\r\n function lensview() {\r\n\r\n var directive = {\r\n link: link,\r\n restrict: 'EA',\r\n templateUrl: '/app/layout/lensview/lensview.html',\r\n controller: lensviewController,\r\n controllerAs: 'vm',\r\n scope: {\r\n whenDoneAnimating: '&?',\r\n readOnlyView:\"=\"\r\n }\r\n };\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n\r\n }\r\n }\r\n\r\n angular.module('app.layout').directive('focus',\r\n function($timeout) {\r\n return {\r\n scope : {\r\n trigger : '@focus'\r\n },\r\n link : function(scope, element) {\r\n scope.$watch('trigger', function(value) {\r\n if (value === \"true\") {\r\n element[0].focus();\r\n }\r\n });\r\n }\r\n };\r\n });\r\n\r\n\r\n angular.module('app.layout').filter('strLimit', function () {\r\n\r\n return function (input, maxCharacters) {\r\n\r\n if (input == null || input=='') return \"\";\r\n\r\n input = \"\" + input;\r\n input = input.trim();\r\n\r\n if (input.length <= maxCharacters) return input;\r\n input = input.substring(0, maxCharacters);\r\n\r\n var lastSpace = input.lastIndexOf(\" \");\r\n if (lastSpace > -1) input = input.substr(0, lastSpace);\r\n\r\n return input + '...';\r\n };\r\n });\r\n\r\n\r\n lensviewController.$inject = ['$scope', '$window', '$rootScope', '$location', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http','$state' ,'$stateParams','NgTableParams' , 'api','lensviewService', 'CompanyManagementService', 'UserManagementService', 'LensviewCompanyPopUpService', 'lensviewUsersPopupService','userLensGroupService', '$filter','ngTableEventsChannel','UserService','mdSelectHelper'];\r\n function lensviewController($scope, $window, $rootScope, $location, $mdDialog, $mdMedia, $mdToast, $q, $http, $state, $stateParams, NgTableParams, api, lensviewService ,CompanyManagementService, UserManagementService, LensviewCompanyPopUpService, lensviewUsersPopupService, userLensGroupService, $filter,ngTableEventsChannel,UserService,mdSelectHelper){\r\n var vm = this;\r\n vm.saveBtnShow = false;\r\n vm.showLensview = showLensview;\r\n vm.clearSwitchEmail = clearSwitchEmail;\r\n vm.resetList=resetList;\r\n vm.showLoader = false;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.getMatches = getMatches;\r\n vm.searchFlag = false;\r\n vm.cancel = cancel;\r\n vm.search_lens = search_lens;\r\n vm.updateAccount = updateAccount;\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.getClass = getClass;\r\n vm.selectUser = selectUser;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.lensGroupTableDataByName = lensGroupTableDataByName;\r\n vm.resetSelected = resetSelected;\r\n vm.gotoSelectUser = gotoSelectUser;\r\n vm.isCreate = true;\r\n vm.loadRecent = loadRecent;\r\n vm.loadFavorites = loadFavorites;\r\n vm.switchEmail = '';\r\n vm.userCompany = '';\r\n vm.userDepartment = '';\r\n vm.checkAll = checkAll;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.closeModal = closeModal;\r\n vm.showModal = showModal;\r\n vm.removeElem = removeElem;\r\n vm.admin_check=admin_check;\r\n vm.bulkDeleteLensGroup = bulkDeleteLensGroup;\r\n vm.searchListData = search_companieslens;\r\n vm.globals={};\r\n vm.getList = [];\r\n vm.shiplnkTextDataVal = false;\r\n vm.notValidDemoEmail=true;\r\n vm.globals.tableParams1 = new NgTableParams({}, {\r\n debugId: \"Table 1\",\r\n dataset: []\r\n });\r\n vm.currentUser = UserService.getUserData();\r\n\r\n if((vm.currentUser.lens_grp_manage.cww ? ((vm.currentUser.lens_grp_manage.cww == true) ? true : false) : false) ||\r\n (vm.currentUser.lens_grp_manage.csl ? ((vm.currentUser.lens_grp_manage.csl == true) ? true : false) : false) ||\r\n (vm.currentUser.lens_grp_manage.cfs ? ((vm.currentUser.lens_grp_manage.cfs == true) ? true : false) : false) ||\r\n (vm.currentUser.lens_grp_manage.cmts ? ((vm.currentUser.lens_grp_manage.cmts == true) ? true : false) : false)){\r\n vm.lens_grp_manage = true;\r\n }else{\r\n vm.lens_grp_manage = false;\r\n }\r\n\r\n //vm.lens_mode_view = JSON.parse(localStorage.getItem(\"user\")).lens_mode_view;\r\n try{\r\n //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if(JSON.parse(localStorage.getItem(\"user\")).permissions.cww.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.csl.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.cmts.Company.includes('read')){\r\n vm.readAccessLens = true;\r\n }else{\r\n vm.readAccessLens = false;\r\n }\r\n }\r\n catch(e){\r\n vm.readAccessLens = false;\r\n }\r\n\r\n try{\r\n //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if((JSON.parse(localStorage.getItem(\"user\")).lens_mode_view.cww == true) || (JSON.parse(localStorage.getItem(\"user\")).lens_mode_view.csl == true) || (JSON.parse(localStorage.getItem(\"user\")).lens_mode_view.cfs == true) || (JSON.parse(localStorage.getItem(\"user\")).lens_mode_view.cmts == true) ){\r\n vm.lens_mode_view = true;\r\n }else{\r\n vm.lens_mode_view = false;\r\n }\r\n }\r\n catch(e){\r\n vm.lens_mode_view = false;\r\n }\r\n\r\n // CWW Demo Permission\r\n try{\r\n if(vm.currentUser.permissions!=undefined && vm.currentUser.permissions.cww.User.includes('demo')){\r\n vm.demoCWW = true;\r\n }\r\n }\r\n catch(e){\r\n vm.demoCWW = false;\r\n }\r\n\r\n // CSL Demo Permission\r\n try{\r\n if(vm.currentUser.permissions!=undefined && vm.currentUser.permissions.csl.User.includes('demo')){\r\n vm.demoCSL = true;\r\n }\r\n }\r\n catch(e){\r\n vm.demoCSL = false;\r\n }\r\n\r\n // CFS Demo Permission\r\n try{\r\n if(vm.currentUser.permissions!=undefined && vm.currentUser.permissions.cfs.User.includes('demo')){\r\n vm.demoCFS = true;\r\n }\r\n }\r\n catch(e){\r\n vm.demoCFS = false;\r\n }\r\n\r\n // CMTS Demo Permission\r\n try{\r\n if(vm.currentUser.permissions!=undefined && vm.currentUser.permissions.cmts.User.includes('demo')){\r\n vm.demoCMTS = true;\r\n }\r\n }\r\n catch(e){\r\n vm.demoCMTS = false;\r\n }\r\n // default shiplink company\r\n\r\n if($state.current.name == 'shiplink'){\r\n var id = vm.currentUser.id;\r\n var url = api.url_v2 + '/users/'+id+'/ship_link_default';\r\n $http.get(url).then(function(response){\r\n vm.defaultShiLinkData = response.data;\r\n if(isEmpty(vm.defaultShiLinkData)){\r\n vm.shiplinkDefault = false;\r\n vm.setDefaultText = false;\r\n vm.clearText = false;\r\n vm.defaultbtn = false;\r\n }else{\r\n vm.customer_type = vm.defaultShiLinkData.company_customer_type;\r\n vm.customer_type_default = vm.defaultShiLinkData.company_customer_type;\r\n vm.searchText = vm.defaultShiLinkData.company_name;\r\n vm.default_company_name = vm.defaultShiLinkData.company_name;\r\n vm.company_name = vm.defaultShiLinkData.company_name;\r\n vm.company_id = vm.defaultShiLinkData.company_id;\r\n vm.shiplinkDefault = true;\r\n vm.setDefaultText = false;\r\n vm.clearText = true;\r\n vm.defaultbtn = true;\r\n }\r\n\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n\r\n var urlText = api.url_v2 + '/users/'+id+'/ship_link_text';\r\n $http.get(urlText).then(function(response){\r\n vm.shiplnkTextData = response.data;\r\n if(isEmpty(vm.shiplnkTextData)){\r\n vm.shiplinktext = \"\";\r\n }else{\r\n vm.shiplinktext = response.data.default_text;\r\n vm.shipLinkDef = \"link data\";\r\n }\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n\r\n\r\n\r\n }\r\n\r\n if($state.current.name == 'shiplinktext'){\r\n var id = vm.currentUser.id;\r\n var url = api.url_v2 + '/users/'+id+'/ship_link_text';\r\n $http.get(url).then(function(response){\r\n vm.shiplnkTextData = response.data;\r\n vm.shiplinktext = response.data.default_text;\r\n if(isEmpty(vm.shiplnkTextData)){\r\n vm.shiplnkTextDataVal = false;\r\n }else{\r\n vm.shiplnkTextDataVal = true;\r\n }\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n }\r\n\r\n //end\r\n\r\n vm.role_count = 0;\r\n\r\n if(vm.currentUser.permissions.cfs && vm.currentUser.permissions.csl && vm.currentUser.permissions.cww && vm.currentUser.permissions.cmts){\r\n vm.role_count = 4;\r\n } else if((vm.currentUser.permissions.cfs && vm.currentUser.permissions.csl && vm.currentUser.permissions.cww) || (vm.currentUser.permissions.cfs && vm.currentUser.permissions.csl && vm.currentUser.permissions.cmts) || (vm.currentUser.permissions.cww && vm.currentUser.permissions.csl && vm.currentUser.permissions.cmts) || (vm.currentUser.permissions.cww && vm.currentUser.permissions.cfs && vm.currentUser.permissions.cmts)){\r\n vm.role_count = 3;\r\n } else if((vm.currentUser.permissions.cfs && vm.currentUser.permissions.csl) || (vm.currentUser.permissions.cfs && vm.currentUser.permissions.cww) || (vm.currentUser.permissions.cww && vm.currentUser.permissions.csl) || (vm.currentUser.permissions.cfs && vm.currentUser.permissions.cmts) || (vm.currentUser.permissions.csl && vm.currentUser.permissions.cmts) || (vm.currentUser.permissions.cww && vm.currentUser.permissions.cmts)){\r\n vm.role_count = 2;\r\n }else{\r\n vm.role_count = 1;\r\n\r\n }\r\n\r\n if(vm.role_count == 1){\r\n\r\n if(vm.currentUser.permissions.cfs){\r\n vm.customer_type = 'cfs';\r\n }else if(vm.currentUser.permissions.csl){\r\n vm.customer_type = 'csl';\r\n }else if(vm.currentUser.permissions.cmts) {\r\n vm.customer_type = 'cmts';\r\n }else{\r\n vm.customer_type = 'cww';\r\n }\r\n\r\n }\r\n\r\n if(vm.readAccessLens && $state.current.name == \"showCompany\"){\r\n var columns = [\r\n {\"field\": \"name\", \"title\": 'ADMIN.LENS.NAME', \"sortable\": \"name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"company_count\", \"title\": 'ADMIN.LENS.OF_COMPANIES', \"sortable\": \"company_count\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"description\", \"title\": 'ADMIN.LENS.DESCRIPTION', \"sortable\": \"description\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n ];\r\n }else{\r\n var columns = [\r\n {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"name\", \"title\": 'ADMIN.LENS.NAME', \"sortable\": \"name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"company_count\", \"title\": 'ADMIN.LENS.OF_COMPANIES', \"sortable\": \"company_count\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"description\", \"title\": 'ADMIN.LENS.DESCRIPTION', \"sortable\": \"description\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n ];\r\n }\r\n\r\n\r\n if(vm.lens_grp_manage && !vm.readAccessLens && $state.current.name == \"showCompany\")\r\n {\r\n columns.push({\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false})\r\n }else if(vm.lens_grp_manage && $state.current.name != \"showCompany\")\r\n {\r\n columns.push({\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false})\r\n }\r\n\r\n if(vm.lens_grp_manage && !vm.readAccessLens && $state.current.name == \"showCompany\")\r\n {\r\n vm.readlens = true;\r\n }else\r\n {\r\n vm.readlens = false;\r\n }\r\n if(vm.lens_grp_manage && $state.current.name != \"showCompany\")\r\n {\r\n vm.readlens = true;\r\n }\r\n\r\n vm.columns = columns;\r\n vm.currentstate = $state.current.name;\r\n vm.admin_check = vm.admin_check();\r\n vm.all_client_id = null;\r\n vm.getMatchesCompanies = getMatchesCompanies;\r\n vm.selectedCompanyChange = selectedCompanyChange;\r\n vm.setDefaultCompany = setDefaultCompany;\r\n vm.clearDefaultCompany = clearDefaultCompany;\r\n vm.cancelDefaultCompany = cancelDefaultCompany;\r\n vm.selectedDepartmentChange = selectedDepartmentChange;\r\n vm.selectedCusTypeChange = selectedCusTypeChange;\r\n vm.selectedUserChange = selectedUserChange;\r\n vm.getMatchesDepartments = getMatchesDepartments;\r\n vm.getShipmentLink = getShipmentLink;\r\n vm.selectedLinkChanges = selectedLinkChanges;\r\n vm.selectedUrlLinkChanges = selectedUrlLinkChanges;\r\n vm.resetSelection = resetSelection;\r\n vm.resetSelectionCompany = resetSelectionCompany;\r\n vm.awb_with_gspid_autocomplete = [];\r\n vm.addDepartments = addDepartments;\r\n vm.removeDepartments = removeDepartments;\r\n vm.demoEmail = '';\r\n vm.removeCompany = removeCompany;\r\n vm.defaultRole = null;\r\n vm.changeCompany = changeCompany;\r\n $scope.companyId = \"\";\r\n $scope.companyName = \"\";\r\n $scope.portalType = \"\";\r\n $scope.departmentCheck = true;\r\n vm.getDepartments = getDepartments;\r\n vm.submitShiplinkText = submitShiplinkText;\r\n vm.openShipLink = openShipLink;\r\n vm.defaultDemoType = (localStorage.getItem('demoTypeDefault') ? localStorage.getItem('demoTypeDefault') : 'cww');\r\n\r\n if($state.current.name == 'demo'){\r\n $rootScope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n //vm.customer_type = 'none';\r\n if(vm.role_count == 1){\r\n if(vm.currentUser.permissions.cfs){\r\n vm.customer_type = 'cfs';\r\n }else if(vm.currentUser.permissions.csl){\r\n vm.customer_type = 'csl';\r\n }else if(vm.currentUser.permissions.cmts){\r\n vm.customer_type = 'cmts';\r\n }else{\r\n vm.customer_type = 'cww';\r\n }\r\n }else{\r\n vm.customer_type = vm.defaultDemoType;\r\n }\r\n var res = lensviewService.getRoles(vm.customer_type);\r\n res.then(function(dd){\r\n vm.roles = dd;\r\n vm.defaultRole = vm.roles[0].value;\r\n });\r\n });\r\n }\r\n\r\n $scope.$on('saveBtnChecking', function(evt, loading){\r\n if(loading == undefined){\r\n vm.saveBtnShow = false;\r\n }else{\r\n vm.saveBtnShow = loading;\r\n }\r\n\r\n });\r\n lensviewService.setUserAddCheck();\r\n\r\n vm.mangaeLensGroupCheck = vm.lens_grp_manage;\r\n\r\n if($state.current.name =='showUser'){\r\n vm.showLensText = true;\r\n }\r\n\r\n function admin_check(){\r\n //if(($state.current.templateUrl).startsWith(\"/app/admin\") || ($state.current.templateUrl).startsWith(\"/app/user\")){\r\n if((($state.current.templateUrl).indexOf(\"/app/admin\") == 0) || (($state.current.templateUrl).indexOf(\"/app/user\") == 0)){\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n\r\n ///\r\n\r\n /*vm.adminMenuItems = [\r\n {url: '/potential-exceptions', title: 'ADMIN.POTENTIAL.POTENTIAL_EXCEPTIONS', icon: '', menuGroup: menuGroups.admin.potentialExceptions, permission: permissions.potentialExceptions.read, active: false },\r\n {url: '/users', title: 'USER.USERS', icon: '', menuGroup: menuGroups.admin.user, permission: permissions.user.manage, active: false },\r\n {url: '/companies', title: 'COMPANY.COMPANIES', icon: '', menuGroup: menuGroups.admin.company, permission: permissions.company.manage, active: false },\r\n {url: '/groups', title: 'ADMIN.GROUPS.GROUPS', icon: '', menuGroup: menuGroups.admin.groups, permission: permissions.groups.manage, active: false },\r\n {url: '/lensgroups', title: 'Lens Groups', icon: '', menuGroup: menuGroups.admin.lensgroup, permission: permissions.lensgroup.manage, active: false }\r\n ];*/\r\n\r\n /*vm.hello=function(title){\r\n for (i = 0; i < vm.adminMenuItems.length; i++) {\r\n if(vm.adminMenuItems[i].title==title){\r\n vm.selecteditem=true;\r\n\r\n }\r\n } //return selecteditem;\r\n return vm.selecteditem;\r\n };\r\n */\r\n\r\n\r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClient = [];\r\n vm.showAllClientOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientFlag = false;\r\n\r\n vm.showAllClientCsl = [];\r\n vm.showAllClientOrgCsl = [];\r\n vm.showAllClientFlagCsl = false;\r\n\r\n vm.showAllClientCfs = [];\r\n vm.showAllClientOrgCfs = [];\r\n vm.showAllClientFlagCfs = false;\r\n\r\n vm.showAllClientCmts = [];\r\n vm.showAllClientOrgCmts = [];\r\n vm.showAllClientFlagCmts = false;\r\n\r\n vm.addAllClientRow = addAllClientRow;\r\n\r\n function subscribeToTable(tableParams){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n angular.forEach(p2,function(v,k){\r\n if(v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientOrg,vm.showAllClient);\r\n angular.copy(vm.showAllClientOrgCsl,vm.showAllClientCsl);\r\n angular.copy(vm.showAllClientOrgCfs,vm.showAllClientCfs);\r\n angular.copy(vm.showAllClientOrgCmts,vm.showAllClientCmts);\r\n }\r\n else{\r\n vm.showAllClient= [];\r\n vm.showAllClientCsl= [];\r\n vm.showAllClientCfs= [];\r\n vm.showAllClientCmts= [];\r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.lensGroupTable.data, function(v,k){\r\n if(v.selected || v.name ==\"ALL CLIENTS CWW\" || v.name ==\"ALL CLIENTS CFS\" || v.name ==\"ALL CLIENTS CSL\"|| v.name ==\"ALL CLIENTS CMTS\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.lensGroupTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if($state.current.name == 'showUser' || $state.current.name == 'createUser'){\r\n\r\n $rootScope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n\r\n var res = userLensGroupService.getLensGroups($stateParams.id);\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n }\r\n\r\n if($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n\r\n $rootScope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n\r\n var res = CompanyManagementService.getCompanies('lens_group_companies');\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n }\r\n\r\n\r\n\r\n if($state.current!=undefined && $state.current.name =='showCompany'){\r\n //vm.columns.push({\"field\":\"actionremove\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false});\r\n vm.selectAll = false;\r\n }\r\n\r\n vm.buttons = [\r\n {id: 0, action: add_lens, display: 'ADMIN.LENS.ADD_LENSGROUP', icon: ''},\r\n {id: 1, action: search_lens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n\r\n if(vm.lens_grp_manage && !vm.readAccessLens && $state.current.name == \"showCompany\")\r\n {\r\n vm.lensGroupButtons = [\r\n {id: 0, action: addGroupsInUsers, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n {id: 1, action: searchGroups, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n }else\r\n {\r\n vm.lensGroupButtons = [\r\n {id: 1, action: searchGroups, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n }\r\n if(vm.lens_grp_manage && $state.current.name != \"showCompany\")\r\n {\r\n vm.lensGroupButtons = [\r\n {id: 0, action: addGroupsInUsers, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n {id: 1, action: searchGroups, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n }\r\n\r\n // vm.lensGroupButtons = [\r\n // {id: 0, action: addGroupsInUsers, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n // {id: 1, action: searchGroups, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n // ];\r\n\r\n\r\n vm.icon=\"\";\r\n vm.lensviewtitle = \"Groups of Company data used in Lens Mode\";\r\n vm.lensviewtable = true;\r\n vm.switchUser = switchUser;\r\n vm.addToFavorites = addToFavorites;\r\n vm.focusSearchTxt = focusSearchTxt;\r\n vm.focusTxt = false;\r\n vm.readOnlyView = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n vm.userEmail = localStorage.user_emailId.split('@');\r\n vm.department_ids = [];\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.strickCheck = false;\r\n vm.shiplinktext = \"\";\r\n\r\n\r\n if(localStorage.switchEmail){\r\n vm.switchEmail = localStorage.switchEmail;\r\n }else if(localStorage.userCompany){\r\n vm.switchEmail = localStorage.userCompany;\r\n }else if(localStorage.userDepartment){\r\n vm.switchEmail = localStorage.userDepartmentCompanyName +'-'+ localStorage.userDepartment;\r\n }\r\n else{\r\n vm.switchEmail = '';\r\n }\r\n\r\n\r\n if($state.current.name == 'dashboard' || $state.current.name == 'track-trace' || $state.current.name == 'shipping-details'\r\n || $state.current.name == 'track-trace-booking' || $state.current.name == 'track-trace-transit'\r\n || $state.current.name == 'shipment-discussions'){\r\n vm.custType = \"cww\";\r\n if(localStorage.switchEmailCww){\r\n vm.CslDataSwitch = true;\r\n vm.strickCheck = false;\r\n }else{\r\n vm.strickCheck = true;\r\n }\r\n }\r\n else if($state.current.name == 'dashboardCsl' || $state.current.name == 'track-trace-csl' || $state.current.name == 'shipping-details-csl' || $state.current.name == 'shipment-discussions-csl'){\r\n vm.custType = \"csl\";\r\n if(localStorage.switchEmailCsl){\r\n vm.CslDataSwitch = true;\r\n vm.strickCheck = false;\r\n }else{\r\n vm.strickCheck = true;\r\n }\r\n }\r\n else if($state.current.name == 'dashboardCfs' || $state.current.name == 'track-trace-cfs' || $state.current.name == 'shipping-details-cfs'){\r\n vm.custType = \"cfs\";\r\n if(localStorage.switchEmailCfs){\r\n vm.CslDataSwitch = true;\r\n vm.strickCheck = false;\r\n }else{\r\n vm.strickCheck = true;\r\n }\r\n }\r\n else if($state.current.name == 'dashboardCmts' || $state.current.name == 'track-trace-cmts' || $state.current.name == 'shipping-details-cmts'){\r\n vm.custType = \"cmts\";\r\n if(localStorage.switchEmailCmts){\r\n vm.CslDataSwitch = true;\r\n vm.strickCheck = false;\r\n }else{\r\n vm.strickCheck = true;\r\n }\r\n }else\r\n {\r\n vm.custType = \"none\";\r\n }\r\n\r\n\r\n function resetList(){\r\n //// console.log(vm.autocompleteData )\r\n vm.autocompleteData = [];\r\n vm.serachData=[];\r\n\r\n }\r\n\r\n function openShipLink(link){\r\n if(link){\r\n $window.open(link, '_blank');\r\n }\r\n }\r\n\r\n function submitShiplinkText(val){\r\n\r\n var id = vm.currentUser.id;\r\n var url = api.url_v2 + '/users/'+id+'/ship_link_text';\r\n var query = {'default_text': val};\r\n\r\n if(!vm.shiplnkTextDataVal){\r\n $http.post(url, query).then(function(response){\r\n return response.data;\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n }else{\r\n $http.put(url, query).then(function(response){\r\n return response.data;\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n }\r\n\r\n }\r\n\r\n function deleteShiplinkText(){\r\n if(vm.customer_type_default == vm.customer_type){ vm.setDefaultText = true; }else{ vm.setDefaultText = false; }\r\n vm.clearText = false;\r\n vm.defaultbtn = false;\r\n vm.shiplinkDefault = false;\r\n\r\n var id = vm.currentUser.id;\r\n var url = api.url_v2 + '/users/'+id+'/ship_link_text';\r\n //var query = {'company_id': \"\", 'company_name': \"\", 'company_customer_type': \"\"};\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n }\r\n }).then(function(response){\r\n vm.shiplnkTextData = response.data;\r\n vm.shiplinktext = \"\";\r\n vm.shiplnkTextDataVal = false;\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n }\r\n\r\n function changeCompany(display,value,type){\r\n $scope.companyId = value;\r\n $scope.companyName = display;\r\n $scope.portalType = type;\r\n $scope.departmentCheck = false;\r\n vm.serachDataCompany = display;\r\n\r\n }\r\n\r\n function focusSearchTxt(){\r\n // angular.element(\"#lensviewsearch\").focus();\r\n vm.focusTxt = true;\r\n }\r\n\r\n function showLensview(ev) {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/layout/lensview/lensview-modal1.html',\r\n parent: angular.element(document.body),\r\n\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n }\r\n\r\n function clearSwitchEmail(){\r\n localStorage.removeItem('switchEmail');\r\n localStorage.removeItem('userCompany');\r\n localStorage.removeItem('userDepartment');\r\n localStorage.removeItem('userDepartmentCompany');\r\n localStorage.removeItem('userDepartmentCompanyName');\r\n localStorage.removeItem('switchEmailCww');\r\n localStorage.removeItem('switchEmailCsl');\r\n localStorage.removeItem('switchEmailCfs');\r\n localStorage.removeItem('switchEmailCmts');\r\n\r\n localStorage.removeItem('switchEmailCwwType');\r\n localStorage.removeItem('switchEmailCslType');\r\n localStorage.removeItem('switchEmailCfsType');\r\n localStorage.removeItem('switchEmailCmtsType');\r\n\r\n localStorage.removeItem('userCompanyCww');\r\n localStorage.removeItem('userCompanyCsl');\r\n localStorage.removeItem('userCompanyCfs');\r\n localStorage.removeItem('userCompanyCmts');\r\n\r\n localStorage.removeItem('userDepartmentCww');\r\n localStorage.removeItem('userDepartmentCsl');\r\n localStorage.removeItem('userDepartmentCfs');\r\n localStorage.removeItem('userDepartmentCmts');\r\n\r\n localStorage.removeItem('userDepartmentCompanyCww');\r\n localStorage.removeItem('userDepartmentCompanyCsl');\r\n localStorage.removeItem('userDepartmentCompanyCfs');\r\n localStorage.removeItem('userDepartmentCompanyCmts');\r\n\r\n localStorage.removeItem('userDepartmentCompanyNameCww');\r\n localStorage.removeItem('userDepartmentCompanyNameCsl');\r\n localStorage.removeItem('userDepartmentCompanyNameCfs');\r\n localStorage.removeItem('userDepartmentCompanyNameCmts');\r\n\r\n localStorage.removeItem('consigneePortal');\r\n localStorage.removeItem('bookingEnable');\r\n localStorage.removeItem('dataswitchEnable');\r\n\r\n localStorage.removeItem('customerType');\r\n vm.switchEmail = '';\r\n $state.reload();\r\n }\r\n\r\n\r\n function loadRecent(){\r\n vm.focusTxt = false;\r\n vm.zeroRecord = \"\";\r\n var data = localStorage.user;\r\n data = JSON.parse(data);\r\n //lens_group_recents?user_id=56\r\n var url = api.url_v2+\"/lens_group_recents?user_id=\"+data.id+\"&customer_type=\"+vm.custType;\r\n $http.get(url).then(function(response){\r\n // console.log(response);\r\n vm.recentSearch = response.data.lens_groups;\r\n });\r\n\r\n\r\n\r\n\r\n }\r\n\r\n function loadFavorites(){\r\n vm.focusTxt = false;\r\n vm.zeroRecord = \"\";\r\n var data = localStorage.user;\r\n data = JSON.parse(data);\r\n //lens_group_recents?user_id=56\r\n var url = api.url_v2+\"/lens_group_recents?user_id=\"+data.id+\"&customer_type=\"+vm.custType;\r\n vm.recentSearch = [];\r\n $http.get(url).then(function(response){\r\n // console.log(response);\r\n angular.forEach(response.data.lens_groups,function(data){\r\n\r\n if(data.favourite !=null){\r\n vm.recentSearch.push(data);\r\n }\r\n\r\n });\r\n //vm.recentSearch = response.data.lens_groups;\r\n });\r\n\r\n }\r\n\r\n function cancel() {\r\n if(vm.lensGroupTable!=undefined){\r\n angular.forEach(vm.lensGroupTable.data, function(v,k){\r\n vm.lensGroupTable.data[k].selected = false;\r\n });\r\n }\r\n $mdDialog.cancel();\r\n }\r\n function search_companieslens(isClear){\r\n\r\n var search = {};\r\n\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n if(search.company_count){\r\n search.company_count = search.company_count.toUpperCase();\r\n\r\n if((\"ALL CLIENTS CWW\").indexOf(search.company_count) != -1){\r\n\r\n\r\n if(vm.lensGroupTable!=undefined){\r\n angular.forEach(vm.lensGroupTable.data, function(v,k){\r\n if(v.name==='ALL CLIENTS CWW')\r\n search.company_count = vm.lensGroupTable.data[k].company_count;\r\n });\r\n }\r\n }\r\n }\r\n\r\n $location.search(search);\r\n if($state.current.name=='lensgroup')\r\n lensviewService.setQuery(search);\r\n else{\r\n vm.lensGroupTable.filter({});\r\n vm.lensGroupTable.filter(search)\r\n vm.lensGroupTable.page(1)\r\n vm.lensGroupTable.reload();\r\n }\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, messages, delay) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: delay ? delay : 10000*3000,\r\n preserveScope: true,\r\n templateUrl: '/app/layout/lensview/lensview-modal.html',\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n\r\n function addDepartments(ids){\r\n vm.depart_names = \"\";\r\n //// console.log(ids);\r\n for( var j=0; j<ids.length; j++){\r\n vm.depart_names += ids[j]+'$';\r\n }\r\n if(vm.company_name != \"\"){\r\n vm.depart_names = vm.depart_names.replace(/ /g,\"_\").slice(0, -1) +'%'+vm.defaultRole;\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"#\"+vm.company_name+\"$\"+vm.depart_names+\"@\"+vm.userEmail[1];\r\n }\r\n else\r\n {\r\n vm.depart_names = vm.depart_names.replace(/ /g,\"_\").slice(0, -1) +'%'+vm.defaultRole;\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"$\"+vm.depart_names+\"@\"+vm.userEmail[1];\r\n }\r\n }\r\n\r\n function removeDepartments(ids){\r\n vm.depart_names = \"\";\r\n //// console.log(ids);\r\n for( var j=0; j<ids.length; j++){\r\n vm.depart_names += ids[j]+'$';\r\n }\r\n if(ids.length > 0){\r\n if(vm.company_name != \"\"){\r\n vm.depart_names = vm.depart_names.replace(/ /g,\"_\").slice(0, -1) +'%'+vm.defaultRole;\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"#\"+vm.company_name+\"$\"+vm.depart_names+\"@\"+vm.userEmail[1];\r\n }\r\n else\r\n {\r\n vm.depart_names = vm.depart_names.replace(/ /g,\"_\").slice(0, -1) +'%'+vm.defaultRole;\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"$\"+vm.depart_names+\"@\"+vm.userEmail[1];\r\n }\r\n }\r\n else\r\n {\r\n if(vm.company_name != \"\"){\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"#\"+vm.company_name+\"%\"+vm.defaultRole+\"@\"+vm.userEmail[1];\r\n }\r\n else\r\n {\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"%\"+vm.defaultRole+\"@\"+vm.userEmail[1];\r\n }\r\n }\r\n }\r\n\r\n function removeCompany(){\r\n //// console.log('ererererr');\r\n vm.department_ids = [];\r\n }\r\n\r\n\r\n function getMatchesCompanies(key, searchText){\r\n var dfd = $q.defer();\r\n if(searchText.length>2){\r\n var query = {field: key, value: searchText, customer_type:vm.customer_type};\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n else\r\n return dfd.resolve([]);\r\n }\r\n\r\n\r\n function selectedCusTypeChange(customer_type){\r\n vm.notValidDemoEmail=true;\r\n if($state.current.name == 'shiplink'){\r\n var id = vm.currentUser.id;\r\n var url = api.url_v2 + '/users/'+id+'/ship_link_default';\r\n $http.get(url).then(function(response){\r\n vm.defaultShiLinkData = response.data;\r\n if(isEmpty(vm.defaultShiLinkData)){\r\n if(vm.customer_type_default == vm.customer_type){\r\n vm.shiplinkDefault = false;\r\n vm.setDefaultText = false;\r\n vm.clearText = false;\r\n vm.defaultbtn = false;\r\n }\r\n }else{\r\n if(vm.customer_type_default == vm.customer_type){\r\n vm.shiplinkDefault = true;\r\n vm.setDefaultText = false;\r\n vm.clearText = true;\r\n vm.defaultbtn = true;\r\n }\r\n }\r\n\r\n }, function errorCallback(error){\r\n vm.notValidDemoEmail=true;\r\n return error;\r\n });\r\n }\r\n\r\n vm.customer_type=customer_type;\r\n vm.shipLink = '';\r\n vm.selected_awb_autocomplete = [];\r\n if(vm.customer_type!=undefined){\r\n var res = lensviewService.getRoles(vm.customer_type);\r\n res.then(function(dd){\r\n vm.roles = dd;\r\n vm.defaultRole = vm.roles[0].value;\r\n });\r\n vm.company_name='';\r\n vm.depart_names='';\r\n vm.department_ids=[];\r\n vm.searchText='';\r\n vm.searchTextDepart='';\r\n vm.setDefaultText = false;\r\n vm.clearText = false;\r\n vm.defaultbtn = false;\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"@\"+vm.userEmail[1];\r\n }\r\n\r\n if(vm.customer_type!=undefined && vm.customer_type!='' && vm.customer_type!=null\r\n && vm.company_name!=undefined && vm.company_name!='' && vm.company_name!=null\r\n && vm.defaultRole!=undefined && vm.defaultRole!='' && vm.defaultRole!=null ){\r\n vm.notValidDemoEmail=false;\r\n }\r\n }\r\n\r\n function selectedCompanyChange(item) {\r\n vm.notValidDemoEmail=true;\r\n\r\n if(item != undefined){\r\n if(vm.shiplinkDefault){\r\n vm.setDefaultText = true;\r\n if(vm.customer_type_default == vm.customer_type){ vm.defaultbtn = true; }else{ vm.defaultbtn = false; }\r\n //vm.defaultbtn = true;\r\n vm.clearText = false;\r\n vm.default_company_name = vm.default_company_name;\r\n }\r\n else{\r\n if(vm.customer_type_default == vm.customer_type){ vm.setDefaultText = false; }else{ vm.setDefaultText = true; }\r\n vm.default_company_name = item.display;\r\n }\r\n\r\n vm.company_id = item.value;\r\n vm.company_name = item.display.replace(/ /g,\"_\");\r\n //vm.default_company_name = item.display;\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"#\"+vm.company_name+\"%\"+vm.defaultRole+\"@\"+vm.userEmail[1];\r\n }\r\n else if(item == undefined){\r\n if(vm.customer_type_default == vm.customer_type){\r\n vm.defaultbtn = true;\r\n vm.clearText = true; }\r\n else{\r\n vm.defaultbtn = false;\r\n vm.clearText = false;\r\n }\r\n vm.setDefaultText = false;\r\n //vm.defaultbtn = false;\r\n //vm.clearText = false;\r\n vm.company_name = \"\";\r\n vm.company_id = undefined;\r\n vm.department_ids = [];\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"%\"+vm.defaultRole+\"@\"+vm.userEmail[1];\r\n }\r\n resetSelectionCompany();\r\n\r\n if(vm.customer_type!=undefined && vm.customer_type!='' && vm.customer_type!=null\r\n && vm.company_name!=undefined && vm.company_name!='' && vm.company_name!=null\r\n && vm.defaultRole!=undefined && vm.defaultRole!='' && vm.defaultRole!=null ){\r\n vm.notValidDemoEmail=false;\r\n }\r\n }\r\n\r\n function setDefaultCompany(){\r\n\r\n if(vm.shiplinkDefault){\r\n vm.clearText = true;\r\n vm.defaultbtn = true;\r\n vm.setDefaultText = false;\r\n vm.default_company_name = vm.searchText;\r\n }\r\n else{\r\n vm.setDefaultText = false;\r\n vm.clearText = true;\r\n vm.defaultbtn = true;\r\n vm.default_company_name = vm.searchText;\r\n }\r\n\r\n var id = vm.currentUser.id;\r\n var url = api.url_v2 + '/users/'+id+'/ship_link_default';\r\n var query = {'company_id': vm.company_id, 'company_name': vm.default_company_name, 'company_customer_type': vm.customer_type};\r\n\r\n\r\n if(!vm.shiplinkDefault){\r\n $http.post(url, query).then(function(response){\r\n //return response.data;\r\n vm.customer_type_default = response.data.company_customer_type;\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n }else{\r\n $http.put(url, query).then(function(response){\r\n //return response.data;\r\n vm.customer_type_default = response.data.company_customer_type;\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n }\r\n\r\n }\r\n\r\n function cancelDefaultCompany(){\r\n\r\n vm.setDefaultText = true;\r\n vm.clearText = false;\r\n vm.defaultbtn = false;\r\n }\r\n\r\n function clearDefaultCompany(){\r\n\r\n if(vm.customer_type_default == vm.customer_type){ vm.setDefaultText = true; }else{ vm.setDefaultText = false; }\r\n vm.clearText = false;\r\n vm.defaultbtn = false;\r\n vm.shiplinkDefault = false;\r\n\r\n var id = vm.currentUser.id;\r\n var url = api.url_v2 + '/users/'+id+'/ship_link_default';\r\n //var query = {'company_id': \"\", 'company_name': \"\", 'company_customer_type': \"\"};\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n }\r\n }).then(function(response){\r\n if(response.status == 204){\r\n vm.shiplinkDefault = false;\r\n vm.customer_type_default = \"\";\r\n if(vm.customer_type_default == vm.customer_type){\r\n vm.setDefaultText = true; }else{ vm.setDefaultText = false;vm.searchText=\"\"; }\r\n }\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n }\r\n\r\n function selectedDepartmentChange(item){\r\n vm.department_id = item.value;\r\n vm.department_name = item.display;\r\n }\r\n\r\n function selectedUserChange(value){\r\n vm.userrole = value;\r\n vm.defaultRole = value;\r\n vm.notValidDemoEmail=true;\r\n\r\n if(value != undefined){\r\n if(vm.depart_names != undefined && vm.depart_names != \"\"){\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"#\"+vm.company_name+\"$\"+vm.depart_names.slice(0, -2)+\"%\"+vm.defaultRole+\"@\"+vm.userEmail[1];\r\n }\r\n else\r\n {\r\n if(vm.company_name != undefined && vm.company_name != \"\"){\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"#\"+vm.company_name+\"%\"+vm.defaultRole+\"@\"+vm.userEmail[1];\r\n }\r\n else\r\n {\r\n if(vm.customer_type!=undefined && vm.customer_type!=\"none\")\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"%\"+vm.defaultRole+\"@\"+vm.userEmail[1];\r\n else\r\n vm.demoEmail = vm.userEmail[0]+\"%\"+vm.defaultRole+\"@\"+vm.userEmail[1];\r\n }\r\n }\r\n }\r\n else if(value == undefined){\r\n vm.userrole = \"\";\r\n if(vm.customer_type!=undefined)\r\n vm.demoEmail = vm.userEmail[0]+\"!\"+vm.customer_type+\"#\"+vm.company_name+\"$\"+vm.depart_names+\"@\"+vm.userEmail[1];\r\n else\r\n vm.demoEmail = vm.userEmail[0]+\"#\"+vm.company_name+\"$\"+vm.depart_names+\"@\"+vm.userEmail[1];\r\n }\r\n\r\n if(vm.customer_type!=undefined && vm.customer_type!='' && vm.customer_type!=null\r\n && vm.company_name!=undefined && vm.company_name!='' && vm.company_name!=null\r\n && vm.defaultRole!=undefined && vm.defaultRole!='' && vm.defaultRole!=null ){\r\n vm.notValidDemoEmail=false;\r\n }\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function getDepartments(key, searchText, cid){\r\n //if(searchText.length > 2){\r\n vm.autocompleteData=\"\";\r\n if(searchText.length!=0){\r\n var query = {field: key, value: searchText,company_id:cid,customer_type: vm.custType};\r\n var depart = [];\r\n if(query.value != \"\"){\r\n var dfd = $q.defer();\r\n vm.showLoader = true;\r\n\r\n\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n //// console.log(response);\r\n vm.showLoader = false;\r\n vm.autocompleteData = response.data;\r\n if(vm.autocompleteData.length==0)\r\n vm.zeroRecord = \"The search returned no results.\";\r\n else\r\n vm.zeroRecord = \"\";\r\n var autocompletes = response.data.map(function(d){\r\n //// console.log(d);\r\n depart.push(d.display);\r\n return {\r\n value: d.value,\r\n display: d.display\r\n };\r\n });\r\n var filterVals = find(searchText,depart);\r\n return dfd.resolve(filterVals);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n // }\r\n\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n function getMatchesDepartments(key, searchText){\r\n if(searchText.length!=0 && vm.company_id != undefined){\r\n var dfd = $q.defer();\r\n var query = {field: key, value: searchText,company_id:vm.company_id,customer_type:vm.customer_type};\r\n var depart = [];\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n depart.push(d.display);\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(searchText,depart);\r\n return dfd.resolve(filterVals);\r\n //return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function getShipmentLink(key, searchText){\r\n\r\n if(searchText.length!=0 && vm.company_id != undefined){\r\n\r\n var method = '/autocomplete';\r\n\r\n var query = {field: key, value: searchText,company_id:vm.company_id,customer_type:vm.customer_type};\r\n\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + method, query).then(function(response){\r\n /*var autocompletes = response.data.map(function(key, val){\r\n //// console.log(d);\r\n return {\r\n key: key,\r\n value: value\r\n };\r\n });*/\r\n\r\n var autocompletes = [];\r\n\r\n angular.forEach(response.data,function(key,value){\r\n autocompletes.push(value);\r\n });\r\n\r\n vm.awb_with_gspid_autocomplete = response.data;\r\n\r\n return dfd.resolve(autocompletes);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n function selectedLinkChanges(item){\r\n\r\n if(item != undefined && item != null){\r\n\r\n vm.selected_awb_autocomplete = (vm.awb_with_gspid_autocomplete[item])?vm.awb_with_gspid_autocomplete[item]:'';\r\n\r\n if(vm.customer_type.toLowerCase() == 'cww'){\r\n\r\n vm.shipLink = $location.protocol()+'://'+$location.host()+'/shipping-details/'+vm.selected_awb_autocomplete[0];\r\n\r\n }if(vm.customer_type.toLowerCase() == 'csl' || vm.customer_type.toLowerCase() == 'cfs'){\r\n vm.shipLink = $location.protocol()+'://'+$location.host()+'/shipping-details-csl/'+vm.selected_awb_autocomplete[0];\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n function selectedUrlLinkChanges(item){\r\n\r\n if(item != undefined && item != null){\r\n\r\n if(vm.customer_type.toLowerCase() == 'cww'){\r\n\r\n vm.shipLink = $location.protocol()+'://'+$location.host()+'/shipping-details/'+item;\r\n\r\n }if(vm.customer_type.toLowerCase() == 'csl' || vm.customer_type.toLowerCase() == 'cfs'){\r\n vm.shipLink = $location.protocol()+'://'+$location.host()+'/shipping-details-csl/'+item;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n function resetSelection(name){\r\n vm.selected_awb_autocomplete = [];\r\n vm.shipLink = '';\r\n }\r\n\r\n function resetSelectionCompany(){\r\n vm.selected_awb_autocomplete = [];\r\n vm.shipLink = '';\r\n vm.searchTextDepart = '';\r\n }\r\n\r\n vm.autocompletetimer = null\r\n function getMatches(key, searchText){\r\n //if(searchText.length > 2){\r\n vm.autocompleteData=\"\";\r\n if(searchText.length!=0){\r\n var query = {field: key, value: searchText, customer_type: vm.custType};\r\n if(query.value != \"\"){\r\n if(vm.autocompletetimer)\r\n clearTimeout(vm.autocompletetimer)\r\n vm.autocompletetimer = setTimeout(function(){\r\n getCompaniesList(query);\r\n },500);\r\n }\r\n }else{\r\n if(vm.autocompletetimer)\r\n clearTimeout(vm.autocompletetimer)\r\n }\r\n }\r\n\r\n function getCompaniesList(query){\r\n var dfd = $q.defer();\r\n vm.showLoader = true;\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n //// console.log(response);\r\n vm.showLoader = false;\r\n vm.autocompleteData = response.data;\r\n if(vm.autocompleteData.length==0)\r\n vm.zeroRecord = \"The search returned no results.\";\r\n else\r\n vm.zeroRecord = \"\";\r\n var autocompletes = response.data.map(function(d){\r\n //// console.log(d);\r\n return {\r\n value: d.value,\r\n display: d.display\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function add_lens(){\r\n\r\n // var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n // $mdDialog.show({\r\n // templateUrl: '/app/admin/lensview/add-lensgroup.html',\r\n // parent: angular.element(document.body),\r\n // targetEvent: ev,\r\n // clickOutsideToClose:true,\r\n // fullscreen: useFullScreen\r\n // })\r\n // .then(function(answer) {\r\n\r\n // }, function() {\r\n\r\n // });\r\n\r\n $location.path('/lensgroup/new');\r\n\r\n }\r\n\r\n function search_lens(){\r\n //// console.log('tester');\r\n vm.searchFlag = !vm.searchFlag;\r\n\r\n }\r\n\r\n function deletedCompanies(params){\r\n\r\n //// console.log(params);\r\n }\r\n\r\n function updateAccount(){\r\n //if(vm.lensgroupDescription==undefined || vm.lensgroupDescription=='')\r\n //return;\r\n // // console.log(CompanyManagementService.getSelectedCompanies());\r\n\r\n var company_ids = LensviewCompanyPopUpService.getSelectedLensCompanies();\r\n var del_company_ids = LensviewCompanyPopUpService.getDeletedLensCompanies();\r\n var companyList = CompanyManagementService.getCompanyTable();\r\n if(companyList.data.length >0){\r\n for( var p=0; p<companyList.data.length; p++){\r\n if(companyList.data[p]['new'] == true){\r\n companyList.data[p]['new'] = undefined;\r\n }\r\n if(!companyList.data[p]['new']){\r\n companyList.data[p]['new'] = undefined;\r\n }\r\n }\r\n }\r\n //.map(function(company){\r\n //CompanyManagementService.addCompanytable(company);\r\n // return company.id;\r\n //});\r\n //LensviewCompanyPopUpService.getSelectedLensCompanies();\r\n //CompanyManagementService.getSelectedCompanies().map(function(company){return company.id;});\r\n var user_ids = lensviewUsersPopupService.getSelectedLensUsers() ;\r\n var del_user_ids = lensviewUsersPopupService.getDeletedLensUsers() ;\r\n var userList = UserManagementService.getUserTable();\r\n\r\n if(userList.data.length >0){\r\n for( var n=0; n<userList.data.length; n++){\r\n if(userList.data[n]['new'] == true){\r\n userList.data[n]['new'] = undefined;\r\n }\r\n if(!userList.data[n]['new']){\r\n userList.data[n]['new'] = undefined;\r\n }\r\n }\r\n }\r\n\r\n // UserManagementService.getSelectedLensUsers();\r\n //UserManagementService.getSelectedUsers().map(function(user){return user.id;});\r\n if(company_ids.length == 0){\r\n company_ids = company_ids.concat(vm.company_ids);\r\n }\r\n if(company_ids.length > 0){\r\n vm.company_ids = company_ids;\r\n }\r\n if(user_ids.length == 0){\r\n user_ids = user_ids.concat(vm.user_ids);\r\n }\r\n if(user_ids.length > 0){\r\n vm.user_ids = user_ids;\r\n }\r\n\r\n if(del_company_ids.length >0){\r\n for( var i=company_ids.length - 1; i>=0; i--){\r\n for( var j=0; j<del_company_ids.length; j++){\r\n if(company_ids[i] == del_company_ids[j]){\r\n company_ids.splice(i, 1);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if(del_user_ids.length >0){\r\n for( var i=user_ids.length - 1; i>=0; i--){\r\n for( var j=0; j<del_user_ids.length; j++){\r\n if(user_ids[i] == del_user_ids[j]){\r\n user_ids.splice(i, 1);\r\n }\r\n }\r\n }\r\n }\r\n\r\n var data = {\r\n \"name\" : vm.lensgroupName,\r\n \"description\" : vm.lensgroupDescription,\r\n \"company_ids\": company_ids,\r\n \"user_ids\" : user_ids\r\n };\r\n\r\n if(vm.isCreate){\r\n lensviewService.updateLensGroup(data)\r\n .then(function(response){\r\n\r\n lensviewUsersPopupService.resetSelecteduser() ;\r\n LensviewCompanyPopUpService.resetSelectedLensCompanies();\r\n // LensviewCompanyPopUpService.resetSelectedLensCompanies();\r\n //lensviewUsersPopupService.resetSelecteduser() ;\r\n //// console.log(response);\r\n showToastWithFile('create-lensgroup.success.html');\r\n setTimeout(function(){\r\n\r\n $location.url('/lensgroups');\r\n\r\n },2500);\r\n })\r\n .catch(function (response) {\r\n if(response.data){\r\n if(response.data.messages)\r\n showToastWithFile('create-lensgroup.error.html', response.data.messages);\r\n else if(response.data.errors)\r\n showToastWithFile('create-lensgroup.error.html', ''+response.data.errors.name);\r\n }\r\n\r\n });\r\n }else{\r\n lensviewService.updateLensGroup(data,$stateParams.id)\r\n .then(function(response){\r\n //// console.log(response);\r\n vm.saveBtnShow = false;\r\n showToastWithFile('update-lensgroup.success.html');\r\n lensviewUsersPopupService.resetSelecteduser() ;\r\n LensviewCompanyPopUpService.resetSelectedLensCompanies();\r\n //location.reload();\r\n setTimeout(function(){\r\n //location.reload();\r\n },2000);\r\n })\r\n .catch(function (response) {\r\n if(response.data){\r\n if(response.data.messages)\r\n showToastWithFile('create-lensgroup.error.html', response.data.messages);\r\n else if(response.data.errors)\r\n showToastWithFile('create-lensgroup.error.html', ''+response.data.errors.name);\r\n }\r\n\r\n });\r\n }\r\n\r\n\r\n }\r\n\r\n function loadLensGroupData(){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientFlag = false;\r\n else\r\n vm.showAllClientFlag = true;\r\n //// console.log('tested..... lens');\r\n if($state.current.name =='showCompany'){\r\n // CompanyManagementService.getCompanies('lens_group_companies');\r\n CompanyManagementService.getCompanies('lens_group_companies');\r\n //addLensGroup()\r\n var lens = userLensGroupService.getLensGroupTable();\r\n //// console.log(lens);\r\n //// console.log(lenGroup);\r\n // CompanyManagementService.getCompanyTable();\r\n // var lensGroup = CompanyManagementService.getLensGroup();\r\n // // console.log(lensGroup);\r\n\r\n // angular.forEach(lensGroup,function(lens){\r\n // userLensGroupService.addToLensGroupTable(lens);\r\n // // console.log(userLensGroupService.getLensGroupTable());\r\n // });\r\n\r\n // userLensGroupService.loadLensGroupData();\r\n\r\n\r\n }else if($state.current.name !='createCompany')\r\n vm.lensGroupTable = lensviewService.getLensGroups();\r\n }\r\n\r\n loadLensGroupData();\r\n\r\n function getTable(){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientFlag = false;\r\n else\r\n vm.showAllClientFlag = true;\r\n\r\n if($state.current.name == \"showUser\"){\r\n vm.lensGroupTable = userLensGroupService.getLensGroupTable();\r\n vm.lensGroupTable.data = vm.addAllClientRow(vm.lensGroupTable.data, $state.current.name);\r\n return vm.lensGroupTable;\r\n }else if($state.current.name =='showCompany'){\r\n vm.lensGroupTable = CompanyManagementService.getCompanyLensTable();\r\n vm.lensGroupTable.data = vm.addAllClientRow(vm.lensGroupTable.data, $state.current.name);\r\n return vm.lensGroupTable ;\r\n }else if($state.current.name !='createCompany') {\r\n vm.lensGroupTable = lensviewService.getLensGroupTable();\r\n vm.lensGroupTable.data = vm.addAllClientRow(vm.lensGroupTable.data, $state.current.name);\r\n return vm.lensGroupTable;\r\n }else{\r\n return userLensGroupService.getLensGroupTable();\r\n }\r\n\r\n\r\n }\r\n\r\n function addAllClientRow(lensGroupTable,state){\r\n vm.lensGroupTable.data = lensGroupTable;\r\n //vm.lensGroupTable.data = $filter('orderBy')(vm.lensGroupTable.data, 'name');\r\n angular.forEach(vm.lensGroupTable.data, function(v,k){\r\n if(v.name==='ALL CLIENTS CWW'){\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CWW'){\r\n var oldData =vm.lensGroupTable.data[0];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CWW'){\r\n var oldData =vm.lensGroupTable.data[1];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CWW'){\r\n var oldData =vm.lensGroupTable.data[2];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n //var oldData =vm.lensGroupTable.data[0];\r\n //var newData = vm.lensGroupTable.data[k];\r\n\r\n //vm.lensGroupTable.data[0] = vm.lensGroupTable.data[k];\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CWW'){\r\n vm.lensGroupTable.data[0] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClient= [];\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CWW'){\r\n vm.lensGroupTable.data[1] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClient= [];\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CWW'){\r\n vm.lensGroupTable.data[2] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClient= [];\r\n }\r\n\r\n // vm.lensGroupTable.data[k] = oldData;\r\n // vm.showAllClient= [];\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CWW'){\r\n vm.showAllClient.push(vm.lensGroupTable.data[0].name);\r\n vm.showAllClient.push(vm.lensGroupTable.data[0].company_count);\r\n vm.showAllClient.push(vm.lensGroupTable.data[0].description);\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CWW'){\r\n vm.showAllClient.push(vm.lensGroupTable.data[1].name);\r\n vm.showAllClient.push(vm.lensGroupTable.data[1].company_count);\r\n vm.showAllClient.push(vm.lensGroupTable.data[1].description);\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CWW'){\r\n vm.showAllClient.push(vm.lensGroupTable.data[2].name);\r\n vm.showAllClient.push(vm.lensGroupTable.data[2].company_count);\r\n vm.showAllClient.push(vm.lensGroupTable.data[2].description);\r\n }\r\n\r\n // vm.showAllClient.push(vm.lensGroupTable.data[0].name);\r\n // vm.showAllClient.push(vm.lensGroupTable.data[0].company_count);\r\n // vm.showAllClient.push(vm.lensGroupTable.data[0].description);\r\n\r\n if(vm.mangaeLensGroupCheck == true){\r\n if(vm.showLensText == true)\r\n vm.showAllClient.push(\"Edit Lens Group\");\r\n else\r\n vm.showAllClient.push(\"Edit List\");\r\n }else\r\n {\r\n vm.showAllClient.push(\"\");\r\n }\r\n\r\n // vm.showAllClientOrg =[];\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CWW'){\r\n vm.showAllClientOrg =[];\r\n vm.showAllClientOrg.push(vm.lensGroupTable.data[0].name);\r\n vm.showAllClientOrg.push(vm.lensGroupTable.data[0].company_count);\r\n vm.showAllClientOrg.push(vm.lensGroupTable.data[0].description);\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CWW'){\r\n vm.showAllClientOrg =[];\r\n vm.showAllClientOrg.push(vm.lensGroupTable.data[1].name);\r\n vm.showAllClientOrg.push(vm.lensGroupTable.data[1].company_count);\r\n vm.showAllClientOrg.push(vm.lensGroupTable.data[1].description);\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CWW'){\r\n vm.showAllClientOrg =[];\r\n vm.showAllClientOrg.push(vm.lensGroupTable.data[2].name);\r\n vm.showAllClientOrg.push(vm.lensGroupTable.data[2].company_count);\r\n vm.showAllClientOrg.push(vm.lensGroupTable.data[2].description);\r\n }\r\n\r\n // vm.showAllClientOrg.push(vm.lensGroupTable.data[0].name);\r\n // vm.showAllClientOrg.push(vm.lensGroupTable.data[0].company_count);\r\n // vm.showAllClientOrg.push(vm.lensGroupTable.data[0].description);\r\n\r\n if(vm.mangaeLensGroupCheck == true){\r\n if(vm.showLensText == true)\r\n vm.showAllClientOrg.push(\"Edit Lens Group\");\r\n else\r\n vm.showAllClientOrg.push(\"Edit List\");\r\n }else\r\n {\r\n vm.showAllClient.push(\"\");\r\n }\r\n\r\n if(state=='showCompany'){\r\n vm.showAllClient.push(\"\");\r\n vm.showAllClientOrg.push(\"\");\r\n }\r\n }\r\n\r\n if(v.name==='ALL CLIENTS CSL'){\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CSL'){\r\n var oldData =vm.lensGroupTable.data[0];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CSL'){\r\n var oldData =vm.lensGroupTable.data[1];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CSL'){\r\n var oldData =vm.lensGroupTable.data[2];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n //var oldData =vm.lensGroupTable.data[1];\r\n // var newData = vm.lensGroupTable.data[k];\r\n\r\n //vm.lensGroupTable.data[1] = vm.lensGroupTable.data[k];\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CSL'){\r\n vm.lensGroupTable.data[0] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClientCsl= [];\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CSL'){\r\n vm.lensGroupTable.data[1] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClientCsl= [];\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CSL'){\r\n vm.lensGroupTable.data[2] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClientCsl= [];\r\n }\r\n\r\n // vm.lensGroupTable.data[k] = oldData;\r\n // vm.showAllClientCsl= [];\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CSL'){\r\n vm.showAllClientCsl.push(vm.lensGroupTable.data[0].name);\r\n vm.showAllClientCsl.push(vm.lensGroupTable.data[0].company_count);\r\n vm.showAllClientCsl.push(vm.lensGroupTable.data[0].description);\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CSL'){\r\n vm.showAllClientCsl.push(vm.lensGroupTable.data[1].name);\r\n vm.showAllClientCsl.push(vm.lensGroupTable.data[1].company_count);\r\n vm.showAllClientCsl.push(vm.lensGroupTable.data[1].description);\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CSL'){\r\n vm.showAllClientCsl.push(vm.lensGroupTable.data[2].name);\r\n vm.showAllClientCsl.push(vm.lensGroupTable.data[2].company_count);\r\n vm.showAllClientCsl.push(vm.lensGroupTable.data[2].description);\r\n }\r\n\r\n // vm.showAllClientCsl.push(vm.lensGroupTable.data[1].name);\r\n // vm.showAllClientCsl.push(vm.lensGroupTable.data[1].company_count);\r\n // vm.showAllClientCsl.push(vm.lensGroupTable.data[1].description);\r\n\r\n if(vm.mangaeLensGroupCheck == true){\r\n if(vm.showLensText == true)\r\n vm.showAllClientCsl.push(\"Edit Lens Group\");\r\n else\r\n vm.showAllClientCsl.push(\"Edit List\");\r\n }else\r\n {\r\n vm.showAllClientCsl.push(\"\");\r\n }\r\n\r\n // vm.showAllClientOrgCsl =[];\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CSL'){\r\n vm.showAllClientOrgCsl =[];\r\n vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[0].name);\r\n vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[0].company_count);\r\n vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[0].description);\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CSL'){\r\n vm.showAllClientOrgCsl =[];\r\n vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[1].name);\r\n vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[1].company_count);\r\n vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[1].description);\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CSL'){\r\n vm.showAllClientOrgCsl =[];\r\n vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[2].name);\r\n vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[2].company_count);\r\n vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[2].description);\r\n }\r\n\r\n // vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[1].name);\r\n // vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[1].company_count);\r\n // vm.showAllClientOrgCsl.push(vm.lensGroupTable.data[1].description);\r\n\r\n if(vm.mangaeLensGroupCheck == true){\r\n if(vm.showLensText == true)\r\n vm.showAllClientOrgCsl.push(\"Edit Lens Group\");\r\n else\r\n vm.showAllClientOrgCsl.push(\"Edit List\");\r\n }else\r\n {\r\n vm.showAllClientCsl.push(\"\");\r\n }\r\n\r\n if(state=='showCompany'){\r\n vm.showAllClientCsl.push(\"\");\r\n vm.showAllClientOrgCsl.push(\"\");\r\n }\r\n }\r\n\r\n if(v.name==='ALL CLIENTS CFS'){\r\n //var oldData =vm.lensGroupTable.data[2];\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CFS'){\r\n var oldData =vm.lensGroupTable.data[0];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CFS'){\r\n var oldData =vm.lensGroupTable.data[1];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CFS'){\r\n var oldData =vm.lensGroupTable.data[2];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n\r\n // var newData = vm.lensGroupTable.data[k];\r\n\r\n //vm.lensGroupTable.data[2] = vm.lensGroupTable.data[k];\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CFS'){\r\n vm.lensGroupTable.data[0] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClientCfs= [];\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CFS'){\r\n vm.lensGroupTable.data[1] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClientCfs= [];\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CFS'){\r\n vm.lensGroupTable.data[2] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClientCfs= [];\r\n }\r\n\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CFS'){\r\n vm.showAllClientCfs.push(vm.lensGroupTable.data[0].name);\r\n vm.showAllClientCfs.push(vm.lensGroupTable.data[0].company_count);\r\n vm.showAllClientCfs.push(vm.lensGroupTable.data[0].description);\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CFS'){\r\n vm.showAllClientCfs.push(vm.lensGroupTable.data[1].name);\r\n vm.showAllClientCfs.push(vm.lensGroupTable.data[1].company_count);\r\n vm.showAllClientCfs.push(vm.lensGroupTable.data[1].description);\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CFS'){\r\n vm.showAllClientCfs.push(vm.lensGroupTable.data[2].name);\r\n vm.showAllClientCfs.push(vm.lensGroupTable.data[2].company_count);\r\n vm.showAllClientCfs.push(vm.lensGroupTable.data[2].description);\r\n }\r\n\r\n\r\n if(vm.mangaeLensGroupCheck == true){\r\n if(vm.showLensText == true)\r\n vm.showAllClientCfs.push(\"Edit Lens Group\");\r\n else\r\n vm.showAllClientCfs.push(\"Edit List\");\r\n }else\r\n {\r\n vm.showAllClientCfs.push(\"\");\r\n }\r\n\r\n // vm.showAllClientOrgCfs =[];\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CFS'){\r\n vm.showAllClientOrgCfs =[];\r\n vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[0].name);\r\n vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[0].company_count);\r\n vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[0].description);\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CFS'){\r\n vm.showAllClientOrgCfs =[];\r\n vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[1].name);\r\n vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[1].company_count);\r\n vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[1].description);\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CFS'){\r\n vm.showAllClientOrgCfs =[];\r\n vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[2].name);\r\n vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[2].company_count);\r\n vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[2].description);\r\n }\r\n\r\n // vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[2].name);\r\n // vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[2].company_count);\r\n // vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[2].description);\r\n\r\n if(vm.mangaeLensGroupCheck == true){\r\n if(vm.showLensText == true)\r\n vm.showAllClientOrgCfs.push(\"Edit Lens Group\");\r\n else\r\n vm.showAllClientOrgCfs.push(\"Edit List\");\r\n }else\r\n {\r\n vm.showAllClientCfs.push(\"\");\r\n }\r\n\r\n if(state=='showCompany'){\r\n vm.showAllClientCfs.push(\"\");\r\n vm.showAllClientOrgCfs.push(\"\");\r\n }\r\n }\r\n\r\n if(v.name==='ALL CLIENTS CMTS'){\r\n //var oldData =vm.lensGroupTable.data[2];\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CMTS'){\r\n var oldData =vm.lensGroupTable.data[0];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CMTS'){\r\n var oldData =vm.lensGroupTable.data[1];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CMTS'){\r\n var oldData =vm.lensGroupTable.data[2];\r\n var newData = vm.lensGroupTable.data[k];\r\n }\r\n\r\n // var newData = vm.lensGroupTable.data[k];\r\n\r\n //vm.lensGroupTable.data[2] = vm.lensGroupTable.data[k];\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CMTS'){\r\n vm.lensGroupTable.data[0] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClientCmts= [];\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CMTS'){\r\n vm.lensGroupTable.data[1] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClientCmts= [];\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CMTS'){\r\n vm.lensGroupTable.data[2] = vm.lensGroupTable.data[k];\r\n vm.lensGroupTable.data[k] = oldData;\r\n vm.showAllClientCmts= [];\r\n }\r\n\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CMTS'){\r\n vm.showAllClientCmts.push(vm.lensGroupTable.data[0].name);\r\n vm.showAllClientCmts.push(vm.lensGroupTable.data[0].company_count);\r\n vm.showAllClientCmts.push(vm.lensGroupTable.data[0].description);\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CMTS'){\r\n vm.showAllClientCmts.push(vm.lensGroupTable.data[1].name);\r\n vm.showAllClientCmts.push(vm.lensGroupTable.data[1].company_count);\r\n vm.showAllClientCmts.push(vm.lensGroupTable.data[1].description);\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CMTS'){\r\n vm.showAllClientCmts.push(vm.lensGroupTable.data[2].name);\r\n vm.showAllClientCmts.push(vm.lensGroupTable.data[2].company_count);\r\n vm.showAllClientCmts.push(vm.lensGroupTable.data[2].description);\r\n }\r\n\r\n\r\n if(vm.mangaeLensGroupCheck == true){\r\n if(vm.showLensText == true)\r\n vm.showAllClientCmts.push(\"Edit Lens Group\");\r\n else\r\n vm.showAllClientCmts.push(\"Edit List\");\r\n }else\r\n {\r\n vm.showAllClientCmts.push(\"\");\r\n }\r\n\r\n // vm.showAllClientOrgCfs =[];\r\n\r\n if(vm.lensGroupTable.data[0].name == 'ALL CLIENTS CMTS'){\r\n vm.showAllClientOrgCmts =[];\r\n vm.showAllClientOrgCmts.push(vm.lensGroupTable.data[0].name);\r\n vm.showAllClientOrgCmts.push(vm.lensGroupTable.data[0].company_count);\r\n vm.showAllClientOrgCmts.push(vm.lensGroupTable.data[0].description);\r\n }\r\n else if(vm.lensGroupTable.data[1].name == 'ALL CLIENTS CMTS'){\r\n vm.showAllClientOrgCmts =[];\r\n vm.showAllClientOrgCmts.push(vm.lensGroupTable.data[1].name);\r\n vm.showAllClientOrgCmts.push(vm.lensGroupTable.data[1].company_count);\r\n vm.showAllClientOrgCmts.push(vm.lensGroupTable.data[1].description);\r\n }\r\n else if(vm.lensGroupTable.data[2].name == 'ALL CLIENTS CMTS'){\r\n vm.showAllClientOrgCmts =[];\r\n vm.showAllClientOrgCmts.push(vm.lensGroupTable.data[2].name);\r\n vm.showAllClientOrgCmts.push(vm.lensGroupTable.data[2].company_count);\r\n vm.showAllClientOrgCmts.push(vm.lensGroupTable.data[2].description);\r\n }\r\n\r\n // vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[2].name);\r\n // vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[2].company_count);\r\n // vm.showAllClientOrgCfs.push(vm.lensGroupTable.data[2].description);\r\n\r\n if(vm.mangaeLensGroupCheck == true){\r\n if(vm.showLensText == true)\r\n vm.showAllClientOrgCmts.push(\"Edit Lens Group\");\r\n else\r\n vm.showAllClientOrgCmts.push(\"Edit List\");\r\n }else\r\n {\r\n vm.showAllClientCmts.push(\"\");\r\n }\r\n\r\n if(state=='showCompany'){\r\n vm.showAllClientCmts.push(\"\");\r\n vm.showAllClientOrgCmts.push(\"\");\r\n }\r\n }\r\n\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientOrg,vm.showAllClient);\r\n angular.copy(vm.showAllClientOrgCsl,vm.showAllClientCsl);\r\n angular.copy(vm.showAllClientOrgCfs,vm.showAllClientCfs);\r\n angular.copy(vm.showAllClientOrgCmts,vm.showAllClientCmts);\r\n }\r\n else{\r\n vm.showAllClient= [];\r\n vm.showAllClientCsl= [];\r\n vm.showAllClientCfs= [];\r\n vm.showAllClientCmts= [];\r\n }\r\n return vm.lensGroupTable.data;\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n default:\r\n return item[field];\r\n }\r\n }\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"active-user\" : \"inactive-user\";\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n\r\n // switch ($state.current.name){\r\n\r\n\r\n\r\n // } // end switch\r\n\r\n switch ($state.current.name){\r\n\r\n case 'showLensGroup' :\r\n // var lensData = lensviewService.getLensGroup($stateParams.id);\r\n // // console.log(lensData);\r\n vm.isCreate = false;\r\n if($stateParams.id!=undefined){\r\n $http.get(api.url_v2 +'/lens_groups/'+$stateParams.id+'/edit')\r\n .then(function(response){\r\n //// console.log(response.data);\r\n lensviewService.setNameData(response.data.name);\r\n vm.lensgroupName = response.data.name;\r\n vm.lensgroupDescription = response.data.description;\r\n vm.company_ids = response.data.company_ids;\r\n vm.user_ids = response.data.user_ids;\r\n localStorage.setItem('lensUsersData',JSON.stringify(response.data.users));\r\n //UserManagementService.setUserTableData(response);\r\n //lensviewService.setCompanyDetails(response.data.company_details);\r\n if(vm.lensgroupName === 'ALL CLIENTS CWW' || vm.lensgroupName === 'ALL CLIENTS CFS' || vm.lensgroupName === 'ALL CLIENTS CSL' || vm.lensgroupName === 'ALL CLIENTS CMTS'){\r\n userLensGroupService.setReadOnly(true);\r\n vm.readOnlyView = true;\r\n }\r\n return response;\r\n });\r\n }\r\n break;\r\n\r\n case 'showUser':\r\n\r\n userLensGroupService.getLensGroups($stateParams.id);\r\n\r\n break;\r\n\r\n }\r\n vm.readOnly = userLensGroupService.getReadOnly();\r\n\r\n function gotoSelectUser(ev,data,readOnly){\r\n\r\n if(vm.lensGroupTable.data.length >0 && (data=='ALL CLIENTS CWW' || data=='ALL CLIENTS CSL'\r\n || data=='ALL CLIENTS CFS' || data=='ALL CLIENTS CMTS'))\r\n data = vm.lensGroupTableDataByName(vm.lensGroupTable.data, data);//vm.lensGroupTable.data.find(x=> x.name===data);\r\n\r\n //if(data=='ALL CLIENTS CWW'){\r\n // if(vm.lensGroupTable.data.length == 1){\r\n // data = vm.lensGroupTable.data[0];\r\n // }else{\r\n // data = vm.lensGroupTable.data[1];\r\n // }\r\n //}\r\n //if(data=='ALL CLIENTS CSL'){\r\n // if(vm.lensGroupTable.data.length == 1){\r\n // data = vm.lensGroupTable.data[0];\r\n // }else{\r\n // data = vm.lensGroupTable.data[2];\r\n // }\r\n //}\r\n //if(data=='ALL CLIENTS CFS'){\r\n // if(vm.lensGroupTable.data.length == 1){\r\n // data = vm.lensGroupTable.data[0];\r\n // }else{\r\n // data = vm.lensGroupTable.data[3];\r\n // }\r\n //}\r\n //if(data=='ALL CLIENTS CMTS'){\r\n // if(vm.lensGroupTable.data.length == 1){\r\n // data = vm.lensGroupTable.data[0];\r\n // }else{\r\n // data = vm.lensGroupTable.data[0];\r\n // }\r\n //}\r\n\r\n var lensGroupId = data;\r\n\r\n if(readOnly){\r\n userLensGroupService.setReadOnly(true);\r\n lensviewService.setReadOnly(true);\r\n }else{\r\n userLensGroupService.setReadOnly(false);\r\n lensviewService.setReadOnly(false);\r\n }\r\n\r\n $location.url(\"/lensgroups/\"+data.id);\r\n\r\n }\r\n\r\n function lensGroupTableDataByName(lensGroupTableData, name){\r\n var data=null;\r\n for (var i = 0; i < lensGroupTableData.length; i++) {\r\n if (lensGroupTableData[i].name === name) {\r\n data = lensGroupTableData[i];\r\n break;\r\n }\r\n }\r\n return data;\r\n }\r\n\r\n\r\n function selected(index){\r\n\r\n\r\n vm.lastSelected = index;\r\n if (vm.lensGroupTable.data.length){\r\n vm.lastSelectedValue = vm.lensGroupTable.data[index].selected;\r\n }\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.lensGroupTable.data.map(function(lensGroup){\r\n vm.getList.map(function(obj){\r\n if(obj.id == lensGroup.id && lensGroup.name!=\"ALL CLIENTS CWW\" && lensGroup.name!=\"ALL CLIENTS CFS\" && lensGroup.name!=\"ALL CLIENTS CSL\" && lensGroup.name!=\"ALL CLIENTS CMTS\")\r\n obj.selected = lensGroup.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allLensGroup){\r\n return allLensGroup.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.lensGroupTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.lensGroupTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.lensGroupTable.data.length; i++) {\r\n if(vm.lensGroupTable.data[i].name==\"ALL CLIENTS CWW\" || vm.lensGroupTable.data[i].name==\"ALL CLIENTS CFS\" || vm.lensGroupTable.data[i].name==\"ALL CLIENTS CSL\" || vm.lensGroupTable.data[i].name==\"ALL CLIENTS CMTS\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n function shiftSelect(index){\r\n\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.lensGroupTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.lensGroupTable.settings().data.map(function(user){\r\n user.selected = false;\r\n });\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.message = message;\r\n }\r\n });\r\n }\r\n\r\n\r\n // function include_users_in_lens(){\r\n\r\n // // var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n // // $mdDialog.show({\r\n // // templateUrl: '/app/layout/lensgroup/add-lensgroup.html',\r\n // // parent: angular.element(document.body),\r\n\r\n // // targetEvent: ev,\r\n // // clickOutsideToClose:true,\r\n // // fullscreen: useFullScreen\r\n // // })\r\n // // .then(function(answer) {\r\n\r\n // // }, function() {\r\n\r\n // // });\r\n\r\n // }\r\n\r\n // function search_users_in_lens(){\r\n\r\n // }\r\n\r\n function addGroupsInUsers(ev){\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/lensgroup/add-lensgroup.html',\r\n parent: angular.element(document.body),\r\n\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n }\r\n\r\n function searchGroups(){\r\n //// console.log('test');\r\n vm.searchflag = !vm.searchflag;\r\n\r\n }\r\n\r\n function getRecentUsers(){\r\n\r\n }\r\n\r\n function getRecentCompanies(){\r\n\r\n }\r\n\r\n function getFavorites(){\r\n\r\n }\r\n\r\n function switchUser(searchValue,userID,type,cid,cname,portalType,bookingCheck){\r\n $mdDialog.cancel();\r\n\r\n var url = api.url_v2;\r\n\r\n if(portalType == 'customer'){\r\n //localStorage.consigneePortal = false;\r\n localStorage.setItem(\"consigneePortal\",false);\r\n }\r\n if(portalType == 'consignee' || portalType == 'shipper'){\r\n //localStorage.consigneePortal = true;\r\n localStorage.setItem(\"consigneePortal\",true);\r\n }\r\n if(bookingCheck == true){\r\n localStorage.bookingEnable = true;\r\n }\r\n if(bookingCheck == false){\r\n localStorage.bookingEnable = false;\r\n }\r\n localStorage.dataswitchEnable = true;\r\n\r\n if(type == 'User'){\r\n localStorage.removeItem('userCompany');\r\n localStorage.removeItem('userDepartment');\r\n localStorage.removeItem('userDepartmentCompany');\r\n localStorage.removeItem('userDepartmentCompanyName');\r\n vm.lensviewType = 'lens_grp_user';\r\n }else if(type == 'Company'){\r\n localStorage.removeItem('switchEmail');\r\n localStorage.removeItem('userDepartment');\r\n localStorage.removeItem('userDepartmentCompany');\r\n localStorage.removeItem('userDepartmentCompanyName');\r\n localStorage.removeItem('userDepartmentCww');\r\n localStorage.removeItem('userDepartmentCompanyNameCww');\r\n localStorage.removeItem('userDepartmentCompanyCww');\r\n vm.lensviewType = 'lens_grp_company';\r\n }\r\n else if(type == 'Department'){\r\n localStorage.removeItem('switchEmail');\r\n localStorage.removeItem('userCompany');\r\n localStorage.removeItem('switchEmailCww');\r\n localStorage.removeItem('userCompanyCww');\r\n vm.lensviewType = 'lens_grp_department';\r\n var searchval = searchValue.split('-');\r\n searchValue = searchval[1];\r\n cname = searchval[0];\r\n }\r\n\r\n if(vm.lensviewType == 'lens_grp_company'){\r\n localStorage.removeItem('switchEmail');\r\n localStorage.removeItem('userDepartment');\r\n localStorage.removeItem('userDepartmentCompany');\r\n localStorage.removeItem('userDepartmentCompanyName');\r\n url +=\"/companies/\"+userID+\"/lens_group_recents\";\r\n localStorage.userCompany = searchValue;\r\n if(vm.custType == 'cww'){\r\n localStorage.switchEmailCww = searchValue;\r\n localStorage.customerType = vm.custType;\r\n localStorage.userCompanyCww = searchValue;\r\n }\r\n if(vm.custType == 'csl'){\r\n localStorage.switchEmailCsl = searchValue;\r\n localStorage.customerType = vm.custType;\r\n localStorage.userCompanyCsl = searchValue;\r\n }\r\n if(vm.custType == 'cfs'){\r\n localStorage.switchEmailCfs = searchValue;\r\n localStorage.customerType = vm.custType;\r\n localStorage.userCompanyCfs = searchValue;\r\n }\r\n if(vm.custType == 'cmts'){\r\n localStorage.switchEmailCmts = searchValue;\r\n localStorage.customerType = vm.custType;\r\n localStorage.userCompanyCmts = searchValue;\r\n }\r\n }else if(vm.lensviewType == 'lens_grp_department'){\r\n localStorage.removeItem('switchEmail');\r\n localStorage.removeItem('userCompany');\r\n url +=\"/departments/\"+userID+\"/lens_group_recents\";\r\n localStorage.userDepartment = searchValue;\r\n localStorage.userDepartmentCompany = cid;\r\n localStorage.userDepartmentCompanyName = cname;\r\n if(vm.custType == 'cww'){\r\n localStorage.switchEmailCww = localStorage.userDepartmentCompanyName +'-'+ localStorage.userDepartment;\r\n localStorage.customerType = vm.custType;\r\n localStorage.userDepartmentCww = searchValue;\r\n localStorage.userDepartmentCompanyCww = cid;\r\n localStorage.userDepartmentCompanyNameCww = cname;\r\n }\r\n if(vm.custType == 'csl'){\r\n localStorage.switchEmailCsl = localStorage.userDepartmentCompanyName +'-'+ localStorage.userDepartment;\r\n localStorage.customerType = vm.custType;\r\n localStorage.userDepartmentCsl = searchValue;\r\n localStorage.userDepartmentCompanyCsl = cid;\r\n localStorage.userDepartmentCompanyNameCsl = cname;\r\n }\r\n if(vm.custType == 'cfs'){\r\n localStorage.switchEmailCfs = localStorage.userDepartmentCompanyName +'-'+ localStorage.userDepartment;\r\n localStorage.customerType = vm.custType;\r\n localStorage.userDepartmentCfs = searchValue;\r\n localStorage.userDepartmentCompanyCfs = cid;\r\n localStorage.userDepartmentCompanyNameCfs = cname;\r\n }\r\n if(vm.custType == 'cmts'){\r\n localStorage.switchEmailCmts = localStorage.userDepartmentCompanyName +'-'+ localStorage.userDepartment;\r\n localStorage.customerType = vm.custType;\r\n localStorage.userDepartmentCmts = searchValue;\r\n localStorage.userDepartmentCompanyCmts = cid;\r\n localStorage.userDepartmentCompanyNameCmts = cname;\r\n }\r\n }else{\r\n localStorage.removeItem('userCompany');\r\n localStorage.removeItem('userDepartment');\r\n localStorage.removeItem('userDepartmentCompany');\r\n localStorage.removeItem('userDepartmentCompanyName');\r\n url +=\"/users/\"+userID+\"/lens_group_recents\";\r\n localStorage.switchEmail =searchValue;\r\n if(vm.custType == 'cww'){\r\n localStorage.switchEmailCww = searchValue;\r\n localStorage.customerType = vm.custType;\r\n localStorage.switchEmailCwwType =searchValue;\r\n }\r\n if(vm.custType == 'csl'){\r\n localStorage.switchEmailCsl = searchValue;\r\n localStorage.customerType = vm.custType;\r\n localStorage.switchEmailCslType =searchValue;\r\n }\r\n if(vm.custType == 'cfs'){\r\n localStorage.switchEmailCfs = searchValue;\r\n localStorage.customerType = vm.custType;\r\n localStorage.switchEmailCfsType =searchValue;\r\n }\r\n if(vm.custType == 'cmts'){\r\n localStorage.switchEmailCmts = searchValue;\r\n localStorage.customerType = vm.custType;\r\n localStorage.switchEmailCmtsType =searchValue;\r\n }\r\n }\r\n\r\n\r\n var data = localStorage.user;\r\n data = JSON.parse(data);\r\n var query = {\r\n \"lens_group_recent\":\r\n {\r\n \"user_id\": data.id,\r\n \"name\" : searchValue,\r\n \"customer_type\": vm.custType,\r\n \"portal_type\": portalType\r\n }\r\n };\r\n\r\n $http.post(url, query).then(function(response){\r\n // console.log(response);\r\n });\r\n $state.reload();\r\n\r\n }\r\n\r\n function addToFavorites(recentData){\r\n\r\n if(recentData.favourite == null){\r\n recentData.favourite = true;\r\n }else{\r\n recentData.favourite = null;\r\n }\r\n var url = api.url_v2;\r\n if(recentData.recent_type == 'Company'){\r\n url +=\"/companies/\"+recentData.recent_id+\"/lens_group_recents/\"+recentData.id;\r\n }else{\r\n url +=\"/users/\"+recentData.recent_id+\"/lens_group_recents/\"+recentData.id;\r\n }\r\n\r\n var data = localStorage.user;\r\n data = JSON.parse(data);\r\n var query = {\"lens_group_recent\":{\r\n \"favourite\":recentData.favourite\r\n\r\n }\r\n };\r\n\r\n\r\n $http.put(url, query).then(function(response){\r\n // console.log(response);\r\n });\r\n\r\n }\r\n\r\n function checkAll(selected){\r\n vm.lensGroupTable.data.map(function(lensGroup){\r\n lensGroup.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.lensGroupTable.data.map(function(lensGroup){\r\n lensGroup.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == lensGroup.id && lensGroup.name!=\"ALL CLIENTS CWW\" && lensGroup.name!=\"ALL CLIENTS CFS\" && lensGroup.name!=\"ALL CLIENTS CSL\" && lensGroup.name!=\"ALL CLIENTS CMTS\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allLensGroup){\r\n return allLensGroup.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.lensGroupTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.lensGroupTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if(($state.current.name=='lensgroup') || ($state.current.name == 'showUser')||($state.current.name == 'showCompany')){\r\n angular.forEach(vm.lensGroupTable.data, function(v,k){\r\n if(v.name=='ALL CLIENTS CWW' || v.name=='ALL CLIENTS CFS' || v.name=='ALL CLIENTS CSL' || v.name=='ALL CLIENTS CMTS'){\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.lensGroupTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n function getSelectedCount() {\r\n\r\n /*if(vm.lensGroupTable != undefined){\r\n return $filter('filter')(vm.lensGroupTable.data, {selected: true}).length;\r\n }\r\n else return 0;*/\r\n return vm.listSelectedCount;\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function removeElem(ev,data){\r\n /* if(vm.lensGroupTable!=undefined){\r\n angular.forEach(vm.lensGroupTable.data, function(v,k){\r\n vm.lensGroupTable.data[k].selected = false;\r\n });\r\n angular.forEach(vm.lensGroupTable.data, function(v,k){\r\n if(v.id==data.id)\r\n vm.lensGroupTable.data[k].selected = true;\r\n });\r\n }*/\r\n if(vm.getTable()!=undefined){\r\n angular.forEach(vm.getTable().data, function(v,k){\r\n if(v.id==data.id){\r\n vm.getTable().data[k].selected = true;\r\n vm.listSelectedCount = 1;\r\n }\r\n else\r\n vm.getTable().data[k].selected = false;\r\n });\r\n }\r\n\r\n var lensGroups_ids = [];\r\n lensGroups_ids.push(data.id);\r\n var params = {\r\n lensGroups_ids: lensGroups_ids\r\n };\r\n var url= api.url_v2 + '/lens_groups/'+$stateParams.id;\r\n vm.params =params;\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/delete-lensgroup.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n\r\n }\r\n\r\n function bulkDeleteLensGroup(){\r\n vm.listSelectedCount = 0;\r\n\r\n if($state.current.name == \"showUser\"){\r\n\r\n $mdDialog.cancel();\r\n var databaseLensgroups = [];\r\n var newLensgroups = [];\r\n var totalLensgroups = vm.lensGroupTable.data;\r\n if(vm.getList.length < totalLensgroups.length){ totalLensgroups = totalLensgroups; }\r\n if(vm.getList.length > totalLensgroups.length){ totalLensgroups = vm.getList;}\r\n\r\n\r\n angular.forEach(vm.lensGroupTable.data, function(value,key){\r\n if(value.name==\"ALL CLIENTS CWW\" || value.name==\"ALL CLIENTS CFS\" || value.name==\"ALL CLIENTS CSL\" || value.name==\"ALL CLIENTS CMTS\")\r\n\r\n vm.all_client_id = value.id;\r\n });\r\n\r\n for( var i=totalLensgroups.length - 1; i>=0; i--){\r\n if(totalLensgroups[i].selected == true && totalLensgroups[i].new == undefined){\r\n databaseLensgroups = databaseLensgroups.concat(totalLensgroups[i].id);\r\n }\r\n if((totalLensgroups[i].selected == true && totalLensgroups[i].new == true)){\r\n newLensgroups = newLensgroups.concat(totalLensgroups[i].id);\r\n }\r\n\r\n }\r\n\r\n if(newLensgroups.length > 0){\r\n\r\n var params_newLensgroups = {\r\n lens_grp_ids: newLensgroups\r\n };\r\n\r\n //LensviewCompanyPopUpService.setDeletedLensCompanies(newCompanies.concat(databaseCompanies));\r\n if(databaseLensgroups.length == 0){\r\n vm.showToastWithFile('delete-lensgroup.success.html', name);\r\n }\r\n\r\n setTimeout(function(){\r\n //$state.reload();\r\n angular.forEach(params_newLensgroups.lens_grp_ids, function(value1,key1){\r\n angular.forEach(vm.lensGroupTable.data, function(value2,key2){\r\n // userLensGroupService.DeleteLensGroupTable(vm.lensGroupTable.data);\r\n //CompanyManagementService.DeleteLensGroupTable(vm.lensGroupTable.data);\r\n if(value2.id==value1)\r\n vm.lensGroupTable.data.splice(key2, 1);\r\n userLensGroupService.DeleteLensGroupTable(vm.lensGroupTable.data);\r\n\r\n });\r\n\r\n if(vm.lensGroupTable.data.length==0) {\r\n vm.selectAll=false;\r\n\r\n }\r\n if(vm.lensGroupTable.data.length==1) {\r\n if(vm.lensGroupTable.data[0].name==\"ALL CLIENTS CWW\" || vm.lensGroupTable.data[1].name==\"ALL CLIENTS CFS\" || vm.lensGroupTable.data[2].name==\"ALL CLIENTS CSL\" || vm.lensGroupTable.data[2].name==\"ALL CLIENTS CMTS\"){\r\n vm.selectAll=false;\r\n }\r\n }\r\n\r\n\r\n });\r\n },2500);\r\n\r\n }\r\n\r\n\r\n\r\n if(databaseLensgroups.length > 0){\r\n\r\n var index = databaseLensgroups.indexOf(vm.all_client_id);\r\n if (index > 0) {\r\n databaseLensgroups.splice(index, 1);\r\n }\r\n\r\n var params = {\r\n lens_grp_ids: databaseLensgroups\r\n };\r\n\r\n //LensviewCompanyPopUpService.setDeletedLensCompanies(databaseCompanies.concat(newCompanies));\r\n\r\n var url = api.url_v2+'/users/remove_multiple_lns_grp/'+$stateParams.id;\r\n\r\n var query = { \"lens_grp_ids\": databaseLensgroups };\r\n\r\n\r\n $http.put(url, query).then(function(response){\r\n vm.listSelectedCount = 0;\r\n vm.showToastWithFile('delete-lensgroup.success.html', name);\r\n //$state.reload();\r\n setTimeout(function(){\r\n\r\n if(newLensgroups.length > 0 && databaseLensgroups.length > 0){\r\n\r\n }else if(databaseLensgroups.length > 0){\r\n $state.reload();\r\n }\r\n //$state.reload();\r\n angular.forEach(params.lens_grp_ids, function(value1,key1){\r\n angular.forEach(vm.lensGroupTable.data, function(value2,key2){\r\n\r\n // userLensGroupService.addToLensGroupTable(vm.lensGroupTable.data);\r\n // CompanyManagementService.DeleteLensGroupTable(vm.lensGroupTable.data);\r\n if(value2.id==value1)\r\n vm.lensGroupTable.data.splice(key2, 1);\r\n userLensGroupService.DeleteLensGroupTable(vm.lensGroupTable.data);\r\n });\r\n\r\n if(vm.lensGroupTable.data.length==0) {\r\n vm.selectAll=false;\r\n\r\n }\r\n if(vm.lensGroupTable.data.length==1) {\r\n if(vm.lensGroupTable.data[0].name==\"ALL CLIENTS CWW\" || vm.lensGroupTable.data[1].name==\"ALL CLIENTS CFS\" || vm.lensGroupTable.data[2].name==\"ALL CLIENTS CSL\" || vm.lensGroupTable.data[2].name==\"ALL CLIENTS CMTS\"){\r\n vm.selectAll=false;\r\n }\r\n }\r\n\r\n });\r\n },2500);\r\n });\r\n\r\n }\r\n\r\n }\r\n else if($state.current.name == \"showCompany\"){\r\n\r\n $mdDialog.cancel();\r\n var databaseLensgroups = [];\r\n var newLensgroups = [];\r\n var totalLensgroups = vm.lensGroupTable.data;\r\n if(vm.getList.length < totalLensgroups.length){ totalLensgroups = totalLensgroups; }\r\n if(vm.getList.length > totalLensgroups.length){ totalLensgroups = vm.getList;}\r\n\r\n angular.forEach(vm.lensGroupTable.data, function(value,key){\r\n if(value.name==\"ALL CLIENTS CWW\" || value.name==\"ALL CLIENTS CFS\" || value.name==\"ALL CLIENTS CSL\" || value.name==\"ALL CLIENTS CMTS\")\r\n vm.all_client_id = value.id;\r\n });\r\n\r\n for( var i=totalLensgroups.length - 1; i>=0; i--){\r\n if(totalLensgroups[i].selected == true && totalLensgroups[i].new == undefined){\r\n databaseLensgroups = databaseLensgroups.concat(totalLensgroups[i].id);\r\n }\r\n if((totalLensgroups[i].selected == true && totalLensgroups[i].new == true)){\r\n newLensgroups = newLensgroups.concat(totalLensgroups[i].id);\r\n }\r\n\r\n }\r\n\r\n if((newLensgroups.length > 0)){\r\n\r\n var params_newLensgroups = {\r\n lens_grp_ids: newLensgroups\r\n };\r\n\r\n //LensviewCompanyPopUpService.setDeletedLensCompanies(newCompanies.concat(databaseCompanies));\r\n if(databaseLensgroups.length == 0){\r\n vm.showToastWithFile('delete-lensgroup.success.html', name);\r\n }\r\n\r\n setTimeout(function(){\r\n //$state.reload();\r\n angular.forEach(params_newLensgroups.lens_grp_ids, function(value1,key1){\r\n angular.forEach(vm.lensGroupTable.data, function(value2,key2){\r\n\r\n // CompanyManagementService.DeleteLensGroupTable(vm.lensGroupTable.data);\r\n //userLensGroupService.DeleteLensCompanyTable(vm.lensGroupTable.data);\r\n if(value2.id==value1)\r\n vm.lensGroupTable.data.splice(key2, 1);\r\n CompanyManagementService.DeleteCompanyLensTable(vm.lensGroupTable.data);\r\n\r\n });\r\n\r\n if(vm.lensGroupTable.data.length==0) {\r\n vm.selectAll=false;\r\n\r\n }\r\n if(vm.lensGroupTable.data.length==1) {\r\n if(vm.lensGroupTable.data[0].name==\"ALL CLIENTS CWW\" || vm.lensGroupTable.data[1].name==\"ALL CLIENTS CFS\" || vm.lensGroupTable.data[2].name==\"ALL CLIENTS CSL\" || vm.lensGroupTable.data[2].name==\"ALL CLIENTS CMTS\"){\r\n vm.selectAll=false;\r\n }\r\n }\r\n\r\n });\r\n },2500);\r\n\r\n }\r\n\r\n //userLensGroupService.addToLensGroupTable();\r\n\r\n if(databaseLensgroups.length > 0){\r\n\r\n var index = databaseLensgroups.indexOf(vm.all_client_id);\r\n if (index > 0) {\r\n databaseLensgroups.splice(index, 1);\r\n }\r\n\r\n var params = {\r\n lens_grp_ids: databaseLensgroups\r\n };\r\n\r\n //LensviewCompanyPopUpService.setDeletedLensCompanies(databaseCompanies.concat(newCompanies));\r\n\r\n var url = api.url_v2+'/companies/'+$stateParams.id;\r\n\r\n var query = { \"lens_group_ids\": databaseLensgroups };\r\n\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).success(function(data){\r\n vm.listSelectedCount=0;\r\n vm.showToastWithFile('delete-lensgroup.success.html', name);\r\n //$state.reload();\r\n setTimeout(function(){\r\n\r\n if(newLensgroups.length > 0 && databaseLensgroups.length > 0){\r\n\r\n }else if(databaseLensgroups.length > 0){\r\n $state.reload();\r\n }\r\n //$state.reload();\r\n angular.forEach(params.lens_grp_ids, function(value1,key1){\r\n angular.forEach(vm.lensGroupTable.data, function(value2,key2){\r\n if(value2.id==value1)\r\n vm.lensGroupTable.data.splice(key2, 1);\r\n CompanyManagementService.DeleteLensCompanyTable(vm.lensGroupTable.data);\r\n });\r\n\r\n if(vm.lensGroupTable.data.length==0) {\r\n vm.selectAll=false;\r\n\r\n }\r\n if(vm.lensGroupTable.data.length==1) {\r\n if(vm.lensGroupTable.data[0].name==\"ALL CLIENTS CWW\" || vm.lensGroupTable.data[1].name==\"ALL CLIENTS CFS\" || vm.lensGroupTable.data[2].name==\"ALL CLIENTS CSL\" || vm.lensGroupTable.data[2].name==\"ALL CLIENTS CMTS\"){\r\n vm.selectAll=false;\r\n }\r\n }\r\n\r\n });\r\n },2500);\r\n });\r\n\r\n }\r\n\r\n }\r\n else{\r\n var params = {};\r\n params.lensGroups_ids = lensviewService.getSelectedLensGroup().map(function(lensGroup){return lensGroup.id;});\r\n\r\n lensviewService.bulkDelete(params).then(function(res){\r\n if (!res.errors){\r\n vm.closeModal();\r\n loadLensGroupData();\r\n vm.showToastWithFile('delete-lensgroup.success.html', name);\r\n $location.path(\"/lensgroups\");\r\n } else {\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-lensgroup.error.html', [''+res.errors]);\r\n }\r\n });\r\n }\r\n\r\n\r\n\r\n }\r\n\r\n\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name TrackTraceService\r\n *\r\n * @description The Alerts directive inserts the Alerts menu option into existing page. The AlertsController handles\r\n * the menu that it is generated and the service handles interaction with the API backend.\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AlertsController.getAlerts()\r\n * @description method that gets the current alerts from AlertsService\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AlertsController.getAlertsCount()\r\n * @description method that gets the current alert count from AlertsService\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AlertsController.alertIcon()\r\n * @description method that gets the appropriate icon for an alert\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AlertsController.refreshAlerts()\r\n * @description method that refreshes the current alerts from AlertsService\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AlertsController.clickAlert()\r\n * @description method for when an alert is clicked, marks them as read\r\n * by calling the service\r\n * visible\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .directive('alerts', alerts)\r\n .controller('AlertsController', AlertsController)\r\n .service('AlertsService', AlertsService);\r\n\r\n /* @ngInject */\r\n\r\n function alerts() {\r\n var directive = {\r\n link: link,\r\n templateUrl: \"/app/layout/alerts/alerts.html\",\r\n controller: AlertsController,\r\n controllerAs: 'vm',\r\n restrict: 'EA',\r\n scope: {\r\n whenDoneAnimating: '&?'\r\n }\r\n };\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n }\r\n }\r\n AlertsController.$inject = ['$scope', '$location', 'AlertsService', '$mdMenu'];\r\n function AlertsController($scope, $location, AlertsService, $mdMenu){\r\n var vm = this;\r\n vm.alertIcon = alertIcon;\r\n vm.getAlerts = getAlerts;\r\n vm.refreshAlerts = refreshAlerts;\r\n vm.getAlertsCount = getAlertsCount;\r\n vm.clickAlert = clickAlert;\r\n vm.closeAlerts = closeAlerts;\r\n vm.alertsClosed = true;\r\n\r\n $scope.$on('$mdMenuOpen', function(){\r\n AlertsService.getAlertsAPI();\r\n });\r\n\r\n vm.refreshAlerts();\r\n\r\n function getAlerts(){\r\n return AlertsService.getAlerts();\r\n }\r\n function getAlertsCount(){\r\n try{\r\n var unread = 0;\r\n AlertsService.getAlerts().map(function(d){\r\n if (d.status === \"unread\"){\r\n unread++;\r\n }\r\n })\r\n return unread;\r\n }\r\n catch(e){\r\n \r\n }\r\n \r\n }\r\n\r\n function clickAlert(alertData){\r\n try{\r\n vm.alertsClosed = true;\r\n var path = '', search = {};\r\n\r\n if (alertData.data.notification.notifiable_type === 'PotentialException') {\r\n if (alertData.data.notification.action === 'submitted') {\r\n path = '/potential-exceptions/' + alertData.data.notification.notifiable_id;\r\n }\r\n else {\r\n path = '/track-trace';\r\n search.potential_exception_id = alertData.data.notification.notifiable_id;\r\n }\r\n }\r\n\r\n if (path) {\r\n $location.path(path).search(search);\r\n }\r\n AlertsService.putAlertAPI(alertData.data.id, true);\r\n }\r\n catch(e){\r\n\r\n } \r\n\r\n }\r\n\r\n function refreshAlerts(){\r\n AlertsService.getAlertsAPI();\r\n }\r\n\r\n function closeAlerts() {\r\n vm.alertsClosed = !vm.alertsClosed;\r\n if (vm.alertsClosed) {\r\n $mdMenu.hide();\r\n }\r\n }\r\n\r\n function alertIcon(type) {\r\n switch (type) {\r\n case \"PotentialException\":\r\n return '<span class=\"text-warning\"></span>';\r\n case \"exception\":\r\n return '<span class=\"text-danger\"></span>';\r\n case \"message\":\r\n return '<span class=\"text-dark\"></span>';\r\n case \"delivery\":\r\n return '<span class=\"text-success\"></span>';\r\n }\r\n }\r\n }\r\n\r\n AlertsService.$inject = ['api', '$http', '$translate'];\r\n function AlertsService(api, $http, $translate){\r\n var alerts = [],\r\n getAlertsAPIPromise = false,\r\n getAlertAPIPromise = false,\r\n putAlertAPIPromise = false;\r\n return {\r\n getAlerts: function(){\r\n return alerts;\r\n },\r\n getAlertsAPI: function(){\r\n try{\r\n if (getAlertsAPIPromise) return getAlertsAPIPromise;\r\n\r\n getAlertsAPIPromise = $http.get(api.url_v2+'/alerts').then(function(resp){\r\n alerts.length = 0;\r\n sortAlerts(resp.data);\r\n resp.data.map(function(d){alerts.push(d);});\r\n alerts = processAlerts(alerts);\r\n return alerts;\r\n }).finally(function() {\r\n getAlertsAPIPromise = false;\r\n });\r\n return getAlertsAPIPromise;\r\n }catch(e){\r\n \r\n }\r\n \r\n },\r\n getAlertAPI: function(id){\r\n if (getAlertAPIPromise) return getAlertAPIPromise;\r\n\r\n getAlertAPIPromise = $http.get(api.url_v2+'/alerts/'+id).then(function(resp){\r\n return resp.data;\r\n }).finally(function() {\r\n getAlertAPIPromise = false;\r\n });\r\n return getAlertAPIPromise;\r\n },\r\n putAlertAPI: function(id, isRead){\r\n if (putAlertAPIPromise) return putAlertAPIPromise;\r\n\r\n putAlertAPIPromise = $http.put(api.url_v2+'/alerts/'+id, {status: isRead?'read':'unread'}).then(function(resp){\r\n return resp.data;\r\n }).finally(function() {\r\n putAlertAPIPromise = false;\r\n });\r\n return putAlertAPIPromise;\r\n }\r\n };\r\n function sortAlerts(alerts) {\r\n alerts.sort(function(a, b) {\r\n return a.created_at < b.created_at ? 1 : (a.created_at > b.created_at ? -1 : 0);\r\n });\r\n }\r\n\r\n function processAlerts(alertz) {\r\n // make the data all nice-like\r\n try{\r\n\r\n var pAlerts = alertz.map(function(a) {\r\n\r\n if(a.notification.notifiable_type == \"PotentialException\"){\r\n var titleText = \"Potential Exception\";\r\n }\r\n else if(a.notification.notifiable_type == \"exception\"){\r\n var titleText = \"Exception\";\r\n }else if(a.notification.notifiable_type == \"message\"){\r\n var titleText = \"Message\";\r\n }else if(a.notification.notifiable_type == \"delivery\"){\r\n var titleText = \"Shipment has been delivered!\";\r\n }\r\n\r\n if (a.notification.notifiable_type == 'PotentialException') {\r\n if (a.notification.action == 'submitted') {\r\n var messageText = $translate.instant('LAYOUT.ALERTS.NEW_SUBMISSION') + ': ' + a.actionable_item.title;\r\n }else{ \r\n var messageText = a.actionable_item.title;\r\n }\r\n } \r\n else {\r\n var messageText = a.notification.message;\r\n }\r\n\r\n return {\r\n type: titleText,\r\n message: messageText,\r\n status:a.status,\r\n data: a\r\n };\r\n });\r\n return pAlerts;\r\n\r\n }\r\n catch(e){\r\n //debugger;\r\n }\r\n\r\n\r\n }\r\n\r\n function displayType(type){\r\n switch (type){\r\n case \"PotentialException\":\r\n return 'Potential Exception';\r\n case \"exception\":\r\n return 'Exception';\r\n case \"message\":\r\n return 'Message';\r\n case \"delivery\":\r\n return 'Shipment has been delivered!';\r\n }\r\n }\r\n /**\r\n * Takes the alert and returns the appropriate message to use in the alert\r\n * @param {Alert} alert\r\n * @return {string} The message to be used in the alert interface\r\n */\r\n function displayMessage(content) {\r\n if (content.notification.notifiable_type == 'PotentialException') {\r\n if (content.notification.action == 'submitted') {\r\n return $translate.instant('LAYOUT.ALERTS.NEW_SUBMISSION') + ': ' + content.actionable_item.title;\r\n }\r\n else {\r\n return content.actionable_item.title;\r\n }\r\n }\r\n else {\r\n return content.notification.message;\r\n }\r\n }\r\n }\r\n})();\r\n\n/**\r\n * Creates the <loadmask> directive. It will add a loading mask to the element it is attached to\r\n * This must be used an as attribute\r\n */\r\n(function() {\r\n 'use strict';\r\n angular.module('loadmask', []);\r\n angular\r\n .module('loadmask')\r\n .directive('loadmask', ['$compile', '$timeout', loadmask]);\r\n\r\n function loadmask($compile, $timeout) {\r\n var directive = {\r\n restrict: 'A',\r\n scope: {},\r\n link: function(scope, element, attrs) {\r\n\r\n // get our options\r\n var defaults = {\r\n backgroundColor: false,\r\n duration: .5,\r\n progressIndicatorSize: 100,\r\n fixedCenter: false\r\n },\r\n options = {};\r\n\r\n if (attrs.loadmaskBackgroundColor) {\r\n options.backgroundColor = attrs.loadmaskBackgroundColor;\r\n }\r\n if (attrs.loadmaskDuration) {\r\n options.duration = attrs.loadmaskDuration;\r\n }\r\n if (attrs.loadmaskDuration) {\r\n options.duration = attrs.loadmaskDuration;\r\n }\r\n if (attrs.loadmaskProgressIndicatorSize) {\r\n options.progressIndicatorSize = attrs.loadmaskProgressIndicatorSize;\r\n }\r\n if (attrs.loadmaskFixedCenter) {\r\n options.fixedCenter = attrs.loadmaskFixedCenter;\r\n }\r\n options = angular.extend(angular.copy(defaults),options);\r\n\r\n // control the load mask\r\n var loadMaskElement, progressIndicatorElement;\r\n\r\n // because of the styling, we want to add a class to any parent <md-card>\r\n var testElement = element[0],\r\n parent, parentIsCard = false;\r\n\r\n while(testElement.parentElement) {\r\n parent = testElement.parentElement;\r\n if (parent.tagName.toLowerCase() === 'md-card') {\r\n parentIsCard = true;\r\n break;\r\n }\r\n testElement = parent;\r\n }\r\n\r\n scope.$parent.$watch(attrs.loadmask,\r\n function(newValue, oldValue) {\r\n // remove the load mask\r\n if (newValue) {\r\n if (!loadMaskElement) return;\r\n loadMaskElement[0].style.opacity = 0;\r\n progressIndicatorElement.remove();\r\n\r\n $timeout(function() {\r\n loadMaskElement.remove();\r\n progressIndicatorElement.remove();\r\n element[0].classList.remove('has-loadmask');\r\n if (parentIsCard) {\r\n parent.classList.remove('child-has-loadmask');\r\n }\r\n loadMaskElement = false;\r\n progressIndicatorElement = false;\r\n }, options.duration * 1000);\r\n }\r\n // add the load mask\r\n else {\r\n if (loadMaskElement) loadMaskElement.remove();\r\n if (progressIndicatorElement) progressIndicatorElement.remove();\r\n \r\n var offsetY = options.progressIndicatorSize/2,\r\n offsetX = offsetY;\r\n if (options.fixedCenter) {\r\n // TODO: need to move this to CSS so we can take into consideration breakpoints\r\n offsetX -= 207/2;\r\n offsetY -= 64/2;\r\n }\r\n element[0].classList.add('has-loadmask');\r\n // <md-card> will need to have this so it can clip\r\n if (parentIsCard) {\r\n parent.classList.add('child-has-loadmask');\r\n }\r\n loadMaskElement = $compile(\r\n '<div class=\"loadmask' + (options.fixedCenter ? ' loadmask-fixed-center' : '') + '\" style=\"transition: opacity ' + options.duration + 's;' + (options.backgroundColor ? 'background-color:' + options.backgroundColor + ';' : '') + '\"></div>'\r\n )(scope);\r\n progressIndicatorElement = $compile(\r\n '<div class=\"loadmask-progress-indicator-container' + (options.fixedCenter ? ' loadmask-fixed-center' : '') + '\">' +\r\n '<md-progress-circular md-mode=\"indeterminate\" class=\"md-hue-1 progress-indicator\" md-diameter=\"' + options.progressIndicatorSize + 'px\" style=\"position:' + (options.fixedCenter ? 'fixed' : 'absolute') + ';top:50%;left:50%;margin-top:-' + offsetY + 'px;margin-left:-' + offsetX + 'px\"></md-progress-circular>' +\r\n '</div>'\r\n )(scope);\r\n element.append(loadMaskElement);\r\n element.append(progressIndicatorElement);\r\n }\r\n });\r\n }\r\n };\r\n\r\n return directive;\r\n }\r\n})();\r\n\n/* global d3:true */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.widgets')\r\n .directive('donutChart', donutChart);\r\n\r\n /* @ngInject */\r\n donutChart.$inject = ['$interval', '$timeout', '$window'];\r\n function donutChart($interval, $timeout, $window) {\r\n var directive = {\r\n restrict: 'EA',\r\n scope: {\r\n data: \"=\",\r\n label: \"@\",\r\n onClick: \"&\",\r\n control: \"=\",\r\n loading: \"=\",\r\n segmentClassMap: \"=\"\r\n },\r\n link: link\r\n };\r\n return directive;\r\n\r\n function link(scope, iElement, attrs) {\r\n // debugger;\r\n // iElement(function(){\r\n // Set the initial svg element\r\n var didRenderData = false;\r\n var svg = d3.select(iElement[0])\r\n .append(\"svg\")\r\n .attr(\"width\", \"100%\");\r\n\r\n // Set theme colors\r\n var colors = ['#45AFE3', '#2D7D8F', '#235B68', '#1F4953'];\r\n\r\n if (attrs.theme == \"current-exceptions\") {\r\n colors = ['#F4978A', '#76291E', '#EF533D'];\r\n } else if (attrs.theme == \"potential-exceptions\") {\r\n colors = ['#FFE49C', '#774E1E', '#EF9E3D'];\r\n } else if (attrs.theme == \"active-shipments\") {\r\n colors = ['#82DAA7', '#176033', '#30C268'];\r\n }\r\n\r\n // on parent element resize, re-render d3 canvas\r\n var debounceId, isRendering = false;\r\n\r\n // we're going to cache these\r\n var width = false, height = false, svgHeight = false,\r\n radius, outerRadius, innerRadius, wasResize = true, path, arc,\r\n totalShipments = 0, totalShipmentsInterval, shouldCallExternalListeners = false,\r\n values, newDataPending = false;\r\n\r\n // set up our external event listeners\r\n var segmentDataMap = {};\r\n scope.internalControl = scope.control || {};\r\n\r\n scope.internalControl.growSegment = function(type) {\r\n if (!shouldCallExternalListeners) return;\r\n hoverTween(outerRadius - 10, 0, scope, true).call(segmentDataMap[type]);\r\n };\r\n\r\n scope.internalControl.restoreSegment = function(type) {\r\n if (!shouldCallExternalListeners) return;\r\n hoverTween(outerRadius - 20, 150, scope, false).call(segmentDataMap[type]);\r\n };\r\n\r\n scope.internalControl.onTotalClick = scope.internalControl.onTotalClick || function() { };\r\n\r\n scope.internalSegmentClassMap = scope.segmentClassMap || {};\r\n\r\n angular.element($window).bind('resize', function(){\r\n $timeout(function(){\r\n renderChart(scope.data)\r\n }, 500);\r\n });\r\n\r\n\r\n\r\n // watch for data changes and re-render\r\n scope.$watch('data', function(newVals, oldVals) {\r\n // don't render again with old data\r\n // if (newVals[0].shipments == oldVals[0].shipments && newVals[1].shipments == oldVals[1].shipments && newVals[1].shipments == oldVals[1].shipments) return;\r\n $timeout(function(){\r\n newDataPending = true;\r\n values = newVals;\r\n // if (isRendering) return;\r\n if (debounceId) $timeout.cancel(debounceId);\r\n shouldCallExternalListeners = false;\r\n debounceId = renderChart(newVals);\r\n }, 150);\r\n }, true);\r\n\r\n // debounceId = renderChart(scope.data).finally(\r\n // function(){ }\r\n // );\r\n\r\n function renderChart(data) {\r\n isRendering = true;\r\n return $timeout(function(){\r\n // newDataPending = false;\r\n svg.selectAll('*').remove();\r\n resizeSvg();\r\n scope.render(data);\r\n // $timeout(function() { scope.$apply(); });\r\n }, 500)\r\n\r\n }\r\n\r\n angular.element(document).ready(function(){\r\n svg.selectAll('*').remove();\r\n resizeSvg();\r\n scope.render(scope.data);\r\n\r\n })\r\n\r\n // define render function\r\n scope.render = function(data){\r\n // we don't want to call external listeners while we're drawing\r\n shouldCallExternalListeners = false;\r\n $timeout(function() {\r\n shouldCallExternalListeners = true;\r\n }, 2000); // 2000 covers the transition durations, and a litte padding\r\n // debugger;\r\n // If we don't pass any data, return out of the element\r\n if (!data) return;\r\n\r\n // resizeSvg();\r\n var color = d3.scale.ordinal()\r\n .range(colors);\r\n\r\n var pie = d3.layout.pie()\r\n .padAngle(.02)\r\n .sort(null)\r\n .value(function(d) { return d.shipments; });\r\n\r\n arc = d3.svg.arc()\r\n .padRadius(outerRadius)\r\n .innerRadius(innerRadius);\r\n\r\n // if (wasResize || !didRenderData) {\r\n // remove all previous items before render\r\n svg.selectAll('*').remove();\r\n /* Draw Inner Circle */\r\n svg.append(\"g\")\r\n .attr(\"transform\", \"translate(\"+radius+\",\"+radius+\")\")\r\n .selectAll(\"circle\")\r\n .data([{\"x_axis\":40, \"y_axis\":40, \"radius\":40, \"color\":\"grey\"}])\r\n .enter()\r\n .append(\"circle\")\r\n .attr(\"r\", (innerRadius - 8) > 0 ? (innerRadius - 8) : innerRadius)\r\n .style(\"fill\", \"none\")\r\n .style(\"stroke\", \"#3F4C59\")\r\n .style(\"stroke-width\", 2);\r\n\r\n var g = svg.append(\"g\")\r\n .attr(\"transform\", \"translate(\" + radius + \",\" + radius + \")\");\r\n\r\n path = g.selectAll(\"path\")\r\n .data(pie(data))\r\n .enter()\r\n .append(\"path\");\r\n\r\n path.each(function(d) { d.outerRadius = outerRadius - 20; this._current = d; segmentDataMap[d.data.type] = this; })\r\n .on(\"mouseover\", hoverTween(outerRadius - 10, 0, scope, true))\r\n .on(\"mouseout\", hoverTween(outerRadius - 20, 150, scope, false))\r\n .style(\"fill\", function(d) { return color(d.data.type); })\r\n .style(\"stroke\", \"red\")\r\n .style(\"stroke-width\", \"20px\")\r\n .style(\"stroke-opacity\", \"0\")\r\n .attr(\"cursor\", \"pointer\")\r\n .on(\"click\", function(d) {\r\n scope.internalControl.onClick(d.data.type);\r\n });\r\n // debugger;\r\n svg.append(\"g\")\r\n .selectAll(\"text\")\r\n .text(\"0\")\r\n .data([0])\r\n .enter()\r\n .append(\"text\")\r\n .attr(\"transform\", function(d){\r\n return [\r\n \"translate(\",\r\n Math.ceil(radius- this.getBBox().width/2),\r\n \",\",\r\n Math.ceil(radius + this.getBBox().height/4),\r\n \")\"\r\n ].join('');\r\n })\r\n .style(\"fill\", \"white\")\r\n .style(\"font-weight\", \"bold\")\r\n .attr(\"cursor\", \"pointer\")\r\n .on(\"click\", function() { scope.internalControl.onClick() });\r\n\r\n path.transition().delay(function(d, i) { return i * 500; }).duration(500)\r\n .attrTween('d', function(d) {\r\n // keeps a small percentage value from briefly showing up then hiding\r\n if (d.data.shipments == 0 || (d.startAngle+.1 > d.endAngle)) {\r\n return function(t) {\r\n return arc(d);\r\n }\r\n }\r\n var i = d3.interpolate(d.startAngle+0.1, d.endAngle);\r\n return function(t) {\r\n d.endAngle = i(t);\r\n return arc(d);\r\n };\r\n });\r\n //wasResize = false;\r\n didRenderData = true;\r\n // }\r\n\r\n // subsequent draws, animate the difference\r\n // else {\r\n // path = path.data(pie(data));\r\n // path.each(function(d) { d.outerRadius = outerRadius - 20; })\r\n // .on(\"mouseover\", hoverTween(outerRadius - 10, 0, scope, true))\r\n // .on(\"mouseout\", hoverTween(outerRadius - 20, 150, scope, false))\r\n // .transition().duration(750).attrTween(\"d\", arcTweenUpdate);\r\n // }\r\n\r\n /* Animate the total sum of the data */\r\n var textNode = svg.selectAll(\"text\"),\r\n oldTotalShipments = 1*svg.selectAll(\"text\").text() || 0,\r\n totalShipments = data ? data[2] ? data[0].shipments + data[1].shipments + data[2].shipments : data[0].shipments + data[1].shipments : 0,\r\n tsDistance = totalShipments - oldTotalShipments,\r\n tsStep = tsDistance/100;\r\n\r\n\r\n // no decimals\r\n if (tsDistance > 0) {\r\n tsStep = Math.ceil(tsStep);\r\n }\r\n else {\r\n tsStep = Math.floor(tsStep);\r\n }\r\n var currTotalShipments = oldTotalShipments || 0;\r\n\r\n // make sure our first step didn't go too far\r\n if ((tsStep > 0 && currTotalShipments > totalShipments) || (tsStep <= 0 && currTotalShipments <= totalShipments)) {\r\n currTotalShipments = totalShipments;\r\n }\r\n\r\n if (totalShipmentsInterval) {\r\n $interval.cancel(totalShipmentsInterval);\r\n }\r\n totalShipmentsInterval = $interval(function() {\r\n // see if we should stop\r\n if (currTotalShipments == totalShipments) {\r\n // set it to the currNum regardless because if the first step would have gone too\r\n // far this will make sure we update\r\n update();\r\n $interval.cancel(totalShipmentsInterval);\r\n totalShipmentsInterval = false;\r\n return;\r\n }\r\n\r\n // step and update\r\n currTotalShipments += tsStep;\r\n if ((tsStep > 0 && currTotalShipments > totalShipments) || (tsStep <= 0 && currTotalShipments < totalShipments)) {\r\n currTotalShipments = totalShipments;\r\n }\r\n update();\r\n // currTotalShipments\r\n function update() {\r\n var textFontSize = 48;\r\n\r\n switch ((\"\"+currTotalShipments).length) {\r\n case 1:\r\n textFontSize = 38;\r\n break;\r\n case 2:\r\n textFontSize = 30;\r\n break;\r\n case 3:\r\n textFontSize =28;\r\n break;\r\n case 4:\r\n textFontSize = 25;\r\n break;\r\n case 5:\r\n textFontSize = 22;\r\n break;\r\n case 6:\r\n textFontSize = 31;\r\n break;\r\n default:\r\n textFontSize = 29;\r\n }\r\n // // console.log(textFontSize);\r\n textNode.text(\"\"+currTotalShipments).style(\"font-size\", textFontSize+'px')\r\n .attr(\"transform\", function(d){\r\n return [\r\n \"translate(\",\r\n Math.ceil(radius- this.getBBox().width/2),\r\n \",\",\r\n Math.ceil(radius + this.getBBox().height/4),\r\n \")\"\r\n ].join('');\r\n })\r\n .on(\"mouseover\", function() {\r\n textNode.transition().duration(200)\r\n .style(\"font-size\", Math.ceil(textFontSize*1.25))\r\n .attrTween(\"transform\", function(d) {\r\n var me = this;\r\n return function(t) {\r\n return [\r\n \"translate(\",\r\n Math.ceil(radius - me.getBBox().width/2),\r\n \",\",\r\n Math.ceil(radius + me.getBBox().height/4),\r\n \")\"\r\n ].join('')\r\n }\r\n });\r\n })\r\n .on(\"mouseout\", function() {\r\n textNode.transition()\r\n .duration(200)\r\n .style(\"font-size\", textFontSize)\r\n .attrTween(\"transform\", function(d) {\r\n var me = this;\r\n return function(t) {\r\n return [\r\n \"translate(\",\r\n Math.ceil(radius - me.getBBox().width/2),\r\n \",\",\r\n Math.ceil(radius + me.getBBox().height/4),\r\n \")\"\r\n ].join('')\r\n }\r\n });\r\n });\r\n }\r\n }, (tsDistance < 100 ? 1000/tsDistance : 10));\r\n\r\n };\r\n\r\n function hoverTween(rad, delay, scp, addExternalCls) {\r\n return function() {\r\n // add/remove the class\r\n var el = d3.select(this);\r\n if (!el[0][0]) return;\r\n var data = el[0][0].__data__.data;\r\n if (scp.internalSegmentClassMap.hasOwnProperty(\"\"+data.type)) {\r\n scp.internalSegmentClassMap[\"\"+data.type] = addExternalCls;\r\n // you don't actually need this when you trigger this manually via the scope.control, but\r\n // you do if you're triggering it from the hover in here. fun times!\r\n $timeout(function() {\r\n scp.$apply();\r\n });\r\n }\r\n // perform the transition\r\n d3.select(this)\r\n .transition()\r\n .delay(delay)\r\n .attrTween(\"d\", function(d) {\r\n var i = d3.interpolate(d.outerRadius, rad);\r\n return function(t) { d.outerRadius = i(t); return arc(d); };\r\n });\r\n };\r\n }\r\n function arcTweenUpdate(a) {\r\n var i = d3.interpolate(this._current, a);\r\n this._current = i(0);\r\n return function(t) {\r\n return arc(i(t));\r\n };\r\n }\r\n\r\n function resizeSvg() {\r\n var dim;\r\n // -- this probably isn't needed anymore\r\n width = false;\r\n height = false;\r\n svgHeight = false;\r\n svg.attr(\"width\", 0);\r\n svg.attr(\"height\", 0);\r\n\r\n //wasResize = true;\r\n width = iElement.parent()[0].offsetWidth;\r\n if (!scope.$root.initialHeight){\r\n height = iElement.parent()[0].offsetHeight;\r\n scope.$root.initialHeight = height;\r\n\r\n }\r\n else {\r\n height = scope.$root.initialHeight;\r\n }\r\n if (window.innerWidth < 600){\r\n // dim = window.innerWidth * .66;\r\n dim = window.innerWidth * .45;\r\n } else {\r\n dim = Math.min(width, height);\r\n }\r\n radius = dim / 2;\r\n outerRadius = radius;\r\n innerRadius = radius - 35;\r\n svgHeight = dim;\r\n svg\r\n .style(\"margin\", \"auto\")\r\n .style(\"text-align\", \"center\")\r\n .attr(\"height\", dim)\r\n .attr('width', dim);\r\n }\r\n // });\r\n }\r\n }\r\n})();\r\n\n/* global d3:true */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.widgets')\r\n .directive('barChart', barChart);\r\n\r\n /* @ngInject */\r\n function barChart($filter) {\r\n var directive = {\r\n restrict: 'EA',\r\n scope: {\r\n data: \"=\",\r\n theme: \"=\",\r\n label: \"@\",\r\n onClick: \"&\"\r\n },\r\n link: function(scope, iElement, attrs) {\r\n // Set the initial svg element\r\n var svg = d3.select(iElement[0])\r\n .append(\"svg\")\r\n .attr(\"width\", \"99%\");\r\n\r\n // Set default theme colors\r\n var colors = ['#45AFE3', '#2D7D8F', '#235B68', '#1F4953'];\r\n\r\n function hexToRgb(hex) {\r\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\r\n var shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\r\n hex = hex.replace(shorthandRegex, function(m, r, g, b) {\r\n return r + r + g + g + b + b;\r\n });\r\n\r\n var result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\r\n return result ? {\r\n r: parseInt(result[1], 16),\r\n g: parseInt(result[2], 16),\r\n b: parseInt(result[3], 16)\r\n } : null;\r\n }\r\n // on window resize, re-render d3 canvas\r\n window.onresize = function() {\r\n return scope.$apply();\r\n };\r\n scope.$watch(function(){\r\n return angular.element(window)[0].innerWidth;\r\n }, function(){\r\n return scope.render(scope.data);\r\n }\r\n );\r\n\r\n // watch for data changes and re-render\r\n scope.$watch('data', function(newVals, oldVals) {\r\n return scope.render(newVals);\r\n }, true);\r\n\r\n scope.renderChart = function(data){\r\n isRendering = true;\r\n return $timeout(function(){\r\n scope.render(data);\r\n }, 150);\r\n };\r\n\r\n // define render function\r\n scope.render = function(data){\r\n svg.attr(\"width\", 0);\r\n // debugger;\r\n if (scope.theme == \"danger\") {\r\n colors = ['#F59889', '#EF533D', '#78271B', '#471109'];\r\n } else if (scope.theme == \"warning\") {\r\n colors = ['#FFE49C', '#EF9E3D', '#774E1E', '#5B3911'];\r\n } else if (scope.theme == \"success\") {\r\n colors = ['#82DAA7', '#30C268', '#176033', '#144025'];\r\n } else {\r\n colors = ['#45AFE3', '#2D7D8F', '#235B68', '#1F4953'];\r\n }\r\n\r\n var width = iElement.parent()[0].offsetWidth - 10,\r\n height = 200;\r\n\r\n svg.attr(\"width\", width)\r\n .attr(\"height\", height + 45);\r\n\r\n // remove all previous items before render\r\n svg.selectAll('*').remove();\r\n\r\n // If we don't pass any data, return out of the element\r\n if (!data) return;\r\n\r\n var x = d3.scale.ordinal()\r\n .range([0,100])\r\n .rangeRoundBands([80, width], .2);\r\n\r\n var y = d3.scale.linear()\r\n .range([height, 5]);\r\n\r\n var xAxis = d3.svg.axis()\r\n .tickFormat(function(d, i){\r\n // debugger;\r\n return i%2 !== 0 && data.length > 8 && iElement[0].offsetWidth < 400 ? \"\" : d\r\n })\r\n // function(){\r\n // return data.length > 8 && iElement[0].offsetWidth < 400 ? 2 : 1\r\n // })\r\n .scale(x)\r\n .orient(\"bottom\");\r\n\r\n var yAxis = d3.svg.axis()\r\n .scale(y)\r\n .orient(\"left\")\r\n .ticks(6, \"s\")\r\n .tickFormat(function(d) {\r\n return $filter(\"currency\")(d,\"$\",0);\r\n });\r\n\r\n var y_domain = [\r\n 0, d3.max(data, function(d) {\r\n return d3.max(\r\n d.spent, function(d) {\r\n return d.spent;\r\n }\r\n );\r\n })\r\n ];\r\n\r\n /* Define our tooltip that is displayed */\r\n var tip = d3.tip()\r\n .attr('class', 'd3-tip')\r\n .style(\"background-color\", \"#616161\")\r\n .offset([-10, 0])\r\n .html(function(d, i){\r\n var progress = \"\";\r\n if (i == data.length - 1 && d.progress < 100){\r\n progress = \" at <span>\"+d.progress+\"% Complete</span>\";\r\n }\r\n return \"<strong>\"+$filter(\"currency\")(d.spent, \"$\", 0)+\"</strong>\" + progress;\r\n });\r\n\r\n y.domain([0, d3.max(data, function(d) {\r\n return d.spent;\r\n })]);\r\n\r\n\r\n /* Draw the y axis */\r\n svg.append(\"g\")\r\n .attr(\"class\", \"y axis\")\r\n .data([y_domain, [100]])\r\n .call(yAxis)\r\n .attr(\"transform\", \"translate(80, 0)\")\r\n .append(\"text\")\r\n .attr(\"transform\", \"rotate(0)\")\r\n .attr(\"y\", 196)\r\n .attr(\"x\", -30)\r\n .attr(\"dy\", \".71em\")\r\n .style(\"text-anchor\", \"end\")\r\n .text(attrs.yLabel);\r\n\r\n\r\n x.domain(data.map(function(d) { return d.xVal; }));\r\n y.domain([0, d3.max(data, function(d) {\r\n return d.spent;\r\n })]);\r\n\r\n /* Draw the x axis */\r\n svg.append(\"g\")\r\n .attr(\"class\", \"x axis\")\r\n .attr(\"transform\", \"translate(0,\" + height + \")\")\r\n .attr(\"flex-xs\", 90)\r\n .call(xAxis)\r\n .selectAll(\".tick text\")\r\n .call(wrap, x.rangeBand());\r\n\r\n // var axis = svg.selectAll(\".x\")\r\n // var ticks = axis.selectAll(\".tick text\")[0]\r\n // // debugger;\r\n // ticks.map(function(tick){\r\n // // debugger;\r\n // for (var i = 0; i < tick.children.length; i++){\r\n // tick.children[i]['dy'] = \"0.71em\";\r\n // };\r\n // })\r\n\r\n /* Draw the bars */\r\n svg.selectAll(\".bar\")\r\n .data(data)\r\n .enter().append(\"rect\")\r\n .attr(\"class\", \"bar\")\r\n .attr(\"x\", function(d) { return x(d.xVal); })\r\n .attr(\"width\", x.rangeBand())\r\n .attr('height', 5)\r\n .style(\"fill\", function(d,i){\r\n\r\n if (i == data.length - 1 && d.progress < 100) {\r\n var color = hexToRgb(colors[1]);\r\n return \"rgba(\"+[color.r, color.g, color.b, 0.45].join(',')+\")\";\r\n }else{\r\n return colors[1];\r\n }\r\n })\r\n .style(\"stroke\", colors[1])//function(d,i){ return (i==data.length-1 ? colors[1])})\r\n .style(\"stroke-width\", function(d,i){\r\n if (i == data.length -1 && d.progress < 100){\r\n return 3;\r\n } else {\r\n return 0;\r\n }\r\n })\r\n .attr(\"y\", height)\r\n .on('mouseover', tip.show)\r\n .on('mouseout', tip.hide)\r\n .transition()\r\n .duration(1500)\r\n .attr('height', function(d) {\r\n return height - y(d.spent);\r\n })\r\n .attr('y', function(d) {\r\n return y(d.spent);\r\n });\r\n /* Let there be tooltips */\r\n svg.call(tip);\r\n };\r\n\r\n function wrap(text, width) {\r\n text.each(function() {\r\n var text = d3.select(this),\r\n words = text.text().split(/\\s+/).reverse(),\r\n word,\r\n line = [],\r\n lineNumber = 0,\r\n lineHeight = 1.1, // ems\r\n y = text.attr(\"y\"),\r\n dy = parseFloat(text.attr(\"dy\")),\r\n tspan = text.text(null).append(\"tspan\").attr(\"x\", 0).attr(\"y\", y).attr(\"dy\", dy + \"em\");\r\n while (word = words.pop()) {\r\n line.push(word);\r\n tspan.text(line.join(\" \"));\r\n if (tspan.node().getComputedTextLength() > width) {\r\n line.pop();\r\n tspan.text(line.join(\" \"));\r\n line = [word];\r\n tspan = text.append(\"tspan\").attr(\"x\", 0).attr(\"y\", y).attr(\"dy\", ++lineNumber * lineHeight + dy + \"em\").text(word);\r\n }\r\n }\r\n });\r\n }\r\n }\r\n };\r\n return directive;\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .directive('collapsible', [collapsible]);\r\n\r\n /* @ngInject */\r\n function collapsible() {\r\n var directive = {\r\n link: link,\r\n templateUrl: function(elem, attrs){\r\n return attrs.templateUrl || '';\r\n },\r\n restrict: 'A',\r\n scope: false\r\n };\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n scope.collapsed = true;\r\n scope.toggleCollapse = function(){\r\n scope.collapsed = !scope.collapsed;\r\n };\r\n }\r\n }\r\n})();\n/**\r\n * Creates the <cascade> directive. It will animate elements cascading in that include the\r\n * cascade-in class. Set cascade=\"{{variable}}\" to know when to begin animating the elements.\r\n * This can be used as its own element, or as an attribute to an existing element\r\n */\r\n(function() {\r\n 'use strict';\r\n angular.module('cascade', []);\r\n angular\r\n .module('cascade')\r\n .directive('cascade', ['$interval', cascade]);\r\n\r\n function cascade($interval) {\r\n var directive = {\r\n restrict: 'EA',\r\n scope: {},\r\n link: function(scope, element, attrs) {\r\n scope.$watch(function() {return element.attr('cascade');},\r\n function(newValue, oldValue) {\r\n var children = element[0].querySelectorAll('.cascade-in');\r\n\r\n // remove the cascaded class\r\n if (newValue !== \"true\" && newValue !== \"1\") {\r\n angular.forEach(children, function(c) {\r\n c.classList.remove('cascaded');\r\n });\r\n }\r\n // add the cascaded class\r\n else {\r\n var ix = 0, tid;\r\n\r\n if (children.length > 0) {\r\n tid = $interval(function() {\r\n var c = children[ix];\r\n c.classList.add('cascaded');\r\n ix++;\r\n if (ix == children.length) $interval.cancel(tid);\r\n }, 200);\r\n }\r\n }\r\n });\r\n }\r\n };\r\n\r\n return directive;\r\n }\r\n})();\r\n\n\r\n(function(){\r\n\r\nangular\r\n .module(\"app\")\r\n .directive('asyncValidator', asyncValidator);\r\n\r\n\r\n asyncValidator.$inject = ['$http', 'UserManagementService', '$q', 'api']; \r\n function asyncValidator($http, UserManagementService, $q, api){ \r\n return {\r\n require: 'ngModel',\r\n scope: {\r\n ngModel: '='\r\n }, \r\n link: function(scope, element, attrs, ngModel) {\r\n\r\n \r\n var field = ngModel.$name.replace(/-\\d+/,\"\"); \r\n var index = ngModel.$name.replace(/\\D+/g,\"\"); \r\n\r\n ngModel.$asyncValidators[field] = function(modelValue, viewValue) {\r\n\r\n return $http({\r\n url: api.url + \"/bulk_users/validate_field\",\r\n method: \"GET\",\r\n params: {field: field, value: viewValue}\r\n } ).then(\r\n function(response) {\r\n if (!response.data[field].valid) {\r\n \r\n\r\n return $q.reject();\r\n }\r\n \r\n if (field === 'company'){\r\n var company_id = response.data[field].id;\r\n //ngModel.$modelValue = company_id; \r\n\r\n \r\n ngModel.$$parentForm['company_id-'+index].$setViewValue(company_id); \r\n ngModel.$$parentForm['company_id-'+index].$render();\r\n //ngModel.$$parentForm['company_id-'+index].\r\n }\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\n/**\r\n * Creates the <cva-accordion> directive. Allows the element to collapse and expand it's child\r\n * content. Can be passed whether the element is defaulted to expanded or collapsed.\r\n * This can be used only as an element.\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n // Sets up a custom animation to be used by the accordion when collapsing and expanding\r\n .animation('.accordion-content', ['$animateCss', function ($animateCss) {\r\n return {\r\n enter: function (element, doneFn) {\r\n var height = element[0].offsetHeight;\r\n return $animateCss(element, {\r\n from: {height: '0px'},\r\n to: {height: height + 'px'},\r\n easing: 'cubic-bezier(.6,.02,.95,.75)',\r\n cleanupStyles: true,\r\n duration: 0.12\r\n });\r\n },\r\n leave: function (element, doneFn) {\r\n var height = element[0].offsetHeight;\r\n return $animateCss(element, {\r\n from: {height: height + 'px'},\r\n to: {height: '0px'},\r\n easing: 'cubic-bezier(.6,.02,.95,.75)',\r\n cleanupStyles: true,\r\n duration: 0.12\r\n });\r\n }\r\n };\r\n }])\r\n .directive('cvaAccordion', cvaAccordion);\r\n\r\n /* @ngInject */\r\n function cvaAccordion($timeout, $animate) {\r\n // Pass the parent accordion group scope to the accordion element\r\n // So that the group can be toggled closed whenever an element is opened\r\n var directive = {\r\n restrict: 'E',\r\n require: '^^cvaAccordionGroup',\r\n transclude: true,\r\n templateUrl: '/app/directives/accordion/accordion.html',\r\n scope: {},\r\n link: function(scope, iElement, attrs, accordionCtrl) {\r\n var child = scope,\r\n element = iElement[0],\r\n group = element.parentNode;\r\n\r\n accordionCtrl.addAccordion(scope);\r\n\r\n child.title = attrs.title;\r\n child.groupCollapse = attrs.groupCollapse;\r\n child.icon = attrs.icon;\r\n child.savedExpanded = savedExpanded();\r\n child.collapsed = child.savedExpanded;\r\n\r\n\r\n function savedExpanded() {\r\n if (attrs.savedExpanded == \"true\") {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }\r\n\r\n scope.$watch('collapsed', function(newValue, oldValue) {\r\n // If opening a new accordion, close the others\r\n if (child.groupCollapse == \"true\") {\r\n if (!newValue) {\r\n accordionCtrl.toggleGroup(scope);\r\n }\r\n }\r\n }); \r\n }\r\n };\r\n return directive;\r\n }\r\n})();\n/**\r\n * Creates the <cva-accordion-group> directive. This directive acts as a parent with nested\r\n * <cva-accordions> inside and can pass data from one accordion to the group.\r\n * This can be used only as an element.\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .directive('cvaAccordionGroup', cvaAccordionGroup);\r\n\r\n /* @ngInject */\r\n function cvaAccordionGroup($timeout) {\r\n var directive = {\r\n restrict: 'E',\r\n transclude: true,\r\n scope: {},\r\n template: '<div class=\"accordion-group\" ng-transclude></div>',\r\n controller: ['$scope', function($scope) {\r\n var vm = this,\r\n // Set up an empty array to pass our child accordions to\r\n accordions = $scope.accordions = [];\r\n\r\n vm.accordions = accordions;\r\n\r\n $scope.select = function(accordion) {\r\n angular.forEach(accordions, function(accordion) {\r\n accordion.selected = false;\r\n });\r\n accordion.selected = true;\r\n };\r\n\r\n vm.addAccordion = function(accordion) {\r\n if (accordion.length === 0) {\r\n $scope.select(accordion);\r\n }\r\n accordions.push(accordion);\r\n };\r\n\r\n // Listen for child calls to function and close the other accordions in the group\r\n vm.toggleGroup = function(scope) {\r\n angular.forEach(accordions, function(accordion) {\r\n if (accordion != scope) {\r\n accordion.collapsed = true;\r\n }\r\n });\r\n };\r\n\r\n }]\r\n };\r\n return directive;\r\n }\r\n})();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .directive('lanePairBarChart', ['$filter', '$interval', '$timeout', '$window', '$location', lanePairBarChart]);\r\n\r\n /* @ngInject */\r\n function lanePairBarChart($filter, $interval, $timeout, $window, $location) {\r\n var directive = {\r\n restrict: 'EA',\r\n scope: {\r\n data: \"=\",\r\n settings: \"=\",\r\n label: \"@\",\r\n onClick: \"&\",\r\n },\r\n link: link,\r\n };\r\n return directive;\r\n\r\n function link(scope, iElement, attrs){\r\n // angular.element(document).ready(function(){\r\n // Set the initial svg element\r\n var svg = d3.select(iElement[0])\r\n .append(\"svg\")\r\n .attr(\"width\", \"100%\")\r\n\r\n var rendering = false;\r\n\r\n // Set default theme colors\r\n var colors = ['#45AFE3', '#2D7D8F', '#235B68', '#1F4953'],\r\n margin = {top: 30, right: 60, bottom: 30, left: 100};\r\n\r\n // on window resize, re-render d3 canvas\r\n angular.element($window).bind('resize', function(){\r\n if (rendering) $timeout.cancel(rendering);\r\n\r\n rendering = renderChart();\r\n });\r\n\r\n // scope.$watch(function(){\r\n // return angular.element(window)[0].innerWidth;\r\n // }, function(){\r\n // return scope.render(scope.data);\r\n // }\r\n // );\r\n\r\n scope.$watch('settings', function(newVals, oldVals){\r\n if (newVals.selectedLane != oldVals.selectedLane && newVals.showTotal == oldVals.showTotal){\r\n return;\r\n }\r\n if (rendering) $timeout.cancel(rendering);\r\n rendering = renderChart(scope.data);\r\n }, true);\r\n\r\n // watch for data changes and re-render\r\n scope.$watch('data', function(newVals, oldVals) {\r\n if (['count', 'label', 'volume'].every(\r\n /* Check if the data is really different */\r\n function(d){\r\n var diff = false;\r\n if (newVals.length != oldVals.length) { diff = true; return !diff;}\r\n for (var i in newVals){\r\n if (newVals[i][d] != oldVals[i][d]){\r\n diff = true;\r\n }\r\n }\r\n return !diff;\r\n })){\r\n return; // If the data is not different\r\n }\r\n if (rendering) $timeout.cancel(rendering);\r\n rendering = renderChart(newVals);\r\n }, true);\r\n\r\n function renderChart(data){\r\n return $timeout(function(){\r\n rendering = true;\r\n // debugger;\r\n if (data && data.length > 0 && data[0].count > 0){\r\n scope.render(data);\r\n } else if (scope.data.length > 0 && scope.data[0].count > 0){\r\n scope.render(scope.data);\r\n } else {\r\n scope.renderNoData();\r\n }\r\n $timeout(function() {scope.$apply();});\r\n }, 150).finally(function(){rendering = false;});\r\n }\r\n scope.renderNoData = function(){\r\n svg.selectAll('*').remove();\r\n svg.attr(\"width\", 0).attr(\"height\", 0);\r\n };\r\n\r\n // define render function\r\n scope.render = function(data){\r\n svg.attr(\"width\", 0);\r\n var duration = 1500;\r\n\r\n if (attrs.theme == \"danger\") {\r\n colors = ['#F59889', '#EF533D', '#78271B', '#471109'];\r\n } else if (attrs.theme == \"warning\") {\r\n colors = ['#FFE49C', '#EF9E3D', '#774E1E', '#5B3911'];\r\n } else if (attrs.theme == \"success\") {\r\n colors = ['#82DAA7', '#30C268', '#176033', '#144025'];\r\n } else {\r\n colors = ['#45AFE3', '#2D7D8F', '#235B68', '#1F4953'];\r\n }\r\n\r\n var width = iElement.parent()[0].offsetWidth,\r\n height = Math.ceil(width / 16 * 9);\r\n\r\n svg.attr(\"width\", width )\r\n .attr(\"height\", height);\r\n\r\n // remove all previous items before render\r\n svg.selectAll('*').remove();\r\n\r\n //Container for the gradients\r\n var defs = svg.append(\"defs\");\r\n\r\n //Filter for the outside glow\r\n var filter = defs.append(\"filter\")\r\n .attr(\"id\",\"glow\");\r\n filter.append(\"feGaussianBlur\")\r\n .attr(\"stdDeviation\",\"10\")\r\n .attr(\"result\",\"coloredBlur\");\r\n var feMerge = filter.append(\"feMerge\");\r\n feMerge.append(\"feMergeNode\")\r\n .attr(\"in\",\"coloredBlur\");\r\n feMerge.append(\"feMergeNode\")\r\n .attr(\"in\",\"SourceGraphic\");\r\n\r\n // If we don't pass any data, return out of the element\r\n if (!data) return;\r\n\r\n var xWidth = width - margin.right - margin.left,\r\n yHeight = height - margin.top - margin.bottom;\r\n\r\n var yScale = d3.scale.ordinal()\r\n .domain([0,4])\r\n .rangeRoundBands([margin.top, yHeight+margin.top], .33,.3),\r\n yScale2 = d3.scale.ordinal();\r\n\r\n\r\n var color = d3.scale.ordinal()\r\n .range([\"#fd7600\", \"#45afe3\", \"#7b6888\", \"#6b486b\", \"#a05d56\", \"#d0743c\", \"#ff8c00\"]);\r\n\r\n var xScale = d3.scale.linear()\r\n .range([0, width-margin.left]);\r\n\r\n var xScale1 = d3.scale.linear()\r\n .range([0, width-margin.left]);\r\n\r\n var yAxis = d3.svg.axis()\r\n\r\n .scale(yScale)\r\n .orient(\"left\")\r\n\r\n var xAxis = d3.svg.axis()\r\n .scale(xScale)\r\n .orient(\"top\")\r\n .ticks(6, \"s\");\r\n // .tickFormat(function(d) {\r\n // return $filter(\"currency\")(d,\"$\",0);\r\n // });\r\n\r\n var xAxis1 = d3.svg.axis()\r\n .scale(xScale1)\r\n .orient(\"bottom\")\r\n .ticks(6, \"s\")\r\n\r\n var lanePairs = []; /* [ count, volume ] */\r\n for (var metric in scope.settings.showCountVolume){\r\n if (scope.settings.showCountVolume[metric]){\r\n lanePairs.push(metric);\r\n }\r\n }\r\n //var lanePairs = ['count', 'volume'];\r\n var select_pairs = [];\r\n data.forEach(function(d,i) {\r\n select_pairs.length = 0;\r\n select_pairs.push(d.label);\r\n d.values = lanePairs.map(function(key){\r\n return {key: key, value: +d[key], lane: i};\r\n });\r\n });\r\n\r\n /* Remove Total if toggle is on */\r\n if (!scope.settings.showTotal){\r\n data = data.filter(function(d){return d.label != \"TOTAL\";});\r\n }\r\n\r\n var x_domain = [0, d3.max(data, function(d) {\r\n return +d.count;\r\n })];\r\n // return d3.max(d.values, function(d){ return d.value; });\r\n // })];\r\n\r\n var x1_domain = [0, d3.max(data, function(d) {\r\n return +d.volume;\r\n })];\r\n\r\n xScale.domain([0, d3.max(data, function(d) {\r\n return d3.max(d.values, function(d){ return d.value; });\r\n })]);\r\n xScale.domain(x_domain);\r\n xScale1.domain(x1_domain);\r\n\r\n yScale.domain(data.map(function(d) { return d.label; }));\r\n yScale2.domain(lanePairs)\r\n .rangeRoundBands([0, yScale.rangeBand()]);\r\n\r\n var lane_pairs = svg.selectAll('.lane_pairs')\r\n .data(data)\r\n .enter().append('g')\r\n .attr(\"class\", \"lane_pairs\")\r\n .attr(\"transform\", function(d){\r\n return \"translate(0,\"+yScale(d.label)+\")\";\r\n });\r\n\r\n svg.selectAll('text')\r\n .data([{name: 'count', value:'COUNT'}, {name: 'volume', value:\"VOLUME (KG)\"}])\r\n .enter().append(\"text\")\r\n .text(function(d){return d.value;})\r\n .attr(\"transform\", function(d){\r\n if(d.name === 'count'){\r\n return \"translate(19, \"+(margin.top-9)+\")\";\r\n } else {\r\n return \"translate(3, \"+(yHeight+margin.top+16)+\")\";\r\n }\r\n })\r\n .attr(\"display\", function(d){\r\n if (!scope.settings.showCountVolume[d.name]){\r\n return \"none\";\r\n } else return null;\r\n })\r\n .attr(\"font-weight\", \"bold\")\r\n .attr(\"font-size\", \"10px\")\r\n .style(\"fill\", function(d){\r\n if(d.name === 'count'){\r\n return scope.settings.metricColors.count;\r\n } else {\r\n return scope.settings.metricColors.volume;\r\n }\r\n });\r\n\r\n svg.append(\"line\")\r\n .attr(\"x1\", 0).attr(\"x2\", width).attr(\"y1\", margin.top).attr(\"y2\", margin.top)\r\n .attr(\"stroke-width\", 2)\r\n .attr(\"stroke\", \"#3f4c59\");\r\n\r\n svg.append(\"line\")\r\n .attr(\"x1\", 0).attr(\"x2\", width).attr(\"y1\", yHeight+margin.top).attr(\"y2\", yHeight+margin.top)\r\n .attr(\"stroke-width\", 2)\r\n .attr(\"stroke\", \"#3f4c59\");\r\n\r\n if (scope.settings.showCountVolume.count){\r\n /* Draw the x axis for count */\r\n var x_axis = svg.append(\"g\")\r\n .attr(\"class\", \"x axis count\")\r\n .data([x_domain, [0]])\r\n .call(xAxis)\r\n .attr(\"transform\", \"translate(\"+margin.left+\",\"+margin.top+\")\")\r\n .append(\"text\")\r\n .attr(\"transform\", \"rotate(90)\")\r\n .attr(\"x\", 0)\r\n .attr(\"dx\", \".71em\")\r\n .style(\"text-anchor\", \"end\")\r\n }\r\n if (scope.settings.showCountVolume.volume){\r\n /* Draw the x axis for volume */\r\n svg.append(\"g\")\r\n .attr(\"class\", \"x axis volume\")\r\n .data([x1_domain, [0]])\r\n .call(xAxis1)\r\n .attr(\"transform\", \"translate(\"+margin.left+\",\"+(yHeight+margin.top)+\")\")\r\n .append(\"text\")\r\n .attr(\"transform\", \"rotate(90)\")\r\n .attr(\"x\", 0)\r\n .attr(\"dx\", \".71em\")\r\n .style(\"text-anchor\", \"end\")\r\n }\r\n /* Draw the y axis */\r\n var y_axis = svg.append(\"g\")\r\n //.attr(\"class\", \"y axis\")\r\n .attr(\"transform\", \"translate(\"+margin.left+\",0)\")\r\n .call(yAxis);\r\n y_axis\r\n .selectAll(\".tick text\")\r\n .style(\"display\", \"none\");\r\n\r\n\tfunction clickLabel(d){\r\n\t scope.settings.selectedLane = d;\r\n\t $timeout(function(){\r\n\t scope.$apply;\r\n\t });\r\n\r\n\t d3.selectAll(\".yaxisbutton\").style(\"fill\", isSelected);\r\n\t d3.selectAll(\".yaxiskeys\").style(\"fill\", \"white\");\r\n\t}\r\n\r\n\t\tfunction dblClickLabel(d){\r\n\t\t\t\tif (d !== 'TOTAL'){\r\n\t\t\t\t\t\tvar ports = d.split(\" to \");\r\n if(scope.settings.selectedLaneType != 'all'){\r\n $location.path(\"/track-trace\")\r\n \t\t\t\t\t\t\t\t .search(\"origin_code\", ports[0])\r\n \t\t\t\t\t\t\t\t .search(\"destination_code\", ports[1])\r\n \t\t\t\t\t\t\t\t .search(\"ship_date_from\", scope.settings.period.start)\r\n \t\t\t\t\t\t\t\t .search(\"ship_date_to\", scope.settings.period.end)\r\n .search(\"business_type_group\",scope.settings.selectedLaneType);\r\n }else{\r\n $location.path(\"/track-trace\")\r\n \t\t\t\t\t\t\t\t .search(\"origin_code\", ports[0])\r\n \t\t\t\t\t\t\t\t .search(\"destination_code\", ports[1])\r\n \t\t\t\t\t\t\t\t .search(\"ship_date_from\", scope.settings.period.start)\r\n \t\t\t\t\t\t\t\t .search(\"ship_date_to\", scope.settings.period.end);\r\n }\r\n scope.$apply();\r\n\t\t\t\t} else {\r\n if(scope.settings.selectedLaneType != 'all'){\r\n $location.path(\"/track-trace\")\r\n\t\t\t\t\t\t\t\t .search(\"ship_date_from\", scope.settings.period.start)\r\n\t\t\t\t\t\t\t\t .search(\"ship_date_to\", scope.settings.period.end)\r\n .search(\"business_type_group\",scope.settings.selectedLaneType);\r\n }else{\r\n $location.path(\"/track-trace\")\r\n\t\t\t\t\t\t\t\t .search(\"ship_date_from\", scope.settings.period.start)\r\n\t\t\t\t\t\t\t\t .search(\"ship_date_to\", scope.settings.period.end);\r\n }\r\n scope.$apply();\r\n\t\t\t\t}\r\n\t}\r\n\r\n y_axis\r\n .selectAll(\".tick\")\r\n .append(\"rect\")\r\n .attr(\"class\", \"yaxisbutton\")\r\n .attr(\"height\", function(){\r\n var two_bars = scope.settings.showCountVolume.count && scope.settings.showCountVolume.volume;\r\n return \"\" + ( two_bars ? (yScale2.rangeBand() * 2) : yScale2.rangeBand());})\r\n .attr(\"width\", function(){return \"\"+ (margin.left - 10);})\r\n .attr(\"rx\", \"4\")\r\n .attr(\"ry\", \"4\")\r\n .attr(\"stroke\", \"teal\")\r\n .attr(\"stroke-width\", \"1\")\r\n .attr(\"transform\", function(){\r\n var two_bars = scope.settings.showCountVolume.count && scope.settings.showCountVolume.volume;\r\n if (two_bars){\r\n return \"translate(-\" + (margin.left-2)+\",-\"+(yScale2.rangeBand())+\")\";\r\n } else {\r\n return \"translate(-\" + (margin.left-2)+\",-\"+(yScale2.rangeBand()/2)+\")\";\r\n }\r\n })\r\n .style(\"fill\", \"#050B24\")\r\n .style(\"fill\", isSelected)\r\n .on('click', function(d){ clickLabel(d); })\r\n .on(\"dblclick\", function(d){ dblClickLabel(d); })\r\n\r\n y_axis\r\n .selectAll(\".tick\")\r\n .append(\"text\")\r\n .style(\"font-size\", \"9px\")\r\n .style(\"font-weight\", \"bold\")\r\n\r\n .attr(\"transform\", \"translate(-\" + (margin.left/2+3.5)+\",1)\")\r\n .attr(\"alignment-baseline\", \"middle\")\r\n .attr(\"text-anchor\", \"middle\")\r\n .style(\"fill\", \"white\")\r\n .text(function(d){\r\n if (d.includes(\" to \")){\r\n var spot = d.split(\" to \");\r\n // spot = spot.map(function(d){return d.substr(2,5);});\r\n // spot = spot.join(\" ⟷ \");\r\n var str = spot[0] + \" ⟷ \" + spot[1];\r\n return str; }\r\n else {\r\n return d;\r\n }\r\n })\r\n .on('click', function(d){ clickLabel(d); })\r\n .on(\"dblclick\", function(d){ dblClickLabel(d); })\r\n /* Handle the y labels */\r\n y_axis\r\n .selectAll(\".tick text\")\r\n .attr(\"class\", \"y axis yaxiskeys lanepairs\")\r\n\r\n .style(\"fill\", \"white\")\r\n\r\n function isSelected(d){\r\n if (scope.settings.selectedLane == d){\r\n return \"teal\";\r\n } else {\r\n return \"#050B24\";\r\n }\r\n }\r\n\r\n function pluralize(count, unit){\r\n return \"\" + count + \" \" + unit + (count == 1 ? \"\" : \"s\");\r\n }\r\n\r\n /* Draw the bars */\r\n lane_pairs\r\n .selectAll(\"rect\")\r\n .data(function(d) {return d.values;})\r\n .enter()\r\n .append(\"rect\")\r\n .attr(\"class\", \"bar\")\r\n .attr(\"height\", yScale2.rangeBand())\r\n .attr('width', 0)\r\n .style(\"fill\", function(d){ return scope.settings.metricColors[d.key]; })\r\n .attr('x', margin.left)\r\n .attr('y', function(d) {return yScale2(d.key);})\r\n .on('mouseover', function(d){\r\n d3.select(this)\r\n .style(\"fill\", function(d){ return d.key === 'count' ? '#ffad66' : '#7ac5eb'})\r\n //.style(\"filter\", \"url(#glow)\");\r\n tip.html(function(){\r\n if (d.key === 'count'){\r\n return \"<strong>\"+pluralize(d.value, \"Shipment\")+\"</strong>\";\r\n } else {\r\n return \"<strong>\"+pluralize(d.value, \"kg\")+\"</strong>\";\r\n }\r\n });\r\n tip.show();\r\n //tooltip.style(\"display\", null);\r\n })\r\n .on('mouseout', function(d){\r\n d3.select(this)\r\n .style(\"fill\", function(d){return scope.settings.metricColors[d.key];})\r\n //.style(\"filter\", \"none\");\r\n //tooltip.style(\"display\", \"none\");\r\n tip.hide();\r\n })\r\n .on('mousemove', function(d){\r\n var xPosition = d3.mouse(this)[0] - 15;\r\n var yPosition = d3.mouse(this)[1] - 25;\r\n //debugger;\r\n // tooltip.attr('transform', 'translate(' + xPosition + \",\" + yPosition + \")\");\r\n\r\n })\r\n .transition()\r\n .duration(duration)\r\n .delay(function(d,i){\r\n return i * 71;\r\n })\r\n .attr('width', function(d) {\r\n if (d.key === 'count'){\r\n return xScale(d.value);\r\n } else {\r\n return xScale1(d.value);\r\n }\r\n });\r\n\r\n scope.$watch('settings', function(){\r\n d3.selectAll(\".yaxisbutton\").style(\"fill\", isSelected);\r\n }, true);\r\n\r\n svg.call(tip);\r\n };\r\n\r\n d3.select(\".barcharttip\").remove();\r\n\r\n /* Define our tooltip that is displayed */\r\n var tip = d3.tip()\r\n .attr('class', 'd3-tip barcharttip')\r\n .style(\"background-color\", \"#616161\")\r\n .offset([-10, 0])\r\n .html(function(d){ });\r\n // function wrap(text, width) {\r\n // text.each(function() {\r\n // var text = d3.select(this),\r\n // words = text.text().split(/\\s+/).reverse(),\r\n // word,\r\n // line = [],\r\n // lineNumber = 0,\r\n // lineHeight = 1.1, // ems\r\n // y = text.attr(\"y\"),\r\n // dy = parseFloat(text.attr(\"dy\")),\r\n // tspan = text.text(null).append(\"tspan\").attr(\"x\", 0).attr(\"y\", y).attr(\"dy\", dy + \"em\");\r\n // while (word = words.pop()) {\r\n // line.push(word);\r\n // tspan.text(line.join(\" \"));\r\n // if (tspan.node().getComputedTextLength() > width) {\r\n // line.pop();\r\n // tspan.text(line.join(\" \"));\r\n // line = [word];\r\n // tspan = text.append(\"tspan\").attr(\"x\", 0).attr(\"y\", y).attr(\"dy\", ++lineNumber * lineHeight + dy + \"em\").text(word);\r\n // }\r\n // }\r\n // });\r\n // }\r\n // }); // End Angular Ready\r\n } // End Link\r\n } // End Directive\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .directive('countVsVolumeLineChart', ['$filter', '$interval', '$timeout', '$window', countVsVolumeLineChart]);\r\n\r\n /* @ngInject */\r\n function countVsVolumeLineChart($filter, $interval, $timeout, $window) {\r\n var directive = {\r\n restrict: 'EA',\r\n scope: {\r\n data: \"=\",\r\n settings: \"=\",\r\n label: \"@\",\r\n onClick: \"&\",\r\n },\r\n link: link,\r\n };\r\n return directive;\r\n\r\n function link(scope, iElement, attrs){\r\n // angular.element(document).ready(function(){\r\n var margin = {top: 30, right: 50, bottom: 30, left: 50},\r\n rendering = false;\r\n\r\n var svg = d3.select(iElement[0])\r\n .append(\"svg\")\r\n .attr(\"width\", \"100%\")\r\n //class to make it responsive\r\n //// console.log(\"width\"+width + \", hieght:\"+height)\r\n\r\n\r\n // on window resize, re-render d3 canvas\r\n angular.element($window).bind('resize', function(){\r\n if (rendering) $timeout.cancel(rendering);\r\n\r\n rendering = renderChart();\r\n });\r\n\r\n // watch for data changes and re-render\r\n scope.$watch('data', function(newVals, oldVals) {\r\n if (['count', 'label', 'volume'].every(\r\n /* Check if the data is really different */\r\n function(d){\r\n var diff = false;\r\n if (newVals.length != oldVals.length) { diff = true; return !diff;}\r\n for (var i in newVals){\r\n if (newVals[i][d] != oldVals[i][d]){\r\n diff = true;\r\n }\r\n }\r\n return !diff;\r\n })){\r\n return; // If the data is not different\r\n }\r\n if (rendering) $timeout.cancel(rendering);\r\n\r\n rendering = renderChart(newVals);\r\n }, true);\r\n\r\n scope.$watch('settings', function(){\r\n if (rendering) $timeout.cancel(rendering);\r\n rendering = renderChart(scope.data);\r\n }, true);\r\n\r\n function renderChart(data){\r\n return $timeout(function(){\r\n rendering = true;\r\n if (data){\r\n scope.render(data);\r\n } else {\r\n scope.render(scope.data);\r\n }\r\n $timeout(function() {scope.$apply();});\r\n }, 150).finally(function(){rendering = false;});\r\n }\r\n\r\n scope.render = function(_data_){\r\n var bardelay = 0, duration = 1500;\r\n svg.attr('width', 0);\r\n\r\n var width = iElement.parent()[0].offsetWidth,\r\n height = Math.ceil(width / 16 * 9);\r\n\r\n // Set boundaries\r\n svg\r\n .attr(\"width\", width)\r\n .attr(\"height\", height);\r\n\r\n // Remove previous items\r\n svg.selectAll('*').remove();\r\n if (_data_.length==0) return;\r\n // debugger;\r\n\r\n\r\n var xWidth = width - margin.right - margin.left,\r\n yHeight = height-margin.top-margin.bottom;\r\n var parseDate = d3.time.format(\"%Y-%m-%d\").parse;\r\n\r\n var x = d3.time.scale().range([0, xWidth]),\r\n y0 = d3.scale.linear().range([yHeight+margin.top, margin.top]),\r\n y1 = d3.scale.linear().range([yHeight+margin.top, margin.top]);\r\n\r\n var xticks = 5;\r\n switch (scope.settings.selectedPeriod) {\r\n case 'week':\r\n xticks = 8;\r\n break;\r\n case 'month':\r\n xticks = 12;\r\n break;\r\n case 'year':\r\n xticks = 2;\r\n break;\r\n }\r\n\r\n var xAxis = d3.svg.axis().scale(x)\r\n .orient(\"bottom\").ticks(xticks);\r\n\r\n var yAxisLeft = d3.svg.axis().scale(y0)\r\n .orient(\"left\").ticks(5, \"s\");\r\n\r\n var yAxisRight = d3.svg.axis().scale(y1)\r\n .orient(\"right\").ticks(5, \"s\");\r\n\r\n var countLine = d3.svg.line()\r\n .x(function(d) { return x(d.date); })\r\n .y(function(d) { return y0(d.count); });\r\n\r\n var volumeLine = d3.svg.line()\r\n .x(function(d) { return x(d.date); })\r\n .y(function(d) { return y1(d.volume); });\r\n\r\n var data = [];\r\n _data_.map(function(lane_pair){\r\n if (lane_pair.label == scope.settings.selectedLane){\r\n for (var date in lane_pair.overtime_breakdown){\r\n var d = lane_pair.overtime_breakdown[date];\r\n d.date = parseDate(date);\r\n d.count = +d.count;\r\n d.volume = +d.volume;\r\n data.push(d);\r\n }\r\n }\r\n });\r\n\r\n // debugger;\r\n // data.forEach(function(d) {\r\n // d.date = parseDate(d.date);\r\n // d.count = +d.count;\r\n // d.volume = +d.volume;\r\n // });\r\n\r\n function getPoints(data, type){\r\n var points = [];\r\n if (type === 'count'){\r\n data.map(function(d){ points.push({date: d.date, key: 'count', value: d.count});});\r\n } else {\r\n data.map(function(d){ points.push({date: d.date, key: 'volume', value: d.volume});});\r\n }\r\n return points;\r\n }\r\n\r\n function getInterpolation(line){\r\n return function(){\r\n var interpolate = d3.scale.quantile()\r\n .domain([0,1])\r\n .range(d3.range(1, data.length + 1));\r\n return function(t) {\r\n var interpolatedLine = data.slice(0, interpolate(t));\r\n return line(interpolatedLine);\r\n };\r\n }\r\n }\r\n\r\n function interpolatePoints(){\r\n var interpolate = d3.scale.quantile()\r\n .domain([0,1])\r\n .range(d3.range(1, data.length + 1));\r\n return function(t){\r\n return data.slice(0, interpolate(t))\r\n }\r\n }\r\n\r\n function pluralize(count, unit){\r\n return \"\" + count + \" \" + unit + (count == 1 ? \"\" : \"s\");\r\n }\r\n\r\n //Container for the gradients\r\n var defs = svg.append(\"defs\");\r\n\r\n //Filter for the outside glow\r\n // var filter = defs.append(\"filter\")\r\n // .attr(\"id\",\"glow\");\r\n // filter.append(\"feGaussianBlur\")\r\n // .attr(\"stdDeviation\",\"10\")\r\n // .attr(\"result\",\"coloredBlur\");\r\n // var feMerge = filter.append(\"feMerge\");\r\n // feMerge.append(\"feMergeNode\")\r\n // .attr(\"in\",\"coloredBlur\");\r\n // feMerge.append(\"feMergeNode\")\r\n // .attr(\"in\",\"SourceGraphic\");\r\n\r\n // Scale the range of the data\r\n x.domain(d3.extent(data, function(d) {return d.date; }));\r\n // x.domain(d3.map(function(d) {return (d.date.getMonth() + 1) + '/' + Math.abs(d.date.getYear() - 100);}))\r\n y0.domain([0, d3.max(data, function(d) {\r\n return Math.max(d.count); })]);\r\n y1.domain([0, d3.max(data, function(d) {\r\n return Math.max(d.volume); })]);\r\n\r\n \r\n\r\n var xAxisLabels = svg.append(\"g\") // Add the X Axis\r\n .attr(\"class\", \"x axis\")\r\n .attr(\"transform\", \"translate(\"+margin.left+\",\" + (yHeight+margin.top) + \")\")\r\n .call(xAxis)\r\n .selectAll(\".tick text\")\r\n .style(\"font-weight\", \"bold\");\r\n\r\n if (scope.settings.selectedPeriod == 'year') {\r\n xAxisLabels.text(function(date) {return (date.getFullYear()); });\r\n } else if (scope.settings.selectedPeriod == 'month') {\r\n xAxisLabels.text(function(date) {\r\n var z = new moment(date);\r\n return z.format('MMM');\r\n });\r\n } else if (scope.settings.selectedPeriod == 'quarter') {\r\n xAxisLabels.text(function(date) {\r\n var z = new moment(date);\r\n return z.year() + ' Q' + z.quarter();\r\n });\r\n } else if (scope.settings.selectedPeriod == 'week') {\r\n xAxisLabels.text(function(date) {\r\n var z = new moment(date);\r\n return ('W'+(z.isoWeek())+\"\\n\"+date.getFullYear());\r\n });\r\n }\r\n\r\n if (scope.settings.showCountVolume.count){\r\n var countPath = svg.append(\"path\") // Add the valueline path.\r\n .attr('class', 'line')\r\n .style(\"stroke\", scope.settings.metricColors.count)\r\n .style(\"stroke-width\", \"2px\")\r\n .attr(\"transform\", \"translate(\"+margin.left+\",\" + 0 + \")\")\r\n .attr(\"d\", countLine(data))\r\n\r\n var countPathLength = countPath.node().getTotalLength();\r\n\r\n countPath\r\n .attr(\"stroke-dasharray\", countPathLength + \" \" + countPathLength)\r\n .attr(\"stroke-dashoffset\", countPathLength)\r\n .transition()\r\n .duration(duration)\r\n .delay(bardelay + 17)\r\n //.attrTween('d', getInterpolation(valueline))\r\n .ease(\"linear\")\r\n .attr(\"stroke-dashoffset\", 0);\r\n\r\n var countSegments = [0];\r\n for(var i = 1; i < data.length; i++) {\r\n var tmp = svg.append(\"path\")\r\n .datum([data[i-1], data[i]])\r\n .attr(\"d\", countLine(data));\r\n countSegments.push(countSegments[i-1] + tmp.node().getTotalLength());\r\n tmp.remove();\r\n }\r\n var countPoints = svg.selectAll('circle.count')\r\n .data(getPoints(data, 'count')).enter()\r\n .append(\"circle\")\r\n .attr(\"transform\", \"translate(\"+margin.left+\",\" + 0 + \")\")\r\n .attr(\"r\", 0)\r\n .style(\"stroke\", function(d){\r\n return (d.key === 'count') ? scope.settings.metricColors.count : scope.settings.metricColors.volume;\r\n })\r\n .on('mouseover', function(d){\r\n d3.select(this)\r\n // .style(\"filter\", \"url(#glow)\")\r\n .transition()\r\n .duration(100)\r\n .attr(\"r\",5)\r\n .style(\"stroke-width\", 2);\r\n tip.html(function(){\r\n var html = '<strong>';\r\n switch (scope.settings.selectedPeriod) {\r\n case 'year':\r\n html += (d.date.getMonth() + 1) + '/' + Math.abs(d.date.getYear() - 100) + ': ';\r\n }\r\n if (d.key === 'count'){\r\n html += pluralize(d.value, \"Shipment\");\r\n } else {\r\n html += pluralize(d.value, \"kg\");\r\n }\r\n html += '</strong>';\r\n return html;\r\n });\r\n tip.show();\r\n })\r\n .on('mouseout', function(d){\r\n d3.select(this)\r\n // .style(\"filter\", \"none\")\r\n .transition()\r\n .duration(500)\r\n .attr(\"r\", 3)\r\n .style(\"stroke-width\", 2);\r\n //tooltip.style(\"display\", \"none\");\r\n tip.hide();\r\n })\r\n .transition()\r\n .delay(function(d, i) {\r\n return bardelay + countSegments[i] * duration / countSegments[countSegments.length-1];\r\n })\r\n .ease(\"linear\")\r\n // .attrTween('cy', interpolatePoints)\r\n .attr(\"cx\", function(d){ return x(d.date);})\r\n .attr(\"cy\", function(d){ return y0(d.value);})\r\n .attr(\"r\", 3)\r\n .style(\"stroke-width\", 2);\r\n /* Axis Labels */\r\n svg.append(\"text\")\r\n .attr(\"class\", \"count\")\r\n .attr(\"text-anchor\", \"end\")\r\n .attr(\"y\", 6)\r\n .attr(\"dy\", \".75em\")\r\n .text(\"COUNT\")\r\n .attr(\"font-weight\", \"bold\")\r\n .attr(\"font-size\", \"12px\")\r\n .style(\"fill\", scope.settings.metricColors.count)\r\n .attr(\"transform\", function(d){\r\n return \"translate(0, \"+(yHeight/2-this.getBBox().width/2)+\") rotate(-90)\";\r\n });\r\n svg.append(\"g\")\r\n .attr(\"class\", \"y axis count\")\r\n .style(\"fill\", \"#fd7600\")\r\n .attr(\"transform\", \"translate(\"+margin.left+\",\" + 0 + \")\")\r\n .call(yAxisLeft);\r\n }\r\n\r\n svg.append(\"text\")\r\n .attr(\"x\", width/2)\r\n .attr(\"y\", margin.top/2)\r\n .text(scope.settings.selectedLane)\r\n .style(\"text-anchor\", \"middle\");\r\n\r\n if (scope.settings.showCountVolume.volume){\r\n var volumePath = svg.append(\"path\") // Add the valueline2 path.\r\n .style(\"stroke\", scope.settings.metricColors.volume)\r\n .style(\"stroke-width\", \"2px\")\r\n .attr(\"transform\", \"translate(\"+margin.left+\",\" + 0 + \")\")\r\n .attr(\"d\", volumeLine(data))\r\n\r\n var volumePathLength = volumePath.node().getTotalLength();\r\n\r\n volumePath\r\n .attr(\"stroke-dasharray\", volumePathLength + \" \" + volumePathLength)\r\n .attr(\"stroke-dashoffset\", volumePathLength)\r\n .transition()\r\n .duration(duration)\r\n .delay(bardelay + 33)\r\n .ease(\"linear\")\r\n .attr(\"stroke-dashoffset\", 0)\r\n\r\n var volumeSegments = [0];\r\n for(var i = 1; i < data.length; i++) {\r\n var tmp = svg.append(\"path\")\r\n .datum([data[i-1], data[i]])\r\n .attr(\"d\", volumeLine(data));\r\n volumeSegments.push(volumeSegments[i-1] + tmp.node().getTotalLength());\r\n tmp.remove();\r\n }\r\n\r\n\r\n\r\n var volumePoints = svg.selectAll('circle.volume')\r\n .data(getPoints(data, 'volume')).enter()\r\n .append(\"circle\")\r\n .attr(\"transform\", \"translate(\"+margin.left+\",\" + 0 + \")\")\r\n .attr(\"r\", 0)\r\n .style(\"stroke\", scope.settings.metricColors.volume)\r\n .on('mouseover', function(d){\r\n d3.select(this)\r\n // .style(\"filter\", \"url(#glow)\")\r\n .transition()\r\n .duration(100)\r\n .attr(\"r\",5)\r\n .style(\"stroke-width\", 2);\r\n tip.html(function(){\r\n var html = '<strong>';\r\n switch (scope.settings.selectedPeriod) {\r\n case 'year':\r\n html += (d.date.getMonth() + 1) + '/' + Math.abs(d.date.getYear() - 100) + ': ';\r\n }\r\n if (d.key === 'count'){\r\n html += pluralize(d.value, \"Shipment\");\r\n } else {\r\n html += pluralize(d.value, \"kg\");\r\n }\r\n html += '</strong>';\r\n return html;\r\n });\r\n tip.show();\r\n })\r\n .on('mouseout', function(d){\r\n d3.select(this)\r\n // .style(\"filter\", \"none\")\r\n .transition()\r\n .duration(500)\r\n .attr(\"r\", 3)\r\n .style(\"stroke-width\", 2);\r\n //tooltip.style(\"display\", \"none\");\r\n tip.hide();\r\n })\r\n .transition()\r\n .delay(function(d, i) { return bardelay + volumeSegments[i] * duration / volumeSegments[volumeSegments.length-1];})\r\n .ease(\"linear\")\r\n // .attrTween('cy', interpolatePoints)\r\n .attr(\"cx\", function(d){ return x(d.date);})\r\n .attr(\"cy\", function(d){ return y1(d.value);})\r\n .attr(\"r\", 3)\r\n .style(\"stroke-width\", 2);\r\n\r\n var volLabel = svg.append(\"text\")\r\n .attr(\"text-anchor\", \"end\")\r\n .attr(\"y\", 6)\r\n .attr(\"dy\", \".75em\")\r\n .text(\"VOLUME (KG)\")\r\n .attr(\"font-weight\", \"bold\")\r\n .attr(\"font-size\", \"12px\")\r\n .style(\"fill\", scope.settings.metricColors.volume)\r\n .attr(\"transform\", function(d){\r\n return \"translate(\"+(width)+\",\"+(yHeight/2+this.getBBox().width/2)+\") rotate(90)\";\r\n });\r\n\r\n svg.append(\"g\")\r\n .attr(\"class\", \"y axis volume\")\r\n .attr(\"transform\", \"translate(\" + (width-margin.right) + \" ,0)\")\r\n .style(\"fill\", scope.settings.metricColors.volume)\r\n .call(yAxisRight);\r\n\r\n svg.call(tip);\r\n }\r\n };\r\n d3.select(\".linecharttip\").remove();\r\n\r\n /* Define our tooltip that is displayed */\r\n var tip = d3.tip()\r\n .attr('class', 'd3-tip linecharttip')\r\n .style(\"background-color\", \"#616161\")\r\n .offset([-10, 0])\r\n .html(function(d){});\r\n\r\n // }); // End Angular Ready\r\n } // End link\r\n } // End Directive\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .directive('lanePairMap', lanePairMap);\r\n\r\n /* @ngInject */\r\n lanePairMap.$inject = ['$filter', '$interval', '$timeout', '$window', '$location'];\r\n function lanePairMap($filter, $interval, $timeout, $window, $location) {\r\n var directive = {\r\n restrict: 'EA',\r\n scope: {\r\n arcs: \"=\",\r\n data: \"=\",\r\n land: '=',\r\n settings: \"=\",\r\n boundary: '=',\r\n label: \"@\"\r\n },\r\n link: link\r\n };\r\n return directive;\r\n\r\n function link(scope, iElement, attr){\r\n var el = iElement[0];\r\n var rendering = false, map = false;\r\n var width, height, elHeight, legend_height_offset, legend_width_offset, duration;\r\n var projection;\r\n var svg = d3.select(el)\r\n .append('svg')\r\n .attr(\"width\", \"100%\");\r\n\r\n\r\n angular.element($window).bind('resize', function(){\r\n if (rendering) $timeout.cancel(rendering);\r\n renderMap();\r\n rendering = renderChart(scope.data);\r\n });\r\n\r\n\r\n scope.$watch('settings', function(newVals, oldVals){\r\n if (newVals.selectedPeriod != oldVals.selectedPeriod){\r\n if (!map) map = renderMap();\r\n }\r\n if (newVals.showTotal !== oldVals.showTotal){\r\n return;\r\n }\r\n if (newVals.selectedLane != oldVals.selectedLane && newVals.showTotal == oldVals.showTotal){\r\n return;\r\n }\r\n\r\n if (rendering) $timeout.cancel(rendering);\r\n svg.selectAll(\"#lane_pair_map\").remove();\r\n rendering = renderChart(scope.data);\r\n }, true);\r\n\r\n\r\n scope.$watch('data', function(newVals, oldVals) {\r\n if (rendering) $timeout.cancel(rendering);\r\n if (!map) map = renderMap();\r\n rendering = renderChart(newVals);\r\n }, true);\r\n\r\n function renderChart(data){\r\n return $timeout(function(){\r\n rendering = true;\r\n if (data && data.length > 0){\r\n scope.render(data);\r\n } else if (scope.data && scope.data.length > 0){\r\n scope.render(scope.data);\r\n }\r\n $timeout(function() {scope.$apply();});\r\n }, 150).finally(function(){rendering = false;});\r\n }\r\n\r\n function getAverage(data){\r\n var avg_lat = 0, avg_long = 0;\r\n for (var pt in data){\r\n avg_lat += +data[pt].latitude;\r\n avg_long += +data[pt].longitude;\r\n }\r\n return [avg_lat / data.length, avg_long / data.length];\r\n }\r\n\r\n function getMinMaxLat(data){\r\n var max = -10000, min = 10000;\r\n for (var pt in data){\r\n if (data[pt].latitude > max) max = data[pt].latitude;\r\n if (data[pt].latitude < min) min = data[pt].latitude;\r\n }\r\n return [min, max];\r\n }\r\n\r\n /* Renders the map */\r\n function renderMap(){\r\n svg.attr(\"width\", 0);\r\n\r\n // dimensioning the map and legend\r\n width = iElement.parent()[0].offsetWidth;\r\n height= Math.ceil(width / 16 * 8);\r\n elHeight = height;\r\n legend_height_offset = 200;\r\n duration = 1000;\r\n\r\n //----\r\n\r\n svg.attr(\"width\", width )\r\n .attr(\"height\", elHeight);\r\n\r\n // Remove all current elements\r\n svg.selectAll('*').remove();\r\n\r\n // Set map projection\r\n var center = getAverage(scope.data);\r\n projection = d3.geo.equirectangular()\r\n .scale(height/ Math.PI)\r\n .translate([width/2, height/2]);\r\n\r\n var minMax = getMinMaxLat(scope.data);\r\n var rotation = getAverage(scope.data);\r\n var scale = height / (180 / (2* Math.PI * (+minMax[1] - +minMax[0])));\r\n // projection\r\n // .transition()\r\n // .duration(1500)\r\n //.scale(scale)\r\n //.rotate([rotation[1]* -1, rotation[0]*-1])\r\n\r\n var path = d3.geo.path()\r\n .projection(projection);\r\n\r\n // Add the main elements\r\n var g = svg.append('g');\r\n var land = g.append('path');\r\n var boundary = g.append('path');\r\n\r\n land\r\n .style(\"fill\", function(d, i) {return '#aeafb0';})\r\n .style(\"stroke\", \"#2e2e2e\")\r\n .style(\"stroke-width\", 1);\r\n\r\n boundary\r\n .attr(\"class\", \"map-boundary\")\r\n .style(\"stroke\", \"#050B24\")\r\n .style(\"stroke-width\", 1);\r\n\r\n scope.$watch('land', function(geo){\r\n if(!geo) return;\r\n land.datum(geo).attr('class', 'map-land').attr('d', path);\r\n });\r\n return true;\r\n }\r\n\r\n scope.render = function(data){\r\n /* Wrap the data in a removable data layer */\r\n svg.selectAll(\"#lane_pair_map\").remove();\r\n var layer = svg.append('g').attr(\"id\", \"lane_pair_map\");\r\n // svg.selectAll(\".ttlinks\").remove();\r\n // svg.selectAll(\".pins\").remove();\r\n // svg.selectAll(\"ttlinks\").remove();\r\n\r\n // be responsive!\r\n if (width < 620) {\r\n elHeight += 120;\r\n legend_width_offset = 0;\r\n legend_height_offset = 0;\r\n } else if (width < 740) {\r\n legend_height_offset -= 50;\r\n legend_width_offset = 0;\r\n } else if (width < 930) {\r\n legend_width_offset = 0;\r\n } else {\r\n legend_width_offset = 70;\r\n }\r\n\r\n var legend_width_begin = legend_width_offset + 10;\r\n\r\n // Interpolate a middle point that rests above the line\r\n function calcMid(p1, p2){\r\n var d1 = Math.abs(p1[0] - p2[0]),\r\n d2 = Math.abs(p1[1] - p2[1]),\r\n d3 = Math.pow(d1 * d1 + d2 * d2, 0.5),\r\n mid = [ ((p1[0]+p2[0])/2)+(d3/8), ((p1[1]+p2[1])/2)-(d3/8)];\r\n return mid;\r\n }\r\n\r\n //Container for the gradients\r\n var defs = layer.append(\"defs\");\r\n\r\n //Filter for the outside glow\r\n var filter = defs.append(\"filter\")\r\n .attr(\"id\",\"glow\");\r\n filter.append(\"feGaussianBlur\")\r\n .attr(\"stdDeviation\",\"10\")\r\n .attr(\"result\",\"coloredBlur\");\r\n var feMerge = filter.append(\"feMerge\");\r\n feMerge.append(\"feMergeNode\")\r\n .attr(\"in\",\"coloredBlur\");\r\n feMerge.append(\"feMergeNode\")\r\n .attr(\"in\",\"SourceGraphic\");\r\n\r\n\r\n\r\n if (scope.arcs) {\r\n // Get current lane pairs\r\n var arc_data = scope.arcs.filter(function(pair){\r\n if (pair.label !== 'TOTAL'){ return pair; }}).map(function(pair){\r\n var line = [];\r\n var p1 = projection([pair.origin.longitude, pair.origin.latitude]),\r\n p2 = projection([pair.destination.longitude, pair.destination.latitude]),\r\n mid = calcMid(p1, p2);\r\n if (p1[0] == p2[0] && p1[1] == p2[1]){\r\n var m1 = [p1[0]+20, p1[1]], m2 = [p1[0], p1[1]+20];\r\n line = [p1, m1, m2, p2];\r\n } else {\r\n line = [p1, mid, p2];\r\n }\r\n return {label: pair.label, data: line.map(function(d){return {x:d[0], y:d[1]};})};\r\n // [{x:p1[0], y:p1[1]}, {x:mid[0], y:mid[1]}, {x:p2[0], y:p2[1]}]};\r\n });\r\n\r\n // Our line function\r\n var line = d3.svg.line()\r\n .interpolate('basis')\r\n .x(function(d,i) { return d.x; })\r\n .y(function(d,i) { return d.y; });\r\n\r\n var i = 0, colors = scope.settings.laneColors;\r\n // Draw the arcs\r\n var arcs = layer.selectAll(\"g.arcs\")\r\n .data(arc_data)\r\n .enter()\r\n .append(\"path\")\r\n .attr(\"class\", \"arclink\")\r\n .attr(\"id\", function(d, i){\r\n return \"arc\"+i;\r\n })\r\n .attr(\"d\", function(e){\r\n return line(e.data);\r\n })\r\n\r\n .style(\"fill\", \"transparent\")\r\n .style(\"stroke-width\", 3)\r\n .style(\"stroke\", function(d,i){return colors[i++];})\r\n // .style(\"filter\", function(d){\r\n // if (scope.settings.selectedLane == d.label){\r\n // return \"url(#glow)\";\r\n // } else return \"none\";\r\n // })\r\n\r\n .on(\"mouseover\", function(d){\r\n d3.select(this)\r\n // .style(\"filter\", \"url(#glow)\");\r\n tip.html(function(){\r\n return \"<strong>\"+d.label+\"</strong>\";\r\n });\r\n\r\n tip.show();\r\n })\r\n .on(\"mouseout\", function(d){\r\n d3.select(this)\r\n // .style(\"filter\", function(){\r\n // if (scope.settings.selectedLane !== d.label){\r\n // return \"none\";\r\n // } else return \"url(#glow)\";\r\n // });\r\n tip.hide();\r\n })\r\n .on('click', function(d){\r\n scope.settings.selectedLane = d.label;\r\n $timeout(function(){\r\n scope.$apply;\r\n });\r\n })\r\n .on(\"dblclick\", function(d){\r\n var ports = d.label.split(\" to \");\r\n $location.path(\"/track-trace\")\r\n .search(\"origin_code\", ports[0])\r\n .search(\"destination_code\", ports[1])\r\n .search(\"ship_date_from\", scope.settings.period.start)\r\n .search(\"ship_date_to\", scope.settings.period.end);\r\n scope.$apply();\r\n });\r\n\r\n var circle_radius = 8;\r\n var ls_h = 20;\r\n var legend = layer.selectAll(\"g.legend\")\r\n //.data([arc_data])\r\n .data(arc_data)\r\n .enter().append(\"g\")\r\n .attr(\"class\", \"legend\");\r\n legend.append(\"rect\")\r\n .attr(\"x\", legend_width_offset)\r\n .attr(\"y\", height - legend_height_offset)\r\n .attr(\"width\", 150)\r\n .attr(\"height\", 100)\r\n .style(\"opacity\", 0.0)\r\n // .attr(\"fill\", \"white\");\r\n\r\n legend.append('circle')\r\n .attr(\"cx\", legend_width_begin)\r\n .attr(\"cy\", function(d, i){return height - legend_height_offset + (2*i*ls_h) + ls_h - circle_radius + 3;})\r\n .attr(\"r\", circle_radius)\r\n .style(\"fill\", function(d,i){\r\n return scope.settings.laneColors[i];\r\n })\r\n // .style(\"filter\", function(d){\r\n // if (scope.settings.selectedLane == d.label){\r\n // return \"url(#glow)\";\r\n // } else return \"none\";\r\n // });\r\n\r\n var legend_text = layer.selectAll(\"g.legend.text\")\r\n .data(arc_data)\r\n .enter().append('text')\r\n .style(\"font-size\", \"12px\")\r\n .attr(\"class\", \"arclink\")\r\n .attr(\"x\", legend_width_begin + 2 * circle_radius)\r\n .attr(\"y\", function(d, i){return height - legend_height_offset + (2*i*ls_h) + ls_h;})//function(d, i){ })\r\n .text(function(d){\r\n var spot = d.label.split(\" to \");\r\n // spot = spot.map(function(d){return d.substr(2,5);});\r\n // spot = spot.join(\" ⟷ \");\r\n var str = spot[0] + \" ⟷ \" + spot[1];\r\n return str;\r\n })\r\n .on(\"click\", function(d){\r\n scope.settings.selectedLane = d.label;\r\n $timeout(function(){\r\n scope.$apply;\r\n });\r\n })\r\n .on(\"dblclick\", function(d){\r\n var ports = d.label.split(\" to \");\r\n $location.path(\"/track-trace\")\r\n .search(\"origin_code\", ports[0])\r\n .search(\"destination_code\", ports[1])\r\n .search(\"ship_date_from\", scope.settings.period.start)\r\n .search(\"ship_date_to\", scope.settings.period.end);\r\n scope.$apply();\r\n });\r\n\r\n layer.selectAll(\"g.ttlinks\")\r\n .data(arc_data)\r\n .enter().append(\"g\")\r\n .attr(\"transform\", function(d, i){\r\n var x = legend_width_begin + 2 * circle_radius + 115;\r\n var y = height - legend_height_offset + (2*i*ls_h) +3;\r\n return \"translate(\" + x + \",\" + y + \")\";\r\n })\r\n .append(\"svg:image\")\r\n .attr(\"class\", \"ttlink\")\r\n .attr(\"xlink:href\", \"/app/components/svg/ic_open_in_new_white_24px.svg\")\r\n .attr(\"width\", 24)\r\n .attr(\"height\", 24)\r\n .on(\"click\", function(d){\r\n tip.hide();\r\n var ports = d.label.split(\" to \");\r\n // TODO: Figure out how to get rid of the big space at the bottom of T&T when\r\n // you click this link. Hint: a delay and a scrollTo top doesn't fix it\r\n $location.path(\"/track-trace\")\r\n .search(\"origin_code\", ports[0])\r\n .search(\"destination_code\", ports[1])\r\n .search(\"ship_date_from\", scope.settings.period.start)\r\n .search(\"ship_date_to\", scope.settings.period.end);\r\n scope.$apply();\r\n })\r\n .on(\"mouseover\", function(d){\r\n d3.select(this)\r\n // .style(\"filter\", \"url(#glow)\");\r\n tip.html(function(){\r\n return \"<strong>View on Track & Trace</strong>\";\r\n });\r\n\r\n tip.show();\r\n })\r\n .on(\"mouseout\", function(d){\r\n d3.select(this)\r\n // .style(\"filter\", function(){\r\n // if (scope.settings.selectedLane !== d.label){\r\n // return \"none\";\r\n // } else return \"url(#glow)\";\r\n // });\r\n tip.hide();\r\n })\r\n\r\n /*function tweenDash() {\r\n var l = this.getTotalLength(),\r\n i = d3.interpolateString(\"0,\" + l, l + \",\" + l);\r\n return function(t) { return i(t); };\r\n }\r\n*/\r\n\r\n arcs.each(function(d,i){\r\n // debugger;\r\n var totalLength = d3.select(\"#arc\"+i).node().getTotalLength(),\r\n interpolate = d3.interpolateString(\"0,\" + totalLength, totalLength + \",\" + totalLength);\r\n\r\n d3.selectAll(\"#arc\"+i)//.attr(\"stroke-dash-array\", totalLength + \" \" + totalLength)\r\n //.attr(\"stroke-dashoffset\", totalLength)\r\n .transition()\r\n .duration(duration)\r\n // .delay(100*i)\r\n .attrTween(\"stroke-dasharray\", function(){\r\n return function(t) { return interpolate(t);};\r\n });\r\n });\r\n }\r\n\r\n scope.$watch('settings', function(){\r\n // d3.selectAll(\".arclink\").style(\"filter\", function(d){\r\n // if (scope.settings.selectedLane == d.label){\r\n // return \"url(#glow)\";\r\n // } else return \"none\";\r\n // });\r\n }, true);\r\n\r\n\r\n layer.call(tip);\r\n\r\n // Draw the pins\r\n var pWidth = 22, pHeight = 28;\r\n var pins = layer.selectAll(\"g.pins\")\r\n .data(scope.data)\r\n .enter()\r\n .append(\"g\")\r\n .attr(\"transform\", function(d){\r\n var pos = projection([d.longitude, d.latitude]), x = (pos[0] - pWidth/2), y = pos[1] - pHeight/1.25+1;\r\n return \"translate(\"+x+\",\"+y+\")\";\r\n })\r\n .append(\"svg:image\")\r\n .attr(\"xlink:href\",\"/app/components/svg/pin.svg\")\r\n .attr(\"width\", 0)\r\n .attr(\"height\", 0)\r\n .on('mouseover', function(d){\r\n\r\n tip.html(function(){\r\n return \"<strong>\" + d.name + \"</strong>\";\r\n });\r\n\r\n\r\n tip.show();\r\n })\r\n .on('mouseout', function(){\r\n tip.hide();\r\n //tooltip.classed('hidden', true);\r\n })\r\n .transition()\r\n .delay(function(d,i) {\r\n if (d.type === 'origin'){\r\n return 0;\r\n } else {\r\n return duration - duration/10;\r\n }\r\n })\r\n .ease(\"linear\")\r\n .attr(\"width\", 22)\r\n .attr(\"height\", 28);\r\n\r\n\r\n } // End scope.render\r\n d3.select('.map-tip').remove();\r\n var tip = d3.tip()\r\n .attr('class', 'd3-tip map-tip')\r\n .style(\"background-color\", \"#616161\")\r\n .offset([-10, 0])\r\n // }); // End Angular Ready\r\n } // End Link\r\n } // End Directive\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .component('forecast', {\r\n templateUrl: \"/app/dashboard/five-day-forecast/forecast.html\",\r\n controller: ForecastController,\r\n bindings: {\r\n data: '<',\r\n index: '@',\r\n mobile: '<',\r\n payload: '<'\r\n }\r\n })\r\n\r\n ForecastController.$inject = [\"$element\", \"$location\", \"$scope\", \"$httpParamSerializer\"];\r\n function ForecastController($element, $location, $scope, $httpParamSerializer){\r\n var vm = this;\r\n\r\n vm.containers = [];\r\n // ==========================\r\n // Functions\r\n // ==========================\r\n vm.createForecast = createForecast;\r\n vm.getDay = function(){return moment(vm.data.date).format('ddd');}\r\n vm.getDate = function(){return moment(vm.data.date).format('MM/DD/YY');}\r\n vm.getTotal = function(){return vm.data.total;}\r\n vm.getPercentageAir = getPercentageAir;\r\n vm.getPercentageSea = getPercentageSea;\r\n vm.getPercentageGround = getPercentageGround;\r\n vm.viewOnTrackAndTrace = function(){\r\n var query = {};\r\n query.arrive_date_from = query.arrive_date_to = moment(vm.data.date).format('YYYY-MM-DD');\r\n\r\n //query['origins[]'] = vm.payload['origin[]'];\r\n //query['destinations[]'] = vm.payload['destination[]'] ;\r\n //query['lane_pairs[]'] = vm.payload['lane_pairs[]'];\r\n\r\n query.business_type_group = vm.payload.mode == 'all' ? \"\" : vm.payload.mode;\r\n query.advSearch = 'true';\r\n query.forecast_custom_options=vm.payload.forecast_custom_options;\r\n query = $httpParamSerializer(query);\r\n window.open(\"/track-trace?\" + query);\r\n }\r\n createForecast();\r\n\r\n $scope.$watch(vm.data, function(){\r\n vm.containers = [];\r\n createForecast();\r\n }, true);\r\n\r\n function getPercentageAir() {\r\n return Math.round(vm.data.air_count / (vm.data.total) * 100) + \"%\";\r\n }\r\n\r\n function getPercentageSea() {\r\n return Math.round(vm.data.sea_count / (vm.data.total) * 100) + \"%\";\r\n }\r\n\r\n function getPercentageGround() {\r\n return Math.round(vm.data.ground_count / (vm.data.total) * 100) + \"%\";\r\n }\r\n\r\n function container(){\r\n return {\r\n color: 'blue',\r\n icon: '/assets/images/icons/container-100.svg',\r\n icon_class: 'container-icon',\r\n colspan: 4,\r\n rowspan: 2\r\n }\r\n }\r\n\r\n function crate(isEmpty){\r\n return {\r\n empty: isEmpty,\r\n color: isEmpty ? 'none' : 'red',\r\n icon: \"/assets/images/icons/crate-50.svg\",\r\n icon_class: 'crate-icon',\r\n colspan: 2,\r\n rowspan: 2\r\n };\r\n }\r\n\r\n function box(isEmpty){\r\n return {\r\n empty: isEmpty,\r\n color: isEmpty ? 'none' : 'green',\r\n icon_class: 'box-icon',\r\n icon: '/assets/images/icons/box-5.svg',\r\n colspan: 1,\r\n rowspan: 1\r\n };\r\n }\r\n\r\n function createVessel(n, vessel, isEmpty){\r\n for (var i = 0; i < n; i++){\r\n vm.containers.push(vessel(isEmpty));\r\n }\r\n }\r\n\r\n function createForecast(){\r\n var total = 0;\r\n var toprow = 8;\r\n var empties;\r\n Number.isInteger = Number.isInteger || function(value) {\r\n return typeof value === \"number\" &&\r\n isFinite(value) &&\r\n Math.floor(value) === value;\r\n };\r\n // console.log(vm.data);\r\n Object.keys(vm.data).map(function(key){\r\n\r\n //if(Number.isInteger(vm.data[key])) total += vm.data[key];\r\n if ([\"active\",\"potentials\", \"exceptions\", \"delivered\"].includes(key)){\r\n total += vm.data[key];\r\n }\r\n });\r\n // total /= 2;\r\n\r\n\r\n var containers = 0, crates = 0, boxes = 0;\r\n // containers = Math.floor(total / 100);\r\n // crates = Math.floor((total - (containers * 100)) / 50);\r\n // boxes = Math.ceil((total-(containers * 100) - (crates * 50)) / 5);\r\n\r\n containers = Math.floor(total / 50);\r\n crates = Math.floor((total - (containers * 50)) / 10);\r\n boxes = Math.ceil((total-(containers * 50) - (crates * 10)) / 1);\r\n\r\n // createVessel(1, box);\r\n // createVessel(3, box, true);\r\n // createVessel(boxes, box);\r\n // createVessel(crates, crate);\r\n // createVessel(containers, container);\r\n\r\n if (crates % 2 == 1) {\r\n crates -= 1;\r\n if (boxes == 0) {\r\n createVessel(1, crate);\r\n createVessel(1, crate, true);\r\n } else if (boxes >= 4) {\r\n var loopBoxCount=parseInt(boxes/4);\r\n boxes -= 4;\r\n if (boxes % 4 == 0){\r\n createVessel(boxes, box);\r\n createVessel(1, crate);\r\n createVessel(4, box);\r\n } else {\r\n createVessel(boxes % 4, box);\r\n createVessel(4 - (boxes % 4), box, true);\r\n for (var i=0;i<loopBoxCount;i++){\r\n createVessel(4, box);\r\n }\r\n createVessel(1, crate);\r\n }\r\n } else {\r\n createVessel(1, crate);\r\n createVessel(4 - (boxes % 4), box, true);\r\n createVessel(boxes, box);\r\n }\r\n } else {\r\n if (boxes){\r\n var loopBoxCount=parseInt(boxes/4);\r\n if (boxes % 4 == 0){\r\n createVessel(boxes, box);\r\n } else {\r\n createVessel(boxes % 4, box);\r\n createVessel(4 - (boxes % 4), box, true);\r\n for (var i=0;i<loopBoxCount;i++){\r\n createVessel(4, box);\r\n }\r\n }\r\n //boxes -= boxes % 4;\r\n //createVessel(boxes, box);\r\n }\r\n }\r\n createVessel(crates, crate);\r\n createVessel(containers, container);\r\n\r\n }\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .component('fiveDayForecast', {\r\n templateUrl: \"/app/dashboard/five-day-forecast/five-day-forecast.html\",\r\n controller: FiveDayForecastController\r\n })\r\n\r\n FiveDayForecastController.$inject = [\"$q\", \"$http\", \"$window\", \"$httpParamSerializer\", \"api\", \"$timeout\", \"$scope\", \"UserService\", \"mdSelectHelper\",\"$rootScope\"];\r\n function FiveDayForecastController($q, $http, $window, $httpParamSerializer, api, $timeout, $scope, UserService, mdSelectHelper,$rootScope){\r\n var vm = this;\r\n vm.timeoutPromise = $q.defer();\r\n vm.isLoading = false;\r\n vm.query_debounce = null;\r\n vm.hasData = {origin: false, destination: false};\r\n vm.days = [];\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n vm.lane_type = [\r\n {label: 'WIDGETS.ALL', field:'all', icon: null},\r\n {label: '', field:'air', icon: ''},\r\n {label: '', field:'sea', icon: ''},\r\n {label: \"\", field:'ground', icon: ''}\r\n ];\r\n\r\n vm.selectedOptionRow = null;\r\n vm.custom_forecasts = [];\r\n vm.firstLoad = true;\r\n getCustomForecasts();\r\n\r\n $scope.payload = {\r\n 'origin[]': [],\r\n 'destination[]': [],\r\n mode: \"all\",\r\n date_from: UserService.get5DFDefault() || moment().toDate(),\r\n 'lane_pairs[]': [],\r\n 'forecast_custom_options':null\r\n }\r\n\r\n vm.payload = $scope.payload;\r\n var timeoutPromise = $q.defer();\r\n vm.lastTabIndex = 0;\r\n\r\n // ==========================\r\n // Functions\r\n // ==========================\r\n vm.getDays = getDays;\r\n vm.huh = huh;\r\n vm.onLaneTypeTabSelected = onLaneTypeTabSelected;\r\n //vm.onForecastOptionSelected = onForecastOptionSelected;\r\n vm.submit = submit;\r\n vm.isMobile = isMobile;\r\n vm.query = query;\r\n vm.getUrl = getUrl;\r\n vm.selectedItemChange = selectedItemChange;\r\n vm.selectedDateChange = selectedDateChange;\r\n vm.editForecastOptions = false;\r\n vm.optionsActive = false;\r\n vm.toggleOptions = toggleOptions;\r\n vm.forecastsLoading = false;\r\n vm.checkClear = checkClear;\r\n\r\n $rootScope.$on(\"tableDataUpdated\", function (event,data) {\r\n if(data){\r\n vm.isLoading = true;\r\n\r\n if(getCustomForecasts()){\r\n\r\n $timeout( function(){\r\n vm.selectedOptionRow = data;\r\n vm.customEditChck = true;\r\n vm.isLoading = false;\r\n }, 500 );\r\n\r\n }\r\n }\r\n });\r\n\r\n $scope.$watch(function(){ return vm.custom_forecasts.length}, function(n, o){\r\n //if (n > 0){\r\n getDefault(vm.custom_forecasts);\r\n //}\r\n }, true);\r\n\r\n $scope.$watch(function(){return vm.selectedOptionRow }, function(n, o){\r\n if (n !== o && n !==undefined && !vm.firstLoad){\r\n var opt = selectOptionRowById(vm.selectedOptionRow);\r\n setPayLoadForForecasts(opt);\r\n vm.query();\r\n }\r\n\r\n });\r\n\r\n function selectedDateChange(){\r\n vm.query();\r\n }\r\n\r\n function getUrl(){\r\n }\r\n\r\n\r\n\r\n function query(){\r\n\r\n vm.isLoading = true;\r\n return vm.getDays().then(function(data){\r\n vm.days.length = 0;\r\n data.map(function(d){vm.days.push(d);})\r\n vm.days = data;\r\n vm.isLoading = false;\r\n vm.query_debounce = null;\r\n\r\n });\r\n\r\n\r\n\r\n }\r\n\r\n function toggleOptions(){\r\n vm.optionsActive = vm.optionsActive ? false : true;\r\n $rootScope.forecastEditId = vm.selectedOptionRow;\r\n }\r\n\r\n function onLaneTypeTabSelected(tab, tabIndex){\r\n if (tabIndex !== vm.lastTabIndex) {\r\n vm.lastTabIndex = tabIndex;\r\n vm.payload.mode = tab.field;\r\n vm.query();\r\n }\r\n }\r\n\r\n function selectOptionRowById(id){\r\n return vm.custom_forecasts.filter(function(d, i){return d.id === parseInt(id) })[0];\r\n }\r\n\r\n // function onForecastOptionSelected(id){\r\n\r\n // var opt = selectOptionRowById(id);\r\n // setPayLoadForForecasts(opt);\r\n // vm.query();\r\n // }\r\n\r\n\r\n function setPayLoadForForecasts(opt){\r\n opt = opt || {}\r\n vm.payload['origin[]'] = opt.origins ;\r\n vm.payload['destination[]'] = opt.destinations;\r\n vm.payload['lane_pair[]'] = opt.lane_pairs;\r\n if (opt!== undefined)\r\n vm.payload['forecast_custom_options'] = opt.forecast_label;\r\n }\r\n\r\n function isMobile(){\r\n return $window.innerWidth < 959;\r\n }\r\n\r\n function submit(){\r\n\r\n }\r\n\r\n function huh(){\r\n vm;\r\n $httpParamSerializer;\r\n }\r\n\r\n\r\n\r\n function selectedItemChange(request, item, field) {\r\n /* If the field had data, and is cleared, then we need to requery */\r\n\r\n if (request == \"\" && vm.hasData[field] && !item){\r\n vm.hasData[field] = false;\r\n vm.query();\r\n }\r\n /* If the item exists then lets query it! */\r\n if (typeof(item) === 'object' && item && Object.keys(item).sort().includes(\"display\", \"value\")) {\r\n vm.hasData[field] = true;\r\n vm.query();\r\n }\r\n }\r\n\r\n function parseData(data){\r\n return Object.keys(data).map(function(date){\r\n return {\r\n date: date,\r\n active: data[date].ontime,\r\n potentials: data[date].potential_exceptions,\r\n exceptions: data[date].exceptions,\r\n is_record: data[date].is_record,\r\n is_high: data[date].is_high,\r\n air_count: data[date].air_count,\r\n sea_count: data[date].sea_count,\r\n ground_count: data[date].ground_count,\r\n delivered: data[date].delivered,\r\n ref_numbers: data[date].ref_numbers,\r\n total: data[date].total\r\n }\r\n });\r\n }\r\n\r\n function getDefault(data){\r\n if(data.length>0){\r\n var row = data.filter(function(d, i){return (d.is_default === true || $rootScope.forecastEditId == d.id) })[0];\r\n vm.selectedOptionRow = row !== undefined ? row.id : null;\r\n }\r\n else\r\n vm.selectedOptionRow =null;\r\n }\r\n\r\n function checkClear(){\r\n if (vm.selectedOptionRow === 'null'){\r\n vm.selectedOptionRow = null;\r\n }\r\n var opt = selectOptionRowById(vm.selectedOptionRow);\r\n setPayLoadForForecasts(opt)\r\n vm.query();\r\n }\r\n\r\n function getCustomForecasts(){\r\n\r\n vm.isLoading = true;\r\n var dfd = $q.defer();\r\n\r\n $http.get(api.url_v2 + '/forecast_custom_options').then(function(response){\r\n vm.custom_forecasts = response.data;\r\n if (vm.firstLoad){\r\n\r\n getDefault(response.data);\r\n var opt = selectOptionRowById(vm.selectedOptionRow);\r\n setPayLoadForForecasts(opt)\r\n //vm.query().finally(function(){\r\n vm.firstLoad = false;\r\n //});\r\n\r\n\r\n }\r\n\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n vm.firstLoad = false;\r\n return dfd.reject(error);\r\n\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n\r\n\r\n function getDays(){\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n\r\n var timeoutId = false;\r\n\r\n\r\n var query = angular.copy(vm.payload);\r\n if (query.date_from !== null){\r\n UserService.set5DFDefault(query.date_from);\r\n vm.days.length = 0;\r\n\r\n ['mode', 'origin[]', 'destination[]', 'lane_pair[]'].map(function(field){\r\n\r\n if (query[field] === 'all' || query[field] === undefined){\r\n delete query[field];\r\n }\r\n });\r\n\r\n query = $httpParamSerializer(query)\r\n var params='';\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"userEmail=\"+localStorage.switchEmail+\"&\";\r\n // }else if(localStorage.userCompany){\r\n // params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompany)+\"&\";\r\n // }else if(localStorage.userDepartment){\r\n // params +=\"userDepartment=\"+encodeURIComponent(localStorage.userDepartment)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompany+\"&\";\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&\";\r\n // }\r\n\r\n if(localStorage.customerType == 'cww'){\r\n\r\n if(localStorage.switchEmailCwwType){\r\n params +=\"userEmail=\"+localStorage.switchEmailCwwType+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userCompanyCww){\r\n params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompanyCww)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userDepartmentCww){\r\n params +=\"userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCww)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCww+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.dummyUser){\r\n params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }\r\n\r\n }else{\r\n params +=\"customer_type=cww&\";\r\n }\r\n\r\n var urlString=\"\";\r\n\r\n if (vm.selectedOptionRow === null)\r\n urlString= api.url_v2 + '/widgets/five_day_forecast?' + params+ query;\r\n else\r\n urlString= api.url_v2 + '/widgets/five_day_forecast/saved_search/'+vm.selectedOptionRow+'?' + params+ query;\r\n\r\n var promise = $http.get(urlString)\r\n .then(function(response) {\r\n timeoutPromise = false;\r\n if (timeoutId) $timeout.cancel(timeoutId);\r\n return parseData(response.data);\r\n }, function(error){\r\n vm.isLoading = false;\r\n return $q.reject(error);\r\n });\r\n timeoutId = $timeout(function() {\r\n if (timeoutPromise) timeoutPromise.resolve();\r\n timeoutId = false;\r\n }, 120000);\r\n vm.requestId = timeoutId;\r\n return promise;\r\n }\r\n\r\n else {\r\n vm.isLoading = false;\r\n return $q.reject();\r\n\r\n }\r\n }\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .component('customOptions', {\r\n templateUrl: \"/app/dashboard/five-day-forecast/custom-options.html\",\r\n controller: CustomOptionsController,\r\n bindings: {\r\n active: '=',\r\n customForecasts: \"=\"\r\n\r\n }\r\n })\r\n\r\n CustomOptionsController.$inject = [\"$element\", \"$location\", \"$scope\", \"$mdConstant\", \"$q\", \"$http\", \"api\", \"$mdDialog\", \"$mdMedia\"];\r\n function CustomOptionsController($element, $location, $scope, $mdConstant, $q, $http, api, $mdDialog, $mdMedia){\r\n var vm = this;\r\n vm.custom_forecasts = [];\r\n vm.cancel = cancel;\r\n vm.newOption = {forecast_label:\"\", origins:[], destinations:[], lane_pairs:[], is_default: false};\r\n vm.getMatches = getMatches;\r\n /// removed key for the bug raised APPENG-3088 //////\r\n vm.keys = [$mdConstant.KEY_CODE.COMMA];\r\n vm.chipDisplay = chipDisplay;\r\n vm.save = save;\r\n vm.isLoading = false;\r\n vm.deleteOptionRow = deleteOptionRow;\r\n vm.removeOtherDefaults = removeOtherDefaults;\r\n vm.requireAtLeastOne = requireAtLeastOne;\r\n vm.emptyData = emptyData;\r\n vm.closeModal = closeModal;\r\n vm.oldCustomForecasts;\r\n\r\n // $scope.$watch(function(){return vm.customOptionsForm } , function(customOptionsForm){\r\n // if (customOptionsForm){\r\n\r\n // vm.customOptionsForm.$setDirty(true);\r\n // }\r\n // });\r\n\r\n function cancel(){\r\n vm.active = false;\r\n var isRootforecastEditId=false;\r\n angular.forEach(vm.customForecasts, function(val){\r\n if($rootScope.forecastEditId===val.id)\r\n isRootforecastEditId=true;\r\n });\r\n if(!isRootforecastEditId)\r\n $rootScope.forecastEditId=null;\r\n }\r\n\r\n function initNewOption(){\r\n vm.newOption = {};\r\n vm.newOption = {forecast_label:\"\", origins:[], destinations:[], lane_pairs:[], is_default: false};\r\n\r\n\r\n }\r\n\r\n\r\n function getMatches(key, searchText){\r\n var query = {field: key, value: searchText}\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function chipDisplay(chip){\r\n\r\n return chip.value;\r\n }\r\n\r\n function packageCustomForecasts(forecasts){\r\n var theForecasts = [];\r\n var keys = ['destinations', 'id', 'is_default', 'lane_pairs', 'origins', 'forecast_label'];\r\n\r\n theForecasts = forecasts.map(function(forecast, i){\r\n var row = {};\r\n for (var k in keys){\r\n row[keys[k]] = forecast[keys[k]];\r\n }\r\n return row;\r\n })\r\n return theForecasts;\r\n }\r\n\r\n function newRecordEmpty(record){\r\n if (record !== undefined){\r\n var newRecord = {'destinations': record['destinations'],\r\n 'lane_pairs': record['lane_pairs'],\r\n 'origins': record[\"origins\"],\r\n \"forecast_label\": record[\"forecast_label\"]}\r\n\r\n return (Object.keys(newRecord).map(function(key, i){ return newRecord[key]}).join(\"\").replace(/\\s/g, '') === \"\");\r\n }\r\n\r\n else{\r\n\r\n return true;\r\n }\r\n\r\n }\r\n\r\n function deleteOptionRow(row){\r\n var dfd = $q.defer();\r\n vm.isLoading = true;\r\n $http.delete(api.url_v2 + \"/forecast_custom_options/\" + row.id).then(function(response){\r\n vm.oldCustomForecasts = vm.customForecasts = vm.customForecasts.filter(function(d, i){return d.id !== row.id});\r\n vm.isLoading = false;\r\n vm.customOptionsForm.$setPristine(true);\r\n dfd.resolve(response.data);\r\n }, function(error){\r\n vm.isLoading = false;\r\n return dfd.reject(error);\r\n });\r\n\r\n return dfd.promise;\r\n }\r\n\r\n function requireAtLeastOne(model){\r\n\r\n if (model !== undefined && (model.lane_pairs.length !== 0 || model.origins.length !==0 || model.destinations.length !==0 )){\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n\r\n }\r\n\r\n function removeOtherDefaults(row){\r\n\r\n if (row.is_default){\r\n vm.customForecasts.filter(function(d, i){return d.id !== row.id || row.id === null}).map(function(d,i){ d.is_default = false});\r\n if (row.id) {\r\n vm.newOption.is_default = false;\r\n }\r\n }\r\n\r\n }\r\n\r\n function emptyData(){\r\n var isValid=false;\r\n isValid=vm.oldCustomForecasts== undefined ? true : angular.equals(vm.oldCustomForecasts, vm.customForecasts)\r\n if(vm.oldCustomForecasts==undefined)\r\n vm.oldCustomForecasts=angular.copy(vm.customForecasts);\r\n return newRecordEmpty(vm.newOption) && isValid;\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n function showApiError(messages) {\r\n $scope.apiErrorMessages = [];\r\n angular.forEach(messages, function(m) {\r\n // filter out some of the meaningless messages\r\n\r\n $scope.apiErrorMessages.push(m);\r\n });\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/dashboard/five-day-forecast/api-error.modal.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function save(){\r\n vm.isLoading = true;\r\n var dfd = $q.defer();\r\n var all_forecasts = angular.copy(vm.customForecasts)\r\n if (!newRecordEmpty(vm.newOption)){\r\n all_forecasts.push(vm.newOption)\r\n }\r\n\r\n\r\n $http.post(api.url_v2 + '/forecast_custom_options/batch', {forecasts: packageCustomForecasts(all_forecasts)}).then(function(response){\r\n\r\n vm.customForecasts.length = 0;\r\n vm.customForecasts = angular.copy(response.data);\r\n vm.isLoading = false;\r\n initNewOption();\r\n vm.customOptionsForm.$setPristine(true);\r\n vm.active = false;\r\n return dfd.resolve(response.data);\r\n\r\n\r\n },\r\n function errorCallback(error){\r\n\r\n var messages = error.data.errors.constructor === Array ? error.data.errors : [error.data.errors];\r\n showApiError(messages);\r\n vm.isLoading = false;\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n\r\n\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .component('breakdown', {\r\n template: '<div class=\"breakdown\"><div id=\"breakdown-{{ $ctrl.index }}\"></div></div>',\r\n controller: BreakdownController,\r\n bindings: {\r\n data: '<',\r\n index: '@',\r\n mobile: '<',\r\n onDelete: '&'\r\n }\r\n })\r\n\r\n BreakdownController.$inject = [\"$element\", \"$scope\", \"$window\"];\r\n function BreakdownController($element, $scope, $window){\r\n var vm = this;\r\n vm.svg;\r\n\r\n function getColor(shipment){\r\n switch (shipment){\r\n case \"active\":\r\n /* Class: $success */\r\n return {key: \"On-time Count: \", count: vm.data.active, value: '#30C268'};\r\n case \"potentials\":\r\n /* Class: $warning */\r\n return {key: \"Potential Exceptions Count: \", count: vm.data.potentials, value: '#EF9E3D'};\r\n case \"exceptions\":\r\n /* Class: $danger */\r\n return {key: \"Exceptions Count: \", count: vm.data.exceptions, value: '#EF533D'};\r\n case \"delivered\":\r\n return {key: \"Delivered Count: \", count: vm.data.delivered, value: '#A9A9A9'};\r\n }\r\n }\r\n\r\n function drawBreakdown(){\r\n var element = angular.element(document.querySelector(\"#breakdown-\"+vm.index));\r\n var offSetWidthVal= element[0].offsetWidth===0?177:element[0].offsetWidth;\r\n if(!element) return;\r\n if (vm.svg) {\r\n vm.svg.selectAll('*').remove();\r\n vm.svg.attr({width: offSetWidthVal, height: 26});\r\n } else {\r\n vm.svg = d3.select(element[0])\r\n .append('svg')\r\n .attr({width: offSetWidthVal, height: 26});\r\n }\r\n var multiplier = vm.mobile ? 3 : .8;\r\n\r\n vm.svg\r\n .selectAll(\".forecast-meter\")\r\n .data(breakdown)\r\n .enter()\r\n .append(\"rect\")\r\n .attr(\"class\", \"forecast-meter\")\r\n .attr(\"width\", Math.floor(multiplier * (offSetWidthVal) / bars.num_bars))\r\n .attr(\"x\", function(d, i){\r\n return i * (offSetWidthVal) / bars.num_bars;\r\n })\r\n .attr(\"y\", 0)\r\n .attr(\"height\", 26)\r\n .style('fill', function(d){return d.value;})\r\n\r\n vm.svg\r\n .data(breakdown)\r\n .append(\"rect\")\r\n .attr(\"width\", offSetWidthVal)\r\n .attr(\"x\", 0)\r\n .attr(\"y\", 0)\r\n .attr(\"height\", 26)\r\n .style('fill', 'transparent')\r\n .on('mouseover', function(d){\r\n tip.html(function(){\r\n var line = \"\";\r\n if(vm.data.active){\r\n line += \"<p><strong>On-time: \" + vm.data.active + \"</strong></p>\";\r\n }\r\n if(vm.data.potentials){\r\n line += \"<p><strong>Potential Exceptions: \" + vm.data.potentials + \"</strong></p>\";\r\n }\r\n if(vm.data.exceptions){\r\n line += \"<p><strong>Exceptions: \" + vm.data.exceptions + \"</strong></p>\";\r\n }\r\n if(vm.data.delivered){\r\n line += \"<p><strong>Delivered: \" + vm.data.delivered + \"</strong></p>\";\r\n }\r\n return line\r\n });\r\n tip.show();\r\n })\r\n .on('mouseout', function(d){\r\n tip.hide();\r\n });\r\n d3.select(\".breakdown-\"+vm.index+\"-tip\").remove();\r\n var tip = d3.tip()\r\n .attr('class', \"d3-tip breakdown-\"+vm.index+\"-tip\")\r\n .style('background-color', \"#616161\")\r\n .style('z-index', 500)\r\n .offset([-10, 0])\r\n .html(function(d){ })\r\n vm.svg.call(tip);\r\n\r\n /* Clean up your tips */\r\n element.on('$destroy', function(){\r\n d3.select(\".breakdown-\"+vm.index+\"-tip\").remove();\r\n })\r\n }\r\n\r\n /* Initialization of the element */\r\n var breakdown = [];\r\n var bars = {active:0, potentials: 0,exceptions:0, delivered: 0, total: 0, num_bars: 20};\r\n Object.keys(vm.data).map(function(key){\r\n if ([\"active\", \"potentials\", \"exceptions\", \"delivered\"].includes(key)){\r\n bars.total += vm.data[key];\r\n }\r\n //if(Number.isInteger(vm.data[key])) bars.total += vm.data[key];\r\n });\r\n // console.log(vm.data);\r\n //bars.active = bars.num_bars - bars.potentials - bars.exceptions - bars.delivered;\r\n // bars.potentials = Math.ceil(bars.num_bars * vm.data.potentials / bars.total);\r\n // bars.exceptions = Math.ceil(bars.num_bars * vm.data.exceptions / bars.total);\r\n // bars.active = Math.ceil(bars.num_bars * vm.data.active / bars.total);\r\n // bars.delivered = Math.ceil(bars.num_bars * vm.data.delivered / bars.total);\r\n\r\n bars.potentials = Math.ceil(bars.num_bars * vm.data.potentials / bars.total);\r\n bars.exceptions = Math.ceil(bars.num_bars * vm.data.exceptions / bars.total);\r\n bars.active = Math.ceil(bars.num_bars * vm.data.active / bars.total);\r\n bars.delivered = Math.ceil(bars.num_bars * vm.data.delivered / bars.total);\r\n\r\n\r\n\r\n if((bars.num_bars * vm.data.potentials / bars.total) > 0 && (bars.num_bars * vm.data.potentials / bars.total) < 0.99){\r\n bars.potentials = 1;\r\n }\r\n if((bars.num_bars * vm.data.exceptions / bars.total) > 0 && (bars.num_bars * vm.data.exceptions / bars.total) < 0.99){\r\n bars.exceptions = 1;\r\n }\r\n if((bars.num_bars * vm.data.active / bars.total) > 0 && (bars.num_bars * vm.data.active / bars.total) < 0.99){\r\n bars.active = 1;\r\n }\r\n if((bars.num_bars * vm.data.delivered / bars.total) > 0 && (bars.num_bars * vm.data.delivered / bars.total) < 0.99){\r\n bars.delivered = 1;\r\n }\r\n\r\n var totalpipes = bars.potentials + bars.exceptions + bars.active + bars.delivered;\r\n var barValues = [bars.potentials, bars.exceptions, bars.active, bars.delivered];\r\n var maxIndex = barValues.indexOf(Math.max(bars.potentials, bars.exceptions, bars.active, bars.delivered));\r\n\r\n if(totalpipes > 20){\r\n if(maxIndex == 0){\r\n var count = 20 - (bars.exceptions + bars.active + bars.delivered);\r\n bars.potentials = count;\r\n }\r\n\r\n if(maxIndex == 1){\r\n var count = 20 - (bars.potentials + bars.active + bars.delivered);\r\n bars.exceptions = count;\r\n }\r\n\r\n if(maxIndex == 2){\r\n var count = 20 - (bars.exceptions + bars.potentials + bars.delivered);\r\n bars.active = count;\r\n }\r\n\r\n if(maxIndex == 3){\r\n var count = 20 - (bars.exceptions + bars.active + bars.potentials);\r\n bars.delivered = count;\r\n }\r\n }\r\n\r\n\r\n /* Add bars relative to how many entries there are */\r\n Object.keys(bars).map(function(key){\r\n if ([\"active\",\"potentials\", \"exceptions\", \"delivered\"].includes(key)){\r\n for (var i = 0; i < bars[key]; i++){\r\n breakdown.push(getColor(key));\r\n }\r\n }\r\n })\r\n\r\n // console.log(breakdown);\r\n\r\n /* When the document loads, create the bars */\r\n angular.element(document).ready(function(){\r\n drawBreakdown();\r\n angular.element($window).bind('resize', function(){\r\n drawBreakdown();\r\n $scope.$watch(vm.data, function(){drawBreakdown();}, true);\r\n });\r\n });\r\n\r\n }\r\n}) ();\r\n\n/**\r\n * @ngdoc module\r\n * @name DashboardService\r\n *\r\n * @description The DashboardService module communciates with the Rails API to\r\n * procure widget data\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadActiveShipments\r\n * @description queries the API for active shipment counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedActiveShipments\r\n * @description returns whether or not the DashboardService has cached active shipment data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedActiveShipments\r\n * @description returns the currently cached active shipment data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadCurrentExceptions\r\n * @description queries the API for current exceptions counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedCurrentlExceptions\r\n * @description returns whether or not the DashboardService has cached current exception data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedCurrentExceptions\r\n * @description returns the currently cached current exception data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadPotentialExceptions\r\n * @description queries the API for potential exceptions counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedPotentialExceptions\r\n * @description returns whether or not the DashboardService has cached potential exception data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedPotentialExceptions\r\n * @description returns the currently cached potential exception data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.loadSpendingOverTime(dateFrom, dateTo, group [, timeoutPromise])\r\n * @description queries the API for spending over time\r\n * @param dateFrom - the date to start from (beginning of day)\r\n * @param dateTo - the date to end with (end of day)\r\n * @param group - what to group by [week, month, quarter, year]\r\n * @param timeoutPromise - [optional] a promise that can be resolved to cancel the request\r\n * @return object\r\n * <code>\r\n * {\r\n * group_by: string,\r\n * groups: object\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedSpendingOverTime\r\n * @description returns whether or not the DashboardService has cached spending over time data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedSpendingOverTime\r\n * @description returns the currently cached spending over time data\r\n * @return object\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.loadOnTimePercentage(dateTo, group [, timeoutPromise])\r\n * @description queries the API for spending over time\r\n * @param dateTo - the date to end with (end of day). dateFrom is inferred by the server\r\n * @param group - what to group by [week, month, quarter, year]\r\n * @param timeoutPromise - [optional] a promise that can be resolved to cancel the request\r\n * @return object\r\n * <code>\r\n * {\r\n * group_by: string,\r\n * current: {\r\n * \ttotal: int,\r\n * \tontime: int,\r\n * \tdate_from: date,\r\n * \tdate_to: date\r\n * },\r\n * previous: {\r\n * \ttotal: int,\r\n * \tontime: int,\r\n * \tdate_from: date,\r\n * \tdate_to: date\r\n * },\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedOnTimePercentage\r\n * @description returns whether or not the DashboardService has cached on time percentage data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedOnTimePercntage\r\n * @description returns the currently cached on time percentage data. Note that this may not\r\n * have data for all periods\r\n * @return object\r\n * visible\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .service('DashboardCslService', DashboardCslService)\r\n .constant(\"DASHBOARD\", {\r\n \"TIMEOUT\": \"120000\",\r\n \"SERVER_ERROR\": \"An error occurred while loading the data\"\r\n });\r\n\r\n /** @ngInject */\r\n DashboardCslService.$inject = ['$http', 'api', '$q', '$filter', '$rootScope', '$timeout', \"DASHBOARD\", \"AJAX\", \"UserService\"];\r\n function DashboardCslService($http, api, $q, $filter, $rootScope, $timeout, DASHBOARD, AJAX, UserService) {\r\n var cachedActiveShipments = false,\r\n cachedCurrentExceptions = false,\r\n cachedPotentialExceptions = false,\r\n loadingExistParam = false,\r\n cachedLanePairs = {week: false, month: false, quarter: false, year: false},\r\n cachedSpendingOverTime = {},\r\n cachedOnTimePercentage = {},\r\n searchParams = {},\r\n tlp = {all:[], sea:[], air:[], ground:[]};\r\n var topLanePairs = {\r\n week: angular.copy(tlp),\r\n month: angular.copy(tlp),\r\n quarter: angular.copy(tlp),\r\n year: angular.copy(tlp),\r\n weekLoaded: false,\r\n monthLoaded: false,\r\n quarterLoaded: false,\r\n yearLoaded: false\r\n };\r\n var pins = {\r\n week: angular.copy(tlp),\r\n month: angular.copy(tlp),\r\n quarter: angular.copy(tlp),\r\n year: angular.copy(tlp)\r\n };\r\n //['all', 'air', 'sea', 'ground'].map(function(d){topLanePairs[d] = angular.copy(lanePair);});\r\n\r\n function buildQuery(){\r\n var query = [];\r\n for (var key in searchParams){\r\n query.push(key+\"=\"+searchParams[key]);\r\n }\r\n var params=\"?\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"userEmail=\"+localStorage.switchEmail+\"&\";\r\n // }else if(localStorage.userCompany){\r\n // params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompany)+\"&\";\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&\";\r\n // }\r\n\r\n\r\n\r\n if(localStorage.customerType == 'csl'){\r\n\r\n if(localStorage.switchEmailCslType){\r\n params +=\"userEmail=\"+localStorage.switchEmailCslType+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userCompanyCsl){\r\n params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userDepartmentCsl){\r\n params +=\"userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCsl)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCsl+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.dummyUser){\r\n params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }\r\n\r\n }else{\r\n params +=\"customer_type=csl&\";\r\n }\r\n\r\n\r\n\r\n if (query.length > 0){\r\n return params+query.join('&');\r\n } else {\r\n if(params == \"?\"){return \"\";}\r\n else{return params;}\r\n }\r\n }\r\n\r\n\r\n\r\n return {\r\n foo: function(){return \"bar\";},\r\n setSearchParams: function(params){ searchParams = params;},\r\n getLanePairs: function(period){\r\n return topLanePairs[period];},\r\n getLegend: function(){\r\n return legend;\r\n },\r\n getPins: function(group){\r\n return pins[group];\r\n },\r\n\r\n invalidateCache: function(){\r\n\r\n return $http.get(api.url_v2 + '/widgets/invalidate_cache', {timeout: AJAX.TIMEOUT});\r\n },\r\n\r\n\r\n //-------------------------\r\n // Active Shipments\r\n //-------------------------\r\n loadActiveShipments: function(){\r\n\r\n var date_from = moment().toDate();\r\n\r\n var promise = $http.get(api.url_v2 + '/widgets_csl/active_shipments'+buildQuery()).then(\r\n function successCallback(response) {\r\n loadingExistParam = true;\r\n cachedActiveShipments = response.data;\r\n $rootScope.$broadcast(\"currentShipmentsLoading\", loadingExistParam);\r\n return response;\r\n }, function errorCallback(response){\r\n return {error: DASHBOARD.SERVER_ERROR};\r\n });\r\n return promise;\r\n },\r\n getCachedActiveShipments: function() {\r\n return cachedActiveShipments;\r\n },\r\n hasCachedActiveShipments: function() {\r\n return !!cachedActiveShipments;\r\n },\r\n\r\n //-------------------------\r\n // Current Exceptions\r\n //-------------------------\r\n loadCurrentExceptions: function(){\r\n var promise = $http.get(api.url_v2 + '/widgets_csl/current_exceptions'+buildQuery()).then(function(response) {\r\n loadingExistParam = true;\r\n cachedCurrentExceptions = response.data;\r\n $rootScope.$broadcast(\"currentExceptionLoading\", loadingExistParam);\r\n return response;\r\n }, function errorCallback(response){\r\n return {error: DASHBOARD.SERVER_ERROR};\r\n });\r\n return promise;\r\n },\r\n getCachedCurrentExceptions: function() {\r\n return cachedCurrentExceptions;\r\n },\r\n hasCachedCurrentExceptions: function() {\r\n return !!cachedCurrentExceptions;\r\n },\r\n\r\n\r\n getCachedPotentialExceptions: function() {\r\n return cachedPotentialExceptions;\r\n },\r\n hasCachedPotentialExceptions: function() {\r\n return !!cachedPotentialExceptions;\r\n },\r\n\r\n\r\n getCachedSpendingOverTime: function() {\r\n return cachedSpendingOverTime;\r\n },\r\n hasCachedSpendingOverTime: function() {\r\n return !!cachedSpendingOverTime;\r\n },\r\n\r\n //-------------------------\r\n // Spend Over Time\r\n //-------------------------\r\n loadOnTimePercentage: function(dateTo, group, timeoutPromise) {\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n var timeoutId = false;\r\n var query = buildQuery();\r\n query = query ? (query + 'date_to='+dateTo+'&group_by='+group) :\r\n ('?date_to='+dateTo+'&group_by='+group);\r\n\r\n\r\n\r\n var promise = $http.get(api.url_v2 + '/widgets_csl/ontime_percentage'+query, {timeout: timeoutPromise.promise})\r\n .then(function(response) {\r\n cachedOnTimePercentage[group] = response.data;\r\n return response.data;\r\n });\r\n timeoutId = $timeout(function() {\r\n if (timeoutPromise) timeoutPromise.resolve();\r\n timeoutId = false;\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n },\r\n getCachedOnTimePercentage: function() {\r\n return cachedOnTimePercentage;\r\n },\r\n hasCachedOnTimePercentage: function() {\r\n return !!cachedOnTimePercentage;\r\n },\r\n\r\n hasCachedLanePairs: function(group){\r\n return !!cachedLanePairs[group];\r\n }\r\n\r\n\r\n }; // End Service Return\r\n } // End Service\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name DashboardCslController\r\n *\r\n * @description The DashboardCslController module interfaces with the user dashboard\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .run(['$anchorScroll', function($anchorScroll) {\r\n $anchorScroll.yOffset = 90; // account for top nav when scrolling\r\n }])\r\n .animation('.progress-bar', ['$animateCss', function($animateCss){\r\n return {\r\n enter: function(element, doneFn){\r\n var ewidth = element[0].width;\r\n return $animateCss(element, {\r\n from: {width: '0px'},\r\n to: {width: ewidth},\r\n duration: 100\r\n });\r\n }\r\n }\r\n }])\r\n .controller('DashboardCslController', DashboardCslController)\r\n\r\n /** @ngInject */\r\n DashboardCslController.$inject = ['DashboardCslService', '$window', '$anchorScroll', 'UserService', 'AdvSearchCslService', '$log', '$scope', '$timeout', '$location', '$filter', '$q', '$state', '$mdDialog', '$mdMedia', '$rootScope', '$animateCss', 'permissions', 'fivedayCslService'];\r\n function DashboardCslController(DashboardCslService, $window, $anchorScroll, UserService, AdvSearchCslService, $log, $scope, $timeout, $location, $filter, $q, $state, $mdDialog, $mdMedia, $rootScope, $animateCss, permissions, fivedayCslService) {\r\n var vm = this;\r\n\r\n var scrollEvt = false\r\n $(window).on( 'scroll', function(event){\r\n if(!scrollEvt){\r\n $window.scrollTo(0, 0);\r\n }\r\n scrollEvt = true\r\n });\r\n\r\n fivedayCslService.getAllStateCode();\r\n\r\n /*vm.today_date = moment(new Date()).format(\"MMM DD YYYY\");\r\n vm.week_start_day = moment(new Date()).startOf('week').format('MMM DD YYYY');\r\n vm.week_end_day = moment(new Date()).endOf('week').format('MMM DD YYYY');*/\r\n\r\n vm.today_date = moment(new Date()).format(\"YYYY-MM-DD\");\r\n vm.week_start_day = moment(new Date()).startOf('week').format('YYYY-MM-DD');\r\n vm.week_end_day = moment(new Date()).endOf('week').format('YYYY-MM-DD');\r\n\r\n /*vm.donut_query = {\r\n 'Full Truckload (FTL)':'shipment_deliveryeta_date_equal_to='+vm.today_date,\r\n 'Less Than Truckload (LTL)': 'shipment_deliveryeta_date_range_to='+vm.week_start_day+' and '+vm.week_end_day,\r\n 'Rail / Intermodal': 'shipment_deliveryeta_date_range_to='+vm.week_start_day+' and '+vm.week_end_day\r\n }*/\r\n vm.donut_query = {\r\n 'FTL':\"shipment_type=FTL\",\r\n 'LTL': \"shipment_type=LTL\",\r\n 'Intermodal': \"shipment_type=INTERMODAL\"\r\n }\r\n\r\n vm.showLoading = false; //flag that shows the loading or not\r\n vm.params = {};\r\n vm.hardRefresh = hardRefresh;\r\n vm.backLink = \"\";\r\n vm.largeDonutNumbers = false;\r\n vm.configuration = 'a';\r\n vm.onTimePercentageSwap = onTimePercentageSwap;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n vm.widgetHasCustomRange = {\r\n onTimePercentage: false,\r\n spendOverTime: false,\r\n lanePairs: false\r\n };\r\n vm.lanePairsDateTo = false;\r\n vm.momentDateFormat = 'YYYY-MM-DD';\r\n\r\n if ($state.current.name === 'dashboardCsl'){\r\n localStorage.setItem('demoTypeDefault','csl');\r\n }\r\n\r\n vm.donutNums = {\r\n 'currentExceptionNum': false,\r\n 'activeShipmentsNum': false\r\n };\r\n\r\n $rootScope.$on(\"currentShipmentsLoading\", function(event, value) {\r\n vm.currentShipmentsLoading = value;\r\n });\r\n\r\n $rootScope.$on(\"currentExceptionLoading\", function(event, value) {\r\n vm.currentExceptionLoading = value;\r\n });\r\n\r\n // ================================\r\n // Handle Timeouts\r\n // ================================\r\n var spendingOverTimeTimeout = {},\r\n onTimePercentageTimeout = {},\r\n lanePairsTimeout = {}; // used lower, prevents an undefined error by putting it here; // used lower, prevents an undefined error by putting it here\r\n\r\n $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams){\r\n cancelTimeouts(spendingOverTimeTimeout);\r\n cancelTimeouts(onTimePercentageTimeout);\r\n cancelTimeouts(lanePairsTimeout);\r\n });\r\n\r\n angular.element(function(){\r\n var otp = angular.element(document.querySelector('on-time-percentage'))[0]\r\n\r\n //Giving error in IE [offsetHeight]\r\n //otp.offsetHeight = otp.offsetWidth * 9 / 16;\r\n })\r\n function cancelTimeouts(timeoutHash){\r\n Object.keys(timeoutHash).map(function(timeoutkey){\r\n timeoutHash[timeoutkey].resolve(\"stateChanged\");\r\n })\r\n }\r\n\r\n /* Custom Visualization Form */\r\n if ($state.current.name === 'visualize'){\r\n var searchFields = angular.copy(AdvSearchCslService.getCurrentSearchFields());\r\n for (var p in $state.params){\r\n if ($state.params[p] !== undefined){\r\n vm.params[p] = $state.params[p];\r\n searchFields[p].value = $state.params[p];\r\n }\r\n }\r\n vm.backLink = $location.url().replace('track-trace/viz', 'track-trace');\r\n DashboardCslService.setSearchParams(vm.params);\r\n AdvSearchCslService.setCurrentSearchFields(searchFields);\r\n vm.query = AdvSearchCslService.getCurrentSearch();\r\n $scope.$watch('vm.query', function(){\r\n DashboardCslService.setSearchParams(vm.query);\r\n }, true);\r\n }\r\n\r\n d3.json('/assets/json/world-50m.json', function(err, world){\r\n if(err) throw err;\r\n $scope.$apply(function(){\r\n $scope.land = topojson.feature(world, world.objects.countries);\r\n $scope.boundary = topojson\r\n .mesh(world, world.objects.countries, function(a, b) { return a !== b; });\r\n });\r\n });\r\n\r\n /* functions */\r\n vm.showLoading = showLoading;\r\n vm.hideLoading = hideLoading;\r\n vm.getAljexDashboard = getAljexDashboard;\r\n vm.setCustomRange = setCustomRange;\r\n vm.setEndDate = setEndDate;\r\n vm.closeModal = closeModal;\r\n vm.resetCustomRange = resetCustomRange;\r\n vm.displayDate = displayDate;\r\n vm.keyHandler = keyHandler;\r\n vm.showModal = showModal;\r\n\r\n function showModal(modal) {\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/dashboard/modals/' + modal + '.modal.html',\r\n clickOutsideToClose: true,\r\n parent: angular.element(document.body),\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function getAljexDashboard(){\r\n var groups = UserService.getUserData().groups;\r\n if (groups){\r\n groups.map(function(group){\r\n if (group.data.dashboard_config){\r\n vm.configuration = group.data.dashboard_config;\r\n }\r\n });\r\n }\r\n return \"/app/dashboard/csl/configurations/version-\" + vm.configuration + \".html\";\r\n }\r\n\r\n //------------------------------------------\r\n // Shipping Volume and Count Tabs\r\n // //---------------------------------------\r\n vm.periods = [\r\n {label: 'WIDGETS.WEEK', field:'week'},\r\n {label: 'WIDGETS.MONTH', field:'month'},\r\n {label: 'WIDGETS.QUARTER', field:'quarter'},\r\n {label: 'WIDGETS.YEAR', field:'year'}\r\n ];\r\n\r\n vm.metric_types = [\r\n {label: 'WIDGETS.ALL', field:'all'},\r\n {label: 'WIDGETS.VOLUME', field:'volume'},\r\n {label: 'WIDGETS.COUNT', field:'count'}\r\n ];\r\n\r\n\r\n function keyHandler(keyCodeString){\r\n var hardRefreshCodes = ['116-shiftKey', '82-metaKey-shiftKey', '116-ctrlKey'];\r\n if (hardRefreshCodes.includes(keyCodeString)) {\r\n event.preventDefault();\r\n hardRefresh();\r\n\r\n }\r\n\r\n }\r\n\r\n function hardRefresh(){\r\n\r\n DashboardCslService.invalidateCache().finally(function(){\r\n location.reload(true);\r\n });\r\n }\r\n\r\n\r\n //used to show the test loading\r\n function showLoading() {\r\n vm.showLoading = true;\r\n }\r\n\r\n function hideLoading() {\r\n vm.showLoading = false;\r\n }\r\n\r\n //------------\r\n // Active Shipments\r\n //------------\r\n loadDonutWidget('activeShipments');\r\n loadDonutWidget('currentExceptions');\r\n\r\n //------------\r\n // On-Time Percentage\r\n //------------\r\n vm.onTimePercentage = onTimePercentage();\r\n\r\n function loadDefaultOnTimePercentage() {\r\n\r\n var dateTo = vm.params.due_date_to ? vm.params.due_date_to :\r\n $location.search()['dateTo'] ? $location.search()['dateTo'] : $filter(\"date\")(new Date(), 'yyyy-MM-dd', \"UTC\");\r\n loadOnTimePercentage(dateTo, 'week');\r\n loadOnTimePercentage(dateTo, 'month');\r\n loadOnTimePercentage(dateTo, 'quarter');\r\n loadOnTimePercentage(dateTo, 'year');\r\n }\r\n loadDefaultOnTimePercentage();\r\n\r\n\r\n //------------\r\n // Donut Widgets\r\n //------------\r\n function loadDonutWidget(name) {\r\n\r\n // icons: {'Today':'', 'CurrentWeek':'', 'Scheduled':'', 'pickup': '', 'delivery': '', 'ground': ''},\r\n var donut_data = {\r\n icons: {'FullTruckLoad':'', 'LessThanTruckLoad':'', 'RailInterModal':'', 'pickup': '', 'delivery': '', 'ground': ''},\r\n activeShipments: {'FullTruckLoad':'md-success-2', 'LessThanTruckLoad':'md-success-3', 'RailInterModal':'md-success'},\r\n //currentExceptions: {'pickup':'md-danger-2', 'delivery':'md-danger-3'},\r\n currentExceptions: {'FullTruckLoad':'md-danger-2', 'LessThanTruckLoad':'md-danger-3', 'RailInterModal':'md-danger'},\r\n };\r\n var capName = name.substring(0, 1).toUpperCase() + name.substring(1);\r\n vm[name + 'Loaded'] = false;\r\n vm['is' + capName + 'FirstLoad'] = !DashboardCslService['hasCached' + capName]();\r\n if (vm['is' + capName + 'FirstLoad']) {\r\n vm[name] = getCounts(null, name);\r\n }\r\n else {\r\n var data = DashboardCslService['getCached' + capName]();\r\n vm[name] = getCounts(data, name);\r\n }\r\n\r\n vm[name + 'Control'] = {\r\n onClick: function(type) {\r\n\r\n var url = \"/track-trace-csl?shipment_status=undelivered&page_from=aljex\",\r\n params = {status: 0};\r\n switch (name) {\r\n case 'currentExceptions':\r\n //params.current_exception = 1;\r\n url += \"¤t_exception=1\";\r\n break;\r\n case 'potentialExceptions':\r\n // params.potential_exception = 1;\r\n url += \"&potential_exception=1\";\r\n break;\r\n }\r\n if (type) {\r\n params.business_type_group = type;\r\n }\r\n $scope.$apply(function() {\r\n window.location.href = url; //.search(params);\r\n });\r\n }\r\n };\r\n\r\n vm[name + 'SegmentClassMap'] = {'FTL': false, 'LTL': false, 'Intermodal': false, 'Pick Up': false, 'Delivery': false, 'ground': false };\r\n\r\n DashboardCslService['load' + capName]().then(\r\n function(response) {\r\n vm.donutNums[name+'Num'] = false;\r\n vm.largeDonutNumbers = false;\r\n vm[name + 'Loaded'] = true;\r\n vm['is' + capName + 'FirstLoad'] = false;\r\n if (response.error){\r\n vm[name + 'Error'] = response.error;\r\n } else {\r\n var data = response.data;\r\n vm[name] = getCounts(data, name);\r\n if (data.FTL > 999 || data.LTL > 999 || data.INTERMODAL > 999) {\r\n vm.donutNums[name+'Num'] = true;\r\n }\r\n if (vm.donutNums['currentExceptionsNum'] || vm.donutNums['activeShipmentsNum']) {\r\n vm.largeDonutNumbers = true;\r\n }\r\n }\r\n },\r\n function(error) {\r\n vm[name + 'Loaded'] = true;\r\n vm['is' + capName + 'FirstLoad'] = false;\r\n vm.error = error.message;\r\n }\r\n );\r\n\r\n function getCounts(_data, name){\r\n var isData = !!_data, dd = donut_data;\r\n //if(name == 'activeShipments'){\r\n\r\n return [\r\n {type: 'FTL', shipments: isData ? _data.FTL : 0, color: dd[name].FullTruckLoad, icon: dd.icons.FullTruckLoad},\r\n {type: 'LTL', shipments: isData ? _data.LTL : 0, color: dd[name].LessThanTruckLoad, icon: dd.icons.LessThanTruckLoad},\r\n {type: 'Intermodal', shipments: isData ? _data.INTERMODAL : 0, color: dd[name].RailInterModal, icon: dd.icons.RailInterModal}\r\n ];\r\n\r\n /*} if(name == 'currentExceptions'){\r\n\r\n return [\r\n {type: 'Pick Up', shipments: isData ? 0 : 0, color: dd[name].pickup, icon: dd.icons.pickup},\r\n {type: 'Delivery', shipments: isData ? 0 : 0, color: dd[name].delivery, icon: dd.icons.delivery},\r\n //{type: 'ground', shipments: isData ? 0 : 0, color: dd[name].ground, icon: dd.icons.ground}\r\n ];\r\n\r\n }*/\r\n }\r\n }\r\n\r\n function displayDateOnGraph(date, period){\r\n switch (period){\r\n case 'week':\r\n return moment(date).format('MMM')+'\\n' + moment(date).startOf(period).format('Do') + ' - ' + moment(date).endOf(period).format('Do');\r\n case 'month':\r\n\r\n return moment(date).format('MMM');//+'\\n'+moment(date).format('YYYY');\r\n case 'quarter':\r\n\r\n return moment(date).format('[Q]Q') + '\\n' + moment(date).format('YYYY');\r\n case 'year':\r\n return moment(date).format('YYYY');\r\n }\r\n }\r\n\r\n function displayDateRange(dateFrom, dateTo, period, otp){\r\n var format;\r\n switch (period){\r\n case 'week':\r\n format = \"MMM Do, YYYY\"\r\n break;\r\n case 'month':\r\n format = otp ? \"MMMM YYYY\" : \"MMM YYYY\";\r\n break;\r\n case 'quarter':\r\n format = otp ? \"MMM Do, YYYY\" : \"[Quarter] Q, YYYY\"\r\n break;\r\n case 'year':\r\n format = otp ? \"YYYY\" : \"MMM Do, YYYY\"\r\n break;\r\n }\r\n if (otp){\r\n switch (period){\r\n case 'month':\r\n return moment(dateTo).format(format);\r\n case 'year':\r\n return moment(dateTo).format(format);\r\n default:\r\n return moment(dateFrom).startOf(period).format(format) + ' - ' + moment(dateTo).endOf(period).format(format);\r\n }\r\n } else {\r\n if (period == 'week'){\r\n return moment(dateFrom).startOf(period).format(format) + ' - ' + moment(dateTo).format(format);\r\n } else {\r\n return moment(dateFrom).format(format) + ' - ' + moment(dateTo).format(format);\r\n }\r\n }\r\n }\r\n\r\n function displayDate(date){\r\n return moment(date).format(\"MMM D, YYYY\");\r\n }\r\n\r\n function parseFormattedDate(date, period){\r\n switch (period){\r\n case 'week':\r\n return moment(date, 'YYYY-WW');\r\n case 'month':\r\n return moment(date, 'YYYY-MM');\r\n case 'quarter':\r\n return moment(date.replace(/.{2}/,\"\"), 'YYYY-Q');\r\n case 'year':\r\n return moment(date, 'YYYY')\r\n }\r\n }\r\n\r\n //--------------------\r\n // On-Time Percentage\r\n //--------------------\r\n function onTimePercentage(){\r\n function def(){return {currentPercent: 0, previousPercent: 0, change: 0, percentage: 0, previousPercentage: 0, direction: \"\"}}\r\n var data = {\r\n week: {ontime: def(), adjusted_ontime: def(), isLoaded: false},\r\n month: {ontime: def(), adjusted_ontime: def(), isLoaded: false},\r\n quarter: {ontime: def(), adjusted_ontime: def(), isLoaded: false},\r\n year: {ontime: def(), adjusted_ontime: def(), isLoaded: false}\r\n };\r\n /* Functions and variables */\r\n var otp = {\r\n data: data,\r\n getChange: getChange,\r\n getDateFrom: getDateFrom,\r\n getDateRange: getDateRange,\r\n getDateTo: getDateTo,\r\n getDatePeriodTo: getDatePeriodTo,\r\n getDirection: getDirection,\r\n getPercentage: getPercentage,\r\n isLoaded: isLoaded,\r\n isNoPreviousData: isNoPreviousData,\r\n isNoCurrentData: isNoCurrentData,\r\n getDatePercentage: _getDatePercentage,\r\n loadData: loadData,\r\n selected: 'week',\r\n switch: false,\r\n tabs: angular.copy(vm.periods),\r\n tabSelected: tabSelected,\r\n version: 'ontime',\r\n fromLast: fromLast,\r\n noPreviousData: noPreviousData,\r\n noCurrentData: noCurrentData,\r\n period: {\r\n week:{},\r\n month:{},\r\n quarter:{},\r\n year:{}\r\n }\r\n };\r\n /* Load the data into the object */\r\n function loadData (period, _data){\r\n data[period].isLoaded = true;\r\n if (!_data){\r\n data[period].ontime.currentTotal = 0;\r\n data[period].adjusted_ontime.currentTotal = 0;\r\n return;\r\n }\r\n for (var field in {ontime:{}, adjusted_ontime:{}}){\r\n var d = data[period][field];\r\n d.currentPercent = Math.round( (_data.current[field] / Math.max(1, _data.current.total)) * 100 );\r\n d.previousPercent = Math.round( (_data.previous[field] / Math.max(1, _data.previous.total)) * 100 );\r\n d.change = Math.abs((d.previousPercent - d.currentPercent));\r\n d.percentage = parseInt(d.currentPercent);\r\n d.previousPercentage = parseInt(d.previousPercent);\r\n d.direction = d.currentPercent > d.previousPercent ? 'expand_less' : (d.currentPercent < d.previousPercent ? 'expand_more' : \"remove\");\r\n d.currentTotal = _data.current.total;\r\n d.previousTotal = _data.previous.total;\r\n d.currentOnTime = _data.current.ontime;\r\n d.previousOnTime = _data.previous.ontime;\r\n }\r\n }\r\n function _getDatePercentage() { return getDatePercentage(otp.getDateTo(), otp.selected); }\r\n function getDateFrom() { return getDatePeriod(otp.period[otp.selected].dateFrom, otp.selected, false); }\r\n function getDateRange() { return displayDateRange(otp.getDateFrom(), otp.getDateTo(), otp.selected, true); }\r\n function getDateTo() { return otp.period[otp.selected].dateTo; }\r\n function getDatePeriodTo() { return getDatePeriod(otp.period[otp.selected].dateTo, otp.selected, true); }\r\n function getPercentage() { return data[otp.selected][otp.version].percentage; }\r\n function getChange() { return data[otp.selected][otp.version].change; }\r\n function isNoPreviousData() { return data[otp.selected][otp.version].previousTotal === 0; }\r\n function isNoCurrentData() { return data[otp.selected][otp.version].currentTotal === 0; }\r\n function getDirection() { return data[otp.selected][otp.version].direction; }\r\n function tabSelected(tab) {\r\n otp.selected = tab.field;\r\n // debugger;\r\n // var element = angular.element(document.querySelector('.bar'))[0]\r\n // var animator = $animateCss(element, {\r\n // from: {width: 0},\r\n // to: {width: otp.getDatePercentage()}\r\n // });\r\n // animator.start();\r\n // .map(function(meter){\r\n // debugger;\r\n // meter.data(\"origWidth\", meter.width())\r\n // .width(0)\r\n // .animate({width: meter.data(\"origWidth\")}, 1200)\r\n // });\r\n }\r\n function isLoaded() { return data[otp.selected].isLoaded; }\r\n function fromLast() { return 'WIDGETS.FROM_LAST_' + otp.selected.toUpperCase(); }\r\n function noPreviousData() { return 'WIDGETS.NO_DATA_FOR_LAST_' + otp.selected.toUpperCase(); }\r\n function noCurrentData() { return \"WIDGETS.NO_DATA_FOR_CURRENT_\" + otp.selected.toUpperCase(); }\r\n return otp;\r\n }\r\n\r\n function getDatePercentage(date, period){\r\n var percent_complete = 0;\r\n\r\n switch (period){\r\n case 'week':\r\n\r\n percent_complete = moment(date).weekday() / 7.0;\r\n break;\r\n case 'month':\r\n\r\n percent_complete = 1.0 * moment(date).date() / moment(date).daysInMonth();\r\n break;\r\n case 'quarter':\r\n var start = moment(date).dayOfYear() - moment(date).startOf('quarter').dayOfYear(),\r\n ending = moment(date).endOf('quarter').dayOfYear() - moment(date).startOf('quarter').dayOfYear()\r\n percent_complete = 1.0 * start / ending;\r\n break;\r\n case 'year':\r\n percent_complete = moment(date).dayOfYear() / 365.0\r\n break;\r\n }\r\n return Math.round(percent_complete * 100)\r\n }\r\n\r\n function getDatePeriod(date, period, isEnd){\r\n return isEnd ? moment(date).endOf(period) : moment(date).startOf(period)\r\n // switch (period){\r\n // case 'week':\r\n // isEnd ? moment(date).endOf(period) : moment(date).startOf(period)\r\n // break;\r\n // case 'month':\r\n // percent_complete = 1.0 * moment(date).date() / moment(date).daysInMonth();\r\n // break;\r\n // case 'quarter':\r\n // var start = moment(date).dayOfYear() - moment(date).startOf('quarter').dayOfYear(),\r\n // ending = moment(date).endOf('quarter').dayOfYear() - moment(date).startOf('quarter').dayOfYear()\r\n // percent_complete = 1.0 * start / ending;\r\n // break;\r\n // case 'year':\r\n // }\r\n }\r\n\r\n $scope.$watch(\"vm.onTimePercentage.switch\", function(){\r\n /*Updated by Abheesh - Swap type*/\r\n vm.onTimePercentage.version = vm.onTimePercentage.switch ? \"ontime\" : \"ontime\";}, true);\r\n\r\n function onTimePercentageSwap(type) {\r\n vm.onTimePercentage.version = type;\r\n }\r\n\r\n\r\n function loadOnTimePercentage(dateTo, group) {\r\n vm.onTimePercentage.period[group].dateTo = dateTo;\r\n if (onTimePercentageTimeout[group]) {\r\n onTimePercentageTimeout[group].promise.finally(function() {\r\n doLoadOnTimePercentage(dateTo, group);\r\n vm.onTimePercentage.data[group].isLoaded = false;\r\n // because our loadmask has a fade, if we don't do this, we don't\r\n // end up with a loadmask if we've actually cancelled it.\r\n // 600 is to be longer than the .5s fade\r\n $timeout(function() {\r\n vm.onTimePercentage.data[group].isLoaded = false;\r\n $scope.$apply();\r\n }, 600);\r\n });\r\n onTimePercentageTimeout[group].resolve();\r\n }\r\n else {\r\n vm.onTimePercentage.data[group].isLoaded = false;\r\n doLoadOnTimePercentage(dateTo, group);\r\n }\r\n }\r\n\r\n function doLoadOnTimePercentage(dateTo, group) {\r\n onTimePercentageTimeout[group] = $q.defer();\r\n DashboardCslService.loadOnTimePercentage(dateTo, group, onTimePercentageTimeout[group]).then(function(data) {\r\n var d = new moment(data.current.date_from);\r\n vm.onTimePercentage.period[group].dateFrom = d.format(vm.momentDateFormat);\r\n vm.onTimePercentage.loadData(group, data);\r\n onTimePercentageTimeout[group] = false;\r\n }, function() {\r\n vm.onTimePercentage.loadData(group, null);\r\n });\r\n }\r\n\r\n $scope.$on('$destroy', cancelRequests);\r\n $rootScope.$on('user:logout', cancelRequests);\r\n function cancelRequests() {\r\n angular.forEach(Object.keys(spendingOverTimeTimeout), function(k) {\r\n if (spendingOverTimeTimeout[k]) spendingOverTimeTimeout[k].resolve();\r\n });\r\n angular.forEach(Object.keys(onTimePercentageTimeout), function(k) {\r\n if (onTimePercentageTimeout[k]) onTimePercentageTimeout[k].resolve();\r\n });\r\n angular.forEach(Object.keys(lanePairsTimeout), function(k) {\r\n if (lanePairsTimeout[k]) lanePairsTimeout[k].resolve();\r\n });\r\n }\r\n\r\n\r\n\r\n //----------------\r\n // Custom Date Ranges\r\n //----------------\r\n var activeWidgetRange = false;\r\n function setCustomRange(widget) {\r\n activeWidgetRange = widget;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n parent: angular.element(document.body),\r\n templateUrl: '/app/components/widgets/custom-end-date.html',\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n }).then(function() {\r\n activeWidgetRange = false;\r\n });\r\n $scope.activeModal = activeWidgetRange;\r\n }\r\n\r\n function setEndDate(startDate, endDate) {\r\n var dateTo = $filter(\"date\")(endDate, 'yyyy-MM-dd', \"UTC\");\r\n closeModal();\r\n if (activeWidgetRange == 'lane-pairs') {\r\n var dateFrom = vm.params.due_date_from ? vm.params.due_date_from :\r\n $location.search()['dateFrom'] ? $location.search()['dateFrom'] : false;\r\n vm.widgetHasCustomRange.lanePairs = true;\r\n vm.shipmentVolVsCountSettings.isLanePairLoaded = false;\r\n vm.shipmentVolVsCountSettings.isLanePairData = false;\r\n vm.shipmentVolVsCountSettings.isLanePairFirstLoad = true;\r\n loadLanePairs(dateFrom, dateTo, 'week', true);\r\n loadLanePairs(dateFrom, dateTo, 'month', true);\r\n loadLanePairs(dateFrom, dateTo, 'quarter', true);\r\n loadLanePairs(dateFrom, dateTo, 'year', true);\r\n }\r\n else if (activeWidgetRange == 'on-time-percentage') {\r\n vm.widgetHasCustomRange.onTimePercentage = true;\r\n loadOnTimePercentage(dateTo, 'week');\r\n loadOnTimePercentage(dateTo, 'month');\r\n loadOnTimePercentage(dateTo, 'quarter');\r\n loadOnTimePercentage(dateTo, 'year');\r\n }\r\n\r\n }\r\n\r\n function resetCustomRange(widget) {\r\n if (widget == 'lane-pairs') {\r\n vm.widgetHasCustomRange.lanePairs = false;\r\n vm.shipmentVolVsCountSettings.isLanePairLoaded = false;\r\n vm.shipmentVolVsCountSettings.isLanePairData = false;\r\n vm.shipmentVolVsCountSettings.isLanePairFirstLoad = true;\r\n loadDefaultLanePairs();\r\n }\r\n else if (widget == 'on-time-percentage') {\r\n vm.widgetHasCustomRange.onTimePercentage = false;\r\n loadDefaultOnTimePercentage();\r\n }\r\n else if (widget == 'spend-over-time') {\r\n vm.widgetHasCustomRange.spendOverTime = false;\r\n loadDefaultSpendingOverTime();\r\n }\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.hide();\r\n }\r\n\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name DashboardService\r\n *\r\n * @description The DashboardService module communciates with the Rails API to\r\n * procure widget data\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadActiveShipments\r\n * @description queries the API for active shipment counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedActiveShipments\r\n * @description returns whether or not the DashboardService has cached active shipment data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedActiveShipments\r\n * @description returns the currently cached active shipment data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadCurrentExceptions\r\n * @description queries the API for current exceptions counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedCurrentlExceptions\r\n * @description returns whether or not the DashboardService has cached current exception data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedCurrentExceptions\r\n * @description returns the currently cached current exception data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadPotentialExceptions\r\n * @description queries the API for potential exceptions counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedPotentialExceptions\r\n * @description returns whether or not the DashboardService has cached potential exception data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedPotentialExceptions\r\n * @description returns the currently cached potential exception data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.loadSpendingOverTime(dateFrom, dateTo, group [, timeoutPromise])\r\n * @description queries the API for spending over time\r\n * @param dateFrom - the date to start from (beginning of day)\r\n * @param dateTo - the date to end with (end of day)\r\n * @param group - what to group by [week, month, quarter, year]\r\n * @param timeoutPromise - [optional] a promise that can be resolved to cancel the request\r\n * @return object\r\n * <code>\r\n * {\r\n * group_by: string,\r\n * groups: object\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedSpendingOverTime\r\n * @description returns whether or not the DashboardService has cached spending over time data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedSpendingOverTime\r\n * @description returns the currently cached spending over time data\r\n * @return object\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.loadOnTimePercentage(dateTo, group [, timeoutPromise])\r\n * @description queries the API for spending over time\r\n * @param dateTo - the date to end with (end of day). dateFrom is inferred by the server\r\n * @param group - what to group by [week, month, quarter, year]\r\n * @param timeoutPromise - [optional] a promise that can be resolved to cancel the request\r\n * @return object\r\n * <code>\r\n * {\r\n * group_by: string,\r\n * current: {\r\n * \ttotal: int,\r\n * \tontime: int,\r\n * \tdate_from: date,\r\n * \tdate_to: date\r\n * },\r\n * previous: {\r\n * \ttotal: int,\r\n * \tontime: int,\r\n * \tdate_from: date,\r\n * \tdate_to: date\r\n * },\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedOnTimePercentage\r\n * @description returns whether or not the DashboardService has cached on time percentage data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedOnTimePercntage\r\n * @description returns the currently cached on time percentage data. Note that this may not\r\n * have data for all periods\r\n * @return object\r\n * visible\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .service('dashboardCmtsService', dashboardCmtsService)\r\n .constant(\"DASHBOARD\", {\r\n \"TIMEOUT\": \"120000\",\r\n \"SERVER_ERROR\": \"An error occurred while loading the data\"\r\n });\r\n\r\n /** @ngInject */\r\n dashboardCmtsService.$inject = ['$http', 'api', '$q', '$filter', '$rootScope', '$timeout', \"DASHBOARD\", \"AJAX\", \"UserService\"];\r\n function dashboardCmtsService($http, api, $q, $filter, $rootScope, $timeout, DASHBOARD, AJAX, UserService) {\r\n var cachedActiveShipments = false,\r\n cachedCurrentExceptions = false,\r\n loadingExistParam = false,\r\n searchParams = {},\r\n tlp = {all:[], sea:[], air:[], ground:[]};\r\n\r\n\r\n //['all', 'air', 'sea', 'ground'].map(function(d){topLanePairs[d] = angular.copy(lanePair);});\r\n\r\n function buildQuery(){\r\n var query = [];\r\n for (var key in searchParams){\r\n query.push(key+\"=\"+searchParams[key]);\r\n }\r\n var params=\"?\";\r\n\r\n if(localStorage.customerType == 'cmts') {\r\n\r\n if (localStorage.switchEmailCmtsType) {\r\n params += \"userEmail=\" + localStorage.switchEmailCmtsType + \"&customer_type=\" + localStorage.customerType + \"&\";\r\n } else if (localStorage.userCompanyCmts) {\r\n params += \"userCompany=\" + encodeURIComponent(localStorage.userCompanyCmts) + \"&customer_type=\" + localStorage.customerType + \"&\";\r\n } else if (localStorage.userDepartmentCmts) {\r\n params += \"userDepartment=\" + encodeURIComponent(localStorage.userDepartmentCmts) + \"&departmentCompanyId=\" + localStorage.userDepartmentCompanyCmts + \"&customer_type=\" + localStorage.customerType + \"&\";\r\n } else if (localStorage.dummyUser) {\r\n params += \"dummyUserEmail=\" + encodeURIComponent(localStorage.dummyUser) + \"&customer_type=\" + localStorage.customerType + \"&\";\r\n }\r\n }\r\n else{\r\n params +=\"customer_type=cmts&\";\r\n }\r\n\r\n\r\n if (query.length > 0){\r\n return params+query.join('&');\r\n } else {\r\n if(params == \"?\"){return \"\";}\r\n else{ return params; }\r\n\r\n }\r\n }\r\n\r\n\r\n\r\n return {\r\n foo: function(){return \"bar\";},\r\n setSearchParams: function(params){ searchParams = params;},\r\n getLegend: function(){\r\n return legend;\r\n },\r\n\r\n\r\n invalidateCache: function(){\r\n\r\n return $http.get(api.url_v2 + '/widgets/invalidate_cache', {timeout: AJAX.TIMEOUT});\r\n },\r\n\r\n\r\n //-------------------------\r\n // Active Shipments\r\n //-------------------------\r\n loadActiveShipments: function(){\r\n\r\n var date_from = moment().toDate();\r\n\r\n var promise = $http.get(api.url_v2 + '/widgets_cmts/active_shipments'+buildQuery()).then(\r\n function successCallback(response) {\r\n loadingExistParam = true;\r\n cachedActiveShipments = response.data;\r\n $rootScope.$broadcast(\"currentShipmentsLoading\", loadingExistParam);\r\n return response;\r\n }, function errorCallback(response){\r\n return {error: DASHBOARD.SERVER_ERROR};\r\n });\r\n return promise;\r\n },\r\n getCachedActiveShipments: function() {\r\n return cachedActiveShipments;\r\n },\r\n hasCachedActiveShipments: function() {\r\n return !!cachedActiveShipments;\r\n },\r\n\r\n //-------------------------\r\n // Current Exceptions\r\n //-------------------------\r\n loadCurrentExceptions: function(){\r\n var promise = $http.get(api.url_v2 + '/widgets_cmts/current_exceptions'+buildQuery()).then(function(response) {\r\n loadingExistParam = true;\r\n cachedCurrentExceptions =response.data;\r\n $rootScope.$broadcast(\"currentCmtsExceptionLoading\", loadingExistParam);\r\n return response;\r\n }, function errorCallback(response){\r\n return {error: DASHBOARD.SERVER_ERROR};\r\n });\r\n return promise;\r\n },\r\n getCachedCurrentExceptions: function() {\r\n return cachedCurrentExceptions;\r\n },\r\n hasCachedCurrentExceptions: function() {\r\n return !!cachedCurrentExceptions;\r\n }\r\n\r\n\r\n }; // End Service Return\r\n } // End Service\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name DashboardCmtsController\r\n *\r\n * @description The DashboardCmtsController module interfaces with the user dashboard\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .run(['$anchorScroll', function($anchorScroll) {\r\n $anchorScroll.yOffset = 90; // account for top nav when scrolling\r\n }])\r\n .animation('.progress-bar', ['$animateCss', function($animateCss){\r\n return {\r\n enter: function(element, doneFn){\r\n var ewidth = element[0].width;\r\n return $animateCss(element, {\r\n from: {width: '0px'},\r\n to: {width: ewidth},\r\n duration: 100\r\n });\r\n }\r\n }\r\n }])\r\n .controller('DashboardCmtsController', DashboardCmtsController)\r\n\r\n /** @ngInject */\r\n DashboardCmtsController.$inject = ['dashboardCmtsService', '$window', '$anchorScroll', 'UserService', 'AdvSearchCmtsService', '$log', '$scope', '$timeout', '$location', '$filter', '$q', '$state', '$mdDialog', '$mdMedia', '$rootScope', '$animateCss', 'permissions', 'fivedayCmtsService'];\r\n function DashboardCmtsController(dashboardCmtsService, $window, $anchorScroll, UserService, AdvSearchCmtsService, $log, $scope, $timeout, $location, $filter, $q, $state, $mdDialog, $mdMedia, $rootScope, $animateCss, permissions, fivedayCmtsService) {\r\n var vm = this;\r\n\r\n var scrollEvt = false\r\n $(window).on( 'scroll', function(event){\r\n if(!scrollEvt){\r\n $window.scrollTo(0, 0);\r\n }\r\n scrollEvt = true\r\n });\r\n\r\n fivedayCmtsService.getAllStateCode();\r\n\r\n /*vm.today_date = moment(new Date()).format(\"MMM DD YYYY\");\r\n vm.week_start_day = moment(new Date()).startOf('week').format('MMM DD YYYY');\r\n vm.week_end_day = moment(new Date()).endOf('week').format('MMM DD YYYY');*/\r\n\r\n vm.today_date = moment(new Date()).format(\"YYYY-MM-DD\");\r\n vm.week_start_day = moment(new Date()).startOf('week').format('YYYY-MM-DD');\r\n vm.week_end_day = moment(new Date()).endOf('week').format('YYYY-MM-DD');\r\n\r\n /* vm.donut_query = {\r\n 'Today':'shipment_deliveryeta_date_equal_to='+vm.today_date,\r\n 'Current Week': 'shipment_deliveryeta_date_range_to='+vm.week_start_day+' and '+vm.week_end_day\r\n }*/\r\n\r\n vm.donut_query = {\r\n 'TL':\"transport_mode_name=TL\",\r\n 'LTL': \"transport_mode_name=LTL\"\r\n }\r\n\r\n vm.showLoading = false; //flag that shows the loading or not\r\n vm.params = {};\r\n vm.hardRefresh = hardRefresh;\r\n vm.backLink = \"\";\r\n vm.largeDonutNumbers = false;\r\n vm.configuration = 'a';\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n vm.widgetHasCustomRange = {\r\n onTimePercentage: false,\r\n spendOverTime: false,\r\n lanePairs: false\r\n };\r\n vm.lanePairsDateTo = false;\r\n vm.momentDateFormat = 'YYYY-MM-DD';\r\n\r\n if ($state.current.name === 'dashboardCmts'){\r\n localStorage.setItem('demoTypeDefault','cmts');\r\n }\r\n\r\n vm.donutNums = {\r\n 'currentExceptionNum': false,\r\n 'activeShipmentsNum': false\r\n };\r\n\r\n $rootScope.$on(\"currentShipmentsLoading\", function(event, value) {\r\n vm.currentShipmentsLoading = value;\r\n });\r\n\r\n $rootScope.$on(\"currentCmtsExceptionLoading\", function(event, value) {\r\n vm.currentExceptionLoading = value;\r\n });\r\n\r\n /* Custom Visualization Form */\r\n if ($state.current.name === 'visualize'){\r\n var searchFields = angular.copy(AdvSearchCmtsService.getCurrentSearchFields());\r\n for (var p in $state.params){\r\n if ($state.params[p] !== undefined){\r\n vm.params[p] = $state.params[p];\r\n searchFields[p].value = $state.params[p];\r\n }\r\n }\r\n vm.backLink = $location.url().replace('track-trace/viz', 'track-trace');\r\n dashboardCmtsService.setSearchParams(vm.params);\r\n AdvSearchCmtsService.setCurrentSearchFields(searchFields);\r\n vm.query = AdvSearchCmtsService.getCurrentSearch();\r\n $scope.$watch('vm.query', function(){\r\n dashboardCmtsService.setSearchParams(vm.query);\r\n }, true);\r\n }\r\n\r\n d3.json('/assets/json/world-50m.json', function(err, world){\r\n if(err) throw err;\r\n $scope.$apply(function(){\r\n $scope.land = topojson.feature(world, world.objects.countries);\r\n $scope.boundary = topojson\r\n .mesh(world, world.objects.countries, function(a, b) { return a !== b; });\r\n });\r\n });\r\n\r\n /* functions */\r\n vm.showLoading = showLoading;\r\n vm.hideLoading = hideLoading;\r\n vm.getCmtsDashboard = getCmtsDashboard;\r\n vm.setCustomRange = setCustomRange;\r\n vm.closeModal = closeModal;\r\n vm.keyHandler = keyHandler;\r\n vm.showModal = showModal;\r\n\r\n function showModal(modal) {\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/dashboard/modals/' + modal + '.modal.html',\r\n clickOutsideToClose: true,\r\n parent: angular.element(document.body),\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function getCmtsDashboard(){\r\n var groups = UserService.getUserData().groups;\r\n if (groups){\r\n groups.map(function(group){\r\n if (group.data.dashboard_config){\r\n vm.configuration = group.data.dashboard_config;\r\n }\r\n });\r\n }\r\n return \"/app/dashboard/cmts/configurations/version-\" + vm.configuration + \".html\";\r\n }\r\n\r\n\r\n function keyHandler(keyCodeString){\r\n var hardRefreshCodes = ['116-shiftKey', '82-metaKey-shiftKey', '116-ctrlKey'];\r\n if (hardRefreshCodes.includes(keyCodeString)) {\r\n event.preventDefault();\r\n hardRefresh();\r\n\r\n }\r\n\r\n }\r\n\r\n function hardRefresh(){\r\n\r\n dashboardCmtsService.invalidateCache().finally(function(){\r\n location.reload(true);\r\n });\r\n }\r\n\r\n\r\n //used to show the test loading\r\n function showLoading() {\r\n vm.showLoading = true;\r\n }\r\n\r\n function hideLoading() {\r\n vm.showLoading = false;\r\n }\r\n\r\n //------------\r\n // Active Shipments\r\n //------------\r\n loadDonutWidget('activeShipments');\r\n loadDonutWidget('currentExceptions');\r\n\r\n //------------\r\n // Donut Widgets\r\n //------------\r\n function loadDonutWidget(name) {\r\n\r\n var donut_data = {\r\n icons: {'FullTruckLoad':'', 'LessThanTruckLoad':''},\r\n activeShipments: {'FullTruckLoad':'md-success-2', 'LessThanTruckLoad':'md-success'},\r\n currentExceptions: {'FullTruckLoad':'md-danger-2', 'LessThanTruckLoad':'md-danger'}\r\n };\r\n var capName = name.substring(0, 1).toUpperCase() + name.substring(1);\r\n vm[name + 'Loaded'] = false;\r\n vm['is' + capName + 'FirstLoad'] = !dashboardCmtsService['hasCached' + capName]();\r\n if (vm['is' + capName + 'FirstLoad']) {\r\n vm[name] = getCounts(null, name);\r\n }\r\n else {\r\n var data = dashboardCmtsService['getCached' + capName]();\r\n vm[name] = getCounts(data, name);\r\n }\r\n\r\n vm[name + 'Control'] = {\r\n onClick: function(type) {\r\n\r\n var url = \"/track-trace-cmts?status=undelivered\",\r\n params = {status: 0};\r\n switch (name) {\r\n case 'currentExceptions':\r\n url += \"¤t_exception=1\";\r\n break;\r\n }\r\n if (type) {\r\n params.business_type_group = type;\r\n }\r\n $scope.$apply(function() {\r\n window.location.href = url; //.search(params);\r\n });\r\n }\r\n };\r\n\r\n vm[name + 'SegmentClassMap'] = {'TL': false,'LTL': false, 'Pick Up': false, 'Delivery': false, 'ground': false };\r\n\r\n dashboardCmtsService['load' + capName]().then(\r\n function(response) {\r\n vm.donutNums[name+'Num'] = false;\r\n vm.largeDonutNumbers = false;\r\n vm[name + 'Loaded'] = true;\r\n vm['is' + capName + 'FirstLoad'] = false;\r\n if (response.error){\r\n vm[name + 'Error'] = response.error;\r\n } else {\r\n var data = response.data;\r\n vm[name] = getCounts(data, name);\r\n if (data.TL > 999 || data.LTL > 999) {\r\n vm.donutNums[name+'Num'] = true;\r\n }\r\n if (vm.donutNums['currentExceptionsNum'] || vm.donutNums['activeShipmentsNum']) {\r\n vm.largeDonutNumbers = true;\r\n }\r\n }\r\n },\r\n function(error) {\r\n vm[name + 'Loaded'] = true;\r\n vm['is' + capName + 'FirstLoad'] = false;\r\n vm.error = error.message;\r\n }\r\n );\r\n\r\n function getCounts(_data, name){\r\n var isData = !!_data, dd = donut_data;\r\n //if(name == 'activeShipments'){\r\n\r\n return [\r\n {type: 'TL', shipments: isData ? _data.TL : 0, color: dd[name].FullTruckLoad, icon: dd.icons.FullTruckLoad},\r\n {type: 'LTL', shipments: isData ? _data.LTL : 0, color: dd[name].LessThanTruckLoad, icon: dd.icons.LessThanTruckLoad}\r\n ];\r\n }\r\n }\r\n\r\n //----------------\r\n // Custom Date Ranges\r\n //----------------\r\n var activeWidgetRange = false;\r\n function setCustomRange(widget) {\r\n activeWidgetRange = widget;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n parent: angular.element(document.body),\r\n templateUrl: '/app/components/widgets/custom-end-date.html',\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n }).then(function() {\r\n activeWidgetRange = false;\r\n });\r\n $scope.activeModal = activeWidgetRange;\r\n }\r\n\r\n\r\n function closeModal() {\r\n $mdDialog.hide();\r\n }\r\n\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name DashboardService\r\n *\r\n * @description The DashboardService module communciates with the Rails API to\r\n * procure widget data\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadActiveShipments\r\n * @description queries the API for active shipment counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedActiveShipments\r\n * @description returns whether or not the DashboardService has cached active shipment data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedActiveShipments\r\n * @description returns the currently cached active shipment data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadCurrentExceptions\r\n * @description queries the API for current exceptions counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedCurrentlExceptions\r\n * @description returns whether or not the DashboardService has cached current exception data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedCurrentExceptions\r\n * @description returns the currently cached current exception data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadPotentialExceptions\r\n * @description queries the API for potential exceptions counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedPotentialExceptions\r\n * @description returns whether or not the DashboardService has cached potential exception data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedPotentialExceptions\r\n * @description returns the currently cached potential exception data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.loadSpendingOverTime(dateFrom, dateTo, group [, timeoutPromise])\r\n * @description queries the API for spending over time\r\n * @param dateFrom - the date to start from (beginning of day)\r\n * @param dateTo - the date to end with (end of day)\r\n * @param group - what to group by [week, month, quarter, year]\r\n * @param timeoutPromise - [optional] a promise that can be resolved to cancel the request\r\n * @return object\r\n * <code>\r\n * {\r\n * group_by: string,\r\n * groups: object\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedSpendingOverTime\r\n * @description returns whether or not the DashboardService has cached spending over time data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedSpendingOverTime\r\n * @description returns the currently cached spending over time data\r\n * @return object\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.loadOnTimePercentage(dateTo, group [, timeoutPromise])\r\n * @description queries the API for spending over time\r\n * @param dateTo - the date to end with (end of day). dateFrom is inferred by the server\r\n * @param group - what to group by [week, month, quarter, year]\r\n * @param timeoutPromise - [optional] a promise that can be resolved to cancel the request\r\n * @return object\r\n * <code>\r\n * {\r\n * group_by: string,\r\n * current: {\r\n * \ttotal: int,\r\n * \tontime: int,\r\n * \tdate_from: date,\r\n * \tdate_to: date\r\n * },\r\n * previous: {\r\n * \ttotal: int,\r\n * \tontime: int,\r\n * \tdate_from: date,\r\n * \tdate_to: date\r\n * },\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedOnTimePercentage\r\n * @description returns whether or not the DashboardService has cached on time percentage data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedOnTimePercntage\r\n * @description returns the currently cached on time percentage data. Note that this may not\r\n * have data for all periods\r\n * @return object\r\n * visible\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .service('dashboardCfsService', dashboardCfsService)\r\n .constant(\"DASHBOARD\", {\r\n \"TIMEOUT\": \"120000\",\r\n \"SERVER_ERROR\": \"An error occurred while loading the data\"\r\n });\r\n\r\n /** @ngInject */\r\n dashboardCfsService.$inject = ['$http', 'api', '$q', '$filter', '$rootScope', '$timeout', \"DASHBOARD\", \"AJAX\", \"UserService\"];\r\n function dashboardCfsService($http, api, $q, $filter, $rootScope, $timeout, DASHBOARD, AJAX, UserService) {\r\n var cachedActiveShipments = false,\r\n cachedCurrentExceptions = false,\r\n cachedPotentialExceptions = false,\r\n loadingExistParam = false,\r\n cachedLanePairs = {week: false, month: false, quarter: false, year: false},\r\n cachedSpendingOverTime = {},\r\n cachedOnTimePercentage = {},\r\n searchParams = {},\r\n tlp = {all:[], sea:[], air:[], ground:[]};\r\n var topLanePairs = {\r\n week: angular.copy(tlp),\r\n month: angular.copy(tlp),\r\n quarter: angular.copy(tlp),\r\n year: angular.copy(tlp),\r\n weekLoaded: false,\r\n monthLoaded: false,\r\n quarterLoaded: false,\r\n yearLoaded: false\r\n };\r\n var pins = {\r\n week: angular.copy(tlp),\r\n month: angular.copy(tlp),\r\n quarter: angular.copy(tlp),\r\n year: angular.copy(tlp),\r\n };\r\n //['all', 'air', 'sea', 'ground'].map(function(d){topLanePairs[d] = angular.copy(lanePair);});\r\n\r\n function buildQuery(){\r\n var query = [];\r\n for (var key in searchParams){\r\n query.push(key+\"=\"+searchParams[key]);\r\n }\r\n var params=\"?\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"userEmail=\"+localStorage.switchEmail+\"&\";\r\n // }else if(localStorage.userCompany){\r\n // params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompany)+\"&\";\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&\";\r\n // }\r\n\r\n\r\n if(localStorage.customerType == 'cfs'){\r\n\r\n if(localStorage.switchEmailCfsType){\r\n params +=\"userEmail=\"+localStorage.switchEmailCfsType+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userCompanyCfs){\r\n params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userDepartmentCfs){\r\n params +=\"userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCfs)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCfs+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.dummyUser){\r\n params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }\r\n\r\n }else{\r\n params +=\"customer_type=cfs&\";\r\n }\r\n\r\n\r\n if (query.length > 0){\r\n return params+query.join('&');\r\n } else {\r\n if(params == \"?\"){return \"\";}\r\n else{ return params; }\r\n\r\n }\r\n }\r\n\r\n\r\n\r\n return {\r\n foo: function(){return \"bar\";},\r\n setSearchParams: function(params){ searchParams = params;},\r\n getLanePairs: function(period){\r\n return topLanePairs[period];},\r\n getLegend: function(){\r\n return legend;\r\n },\r\n getPins: function(group){\r\n return pins[group];\r\n },\r\n\r\n invalidateCache: function(){\r\n\r\n return $http.get(api.url_v2 + '/widgets/invalidate_cache', {timeout: AJAX.TIMEOUT});\r\n },\r\n\r\n\r\n //-------------------------\r\n // Active Shipments\r\n //-------------------------\r\n loadActiveShipments: function(){\r\n\r\n var date_from = moment().toDate();\r\n\r\n var promise = $http.get(api.url_v2 + '/widgets_cfs/active_shipments'+buildQuery()).then(\r\n function successCallback(response) {\r\n loadingExistParam = true;\r\n cachedActiveShipments = response.data;\r\n $rootScope.$broadcast(\"currentShipmentsLoading\", loadingExistParam);\r\n return response;\r\n }, function errorCallback(response){\r\n return {error: DASHBOARD.SERVER_ERROR};\r\n });\r\n return promise;\r\n },\r\n getCachedActiveShipments: function() {\r\n return cachedActiveShipments;\r\n },\r\n hasCachedActiveShipments: function() {\r\n return !!cachedActiveShipments;\r\n },\r\n\r\n //-------------------------\r\n // Current Exceptions\r\n //-------------------------\r\n loadCurrentExceptions: function(){\r\n //var promise = $http.get(api.url + '/widgets_cfs/current_exceptions').then(function(response) {\r\n var promise = $http.get(api.url_v2 + '/widgets_cfs/current_exceptions'+buildQuery()).then(function(response) {\r\n loadingExistParam = true;\r\n cachedCurrentExceptions = response.data;\r\n $rootScope.$broadcast(\"currentCfsExceptionLoading\", loadingExistParam);\r\n return response;\r\n }, function errorCallback(response){\r\n return {error: DASHBOARD.SERVER_ERROR};\r\n });\r\n return promise;\r\n },\r\n getCachedCurrentExceptions: function() {\r\n return cachedCurrentExceptions;\r\n },\r\n hasCachedCurrentExceptions: function() {\r\n return !!cachedCurrentExceptions;\r\n },\r\n\r\n\r\n getCachedPotentialExceptions: function() {\r\n return cachedPotentialExceptions;\r\n },\r\n hasCachedPotentialExceptions: function() {\r\n return !!cachedPotentialExceptions;\r\n },\r\n\r\n\r\n getCachedSpendingOverTime: function() {\r\n return cachedSpendingOverTime;\r\n },\r\n hasCachedSpendingOverTime: function() {\r\n return !!cachedSpendingOverTime;\r\n },\r\n\r\n //-------------------------\r\n // Spend Over Time\r\n //-------------------------\r\n loadOnTimePercentage: function(dateTo, group, timeoutPromise) {\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n var timeoutId = false;\r\n var query = buildQuery();\r\n query = query ? (query + 'date_to='+dateTo+'&group_by='+group) :\r\n ('?date_to='+dateTo+'&group_by='+group);\r\n\r\n\r\n\r\n var promise = $http.get(api.url_v2 + '/widgets_cfs/ontime_percentage'+query)\r\n .then(function(response) {\r\n cachedOnTimePercentage[group] = response.data;\r\n return response.data;\r\n });\r\n timeoutId = $timeout(function() {\r\n if (timeoutPromise) timeoutPromise.resolve();\r\n timeoutId = false;\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n },\r\n getCachedOnTimePercentage: function() {\r\n return cachedOnTimePercentage;\r\n },\r\n hasCachedOnTimePercentage: function() {\r\n return !!cachedOnTimePercentage;\r\n },\r\n\r\n hasCachedLanePairs: function(group){\r\n return !!cachedLanePairs[group];\r\n }\r\n\r\n\r\n }; // End Service Return\r\n } // End Service\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name DashboardCfsController\r\n *\r\n * @description The DashboardCfsController module interfaces with the user dashboard\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .run(['$anchorScroll', function($anchorScroll) {\r\n $anchorScroll.yOffset = 90; // account for top nav when scrolling\r\n }])\r\n .animation('.progress-bar', ['$animateCss', function($animateCss){\r\n return {\r\n enter: function(element, doneFn){\r\n var ewidth = element[0].width;\r\n return $animateCss(element, {\r\n from: {width: '0px'},\r\n to: {width: ewidth},\r\n duration: 100\r\n });\r\n }\r\n }\r\n }])\r\n .controller('DashboardCfsController', DashboardCfsController)\r\n\r\n /** @ngInject */\r\n DashboardCfsController.$inject = ['dashboardCfsService', '$window', '$anchorScroll', 'UserService', 'AdvSearchCfsService', '$log', '$scope', '$timeout', '$location', '$filter', '$q', '$state', '$mdDialog', '$mdMedia', '$rootScope', '$animateCss', 'permissions', 'fivedayCfsService'];\r\n function DashboardCfsController(dashboardCfsService, $window, $anchorScroll, UserService, AdvSearchCfsService, $log, $scope, $timeout, $location, $filter, $q, $state, $mdDialog, $mdMedia, $rootScope, $animateCss, permissions, fivedayCfsService) {\r\n var vm = this;\r\n\r\n var scrollEvt = false\r\n $(window).on( 'scroll', function(event){\r\n if(!scrollEvt){\r\n $window.scrollTo(0, 0);\r\n }\r\n scrollEvt = true\r\n });\r\n\r\n fivedayCfsService.getAllStateCode();\r\n\r\n /*vm.today_date = moment(new Date()).format(\"MMM DD YYYY\");\r\n vm.week_start_day = moment(new Date()).startOf('week').format('MMM DD YYYY');\r\n vm.week_end_day = moment(new Date()).endOf('week').format('MMM DD YYYY');*/\r\n\r\n vm.today_date = moment(new Date()).format(\"YYYY-MM-DD\");\r\n vm.week_start_day = moment(new Date()).startOf('week').format('YYYY-MM-DD');\r\n vm.week_end_day = moment(new Date()).endOf('week').format('YYYY-MM-DD');\r\n\r\n /* vm.donut_query = {\r\n 'Today':'shipment_deliveryeta_date_equal_to='+vm.today_date,\r\n 'Current Week': 'shipment_deliveryeta_date_range_to='+vm.week_start_day+' and '+vm.week_end_day\r\n }*/\r\n\r\n vm.donut_query = {\r\n 'Truckload':\"shipment_type=TL\",\r\n 'Local': \"shipment_type=LOCAL\",\r\n 'LTL': \"shipment_type=LTL\"\r\n }\r\n\r\n vm.showLoading = false; //flag that shows the loading or not\r\n vm.params = {};\r\n vm.hardRefresh = hardRefresh;\r\n vm.backLink = \"\";\r\n vm.largeDonutNumbers = false;\r\n vm.configuration = 'a';\r\n vm.onTimePercentageSwap = onTimePercentageSwap;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n vm.widgetHasCustomRange = {\r\n onTimePercentage: false,\r\n spendOverTime: false,\r\n lanePairs: false\r\n };\r\n vm.lanePairsDateTo = false;\r\n vm.momentDateFormat = 'YYYY-MM-DD';\r\n\r\n if ($state.current.name === 'dashboardCfs'){\r\n localStorage.setItem('demoTypeDefault','cfs');\r\n }\r\n\r\n vm.donutNums = {\r\n 'currentExceptionNum': false,\r\n 'activeShipmentsNum': false\r\n };\r\n\r\n $rootScope.$on(\"currentShipmentsLoading\", function(event, value) {\r\n vm.currentShipmentsLoading = value;\r\n });\r\n\r\n $rootScope.$on(\"currentCfsExceptionLoading\", function(event, value) {\r\n vm.currentExceptionLoading = value;\r\n });\r\n\r\n // ================================\r\n // Handle Timeouts\r\n // ================================\r\n var spendingOverTimeTimeout = {},\r\n onTimePercentageTimeout = {},\r\n lanePairsTimeout = {}; // used lower, prevents an undefined error by putting it here; // used lower, prevents an undefined error by putting it here\r\n\r\n $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams){\r\n cancelTimeouts(spendingOverTimeTimeout);\r\n cancelTimeouts(onTimePercentageTimeout);\r\n cancelTimeouts(lanePairsTimeout);\r\n });\r\n\r\n angular.element(function(){\r\n var otp = angular.element(document.querySelector('on-time-percentage'))[0]\r\n\r\n //Giving error in IE [offsetHeight]\r\n //otp.offsetHeight = otp.offsetWidth * 9 / 16;\r\n })\r\n function cancelTimeouts(timeoutHash){\r\n Object.keys(timeoutHash).map(function(timeoutkey){\r\n timeoutHash[timeoutkey].resolve(\"stateChanged\");\r\n })\r\n }\r\n\r\n /* Custom Visualization Form */\r\n if ($state.current.name === 'visualize'){\r\n var searchFields = angular.copy(AdvSearchCfsService.getCurrentSearchFields());\r\n for (var p in $state.params){\r\n if ($state.params[p] !== undefined){\r\n vm.params[p] = $state.params[p];\r\n searchFields[p].value = $state.params[p];\r\n }\r\n }\r\n vm.backLink = $location.url().replace('track-trace/viz', 'track-trace');\r\n dashboardCfsService.setSearchParams(vm.params);\r\n AdvSearchCfsService.setCurrentSearchFields(searchFields);\r\n vm.query = AdvSearchCfsService.getCurrentSearch();\r\n $scope.$watch('vm.query', function(){\r\n dashboardCfsService.setSearchParams(vm.query);\r\n }, true);\r\n }\r\n\r\n d3.json('/assets/json/world-50m.json', function(err, world){\r\n if(err) throw err;\r\n $scope.$apply(function(){\r\n $scope.land = topojson.feature(world, world.objects.countries);\r\n $scope.boundary = topojson\r\n .mesh(world, world.objects.countries, function(a, b) { return a !== b; });\r\n });\r\n });\r\n\r\n /* functions */\r\n vm.showLoading = showLoading;\r\n vm.hideLoading = hideLoading;\r\n vm.getAljexDashboard = getAljexDashboard;\r\n vm.setCustomRange = setCustomRange;\r\n vm.setEndDate = setEndDate;\r\n vm.closeModal = closeModal;\r\n vm.resetCustomRange = resetCustomRange;\r\n vm.displayDate = displayDate;\r\n vm.keyHandler = keyHandler;\r\n vm.showModal = showModal;\r\n\r\n function showModal(modal) {\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/dashboard/modals/' + modal + '.modal.html',\r\n clickOutsideToClose: true,\r\n parent: angular.element(document.body),\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function getAljexDashboard(){\r\n var groups = UserService.getUserData().groups;\r\n if (groups){\r\n groups.map(function(group){\r\n if (group.data.dashboard_config){\r\n vm.configuration = group.data.dashboard_config;\r\n }\r\n });\r\n }\r\n return \"/app/dashboard/cfs/configurations/version-\" + vm.configuration + \".html\";\r\n }\r\n\r\n //------------------------------------------\r\n // Shipping Volume and Count Tabs\r\n // //---------------------------------------\r\n vm.periods = [\r\n {label: 'WIDGETS.WEEK', field:'week'},\r\n {label: 'WIDGETS.MONTH', field:'month'},\r\n {label: 'WIDGETS.QUARTER', field:'quarter'},\r\n {label: 'WIDGETS.YEAR', field:'year'}\r\n ];\r\n\r\n vm.metric_types = [\r\n {label: 'WIDGETS.ALL', field:'all'},\r\n {label: 'WIDGETS.VOLUME', field:'volume'},\r\n {label: 'WIDGETS.COUNT', field:'count'}\r\n ];\r\n\r\n\r\n function keyHandler(keyCodeString){\r\n var hardRefreshCodes = ['116-shiftKey', '82-metaKey-shiftKey', '116-ctrlKey'];\r\n if (hardRefreshCodes.includes(keyCodeString)) {\r\n event.preventDefault();\r\n hardRefresh();\r\n\r\n }\r\n\r\n }\r\n\r\n function hardRefresh(){\r\n\r\n dashboardCfsService.invalidateCache().finally(function(){\r\n location.reload(true);\r\n });\r\n }\r\n\r\n\r\n //used to show the test loading\r\n function showLoading() {\r\n vm.showLoading = true;\r\n }\r\n\r\n function hideLoading() {\r\n vm.showLoading = false;\r\n }\r\n\r\n //------------\r\n // Active Shipments\r\n //------------\r\n loadDonutWidget('activeShipments');\r\n loadDonutWidget('currentExceptions');\r\n\r\n //------------\r\n // On-Time Percentage\r\n //------------\r\n vm.onTimePercentage = onTimePercentage();\r\n\r\n function loadDefaultOnTimePercentage() {\r\n\r\n var dateTo = vm.params.due_date_to ? vm.params.due_date_to :\r\n $location.search()['dateTo'] ? $location.search()['dateTo'] : $filter(\"date\")(new Date(), 'yyyy-MM-dd', \"UTC\");\r\n loadOnTimePercentage(dateTo, 'week');\r\n loadOnTimePercentage(dateTo, 'month');\r\n loadOnTimePercentage(dateTo, 'quarter');\r\n loadOnTimePercentage(dateTo, 'year');\r\n }\r\n loadDefaultOnTimePercentage();\r\n\r\n\r\n //------------\r\n // Donut Widgets\r\n //------------\r\n function loadDonutWidget(name) {\r\n\r\n // icons: {'Today':'', 'CurrentWeek':'', 'Scheduled':'', 'pickup': '', 'delivery': '', 'ground': ''},\r\n var donut_data = {\r\n icons: {'FullTruckLoad':'', 'RailInterModal':'', 'LessThanTruckLoad':'', 'pickup': '', 'delivery': '', 'ground': ''},\r\n activeShipments: {'FullTruckLoad':'md-success-2', 'RailInterModal':'md-success', 'LessThanTruckLoad':'md-success-3'},\r\n //currentExceptions: {'pickup':'md-danger-2', 'delivery':'md-danger-3'},\r\n currentExceptions: {'FullTruckLoad':'md-danger-2', 'RailInterModal':'md-danger', 'LessThanTruckLoad':'md-danger-3'},\r\n };\r\n var capName = name.substring(0, 1).toUpperCase() + name.substring(1);\r\n vm[name + 'Loaded'] = false;\r\n vm['is' + capName + 'FirstLoad'] = !dashboardCfsService['hasCached' + capName]();\r\n if (vm['is' + capName + 'FirstLoad']) {\r\n vm[name] = getCounts(null, name);\r\n }\r\n else {\r\n var data = dashboardCfsService['getCached' + capName]();\r\n vm[name] = getCounts(data, name);\r\n }\r\n\r\n vm[name + 'Control'] = {\r\n onClick: function(type) {\r\n\r\n var url = \"/track-trace-cfs?shipment_status=undelivered&page_from=aljex\",\r\n params = {status: 0};\r\n switch (name) {\r\n case 'currentExceptions':\r\n //params.current_exception = 1;\r\n url += \"¤t_exception=1\";\r\n break;\r\n case 'potentialExceptions':\r\n // params.potential_exception = 1;\r\n url += \"&potential_exception=1\";\r\n break;\r\n }\r\n if (type) {\r\n params.business_type_group = type;\r\n }\r\n $scope.$apply(function() {\r\n window.location.href = url; //.search(params);\r\n });\r\n }\r\n };\r\n\r\n vm[name + 'SegmentClassMap'] = {'Truckload': false, 'Local': false, 'LTL': false, 'Pick Up': false, 'Delivery': false, 'ground': false };\r\n\r\n dashboardCfsService['load' + capName]().then(\r\n function(response) {\r\n vm.donutNums[name+'Num'] = false;\r\n vm.largeDonutNumbers = false;\r\n vm[name + 'Loaded'] = true;\r\n vm['is' + capName + 'FirstLoad'] = false;\r\n if (response.error){\r\n vm[name + 'Error'] = response.error;\r\n } else {\r\n var data = response.data;\r\n vm[name] = getCounts(data, name);\r\n if (data.TL > 999 || data.LOCAL > 999 || data.LTL > 999) {\r\n vm.donutNums[name+'Num'] = true;\r\n }\r\n if (vm.donutNums['currentExceptionsNum'] || vm.donutNums['activeShipmentsNum']) {\r\n vm.largeDonutNumbers = true;\r\n }\r\n }\r\n },\r\n function(error) {\r\n vm[name + 'Loaded'] = true;\r\n vm['is' + capName + 'FirstLoad'] = false;\r\n vm.error = error.message;\r\n }\r\n );\r\n\r\n function getCounts(_data, name){\r\n var isData = !!_data, dd = donut_data;\r\n //if(name == 'activeShipments'){\r\n\r\n return [\r\n {type: 'Truckload', shipments: isData ? _data.TL : 0, color: dd[name].FullTruckLoad, icon: dd.icons.FullTruckLoad},\r\n {type: 'Local', shipments: isData ? _data.LOCAL : 0, color: dd[name].LessThanTruckLoad, icon: dd.icons.RailInterModal},\r\n {type: 'LTL', shipments: isData ? _data.LTL : 0, color: dd[name].RailInterModal, icon: dd.icons.LessThanTruckLoad}\r\n ];\r\n\r\n /*} if(name == 'currentExceptions'){\r\n\r\n return [\r\n {type: 'Pick Up', shipments: isData ? 0 : 0, color: dd[name].pickup, icon: dd.icons.pickup},\r\n {type: 'Delivery', shipments: isData ? 0 : 0, color: dd[name].delivery, icon: dd.icons.delivery},\r\n //{type: 'ground', shipments: isData ? 0 : 0, color: dd[name].ground, icon: dd.icons.ground}\r\n ];\r\n\r\n }*/\r\n }\r\n }\r\n\r\n function displayDateOnGraph(date, period){\r\n switch (period){\r\n case 'week':\r\n return moment(date).format('MMM')+'\\n' + moment(date).startOf(period).format('Do') + ' - ' + moment(date).endOf(period).format('Do');\r\n case 'month':\r\n\r\n return moment(date).format('MMM');//+'\\n'+moment(date).format('YYYY');\r\n case 'quarter':\r\n\r\n return moment(date).format('[Q]Q') + '\\n' + moment(date).format('YYYY');\r\n case 'year':\r\n return moment(date).format('YYYY');\r\n }\r\n }\r\n\r\n function displayDateRange(dateFrom, dateTo, period, otp){\r\n var format;\r\n switch (period){\r\n case 'week':\r\n format = \"MMM Do, YYYY\"\r\n break;\r\n case 'month':\r\n format = otp ? \"MMMM YYYY\" : \"MMM YYYY\";\r\n break;\r\n case 'quarter':\r\n format = otp ? \"MMM Do, YYYY\" : \"[Quarter] Q, YYYY\"\r\n break;\r\n case 'year':\r\n format = otp ? \"YYYY\" : \"MMM Do, YYYY\"\r\n break;\r\n }\r\n if (otp){\r\n switch (period){\r\n case 'month':\r\n return moment(dateTo).format(format);\r\n case 'year':\r\n return moment(dateTo).format(format);\r\n default:\r\n return moment(dateFrom).startOf(period).format(format) + ' - ' + moment(dateTo).endOf(period).format(format);\r\n }\r\n } else {\r\n if (period == 'week'){\r\n return moment(dateFrom).startOf(period).format(format) + ' - ' + moment(dateTo).format(format);\r\n } else {\r\n return moment(dateFrom).format(format) + ' - ' + moment(dateTo).format(format);\r\n }\r\n }\r\n }\r\n\r\n function displayDate(date){\r\n return moment(date).format(\"MMM D, YYYY\");\r\n }\r\n\r\n function parseFormattedDate(date, period){\r\n switch (period){\r\n case 'week':\r\n return moment(date, 'YYYY-WW');\r\n case 'month':\r\n return moment(date, 'YYYY-MM');\r\n case 'quarter':\r\n return moment(date.replace(/.{2}/,\"\"), 'YYYY-Q');\r\n case 'year':\r\n return moment(date, 'YYYY')\r\n }\r\n }\r\n\r\n //--------------------\r\n // On-Time Percentage\r\n //--------------------\r\n function onTimePercentage(){\r\n function def(){return {currentPercent: 0, previousPercent: 0, change: 0, percentage: 0, previousPercentage: 0, direction: \"\"}}\r\n var data = {\r\n week: {ontime: def(), adjusted_ontime: def(), isLoaded: false},\r\n month: {ontime: def(), adjusted_ontime: def(), isLoaded: false},\r\n quarter: {ontime: def(), adjusted_ontime: def(), isLoaded: false},\r\n year: {ontime: def(), adjusted_ontime: def(), isLoaded: false}\r\n };\r\n /* Functions and variables */\r\n var otp = {\r\n data: data,\r\n getChange: getChange,\r\n getDateFrom: getDateFrom,\r\n getDateRange: getDateRange,\r\n getDateTo: getDateTo,\r\n getDatePeriodTo: getDatePeriodTo,\r\n getDirection: getDirection,\r\n getPercentage: getPercentage,\r\n isLoaded: isLoaded,\r\n isNoPreviousData: isNoPreviousData,\r\n isNoCurrentData: isNoCurrentData,\r\n getDatePercentage: _getDatePercentage,\r\n loadData: loadData,\r\n selected: 'week',\r\n switch: false,\r\n tabs: angular.copy(vm.periods),\r\n tabSelected: tabSelected,\r\n version: 'ontime',\r\n fromLast: fromLast,\r\n noPreviousData: noPreviousData,\r\n noCurrentData: noCurrentData,\r\n period: {\r\n week:{},\r\n month:{},\r\n quarter:{},\r\n year:{}\r\n }\r\n };\r\n /* Load the data into the object */\r\n function loadData (period, _data){\r\n data[period].isLoaded = true;\r\n if (!_data){\r\n data[period].ontime.currentTotal = 0;\r\n data[period].adjusted_ontime.currentTotal = 0;\r\n return;\r\n }\r\n for (var field in {ontime:{}, adjusted_ontime:{}}){\r\n var d = data[period][field];\r\n d.currentPercent = Math.round( (_data.current[field] / Math.max(1, _data.current.total)) * 100 );\r\n d.previousPercent = Math.round( (_data.previous[field] / Math.max(1, _data.previous.total)) * 100 );\r\n d.change = Math.abs(Math.round( ((d.previousPercent - d.currentPercent) / Math.max(1, d.previousPercent)) * 100 ));\r\n d.percentage = parseInt(d.currentPercent);\r\n d.previousPercentage = parseInt(d.previousPercent);\r\n d.direction = d.currentPercent > d.previousPercent ? 'expand_less' : (d.currentPercent < d.previousPercent ? 'expand_more' : \"remove\");\r\n d.currentTotal = _data.current.total;\r\n d.previousTotal = _data.previous.total;\r\n d.currentOnTime = _data.current.ontime;\r\n d.previousOnTime = _data.previous.ontime;\r\n }\r\n }\r\n function _getDatePercentage() { return getDatePercentage(otp.getDateTo(), otp.selected); }\r\n function getDateFrom() { return getDatePeriod(otp.period[otp.selected].dateFrom, otp.selected, false); }\r\n function getDateRange() { return displayDateRange(otp.getDateFrom(), otp.getDateTo(), otp.selected, true); }\r\n function getDateTo() { return otp.period[otp.selected].dateTo; }\r\n function getDatePeriodTo() { return getDatePeriod(otp.period[otp.selected].dateTo, otp.selected, true); }\r\n function getPercentage() { return data[otp.selected][otp.version].percentage; }\r\n function getChange() { return data[otp.selected][otp.version].change; }\r\n function isNoPreviousData() { return data[otp.selected][otp.version].previousTotal === 0; }\r\n function isNoCurrentData() { return data[otp.selected][otp.version].currentTotal === 0; }\r\n function getDirection() { return data[otp.selected][otp.version].direction; }\r\n function tabSelected(tab) {\r\n otp.selected = tab.field;\r\n // debugger;\r\n // var element = angular.element(document.querySelector('.bar'))[0]\r\n // var animator = $animateCss(element, {\r\n // from: {width: 0},\r\n // to: {width: otp.getDatePercentage()}\r\n // });\r\n // animator.start();\r\n // .map(function(meter){\r\n // debugger;\r\n // meter.data(\"origWidth\", meter.width())\r\n // .width(0)\r\n // .animate({width: meter.data(\"origWidth\")}, 1200)\r\n // });\r\n }\r\n function isLoaded() { return data[otp.selected].isLoaded; }\r\n function fromLast() { return 'WIDGETS.FROM_LAST_' + otp.selected.toUpperCase(); }\r\n function noPreviousData() { return 'WIDGETS.NO_DATA_FOR_LAST_' + otp.selected.toUpperCase(); }\r\n function noCurrentData() { return \"WIDGETS.NO_DATA_FOR_CURRENT_\" + otp.selected.toUpperCase(); }\r\n return otp;\r\n }\r\n\r\n function getDatePercentage(date, period){\r\n var percent_complete = 0;\r\n\r\n switch (period){\r\n case 'week':\r\n\r\n percent_complete = moment(date).weekday() / 7.0;\r\n break;\r\n case 'month':\r\n\r\n percent_complete = 1.0 * moment(date).date() / moment(date).daysInMonth();\r\n break;\r\n case 'quarter':\r\n var start = moment(date).dayOfYear() - moment(date).startOf('quarter').dayOfYear(),\r\n ending = moment(date).endOf('quarter').dayOfYear() - moment(date).startOf('quarter').dayOfYear()\r\n percent_complete = 1.0 * start / ending;\r\n break;\r\n case 'year':\r\n percent_complete = moment(date).dayOfYear() / 365.0\r\n break;\r\n }\r\n return Math.round(percent_complete * 100)\r\n }\r\n\r\n function getDatePeriod(date, period, isEnd){\r\n return isEnd ? moment(date).endOf(period) : moment(date).startOf(period)\r\n // switch (period){\r\n // case 'week':\r\n // isEnd ? moment(date).endOf(period) : moment(date).startOf(period)\r\n // break;\r\n // case 'month':\r\n // percent_complete = 1.0 * moment(date).date() / moment(date).daysInMonth();\r\n // break;\r\n // case 'quarter':\r\n // var start = moment(date).dayOfYear() - moment(date).startOf('quarter').dayOfYear(),\r\n // ending = moment(date).endOf('quarter').dayOfYear() - moment(date).startOf('quarter').dayOfYear()\r\n // percent_complete = 1.0 * start / ending;\r\n // break;\r\n // case 'year':\r\n // }\r\n }\r\n\r\n $scope.$watch(\"vm.onTimePercentage.switch\", function(){\r\n /*Updated by Abheesh - Swap type*/\r\n vm.onTimePercentage.version = vm.onTimePercentage.switch ? \"ontime\" : \"ontime\";}, true);\r\n\r\n function onTimePercentageSwap(type) {\r\n vm.onTimePercentage.version = type;\r\n }\r\n\r\n\r\n function loadOnTimePercentage(dateTo, group) {\r\n vm.onTimePercentage.period[group].dateTo = dateTo;\r\n if (onTimePercentageTimeout[group]) {\r\n onTimePercentageTimeout[group].promise.finally(function() {\r\n doLoadOnTimePercentage(dateTo, group);\r\n vm.onTimePercentage.data[group].isLoaded = false;\r\n // because our loadmask has a fade, if we don't do this, we don't\r\n // end up with a loadmask if we've actually cancelled it.\r\n // 600 is to be longer than the .5s fade\r\n $timeout(function() {\r\n vm.onTimePercentage.data[group].isLoaded = false;\r\n $scope.$apply();\r\n }, 600);\r\n });\r\n onTimePercentageTimeout[group].resolve();\r\n }\r\n else {\r\n vm.onTimePercentage.data[group].isLoaded = false;\r\n doLoadOnTimePercentage(dateTo, group);\r\n }\r\n }\r\n\r\n function doLoadOnTimePercentage(dateTo, group) {\r\n onTimePercentageTimeout[group] = $q.defer();\r\n dashboardCfsService.loadOnTimePercentage(dateTo, group, onTimePercentageTimeout[group]).then(function(data) {\r\n var d = new moment(data.current.date_from);\r\n vm.onTimePercentage.period[group].dateFrom = d.format(vm.momentDateFormat);\r\n vm.onTimePercentage.loadData(group, data);\r\n onTimePercentageTimeout[group] = false;\r\n }, function() {\r\n vm.onTimePercentage.loadData(group, null);\r\n });\r\n }\r\n\r\n $scope.$on('$destroy', cancelRequests);\r\n $rootScope.$on('user:logout', cancelRequests);\r\n function cancelRequests() {\r\n angular.forEach(Object.keys(spendingOverTimeTimeout), function(k) {\r\n if (spendingOverTimeTimeout[k]) spendingOverTimeTimeout[k].resolve();\r\n });\r\n angular.forEach(Object.keys(onTimePercentageTimeout), function(k) {\r\n if (onTimePercentageTimeout[k]) onTimePercentageTimeout[k].resolve();\r\n });\r\n angular.forEach(Object.keys(lanePairsTimeout), function(k) {\r\n if (lanePairsTimeout[k]) lanePairsTimeout[k].resolve();\r\n });\r\n }\r\n\r\n\r\n\r\n //----------------\r\n // Custom Date Ranges\r\n //----------------\r\n var activeWidgetRange = false;\r\n function setCustomRange(widget) {\r\n activeWidgetRange = widget;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n parent: angular.element(document.body),\r\n templateUrl: '/app/components/widgets/custom-end-date.html',\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n }).then(function() {\r\n activeWidgetRange = false;\r\n });\r\n $scope.activeModal = activeWidgetRange;\r\n }\r\n\r\n function setEndDate(startDate, endDate) {\r\n var dateTo = $filter(\"date\")(endDate, 'yyyy-MM-dd', \"UTC\");\r\n closeModal();\r\n if (activeWidgetRange == 'lane-pairs') {\r\n var dateFrom = vm.params.due_date_from ? vm.params.due_date_from :\r\n $location.search()['dateFrom'] ? $location.search()['dateFrom'] : false;\r\n vm.widgetHasCustomRange.lanePairs = true;\r\n vm.shipmentVolVsCountSettings.isLanePairLoaded = false;\r\n vm.shipmentVolVsCountSettings.isLanePairData = false;\r\n vm.shipmentVolVsCountSettings.isLanePairFirstLoad = true;\r\n loadLanePairs(dateFrom, dateTo, 'week', true);\r\n loadLanePairs(dateFrom, dateTo, 'month', true);\r\n loadLanePairs(dateFrom, dateTo, 'quarter', true);\r\n loadLanePairs(dateFrom, dateTo, 'year', true);\r\n }\r\n else if (activeWidgetRange == 'on-time-percentage') {\r\n vm.widgetHasCustomRange.onTimePercentage = true;\r\n loadOnTimePercentage(dateTo, 'week');\r\n loadOnTimePercentage(dateTo, 'month');\r\n loadOnTimePercentage(dateTo, 'quarter');\r\n loadOnTimePercentage(dateTo, 'year');\r\n }\r\n\r\n }\r\n\r\n function resetCustomRange(widget) {\r\n if (widget == 'lane-pairs') {\r\n vm.widgetHasCustomRange.lanePairs = false;\r\n vm.shipmentVolVsCountSettings.isLanePairLoaded = false;\r\n vm.shipmentVolVsCountSettings.isLanePairData = false;\r\n vm.shipmentVolVsCountSettings.isLanePairFirstLoad = true;\r\n loadDefaultLanePairs();\r\n }\r\n else if (widget == 'on-time-percentage') {\r\n vm.widgetHasCustomRange.onTimePercentage = false;\r\n loadDefaultOnTimePercentage();\r\n }\r\n else if (widget == 'spend-over-time') {\r\n vm.widgetHasCustomRange.spendOverTime = false;\r\n loadDefaultSpendingOverTime();\r\n }\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.hide();\r\n }\r\n\r\n }\r\n})();\r\n\n// (function() {\r\n// 'use strict';\r\n\r\n// angular\r\n// .module('app.widgets')\r\n// .service('WidgetsService', WidgetsService);\r\n\r\n// /** @ngInject */\r\n// WidgetsService.$inject = ['$http', '$log', 'api'];\r\n// function WidgetsService($http, $log, api) {\r\n\r\n// var contactMessageData = {\r\n// crane_contact_name: \"\",\r\n// subject: \"\",\r\n// message: \"\",\r\n// details: \"\"\r\n// };\r\n\r\n// return {\r\n// foo: function(){return \"bar\";},\r\n// getSubjects: function() {\r\n// return [\r\n// {\r\n// label:'WIDGETS.SHIPMENT_DETAILS',\r\n// options: [\r\n// {display: 'WIDGETS.CURRENT_EXCEPTIONS_LOWER', value: 'Current Exceptions'},\r\n// {display: 'WIDGETS.POTENTIAL_EXCEPTIONS', value: 'Potential Exceptions Shipments'},\r\n// {display: 'WIDGETS.SHIPMENT_DETAILS', value: 'Shipment Details'},\r\n// {display: 'WIDGETS.GENERAL', value: 'General Shipments'}\r\n// ]\r\n// },\r\n// {\r\n// label:'WIDGETS.TRACK_TRACE',\r\n// options: [\r\n// {display: 'WIDGETS.EXCEPTIONS', value: 'Exceptions'},\r\n// {display: 'WIDGETS.RESULTS', value: 'Results'}, \r\n// {display: 'WIDGETS.GENERAL', value: 'General Track & Trace'}\r\n// ]\r\n// },\r\n// {\r\n// label:'WIDGETS.BILL_OF_LADING',\r\n// options: [\r\n// {display: 'WIDGETS.BILL_OF_LADING', value: 'Bill of Lading'},\r\n// {display: 'WIDGETS.GENERAL', value: 'General Bill of Lading'}\r\n// ]\r\n// },\r\n// {\r\n// label:'WIDGETS.ACCOUNT',\r\n// options: [\r\n// {display:'WIDGETS.ACCOUNT', value: 'Account'},\r\n// {display:'WIDGETS.GENERAL', value: 'General Account'}\r\n// ]\r\n// },\r\n// {\r\n// label:'WIDGETS.NOTIFICATION_SETTINGS',\r\n// options: [\r\n// {display: 'WIDGETS.NOTIFICATION_SETTINGS', value: 'Notification Settings'},\r\n// {display: 'WIDGETS.GENERAL', value: 'General Notifications'}\r\n// ]\r\n// },\r\n// {\r\n// label: 'WIDGETS.GENERAL',\r\n// options: [\r\n// {display: 'WIDGETS.GENERAL', value: 'General for everything'}\r\n// ]\r\n// }\r\n// ];\r\n// },\r\n// getContactMessageData: function() {\r\n// return contactMessageData;\r\n// },\r\n// setContactMessageData: function(data) {\r\n// contactMessageData = data;\r\n// }\r\n// };\r\n// }\r\n \r\n// })();\n/**\r\n * @ngdoc module\r\n * @name WidgetsController\r\n *\r\n * @description The WidgetsController module interfaces with the various types of widgets displayed through-out the system\r\n *\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name toggleCollapse\r\n * @description to toggle the collapsed state of the widget\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.widgets')\r\n .controller('WidgetsController', WidgetsController);\r\n\r\n /** @ngInject */\r\n WidgetsController.$inject = ['TrackTraceService', 'AdvSearchService', 'ShippingDetailsService', '$scope', '$log', '$translatePartialLoader', '$window', '$mdMedia', '$mdDialog', '$location'];\r\n function WidgetsController(TrackTraceService, AdvSearchService, ShippingDetailsService, $scope, $log, $translatePartialLoader, $window, $mdMedia, $mdDialog, $location) {\r\n var vm = this;\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('widgets');\r\n $translatePartialLoader.addPart('shippingdetails');\r\n\r\n // vm variables\r\n vm.showRemoveButton = false; //by default don't show the bookmar remove button\r\n vm.collapsed = TrackTraceService.isCollapsed();\r\n vm.collapsibleLayout = TrackTraceService.isCollapsed() ? \"row\" : \"column\";\r\n vm.collapseState = TrackTraceService.isCollapsed() ? \"collapsed\" : \"collapse-expanded\";\r\n vm.bookmarksLoaded = false;\r\n vm.bookmarks = {};\r\n vm.bookmarksCount = 0;\r\n vm.isBookmarksFirstLoad = !ShippingDetailsService.hasCachedBookmarks();\r\n\r\n // functions\r\n vm.toggleCollapse = toggleCollapse;\r\n vm.editBookmarks = editBookmarks;\r\n vm.doneEditingBookmarks = doneEditingBookmarks;\r\n vm.sendMessage = sendMessage;\r\n vm.closeModal = closeModal;\r\n vm.getCurrentUrl = getCurrentUrl;\r\n vm.getShipmentDetails = getShipmentDetails;\r\n vm.bookmarksError = false;\r\n vm.type = 'normal';\r\n // After the promise is completed, return the bookmarks from the service\r\n if (ShippingDetailsService.hasCachedBookmarks()) {\r\n vm.bookmarks = ShippingDetailsService.getCachedBookmarks();\r\n vm.bookmarksCount = vm.bookmarks.length;\r\n }\r\n ShippingDetailsService.getBookmarks(vm.type).then(function(successResponse){\r\n vm.bookmarksCount = 0;\r\n vm.bookmarks = successResponse;\r\n angular.forEach(vm.bookmarks, function(b, key) {\r\n vm.bookmarksCount += 1;\r\n if (b.flags && b.flags.length > 0) {\r\n if (b.flags.indexOf('current_exception') !== -1) {\r\n b.flag = 'current_exception';\r\n }\r\n else if (b.flags.indexOf('potential_exception') !== -1) {\r\n b.flag = 'potential_exception';\r\n }\r\n }\r\n //if (!b.jobno){\r\n //\r\n // b.isdelivered = 'booking';\r\n // }\r\n });\r\n vm.bookmarksLoaded = true;\r\n vm.isBookmarksFirstLoad = false;\r\n }).catch(function(error) {\r\n vm.bookmarksError = 'Error fetching bookmarks';\r\n vm.bookmarksLoaded = true;\r\n vm.isBookmarksFirstLoad = false;\r\n });\r\n\r\n // Unbookmark the requested shipment then refresh our list of bookmarks\r\n vm.unBookmarkId = function(id) {\r\n // vm.bookmarksLoaded = false\r\n ShippingDetailsService.unBookmarkId(id).then(function(){\r\n ShippingDetailsService.getBookmarks(vm.type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse;\r\n vm.bookmarksCount--;\r\n //vm.bookmarksLoaded = true;\r\n });\r\n }).catch(function(error) {\r\n // vm.bookmarksError = 'Error fetching bookmarks';\r\n // vm.bookmarksLoaded = true;\r\n /*Added by Abheesh*/\r\n ShippingDetailsService.getBookmarks(vm.type).then(function(successResponse){\r\n vm.bookmarks = successResponse;\r\n vm.bookmarksLoaded = true;\r\n //vm.bookmarksCount--;\r\n });\r\n });\r\n }\r\n\r\n\r\n\r\n function toggleCollapse(ev) {\r\n if (vm.collapsed) {\r\n vm.collapsed = false;\r\n TrackTraceService.setCollapsed(false);\r\n vm.collapsibleLayout = \"column\";\r\n vm.collapseState = \"collapse-expanded\";\r\n } else {\r\n vm.collapsed = true;\r\n TrackTraceService.setCollapsed(true);\r\n vm.collapsibleLayout = \"row\";\r\n vm.collapseState = \"collapsed\";\r\n }\r\n }\r\n\r\n vm.getException = function (number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n vm.response = {\"code\": resp.exceptions[0].code, \"description\": resp.exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n vm.getPotentialException = function(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n vm.getStatus = function(item){\r\n if(item.isbooked){\r\n return 'Booked';\r\n }else{\r\n // var expression = item.isdelivered == \"booking\" ? \"N/A\" : \"Undelivered\";\r\n // return item.isdelivered == \"true\" ? 'Delivered' : expression\r\n var deliverStatus;\r\n switch(item.isdelivered){\r\n case \"booking\":\r\n deliverStatus = \"N/A\";\r\n break;\r\n case \"true\":\r\n deliverStatus = \"Delivered\";\r\n break;\r\n case \"false\":\r\n deliverStatus = \"Undelivered\";\r\n break;\r\n default : deliverStatus = \"N/A\";\r\n break;\r\n }\r\n return deliverStatus;\r\n }\r\n\r\n }\r\n\r\n\r\n function editBookmarks() {\r\n $log.debug('clicked edit button');\r\n vm.showRemoveButton = true;\r\n }\r\n\r\n function doneEditingBookmarks() {\r\n vm.showRemoveButton = false;\r\n }\r\n\r\n function sendMessage() {\r\n $log.debug('send a message');\r\n $mdDialog.hide();\r\n }\r\n\r\n //closes a modal\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function getCurrentUrl() {\r\n return $location.absUrl();\r\n }\r\n\r\n function getShipmentDetails() {\r\n return ShippingDetailsService.getShipmentSummary();\r\n }\r\n\r\n vm.activeColumns = [\r\n {\r\n name : \"shipper\",\r\n width : 30\r\n },\r\n {\r\n name : \"AWB\",\r\n width : 30\r\n },\r\n {\r\n name : \"shipDate\",\r\n width : 20\r\n },\r\n {\r\n name : \"dueDate\",\r\n width : 20\r\n }\r\n ];\r\n\r\n vm.availableColumns = [\r\n {\r\n name : \"Customer Group\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"consignee\",\r\n width : 20\r\n },\r\n {\r\n name : \"Service Type\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Origin\",\r\n width : \"md\"\r\n },\r\n {\r\n name : \"shipperCity\",\r\n width : 20\r\n },\r\n {\r\n name : \"Reference #\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Business Type\",\r\n width : \"md\"\r\n },\r\n {\r\n name : \"Consol #\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Owning Station\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Selling Station\",\r\n width : \"md\"\r\n },\r\n {\r\n name : \"Destination Country\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Destination City\",\r\n width : \"lg\"\r\n },\r\n {\r\n name : \"Current Status\",\r\n width : \"lg\"\r\n }\r\n ];\r\n\r\n\r\n // if(localStorage.switchEmail){\r\n // vm.switchUser = true;\r\n // }else if(localStorage.userCompany){\r\n // vm.switchUser = true;\r\n // }else if(localStorage.userDepartment){\r\n // vm.switchUser = true;\r\n // }\r\n\r\n if(localStorage.customerType == 'cww'){\r\n if(localStorage.switchEmailCwwType){\r\n vm.switchUser = true;\r\n }else if(localStorage.userCompanyCww){\r\n vm.switchUser = true;\r\n }else if(localStorage.userDepartmentCww){\r\n vm.switchUser = true;\r\n }\r\n }\r\n\r\n\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .directive('timeZonesSelect', ['$http', timeZonesSelect])\r\n .controller('TimeZoneController', TimeZoneController)\r\n .service('TimeZoneService', TimeZoneService);\r\n\r\n /* @ngInject */\r\n function timeZonesSelect($http) {\r\n var directive = {\r\n link: link,\r\n templateUrl: \"/app/components/time-zones-select/time-zones-select.html\",\r\n name: 'ctrl',\r\n controller: TimeZoneController,\r\n controllerAs: 'vm',\r\n restrict: 'EA',\r\n scope: {\r\n model: '=',\r\n disabled: '='\r\n }\r\n };\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n }\r\n }\r\n\r\n TimeZoneController.$inject = ['$scope','TimeZoneService', '$translatePartialLoader'];\r\n function TimeZoneController($scope, TimeZoneService, $translatePartialLoader) {\r\n $translatePartialLoader.addPart('admin');\r\n\r\n var vm = this;\r\n // vm.timeZoneObjects = TimeZoneService.createTimeZonesObject().then(function(object) {\r\n // vm.timeZoneObjects = object;\r\n // });\r\n\r\n TimeZoneService.createRailsTimeZones().then(function(object) {\r\n vm.timeZoneObjects = object;\r\n });\r\n }\r\n\r\n TimeZoneService.$inject = ['$http', '$q'];\r\n function TimeZoneService($http, $q) {\r\n\r\n function createTimeZonesObject() {\r\n var url = \"app/components/time-zones-select/zone.csv\";\r\n var zones = $http.get(url).then(function(response) {\r\n return parseCSV(response.data, true);\r\n });\r\n url = \"app/components/time-zones-select/cca2_to_country_name.csv\";\r\n var countries = $http.get(url).then(function(response) {\r\n return parseCSV(response.data, false);\r\n });\r\n var timeZoneObject = $q.all([zones, countries]).then(function(response) {\r\n var zones = response[0];\r\n var countries = response[1];\r\n var array = [];\r\n for(var k = 0; k < countries.length; k++) {\r\n var object = {};\r\n object['country'] = countries[k].country;\r\n var zonesArray = [];\r\n for(var i = 0; i < zones.length; i++) {\r\n if(zones[i].cca2 == countries[k].cca2) {\r\n zonesArray.push(zones[i].name);\r\n }\r\n }\r\n object['zones'] = zonesArray;\r\n array.push(object);\r\n }\r\n return array;\r\n });\r\n return timeZoneObject;\r\n }\r\n\r\n //parses a csv file and returns an object of it\r\n function parseCSV(data, isZones) {\r\n var lines = data.split('\\n');\r\n var objectArray = [];\r\n for(var k = 1; k < lines.length; k++) { //skip first line as it is a header\r\n var attr = lines[k].split(',');\r\n var cca2, name;\r\n if(isZones) {\r\n cca2 = attr[1].replace(/(['\"])/g, \"\");\r\n name = attr[2].replace(/(['\"])/g, \"\");\r\n } else {\r\n cca2 = attr[0].replace(/(['\"])/g, \"\");\r\n name = attr[1].replace(/(['\"])/g, \"\");\r\n }\r\n var object = {};\r\n object['cca2'] = cca2;\r\n (isZones)? object['name'] = name : object['country'] = name;\r\n objectArray.push(object);\r\n }\r\n return objectArray;\r\n }\r\n\r\n function createRailsTimeZones() {\r\n var url = \"app/components/time-zones-select/rails-time-zones.csv\";\r\n return $http.get(url).then(function(response) {\r\n return parseRailsZones(response.data);\r\n });\r\n }\r\n\r\n function parseRailsZones(data) {\r\n var zones = data.split(',');\r\n var zonesArray = [];\r\n for(var k = 0; k < zones.length; k++) {\r\n var object = {};\r\n var both = zones[k].split('=>');\r\n object['value'] = both[0].replace(/(['\"])/g, \"\").trim();\r\n object['display'] = both[1].replace(/(['\"])/g, \"\").trim();\r\n zonesArray.push(object);\r\n }\r\n return zonesArray;\r\n }\r\n \r\n return {\r\n createTimeZonesObject: createTimeZonesObject,\r\n createRailsTimeZones: createRailsTimeZones\r\n };\r\n }\r\n\r\n})();\n// var map = new Datamap({scope:'world',element: document.getElementById('map')});\r\n\r\n// // d3.xml(\"pin.svg\", \"image/svg+xml\", function(error, xml){\r\n// // if (error) throw error;\r\n// // document.body.appendChild(xml.documentElement);\r\n// // });\r\n\r\n// map.addPlugin('pin', function(layer, data, options) {\r\n// var self = this;\r\n\r\n// var className = 'pin';\r\n\r\n// var pins = layer.selectAll(className)\r\n// .data(data, JSON.stringify);\r\n// pins.enter()\r\n// .append('circle')\r\n// .attr('class', className) //remember to set the class name\r\n// .attr('cx', function ( datum ) {\r\n// return self.latLngToXY(datum.lat, datum.long)[0];\r\n// })\r\n// .attr('cy', function ( datum ) {\r\n// return self.latLngToXY(datum.lat, datum.long)[1];\r\n// })\r\n// .attr('r', 10)\r\n// .style('fill', options.makeTheBubbleThisColor);\r\n// });\r\n\n(function(modules) { // webpackBootstrap\r\n // The module cache\r\n var installedModules = {};\r\n\r\n // The require function\r\n function __webpack_require__(moduleId) {\r\n\r\n // Check if module is in cache\r\n if(installedModules[moduleId])\r\n return installedModules[moduleId].exports;\r\n\r\n // Create a new module (and put it into the cache)\r\n var module = installedModules[moduleId] = {\r\n exports: {},\r\n id: moduleId,\r\n loaded: false\r\n };\r\n\r\n // Execute the module function\r\n modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\r\n\r\n // Flag the module as loaded\r\n module.loaded = true;\r\n\r\n // Return the exports of the module\r\n return module.exports;\r\n }\r\n\r\n\r\n // expose the modules object (__webpack_modules__)\r\n __webpack_require__.m = modules;\r\n\r\n // expose the module cache\r\n __webpack_require__.c = installedModules;\r\n\r\n // __webpack_public_path__\r\n __webpack_require__.p = \"\";\r\n\r\n // Load entry module and return exports\r\n return __webpack_require__(0);\r\n})\r\n/************************************************************************/\r\n([\r\n/* 0 */\r\n/***/ function(module, exports, __webpack_require__) {\r\n\r\n __webpack_require__(1);\r\n module.exports = __webpack_require__(6);\r\n\r\n\r\n/***/ },\r\n/* 1 */\r\n/***/ function(module, exports, __webpack_require__) {\r\n\r\n /* global moment:false */\r\n\r\n 'use strict';\r\n\r\n var _directivesDateRangePickerDateRangePickerDirective = __webpack_require__(2);\r\n\r\n var _directivesCalendarCalendarDirective = __webpack_require__(3);\r\n\r\n var _directivesObDateRangePickerObDateRangePickerDirectiveJs = __webpack_require__(4);\r\n\r\n var _directivesObDayPickerObDayPickerDirective = __webpack_require__(5);\r\n\r\n angular.module('obDateRangePicker', []).constant('moment', moment).directive('dateRangePicker', _directivesDateRangePickerDateRangePickerDirective.DateRangePicker).directive('obDaterangepicker', _directivesObDateRangePickerObDateRangePickerDirectiveJs.ObDateRangePicker).directive('calendar', _directivesCalendarCalendarDirective.Calendar).directive('obDaypicker', _directivesObDayPickerObDayPickerDirective.ObDayPicker);\r\n\r\n/***/ },\r\n/* 2 */\r\n/***/ function(module, exports) {\r\n\r\n 'use strict';\r\n\r\n Object.defineProperty(exports, '__esModule', {\r\n value: true\r\n });\r\n\r\n var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\r\n\r\n var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\r\n\r\n exports.DateRangePicker = DateRangePicker;\r\n\r\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\r\n\r\n function DateRangePicker() {\r\n 'ngInject';\r\n\r\n var directive = {\r\n restrict: 'E',\r\n scope: {\r\n weekStart: '&',\r\n range: '=?',\r\n minDay: '&',\r\n maxDay: '&',\r\n api: '&',\r\n monthFormat: '&',\r\n inputFormat: '&',\r\n weekDaysName: '&',\r\n linkedCalendars: '&',\r\n interceptors: '&'\r\n },\r\n templateUrl: 'app/directives/date-range-picker/date-range-picker.html',\r\n controller: DateRangePickerController,\r\n controllerAs: 'picker',\r\n bindToController: true\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n var DateRangePickerController = (function () {\r\n DateRangePickerController.$inject = [\"moment\", \"$scope\"];\r\n function DateRangePickerController(moment, $scope) {\r\n 'ngInject';\r\n\r\n _classCallCheck(this, DateRangePickerController);\r\n\r\n this.Moment = moment;\r\n this.Scope = $scope;\r\n\r\n this.range = this.range || {};\r\n this.setConfigurations();\r\n this.startCalendarApi = {};\r\n this.endCalendarApi = {};\r\n this.setInterceptors();\r\n this.setListeners();\r\n this.setApi();\r\n this.watchRangeChange();\r\n this.interceptors = this.interceptors() || {};\r\n }\r\n\r\n _createClass(DateRangePickerController, [{\r\n key: 'setApi',\r\n value: function setApi() {\r\n var _this = this;\r\n\r\n var api = this.api() || {};\r\n _extends(api, {\r\n setCalendarPosition: function setCalendarPosition(start, end) {\r\n _this.startCalendar = start;\r\n if (_this.linkedCalendars() || start.isSame(end, 'M')) {\r\n _this.endCalendar = _this.startCalendar.clone().add(1, 'M');\r\n } else {\r\n _this.endCalendar = end;\r\n }\r\n },\r\n render: function render() {\r\n _this.startCalendarApi.render();\r\n _this.endCalendarApi.render();\r\n }\r\n });\r\n }\r\n }, {\r\n key: 'setListeners',\r\n value: function setListeners() {\r\n var _this2 = this;\r\n\r\n this.Scope.$watchGroup([function () {\r\n return _this2.range.start;\r\n }, function () {\r\n return _this2.range.end;\r\n }], function (newRange) {\r\n if (newRange[0] && newRange[1]) {\r\n _this2.setConfigurations();\r\n }\r\n });\r\n }\r\n }, {\r\n key: 'setConfigurations',\r\n value: function setConfigurations() {\r\n var start = undefined,\r\n end = undefined;\r\n if (this.isMomentRange(this.range)) {\r\n start = this.range.start;\r\n end = this.range.end;\r\n } else {\r\n start = this.Moment(this.range.start, this.getFormat());\r\n end = this.Moment(this.range.end, this.getFormat());\r\n }\r\n\r\n end = end.diff(start) >= 0 ? end : start.clone();\r\n this.rangeStart = start;\r\n this.rangeEnd = end;\r\n this.daysSelected = 2;\r\n this.updateRange();\r\n }\r\n }, {\r\n key: 'updateRange',\r\n value: function updateRange() {\r\n if (this.isMomentRange(this.range)) {\r\n this.range.start = this.rangeStart;\r\n this.range.end = this.rangeEnd;\r\n } else {\r\n this.range.start = this.rangeStart ? this.rangeStart.format(this.getFormat()) : null;\r\n this.range.end = this.rangeEnd ? this.rangeEnd.format(this.getFormat()) : null;\r\n }\r\n }\r\n }, {\r\n key: 'setInterceptors',\r\n value: function setInterceptors() {\r\n var _this3 = this;\r\n\r\n this.startCalendarInterceptors = {\r\n moveToPrevClicked: function moveToPrevClicked() {\r\n _this3.moveCalenders(-1, 'start');\r\n },\r\n moveToNextClicked: function moveToNextClicked() {\r\n _this3.moveCalenders(1, 'start');\r\n },\r\n daySelected: function daySelected(day) {\r\n _this3.dayInStartSelected(day);\r\n _this3.daySelected(day);\r\n if (_this3.daysSelected == 2) {\r\n _this3.interceptors.rangeSelectedByClick && _this3.interceptors.rangeSelectedByClick();\r\n }\r\n },\r\n inputSelected: function inputSelected(day) {\r\n _this3.inputInStartSelected(day);\r\n }\r\n };\r\n\r\n this.endCalendarInterceptors = {\r\n moveToPrevClicked: function moveToPrevClicked() {\r\n _this3.moveCalenders(-1, 'end');\r\n },\r\n moveToNextClicked: function moveToNextClicked() {\r\n _this3.moveCalenders(1, 'end');\r\n },\r\n daySelected: function daySelected(day) {\r\n _this3.dayInEndSelected(day);\r\n _this3.daySelected(day);\r\n if (_this3.daysSelected == 2) {\r\n _this3.interceptors.rangeSelectedByClick && _this3.interceptors.rangeSelectedByClick();\r\n }\r\n },\r\n inputSelected: function inputSelected(day) {\r\n _this3.inputInEndSelected(day);\r\n }\r\n };\r\n }\r\n }, {\r\n key: 'inputInStartSelected',\r\n value: function inputInStartSelected(day) {\r\n switch (this.daysSelected) {\r\n case 0:\r\n case 1:\r\n this.rangeStart = day;\r\n this.daysSelected = 1;\r\n break;\r\n case 2:\r\n if (day.diff(this.rangeStart, 'days') < 0) {\r\n this.rangeStart = day;\r\n } else if (day.isBetween(this.rangeStart, this.rangeEnd)) {\r\n this.rangeStart = day;\r\n } else if (day.diff(this.rangeEnd, 'days') >= 0) {\r\n this.rangeStart = day;\r\n this.rangeEnd = day;\r\n }\r\n this.daysSelected = 2;\r\n this.updateRange();\r\n break;\r\n }\r\n }\r\n }, {\r\n key: 'inputInEndSelected',\r\n value: function inputInEndSelected(day) {\r\n switch (this.daysSelected) {\r\n case 0:\r\n this.rangeStart = day;\r\n this.daysSelected = 1;\r\n break;\r\n case 1:\r\n case 2:\r\n if (day.diff(this.rangeStart, 'days') <= 0) {\r\n this.rangeStart = day;\r\n this.rangeEnd = day;\r\n } else if (day.isSame(this.startCalendar, 'months') || day.isSame(this.endCalendar, 'months')) {\r\n this.rangeEnd = day;\r\n } else if (!day.isSame(this.endCalendar, 'months')) {\r\n this.rangeEnd = day;\r\n }\r\n\r\n this.daysSelected = 2;\r\n this.updateRange();\r\n break;\r\n }\r\n }\r\n }, {\r\n key: 'dayInStartSelected',\r\n value: function dayInStartSelected(day) {\r\n var nextMonth = this.startCalendar.clone().add(1, 'M');\r\n\r\n if (day.isSame(nextMonth, 'month')) {\r\n this.dayInEndSelected(day);\r\n }\r\n }\r\n }, {\r\n key: 'dayInEndSelected',\r\n value: function dayInEndSelected(day) {\r\n var prevMonth = this.endCalendar.clone().subtract(1, 'M');\r\n\r\n if (day.isSame(prevMonth, 'month')) {\r\n this.dayInStartSelected(day);\r\n }\r\n }\r\n }, {\r\n key: 'daySelected',\r\n value: function daySelected(day) {\r\n switch (this.daysSelected) {\r\n case 0:\r\n this.rangeStart = day;\r\n this.daysSelected = 1;\r\n break;\r\n case 1:\r\n if (day.diff(this.rangeStart, 'days') < 0) {\r\n this.rangeStart = day;\r\n } else {\r\n this.rangeEnd = day;\r\n this.daysSelected = 2;\r\n this.updateRange();\r\n }\r\n break;\r\n case 2:\r\n this.daysSelected = 1;\r\n this.rangeStart = day;\r\n this.rangeEnd = null;\r\n break;\r\n }\r\n }\r\n }, {\r\n key: 'moveCalenders',\r\n value: function moveCalenders(month, calendar) {\r\n if (this.areCalendarsLinked()) {\r\n this.startCalendar = this.startCalendar.clone().add(month, 'M');\r\n this.endCalendar = this.endCalendar.clone().add(month, 'M');\r\n } else {\r\n if (calendar === 'start') {\r\n this.startCalendar = this.startCalendar.clone().add(month, 'M');\r\n } else {\r\n this.endCalendar = this.endCalendar.clone().add(month, 'M');\r\n }\r\n }\r\n }\r\n }, {\r\n key: 'isMomentRange',\r\n value: function isMomentRange(range) {\r\n var isRange = false;\r\n if (range && range.start && range.end) {\r\n isRange = this.Moment.isMoment(this.range.start) && this.Moment.isMoment(this.range.end);\r\n }\r\n\r\n return isRange;\r\n }\r\n }, {\r\n key: 'watchRangeChange',\r\n value: function watchRangeChange() {\r\n var _this4 = this;\r\n\r\n this.Scope.$watchGroup([function () {\r\n return _this4.rangeStart;\r\n }, function () {\r\n return _this4.rangeEnd;\r\n }], function (newRange, oldRange) {\r\n var newStart = newRange[0];\r\n var newEnd = newRange[1];\r\n var oldStart = oldRange[0];\r\n var oldEnd = oldRange[1];\r\n\r\n if (!_this4.startCalendar && !_this4.endCalendar) {\r\n _this4.startCalendar = newStart;\r\n _this4.endCalendar = newStart.clone().add(1, 'M');\r\n }\r\n\r\n if (_this4.areCalendarsLinked()) {\r\n if (!(newStart.isSame(_this4.startCalendar, 'M') || newStart.isSame(_this4.endCalendar, 'M'))) {\r\n if (newStart.isSame(oldStart, 'M') && newEnd && !newEnd.isSame(oldEnd, 'M')) {\r\n _this4.startCalendar = newEnd.clone().subtract(1, 'M');\r\n _this4.endCalendar = newEnd;\r\n } else {\r\n _this4.startCalendar = newStart;\r\n _this4.endCalendar = newStart.clone().add(1, 'M');\r\n }\r\n } else if (newEnd && newEnd.isAfter(_this4.endCalendar, 'M')) {\r\n _this4.startCalendar = newEnd;\r\n _this4.endCalendar = newEnd.clone().add(1, 'M');\r\n } else if (!newStart.isSame(_this4.endCalendar, 'M')) {\r\n _this4.startCalendar = newStart;\r\n _this4.endCalendar = newStart.clone().add(1, 'M');\r\n }\r\n } else {\r\n if (!(newStart.isSame(_this4.startCalendar, 'M') || newStart.isSame(_this4.endCalendar, 'M'))) {\r\n if (newStart.isBefore(_this4.startCalendar, 'M')) {\r\n _this4.startCalendar = newStart;\r\n\r\n if (newEnd && !newEnd.isSame(_this4.endCalendar, 'M')) {\r\n if (newStart.isSame(newEnd, 'M')) {\r\n _this4.endCalendar = newStart.clone().add(1, \"M\");\r\n } else {\r\n _this4.endCalendar = newEnd;\r\n }\r\n }\r\n } else if (newStart.isAfter(_this4.endCalendar)) {\r\n _this4.startCalendar = newStart;\r\n _this4.endCalendar = newStart.clone().add(1, 'M');\r\n }\r\n } else if (newEnd && newEnd.isAfter(_this4.endCalendar, 'M')) {\r\n _this4.endCalendar = newEnd;\r\n }\r\n }\r\n });\r\n }\r\n }, {\r\n key: 'areCalendarsLinked',\r\n value: function areCalendarsLinked() {\r\n return angular.isDefined(this.linkedCalendars()) ? this.linkedCalendars() : true;\r\n }\r\n }]);\r\n\r\n return DateRangePickerController;\r\n })();\r\n\r\n/***/ },\r\n/* 3 */\r\n/***/ function(module, exports) {\r\n\r\n 'use strict';\r\n\r\n Object.defineProperty(exports, '__esModule', {\r\n value: true\r\n });\r\n\r\n var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\r\n\r\n var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\r\n\r\n exports.Calendar = Calendar;\r\n\r\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\r\n\r\n function Calendar() {\r\n 'ngInject';\r\n\r\n var directive = {\r\n restrict: 'E',\r\n scope: {\r\n minDay: '&',\r\n maxDay: '&',\r\n weekStart: '&',\r\n getMonth: '&month',\r\n getInterceptors: '&interceptors',\r\n rangeStart: '&',\r\n rangeEnd: '&',\r\n selectedDay: '&',\r\n minMonth: '&',\r\n maxMonth: '&',\r\n weekDaysName: '&',\r\n monthFormat: '&',\r\n inputFormat: '&',\r\n showInput: '&',\r\n api: '=?'\r\n },\r\n templateUrl: 'app/components/ob-daterangepicker/calendar.html',\r\n controller: CalendarController,\r\n controllerAs: 'month',\r\n bindToController: true\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n var CalendarController = (function () {\r\n CalendarController.$inject = [\"moment\", \"$scope\", \"$attrs\"];\r\n function CalendarController(moment, $scope, $attrs) {\r\n 'ngInject';\r\n\r\n _classCallCheck(this, CalendarController);\r\n\r\n this.Moment = moment;\r\n this.Scope = $scope;\r\n this.Attrs = $attrs;\r\n this.api && this.setApi();\r\n this.render();\r\n }\r\n\r\n _createClass(CalendarController, [{\r\n key: 'setApi',\r\n value: function setApi() {\r\n _extends(this.api, {\r\n render: this.render.bind(this)\r\n });\r\n }\r\n }, {\r\n key: 'render',\r\n value: function render() {\r\n this.defaultWeekDaysNames = this.weekDaysName() || ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];\r\n this.firstDayOfWeek = this.weekStart() || 'su';\r\n this.daysOfWeek = this.buildWeek(this.firstDayOfWeek);\r\n this.calendar = this.buildCalendar(this.getMonth());\r\n this.interceptors = this.getInterceptors() || {};\r\n this.setListeners();\r\n this.daysName = this.setWeekDaysNames(this.daysOfWeek);\r\n }\r\n }, {\r\n key: 'setValue',\r\n value: function setValue() {\r\n if (this.selectedDay()) {\r\n this.value = this.selectedDay().format(this.getInputFormat());\r\n }\r\n }\r\n }, {\r\n key: 'setWeekDaysNames',\r\n value: function setWeekDaysNames(weekDays) {\r\n var daysName = arguments.length <= 1 || arguments[1] === undefined ? this.defaultWeekDaysNames : arguments[1];\r\n\r\n var weekDayNames = [];\r\n var defPosMap = {\r\n 'su': 0,\r\n 'mo': 1,\r\n 'tu': 2,\r\n 'we': 3,\r\n 'th': 4,\r\n 'fr': 5,\r\n 'sa': 6\r\n };\r\n\r\n weekDays.forEach(function (day, index) {\r\n var defPos = defPosMap[day];\r\n weekDayNames[index] = daysName[defPos];\r\n });\r\n\r\n return weekDayNames;\r\n }\r\n }, {\r\n key: 'setListeners',\r\n value: function setListeners() {\r\n var _this = this;\r\n\r\n this.Scope.$watch(function () {\r\n return _this.getMonth();\r\n }, function (newMonth) {\r\n _this.calendar = _this.buildCalendar(newMonth);\r\n });\r\n\r\n this.Scope.$watchGroup([function () {\r\n return _this.rangeStart();\r\n }, function () {\r\n return _this.rangeEnd();\r\n }], function () {\r\n _this.setValue();\r\n _this.updateDaysProperties(_this.calendar.monthWeeks);\r\n });\r\n }\r\n }, {\r\n key: 'updateDaysProperties',\r\n value: function updateDaysProperties(monthWeeks) {\r\n var _this2 = this;\r\n\r\n var minDay = this.minDay();\r\n var maxDay = this.maxDay();\r\n var selectedDay = this.selectedDay();\r\n var rangeStart = this.rangeStart();\r\n var rangeEnd = this.rangeEnd();\r\n monthWeeks.forEach(function (week) {\r\n week.forEach(function (day) {\r\n day.selected = day.mo.isSame(selectedDay || null, 'day');\r\n day.inRange = _this2.isInRange(day.mo);\r\n day.rangeStart = day.mo.isSame(rangeStart || null, 'day');\r\n day.rangeEnd = day.mo.isSame(rangeEnd || null, 'day');\r\n if (minDay) {\r\n day.disabled = day.mo.isBefore(minDay, 'day');\r\n }\r\n if (maxDay && !day.disabled) {\r\n day.disabled = day.mo.isAfter(maxDay, 'day');\r\n }\r\n });\r\n });\r\n }\r\n }, {\r\n key: 'buildWeek',\r\n value: function buildWeek(firstDay) {\r\n var daysOfWeek = ['su', 'mo', 'tu', 'we', 'th', 'fr', 'sa'];\r\n var pivot = daysOfWeek.indexOf(firstDay.toLowerCase());\r\n var firstHalf = daysOfWeek.slice(0, pivot);\r\n var secondHalf = daysOfWeek.slice(pivot, daysOfWeek.length);\r\n var week = secondHalf.concat(firstHalf);\r\n\r\n return week;\r\n }\r\n }, {\r\n key: 'buildCalendar',\r\n value: function buildCalendar() {\r\n var date = arguments.length <= 0 || arguments[0] === undefined ? this.Moment() : arguments[0];\r\n\r\n var monthWeeks = [[], [], [], [], [], []];\r\n var monthRange = this.getMonthDateRange(date.year(), date.month() + 1);\r\n var firstDayOfMonth = monthRange.start;\r\n\r\n var pivot = this.daysOfWeek.indexOf(firstDayOfMonth.format('dd').toLowerCase());\r\n var tmpDate = firstDayOfMonth.clone().subtract(pivot, 'd');\r\n\r\n for (var i = 0; i < 6; i++) {\r\n for (var j = 0; j < 7; j++) {\r\n monthWeeks[i][j] = {\r\n mo: tmpDate,\r\n currentDay: tmpDate.isSame(this.Moment(), 'day'),\r\n currentMonth: tmpDate.isSame(date, 'month')\r\n };\r\n tmpDate = tmpDate.clone().add(1, 'd');\r\n }\r\n }\r\n\r\n this.updateDaysProperties(monthWeeks);\r\n\r\n return {\r\n currentCalendar: date,\r\n selectedDate: date,\r\n firstDayOfMonth: monthRange.start.format('D'),\r\n lastDayOfMonth: monthRange.end.format('D'),\r\n monthWeeks: monthWeeks\r\n };\r\n }\r\n }, {\r\n key: 'moveCalenderByMonth',\r\n value: function moveCalenderByMonth(months) {\r\n var mo = this.calendar.currentCalendar;\r\n this.month = mo.clone().add(months, 'M');\r\n this.calendar = this.buildCalendar(this.month.clone());\r\n }\r\n }, {\r\n key: 'moveToNext',\r\n value: function moveToNext() {\r\n if (this.interceptors.moveToNextClicked) {\r\n this.interceptors.moveToNextClicked.call(this.interceptors.context);\r\n } else {\r\n this.moveCalenderByMonth(1);\r\n }\r\n }\r\n }, {\r\n key: 'moveToPrev',\r\n value: function moveToPrev() {\r\n if (this.interceptors.moveToPrevClicked) {\r\n this.interceptors.moveToPrevClicked.call(this.interceptors.context);\r\n } else {\r\n this.moveCalenderByMonth(-1);\r\n }\r\n }\r\n }, {\r\n key: 'getMonthDateRange',\r\n value: function getMonthDateRange(year, month) {\r\n var startDate = this.Moment([year, month - 1]);\r\n var endDate = this.Moment(startDate).endOf('month');\r\n return { start: startDate, end: endDate };\r\n }\r\n }, {\r\n key: 'isInRange',\r\n value: function isInRange(day) {\r\n var inRange = false;\r\n var rangeStart = this.rangeStart() || null;\r\n var rangeEnd = this.rangeEnd() || null;\r\n inRange = day.isBetween(rangeStart, rangeEnd) || day.isSame(rangeStart, 'day') || inRange || day.isSame(rangeEnd, 'day');\r\n\r\n return inRange;\r\n }\r\n }, {\r\n key: 'daySelected',\r\n value: function daySelected(day) {\r\n if (!day.disabled) {\r\n if (this.interceptors.daySelected) {\r\n this.interceptors.daySelected.call(this.interceptors.context, day.mo);\r\n }\r\n }\r\n }\r\n }, {\r\n key: 'dateInputEntered',\r\n value: function dateInputEntered(ev, value) {\r\n if (ev.keyCode == 13) {\r\n this.dateInputSelected(ev, value);\r\n\r\n // should prevent form submit if placed inside a form\r\n ev.preventDefault();\r\n }\r\n }\r\n }, {\r\n key: 'dateInputSelected',\r\n value: function dateInputSelected(ev, value) {\r\n var day = this.Moment(value, this.getInputFormat(), true);\r\n\r\n if (day.isValid()) {\r\n var minDay = this.minDay();\r\n var maxDay = this.maxDay();\r\n day = minDay && day.isBefore(minDay, 'day') ? minDay : day;\r\n day = maxDay && day.isAfter(maxDay, 'day') ? maxDay : day;\r\n\r\n if (!this.selectedDay() || !this.selectedDay().isSame(day, 'day')) {\r\n if (this.interceptors.inputSelected) {\r\n this.interceptors.inputSelected(day);\r\n } else {\r\n this.daySelected({ mo: day });\r\n }\r\n }\r\n }\r\n }\r\n }, {\r\n key: 'getFormattedMonth',\r\n value: function getFormattedMonth(day) {\r\n return this.Moment(day).format(this.getMonthFormat());\r\n }\r\n }, {\r\n key: 'getMonthFormat',\r\n value: function getMonthFormat() {\r\n return this.monthFormat() || 'MMMM YYYY';\r\n }\r\n }, {\r\n key: 'getInputFormat',\r\n value: function getInputFormat() {\r\n return this.inputFormat() || 'MMM DD, YYYY';\r\n }\r\n }, {\r\n key: 'showLeftArrow',\r\n value: function showLeftArrow() {\r\n return this.minMonth() ? !this.minMonth().isSame(this.getMonth().clone().subtract(1, 'M'), 'M') : true;\r\n }\r\n }, {\r\n key: 'showRightArrow',\r\n value: function showRightArrow() {\r\n return this.maxMonth() ? !this.maxMonth().isSame(this.getMonth().clone().add(1, 'M'), 'M') : true;\r\n }\r\n }, {\r\n key: '_showInput',\r\n value: function _showInput() {\r\n return angular.isDefined(this.showInput()) ? this.showInput() : true;\r\n }\r\n }]);\r\n\r\n return CalendarController;\r\n })();\r\n\r\n/***/ },\r\n/* 4 */\r\n/***/ function(module, exports) {\r\n\r\n 'use strict';\r\n\r\n Object.defineProperty(exports, '__esModule', {\r\n value: true\r\n });\r\n\r\n var _slicedToArray = (function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i['return']) _i['return'](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError('Invalid attempt to destructure non-iterable instance'); } }; })();\r\n\r\n var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\r\n\r\n var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\r\n\r\n exports.ObDateRangePicker = ObDateRangePicker;\r\n\r\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\r\n\r\n function ObDateRangePicker() {\r\n 'ngInject';\r\n\r\n var directive = {\r\n restrict: 'E',\r\n scope: {\r\n weekStart: '&',\r\n range: '=?',\r\n weekDaysName: '&',\r\n format: '&',\r\n ranges: '&',\r\n minDay: '&',\r\n maxDay: '&',\r\n monthFormat: '&',\r\n inputFormat: '&',\r\n onApply: '&',\r\n linkedCalendars: '&',\r\n autoApply: '&',\r\n disabled: '&',\r\n calendarsAlwaysOn: '&',\r\n api: '=?'\r\n },\r\n controller: ObDateRangePickerController,\r\n templateUrl: 'app/directives/ob-date-range-picker/ob-date-range-picker.html',\r\n controllerAs: 'obDateRangePicker',\r\n bindToController: true\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n var ObDateRangePickerController = (function () {\r\n ObDateRangePickerController.$inject = [\"$document\", \"$element\", \"$scope\", \"moment\"];\r\n function ObDateRangePickerController($document, $element, $scope, moment) {\r\n 'ngInject';\r\n\r\n var _this = this;\r\n\r\n _classCallCheck(this, ObDateRangePickerController);\r\n\r\n this.Element = $element;\r\n this.Document = $document;\r\n this.Scope = $scope;\r\n this.Moment = moment;\r\n this.range = this.range || {};\r\n this.pickerApi = {};\r\n this.isCustomVisible = this.calendarsAlwaysOn();\r\n\r\n this.setOpenCloseLogic();\r\n this.setWatchers();\r\n this.value = 'Select a Range';\r\n\r\n this.api && _extends(this.api, {\r\n setDateRange: this.setDateRange.bind(this),\r\n render: function render() {\r\n _this.render();\r\n _this.pickerApi.render();\r\n }\r\n });\r\n this.preRanges = this.ranges() || [];\r\n if (this.preRanges.length) {\r\n this.preRanges.push({\r\n name: 'Custom',\r\n isCustom: true\r\n });\r\n } else {\r\n this.isCustomVisible = true;\r\n }\r\n\r\n this.render();\r\n this.setListeners();\r\n }\r\n\r\n _createClass(ObDateRangePickerController, [{\r\n key: 'render',\r\n value: function render() {\r\n this._range = {\r\n start: this.Moment(),\r\n end: this.Moment()\r\n };\r\n this.setPredefinedStatus();\r\n\r\n if (this.range.start && this.range.end && !this.Moment.isMoment(this.range.start) && !this.Moment.isMoment(this.range.end) && this.format()) {\r\n this._range = {\r\n start: this.Moment(this.range.start, this.getFormat()),\r\n end: this.Moment(this.range.end, this.getFormat())\r\n };\r\n } else if (this.Moment.isMoment(this.range.start) && this.Moment.isMoment(this.range.end)) {\r\n this._range = {\r\n start: this.range.start,\r\n end: this.range.end\r\n };\r\n } else if (this.preRanges.length > 1) {\r\n var firstPreRange = this.preRanges[0];\r\n this._range.start = firstPreRange.start;\r\n this._range.end = firstPreRange.end;\r\n }\r\n\r\n if (this._range.start.isAfter(this._range.end)) {\r\n this._range.start = this._range.end.clone();\r\n } else if (this._range.end.isBefore(this._range.start)) {\r\n this._range.end = this._range.start.clone();\r\n }\r\n\r\n this.applyMinMaxDaysToRange();\r\n this.setRange();\r\n this.markPredefined(this._range.start, this._range.end);\r\n this.setPickerInterceptors();\r\n }\r\n }, {\r\n key: 'applyMinMaxDaysToRange',\r\n value: function applyMinMaxDaysToRange() {\r\n if (this.minDay()) {\r\n var minDay = this._getMinDay();\r\n this._range.start = this._range.start.isBefore(minDay, 'd') ? minDay : this._range.start;\r\n this._range.end = this._range.end.isBefore(minDay, 'd') ? minDay : this._range.end;\r\n }\r\n\r\n if (this.maxDay()) {\r\n var maxDay = this._getMaxDay();\r\n this._range.start = this._range.start.isAfter(maxDay) ? maxDay : this._range.start;\r\n this._range.end = this._range.end.isAfter(maxDay) ? maxDay : this._range.end;\r\n }\r\n }\r\n }, {\r\n key: 'setPickerInterceptors',\r\n value: function setPickerInterceptors() {\r\n var _this2 = this;\r\n\r\n this.pickerInterceptors = {\r\n rangeSelectedByClick: function rangeSelectedByClick() {\r\n if (_this2.autoApply()) {\r\n _this2.applyChanges();\r\n }\r\n }\r\n };\r\n }\r\n }, {\r\n key: 'setPredefinedStatus',\r\n value: function setPredefinedStatus() {\r\n var _this3 = this;\r\n\r\n this.preRanges.forEach(function (range) {\r\n if (!range.isCustom) {\r\n range.disabled = false;\r\n\r\n if (_this3.minDay()) {\r\n var minDay = _this3._getMinDay();\r\n range.disabled = range.start.isBefore(minDay, 'd');\r\n }\r\n\r\n if (!range.disabled && _this3.maxDay()) {\r\n var maxDay = _this3._getMaxDay();\r\n range.disabled = range.end.isAfter(maxDay, 'd');\r\n }\r\n }\r\n });\r\n }\r\n }, {\r\n key: 'setWatchers',\r\n value: function setWatchers() {\r\n var _this4 = this;\r\n\r\n this.Scope.$watchGroup([function () {\r\n return _this4._range.start;\r\n }, function () {\r\n return _this4._range.end;\r\n }], function (_ref) {\r\n var _ref2 = _slicedToArray(_ref, 2);\r\n\r\n var start = _ref2[0];\r\n var end = _ref2[1];\r\n\r\n if (!_this4.selfChange) {\r\n if (start && end) {\r\n if (_this4.preRanges.length) {\r\n _this4.preRanges[_this4.preRanges.length - 1].start = start;\r\n _this4.preRanges[_this4.preRanges.length - 1].end = end;\r\n _this4.markPredefined(start, end);\r\n }\r\n _this4.value = _this4.getRangeValue();\r\n }\r\n }\r\n\r\n _this4.selfChange = false;\r\n });\r\n }\r\n }, {\r\n key: 'setOpenCloseLogic',\r\n value: function setOpenCloseLogic() {\r\n this.isPickerVisible = false;\r\n this.pickerPopup = angular.element(this.Element[0].querySelector('.picker'));\r\n this.elemClickFlag = false;\r\n }\r\n }, {\r\n key: 'setListeners',\r\n value: function setListeners() {\r\n var _this5 = this;\r\n\r\n var events = {\r\n documentClick: function documentClick() {\r\n if (_this5.elemClickFlag) {\r\n _this5.elemClickFlag = false;\r\n } else {\r\n _this5.isPickerVisible && _this5.discardChanges();\r\n _this5.Scope.$apply();\r\n }\r\n },\r\n documentEsc: function documentEsc(e) {\r\n if (e.keyCode == 27 && _this5.isPickerVisible) {\r\n _this5.discardChanges();\r\n _this5.hidePicker();\r\n _this5.Scope.$apply();\r\n }\r\n },\r\n pickerClick: function pickerClick() {\r\n _this5.elemClickFlag = true;\r\n _this5.Scope.$apply();\r\n }\r\n };\r\n\r\n this.pickerPopup.on('click', events.pickerClick.bind(this));\r\n this.Document.on('click', events.documentClick.bind(this));\r\n this.Document.on('keydown', events.documentEsc.bind(this));\r\n\r\n this.Scope.$on('$destroy', function () {\r\n _this5.pickerPopup.off('click', events.pickerClick);\r\n _this5.Document.off('click', events.documentClick);\r\n _this5.Document.off('keydown', events.documentClick);\r\n });\r\n }\r\n }, {\r\n key: 'togglePicker',\r\n value: function togglePicker() {\r\n var disabled = angular.isDefined(this.disabled()) ? this.disabled() : false;\r\n if (!disabled && !this.isPickerVisible) {\r\n this.isPickerVisible = true;\r\n this.elemClickFlag = true;\r\n } else {\r\n this.isPickerVisible = false;\r\n }\r\n }\r\n }, {\r\n key: 'hidePicker',\r\n value: function hidePicker() {\r\n this.isPickerVisible = false;\r\n }\r\n }, {\r\n key: 'setRange',\r\n value: function setRange() {\r\n var range = arguments.length <= 0 || arguments[0] === undefined ? this._range : arguments[0];\r\n\r\n if (this.format()) {\r\n this.range.start = range.start.format(this.getFormat());\r\n this.range.end = range.end.format(this.getFormat());\r\n } else {\r\n this.range.start = range.start;\r\n this.range.end = range.end;\r\n }\r\n }\r\n }, {\r\n key: 'predefinedRangeSelected',\r\n value: function predefinedRangeSelected(range, index) {\r\n if (!range.disabled) {\r\n if (!range.isCustom) {\r\n this.selfChange = true;\r\n this.selectedRengeIndex = index;\r\n this.value = range.name;\r\n this._range.start = range.start;\r\n this._range.end = range.end;\r\n this.isCustomVisible = this.calendarsAlwaysOn() || false;\r\n this.applyChanges();\r\n } else {\r\n this.isCustomVisible = true;\r\n }\r\n }\r\n }\r\n }, {\r\n key: 'getFormat',\r\n value: function getFormat() {\r\n return this.format() || 'MM-DD-YYYY';\r\n }\r\n }, {\r\n key: 'discardChanges',\r\n value: function discardChanges() {\r\n var format = this.getFormat();\r\n //debugger;\r\n if (this.range.start != 'Invalid date'){\r\n var start = this.Moment(this.range.start, format);\r\n var end = this.Moment(this.range.end, format);\r\n this._range.start = start;\r\n this._range.end = end;\r\n this.value = this.getRangeValue();\r\n this.pickerApi.setCalendarPosition(start, end);\r\n }\r\n this.hidePicker();\r\n }\r\n }, {\r\n key: 'markPredefined',\r\n value: function markPredefined(start, end) {\r\n this.selectedRengeIndex = this.preRanges.findIndex(function (range) {\r\n return start.isSame(range.start, 'day') && end.isSame(range.end, 'day');\r\n });\r\n }\r\n }, {\r\n key: 'getRangeValue',\r\n value: function getRangeValue() {\r\n var _this6 = this;\r\n\r\n var value = undefined;\r\n var format = this.getInputFormat();\r\n if (this.preRanges.length) {\r\n var index = this.preRanges.findIndex(function (range) {\r\n return _this6._range.start.isSame(range.start, 'day') && _this6._range.end.isSame(range.end, 'day');\r\n });\r\n\r\n if (index !== -1) {\r\n if (this.preRanges[index].isCustom) {\r\n value = this.preRanges[index].start.format(format) + ' - ' + this.preRanges[index].end.format(format);\r\n } else {\r\n value = this.preRanges[index].name;\r\n }\r\n }\r\n } else {\r\n value = this._range.start.format(format) + ' - ' + this._range.end.format(format);\r\n }\r\n\r\n return value;\r\n }\r\n }, {\r\n key: 'applyChanges',\r\n value: function applyChanges() {\r\n var callApply = arguments.length <= 0 || arguments[0] === undefined ? true : arguments[0];\r\n\r\n this.setRange();\r\n this.hidePicker();\r\n this.pickerApi.setCalendarPosition(this._range.start, this._range.end);\r\n if (callApply && this.onApply) {\r\n this.onApply({ start: this._range.start, end: this._range.end });\r\n }\r\n }\r\n }, {\r\n key: 'getInputFormat',\r\n value: function getInputFormat() {\r\n return this.inputFormat() || 'MMM DD, YYYY';\r\n }\r\n }, {\r\n key: 'setDateRange',\r\n value: function setDateRange(range) {\r\n this._range.start = range.start;\r\n this._range.end = range.end;\r\n this.applyChanges(false);\r\n }\r\n }, {\r\n key: '_getMinDay',\r\n value: function _getMinDay() {\r\n return this.minDay() ? this.Moment(this.minDay(), this.getFormat()) : undefined;\r\n }\r\n }, {\r\n key: '_getMaxDay',\r\n value: function _getMaxDay() {\r\n return this.maxDay() ? this.Moment(this.maxDay(), this.getFormat()) : undefined;\r\n }\r\n }]);\r\n\r\n return ObDateRangePickerController;\r\n })();\r\n\r\n/***/ },\r\n/* 5 */\r\n/***/ function(module, exports) {\r\n\r\n 'use strict';\r\n\r\n Object.defineProperty(exports, '__esModule', {\r\n value: true\r\n });\r\n\r\n var _createClass = (function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ('value' in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; })();\r\n\r\n var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\r\n\r\n exports.ObDayPicker = ObDayPicker;\r\n\r\n function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError('Cannot call a class as a function'); } }\r\n\r\n function ObDayPicker() {\r\n 'ngInject';\r\n\r\n var directive = {\r\n restrict: 'E',\r\n scope: {\r\n weekStart: '&',\r\n selectedDay: '=?',\r\n weekDaysName: '&',\r\n format: '&',\r\n minDay: '&',\r\n maxDay: '&',\r\n monthFormat: '&',\r\n inputFormat: '&',\r\n onApply: '&',\r\n disabled: '&',\r\n formName: '@name',\r\n isValidDateEnabled: '&validDay',\r\n autoApply: '&',\r\n api: '=?'\r\n },\r\n controller: ObDayPickerController,\r\n templateUrl: 'app/directives/ob-day-picker/ob-day-picker.html',\r\n controllerAs: 'dayPicker',\r\n bindToController: true\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n var ObDayPickerController = (function () {\r\n ObDayPickerController.$inject = [\"$document\", \"$element\", \"$scope\", \"$timeout\", \"moment\"];\r\n function ObDayPickerController($document, $element, $scope, $timeout, moment) {\r\n 'ngInject';\r\n\r\n var _this = this;\r\n\r\n _classCallCheck(this, ObDayPickerController);\r\n\r\n this.Element = $element;\r\n this.Document = $document;\r\n this.Scope = $scope;\r\n this.$timeout = $timeout;\r\n this.Moment = moment;\r\n this.formName = this.formName || 'dayPickerInput';\r\n\r\n this.setOpenCloseLogic();\r\n this._selectedDay = this.getSelectedDay();\r\n this.value = this.Moment(this._selectedDay).format(this.getFormat());\r\n this.setCalendarInterceptors();\r\n this.calendarApi = {};\r\n\r\n this.api && _extends(this.api, {\r\n render: function render() {\r\n _this.render();\r\n }\r\n });\r\n\r\n this.setListeners();\r\n this.dayValidity = this.checkIfDayIsValid(this._selectedDay);\r\n this.$timeout(function () {\r\n _this.applyValidity(_this.dayValidity);\r\n });\r\n }\r\n\r\n _createClass(ObDayPickerController, [{\r\n key: 'render',\r\n value: function render() {\r\n this.dayValidity = this.checkIfDayIsValid(this._selectedDay);\r\n this.applyValidity(this.dayValidity);\r\n this.calendarApi.render && this.calendarApi.render();\r\n }\r\n }, {\r\n key: 'setOpenCloseLogic',\r\n value: function setOpenCloseLogic() {\r\n this.isPickerVisible = false;\r\n this.pickerPopup = angular.element(this.Element[0].querySelector('.picker'));\r\n this.elemClickFlag = false;\r\n }\r\n }, {\r\n key: 'setCalendarInterceptors',\r\n value: function setCalendarInterceptors() {\r\n this.calendarInterceptors = {\r\n daySelected: this.daySelected.bind(this)\r\n };\r\n }\r\n }, {\r\n key: 'setListeners',\r\n value: function setListeners() {\r\n var _this2 = this;\r\n\r\n var events = {\r\n documentClick: function documentClick() {\r\n if (_this2.elemClickFlag) {\r\n _this2.elemClickFlag = false;\r\n } else {\r\n _this2.onBlur();\r\n _this2.Scope.$digest();\r\n }\r\n },\r\n pickerClick: function pickerClick() {\r\n _this2.elemClickFlag = true;\r\n _this2.Scope.$digest();\r\n }\r\n };\r\n\r\n this.pickerPopup.on('click', events.pickerClick.bind(this));\r\n this.Document.on('click', events.documentClick.bind(this));\r\n\r\n this.Scope.$on('$destroy', function () {\r\n _this2.pickerPopup.off('click', events.pickerClick);\r\n _this2.Document.off('click', events.documentClick);\r\n });\r\n\r\n this.Scope.$watchGroup([function () {\r\n return _this2.Moment(_this2.minDay(), _this2.getFormat()).format();\r\n }, function () {\r\n return _this2.Moment(_this2.maxDay(), _this2.getFormat()).format();\r\n }], function (min, max) {\r\n if (min && min[0] || max && max[0]) {\r\n _this2.render();\r\n }\r\n });\r\n }\r\n }, {\r\n key: 'showPicker',\r\n value: function showPicker() {\r\n var disabled = angular.isDefined(this.disabled()) ? this.disabled() : false;\r\n if (!disabled && !this.isPickerVisible) {\r\n this.isPickerVisible = true;\r\n }\r\n this.elemClickFlag = true;\r\n }\r\n }, {\r\n key: 'hidePicker',\r\n value: function hidePicker() {\r\n this.isPickerVisible = false;\r\n }\r\n }, {\r\n key: 'daySelected',\r\n value: function daySelected(day) {\r\n var _this3 = this;\r\n\r\n var timeout = arguments.length <= 1 || arguments[1] === undefined ? 100 : arguments[1];\r\n\r\n this.applyValidity(this.checkIfDayIsValid(day));\r\n if (!day.isSame(this._selectedDay, 'day')) {\r\n this.calendarApi.render();\r\n this.value = this.Moment(day).format(this.getFormat());\r\n this._selectedDay = day;\r\n\r\n this.$timeout(function () {\r\n _this3.hidePicker();\r\n _this3.updateSelectedDate(day);\r\n }, timeout);\r\n } else {\r\n this.hidePicker();\r\n }\r\n }\r\n }, {\r\n key: 'dateInputEntered',\r\n value: function dateInputEntered(e, value) {\r\n var isDaySelectable = this.checkIfDayIsValid(value);\r\n switch (e.keyCode) {\r\n case 9:\r\n case 13:\r\n var day = this.getInputValue();\r\n if (isDaySelectable) {\r\n this.daySelected(day, 0);\r\n } else {\r\n this.hidePicker();\r\n\r\n // should prevent form submit if placed inside a form\r\n e.keyCode === 13 && e.preventDefault();\r\n }\r\n break;\r\n case 40:\r\n this.isPickerVisible = true;\r\n break;\r\n case 27:\r\n this.isPickerVisible = false;\r\n this.value = this._selectedDay.format(this.getFormat());\r\n break;\r\n default:\r\n break;\r\n }\r\n }\r\n }, {\r\n key: 'getInputValue',\r\n value: function getInputValue() {\r\n return this.Moment(this.value, this.getFormat(), true);\r\n }\r\n }, {\r\n key: 'onBlur',\r\n value: function onBlur() {\r\n var currentValue = this.getInputValue();\r\n var isValid = this.checkIfDayIsValid(currentValue);\r\n if (isValid) {\r\n this.daySelected(currentValue);\r\n } else {\r\n this.hidePicker();\r\n }\r\n }\r\n }, {\r\n key: 'updateValidity',\r\n value: function updateValidity() {\r\n var day = this.getInputValue();\r\n var isValid = this.checkIfDayIsValid(day);\r\n this.applyValidity(isValid);\r\n\r\n if (isValid && this.autoApply() && !day.isSame(this._selectedDay, 'day')) {\r\n this._selectedDay = day;\r\n this.updateSelectedDate(day);\r\n }\r\n }\r\n }, {\r\n key: 'checkIfDayIsValid',\r\n value: function checkIfDayIsValid(value) {\r\n var day = this.Moment(value, this.getFormat(), true);\r\n var minDay = this._getMinDay();\r\n var maxDay = this._getMaxDay();\r\n var isValid = day.isValid();\r\n\r\n if (isValid && minDay) {\r\n isValid = day.isAfter(minDay, 'day') || day.isSame(minDay, 'day');\r\n }\r\n\r\n if (isValid && maxDay) {\r\n isValid = day.isBefore(maxDay, 'day') || day.isSame(maxDay, 'day');\r\n }\r\n\r\n return isValid;\r\n }\r\n }, {\r\n key: 'applyValidity',\r\n value: function applyValidity(isDateValid) {\r\n if (this.Scope[this.formName]) {\r\n if (this.disabled && this.disabled()) {\r\n this.Scope[this.formName].$setValidity('validDay', true);\r\n this.dayValidity = true;\r\n } else if (this.isValidDateEnabled() && this.Scope[this.formName]) {\r\n this.Scope[this.formName].$setValidity('validDay', isDateValid);\r\n this.dayValidity = isDateValid;\r\n }\r\n }\r\n }\r\n }, {\r\n key: 'updateSelectedDate',\r\n value: function updateSelectedDate() {\r\n var day = arguments.length <= 0 || arguments[0] === undefined ? this._selectedDay : arguments[0];\r\n\r\n if (this.format()) {\r\n this.selectedDay = day.format(this.getFormat());\r\n } else {\r\n this.selectedDay = day;\r\n }\r\n\r\n this.onApply({ day: this.selectedDay });\r\n }\r\n }, {\r\n key: 'getSelectedDay',\r\n value: function getSelectedDay() {\r\n return this.Moment(this.selectedDay || this.Moment(), this.getFormat());\r\n }\r\n }, {\r\n key: 'getFormat',\r\n value: function getFormat() {\r\n return this.format() || 'MMM DD, YYYY';\r\n }\r\n }, {\r\n key: '_getMinDay',\r\n value: function _getMinDay() {\r\n return this.minDay() ? this.Moment(this.minDay(), this.getFormat()) : undefined;\r\n }\r\n }, {\r\n key: '_getMaxDay',\r\n value: function _getMaxDay() {\r\n return this.maxDay() ? this.Moment(this.maxDay(), this.getFormat()) : undefined;\r\n }\r\n }]);\r\n\r\n return ObDayPickerController;\r\n })();\r\n\r\n/***/ },\r\n/* 6 */\r\n/***/ function(module, exports) {\r\n\r\n /*eslint-disable */\r\n 'use strict';\r\n\r\n if (!Array.prototype.findIndex) {\r\n Array.prototype.findIndex = function (predicate) {\r\n if (this === null) {\r\n throw new TypeError('Array.prototype.findIndex called on null or undefined');\r\n }\r\n if (typeof predicate !== 'function') {\r\n throw new TypeError('predicate must be a function');\r\n }\r\n var list = Object(this);\r\n var length = list.length >>> 0;\r\n var thisArg = arguments[1];\r\n var value;\r\n\r\n for (var i = 0; i < length; i++) {\r\n value = list[i];\r\n if (predicate.call(thisArg, value, i, list)) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n };\r\n }\r\n /*eslint-enable */\r\n\r\n/***/ }\r\n]);\r\nangular.module(\"obDateRangePicker\").run([\"$templateCache\", function($templateCache) {$templateCache.put(\"app/components/ob-daterangepicker/calendar.html\",\"<div class=\\\"input-container\\\" ng-if=\\\"month._showInput()\\\"><label>{{month.Attrs.label}}</label> <input type=\\\"text\\\" ng-model=\\\"month.value\\\" ng-keypress=\\\"month.dateInputEntered($event, month.value)\\\" ng-blur=\\\"month.dateInputSelected($event, month.value)\\\"></div><div class=\\\"header\\\"><span class=\\\"arrow-btn left\\\" ng-if=\\\"month.showLeftArrow()\\\" ng-click=\\\"month.moveToPrev()\\\">◀</span> <span class=\\\"date\\\">{{month.getFormattedMonth(month.calendar.currentCalendar)}}</span> <span class=\\\"arrow-btn right\\\" ng-if=\\\"month.showRightArrow()\\\" ng-click=\\\"month.moveToNext(1)\\\">▶</span></div><div class=\\\"board\\\"><div class=\\\"days-of-week\\\"><span class=\\\"day-name\\\" ng-repeat=\\\"day in month.daysName track by $index\\\">{{day}}</span></div><div class=\\\"weeks\\\"><div ng-repeat=\\\"week in month.calendar.monthWeeks track by $index\\\"><span class=\\\"day\\\" ng-repeat=\\\"day in week track by $index\\\" ng-class=\\\"{ \\'selected\\': day.selected, \\'current\\': day.currentDay, \\'other-month\\': !day.currentMonth, \\'in-range\\': day.inRange, \\'range-start\\': day.rangeStart, \\'range-end\\': day.rangeEnd, \\'disabled\\': day.disabled }\\\" ng-click=\\\"month.daySelected(day)\\\">{{day.mo.format(\\'D\\')}}</span></div></div></div>\");\r\n$templateCache.put(\"app/directives/date-range-picker/date-range-picker.html\",\"<calendar class=\\\"calendar\\\" api=\\\"picker.startCalendarApi\\\" min-day=\\\"picker.minDay()\\\" max-day=\\\"picker.maxDay()\\\" week-start=\\\"picker.weekStart()\\\" month=\\\"picker.startCalendar\\\" interceptors=\\\"picker.startCalendarInterceptors\\\" range-start=\\\"picker.rangeStart\\\" range-end=\\\"picker.rangeEnd\\\" selected-day=\\\"picker.rangeStart\\\" max-month=\\\"picker.endCalendar\\\" week-days-name=\\\"picker.weekDaysName()\\\" month-format=\\\"picker.monthFormat()\\\" input-format=\\\"picker.inputFormat()\\\" label=\\\"Start Date\\\"></calendar><calendar class=\\\"calendar\\\" api=\\\"picker.endCalendarApi\\\" min-day=\\\"picker.minDay()\\\" max-day=\\\"picker.maxDay()\\\" week-start=\\\"picker.weekStart()\\\" month=\\\"picker.endCalendar\\\" interceptors=\\\"picker.endCalendarInterceptors\\\" range-start=\\\"picker.rangeStart\\\" range-end=\\\"picker.rangeEnd\\\" selected-day=\\\"picker.rangeEnd\\\" min-month=\\\"picker.startCalendar\\\" week-days-name=\\\"picker.weekDaysName()\\\" month-format=\\\"picker.monthFormat()\\\" input-format=\\\"picker.inputFormat()\\\" label=\\\"End Date\\\"></calendar>\");\r\n$templateCache.put(\"app/directives/ob-date-range-picker/ob-date-range-picker.html\",\"<div class=\\\"picker-dropdown-container\\\" ng-class=\\\"{\\'disabled\\': obDateRangePicker.disabled()}\\\"><div class=\\\"picker-dropdown\\\" ng-class=\\\"{\\'open\\': obDateRangePicker.isPickerVisible}\\\" ng-click=\\\"obDateRangePicker.togglePicker()\\\"><span>{{obDateRangePicker.value}}</span></div><div class=\\\"picker\\\" ng-class=\\\"{\\'open\\': obDateRangePicker.isPickerVisible}\\\" ng-show=\\\"obDateRangePicker.isPickerVisible\\\"><div class=\\\"date-range\\\" ng-show=\\\"obDateRangePicker.isCustomVisible\\\"><date-range-picker ng-if=\\\"obDateRangePicker.isPickerVisible\\\" api=\\\"obDateRangePicker.pickerApi\\\" interceptors=\\\"obDateRangePicker.pickerInterceptors\\\" linked-calendars=\\\"obDateRangePicker.linkedCalendars()\\\" week-start=\\\"obDateRangePicker.weekStart()\\\" range=\\\"obDateRangePicker._range\\\" week-days-name=\\\"obDateRangePicker.weekDaysName()\\\" min-day=\\\"obDateRangePicker._getMinDay()\\\" max-day=\\\"obDateRangePicker._getMaxDay()\\\" month-format=\\\"obDateRangePicker.monthFormat()\\\" input-format=\\\"obDateRangePicker.inputFormat()\\\"></date-range-picker></div><div class=\\\"ranges-actions\\\" ng-class=\\\"{\\'custom-open\\': obDateRangePicker.isCustomVisible}\\\"><div class=\\\"ranges\\\"><div class=\\\"range\\\" ng-repeat=\\\"range in obDateRangePicker.preRanges track by $index\\\" ng-class=\\\"{\\'selected\\': obDateRangePicker.selectedRengeIndex === $index, \\'disabled\\': range.disabled}\\\" ng-click=\\\"obDateRangePicker.predefinedRangeSelected(range, $index)\\\" ng-if=\\\"!$last || ($last && !obDateRangePicker.calendarsAlwaysOn())\\\">{{range.name}}</div></div><div class=\\\"actions\\\" ng-if=\\\"!obDateRangePicker.autoApply()\\\"><div class=\\\"btn cancel\\\" ng-click=\\\"obDateRangePicker.discardChanges()\\\">Cancel</div><div class=\\\"btn apply\\\" ng-click=\\\"obDateRangePicker.applyChanges()\\\">APPLY</div></div></div></div></div>\");\r\n$templateCache.put(\"app/directives/ob-day-picker/ob-day-picker.html\",\"<div ng-form=\\\"{{::dayPicker.formName}}\\\" class=\\\"picker-dropdown-container\\\" ng-class=\\\"{\\'open\\': dayPicker.isPickerVisible, \\'disabled\\': dayPicker.disabled(), \\'invalid\\': !dayPicker.dayValidity}\\\"><input class=\\\"picker-input\\\" ng-model=\\\"dayPicker.value\\\" ng-change=\\\"dayPicker.updateValidity()\\\" ng-keydown=\\\"dayPicker.dateInputEntered($event, dayPicker.value)\\\" ng-click=\\\"dayPicker.showPicker()\\\" ng-disabled=\\\"dayPicker.disabled()\\\"><div class=\\\"picker\\\" ng-show=\\\"dayPicker.isPickerVisible\\\"><calendar class=\\\"calendar\\\" api=\\\"dayPicker.calendarApi\\\" min-day=\\\"dayPicker._getMinDay()\\\" max-day=\\\"dayPicker._getMaxDay()\\\" week-start=\\\"dayPicker.weekStart()\\\" month=\\\"dayPicker._selectedDay\\\" interceptors=\\\"dayPicker.calendarInterceptors\\\" selected-day=\\\"dayPicker._selectedDay\\\" min-month=\\\"dayPicker.startCalendar\\\" week-days-name=\\\"dayPicker.weekDaysName()\\\" month-format=\\\"dayPicker.monthFormat()\\\" show-input=\\\"false\\\"></calendar></div></div>\");}]);\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .directive('acmeNavbar', acmeNavbar);\r\n\r\n /** @ngInject */\r\n function acmeNavbar() {\r\n var directive = {\r\n restrict: 'E',\r\n templateUrl: '/app/components/navbar/navbar.html',\r\n scope: {\r\n creationDate: '='\r\n },\r\n controller: NavbarController,\r\n controllerAs: 'vm',\r\n bindToController: true\r\n };\r\n\r\n return directive;\r\n\r\n /** @ngInject */\r\n function NavbarController(moment) {\r\n var vm = this;\r\n\r\n // \"vm.creationDate\" is available by directive option \"bindToController: true\"\r\n vm.relativeDate = moment(vm.creationDate).fromNow();\r\n }\r\n }\r\n\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .directive('loadingButton', loadingButton);\r\n\r\n /* @ngInject */\r\n function loadingButton() {\r\n var directive = {\r\n templateUrl: '/app/components/loading-button/loading-button.html',\r\n restrict: 'E',\r\n scope: {\r\n callfunction: '&',\r\n isdisabled: '&',\r\n display: '@',\r\n isloading: '='\r\n },\r\n link: function (scope, element, attrs) {\r\n\r\n }\r\n };\r\n return directive;\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .directive('holdButton', ['$interval', holdButton]);\r\n\r\n /* @ngInject */\r\n function holdButton($interval) {\r\n var directive = {\r\n templateUrl: '/app/components/hold-button/hold-button.html',\r\n restrict: 'E',\r\n scope: {\r\n timeout: '=',\r\n callfunction: '=',\r\n isdisabled: '&',\r\n title: '@',\r\n isloading: '='\r\n },\r\n link: function (scope, element, attrs) {\r\n //element.addClass('time');\r\n scope.Time = 0;\r\n var promise;\r\n var mytitle = scope.title;\r\n \r\n \r\n // For Desktop\r\n scope.mouseDown = function() {\r\n promise = $interval(function () { \r\n scope.Time++;\r\n if (scope.Time >= 0){\r\n scope.title = \"3\";\r\n if (scope.Time >= 10){\r\n scope.title = \"2\";\r\n if (scope.Time > 20){\r\n scope.title = \"1\";\r\n if (scope.Time > 30){\r\n scope.title = \"READY\";\r\n }\r\n }\r\n }\r\n }\r\n }, 100);\r\n\r\n };\r\n\r\n scope.mouseUp = function (ev) {\r\n $interval.cancel(promise);\r\n if (scope.Time > scope.timeout){\r\n scope.callfunction();\r\n } \r\n scope.Time = 0;\r\n scope.title = mytitle;\r\n };\r\n\r\n\r\n\r\n\r\n //For Mobiles/Tablets\r\n\r\n element.bind('touchstart', function(event) {\r\n // Locally scoped variable that will keep track of the long press\r\n event.preventDefault();\r\n //// console.log(1);\r\n scope.longPress = true;\r\n \r\n promise = $interval(function() {\r\n if (scope.longPress) {\r\n\r\n event.preventDefault();\r\n\r\n scope.Time++;\r\n if (scope.Time >= 0){\r\n scope.title = \"3\";\r\n if (scope.Time >= 10){\r\n scope.title = \"2\";\r\n if (scope.Time > 20){\r\n scope.title = \"1\";\r\n if (scope.Time > 30){\r\n scope.title = \"READY\";\r\n }\r\n }\r\n }\r\n }\r\n \r\n }\r\n }, 100);\r\n\r\n });\r\n\r\n element.bind('touchend', function(evt) {\r\n evt.preventDefault();\r\n //// console.log(2);\r\n // Prevent the onLongPress event from firing\r\n \r\n if (scope.Time > scope.timeout){\r\n scope.callfunction();\r\n } else{\r\n scope.longPress = false;\r\n scope.Time = 0;\r\n scope.title = mytitle;\r\n }\r\n \r\n \r\n });\r\n\r\n\r\n\r\n }\r\n };\r\n return directive;\r\n }\r\n})();\r\n\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <esvit666@gmail.com>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name ServerTable.ngTableSorterRow\r\n * @description directive that sorts the rows of a table\r\n * @restrict E\r\n */\r\n\r\n(function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableSorterRowCview', ngTableSorterRow);\r\n\r\n ngTableSorterRow.$inject = [];\r\n\r\n function ngTableSorterRow(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/components/crane-table/sorterHeader.html',\r\n scope: true,\r\n controller: 'ngTableSorterRowController'\r\n };\r\n return directive;\r\n }\r\n})();\r\n\n/**\r\n * ngTable: Table + Angular JS\r\n *\r\n * @author Vitalii Savchuk <esvit666@gmail.com>\r\n * @url https://github.com/esvit/ng-table/\r\n * @license New BSD License <http://creativecommons.org/licenses/BSD/>\r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name ServerTable.ngTableFilterRow\r\n * @description directive that filters the rows of a table\r\n * @restrict E\r\n */\r\n\r\n(function(){\r\n 'use strict';\r\n\r\n angular.module('ngTable')\r\n .directive('ngTableFilterRowCview', ngTableFilterRow);\r\n\r\n ngTableFilterRow.$inject = [];\r\n\r\n function ngTableFilterRow(){\r\n var directive = {\r\n restrict: 'E',\r\n replace: true,\r\n templateUrl: '/app/components/crane-table/filterHeader.html',\r\n scope: true,\r\n controller: 'ngTableFilterRowController'\r\n };\r\n return directive;\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .directive('craneTable', ['$translate', craneTable]);\r\n\r\n /* @ngInject */\r\n function craneTable($translate) {\r\n var directive = {\r\n link: link,\r\n templateUrl: \"/app/components/crane-table/crane-table.html\",\r\n name: 'ctrl',\r\n controller: \"@\",\r\n controllerAs: \"tctrl\",\r\n restrict: 'EA',\r\n scope: {\r\n icon: '=',\r\n lensviewtable : '=',\r\n searchflag : '=',\r\n lensviewtitle: '=',\r\n buttons: '=',\r\n readaccess: '=',\r\n title: '@',\r\n content: '@',\r\n isLoading: '=',\r\n isNoResults: '=',\r\n menu: '=',\r\n tabletype : \"=\",\r\n lensviewtablepopup : \"=\",\r\n loaddatausers : \"=\"\r\n }\r\n };\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n \r\n $translate(attrs.title).then(function(t) {\r\n element[0].title = t;\r\n });\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n // angular.module('crane', []);\r\n angular\r\n .module('app')\r\n .controller('CraneSearchController', ['$state' ,'$stateParams','$scope', '$window', '$location', '$element', '$http', '$timeout', '$q', '$mdDialog', '$mdMedia', 'api', 'AJAX', 'TrackTraceService', CraneSearchController]);\r\n\r\n /* @ngInject */\r\n function CraneSearchController($state ,$stateParams, $scope, $window, $location, $element, $http, $timeout, $q, $mdDialog, $mdMedia, api, AJAX, TrackTraceService) {\r\n var vm = this;\r\n\r\n // TODO: let the form be resubmitted with the same values\r\n\r\n /* Functions */\r\n vm.onFormSubmit = onFormSubmit;\r\n vm.searchAction = searchAction;\r\n vm.globalUrl = \"\";\r\n $scope.closeSearchResults = closeSearchResults;\r\n\r\n /* Variables */\r\n $scope.isLoading = false;\r\n $scope.searchResults = [];\r\n $scope.searchResultTotal = 0;\r\n $scope.craneSearch = '';\r\n $scope.query = '';\r\n\r\n var lastQuery = false,\r\n canceler, timeoutTid;\r\n\r\n var params = \"\";\r\n\r\n\r\n if(localStorage.customerType == 'cww'){\r\n if(localStorage.switchEmailCwwType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCwwType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCww){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCww)+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userDepartmentCww){\r\n params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCww)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCww+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.dummyUser){\r\n params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }\r\n else if(localStorage.customerType == 'csl'){\r\n if(localStorage.switchEmailCslType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCslType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCsl){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl)+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userDepartmentCsl){\r\n params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCsl)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCsl+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.dummyUser){\r\n params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }\r\n else if(localStorage.customerType == 'cfs'){\r\n if(localStorage.switchEmailCfsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCfsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCfs){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs)+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userDepartmentCfs){\r\n params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCfs)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCfs+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.dummyUser){\r\n params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }\r\n else if(localStorage.customerType == 'cmts'){\r\n if(localStorage.switchEmailCmtsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCmtsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCmts){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts)+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userDepartmentCmts){\r\n params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCmts)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCmts+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.dummyUser){\r\n params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }\r\n else\r\n {\r\n params += \"\";\r\n }\r\n\r\n\r\n if($state.current.name == 'dashboard' || $state.current.name == 'track-trace' ||\r\n $state.current.name == 'track-trace-booking' || $state.current.name == 'track-trace-transit'\r\n || $state.current.name == 'shipping-details' || $state.current.name == 'shipment-discussions'){\r\n vm.globalUrl = api.url_v2 + '/universal-search'+params;\r\n }\r\n else if($state.current.name == 'dashboardCsl' || $state.current.name == 'track-trace-csl'\r\n || $state.current.name == 'shipping-details-csl'){\r\n vm.globalUrl = api.url_v2 + '/universal-search-csl'+params;\r\n }\r\n else if($state.current.name == 'dashboardCfs' || $state.current.name == 'track-trace-cfs'\r\n || $state.current.name == 'shipping-details-cfs'){\r\n vm.globalUrl = api.url_v2 + '/universal-search-cfs'+params;\r\n }\r\n else if($state.current.name == 'dashboardCmts' || $state.current.name == 'track-trace-cmts'\r\n || $state.current.name == 'shipping-details-cmts'){\r\n vm.globalUrl = api.url_v2 + '/universal-search-cmts'+params;\r\n }\r\n\r\n function searchAction() {\r\n if ($scope.$parent.isMobile()) {\r\n // Check if expanded and if not, expand or submit the search if already expanded\r\n if ($scope.$parent.mobileExpanded) {\r\n // submit the form\r\n vm.onFormSubmit();\r\n } else {\r\n $scope.$parent.expandSearch(true);\r\n }\r\n } else {\r\n vm.onFormSubmit();\r\n }\r\n }\r\n\r\n /**\r\n * Handles debouncing and preventing re-searching the last query\r\n */\r\n function onFormSubmit(event) {\r\n var value = $scope.craneSearch.trim();\r\n if (value == lastQuery && $scope.isLoading) return;\r\n if (value.length < 3) return;\r\n\r\n $scope.query = value;\r\n $scope.isLoading = true;\r\n $scope.searchResults = [];\r\n if($state.current.name == 'dashboard' || $state.current.name == 'track-trace' ||\r\n $state.current.name == 'track-trace-booking' || $state.current.name == 'track-trace-transit'\r\n || $state.current.name == 'shipping-details' || $state.current.name == 'shipment-discussions'){\r\n showSearchResults();\r\n }else if($state.current.name == 'dashboardCsl' || $state.current.name == 'track-trace-csl'\r\n || $state.current.name == 'shipping-details-csl'){\r\n showSearchResultsCsl();\r\n }else if($state.current.name == 'dashboardCfs' || $state.current.name == 'track-trace-cfs'\r\n || $state.current.name == 'shipping-details-cfs'){\r\n showSearchResultsCfs();\r\n }else if($state.current.name == 'dashboardCmts' || $state.current.name == 'track-trace-cmts'\r\n || $state.current.name == 'shipping-details-cmts'){\r\n showSearchResultsCmts();\r\n }\r\n\r\n search();\r\n }\r\n\r\n /**\r\n * Performs the actual search\r\n */\r\n function search() {\r\n\r\n // stop any previous searches\r\n if (canceler) {\r\n canceler.resolve();\r\n $timeout.cancel(timeoutTid);\r\n }\r\n\r\n // perform request\r\n canceler = $q.defer();\r\n $http.post(vm.globalUrl, {query: $scope.query}, {timeout: canceler.promise})\r\n .then(function(res){\r\n if (res) {\r\n\r\n if(res.data.hasOwnProperty('shipments')){\r\n\r\n $scope.searchResults = res.data.shipments;\r\n $scope.searchResultTotal = res.data.total;\r\n var baseUrl = $location.$$absUrl;\r\n if($location.path() !='/'){\r\n var url = baseUrl.split($location.path());\r\n baseUrl = url[0]+'/';\r\n }\r\n\r\n if($scope.searchResultTotal == 1){\r\n\r\n $mdDialog.cancel();\r\n $window.open(baseUrl+'shipping-details/'+$scope.searchResults[0].gshpid,'_blank');\r\n }else if($scope.searchResultTotal <= 5 ){\r\n\r\n angular.forEach($scope.searchResults, function(b, key) {\r\n vm.bookmarksCount += 1;\r\n if (b.flags && b.flags.length > 0) {\r\n if (b.flags.indexOf('current_exception') !== -1) {\r\n b.flag = 'current_exception';\r\n }\r\n else if (b.flags.indexOf('potential_exception') !== -1) {\r\n b.flag = 'potential_exception';\r\n }\r\n }\r\n });\r\n lastQuery = $scope.query;\r\n $scope.crane_search_form.$setPristine();\r\n $scope.crane_search_form.$setUntouched();\r\n $scope.query = '';\r\n $scope.query = lastQuery;\r\n $scope.searchResultsTranslateData = {\r\n displayed: $scope.searchResults.length,\r\n total: res.data.total\r\n };\r\n }else if($scope.searchResultTotal > 5 ){\r\n\r\n $mdDialog.cancel();\r\n var matchingKey = res.data.matching_keys[0];\r\n var queryValue = res.data.query_value;\r\n\r\n $window.open(baseUrl+'track-trace?'+matchingKey+'='+queryValue,'_blank');\r\n }\r\n }\r\n\r\n else if(res.data.hasOwnProperty('loads')){\r\n\r\n $scope.searchResults = res.data.loads;\r\n $scope.searchResultTotal = res.data.total;\r\n var baseUrl = $location.$$absUrl;\r\n if($location.path() !='/'){\r\n var url = baseUrl.split($location.path());\r\n baseUrl = url[0]+'/';\r\n }\r\n\r\n if($scope.searchResultTotal == 1){\r\n\r\n $mdDialog.cancel();\r\n if($state.current.name == 'dashboardCsl' || $state.current.name == 'track-trace-csl'\r\n || $state.current.name == 'shipping-details-csl'){\r\n $window.open(baseUrl+'shipping-details-csl/'+$scope.searchResults[0].pro,'_blank');\r\n }else if($state.current.name == 'dashboardCfs' || $state.current.name == 'track-trace-cfs'\r\n || $state.current.name == 'shipping-details-cfs'){\r\n $window.open(baseUrl+'shipping-details-cfs/'+$scope.searchResults[0].pro,'_blank');\r\n }else if($state.current.name == 'dashboardCmts' || $state.current.name == 'track-trace-cmts'\r\n || $state.current.name == 'shipping-details-cmts'){\r\n $window.open(baseUrl+'shipping-details-cmts/'+$scope.searchResults[0].load_id,'_blank');\r\n }\r\n\r\n }else if($scope.searchResultTotal <= 5 ){\r\n angular.forEach($scope.searchResults, function(b, key) {\r\n vm.bookmarksCount += 1;\r\n if (b.exceptions && b.exceptions.length > 0) {\r\n if (b.exceptions.indexOf('current_exception') !== -1) {\r\n b.exception = 'current_exception';\r\n }\r\n }\r\n });\r\n\r\n lastQuery = $scope.query;\r\n $scope.crane_search_form.$setPristine();\r\n $scope.crane_search_form.$setUntouched();\r\n $scope.query = '';\r\n $scope.query = lastQuery;\r\n $scope.searchResultsTranslateData = {\r\n displayed: $scope.searchResults.length,\r\n total: res.data.total\r\n };\r\n }else if($scope.searchResultTotal > 5 ){\r\n\r\n $mdDialog.cancel();\r\n var matchingKey = res.data.matching_keys[0];\r\n var queryValue = res.data.query_value;\r\n\r\n if($state.current.name == 'dashboardCsl' || $state.current.name == 'track-trace-csl' || $state.current.name == 'shipping-details-csl'){\r\n $window.open(baseUrl+'track-trace-csl?'+matchingKey+'='+queryValue,'_blank');\r\n }else if($state.current.name == 'dashboardCfs' || $state.current.name == 'track-trace-cfs' || $state.current.name == 'shipping-details-cfs'){\r\n $window.open(baseUrl+'track-trace-cfs?'+matchingKey+'='+queryValue,'_blank');\r\n } else if($state.current.name == 'dashboardCmts' || $state.current.name == 'track-trace-cmts' || $state.current.name == 'shipping-details-cmts'){\r\n $window.open(baseUrl+'track-trace-cmts?'+matchingKey+'='+queryValue,'_blank');\r\n }\r\n }\r\n }\r\n\r\n\r\n }\r\n doneLoading();\r\n }, function() {\r\n doneLoading();\r\n });\r\n\r\n // request timeout\r\n timeoutTid = $timeout(function() {\r\n if (canceler) canceler.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function doneLoading() {\r\n $scope.isLoading = false;\r\n canceler = false;\r\n }\r\n\r\n function showSearchResults() {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && $scope.customFullscreen;\r\n $mdDialog.show({\r\n scope: $scope,\r\n preserveScope: true,\r\n templateUrl: '/app/components/crane-search/crane-search-results.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:false,\r\n fullscreen: useFullScreen\r\n });\r\n }\r\n\r\n function showSearchResultsCsl() {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && $scope.customFullscreen;\r\n $mdDialog.show({\r\n scope: $scope,\r\n preserveScope: true,\r\n templateUrl: '/app/components/crane-search/crane-search-csl-results.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:false,\r\n fullscreen: useFullScreen\r\n });\r\n }\r\n\r\n function showSearchResultsCfs() {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && $scope.customFullscreen;\r\n $mdDialog.show({\r\n scope: $scope,\r\n preserveScope: true,\r\n templateUrl: '/app/components/crane-search/crane-search-cfs-results.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:false,\r\n fullscreen: useFullScreen\r\n });\r\n }\r\n\r\n function showSearchResultsCmts() {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && $scope.customFullscreen;\r\n $mdDialog.show({\r\n scope: $scope,\r\n preserveScope: true,\r\n templateUrl: '/app/components/crane-search/crane-search-cmts-results.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:false,\r\n fullscreen: useFullScreen\r\n });\r\n }\r\n\r\n function closeSearchResults() {\r\n $mdDialog.cancel();\r\n if (canceler) canceler.resolve();\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('app.contacts', [\r\n 'app.core',\r\n ]);\r\n\r\n})();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.contacts')\r\n .service('ContactsService', ContactsService);\r\n\r\n /** @ngInject */\r\n ContactsService.$inject = ['$http', '$log', '$rootScope', 'api', 'UserService'];\r\n function ContactsService($http, $log, $rootScope, api, UserService) {\r\n\r\n // var subjectStatuses = getDefaultSubjectStatuses(),\r\n var general = {active: true, display:'WIDGETS.GENERAL', value: 'General Account'}\r\n var allSubjects = {\r\n shipmentDetails: {\r\n currentException: {active: false, display: 'WIDGETS.CONTACT.SUBJECT_SHIPMENT_CURRENT_EXCEPTION', value: 'Current Exceptions'},\r\n potentialException: {active: false, display: 'WIDGETS.CONTACT.SUBJECT_SHIPMENT_POTENTIAL_EXCEPTION', value: 'Potential Exceptions Shipments'},\r\n shipmentDetails: {active: true, display: 'WIDGETS.CONTACT.SUBJECT_SHIPMENT_DETAILS', value: 'Shipment Details'},\r\n general: general\r\n },\r\n trackTrace: {\r\n exceptions: {active: false, display: 'WIDGETS.CONTACT.SUBJECT_TT_EXCEPTIONS', value: 'Exceptions'},\r\n results: {active: true, display: 'WIDGETS.CONTACT.SUBJECT_TT_RESULTS', value: 'Results'},\r\n general: general\r\n },\r\n billOfLading: {\r\n billOfLading: {active: true, display: 'WIDGETS.CONTACT.SUBJECT_BILL_OF_LADING', value: 'Bill of Lading'},\r\n general: general\r\n },\r\n account: {\r\n account: {active: true, display:'WIDGETS.CONTACT.SUBJECT_ACCOUNT', value: 'Account'},\r\n notifications: {active: true, display:'WIDGETS.CONTACT.SUBJECT_NOTIFICATIONS', value: 'Notification Settings'},\r\n general: general\r\n },\r\n default: {\r\n general: general\r\n }\r\n };\r\n // $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams, options){\r\n // subjectStatuses = getDefaultSubjectStatuses();\r\n // });\r\n\r\n\r\n return {\r\n // ----------------------------\r\n // Post a message to a contact\r\n // ----------------------------\r\n postMessage: function(message){\r\n return $http.post(api.url_v2 + '/contact_messages', message);\r\n },\r\n getSubjects: function(topic) {\r\n\r\n // var subjects = [];\r\n\r\n // // figure out which should be enabled\r\n // angular.forEach(Object.keys(subjectStatuses), function(feature) {\r\n // angular.forEach(Object.keys(subjectStatuses[feature]), function(action) {\r\n // if (subjectStatuses[feature][action]) {\r\n // subjects.push(allSubjects[feature][action]);\r\n // }\r\n // });\r\n // });\r\n\r\n // subjects.push({display:'WIDGETS.GENERAL', value: 'General Account'});\r\n // return subjects;\r\n return allSubjects[topic];\r\n },\r\n getContactInfo: function() {\r\n var contact = UserService.getUserData().contact;\r\n if (contact){\r\n contact = contact.primary_contact;\r\n }\r\n return contact;\r\n },\r\n getContactMessageData: function() {\r\n return {\r\n subject: \"\",\r\n message: \"\",\r\n url_from: \"\"\r\n };\r\n },\r\n setSubjectStatuses: function(states) {\r\n for (var state in states){\r\n for (var field in states[state]){\r\n // debugger;\r\n allSubjects[state][field].active = states[state][field];\r\n }\r\n }\r\n // subjectStatuses = angular.merge(getDefaultSubjectStatuses(), statuses);\r\n // $rootScope.$broadcast(\"contactsService:statusesChanged\", subjectStatuses);\r\n },\r\n getDefaultSubjectStatuses: function() {\r\n ['currentException', 'potentialException'].map(function(d){allSubjects.shipmentDetails[d].active = false;});\r\n allSubjects.trackTrace.exceptions.active = false;\r\n }\r\n }\r\n\r\n // function getDefaultSubjectStatuses() {\r\n // // ['currentException', 'potentialException'].map(function(d){allSubjects.shipmentDetails[d] = false;});\r\n // // allSubjects.trackTrace.exceptions = false;\r\n // // return {\r\n // // shipmentDetails: {\r\n // // currentException: false,\r\n // // potentialException: false,\r\n // // shipmentDetails: true\r\n // // },\r\n // // trackTrace: {\r\n // // exceptions: false,\r\n // // results: true\r\n // // },\r\n // // billOfLading: {\r\n // // billOfLading: true,\r\n // // },\r\n // // account: {\r\n // // account: true,\r\n // // notifications: true\r\n // // }\r\n // // };\r\n // }\r\n }\r\n\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .directive('contacts', ['$translate', contacts]);\r\n\r\n /* @ngInject */\r\n function contacts($translate) {\r\n var directive = {\r\n link: link,\r\n templateUrl: \"/app/components/contacts/user-rep.html\",\r\n controller: \"ContactsController\",\r\n controllerAs: \"vm\",\r\n restrict: 'EA',\r\n scope: {\r\n }\r\n };\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n $translate(attrs.title).then(function(t) {\r\n element[0].title = t;\r\n });\r\n }\r\n }\r\n})();\n/**\r\n * @ngdoc module\r\n * @name WidgetsController\r\n *\r\n * @description The WidgetsController module interfaces with the various types of widgets displayed through-out the system\r\n *\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name toggleCollapse\r\n * @description to toggle the collapsed state of the widget\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.contacts')\r\n .controller('ContactsController', ContactsController);\r\n\r\n /** @ngInject */\r\n ContactsController.$inject = ['ContactsService', 'AdvSearchService', 'ShippingDetailsService', '$scope', '$log', '$translatePartialLoader', '$window', '$mdMedia', '$mdDialog', '$location', '$mdToast', '$state'];\r\n function ContactsController(ContactsService, AdvSearchService, ShippingDetailsService, $scope, $log, $translatePartialLoader, $window, $mdMedia, $mdDialog, $location, $mdToast, $state) {\r\n var vm = this;\r\n // /* Tell the translator where to grab translations from */\r\n // $translatePartialLoader.addPart('widgets');\r\n // $translatePartialLoader.addPart('shippingdetails');\r\n\r\n // --------------------------\r\n // Contact variables\r\n // --------------------------\r\n\r\n vm.contactMessageData = ContactsService.getContactMessageData();\r\n vm.contact = ContactsService.getContactInfo();\r\n //$scope.contact = vm.contact;\r\n vm.contactName = getContactName();\r\n vm.toastPosition = angular.extend({}, vm.last);\r\n vm.noContact = false;\r\n vm.willSendUrl = true;\r\n\r\n // --------------------------\r\n // Fun Fun Functions\r\n // --------------------------\r\n vm.sendMessage = sendMessage;\r\n vm.getContactName = getContactName;\r\n vm.closeModal = closeModal;\r\n vm.getCurrentUrl = getCurrentUrl;\r\n vm.getCurrentFields = getCurrentFields;\r\n vm.getIsInBillOfLading = getIsInBillOfLading;\r\n vm.getIsInAccount = getIsInAccount;\r\n vm.getIsInTrackTrace = getIsInTrackTrace;\r\n vm.getIsInShipmentDetails = getIsInShipmentDetails;\r\n vm.getShipmentDetails = getShipmentDetails;\r\n vm.showContactModal = showContactModal;\r\n vm.showToastWithUrl = showToastWithUrl;\r\n vm.getToastPosition = getToastPosition;\r\n vm.sanitizePosition = sanitizePosition;\r\n vm.getSubjects = getSubjects;\r\n vm.contactPhone = contactPhone;\r\n vm.custType = \"\";\r\n\r\n if(localStorage.switchEmail || localStorage.userCompany || localStorage.userDepartment){\r\n vm.menutogglebtn = true;\r\n }else\r\n {\r\n vm.menutogglebtn = false;\r\n }\r\n\r\n vm.subjects = vm.getSubjects();\r\n\r\n vm.contactMail = function(emailId) {\r\n $log.debug(emailId);\r\n $window.open(\"mailto:\"+ emailId);\r\n }\r\n\r\n\r\n if($state.current.name == 'dashboard' || $state.current.name == 'track-trace'){\r\n vm.custType = \"cww\";\r\n if (vm.contact.hasOwnProperty('cww')){\r\n $scope.contact = vm.contact.cww;\r\n vm.contact.photo_url = vm.contact.cww.photo_url;\r\n }\r\n }\r\n else if($state.current.name == 'dashboardCsl' || $state.current.name == 'track-trace-csl'){\r\n vm.custType = \"csl\";\r\n if (vm.contact.hasOwnProperty('csl')){\r\n $scope.contact = vm.contact.csl;\r\n vm.contact.photo_url = vm.contact.csl.photo_url;\r\n }\r\n }\r\n else if($state.current.name == 'dashboardCfs' || $state.current.name == 'track-trace-cfs'){\r\n vm.custType = \"cfs\";\r\n if (vm.contact.hasOwnProperty('cfs')){\r\n $scope.contact = vm.contact.cfs;\r\n vm.contact.photo_url = vm.contact.cfs.photo_url;\r\n }\r\n }\r\n else if($state.current.name == 'dashboardCmts' || $state.current.name == 'track-trace-cmts'){\r\n vm.custType = \"cmts\";\r\n if (vm.contact.hasOwnProperty('cmts')){\r\n $scope.contact = vm.contact.cmts;\r\n vm.contact.photo_url = vm.contact.cmts.photo_url;\r\n }\r\n }\r\n else{\r\n var lt = null\r\n for (var key in vm.contact) {\r\n $scope.contact = vm.contact[key];\r\n try{\r\n if(vm.contact[key].photo_url){\r\n vm.contact.photo_url = vm.contact[key].photo_url;\r\n break;\r\n }else{\r\n vm.contact.photo_url = \"\";\r\n }\r\n }\r\n catch(e){\r\n vm.contact.photo_url = \"\";\r\n }\r\n }\r\n }\r\n\r\n\r\n // $scope.$on(\"contactsService:statusesChanged\", function(){\r\n // vm.subjects = ContactsService.getSubjects();\r\n // });\r\n\r\n\r\n\r\n function sendMessage() {\r\n $log.debug('send a message');\r\n //set contact message with the details\r\n var details;\r\n\r\n if (vm.willSendUrl) {\r\n if(vm.getIsInShipmentDetails()) {\r\n vm.contactMessageData.message += \"\\n\\n Details: \\n\";\r\n details = vm.getShipmentDetails();\r\n } else if(vm.getIsInTrackTrace()) {\r\n vm.contactMessageData.message += \"\\n\\n Details: \\n\";\r\n var fields = angular.copy(vm.getCurrentFields());\r\n details = [];\r\n for (var field in fields){\r\n if (fields[field].value !== ''){\r\n details.push({text: fields[field].field, value: fields[field].value});\r\n }\r\n }\r\n }\r\n for(var k in details) {\r\n vm.contactMessageData.message += details[k].text + \": \" + details[k].value + \"\\n\";\r\n }\r\n }\r\n\r\n // Should we include the url?\r\n if (vm.contactMessageData.subject !== 'General Account' || vm.willSendUrl ){\r\n vm.contactMessageData.url_from = vm.getCurrentUrl();\r\n } else {\r\n vm.contactMessageData.url_from = \"\";\r\n }\r\n\r\n if(vm.custType){\r\n vm.contactMessageData.customer_type = vm.custType;\r\n }\r\n\r\n ContactsService.postMessage(vm.contactMessageData).then(function onSuccess(response){\r\n vm.showToastWithUrl('/app/components/contacts/message-success.toast.html');\r\n delete vm.contactMessageData;\r\n }, function onError(response){\r\n vm.showToastWithUrl('/app/components/contacts/message-error.toast.html');\r\n });\r\n $mdDialog.hide();\r\n }\r\n\r\n var activeWidgetRange = false;\r\n function contactPhone() {\r\n $mdDialog.show({\r\n parent: angular.element(document.body),\r\n templateUrl: '/app/components/contacts/contact-phone.html',\r\n clickOutsideToClose:true,\r\n scope: $scope,\r\n preserveScope: true\r\n }).then(function() {\r\n activeWidgetRange = false;\r\n });\r\n }\r\n\r\n function getContactName() {\r\n if (!vm.contact){\r\n vm.noContact = true;\r\n return \"\";\r\n }\r\n\r\n if($state.current.name == 'dashboard' || $state.current.name == 'track-trace'){\r\n if (vm.contact.hasOwnProperty('cww')){\r\n if (vm.contact.cww.first_name && vm.contact.cww.last_name){\r\n return [vm.contact.cww.first_name, vm.contact.cww.last_name].join(' ');\r\n } else {\r\n return vm.contact.cww.email;\r\n }\r\n }\r\n }\r\n else if($state.current.name == 'dashboardCsl' || $state.current.name == 'track-trace-csl'){\r\n if (vm.contact.hasOwnProperty('csl')){\r\n if (vm.contact.csl.first_name && vm.contact.csl.last_name){\r\n return [vm.contact.csl.first_name, vm.contact.csl.last_name].join(' ');\r\n } else {\r\n return vm.contact.csl.email;\r\n }\r\n }\r\n }\r\n else if($state.current.name == 'dashboardCfs' || $state.current.name == 'track-trace-cfs'){\r\n if (vm.contact.hasOwnProperty('cfs')){\r\n if (vm.contact.cfs.first_name && vm.contact.cfs.last_name){\r\n return [vm.contact.cfs.first_name, vm.contact.cfs.last_name].join(' ');\r\n } else {\r\n return vm.contact.cfs.email;\r\n }\r\n }\r\n }\r\n else if($state.current.name == 'dashboardCmts' || $state.current.name == 'track-trace-cmts'){\r\n if (vm.contact.hasOwnProperty('cmts')){\r\n if (vm.contact.cmts.first_name && vm.contact.cmts.last_name){\r\n return [vm.contact.cmts.first_name, vm.contact.cmts.last_name].join(' ');\r\n } else {\r\n return vm.contact.cmts.email;\r\n }\r\n }\r\n }\r\n else{\r\n var lt = null\r\n for (var key in vm.contact) {\r\n if(vm.contact[key].first_name && vm.contact[key].last_name){\r\n return [vm.contact[key].first_name, vm.contact[key].last_name].join(' ');\r\n break;\r\n }else\r\n {\r\n return vm.contact[key].email;\r\n break;\r\n }\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n }\r\n\r\n //closes a modal\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function getCurrentUrl() {\r\n return $location.absUrl();\r\n }\r\n\r\n function getCurrentFields() {\r\n\r\n return AdvSearchService.getCurrentSearchFields();\r\n }\r\n\r\n function getSubjects(){\r\n ContactsService.getDefaultSubjectStatuses();\r\n switch ($state.current.name){\r\n case \"track-trace\":\r\n return ContactsService.getSubjects('trackTrace');\r\n case \"shipping-details\":\r\n return ContactsService.getSubjects('shipmentDetails');\r\n case \"book-shipment\":\r\n return ContactsService.getSubjects('billOfLading');\r\n case \"user\":\r\n return ContactsService.getSubjects('account');\r\n default:\r\n return ContactsService.getSubjects('default');\r\n }\r\n\r\n }\r\n\r\n function getIsInBillOfLading() {\r\n return $location.path() == '/book-shipment';\r\n }\r\n\r\n function getIsInAccount() {\r\n return $location.path() == '/user';\r\n }\r\n\r\n function getIsInTrackTrace() {\r\n return $location.path() == '/track-trace';\r\n }\r\n\r\n function getIsInShipmentDetails() {\r\n var isIn = $location.path().indexOf('/shipping-details') > -1; //if the path contains /shipping-details\r\n if(isIn) vm.data = ShippingDetailsService.getShipmentVariable(); //shipment data to show\r\n return isIn;\r\n }\r\n\r\n function getShipmentDetails() {\r\n return ShippingDetailsService.getShipmentSummary();\r\n }\r\n\r\n //shows the modal based on the string you pass in\r\n function showContactModal(ev) {\r\n vm.subjects = getSubjects();\r\n if (!vm.contactMessageData){\r\n vm.contactMessageData = ContactsService.getContactMessageData();\r\n vm.willSendUrl = true;\r\n }\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/components/contacts/contacts.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n preserveScope: true,\r\n scope: $scope\r\n })\r\n .then(function(answer) {\r\n //on submit\r\n }, function() {\r\n //on close out or cancel\r\n });\r\n }\r\n\r\n function showToastWithUrl(url) {\r\n var pinTo = vm.getToastPosition();\r\n var toast = $mdToast.show({\r\n position: pinTo,\r\n hideDelay: 3000,\r\n templateUrl: url,\r\n parent: angular.element(document.getElementById('toast-parent')),\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n $mdToast.show(toast);\r\n }\r\n\r\n\r\n function getToastPosition() {\r\n sanitizePosition();\r\n return Object.keys(vm.toastPosition)\r\n .filter(function(pos) { return vm.toastPosition[pos]; })\r\n .join(' ');\r\n }\r\n\r\n function sanitizePosition() {\r\n var current = vm.toastPosition;\r\n if ( current.bottom && vm.last.top ) current.top = false;\r\n if ( current.top && vm.last.bottom ) current.bottom = false;\r\n if ( current.right && vm.last.left ) current.left = false;\r\n if ( current.left && vm.last.right ) current.right = false;\r\n vm.last = angular.extend({},current);\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .controller('SearchPreviousController', SearchPreviousController);\r\n\r\n /* @ngInject */\r\n SearchPreviousController.$inject = ['$scope', '$element', '$http', '$timeout', '$q', 'api', 'BookShipmentService', '$mdToast', 'AJAX'];\r\n function SearchPreviousController($scope, $element, $http, $timeout, $q, api, BookShipmentService, $mdToast, AJAX) {\r\n var vm = this;\r\n\r\n /* Functions */\r\n vm.clickedSearch = clickedSearch;\r\n\r\n /* Variables */\r\n $scope.isLoading = false;\r\n $scope.bolSliCmrSearch = '';\r\n $scope.value = '';\r\n\r\n var canceler, timeoutTid;\r\n vm.validReferenceCodes = ['CUST', 'PO', 'SHPR', 'SONO', 'CSGN' ];\r\n\r\n /**\r\n * Handles debouncing\r\n */\r\n function clickedSearch(event) {\r\n var value = $scope.bolSliCmrSearch.trim();\r\n if (value.length < 3) {\r\n showToastWithFile('lookup-none.error.html', '');\r\n return;\r\n }\r\n\r\n $scope.value = value;\r\n $scope.isLoading = true;\r\n search();\r\n }\r\n\r\n /**\r\n * Performs the actual search\r\n */\r\n function search() {\r\n // stop any previous searches\r\n if (canceler) {\r\n canceler.resolve();\r\n $timeout.cancel(timeoutTid);\r\n }\r\n\r\n // perform request\r\n canceler = $q.defer();\r\n $http.get(api.url + '/book_shipments_lookup?awb=' + $scope.value, {timeout: canceler.promise})\r\n .then(function(res){\r\n doneLoading();\r\n if(!res) return; //return if no data\r\n if(res.data[0]) {\r\n showToastWithFile('lookup.success.html', '');\r\n } else {\r\n showToastWithFile('lookup-none.error.html', '');\r\n return;\r\n }\r\n var shipment = res.data[0];\r\n //set the Bookshipment service with the correct values\r\n var booking = clearBookings(BookShipmentService.getCurrentShipOrder()); //clear the bookings first\r\n\r\n var mapping =[ //maps between the response and the form data\r\n {field: 'consigneeaddress1', subPath: 'shipper_consignee_info', value: 'consigneeAddress1'},\r\n {field: 'consigneeaddress2', subPath: 'shipper_consignee_info', value: 'consigneeAddress2'},\r\n {field: 'consigneeaddress3', subPath: 'shipper_consignee_info', value: 'consigneeAddress3'},\r\n {field: 'consigneeaddress4', subPath: 'shipper_consignee_info', value: 'consigneeAddress4'},\r\n {field: 'consigneecity', subPath: 'shipper_consignee_info', value: 'consigneeCity'},\r\n {field: 'consigneecountry', subPath: 'shipper_consignee_info', value: 'consigneeCountry'},\r\n {field: 'consigneestate', subPath: 'shipper_consignee_info', value: 'consigneeState'},\r\n {field: 'consigneetelephone', subPath: 'shipper_consignee_info', value: 'consigneePhone'},\r\n {field: 'consigneezipcode', subPath: 'shipper_consignee_info', value: 'consigneePostalCode'},\r\n {field: 'customeraddress1', subPath: 'customer_info', value: 'customerAddress1'},\r\n {field: 'customeraddress2', subPath: 'customer_info', value: 'customerAddress2'},\r\n {field: 'customername', subPath: 'customer_info', value: 'customer'},\r\n {field: 'customerzipcode', subPath: 'customer_info', value: 'customerPostalCode'},\r\n {field: 'servicelevelcode', subPath: 'shipment_options', value: 'serviceLevel'},\r\n {field: 'servicetypecode', subPath: 'shipment_options', value: 'serviceType'},\r\n {field: 'shipperaddress1', subPath: 'shipper_consignee_info', value: 'shipperAddress1'},\r\n {field: 'shipperaddress2', subPath: 'shipper_consignee_info', value: 'shipperAddress2'},\r\n {field: 'shipperaddress3', subPath: 'shipper_consignee_info', value: 'shipperAddress3'},\r\n {field: 'shipperaddress4', subPath: 'shipper_consignee_info', value: 'shipperAddress4'},\r\n {field: 'shippercity', subPath: 'shipper_consignee_info', value: 'shipperCity'},\r\n {field: 'shippercountry', subPath: 'shipper_consignee_info', value: 'shipperCountry'},\r\n {field: 'shippername', subPath: 'shipper_consignee_info', value: 'shipper'},\r\n {field: 'consigneename', subPath: 'shipper_consignee_info', value: 'consignee'},\r\n {field: 'shipperzipcode', subPath: 'shipper_consignee_info', value: 'shipperPostalCode'},\r\n {field: 'shipperpartyid', subPath: 'shipper_consignee_info', value: 'shipperAccountCode'},\r\n {field: 'consigneepartyid', subPath: 'shipper_consignee_info', value: 'consigneeAccountCode'},\r\n {field: 'customerpartyid', subPath: 'customer_info', value: 'customerAccountCode'},\r\n {field: 'customertelephone', subPath: 'customer_info', value: 'customerPhone'},\r\n {field: 'consigneepic', subPath: 'shipper_consignee_info', value: 'consigneeContactName'},\r\n {field: 'shipperstate', subPath: 'shipper_consignee_info', value: 'shipperState'},\r\n\r\n\r\n\r\n\r\n\r\n ];\r\n //set the form data values\r\n var invoice_shipment = shipment.shipment || {};\r\n for(var k in mapping) {\r\n var obj = mapping[k];\r\n booking[obj.subPath][obj.value] = shipment[obj.field] || invoice_shipment[obj.field];\r\n }\r\n\r\n //set the reference numbers\r\n if(shipment.reference_numbers.length > 0) booking.reference_numbers.length = 0; //reset it to nothing\r\n for(var k in shipment.reference_numbers) {\r\n var rn = shipment.reference_numbers[k];\r\n var reference_code = vm.validReferenceCodes.includes(rn.referencecode) ? rn.referencecode : undefined;\r\n\r\n booking.reference_numbers.push({type: reference_code, reference: rn.referencenumber});\r\n // var keys = Object.keys(shipment.reference_numbers[k]);\r\n // for(var j in keys) {\r\n // var obj = {};\r\n // //TODO: figure out how we wnat to handle type as it is a select but can have custom values?\r\n // obj.type = keys[j];\r\n // obj.reference = shipment.reference_numbers[k][keys[j]];\r\n // if(obj.type && obj.reference) {\r\n // booking.reference_numbers.push(obj);\r\n // }\r\n // }\r\n }\r\n // mark the correct service level type\r\n\r\n var origin = {citycode: (shipment.origincitycode || invoice_shipment.origincitycode),\r\n countrycode: (shipment.origincountryycode || invoice_shipment.origincountrycode),\r\n name: (shipment.origin || invoice_shipment.origin) };\r\n\r\n var destination = {citycode: (shipment.destinationcitycode || invoice_shipment.destinationcitycode),\r\n countrycode: (shipment.destinationcountrycode || invoice_shipment.destinationcountrycode),\r\n name: (shipment.destination || invoice_shipment.destination) };\r\n var originCityCountry = (origin.countrycode + origin.citycode);\r\n var destinationCityCountry = (destination.countrycode + destination.citycode);\r\n\r\n booking.customer_info.destination = {value: destinationCityCountry , display: (destination.name + \" - \" + destinationCityCountry ) };\r\n booking.customer_info.origin = {value: originCityCountry , display: (origin.name + \" - \" + originCityCountry ) };\r\n\r\n if (!booking.customer_info.paymentOptions ){\r\n booking.customer_info.paymentOptions = 'prepaid';\r\n }\r\n\r\n if (booking.shipment_options.serviceLevel) {\r\n BookShipmentService.getServiceLevelTypes().then(function(types) {\r\n angular.forEach(types, function(t) {\r\n angular.forEach(t.options, function(o) {\r\n if (booking.shipment_options.serviceLevel == o.value) {\r\n booking.shipment_options.serviceLevelType = t.serviceLevelType;\r\n }\r\n })\r\n })\r\n });\r\n }\r\n }, function() {\r\n doneLoading();\r\n }).catch(function(error) {\r\n doneLoading();\r\n showToastWithFile('lookup.error.html', '');\r\n });\r\n\r\n // request timeout\r\n timeoutTid = $timeout(function() {\r\n if (canceler) canceler.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function doneLoading() {\r\n $scope.isLoading = false;\r\n canceler = false;\r\n }\r\n\r\n function clearBookings(booking){\r\n for (var form in booking){\r\n for (var field in booking[form]){\r\n if(form == 'item_details' || form == 'reference_numbers') {\r\n for(var k in booking[form][field]) {\r\n if (booking[form][field].hasOwnProperty(k)){\r\n booking[form][field][k] = \"\";\r\n }\r\n }\r\n }\r\n else {\r\n if (booking[form].hasOwnProperty(field)){\r\n booking[form][field] = \"\";\r\n }\r\n }\r\n }\r\n }\r\n booking.serviceLevelType = '';\r\n return booking;\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, messages) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/book-shipment/toast/' + file,\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n }\r\n\r\n})();\r\n\n/**\r\n * @ngdoc directive\r\n * @name auto-complete\r\n * @description directive that creates an autocomplete form\r\n * @restrict E\r\n */\r\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .directive('cslAutoComplete', cslAutoComplete)\r\n\r\n /** @ngInject */\r\n function cslAutoComplete() {\r\n var directive = {\r\n restrict: 'E',\r\n scope: {\r\n field: '@',\r\n searchField: '@',\r\n displayName: '@',\r\n searchText: '=',\r\n focusField: '=',\r\n extraParamString: '@'\r\n },\r\n templateUrl: '/app/advanced-search/auto-complete-field.html',\r\n controller: \"AdvSearchCslController\",\r\n controllerAs: \"searchCtrl\",\r\n link: function(scope, element, attrs){\r\n // debugger;\r\n }\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.search\r\n * @description method that includes the current search fields into a search\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.autocomplete\r\n * @description method that querys from the database given the letters typed in\r\n * @param {query} - the letters from the input field\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.saveDefaultSearch\r\n * @description method that saves a search\r\n * @param {query} - the searchFields that you want to saved\r\n * @param {name} - name for the search that your saving\r\n * @param {isDefault} - true or false wether this is your default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.listSavedSearches\r\n * @description method that lists all the searches that have been saved\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.loadSearch\r\n * @description method that loads the search with the given id\r\n * @param {id} - the id for the search that you want to load\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.deleteSearch\r\n * @description method that deletes the search with the given id\r\n * @param {id} - the id for the search that you want to delete\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getEmptySearchFields\r\n * @description method that gets the empty search field\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getCurrentSearchFields\r\n * @description method that gets the current search fields\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getIsFirstSearch\r\n * @description method that gets if the search is the first search or not\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setIsFirstSearch\r\n * @description method that sets if the search is the first search or not\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setCurrentSearchFields\r\n * @params {searchFields}\r\n * @description method that sets teh current search fields with searchFields\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setClickedChip\r\n * @description method TODO\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.removeChip\r\n * @description method TODO\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getSearchFieldsFocus\r\n * @description method TODO\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('AdvSearchCslService', AdvSearchCslService);\r\n\r\n /** @ngInject */\r\n AdvSearchCslService.$inject = ['$http', '$log', '$filter', 'api', '$q', '$timeout', '$rootScope', '$location', 'DownloadService', 'TrackTraceCslPaginationService'];\r\n function AdvSearchCslService($http, $log, $filter, api, $q, $timeout, $rootScope, $location, DownloadService, TrackTraceCslPaginationService) {\r\n\r\n var isSavedSearch = false;\r\n var modifySearchVal=false;\r\n var searchFieldChips = [];\r\n listSavedSearches(); //sets isSavedSearch\r\n var isFirstSearch = true; //saves if it is the first search\r\n var timeoutPromise = false;\r\n\r\n var emptySearchFields = {\r\n shipdate_from: {\r\n field: \"shipdate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SHIP_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipdate_to: {\r\n field: \"shipdate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SHIP_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n /*shipper: {\r\n field: \"shipper\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SHIPPER\",\r\n displayValue: true,\r\n focus: false\r\n },*/\r\n reference: {\r\n field: \"reference\",\r\n value: \"\",\r\n display: \"Reference\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n // bol: {\r\n // field: \"bol\",\r\n // value: \"\",\r\n // display: \"TRACKTRACE.AWB_BOL\",\r\n // displayValue: true,\r\n // focus: false\r\n // },\r\n pro: {\r\n field: \"pro\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PRO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickupapptdate_from: {\r\n field: \"pickupapptdate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PICKUP_APPT_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickupapptdate_to: {\r\n field: \"pickupapptdate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PICKUP_APPT_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n deliverydate_from: {\r\n field: \"deliverydate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DELIVERY_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n deliverydate_to: {\r\n field: \"deliverydate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DELIVERY_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consigneeapptdate_from: {\r\n field: \"consigneeapptdate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CONSIGNEE_APPT_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consigneeapptdate_to: {\r\n field: \"consigneeapptdate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CONSIGNEE_APPT_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n duedate_from: {\r\n field: \"duedate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DUE_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n duedate_to: {\r\n field: \"duedate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DUE_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimateddate_from: {\r\n field: \"estimateddate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ESTIMATED_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimateddate_to: {\r\n field: \"estimateddate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ESTIMATED_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n reason_code: {\r\n field: \"reason_code\",\r\n value: \"\",\r\n display: \"TRACKTRACE.REASON_CODE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_status: {\r\n field: \"shipment_status\",\r\n value: \"\",\r\n display: \"TRACKTRACE.STATUS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n /*status: {\r\n field: \"status\",\r\n value: \"\",\r\n display: \"TRACKTRACE.STATUS\",\r\n displayValue: true,\r\n focus: false\r\n },*/\r\n milestone: {\r\n field: \"milestone\",\r\n value: \"\",\r\n display: \"TRACKTRACE.MILESTONE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n quick_filter: {\r\n field: \"quick_filter\",\r\n value: [],\r\n display: \"TRACKTRACE.FILTER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n arrive_date_from: {\r\n field: \"arrive_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ARRIVE_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n arrive_date_to: {\r\n field: \"arrive_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ARRIVE_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n origins: {\r\n field: \"origins\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ORIGINS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n destinations: {\r\n field: \"destinations\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DESTINATIONS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n destinationstate: {\r\n field: \"destinationstate\",\r\n value: \"\",\r\n display: \"Delivery City / State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n originstate: {\r\n field: \"originstate\",\r\n value: \"\",\r\n display: \"Pickup City / State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n booking_number: {\r\n field: \"booking_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.BOOKING_NUMBER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n customername: {\r\n field: \"customername\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CUSTOMER_NAME\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n customeraddress1: {\r\n field: \"customeraddress1\",\r\n value: \"\",\r\n display: \"Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n customerphone: {\r\n field: \"customerphone\",\r\n value: \"\",\r\n display: \"Customer Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_delivery_status: {\r\n field: \"shipment_delivery_status\",\r\n value: \"\",\r\n display: \"Delivery Status\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_current_status: {\r\n field: \"shipment_current_status\",\r\n value: \"\",\r\n display: \"Current Status\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_is_less_than: {\r\n field: \"shipment_invoice_total_is_less_than\",\r\n value: \"\",\r\n display: \"Invoice total <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_is_greater_than: {\r\n field: \"shipment_invoice_total_is_greater_than\",\r\n value: \"\",\r\n display: \"Invoice total >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_equal_to: {\r\n field: \"shipment_invoice_total_equal_to\",\r\n value: \"\",\r\n display: \"Invoice total =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_range: {\r\n field: \"shipment_invoice_total_range\",\r\n value: \"\",\r\n display: \"Invoice total between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_range: {\r\n field: \"shipment_gross_weight_range\",\r\n value: \"\",\r\n display: \"Gross Weight between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_equal_to: {\r\n field: \"shipment_gross_weight_equal_to\",\r\n value: \"\",\r\n display: \"Gross Weight =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_is_greater_than: {\r\n field: \"shipment_gross_weight_is_greater_than\",\r\n value: \"\",\r\n display: \"Gross Weight >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_is_less_than: {\r\n field: \"shipment_gross_weight_is_less_than\",\r\n value: \"\",\r\n display: \"Gross Weight <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_is_less_than: {\r\n field: \"shipment_total_pieces_is_less_than\",\r\n value: \"\",\r\n display: \"Total Pieces <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_is_greater_than: {\r\n field: \"shipment_total_pieces_is_greater_than\",\r\n value: \"\",\r\n display: \"Total Pieces >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_equal_to: {\r\n field: \"shipment_total_pieces_equal_to\",\r\n value: \"\",\r\n display: \"Total Pieces =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_range: {\r\n field: \"shipment_total_pieces_range\",\r\n value: \"\",\r\n display: \"Total Pieces Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n\r\n shipment_invoice: {\r\n field: \"shipment_invoice\",\r\n value: \"\",\r\n display: \"Invoice\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_consignee_reference: {\r\n field: \"shipment_consignee_reference\",\r\n value: \"\",\r\n display: \"CONSIGNEE REF #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_pro: {\r\n field: \"shipment_pro\",\r\n value: \"\",\r\n display: \"PRO #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_bol: {\r\n field: \"shipment_bol\",\r\n value: \"\",\r\n display: \"BOL #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_reference: {\r\n field: \"shipment_reference\",\r\n value: \"\",\r\n display: \"REF #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_load: {\r\n field: \"shipment_load\",\r\n value: \"\",\r\n display: \"LOAD #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_container: {\r\n field: \"shipment_container\",\r\n value: \"\",\r\n display: \"Container/Trailer #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_is_bookmarked: {\r\n field: \"shipment_is_bookmarked\",\r\n value: \"\",\r\n display: \"Isbookmarked\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n deliverydate_date_equal_to: {\r\n field: \"deliverydate_date_equal_to\",\r\n value: \"\",\r\n display: \"Delivered Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n deliverydate_date_range_to: {\r\n field: \"deliverydate_date_range_to\",\r\n value: \"\",\r\n display: \"Delivered Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n\r\n shipment_pickup_date_equal_to: {\r\n field: \"shipment_pickup_date_equal_to\",\r\n value: \"\",\r\n display: \"Pick Up Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_pickup_date_range_to: {\r\n field: \"shipment_pickup_date_range_to\",\r\n value: \"\",\r\n display: \"Pickup Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_pickup_time_equal_to: {\r\n field: \"shipment_pickup_time_equal_to\",\r\n value: \"\",\r\n display: \"Pick Up Time\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_pickup_time_range_to: {\r\n field: \"shipment_pickup_time_range_to\",\r\n value: \"\",\r\n display: \"Pick Up Time Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_deliveryeta_date_equal_to: {\r\n field: \"shipment_deliveryeta_date_equal_to\",\r\n value: \"\",\r\n display: \"Delivery ETA Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_deliveryeta_date_range_to: {\r\n field: \"shipment_deliveryeta_date_range_to\",\r\n value: \"\",\r\n display: \"Delivery ETA Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_mustship_date_equal_to: {\r\n field: \"shipment_mustship_date_equal_to\",\r\n value: \"\",\r\n display: \"Must Ship Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_mustship_date_range_to: {\r\n field: \"shipment_mustship_date_range_to\",\r\n value: \"\",\r\n display: \"Must Ship Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_mustdeliver_date_equal_to: {\r\n field: \"shipment_mustdeliver_date_equal_to\",\r\n value: \"\",\r\n display: \"Must Deliver Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_mustdeliver_date_range_to: {\r\n field: \"shipment_mustdeliver_date_range_to\",\r\n value: \"\",\r\n display: \"Must Deliver Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipdate_date_equal_to: {\r\n field: \"shipdate_date_equal_to\",\r\n value: \"\",\r\n display: \"Ship Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipdate_date_range_to: {\r\n field: \"shipdate_date_range_to\",\r\n value: \"\",\r\n display: \"Ship Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n duedate_date_equal_to: {\r\n field: \"duedate_date_equal_to\",\r\n value: \"\",\r\n display: \"Due Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n duedate_date_range_to: {\r\n field: \"duedate_date_range_to\",\r\n value: \"\",\r\n display: \"Due Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimateddelivery_date_equal_to: {\r\n field: \"estimateddelivery_date_equal_to\",\r\n value: \"\",\r\n display: \"Expected Delivery Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimateddelivery_date_range_to: {\r\n field: \"estimateddelivery_date_range_to\",\r\n value: \"\",\r\n display: \"Expected Delivery Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_origin_state: {\r\n field: \"shipment_origin_state\",\r\n value: \"\",\r\n display: \"Pickup State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_origin_city: {\r\n field: \"shipment_origin_city\",\r\n value: \"\",\r\n display: \"Pickup City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_destination_state: {\r\n field: \"shipment_destination_state\",\r\n value: \"\",\r\n display: \"Delivery State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_destination_city: {\r\n field: \"shipment_destination_city\",\r\n value: \"\",\r\n display: \"Delivery City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shippername: {\r\n field: \"shippername\",\r\n value: \"\",\r\n display: \"Shipper Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_name: {\r\n field: \"consignee_name\",\r\n value: \"\",\r\n display: \"Consignee Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_contact_name: {\r\n field: \"consignee_contact_name\",\r\n value: \"\",\r\n display: \"Consignee Contact Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_street_address: {\r\n field: \"consignee_street_address\",\r\n value: \"\",\r\n display: \"Consignee Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_state: {\r\n field: \"consignee_state\",\r\n value: \"\",\r\n display: \"Consignee State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_city: {\r\n field: \"consignee_city\",\r\n value: \"\",\r\n display: \"Consignee City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_zip: {\r\n field: \"consignee_zip\",\r\n value: \"\",\r\n display: \"Consignee Zip\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_phone: {\r\n field: \"consignee_phone\",\r\n value: \"\",\r\n display: \"Consignee Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_name: {\r\n field: \"pickup_name\",\r\n value: \"\",\r\n display: \"Pickup Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_contact_name: {\r\n field: \"pickup_contact_name\",\r\n value: \"\",\r\n display: \"Pickup Contact Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_street_address: {\r\n field: \"pickup_street_address\",\r\n value: \"\",\r\n display: \"Pickup Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_state: {\r\n field: \"pickup_state\",\r\n value: \"\",\r\n display: \"Pickup State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_city: {\r\n field: \"pickup_city\",\r\n value: \"\",\r\n display: \"Pickup City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_zip: {\r\n field: \"pickup_zip\",\r\n value: \"\",\r\n display: \"Pickup Zip\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_phone: {\r\n field: \"pickup_phone\",\r\n value: \"\",\r\n display: \"Pickup Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_equipment_type: {\r\n field: \"shipment_equipment_type\",\r\n value: \"\",\r\n display: \"Equipment Type\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_type: {\r\n field: \"shipment_type\",\r\n value: \"\",\r\n display: \"Shipment Type\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n forecast_aljex_custom_options: {\r\n field: \"forecast_aljex_custom_options\",\r\n value: \"\",\r\n display: \"Forecast Custom Option\",\r\n displayValue: true,\r\n focus: false\r\n }\r\n };\r\n\r\n var search_params = [],\r\n hasLoadedSearchValues = false,\r\n currentSearchFields = angular.copy(emptySearchFields),\r\n query = {};\r\n updateQuery();\r\n removeCloseMarkInChips;\r\n\r\n function listSavedSearches() {\r\n\r\n\r\n var promise = $http.get(api.url_v2 + '/search/saved').then(function(res){\r\n $log.debug(res);\r\n isSavedSearch = res['data'].length > 0;\r\n return res;\r\n });\r\n return promise;\r\n }\r\n\r\n function deleteSearch(id) {\r\n var promise = $http.delete(api.url_v2 + '/search/saved/' + id).then(function(res){\r\n $log.debug(res);\r\n });\r\n return promise;\r\n }\r\n\r\n //goes through the search fields from advance search and generates an object for pills\r\n function generateChips() {\r\n var k = 0; //for the chipTranslations index\r\n searchFieldChips.length = 0;\r\n var shipbetweendate = localStorage.getItem('shipbetweendate');\r\n var duebetweendate = localStorage.getItem('duebetweendate');\r\n var deliveredbetweendate = localStorage.getItem('deliveredbetweendate');\r\n var expectedbetweendate = localStorage.getItem('expectedbetweendate');\r\n for (var i in currentSearchFields) {\r\n\r\n if(currentSearchFields[i].value !== null && currentSearchFields[i].value !== \"\" && i != 'quick_filter' && (i != 'invalidate_cache')) { //dont make chips for quick_filter\r\n var object = {};\r\n object['key'] = currentSearchFields[i].field;\r\n object['display'] = currentSearchFields[i].display;\r\n\r\n /*if(currentSearchFields[i].display.includes('Time') ){\r\n currentSearchFields[i].value = new Date(currentSearchFields[i].value);\r\n }\r\n debugger;*/\r\n // code for between dates invalid issue after refresh\r\n\r\n if(currentSearchFields[i].display == 'Ship Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('shipbetweendate') : currentSearchFields[i].value;\r\n }\r\n else if(currentSearchFields[i].display == 'Due Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('duebetweendate') : currentSearchFields[i].value;\r\n }\r\n\r\n else if(currentSearchFields[i].display == 'Delivered Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('deliveredbetweendate') : currentSearchFields[i].value;\r\n }\r\n\r\n else if(currentSearchFields[i].display == 'Expected Delivery Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('expectedbetweendate') : currentSearchFields[i].value;\r\n }\r\n else{\r\n object['searchField'] = currentSearchFields[i].value;\r\n }\r\n object['displayValue'] = currentSearchFields[i].displayValue;\r\n\r\n if(object.display.includes('Ship Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('shipbetweendate',object['searchField']);\r\n }\r\n\r\n if(object.display.includes('Due Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('duebetweendate',object['searchField']);\r\n }\r\n\r\n if(object.display.includes('Delivered Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('deliveredbetweendate',object['searchField']);\r\n }\r\n\r\n if(object.display.includes('Expected Delivery Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('expectedbetweendate',object['searchField']);\r\n }\r\n\r\n if(i == 'milestone' ) {\r\n if (currentSearchFields[i].value.length > 1){\r\n var status_arr = currentSearchFields[i].value.split(/[\\s,]+/)\r\n\r\n for (j=0; j < status_arr.length; j++){\r\n\r\n status_arr[j] = get_milestone(status_arr[j])\r\n }\r\n\r\n object['searchField'] = status_arr.join(\" , \");\r\n\r\n }else {\r\n object['searchField'] = get_milestone(currentSearchFields[i].value);\r\n }\r\n\r\n // if(currentSearchFields[i].value == '7') object['searchField'] = 'tord';\r\n // if(currentSearchFields[i].value == '8') object['searchField'] = 'released';\r\n // } else if(i == 'business_type' || i == 'service_level' || i == 'reason_code'){\r\n //object['searchField'] = ;\r\n\r\n }else if(i == 'shipment_status'){\r\n object['searchField'] = get_status(currentSearchFields[i].value);\r\n }\r\n\r\n else if (i == 'business_type_group') {\r\n object['searchField'] = object['searchField'].substring(0, 1).toUpperCase() + object['searchField'].substring(1);\r\n }\r\n searchFieldChips.push(object);\r\n }\r\n k++;\r\n }\r\n\r\n var idx=null,idx2=null, cnt=0;\r\n for( var j in searchFieldChips){\r\n if( [\"business_type_group\",\"shipment_mode\"].includes(searchFieldChips[j].key))\r\n cnt++;\r\n if(searchFieldChips[j].key == \"business_type_group\")\r\n {\r\n idx = j;\r\n }\r\n if(searchFieldChips[j].key == \"shipment_mode\")\r\n {\r\n idx2 = j;\r\n }\r\n if((cnt > 0 && idx2 >0) && idx)\r\n searchFieldChips.splice(idx,1);\r\n\r\n }\r\n\r\n return searchFieldChips;\r\n //return removeTimeZoneInPickUp(searchFieldChips, 'key', 'searchField');\r\n\r\n }\r\n\r\n function removeCloseMarkInChips(chips, page){\r\n\r\n //var chips = vm.chipSearchFields;\r\n modifySearchVal=false;\r\n angular.forEach(chips, function(data,key){\r\n\r\n var dataToBeRemovalkey = '';\r\n\r\n if(data){\r\n\r\n if(data.key && data.searchField){\r\n\r\n if((data.key == 'status' && data.searchField == \"booked\") || (data.key == 'status' && data.searchField == \"Undelivered\") ){\r\n dataToBeRemovalkey = key;\r\n }\r\n\r\n }if(data.value && data.field){\r\n\r\n if((data.field == 'status' && data.value == \"booked\") || (data.field == 'status' && data.value == \"Undelivered\") ){\r\n dataToBeRemovalkey = key;\r\n }\r\n\r\n }\r\n// only removing cancel button on chips for otp shipments\r\n if(data.key == \"otp_date_from\" || data.key == \"otp_date_to\" || data.key == \"otp_type\" || data.key == \"otp_period\"\r\n || data.key == \"arrive_date_from\" || data.key == \"arrive_date_to\" || data.key == \"forecast_aljex_custom_options\"){\r\n dataToBeRemovalkey = key;\r\n var nodes =angular.element( document.querySelectorAll( '.md-chips .md-chip .md-chip-remove-container'));\r\n var myEl = nodes[dataToBeRemovalkey];\r\n if(myEl){\r\n if (angular.element(myEl).find('.md-chips .md-chip .md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).addClass('hide');\r\n modifySearchVal = true;\r\n }\r\n }\r\n }\r\n // end of shipments\r\n }\r\n\r\n\r\n\r\n if(dataToBeRemovalkey !== ''){\r\n\r\n setTimeout(function(){\r\n try{\r\n\r\n var nodes =angular.element( document.querySelectorAll( '.mdChipsCloseMarkRemoval md-chip' ));\r\n var myEl = nodes[dataToBeRemovalkey];\r\n\r\n if(myEl){\r\n if (angular.element(myEl).find('.md-chips .md-chip .md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).addClass('hide');\r\n modifySearchVal = true;\r\n }\r\n }\r\n\r\n var nodes1 =angular.element( document.querySelectorAll( '.mdChipsCloseMarkRemoval1 md-chip' ));\r\n var myEl1 = nodes1[dataToBeRemovalkey];\r\n\r\n if(myEl1){\r\n if (angular.element(myEl).find('.md-chips .md-chip .md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).addClass('hide');\r\n modifySearchVal = true;\r\n }\r\n }\r\n\r\n }\r\n catch(e){\r\n console.warn(\"test\",e)\r\n }\r\n\r\n }, 25);\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n function get_milestone(status_value){\r\n if(status_value == '0'){\r\n var displaycontent = 'open';\r\n }\r\n else if(status_value == '1'){\r\n var displaycontent = 'covered';\r\n }\r\n else if(status_value == '2'){\r\n var displaycontent = 'pickup';\r\n }\r\n else if(status_value == '3'){\r\n var displaycontent = 'dispatched';\r\n }\r\n else if(status_value == '4'){\r\n var displaycontent = 'loaded';\r\n }\r\n else if(status_value == '5'){\r\n var displaycontent = 'consignee';\r\n }\r\n else if(status_value == '6'){\r\n var displaycontent = 'delivered';\r\n }\r\n return displaycontent;\r\n }\r\n\r\n function get_status(searchdata){\r\n\r\n var status_array = new Array();\r\n\r\n status_array =\r\n {\r\n \"planned\":\"planned\",\r\n \"pickup\":\"at pickup\",\r\n \"loaded\":\"loaded\",\r\n \"consignee\":\"at consignee\",\r\n \"delivered\":\"delivered\"\r\n }\r\n\r\n if(status_array[searchdata]){\r\n return status_array[searchdata];\r\n }else{\r\n return searchdata;\r\n }\r\n\r\n }\r\n\r\n function setUrl(){\r\n\r\n var newParams = {};\r\n\r\n // from dount chart dashboard[Aljex] page.\r\n if($location.search().page_from == 'aljex'){\r\n for (var r in $location.search()){\r\n //newParams = $location.search();\r\n }\r\n }\r\n\r\n angular.forEach(Object.keys(currentSearchFields), function(k) {\r\n\r\n // code for between dates invalid issue after refresh\r\n if(currentSearchFields.shipdate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipdate_date_range_to.value = localStorage.getItem('shipbetweendate');\r\n }\r\n\r\n if(currentSearchFields.estimateddelivery_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.estimateddelivery_date_range_to.value = localStorage.getItem('expectedbetweendate');\r\n }\r\n\r\n if(currentSearchFields.deliverydate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.deliverydate_date_range_to.value = localStorage.getItem('deliveredbetweendate');\r\n }\r\n\r\n if(currentSearchFields.duedate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.duedate_date_range_to.value = localStorage.getItem('duebetweendate');\r\n }\r\n\r\n if (k != 'quick_filter' && currentSearchFields[k].value) {\r\n if (k.includes('_date')){\r\n if (k.includes('shipment_mode')){\r\n delete newParams['business_type_group'];\r\n }\r\n //newParams[k] = $filter(\"date\")(currentSearchFields[k].value, 'yyyy-MM-dd', \"UTC\");\r\n newParams[k] = $filter(\"date\")(currentSearchFields[k].value, 'yyyy-MM-dd');\r\n }else {\r\n if (k.includes('shipment_mode')){\r\n delete newParams['business_type_group'];\r\n }\r\n newParams[k] = currentSearchFields[k].value;\r\n }\r\n }\r\n\r\n });\r\n // if (!disableUrlReplacement) {\r\n //debugger;\r\n\r\n var page_number = TrackTraceCslPaginationService.get_page_number();\r\n var per_page = TrackTraceCslPaginationService.get_per_page();\r\n\r\n newParams.page = page_number;\r\n newParams.per_page = per_page;\r\n\r\n $location.search(newParams);\r\n // }\r\n }\r\n\r\n function saveLastSearchLocally(search) {\r\n\r\n search = search || angular.copy(currentSearchFields);\r\n\r\n var searchShippDueDate=search.duedate_date_equal_to.value;\r\n var searchDelDate=search[\"deliverydate_date_equal_to\"].value;\r\n var searchDeliveryDate=search.estimateddelivery_date_equal_to.value;\r\n\r\n if(searchShippDueDate!=\"\"){\r\n var date = new Date(searchShippDueDate).toDateString();\r\n var convDueDate = date.slice(4);\r\n search.duedate_date_equal_to.value=convDueDate;\r\n }\r\n if(searchDelDate!=\"\"){\r\n var date = new Date(searchDelDate).toDateString();\r\n var convDelDate = date.slice(4);\r\n search[\"deliverydate_date_equal_to\"].value=convDelDate;\r\n }\r\n if(searchDeliveryDate!=\"\"){\r\n var date = new Date(searchDeliveryDate).toDateString();\r\n var conDeliveryDate = date.slice(4);\r\n search.estimateddelivery_date_equal_to.value=conDeliveryDate;\r\n }\r\n\r\n for (var field in search){\r\n if (field.includes('_date')){\r\n search[field].value = $filter('date')(search[field].value, 'yyyy-MM-dd', \"IST\");\r\n }\r\n }\r\n\r\n localStorage.setItem(\"lastCslSearch\", JSON.stringify(search));\r\n\r\n }\r\n\r\n function updateQuery() {\r\n\r\n for (var prop in currentSearchFields){\r\n\r\n // code for between dates invalid issue after refresh\r\n if(currentSearchFields.shipdate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipdate_date_range_to.value = localStorage.getItem('shipbetweendate');\r\n }\r\n\r\n if(currentSearchFields.estimateddelivery_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.estimateddelivery_date_range_to.value = localStorage.getItem('expectedbetweendate');\r\n }\r\n\r\n if(currentSearchFields.deliverydate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.deliverydate_date_range_to.value = localStorage.getItem('deliveredbetweendate');\r\n }\r\n\r\n if(currentSearchFields.duedate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.duedate_date_range_to.value = localStorage.getItem('duebetweendate');\r\n }\r\n\r\n\r\n if (query[prop] && (currentSearchFields[prop].value === \"\" ||\r\n (prop === 'quick_filter' && currentSearchFields[prop].value.length === 0))){\r\n if(prop.includes('shipment_mode'))\r\n {\r\n delete query['business_type_group'];\r\n }\r\n delete query[prop];\r\n\r\n if($location.search().page_from == 'aljex'){\r\n delete $location.search()[prop];\r\n }\r\n\r\n }\r\n if (currentSearchFields[prop].value != null && ((prop === 'quick_filter' && currentSearchFields[prop].value.length > 0) || (prop !== 'quick_filter' && currentSearchFields[prop].value !== \"\"))) {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n if(prop.includes('shipment_mode'))\r\n delete query['business_type_group'];\r\n query[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n if(prop.includes('shipment_mode'))\r\n delete query['business_type_group'];\r\n query[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function removeTimeZoneInPickUp(chipData, keyname, searchFieldName){\r\n\r\n //searchFieldName = Value name\r\n //keyname = field name\r\n\r\n if(chipData){\r\n\r\n angular.forEach(chipData, function(data,key){\r\n\r\n if(data[keyname].includes('pickup_time')){\r\n\r\n if(data[searchFieldName].toLowerCase().includes('and')){\r\n\r\n var timeList = data[searchFieldName].split(\"and\");\r\n\r\n var remove_ist1 = timeList[0].split(\" \");\r\n var remove_ist2 = timeList[1].split(\" \");\r\n\r\n remove_ist1 = remove_ist1.filter(function(e){return e});\r\n remove_ist2 = remove_ist2.filter(function(e){return e});\r\n\r\n var pickupTime1 = remove_ist1[0]+' '+remove_ist1[1];\r\n\r\n var pickupTime2 = remove_ist2[0]+' '+remove_ist2[1];\r\n\r\n chipData[key][searchFieldName] = pickupTime1+' and '+pickupTime2;\r\n\r\n } else{\r\n\r\n var remove_ist = data[searchFieldName].split(\" \");\r\n var pickupTime = remove_ist[0]+' '+remove_ist[1];\r\n\r\n chipData[key][searchFieldName] = pickupTime;\r\n\r\n }\r\n\r\n }\r\n\r\n });\r\n\r\n return chipData;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n return {\r\n clearTimeout: function() { timeoutPromise = false; },\r\n search: function(query){\r\n var search = query ? query : {};\r\n\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value != null && currentSearchFields[prop].value != \"\") {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n search[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n search[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n if (timeoutPromise) timeoutPromise.resolve('newSearch');\r\n timeoutPromise = $q.defer();\r\n saveLastSearchLocally();\r\n // return ServerTableService.setQuery(search, timeoutPromise);\r\n },\r\n\r\n exportSearchFields: function(fields, params){\r\n\r\n var search = {};\r\n if (fields && fields.length !== 0){\r\n search.columns = fields.map(function(d){return d.field;});\r\n }\r\n search.columns = search.columns || [];\r\n if (params){\r\n if (params.filter){search.filter = params.filter;}\r\n if (params.sorting){search.sorting = params.sorting;}\r\n }\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value !== \"\" &&\r\n currentSearchFields[prop].value.length != 0) {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n search[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n search[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n $log.debug(search);\r\n var csv_date = new Date();\r\n var filename = (moment().format('YYYY-MM-DD') + '-track-trace-csl-Export.csv');\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n\r\n if(localStorage.customerType == 'csl'){\r\n\r\n if(localStorage.switchEmailCslType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCslType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCsl){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCsl)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=csl\";\r\n }\r\n\r\n\r\n var page_number = TrackTraceCslPaginationService.get_page_number();\r\n var per_page = TrackTraceCslPaginationService.get_per_page();\r\n\r\n search.page = page_number;\r\n search.per_page = per_page;\r\n\r\n return DownloadService.postDownloadFile(api.url_v2 + '/search/export_aljex'+params, search , filename);\r\n\r\n },\r\n autocomplete: function(query, extraParamString) {\r\n var theQuery = angular.copy(query);\r\n\r\n // if(localStorage.switchEmail){\r\n // theQuery.userEmail =localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // theQuery.userCompany=localStorage.userCompany;\r\n // }\r\n\r\n\r\n if(localStorage.customerType == 'csl'){\r\n if(localStorage.switchEmailCslType){\r\n theQuery.userEmail =localStorage.switchEmailCslType;\r\n theQuery.customer_type = localStorage.customerType;\r\n }else if(localStorage.userCompanyCsl){\r\n theQuery.userCompany= encodeURIComponent(localStorage.userCompanyCsl);\r\n theQuery.customer_type = localStorage.customerType;\r\n }\r\n }else{\r\n theQuery.customer_type = 'csl';\r\n }\r\n\r\n if (extraParamString) {\r\n var pairs = extraParamString.split('&');\r\n angular.forEach(pairs, function(p) {\r\n var bits = p.split('=');\r\n theQuery[bits[0]] = bits[1];\r\n });\r\n }\r\n var promise = $http.post(api.url_v2 + '/aljex_autocomplete', theQuery).then(function(res){\r\n //if(theQuery.field != \"t_and_t_citycountry\"){\r\n var autocompletes = res.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n // }else{\r\n // var autocompletes = res.data.map(function(d){\r\n // return {\r\n // value: d.value,\r\n // display: d.display\r\n // };\r\n // });\r\n // }\r\n\r\n return autocompletes;\r\n });\r\n return promise;\r\n },\r\n listSavedSearches: listSavedSearches, //list the saved searches\r\n saveDefaultSearch: function(query, name, isDefault) {\r\n\r\n var fields = query ? query : {};\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value !== \"\") {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n fields[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n fields[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n $log.debug(fields);\r\n fields.search_name = name;\r\n fields.default_search = isDefault;\r\n var promise = $http.post(api.url_v2 + '/search/saved', fields).then(function(res){\r\n $log.debug(res);\r\n var emptySearchSave = true;\r\n for (var prop in currentSearchFields){ //see if they saved an empty search\r\n if (res.data[prop] != null) {\r\n emptySearchSave = false;\r\n }\r\n }\r\n if(emptySearchSave) deleteSearch(res.data.id); //delete the search if it is empty\r\n });\r\n return promise;\r\n },\r\n loadSearch: function(id) {\r\n\r\n var promise = $http.get(api.url_v2 + '/search/saved/' + id).then(function(res){\r\n $log.debug(res);\r\n return res;\r\n });\r\n return promise;\r\n },\r\n deleteSearch: deleteSearch,\r\n getIsSavedSearch: function() {\r\n return isSavedSearch;\r\n },\r\n getEmptySearchFields: function() {\r\n return angular.copy(emptySearchFields);\r\n },\r\n getSearch: function(){\r\n\r\n var promise = $http.get(api.url_v2 + '/csl/search').then(function(res){\r\n var data = res.data;\r\n //data.business_type_codes.sort(descSort);\r\n //business_type_codes = data.business_type_codes;\r\n\r\n //data.reason_codes.sort(descSort)//;\r\n //reason_codes = data.reason_codes//;\r\n\r\n search_params = data.search_params;\r\n\r\n //data.service_level_codes.sort(descSort);\r\n //service_level_codes = data.service_level_codes;\r\n\r\n function descSort(a, b) {\r\n return a.description < b.description ? -1 : (a.description > b.description ? 1 : 0);\r\n }\r\n hasLoadedSearchValues = true;\r\n });\r\n return promise;\r\n },\r\n hasLoadedSearchValues: function() {\r\n return hasLoadedSearchValues;\r\n },\r\n //getBusinessTypeCodes: function(){\r\n // return business_type_codes;\r\n //},\r\n //getReasonCodes: function(){\r\n // return reason_codes;\r\n //},\r\n getSearchParams: function(){\r\n return search_params;\r\n },\r\n getChips: function(){\r\n return searchFieldChips;\r\n },\r\n //getServiceLevelCodes: function(){\r\n // return service_level_codes;\r\n //},\r\n getCurrentSearchFields: function() {\r\n return currentSearchFields;\r\n },\r\n getIsFirstSearch: function() {\r\n return isFirstSearch;\r\n },\r\n setIsFirstSearch: function(first) {\r\n isFirstSearch = first;\r\n },\r\n getCurrentSearch: function(){\r\n return query;\r\n },\r\n setCurrentSearchFields: function(searchFields, disableUrlReplacement, advSearch) {\r\n\r\n var searchDelDate=searchFields.deliverydate_date_equal_to.value;\r\n var searchShippDueDate=searchFields.duedate_date_equal_to.value;\r\n var searchDeliveryDate=searchFields.estimateddelivery_date_equal_to.value;\r\n\r\n if(searchShippDueDate!=\"\"){\r\n var date = new Date(searchShippDueDate).toDateString();\r\n var convDueDate = date.slice(4);\r\n searchFields.duedate_date_equal_to.value=convDueDate;\r\n\r\n } if(searchDelDate!=\"\"){\r\n var date = new Date(searchDelDate).toDateString();\r\n var convDelDate = date.slice(4);\r\n searchFields.deliverydate_date_equal_to.value=convDelDate;\r\n\r\n } if(searchDeliveryDate!=\"\"){\r\n var date = new Date(searchDeliveryDate).toDateString();\r\n var conDeliveryDate = date.slice(4);\r\n searchFields.estimateddelivery_date_equal_to.value=conDeliveryDate;\r\n }\r\n\r\n for (var field in searchFields){\r\n\r\n try{\r\n currentSearchFields[field].value = searchFields[field].value;\r\n }\r\n catch(e){}\r\n\r\n }\r\n var search = angular.copy(currentSearchFields);\r\n\r\n saveLastSearchLocally(search);\r\n if (!disableUrlReplacement) {\r\n setUrl();\r\n }\r\n if(!advSearch)\r\n updateQuery();\r\n generateChips();\r\n //setUrl();\r\n\r\n },\r\n setClickedChip: function(chip) {\r\n for (var field in currentSearchFields){\r\n if (field === chip.key){\r\n currentSearchFields[field].focus = true;\r\n }\r\n }\r\n },\r\n removeChip: function(chip) { //remove chip from current searchFields\r\n\r\n if (chip.key === 'quick_filter'){\r\n currentSearchFields[chip.key].value = [];\r\n } else if(currentSearchFields[chip.key]) {\r\n currentSearchFields[chip.key].value = \"\";\r\n }\r\n updateQuery();\r\n saveLastSearchLocally();\r\n setUrl();\r\n\r\n },\r\n getSearchFieldsFocus: function() {\r\n return searchFieldsFocus;\r\n },\r\n saveLastSearchLocally: saveLastSearchLocally,\r\n removeTimeZoneInPickUp: removeTimeZoneInPickUp,\r\n removeCloseMarkInChips:removeCloseMarkInChips,\r\n modifySearch: function(){\r\n return modifySearchVal;\r\n },\r\n\r\n getLastSearchLocally: function() {\r\n return localStorage.getItem(\"lastCslSearch\");\r\n }\r\n };\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.cancel\r\n * @description method that cancels the advance search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.search\r\n * @description method that button action for when the user clicks search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.saveToDefault\r\n * @description method that saves the current form to default\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.loadDefault\r\n * @description method that loads the saved default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.clearDefault\r\n * @description method that clears the saved default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getReasonCodes\r\n * @description method that returns a list of codes from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getServiceLevels\r\n * @description method that returns a list of service levels from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getBusinessTypes\r\n * @description method that returns a list of business types from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.resetForm\r\n * @description method that resets the advance search form\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.chipClicked\r\n * @description sets the search fields in AdvSearchCslService based on the chip clicked\r\n * @param {chip} - the chip that was clicked\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceControzller.chipRemoved\r\n * @description removes the search field from advance search and re-runs the query\r\n * @param {chip} - the chip that was removed\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.generateChips\r\n * @description generates the chips from the AdvSearchCslService's currentSearchFields and shows them in the view\r\n * @param {searchFields} - the searchFields to generate the chips from\r\n */\r\n(function() {\r\n 'use strict';\r\n\r\n var multiplepillseperator =\" , \"\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .filter('underscoreless', function () {\r\n return function (input) {\r\n if(input != undefined)\r\n return input.replace(/_/g, ' ');\r\n else\r\n return input;\r\n };\r\n })\r\n .filter('removeTimeZone', function () {\r\n return function (input) {\r\n if(input != undefined){\r\n\r\n if(input.toLowerCase().includes('and')){\r\n\r\n var timeList = input.split(\"and\");\r\n\r\n var remove_ist1 = timeList[0].split(\" \");\r\n var remove_ist2 = timeList[1].split(\" \");\r\n\r\n remove_ist1 = remove_ist1.filter(function(e){return e});\r\n remove_ist2 = remove_ist2.filter(function(e){return e});\r\n\r\n var pickupTime1 = remove_ist1[0]+' '+remove_ist1[1];\r\n\r\n var pickupTime2 = remove_ist2[0]+' '+remove_ist2[1];\r\n\r\n input = pickupTime1+' and '+pickupTime2;\r\n\r\n } else{\r\n\r\n var remove_ist = input.split(\" \");\r\n var pickupTime = remove_ist[0]+' '+remove_ist[1];\r\n\r\n input = pickupTime;\r\n\r\n }\r\n\r\n return input;\r\n }\r\n else{\r\n return input;\r\n }\r\n };\r\n })\r\n\r\n .filter('advSearchSpaceRemove', function () {\r\n return function (input) {\r\n if(input != undefined){\r\n\r\n var a = input.replace(/ /g,'');\r\n input = a.split(',').join(' , ');\r\n\r\n return input;\r\n }\r\n else{\r\n return input;\r\n }\r\n };\r\n })\r\n\r\n .filter('capitalize', function() {\r\n return function(input){\r\n if(input != undefined) {\r\n input = input.toString();\r\n if(input == \"awb bol\") { input = \"awb/bol\";}\r\n\r\n var serviceLevel =\r\n { \"HOT\": \"Hot Shot Service\",\r\n \"IPRI\": \"International Priority Service\",\r\n \"NFO\":\"Next Flight Out\",\r\n \"ISTD\": \"International Standard Service\",\r\n \"3DAY\": \"3rd Day\",\r\n \"2DAY\": \"2nd Day\",\r\n \"NDAM\": \"Next Day AM By Commitment Time\",\r\n \"NDPM\": \"Next Day PM By Commitment Time\",\r\n \"2DAM\": \"2nd Day AM By Commitment Time\",\r\n \"2DPM\": \"2nd Day PM By Commitment Time\",\r\n \"ECO\":\"Economy Service\",\r\n \"3DAM\": \"3rd Day AM By Commitment Time\",\r\n \"3DPM\": \"3rd Day PM by Commitment Time\",\r\n \"DEFR\": \"Deferred Service\",\r\n \"TKLD\": \"Truckload Service Level\",\r\n \"LCL\":\"LCL Ocean Freight\",\r\n \"IECO\": \"International Economy Service\",\r\n \"PROJ\": \"Projects Charters\",\r\n \"CSTBKR\": \"Customs Brokerage\",\r\n \"4TH\":\"4th Day Service\",\r\n \"5TH\":\"5th Day Service\",\r\n \"OCN\":\"Ocean Freight\",\r\n \"NDR\":\"Next Day Regular\",\r\n \"INVOICE\": \"Invoice Only\",\r\n \"LOCAL\": \"Local Pick Up and Delivery\"\r\n };\r\n\r\n var reasoncode = { \"OTPACT\" : \"Force Majeure\",\r\n \"OTPAPT\": \"Appointment\",\r\n \"OTPCAO\": \"Cargo Aircraft Only\",\r\n \"OTPCAR\": \"Air/Sea Carrier Failure\",\r\n \"OTPCEC\": \"Civic Event Closures\",\r\n \"OTPCIV\": \"Civil Unrest\",\r\n \"OTPCON\": \"Client Requested Consolidation\",\r\n \"OTPCST\": \"Client Related\",\r\n \"OTPCUS\": \"Customs Delay\",\r\n \"OTPCUT\": \"Shipped After Cut\",\r\n \"OTPDRP\": \"Trailer Dropped/Pending Unload\",\r\n \"OTPGND\": \"Ground Carrier Failure\",\r\n \"OTPHOL\": \"Holiday\",\r\n \"OTPMIS\": \"Misrouted\",\r\n \"OTPMPU\": \"Missed Pickup\",\r\n \"OTPNFO\": \"Next Flight Out\",\r\n \"OTPPCK\": \"Insufficient Packaging of Cargo\",\r\n \"OTPPCON\": \"Port Congestion\",\r\n \"OTPPRO\": \"Procedural Error\",\r\n \"OTPREF\": \"Refused by Consignee\",\r\n \"OTPRRH\": \"Restricted Receiving Hours\",\r\n \"OTPSEC\": \"Security Delay\",\r\n \"OTPUDO\": \"Documentation Delay\",\r\n \"OTPWHS\": \"Warehouse Delay\",\r\n \"OTPWX\":\"Weather Related Delay\" };\r\n\r\n\r\n\r\n\r\n\r\n if(input.indexOf(' ') !== -1){\r\n var inputPieces, i;\r\n\r\n input = input.toLowerCase();\r\n inputPieces = input.split(' ');\r\n //// console.log(input.toUpperCase());\r\n\r\n\r\n for(i = 0; i < inputPieces.length; i++){\r\n\r\n if(reasoncode[inputPieces[i].toUpperCase()] ){\r\n if(inputPieces[i] != multiplepillseperator)\r\n {\r\n // + sign will be discared for conversion\r\n inputPieces[i] = reasoncode[inputPieces[i].toUpperCase()];\r\n }\r\n //input = data.split(' ');\r\n }else if(serviceLevel[inputPieces[i].toUpperCase()]){\r\n if(inputPieces[i] != multiplepillseperator)\r\n {\r\n // + sign will be discared for conversion\r\n inputPieces[i] = serviceLevel[inputPieces[i].toUpperCase()];\r\n }\r\n } else if(inputPieces[i] !='is' && inputPieces[i] !='less' && inputPieces[i] !='greater' && inputPieces[i] !='than'){\r\n if(inputPieces[i] !=\"id\"){\r\n inputPieces[i] = capitalizeString(inputPieces[i]);\r\n if(inputPieces[i] ==\"Equal\"){\r\n inputPieces[i+1] +=\" =\";\r\n }\r\n\r\n } else{\r\n inputPieces[i] = inputPieces[i].toUpperCase();\r\n }\r\n\r\n }else{\r\n if(inputPieces[i] =='than'){\r\n inputPieces[i] += (inputPieces[i-1] == \"greater\") ? \" >\" :\" <\" ;\r\n }\r\n }\r\n\r\n\r\n }\r\n\r\n return inputPieces.join(\" \");\r\n }\r\n else {\r\n input = input.toLowerCase();\r\n\r\n\r\n if(reasoncode[input.toUpperCase()]){\r\n input = reasoncode[input.toUpperCase()];\r\n //input = data.split(' ');\r\n }else if(serviceLevel[input.toUpperCase()]){\r\n input = serviceLevel[input.toUpperCase()];\r\n }\r\n\r\n if(input == \"bol1\"){\r\n input = input.toUpperCase()+\" #\";\r\n }\r\n\r\n if(input == 'reference'){\r\n input = \"Ref #\";\r\n }\r\n\r\n if( input == 'invoice'|| input == 'consol' || input == 'container'){\r\n input +=\" #\";\r\n }\r\n return capitalizeString(input);\r\n }\r\n }else{\r\n return input;\r\n }\r\n };\r\n function capitalizeString(inputString){\r\n if(inputString == 'n/a'){\r\n inputString = 'N/A';\r\n }\r\n return inputString.substring(0,1).toUpperCase() + inputString.substring(1);\r\n }\r\n })\r\n .controller('AdvSearchCslController', AdvSearchCslController);\r\n\r\n\r\n\r\n /** @ngInject */\r\n AdvSearchCslController.$inject = ['$log', 'UserService', 'AdvSearchCslService', '$translatePartialLoader', '$mdBottomSheet', '$mdDialog', '$mdMedia','$filter', '$scope', '$timeout', '$location', '$q', '$http', 'api', 'permissions', 'TrackTraceCslPaginationService', 'ServerTableCslService','$state'];\r\n function AdvSearchCslController($log, UserService, AdvSearchCslService, $translatePartialLoader, $mdBottomSheet, $mdDialog, $mdMedia, $filter, $scope, $timeout, $location, $q, $http, api, permissions, TrackTraceCslPaginationService, ServerTableCslService,$state) {\r\n $translatePartialLoader.addPart('tracktrace');\r\n //variables\r\n var vm = this;\r\n var INVALID_DATE = \"Invalid date\";\r\n $scope.addAllBtnShow = false;\r\n vm.modifySearch=false;\r\n\r\n //set the searchFields to be the current searchFields\r\n vm.searchFields = convertStatusFieldToString(angular.copy(AdvSearchCslService.getCurrentSearchFields()));\r\n vm.searchText;\r\n vm.selectedItem;\r\n vm.chipSearchFields = AdvSearchCslService.getChips();\r\n\r\n if (!AdvSearchCslService.hasLoadedSearchValues()) {\r\n AdvSearchCslService.getSearch();\r\n }\r\n vm.isSavedSearch = AdvSearchCslService.getIsSavedSearch();\r\n vm.minDate = \"'\" + (moment().subtract(13, 'months').format('YYYY-MM-DD')) + \"'\";\r\n\r\n // Quarter math\r\n var quarterAdjustment= (moment().month() % 3) + 1;\r\n var lastQuarterEndDate = moment().subtract({ months: quarterAdjustment }).endOf('month');\r\n var lastQuarterStartDate = lastQuarterEndDate.clone().subtract({ months: 2 }).startOf('month');\r\n\r\n\r\n vm.autocomplete = autocomplete;\r\n vm.addOneMoreDay = addOneMoreDay;\r\n vm.subtractOneDay = subtractOneDay;\r\n vm.cancel = cancel;\r\n //vm.getBusinessTypes = getBusinessTypes;\r\n //vm.getReasonCodes = getReasonCodes;\r\n //vm.getServiceLevels = getServiceLevels;\r\n vm.resetForm = resetForm;\r\n vm.saveToDefault = saveToDefault;\r\n vm.loadDefault = loadDefault;\r\n vm.clearDefault = clearDefault;\r\n vm.search = search;\r\n vm.selectClear = selectClear;\r\n vm.showAdvSearch = showAdvSearch;\r\n vm.chipClicked = chipClicked;\r\n vm.chipRemoved = chipRemoved;\r\n vm.showListBottomSheet = showListBottomSheet;\r\n vm.resetSearch = resetSearch;\r\n vm.newSearch = newSearch;\r\n vm.dateItemOrNot = dateItemOrNot;\r\n vm.checkrangeOrNot = checkrangeOrNot;\r\n vm.clearFlags = clearFlags;\r\n vm.searchdata = null;\r\n vm.getMatches = getMatches;\r\n vm.searchValue = '';\r\n vm.clearValues = clearValues;\r\n /*Added by Abheesh*/\r\n vm.ttSearch = ttSearch;\r\n vm.advSearch = advSearch;\r\n vm.ttSearchFlag = undefined;\r\n vm.clearSearch = clearSearch;\r\n vm.chipData = [];\r\n vm.chipTempRemoved = chipTempRemoved;\r\n vm.formClick = formClick;\r\n vm.array_unique = array_unique;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n var currentFields = AdvSearchCslService.getCurrentSearchFields();\r\n //// console.log(currentFields);\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n //// console.log(currentFields[field].value);\r\n if(currentFields[field].value !== null && currentFields[field].value != ''){\r\n\r\n vm.chipData.push(currentFields[field]);\r\n\r\n }\r\n }\r\n\r\n callingToRemoveCrossIConInChips(vm.chipSearchFields, 'onload');\r\n\r\n vm.shipment = {\r\n\r\n \"status\":\r\n [\"planned\", \"at_pickup\", \"loaded\", \"at_consignee\", \"delivered\", \"undelivered\"],\r\n\r\n /*\"milestone\":\r\n [\"open\",\"covered\",\"pickup\", \"dispatched\", \"loaded\",\"consignee\", \"delivered\"],*/\r\n\r\n \"invoice_total\":\r\n [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"gross_weight\":\r\n [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"total_pieces\":\r\n [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"equipment_type\":\r\n [\"CONESTOGA\", \"CARGO VAN\", \"DOUBLE DROP\", \"CONTAINER DRAYAGE\", \"FLATBED\", \"FLATBED - TEAM\", \"LOWBOY\", \"LESS THAN TRUCKLOAD\", \"PARTIAL\", \"POWER ONLY\",\r\n \"REEFER\", \"REMOVABLE GOOSENECK\", \"REEFER - TEAM\", \"STRAIGHT TRUCK\", \"STEP DECK OR DROP DECK\", \"SPOT SHIPMENT\", \"STRETCH TRAILER\", \"STORAGE WAREHOUSING\",\r\n \"SPRINTER VAN\", \"TRUCK ORDERED NOT USED\", \"VAN - DRY\", \"VAN - TEAM\", \"VAN - INTERMODAL\", \"VAN OR REEFER\", \"TRANSLOADING HANDLING\", \"YARD MULE\"],\r\n // [\"Other\",\"N/A\",\"20C\",\"40C\",\"53R\",\"BT12\",\"BT16\",\"BT20\",\"BT24\",\"BT8\",\"CVN\",\"DD\",\"DROP\",\"F\",\"F48\",\"F53\",\r\n // \"GN28\",\"GN40\",\"GNFL\",\"PICK\",\"PO\",\"PVAN\",\"R\",\"SB12\",\"SB16\",\"SB20\",\"SB24\",\"SB8\",\"SD\",\"STOR\",\"V\",\r\n // \"V48\",\"V53\",\"WINC\"],\r\n\r\n // Shipment Types\r\n \"type\":\r\n [\"FTL\",\"LTL\",\"INTERMODAL\"],\r\n\r\n \"is_bookmarked\":\r\n [\"yes\",\"no\"],\r\n\r\n \"consignee_reference\":null,\r\n\r\n \"pro\":null,\r\n\r\n \"bol\":null,\r\n\r\n \"reference\":null,\r\n\r\n \"load\":null,\r\n\r\n \"container\":null,\r\n\r\n \"pickup_date\": [\"equal_to\",\"range_to\"],\r\n\r\n \"pickup_time\": [\"equal_to\",\"range_to\"],\r\n\r\n \"deliveryeta_date\": [\"equal_to\",\"range_to\"],\r\n\r\n \"mustship_date\": [\"equal_to\",\"range_to\"],\r\n\r\n \"mustdeliver_date\": [\"equal_to\",\"range_to\"],\r\n\r\n \"origin\":\r\n [\"state\",\"city\"],\r\n\r\n \"destination\":\r\n [\"state\", \"city\"]\r\n\r\n };\r\n\r\n vm.pickup = [\"name\",\"contact_name\",\"street_address\",\"state\",\"city\",\"zip\",\"phone\"];\r\n\r\n vm.consignee = [\"name\",\"contact_name\",\"street_address\",\"state\",\"city\",\"zip\",\"phone\"];\r\n\r\n $scope.notSorted = function(obj){\r\n if (!obj) {\r\n return [];\r\n }\r\n return Object.keys(obj);\r\n }\r\n\r\n $scope.checkValue = function(key){\r\n // $scope.selectedSearch = key;\r\n return vm.shipment[key];\r\n }\r\n\r\n\r\n function getMatches(key, searchText){\r\n //// console.log(key +\" getMatches() \"+searchText);\r\n var query = {field: key, value: searchText}\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/aljex_autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n //// console.log(d);\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n var contains = function(needle) {\r\n // Per spec, the way to identify NaN is that it is not equal to itself\r\n var findNaN = needle !== needle;\r\n var indexOf;\r\n\r\n if(!findNaN && typeof Array.prototype.indexOf === 'function') {\r\n indexOf = Array.prototype.indexOf;\r\n } else {\r\n indexOf = function(needle) {\r\n var i = -1, index = -1;\r\n\r\n for(i = 0; i < this.length; i++) {\r\n var item = this[i];\r\n\r\n if((findNaN && item !== item) || item === needle) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n };\r\n }\r\n\r\n return indexOf.call(this, needle) > -1;\r\n };\r\n\r\n vm.searchValueFlag = false;\r\n function ttSearch(search){\r\n // // console.log(search);\r\n vm.inputRangeFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = false;\r\n vm.timeInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n vm.textFieldData = undefined;\r\n vm.dateInputFlag =false;\r\n vm.searchValue = '';\r\n vm.nextElem = \"\";\r\n vm.ttserchdata = search;\r\n // vm.thirdChildFlg = 100;\r\n search = search.toLowerCase();\r\n search = search.replace(/_/g, ' ');\r\n vm.ttserchdataNew = search.replace(/mode/g,'business type').replace(/reason code/g,'exception');\r\n search = search.split(\" \");\r\n //// console.log(search[0]);\r\n if('shipment'.includes(search[0])){ vm.ttSearchFlag = 1;vm.nextElem=\"shipment\";}\r\n if('pickup'.includes(search[0])){ vm.ttSearchFlag = 2; vm.nextElem=\"pickup\";}\r\n //if('shipper'.includes(search[0])){ vm.ttSearchFlag = 3; vm.nextElem=\"shipper\";}\r\n if('consignee'.includes(search[0])){ vm.ttSearchFlag = 3;vm.nextElem=\"consignee\";}\r\n\r\n if(search[0] == 'shipment'){\r\n\r\n vm.ttSearchFlag = 1;\r\n if(search.length > 1){\r\n var breakFlag = false;\r\n //// console.log(search);\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n if(!breakFlag){\r\n\r\n if(key.includes(search[1])){\r\n\r\n if(key == 'equipment_type' && search[1] == 'type'){\r\n vm.secondChildFlg = 1000;\r\n }else{\r\n\r\n if(search[1] == 'reference')\r\n key = search[1];\r\n //// console.log(key);\r\n\r\n if(search[1] == 'pickup' && search[2] == 'time' ){\r\n key = 'pickup_time';\r\n }\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+key;\r\n breakFlag = true;\r\n if(contains.call(['invoice','ref','consol','total','reference'], search[1])){\r\n\r\n var temStrOne= \"reference\";\r\n if(temStrOne.includes(search[1]) && search[1] == 'reference'){\r\n vm.secondChildFlg = 'reference';\r\n }\r\n var temStrOne= \"total\";\r\n if(temStrOne.includes(search[1]) && search[2] == 'pieces'){\r\n vm.secondChildFlg = 'total_pieces';\r\n }\r\n var temStr= \"total\";\r\n if(!temStr.includes(search[2]) && search[1] == 'invoice'){\r\n vm.secondChildFlg = 'invoice';\r\n vm.nextElem = search[0]+' invoice';\r\n }\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[2];\r\n vm.thirdChildFlg = 100;\r\n }\r\n if(key == 'reason_code' || key =='service_level'){\r\n vm.openInputFlag = true;\r\n vm.shipmentOpenInputFlag=true;\r\n }\r\n if(key == 'lane_pair'){\r\n vm.searchValue = search[3];\r\n vm.openInputFlag = true;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.timeInputFlag = false;\r\n vm.dateInputFlag =false;\r\n }\r\n if(key == 'awb_bol'){\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[3];\r\n }\r\n if(key == 'awb' || key == 'bol'){\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[2];\r\n vm.secondChildFlg = 'bol';\r\n vm.ttserchdata = search[0]+' bol';\r\n }\r\n if(key == 'estimateddelivery_date'){\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[6];\r\n vm.shipmentOpenInputFlag = false;\r\n vm.dateInputFlag = true;\r\n }\r\n if(key == 'shipdate_date' || key == 'duedate_date' || key == 'deliverydate_date'\r\n || key == 'pickup_date' || key == 'deliveryeta_date' || key == 'mustship_date'\r\n || key == 'mustdeliver_date' || key == 'mustdeliver_date'){\r\n vm.openInputFlag = true;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.dateInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n if(key == 'pickup_time'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = true;\r\n }\r\n if(key == 'equipment_type'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n if(key == 'type'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n\r\n }\r\n\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n if(!breakFlag){\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n\r\n if(!breakFlag){\r\n if((key == search[1]+\"_\"+search[2]) || (key.includes(search[1]))){\r\n //// console.log(key);\r\n vm.nextElem = search[0]+' '+search[1]+' '+key;\r\n vm.secondChildFlg = key;\r\n\r\n breakFlag = true;\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n if(breakFlag == false){\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n if(!breakFlag){\r\n if((key == search[1]+\"_\"+search[2]+\"_\"+search[3]) || (key.includes(search[1]))){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+search[2]+' '+key;\r\n breakFlag = true;\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n if(search.length > 2){\r\n\r\n var breakFlag = false;\r\n angular.forEach(vm.shipment[vm.secondChildFlg],function(ship,key){\r\n\r\n if(!breakFlag){\r\n if((ship == search[2]) || (ship.includes(search[2]))){\r\n vm.thirdChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+ship;\r\n // if(ship == 'sea'||ship =='air'||ship=='land'){\r\n vm.shipmentOpenInputFlag = true;\r\n // vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n // vm.searchValue = search[2];\r\n //}\r\n\r\n breakFlag = true;\r\n }else{\r\n vm.thirdChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n if(search.length > 3){\r\n\r\n var breakFlag = false;\r\n var remainingText=\"\";\r\n var limit = search.length;\r\n //// console.log(contains.call(['than','to','range'], search[search.length-1]));\r\n if(contains.call(['than','to','range', 'is'], search[search.length-1]) == false){\r\n limit -= 1;\r\n }\r\n var breakRemaining = false;\r\n for(var i=3;i<limit;i++){\r\n if(!breakRemaining){\r\n if(search[i] != 'date' && search[i] != 'time'){\r\n remainingText +=search[i];\r\n\r\n if(remainingText == \"range\"){\r\n if(search[i+1] != 'to')\r\n breakRemaining = i;\r\n }else if(i+1 != limit ){remainingText +=\"_\";}\r\n }\r\n }\r\n\r\n }\r\n if(search.length == 4 && limit == 3){\r\n remainingText = search[3];\r\n }\r\n\r\n angular.forEach(vm.shipment[vm.secondChildFlg],function(ship,key){\r\n\r\n if(remainingText == 'is' && limit < search.length){\r\n remainingText +=\"_\"+search[ search.length-1];\r\n }\r\n if(!breakFlag && !(search.length == 4 && search[2].includes('delivery'))){\r\n\r\n if((ship == remainingText) || (ship.includes(remainingText))){\r\n vm.thirdChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+search[2]+' '+ship;\r\n breakFlag = true;\r\n if(contains.call(['ontime','delayed','yes','no'], ship)){\r\n\r\n vm.shipmentOpenInputFlag = true;\r\n vm.openInputFlag = true;\r\n\r\n }\r\n if(contains.call(['is_less_than','is_greater_than','range','equal_to', 'range_to'], remainingText)){\r\n\r\n vm.searchValue = search[limit];\r\n vm.thirdChildFlg = key;\r\n if(ship.includes('range')){\r\n vm.inputRangeFlag = true;\r\n //if(breakRemaining == false){breakRemaining = limit;}\r\n vm.searchValue2 = search[breakRemaining+2];\r\n vm.searchValue = search[breakRemaining+1];\r\n }\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n\r\n //// console.log(vm.ttserchdata);\r\n\r\n if(search.length == 6 && search[1] ==\"expected\")\r\n {\r\n //In Shipment -> Expected Delivery date\r\n vm.textFieldData = \"shipment\"+\" \"+search[1]+\"_\"+search[2]+\"_\"+search[3]+\" \"+ remainingText;\r\n }\r\n else\r\n {\r\n //in Shipment -> Due date, etc\r\n vm.textFieldData = \"shipment\"+\" \"+search[1]+\"_\"+search[2]+\" \"+remainingText;\r\n }\r\n\r\n // vm.inputRangeFlag = true;\r\n\r\n }\r\n }else{\r\n vm.thirdChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n else if(search[0] == 'pickup'){\r\n vm.ttSearchFlag = 2;\r\n if(search.length > 1){\r\n var index = contains.call(vm.pickup, search[1]);\r\n\r\n angular.forEach(vm.pickup, function(data,key){\r\n if(data.includes(search[1])){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+ data;\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n if(data !=\"street_address\" && data !='party_id'){\r\n vm.searchValue = search[2];\r\n }else{\r\n //vm.searchValue = search[3];\r\n vm.searchValue =\"\";\r\n for(var i=3; i<search.length; i++){\r\n vm.searchValue += search[i] +' ';\r\n }\r\n }\r\n }\r\n });\r\n\r\n if(index == true){\r\n vm.secondChildFlg = vm.pickup.indexOf(search[1]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n\r\n }else{\r\n //vm.secondChildFlg = 1000;\r\n if(search.length >2){\r\n var index = contains.call(vm.pickup, search[1]+\"_\"+search[2]);\r\n if(index == true){\r\n vm.secondChildFlg = vm.pickup.indexOf(search[1]+\"_\"+search[2]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n // vm.searchValue = search[3];\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }\r\n\r\n }\r\n }\r\n else if(search[0] == 'consignee'){\r\n vm.ttSearchFlag = 3;\r\n if(search.length > 1){\r\n var index = contains.call(vm.consignee, search[1]);\r\n\r\n angular.forEach(vm.consignee, function(data,key){\r\n if(data.includes(search[1])){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+ data;\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n if(data !=\"street_address\" && data !='party_id'){\r\n vm.searchValue = search[2];\r\n }else{\r\n //vm.searchValue = search[3];\r\n vm.searchValue =\"\";\r\n for(var i=3; i<search.length; i++){\r\n vm.searchValue += search[i] +' ';\r\n }\r\n }\r\n }\r\n });\r\n\r\n if(index == true){\r\n vm.secondChildFlg = vm.consignee.indexOf(search[1]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n\r\n }else{\r\n //vm.secondChildFlg = 1000;\r\n if(search.length >2){\r\n var index = contains.call(vm.consignee, search[1]+\"_\"+search[2]);\r\n if(index == true){\r\n vm.secondChildFlg = vm.consignee.indexOf(search[1]+\"_\"+search[2]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n // vm.searchValue = search[3];\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }\r\n\r\n }\r\n }else {\r\n vm.ttSearchFlag = 0;\r\n }\r\n\r\n }\r\n\r\n\r\n angular.element(document).ready(function () {\r\n var el;\r\n AdvSearchCslService.removeCloseMarkInChips(vm.chipSearchFields, 'onload');\r\n vm.modifySearch=AdvSearchCslService.modifySearch();\r\n angular.forEach(vm.searchFields, function(field){\r\n if (field.focus){\r\n $timeout(function() {\r\n el = angular.element(document.querySelector(\"#\"+field.field));\r\n el.focus();\r\n if(el[0] && el[0].value != null) { //in place becasue mg-datepickers don't have a value\r\n el[0].setSelectionRange(0, el[0].value.length);\r\n }\r\n }, 1000);\r\n }\r\n });\r\n });\r\n\r\n function dateItemOrNot(keyItem){\r\n vm.dateInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n\r\n var index = keyItem.search('date');\r\n if(index>=0){\r\n vm.dateInputFlag = true;\r\n }\r\n }\r\n\r\n\r\n\r\n function checkrangeOrNot(item){\r\n\r\n vm.inputRangeFlag = false;\r\n if(item == 'range'){\r\n vm.inputRangeFlag = true;\r\n }\r\n }\r\n\r\n function clearFlags(flag,searchdata){\r\n vm.nextElem =\"\";\r\n vm.textFieldData = undefined;\r\n vm.openInputFlag = false;\r\n vm.timeInputFlag = false;\r\n $scope.addAllBtnShow = false;\r\n vm.dateInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n //vm.secondChildFlg = 100;\r\n //vm.ttSearchFlag = undefined;\r\n vm.ttserchdata = undefined;\r\n vm.inputRangeFlag = false;\r\n vm.ttserchdataNew = searchdata;\r\n if(flag && searchdata){\r\n vm.ttSearchFlag = flag;\r\n vm.ttserchdata = searchdata;\r\n }\r\n }\r\n\r\n function clearValues(flag){\r\n if(flag == 'reason_code' || flag == 'service_level'){\r\n $scope.addAllBtnShow = true;\r\n }else{\r\n $scope.addAllBtnShow = false;\r\n }\r\n vm.searchValue = '';\r\n vm.searchValue2 = '';\r\n\r\n }\r\n\r\n\r\n\r\n function chipClicked(chip) {\r\n $log.debug('chip was clicked ' + chip.display);\r\n AdvSearchCslService.setClickedChip(chip);\r\n showAdvSearch();\r\n }\r\n\r\n function chipRemoved(chip) {\r\n //// console.log(chip);\r\n $log.debug('remove chip ' + chip.title);\r\n AdvSearchCslService.removeChip(chip);\r\n vm.searchFields[chip.key]['value'] ='';\r\n //vm.search({});\r\n }\r\n\r\n function chipTempRemoved(chip){\r\n //vm.chipData[chip.key]['value'] ='';\r\n //// console.log('test');\r\n //// console.log(chip.field);\r\n // AdvSearchCslService.removeChip(chip);\r\n // var temp = convertedFields[field];\r\n // temp.key = convertedFields[field].field;\r\n // temp.searchField = convertedFields[field].value;\r\n // AdvSearchCslService.removeChip(temp);\r\n //// console.log(vm.searchFields);\r\n //// console.log(vm.searchFields[chip.field]);\r\n vm.searchFields[chip.field]['value'] ='';\r\n }\r\n\r\n // Show the advanced search md-dialog\r\n\r\n function showAdvSearch(ev) {\r\n // var convertedFields = convertStatusFieldToString(angular.copy(AdvSearchCslService.getCurrentSearchFields()));\r\n // // console.log(convertedFields);\r\n // for (var field in convertedFields) { //set the focus to false\r\n // convertedFields[field].focus = false;\r\n // if(convertedFields[field].value !== null && convertedFields[field].value != ''){\r\n\r\n // if(convertedFields[field].field == \"status\"){\r\n\r\n // if(convertedFields[field].value == 1){\r\n // convertedFields[field].value = \"Delivered\";\r\n // }else{\r\n // convertedFields[field].value = \"Undelivered\";\r\n // }\r\n // }\r\n // vm.chipData.push(convertedFields[field]);\r\n // // console.log(vm.chipData);\r\n // }\r\n // }\r\n\r\n var currentFields = AdvSearchCslService.getCurrentSearchFields();\r\n\r\n /*if(currentFields.shipment_mode.value != \"\"){\r\n delete currentFields.business_type_group;\r\n }*/\r\n\r\n // code for between dates invalid issue after refresh\r\n\r\n if(currentFields.shipdate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.shipdate_date_range_to.value = localStorage.getItem('shipbetweendate');\r\n }\r\n\r\n if(currentFields.estimateddelivery_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.estimateddelivery_date_range_to.value = localStorage.getItem('expectedbetweendate');\r\n }\r\n\r\n if(currentFields.deliverydate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.deliverydate_date_range_to.value = localStorage.getItem('deliveredbetweendate');\r\n }\r\n\r\n if(currentFields.duedate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.duedate_date_range_to.value = localStorage.getItem('duebetweendate');\r\n }\r\n\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n //// console.log(currentFields[field].value);\r\n\r\n\r\n if(currentFields[field].value !== null && currentFields[field].value != ''){\r\n\r\n\r\n if(currentFields[field].field == \"milestone\"){\r\n\r\n var status_arr = currentFields[field].value.split(/[\\s,]+/);\r\n\r\n if (status_arr.length > 1 ){\r\n\r\n currentFields[field].value = get_array_status(status_arr, \"string\")\r\n }\r\n else {\r\n currentFields[field].value = get_string_status_displaycontent(currentFields[field].value)\r\n }\r\n }\r\n\r\n if(currentFields[field].field == \"shipment_status\"){\r\n currentFields[field].value = get_status_original_value(currentFields[field].value);\r\n }\r\n\r\n vm.chipData.push(currentFields[field]);\r\n\r\n var ids = [];\r\n\r\n //// console.log(vm.chipData);\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/advanced-search/csl/adv-search-form.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n\r\n\r\n\r\n }, function() {\r\n\r\n var currentFields = AdvSearchCslService.getCurrentSearchFields();\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n //// console.log(currentFields[field].value);\r\n\r\n\r\n }\r\n });\r\n callingToRemoveCrossIConInChips(vm.chipSearchFields, 'onload');\r\n }\r\n\r\n function resetSearch(){\r\n\r\n var params = {}, searchFields = angular.copy(AdvSearchCslService.getEmptySearchFields());\r\n for (var field in $location.search()){\r\n //// console.log('test params');\r\n if (!(field in searchFields)){\r\n params[field] = $location.search()[field];\r\n }\r\n }\r\n $location.search(params)\r\n AdvSearchCslService.setCurrentSearchFields(searchFields);\r\n //Added by Abheesh\r\n vm.searchFields = searchFields;\r\n vm.modifySearch=false;\r\n // // console.log(searchFields);\r\n }\r\n\r\n function selectClear(e) {\r\n var focused = document.getElementsByClassName('md-input-focused');\r\n angular.element(focused).removeClass('md-input-focused');\r\n }\r\n\r\n function showListBottomSheet() {\r\n $mdBottomSheet.show({\r\n templateUrl: '/app/advanced-search/adv-search-actions.html',\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n //converts the status field\r\n function convertStatusFieldToString(field) {\r\n switch(field.milestone.value) {\r\n case '0':\r\n field.milestone.value = 'open';\r\n break;\r\n case '1':\r\n field.milestone.value = 'covered';\r\n break;\r\n case '2':\r\n field.milestone.value = 'pickup';\r\n break;\r\n case '3':\r\n field.milestone.value = 'dispatched';\r\n break;\r\n case '4':\r\n field.milestone.value = 'loaded';\r\n break;\r\n case '5':\r\n field.milestone.value = 'consignee';\r\n break;\r\n case '6':\r\n field.milestone.value = 'delivered';\r\n break;\r\n\r\n }\r\n return field;\r\n }\r\n\r\n //convertst the status field\r\n function convertStatusFieldToInt(field) {\r\n switch(field.milestone.value) {\r\n case 'open':\r\n field.milestone.value = '0';\r\n break;\r\n case 'covered':\r\n field.milestone.value = '1';\r\n break;\r\n case 'pickup':\r\n field.milestone.value = '2';\r\n break;\r\n case 'dispatched':\r\n field.milestone.value = '3';\r\n break;\r\n case 'loaded':\r\n field.milestone.value = '4';\r\n break;\r\n case 'consignee':\r\n field.milestone.value = '5';\r\n break;\r\n case 'delivered':\r\n field.milestone.value = '6';\r\n break;\r\n\r\n }\r\n return field;\r\n }\r\n\r\n function autocomplete(field1, query, extraParamString){\r\n $log.debug(\"Value: \"+ query);\r\n return AdvSearchCslService.autocomplete({field:field1, value: query}, extraParamString);\r\n }\r\n //cancels the advance search\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n //button action for when the user clicks search\r\n function search() {\r\n if(vm.ttSearchFlag == 2){\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n //// console.log(searchdata);\r\n //// console.log(vm.searchValue);\r\n vm.searchFields[\"customer\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n\r\n }\r\n var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n for (var field in convertedFields) { //set the focus to false\r\n convertedFields[field].focus = false;\r\n }\r\n AdvSearchCslService.setCurrentSearchFields(convertedFields);\r\n\r\n //the search is then done in the track and trace controller\r\n $mdDialog.hide();\r\n }\r\n\r\n//Added by Abheesh\r\n function newSearch(isAddAll) {\r\n\r\n vm.nextElem =\"\";\r\n vm.ttserchdataNew = \"\";\r\n if(vm.ttSearchFlag == 1){\r\n\r\n if(vm.textFieldData !=undefined){\r\n vm.ttserchdata = vm.textFieldData;\r\n vm.textFieldData = undefined;\r\n }\r\n\r\n if(vm.searchValue != undefined){\r\n // // console.log('tested');\r\n var searchcontent = vm.ttserchdata.split(\" \");\r\n\r\n if (searchcontent[1] == \"pickup_time\" || searchcontent[1] == \"delivered_date\" ||searchcontent[1] == \"mustship_date\" || searchcontent[1] == \"mustdeliver_date\" ||\r\n searchcontent[1] == \"shipdate_date\" || searchcontent[1] == \"deliveryeta_date\" || searchcontent[1] == \"pickup_date\"){\r\n vm.ttserchdata = vm.ttserchdata+' '+vm.searchValue;\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n }\r\n else {\r\n if(/(Shipment equipment_type) (.*)/.test(vm.ttserchdata)) {\r\n var searched_eq_type = vm.ttserchdata.match(/(Shipment) (equipment_type) (.*)/)\r\n var searchdata = $.merge([searched_eq_type[1], searched_eq_type[2], searched_eq_type[3]], [ vm.searchValue] );\r\n } else {\r\n var searchdata = $.merge( vm.ttserchdata.split(\" \"), [ vm.searchValue] );\r\n }\r\n }\r\n // vm.ttserchdata = vm.ttserchdata+' '+vm.searchValue;\r\n }\r\n else {\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n }\r\n\r\n if(searchdata[1] == 'consol'){\r\n searchdata[2] = searchdata[2]+' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n if(searchdata[1] == 'ref'){\r\n searchdata[2] = +' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n\r\n var value1 = vm.searchValue.toString();\r\n var value2 = vm.searchValue2.toString();\r\n if(vm.dateInputFlag || vm.timeInputFlag){\r\n for(var key in vm.searchFields)\r\n if(searchdata[0].toLowerCase()==\"shipment\" &&\r\n (\r\n (searchdata[1].toLowerCase() ==\"delivered_date\" && key.includes(\"shipment_delivered_date\"))\r\n || (key.includes(\"shipment_mustship_date\") && searchdata[1].toLowerCase() ==\"mustship_date\" )\r\n || (key.includes(\"shipment_mustdeliver_date\") && searchdata[1].toLowerCase() ==\"mustdeliver_date\" )\r\n || (key.includes(\"shipdate_date\") && searchdata[1].toLowerCase() ==\"shipdate_date\")\r\n || (key.includes(\"shipment_deliveryeta_date\") && searchdata[1].toLowerCase() ==\"deliveryeta_date\")\r\n || (key.includes(\"shipment_pickup_date\") && searchdata[1].toLowerCase() ==\"pickup_date\")\r\n || (key.includes(\"shipment_pickup_time\") && searchdata[1].toLowerCase() ==\"pickup_time\")\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\"\r\n }\r\n //debugger;\r\n if(vm.shipment[vm.secondChildFlg][vm.thirdChildFlg] == 'range_to'){\r\n var date2 =' '+vm.searchValue2;\r\n\r\n date2 = date2.split(\" \");\r\n\r\n if(searchdata[1] == 'pickup_time'){\r\n //vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[7]+' '+searchdata[8]+' '+searchdata[9] + ' and ' + date2[5] +' '+date2[6]+' '+date2[7];\r\n\r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = moment(searchdata[3]+\" \"+searchdata[4]+\" \"+searchdata[5]+\" \"+searchdata[6]+\" \"+searchdata[7]+\" \"+searchdata[8]+\" \"+searchdata[9]).format('hh:mm A') + ' ' +timezone_symbol + ' and '+ moment(date2[1] +' '+date2[2] +' '+date2[3] +' '+date2[4] +' '+ date2[5] +' '+date2[6]+' '+date2[7]).format('hh:mm A') + ' '+timezone_symbol;\r\n\r\n }else{\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[4]+' '+searchdata[5]+' '+searchdata[6] + ' and ' + date2[2] +' '+date2[3]+' '+date2[4];\r\n }\r\n\r\n }else{\r\n\r\n if(searchdata[1] == 'pickup_time'){\r\n //vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[7]+\" \"+searchdata[8]+\" \"+searchdata[9];\r\n\r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = moment(searchdata[3]+\" \"+searchdata[4]+\" \"+searchdata[5]+\" \"+searchdata[6]+\" \"+searchdata[7]+\" \"+searchdata[8]+\" \"+searchdata[9]).format('hh:mm A')+ ' ' +timezone_symbol;\r\n\r\n } else{\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[4]+' '+searchdata[5]+' '+searchdata[6];\r\n }\r\n\r\n //searchdata[4]+' '+searchdata[5]+' '+searchdata[6]\r\n }\r\n\r\n }else if(vm.inputRangeFlag){\r\n\r\n for(var key in vm.searchFields)\r\n\r\n if(searchdata[0].toLowerCase() == \"shipment\" &&\r\n (\r\n (key.includes(\"shipment_invoice_total\") && searchdata[1].toLowerCase() == \"invoice_total\") ||\r\n (key.includes(\"shipment_gross_weight\") && searchdata[1].toLowerCase() == \"gross_weight\") ||\r\n (key.includes(\"shipment_total_pieces\") && searchdata[1].toLowerCase() == \"total_pieces\")\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\";\r\n }\r\n\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString() +' - '+vm.searchValue2.toString();\r\n\r\n }\r\n\r\n else if(searchdata.length == 3 || (searchdata.length == 4 && searchdata[3]==\"\") ){\r\n\r\n // vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = searchdata[2];\r\n if(vm.searchValue != '' && searchdata[1] != \"milestone\"){\r\n if(vm.thirdChildFlg == 100)\r\n {\r\n add_multiple_values(\"shipment_\"+searchdata[1], searchdata[1])\r\n\r\n }\r\n else{\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString();\r\n }\r\n }else{\r\n if(searchdata[1] == \"milestone\"){\r\n\r\n if (vm.searchFields[\"milestone\"][\"value\"].length > 0){\r\n\r\n var status_arr = vm.searchFields[\"milestone\"][\"value\"].split(/[\\s,]+/);\r\n\r\n if (status_arr.includes(searchdata[2])){\r\n\r\n vm.searchFields[\"milestone\"][\"value\"] = get_array_status(status_arr, \"integer\") + '' ;\r\n\r\n }else{\r\n\r\n vm.searchFields[\"milestone\"][\"value\"] = get_array_status(status_arr, \"integer\") + multiplepillseperator + get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n\r\n }else{\r\n\r\n vm.searchFields[\"milestone\"][\"value\"] = get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n\r\n }else{\r\n\r\n if(searchdata[1] == \"equipment_type\"){\r\n\r\n if (vm.searchFields[\"shipment_equipment_type\"][\"value\"].length > 0){\r\n\r\n var status_arr = vm.searchFields[\"shipment_equipment_type\"][\"value\"].split(',');\r\n if (status_arr.includes(searchdata[2])){\r\n\r\n vm.searchFields[\"shipment_equipment_type\"][\"value\"] = get_array_status(status_arr, \"string\") + '' ;\r\n\r\n }else{\r\n vm.searchFields[\"shipment_equipment_type\"][\"value\"] = get_array_status(status_arr, \"string\") + multiplepillseperator + get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n }else{\r\n vm.searchFields[\"shipment_equipment_type\"][\"value\"] = get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n }\r\n\r\n else if(isAddAll && (searchdata[1]==\"reason_code\" || searchdata[1]==\"service_level\")){\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = \"all\";\r\n }\r\n\r\n else if(vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"].length>0 && (searchdata[1]==\"mode\"\r\n || searchdata[1]==\"reason_code\" || searchdata[1]==\"service_level\")){\r\n //adding multiple chips in shipment - mode tab\r\n if(vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] != 'all')\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] + multiplepillseperator + searchdata[2];\r\n else\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = searchdata[2];\r\n }\r\n\r\n /*else if(searchdata[1] == \"status\"){\r\n vm.searchFields[\"shipment_status\"][\"value\"] = get_status_displaycontent(searchdata[2]);\r\n }*/\r\n\r\n else{\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = searchdata[2];\r\n }\r\n\r\n }\r\n\r\n }\r\n }else{\r\n //vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[3];\r\n if(vm.searchValue != ''){\r\n if(vm.thirdChildFlg == 100)\r\n {\r\n if(searchdata.length == 4 || (searchdata.length == 5 && searchdata[4]==\"\"))\r\n {\r\n //for shipment -> AWB\r\n\r\n if((searchdata[1]==\"awb\" && searchdata[2]==\"bol\") && vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"].length>0 )\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] + multiplepillseperator + vm.searchValue.toString();\r\n }\r\n else\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString();\r\n }\r\n }\r\n else\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = vm.searchValue.toString();\r\n }\r\n\r\n }\r\n else{\r\n for(var key in vm.searchFields)\r\n\r\n if(searchdata[0].toLowerCase() == \"shipment\" &&\r\n (\r\n (key.includes(\"shipment_invoice_total\") && searchdata[1].toLowerCase() == \"invoice_total\")\r\n || (key.includes(\"shipment_gross_weight\") && searchdata[1].toLowerCase() == \"gross_weight\")\r\n || (key.includes(\"shipment_total_pieces\") && searchdata[1].toLowerCase() == \"total_pieces\")\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\"\r\n }\r\n\r\n add_multiple_values(\"shipment_\"+searchdata[1]+\"_\"+searchdata[2], searchdata[1]+\"_\"+searchdata[2])\r\n\r\n }\r\n\r\n }\r\n // vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue;\r\n else { vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[3]; }\r\n }\r\n vm.searchValue = \"\";\r\n vm.searchValue2 = \"\";\r\n vm.ttserchdata = \"\";\r\n\r\n }else if(vm.ttSearchFlag == 2){\r\n\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n\r\n if(vm.searchValue != ''){\r\n\r\n if(searchdata[1] == 'contact' || searchdata[1] == 'street'){\r\n\r\n // vm.searchFields[\"pickup_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString();\r\n add_multiple_values(\"pickup_\"+searchdata[1]+\"_\"+searchdata[2], searchdata[1]+\"_\"+searchdata[2]);\r\n\r\n }else{\r\n\r\n // vm.searchFields[\"pickup_\"+searchdata[1]][\"value\"] = vm.searchValue.toString();\r\n add_multiple_values(\"pickup_\"+searchdata[1], searchdata[1]);\r\n }\r\n }\r\n\r\n }\r\n else if(vm.ttSearchFlag == 3){\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n //vm.searchFields[\"consignee_\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n if(vm.searchValue != ''){\r\n\r\n if(searchdata[1] == 'contact' || searchdata[1] == 'street'){\r\n\r\n // vm.searchFields[\"consignee_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString();\r\n add_multiple_values(\"consignee_\"+searchdata[1]+\"_\"+searchdata[2], searchdata[1]+\"_\"+searchdata[2]);\r\n\r\n }else{\r\n\r\n // vm.searchFields[\"consignee_\"+searchdata[1]][\"value\"] = vm.searchValue.toString();\r\n add_multiple_values(\"consignee_\"+searchdata[1], searchdata[1]);\r\n }\r\n }\r\n\r\n }\r\n // var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n\r\n var convertedFields = vm.searchFields;\r\n\r\n vm.chipData = [];\r\n for (var field in convertedFields) { //set the focus to false\r\n\r\n convertedFields[field].focus = false;\r\n\r\n if((convertedFields[field].value !== null && convertedFields[field].value != '' && !convertedFields[field].value.toString().includes('undefined'))){\r\n\r\n if(convertedFields[field].field == \"milestone\"){\r\n\r\n var arr_values = convertedFields[field].value.split(/[\\s,]+/);\r\n\r\n for (var i=0; i< arr_values.length; i++) {\r\n if(arr_values[i] == '0'){\r\n arr_values[i] = \"open\";\r\n }\r\n else if(arr_values[i] == '1'){\r\n arr_values[i] = \"covered\";\r\n }else if (arr_values[i] == '2'){\r\n arr_values[i] = \"pickup\";\r\n }\r\n else if (arr_values[i] == '3'){\r\n arr_values[i] = \"dispatched\";\r\n }\r\n else if (arr_values[i] == '4'){\r\n arr_values[i] = \"loaded\";\r\n }\r\n else if (arr_values[i] == '5'){\r\n arr_values[i] = \"consignee\";\r\n }\r\n else if (arr_values[i] == '6'){\r\n arr_values[i] = \"delivered\";\r\n }\r\n }\r\n convertedFields[field].value = arr_values.join(\", \");\r\n }\r\n\r\n vm.chipData.push(convertedFields[field]);\r\n\r\n //added by chaitanya for removal of multiple pills\r\n\r\n var idx=null,idx2=null, cnt=0\r\n for( var i in vm.chipData){\r\n\r\n if( [\"shipment_reason_code\"].includes(vm.chipData[i].field)){\r\n var myArrayRC = vm.chipData[i].value.split(' , ');\r\n var uniqueRC = array_unique(myArrayRC);\r\n var fnalvalueRC = uniqueRC.join(' , ');\r\n vm.chipData[i].value = fnalvalueRC.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_service_level\"].includes(vm.chipData[i].field)){\r\n var myArraySL = vm.chipData[i].value.split(' , ');\r\n var uniqueSL = array_unique(myArraySL);\r\n var fnalvalueSL = uniqueSL.join(' , ');\r\n vm.chipData[i].value = fnalvalueSL.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_awb_bol\"].includes(vm.chipData[i].field)){\r\n var myArrayAW = vm.chipData[i].value.split(' , ');\r\n var uniqueAW = array_unique(myArrayAW);\r\n var fnalvalueAW = uniqueAW.join(' , ');\r\n vm.chipData[i].value = fnalvalueAW.replace(/,\\s*$/, \"\").trim();\r\n }\r\n\r\n if( [\"business_type_group\",\"shipment_mode\"].includes(vm.chipData[i].field))\r\n cnt++;\r\n\r\n if(vm.chipData[i].field == \"business_type_group\")\r\n {\r\n var value1 = vm.chipData[i].value;\r\n idx = i;\r\n }\r\n else\r\n {\r\n var value1 = \"\";\r\n }\r\n if(vm.chipData[i].field == \"shipment_mode\")\r\n {\r\n idx2 = i;\r\n var value2 = vm.chipData[i].value;\r\n }\r\n else\r\n {\r\n var value2 = \"\";\r\n }\r\n }\r\n if(value1 && value2){\r\n //if(value1 != value2)\r\n var myArray = value2.split(' , ').concat(value1);\r\n var unique = array_unique(myArray);\r\n var fnalvalue = unique.join(' , ');\r\n vm.chipData[idx2].value = fnalvalue.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if(value2){\r\n var myArray = value2.split(' , ').concat(value1);\r\n var unique = array_unique(myArray);\r\n var fnalvalue = unique.join(' , ');\r\n vm.chipData[idx2].value = fnalvalue.replace(/,\\s*$/, \"\").trim();\r\n }\r\n\r\n if((cnt > 0 && idx2 >0) && idx)\r\n vm.chipData.splice(idx,1);\r\n\r\n }\r\n }\r\n // AdvSearchService.setCurrentSearchFields(convertedFields,null,true);\r\n callingToRemoveCrossIConInChips(vm.chipData, 'popup');\r\n\r\n //the search is then done in the track and trace controller\r\n //$mdDialog.hide();\r\n }\r\n\r\n function add_multiple_values(shipment_searchdata, searchdata){\r\n if(vm.searchFields[shipment_searchdata][\"value\"].length > 0 && !vm.searchFields[shipment_searchdata][\"value\"].split(\" , \").includes(vm.searchValue.toString())\r\n &&\r\n (searchdata==\"ref\" || shipment_searchdata == \"pickup_name\" || shipment_searchdata == \"pickup_contact_name\" || shipment_searchdata == \"pickup_street_address\" ||\r\n shipment_searchdata == \"pickup_state\" || searchdata==\"origin_state\" || searchdata==\"origin_city\" || searchdata == \"destination_state\" || searchdata == \"destination_city\" ||\r\n searchdata==\"consol\" || searchdata==\"pro\" || searchdata==\"reference\" || searchdata==\"invoice\" || searchdata==\"lane_pair\" || shipment_searchdata == \"pickup_city\" ||\r\n shipment_searchdata == \"pickup_zip\" || shipment_searchdata == \"pickup_phone\" || shipment_searchdata == \"consignee_name\" || shipment_searchdata == \"consignee_contact_name\" ||\r\n shipment_searchdata == \"consignee_street_address\" || shipment_searchdata == \"consignee_state\" || shipment_searchdata == \"consignee_city\" ||\r\n shipment_searchdata == \"consignee_zip\" || shipment_searchdata == \"consignee_phone\"\r\n || searchdata==\"bol\" || searchdata==\"container\" || searchdata==\"consignee_reference\" || searchdata==\"load\" ))\r\n {\r\n //add multiple values to the chip\r\n vm.searchFields[shipment_searchdata][\"value\"] =vm.searchFields[shipment_searchdata][\"value\"]+ multiplepillseperator + vm.searchValue.toString();\r\n }\r\n else if(vm.searchFields[shipment_searchdata][\"value\"].length == 0)\r\n {\r\n vm.searchFields[shipment_searchdata][\"value\"] = vm.searchValue.toString();\r\n }\r\n }\r\n\r\n function get_array_status(status_arr, object_type){\r\n\r\n for (i=0; i < status_arr.length; i++){\r\n if (object_type == \"integer\"){\r\n status_arr[i] = get_milestone_displaycontent(status_arr[i])\r\n }\r\n else {\r\n status_arr[i] = get_string_status_displaycontent(status_arr[i])\r\n }\r\n }\r\n\r\n return status_arr.join(\" , \");\r\n\r\n }\r\n\r\n function get_string_status_displaycontent(searchdata){\r\n if(searchdata == '0'){\r\n var displaycontent = 'open';\r\n }\r\n else if(searchdata == '1'){\r\n var displaycontent = 'covered';\r\n }\r\n else if(searchdata == '2'){\r\n var displaycontent = 'pickup';\r\n }\r\n else if(searchdata == '3'){\r\n var displaycontent = 'dispatched';\r\n }\r\n else if(searchdata == '4'){\r\n var displaycontent = 'loaded';\r\n }\r\n else if(searchdata == '5'){\r\n var displaycontent = 'consignee';\r\n }\r\n else if(searchdata == '6'){\r\n var displaycontent = 'delivered';\r\n }\r\n else {\r\n var displaycontent = searchdata;\r\n }\r\n\r\n return displaycontent;\r\n }\r\n\r\n function get_milestone_displaycontent(searchdata){\r\n if(searchdata == 'open'){\r\n var displaycontent = '0';\r\n }\r\n else if(searchdata == 'covered'){\r\n var displaycontent = '1';\r\n }\r\n else if(searchdata == 'pickup'){\r\n var displaycontent = '2';\r\n }\r\n else if(searchdata == 'dispatched'){\r\n var displaycontent = '3';\r\n }\r\n else if(searchdata == 'loaded'){\r\n var displaycontent = '4';\r\n }\r\n else if(searchdata == 'consignee'){\r\n var displaycontent = '5';\r\n }\r\n else if(searchdata == 'delivered'){\r\n var displaycontent = '6';\r\n }\r\n else {\r\n var displaycontent = searchdata;\r\n }\r\n return displaycontent;\r\n\r\n }\r\n\r\n function get_status_displaycontent(searchdata){\r\n\r\n var status_array = new Array();\r\n\r\n searchdata = searchdata.trim();\r\n var space_text = searchdata.search(\" \");\r\n if(space_text){\r\n searchdata = searchdata.replace(\" \", \"_\");\r\n }\r\n\r\n status_array =\r\n {\r\n \"planned\":\"planned\",\r\n \"at_pickup\":\"pickup\",\r\n \"loaded\":\"loaded\",\r\n \"at_consignee\":\"consignee\",\r\n \"delivered\":\"delivered\"\r\n }\r\n\r\n if(status_array[searchdata]){\r\n return status_array[searchdata];\r\n }else{\r\n return searchdata;\r\n }\r\n\r\n }\r\n\r\n function get_status_original_value(searchdata){\r\n\r\n var status_array = new Array();\r\n\r\n status_array =\r\n {\r\n \"planned\":\"planned\",\r\n \"pickup\":\"at pickup\",\r\n \"loaded\":\"loaded\",\r\n \"consignee\":\"at consignee\",\r\n \"delivered\":\"delivered\"\r\n }\r\n\r\n if(status_array[searchdata]){\r\n return status_array[searchdata];\r\n }else{\r\n return searchdata;\r\n }\r\n }\r\n\r\n function array_unique(arr) {\r\n var result = [];\r\n for (var i = 0; i < arr.length; i++) {\r\n if (result.indexOf(arr[i]) == -1) {\r\n result.push(arr[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function clearSearch(){\r\n vm.chipData = [];\r\n }\r\n\r\n function advSearch(event){\r\n var convertedFields = vm.searchFields;\r\n for (var field in convertedFields) {\r\n //set the focus to false\r\n //// console.log(convertedFields[field]);\r\n\r\n if(field == 'milestone'){\r\n\r\n var status_arr = vm.searchFields[\"milestone\"][\"value\"].split(/[\\s,]+/);\r\n\r\n if (status_arr.length > 1 ){\r\n convertedFields[field].value = get_array_status(status_arr, \"integer\");\r\n }\r\n else {\r\n convertedFields[field].value = get_milestone_displaycontent(convertedFields[field].value);\r\n }\r\n\r\n }\r\n\r\n else if(field == 'shipment_status'){\r\n convertedFields[field].value = get_status_displaycontent(convertedFields[field].value);\r\n }\r\n\r\n else if(convertedFields[field].value.toString().includes('undefined')){\r\n convertedFields[field].value = \"\";\r\n }\r\n\r\n convertedFields[field].focus = false;\r\n\r\n }\r\n\r\n AdvSearchCslService.setCurrentSearchFields(convertedFields);\r\n\r\n if(event.target.id != \"btnSearch\" || event.target.id != \"spSearch\" ) {\r\n $mdDialog.cancel();\r\n }\r\n\r\n else {\r\n angular.element(document.querySelector('#AdvSearch')).focus();\r\n }\r\n\r\n TrackTraceCslPaginationService.save_page_number(1);\r\n TrackTraceCslPaginationService.save_per_page(10);\r\n\r\n vm.tableParams = ServerTableCslService.getTable();\r\n\r\n vm.tableParams.page(TrackTraceCslPaginationService.get_page_number());\r\n vm.tableParams.count(TrackTraceCslPaginationService.get_per_page());\r\n vm.tableParams.reload();\r\n\r\n }\r\n\r\n\r\n //saves the current form to default\r\n function saveToDefault() {\r\n vm.clearDefault(); //clear the old one so we can save a new one\r\n $log.debug(\"saved to default\");\r\n var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n AdvSearchCslService.setCurrentSearchFields(convertedFields);\r\n AdvSearchCslService.saveDefaultSearch({}, 'testDefault', true).then(function() {\r\n AdvSearchCslService.listSavedSearches().then(function(res){\r\n vm.isSavedSearch = res['data'].length > 0;\r\n });\r\n });\r\n }\r\n\r\n function loadDefault() {\r\n AdvSearchCslService.listSavedSearches().then(function(res){\r\n var isSavedSearch = res['data'].length > 0;\r\n if(isSavedSearch) {\r\n AdvSearchCslService.loadSearch((res['data'])['0'].id).then(function(res) {\r\n var searchFields = AdvSearchCslService.getCurrentSearchFields();\r\n var data = res['data'];\r\n for (var field in searchFields) {\r\n if(data[field] != null) {\r\n if (field.includes(\"date\")){\r\n searchFields[field].value = new Date(data[field]);\r\n } else {\r\n searchFields[field].value = data[field];\r\n }\r\n } else {\r\n searchFields[field].value = \"\";\r\n }\r\n }\r\n vm.searchFields = searchFields;\r\n vm.searchFields;\r\n });\r\n }\r\n });\r\n }\r\n\r\n function clearDefault() {\r\n //use list to get the correct id to delete\r\n AdvSearchCslService.listSavedSearches().then(function(res){\r\n if(res['data'].length > 0) { //if there is one to delete\r\n //delete the saved search with the id\r\n AdvSearchCslService.deleteSearch((res['data'])['0'].id).then(function(res) {\r\n //update if there is any saved searches\r\n AdvSearchCslService.listSavedSearches().then(function(res){\r\n vm.isSavedSearch = res['data'].length > 0;\r\n //vm.resetForm();\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n function resetForm() {\r\n var emptySearchFields = angular.copy(AdvSearchCslService.getEmptySearchFields());\r\n for (var field in emptySearchFields){\r\n vm.searchFields[field].value = emptySearchFields[field].value;\r\n }\r\n }\r\n\r\n //returns a list of the reason codes from the database\r\n //function getReasonCodes() {\r\n //TODO: change this to return results from a query\r\n // return AdvSearchCslService.getReasonCodes();\r\n //}\r\n\r\n //returns a list of the service levels from the database\r\n //function getServiceLevels() {\r\n // //TODO: change this to return results from a query\r\n // return AdvSearchCslService.getServiceLevelCodes();\r\n //}\r\n\r\n //function getBusinessTypes() {\r\n // return AdvSearchCslService.getBusinessTypeCodes();\r\n //}\r\n\r\n function formClick(event) {\r\n event.preventDefault();\r\n if (vm.openInputFlag) // if input is availble enter click is handled for add btn\r\n {\r\n newSearch();\r\n clearFlags();\r\n angular.element(document.querySelector('#AdvSearch')).focus();\r\n } else {\r\n advSearch(event);\r\n }\r\n }\r\n\r\n\r\n function addOneMoreDay(selectedDate){\r\n $scope.dateMin = moment(selectedDate).add(1,'days');\r\n }\r\n\r\n function subtractOneDay(selectedDate){\r\n $scope.dateMax = moment(selectedDate).subtract(1,'days');\r\n }\r\n\r\n function callingToRemoveCrossIConInChips(data, page){\r\n\r\n switch ($state.current.name){\r\n\r\n case 'track-trace-booking' :\r\n\r\n vm.bookingMode = true;\r\n vm.transitMode = false;\r\n vm.heading_text = \"Booking\";\r\n vm.booking_number_quick_search = true;\r\n vm.status_advanced_search = false;\r\n vm.searchType = 'booking_number';\r\n AdvSearchCslService.removeCloseMarkInChips(data, page);\r\n\r\n break;\r\n\r\n case 'track-trace-transit' :\r\n\r\n vm.bookingMode = false;\r\n vm.transitMode = true;\r\n vm.status_advanced_search = false;\r\n vm.heading_text = \"In_Transit\";\r\n AdvSearchCslService.removeCloseMarkInChips(data, page);\r\n\r\n break;\r\n\r\n default: \r\n vm.bookingMode = false;\r\n vm.transitMode = false;\r\n vm.heading_text = \"Track & Trace\";\r\n AdvSearchCslService.removeCloseMarkInChips(data, page); \r\n \r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n})();\r\n\n/**\r\n * @ngdoc directive\r\n * @name auto-complete\r\n * @description directive that creates an autocomplete form\r\n * @restrict E\r\n */\r\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .directive('cmtsAutoComplete', cmtsAutoComplete)\r\n\r\n /** @ngInject */\r\n function cmtsAutoComplete() {\r\n var directive = {\r\n restrict: 'E',\r\n scope: {\r\n field: '@',\r\n searchField: '@',\r\n displayName: '@',\r\n searchText: '=',\r\n focusField: '=',\r\n extraParamString: '@'\r\n },\r\n templateUrl: '/app/advanced-search/cmts/auto-complete-field.html',\r\n controller: \"AdvSearchCmtsController\",\r\n controllerAs: \"searchCtrl\",\r\n link: function(scope, element, attrs){\r\n // debugger;\r\n }\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.search\r\n * @description method that includes the current search fields into a search\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.autocomplete\r\n * @description method that querys from the database given the letters typed in\r\n * @param {query} - the letters from the input field\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.saveDefaultSearch\r\n * @description method that saves a search\r\n * @param {query} - the searchFields that you want to saved\r\n * @param {name} - name for the search that your saving\r\n * @param {isDefault} - true or false wether this is your default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.listSavedSearches\r\n * @description method that lists all the searches that have been saved\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.loadSearch\r\n * @description method that loads the search with the given id\r\n * @param {id} - the id for the search that you want to load\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.deleteSearch\r\n * @description method that deletes the search with the given id\r\n * @param {id} - the id for the search that you want to delete\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getEmptySearchFields\r\n * @description method that gets the empty search field\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getCurrentSearchFields\r\n * @description method that gets the current search fields\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getIsFirstSearch\r\n * @description method that gets if the search is the first search or not\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setIsFirstSearch\r\n * @description method that sets if the search is the first search or not\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setCurrentSearchFields\r\n * @params {searchFields}\r\n * @description method that sets teh current search fields with searchFields\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setClickedChip\r\n * @description method TODO\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.removeChip\r\n * @description method TODO\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getSearchFieldsFocus\r\n * @description method TODO\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('AdvSearchCmtsService', AdvSearchCmtsService);\r\n\r\n /** @ngInject */\r\n AdvSearchCmtsService.$inject = ['$http', '$log', '$filter', 'api', '$q', '$timeout', '$rootScope', '$location', 'DownloadService', 'TrackTraceCmtsPaginationService'];\r\n function AdvSearchCmtsService($http, $log, $filter, api, $q, $timeout, $rootScope, $location, DownloadService, TrackTraceCmtsPaginationService) {\r\n\r\n var isSavedSearch = false;\r\n var modifySearchVal=false;\r\n var searchFieldChips = [];\r\n listSavedSearches(); //sets isSavedSearch\r\n var isFirstSearch = true; //saves if it is the first search\r\n var timeoutPromise = false;\r\n\r\n var emptySearchFields = {\r\n /*shipdate_from: {\r\n field: \"shipdate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SHIP_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipdate_to: {\r\n field: \"shipdate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SHIP_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },*/\r\n load_status: {\r\n field: \"load_status\",\r\n value: \"\",\r\n display: \"Load Status\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n status: {\r\n field: \"status\",\r\n value: \"\",\r\n display: \"TRACKTRACE.STATUS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n load_number: {\r\n field: \"load_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.LOAD\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n planned_start: {\r\n field: \"planned_start\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PLANNED_START\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_location: {\r\n field: \"pickup_location\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PICK_UP_LOCATION\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n delivery_location: {\r\n field: \"delivery_location\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DELIVERY_LOCATION\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n planned_end: {\r\n field: \"planned_end\",\r\n value: \"\",\r\n display: \"TRACKTRACE.AWB_BOL\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_gross_wt: {\r\n field: \"total_gross_wt\",\r\n value: \"\",\r\n display: \"TRACKTRACE.TOTAL_GROSS_WEIGHT\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n route_number: {\r\n field: \"route_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ROUTE_NUMBER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_piece_count: {\r\n field: \"total_piece_count\",\r\n value: \"\",\r\n display: \"TRACKTRACE.TOTAL_PIECE_COUNT\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n bol_number: {\r\n field: \"bol_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.BOL_NUMBER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pro_number: {\r\n field: \"pro_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PRO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n load_billing_invoice_status: {\r\n field: \"load_billing_invoice_status\",\r\n value: \"\",\r\n display: \"TRACKTRACE.BILLING_STATUS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n stop_count: {\r\n field: \"stop_count\",\r\n value: \"\",\r\n display: \"TRACKTRACE.STOP_COUNT\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n order_count: {\r\n field: \"order_count\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ORDER_COUNT\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n trading_partner_carrier_name: {\r\n field: \"trading_partner_carrier_name\",\r\n value: \"\",\r\n display: \"TRACKTRACE.TP_CARRIER_NAME\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n trading_partner_carrier_number: {\r\n field: \"trading_partner_carrier_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.TP_CARRIER_NUMBER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n transport_mode_name: {\r\n field: \"transport_mode_name\",\r\n value: \"\",\r\n display: \"TRACKTRACE.TRANSPORT_Mode\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n trading_partner_client_name: {\r\n field: \"trading_partner_client_name\",\r\n value: \"\",\r\n display: \"TRACKTRACE.TP_CLIENT_NAME\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n trading_partner_client_number: {\r\n field: \"trading_partner_client_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.TP_CLIENT_NUMBER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n service_option_name: {\r\n field: \"service_option_name\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SERVICE_OPTION\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_invoice_amount: {\r\n field: \"total_invoice_amount\",\r\n value: \"\",\r\n display: \"TRACKTRACE.TOTAL_INVOICE_AMOUNT\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pro: {\r\n field: \"pro\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PRO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n planned_start_from: {\r\n field: \"planned_start_from\",\r\n value: \"\",\r\n display: \"Planned Start From\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n planned_start_to: {\r\n field: \"planned_start_to\",\r\n value: \"\",\r\n display: \"Planned Start To\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n planned_end_from: {\r\n field: \"planned_end_from\",\r\n value: \"\",\r\n display: \"Planned End From\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n planned_end_to: {\r\n field: \"planned_end_to\",\r\n value: \"\",\r\n display: \"Planned End To\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consigneeapptdate_to: {\r\n field: \"consigneeapptdate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CONSIGNEE_APPT_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n reason_code: {\r\n field: \"reason_code\",\r\n value: \"\",\r\n display: \"TRACKTRACE.REASON_CODE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n milestone: {\r\n field: \"milestone\",\r\n value: \"\",\r\n display: \"TRACKTRACE.MILESTONE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n quick_filter: {\r\n field: \"quick_filter\",\r\n value: [],\r\n display: \"TRACKTRACE.FILTER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n arrive_date_from: {\r\n field: \"arrive_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ARRIVE_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n arrive_date_to: {\r\n field: \"arrive_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ARRIVE_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n origins: {\r\n field: \"origins\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ORIGINS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n destinations: {\r\n field: \"destinations\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DESTINATIONS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n destinationstate: {\r\n field: \"destinationstate\",\r\n value: \"\",\r\n display: \"Delivery City / State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n originstate: {\r\n field: \"originstate\",\r\n value: \"\",\r\n display: \"Pickup City / State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n booking_number: {\r\n field: \"booking_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.BOOKING_NUMBER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n customername: {\r\n field: \"customername\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CUSTOMER_NAME\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n customeraddress1: {\r\n field: \"customeraddress1\",\r\n value: \"\",\r\n display: \"Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n customerphone: {\r\n field: \"customerphone\",\r\n value: \"\",\r\n display: \"Customer Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_delivery_status: {\r\n field: \"shipment_delivery_status\",\r\n value: \"\",\r\n display: \"Delivery Status\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_current_status: {\r\n field: \"shipment_current_status\",\r\n value: \"\",\r\n display: \"Current Status\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_is_less_than: {\r\n field: \"shipment_invoice_total_is_less_than\",\r\n value: \"\",\r\n display: \"Invoice total <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_is_greater_than: {\r\n field: \"shipment_invoice_total_is_greater_than\",\r\n value: \"\",\r\n display: \"Invoice total >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_equal_to: {\r\n field: \"shipment_invoice_total_equal_to\",\r\n value: \"\",\r\n display: \"Invoice total =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_range: {\r\n field: \"shipment_invoice_total_range\",\r\n value: \"\",\r\n display: \"Invoice total between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_range: {\r\n field: \"shipment_gross_weight_range\",\r\n value: \"\",\r\n display: \"Gross Weight between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_equal_to: {\r\n field: \"shipment_gross_weight_equal_to\",\r\n value: \"\",\r\n display: \"Gross Weight =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_is_greater_than: {\r\n field: \"shipment_gross_weight_is_greater_than\",\r\n value: \"\",\r\n display: \"Gross Weight >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_is_less_than: {\r\n field: \"shipment_gross_weight_is_less_than\",\r\n value: \"\",\r\n display: \"Gross Weight <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_is_less_than: {\r\n field: \"shipment_total_pieces_is_less_than\",\r\n value: \"\",\r\n display: \"Total Pieces <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_is_greater_than: {\r\n field: \"shipment_total_pieces_is_greater_than\",\r\n value: \"\",\r\n display: \"Total Pieces >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_equal_to: {\r\n field: \"shipment_total_pieces_equal_to\",\r\n value: \"\",\r\n display: \"Total Pieces =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_range: {\r\n field: \"shipment_total_pieces_range\",\r\n value: \"\",\r\n display: \"Total Pieces Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n\r\n shipment_invoice: {\r\n field: \"shipment_invoice\",\r\n value: \"\",\r\n display: \"Invoice\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_consignee_reference: {\r\n field: \"shipment_consignee_reference\",\r\n value: \"\",\r\n display: \"CONSIGNEE REF #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_pro: {\r\n field: \"shipment_pro\",\r\n value: \"\",\r\n display: \"PRO #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_bol: {\r\n field: \"shipment_bol\",\r\n value: \"\",\r\n display: \"BOL #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_reference: {\r\n field: \"shipment_reference\",\r\n value: \"\",\r\n display: \"REF #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_load: {\r\n field: \"shipment_load\",\r\n value: \"\",\r\n display: \"LOAD #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_container: {\r\n field: \"shipment_container\",\r\n value: \"\",\r\n display: \"Container/Trailer #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n is_bookmarked: {\r\n field: \"is_bookmarked\",\r\n value: \"\",\r\n display: \"Isbookmarked\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_piece_count_is_less_than: {\r\n field: \"total_piece_count_is_less_than\",\r\n value: \"\",\r\n display: \"Total Piece Count <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_piece_count_is_greater_than: {\r\n field: \"total_piece_count_is_greater_than\",\r\n value: \"\",\r\n display: \"Total Piece Count >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_piece_count_equal_to: {\r\n field: \"total_piece_count_equal_to\",\r\n value: \"\",\r\n display: \"Total Piece Count =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_piece_count_range: {\r\n field: \"total_piece_count_range\",\r\n value: \"\",\r\n display: \"Total Piece Count Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n deliverydate_date_range_to: {\r\n field: \"deliverydate_date_range_to\",\r\n value: \"\",\r\n display: \"Delivered Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n\r\n order_count_is_less_than: {\r\n field: \"order_count_is_less_than\",\r\n value: \"\",\r\n display: \"Order Count <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n order_count_is_greater_than: {\r\n field: \"order_count_is_greater_than\",\r\n value: \"\",\r\n display: \"Order Count >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n order_count_equal_to: {\r\n field: \"order_count_equal_to\",\r\n value: \"\",\r\n display: \"Order Count =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n order_count_range: {\r\n field: \"order_count_range\",\r\n value: \"\",\r\n display: \"Order Count Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_deliveryeta_date_equal_to: {\r\n field: \"shipment_deliveryeta_date_equal_to\",\r\n value: \"\",\r\n display: \"Delivery ETA Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n stop_count_range: {\r\n field: \"stop_count_range\",\r\n value: \"\",\r\n display: \"Stop Count Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n stop_count_equal_to: {\r\n field: \"stop_count_equal_to\",\r\n value: \"\",\r\n display: \"Stop Count =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n stop_count_is_greater_than: {\r\n field: \"stop_count_is_greater_than\",\r\n value: \"\",\r\n display: \"Stop Count >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n stop_count_is_less_than: {\r\n field: \"stop_count_is_less_than\",\r\n value: \"\",\r\n display: \"Stop Count <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n planned_start_equal_to: {\r\n field: \"planned_start_equal_to\",\r\n value: \"\",\r\n display: \"Planned Start\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n planned_start_range: {\r\n field: \"planned_start_range\",\r\n value: \"\",\r\n display: \"Planned Start Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n planned_end_equal_to: {\r\n field: \"planned_end_equal_to\",\r\n value: \"\",\r\n display: \"Planned End\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n planned_end_range: {\r\n field: \"planned_end_range\",\r\n value: \"\",\r\n display: \"Planned End Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n duedate_date_equal_to: {\r\n field: \"duedate_date_equal_to\",\r\n value: \"\",\r\n display: \"Due Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n duedate_date_range_to: {\r\n field: \"duedate_date_range_to\",\r\n value: \"\",\r\n display: \"Due Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimateddelivery_date_equal_to: {\r\n field: \"estimateddelivery_date_equal_to\",\r\n value: \"\",\r\n display: \"Expected Delivery Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimateddelivery_date_range_to: {\r\n field: \"estimateddelivery_date_range_to\",\r\n value: \"\",\r\n display: \"Expected Delivery Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_origin_state: {\r\n field: \"shipment_origin_state\",\r\n value: \"\",\r\n display: \"Pickup State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_origin_city: {\r\n field: \"shipment_origin_city\",\r\n value: \"\",\r\n display: \"Pickup City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_destination_state: {\r\n field: \"shipment_destination_state\",\r\n value: \"\",\r\n display: \"Delivery State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_destination_city: {\r\n field: \"shipment_destination_city\",\r\n value: \"\",\r\n display: \"Delivery City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shippername: {\r\n field: \"shippername\",\r\n value: \"\",\r\n display: \"Shipper Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_name: {\r\n field: \"consignee_name\",\r\n value: \"\",\r\n display: \"Consignee Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_contact_name: {\r\n field: \"consignee_contact_name\",\r\n value: \"\",\r\n display: \"Consignee Contact Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_street_address: {\r\n field: \"consignee_street_address\",\r\n value: \"\",\r\n display: \"Consignee Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_state: {\r\n field: \"consignee_state\",\r\n value: \"\",\r\n display: \"Consignee State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_city: {\r\n field: \"consignee_city\",\r\n value: \"\",\r\n display: \"Consignee City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_zip: {\r\n field: \"consignee_zip\",\r\n value: \"\",\r\n display: \"Consignee Zip\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_phone: {\r\n field: \"consignee_phone\",\r\n value: \"\",\r\n display: \"Consignee Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_name: {\r\n field: \"pickup_name\",\r\n value: \"\",\r\n display: \"Pickup Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_contact_name: {\r\n field: \"pickup_contact_name\",\r\n value: \"\",\r\n display: \"Pickup Contact Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_street_address: {\r\n field: \"pickup_street_address\",\r\n value: \"\",\r\n display: \"Pickup Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_state: {\r\n field: \"pickup_state\",\r\n value: \"\",\r\n display: \"Pickup State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_city: {\r\n field: \"pickup_city\",\r\n value: \"\",\r\n display: \"Pickup City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_zip: {\r\n field: \"pickup_zip\",\r\n value: \"\",\r\n display: \"Pickup Zip\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_phone: {\r\n field: \"pickup_phone\",\r\n value: \"\",\r\n display: \"Pickup Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_invoice_amount_is_less_than: {\r\n field: \"total_invoice_amount_is_less_than\",\r\n value: \"\",\r\n display: \"Total Invoice Amount <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_invoice_amount_is_greater_than: {\r\n field: \"total_invoice_amount_is_greater_than\",\r\n value: \"\",\r\n display: \"Total Invoice Amount >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_invoice_amount_equal_to: {\r\n field: \"total_invoice_amount_equal_to\",\r\n value: \"\",\r\n display: \"Total Invoice Amount =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_invoice_amount_range: {\r\n field: \"total_invoice_amount_range\",\r\n value: \"\",\r\n display: \"Total Invoice Amount Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_gross_wt_is_less_than: {\r\n field: \"total_gross_wt_is_less_than\",\r\n value: \"\",\r\n display: \"Total Gross Weight <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_gross_wt_is_greater_than: {\r\n field: \"total_gross_wt_is_greater_than\",\r\n value: \"\",\r\n display: \"Total Gross Weight >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_gross_wt_equal_to: {\r\n field: \"total_gross_wt_equal_to\",\r\n value: \"\",\r\n display: \"Total Gross Weight =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n total_gross_wt_range: {\r\n field: \"total_gross_wt_range\",\r\n value: \"\",\r\n display: \"Total Gross Weight Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n equipment_name: {\r\n field: \"equipment_name\",\r\n value: \"\",\r\n display: \"Equipment Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_type: {\r\n field: \"shipment_type\",\r\n value: \"\",\r\n display: \"Shipment Type\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n reference_number: {\r\n field: \"reference_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.REFERENCE_NUM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_revenue_code: {\r\n field: \"shipment_revenue_code\",\r\n value: \"\",\r\n display: \"Revenue Code\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n forecast_cmts_custom_options: {\r\n field: \"forecast_cmts_custom_options\",\r\n value: \"\",\r\n display: \"Forecast Custom Option\",\r\n displayValue: true,\r\n focus: false\r\n }\r\n };\r\n\r\n var search_params = [],\r\n hasLoadedSearchValues = false,\r\n currentSearchFields = angular.copy(emptySearchFields),\r\n query = {};\r\n updateQuery();\r\n removeCloseMarkInChips;\r\n\r\n function listSavedSearches() {\r\n\r\n\r\n var promise = $http.get(api.url_v2 + '/search/saved').then(function(res){\r\n $log.debug(res);\r\n isSavedSearch = res['data'].length > 0;\r\n return res;\r\n });\r\n return promise;\r\n }\r\n\r\n function deleteSearch(id) {\r\n var promise = $http.delete(api.url_v2 + '/search/saved/' + id).then(function(res){\r\n $log.debug(res);\r\n });\r\n return promise;\r\n }\r\n\r\n //goes through the search fields from advance search and generates an object for pills\r\n function generateChips() {\r\n var k = 0; //for the chipTranslations index\r\n searchFieldChips.length = 0;\r\n var plannedstartbetweendate = localStorage.getItem('plannedstartbetweendate');\r\n var plannedendbetweendate = localStorage.getItem('plannedendbetweendate');\r\n for (var i in currentSearchFields) {\r\n\r\n if(currentSearchFields[i].value !== null && currentSearchFields[i].value !== \"\" && i != 'quick_filter' && (i != 'invalidate_cache')) { //dont make chips for quick_filter\r\n var object = {};\r\n object['key'] = currentSearchFields[i].field;\r\n object['display'] = currentSearchFields[i].display;\r\n\r\n /*if(currentSearchFields[i].display.includes('Time') ){\r\n currentSearchFields[i].value = new Date(currentSearchFields[i].value);\r\n }\r\n debugger;*/\r\n // code for between dates invalid issue after refresh\r\n\r\n if(currentSearchFields[i].display == 'Planned Start Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('plannedstartbetweendate') : currentSearchFields[i].value;\r\n }\r\n else if(currentSearchFields[i].display == 'Planned End Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('plannedendbetweendate') : currentSearchFields[i].value;\r\n }\r\n else{\r\n object['searchField'] = currentSearchFields[i].value;\r\n }\r\n object['displayValue'] = currentSearchFields[i].displayValue;\r\n\r\n if(object.display.includes('Planned Start Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('plannedstartbetweendate',object['searchField']);\r\n }\r\n\r\n if(object.display.includes('Planned End Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('plannedendbetweendate',object['searchField']);\r\n }\r\n\r\n if(i == 'load_status'){\r\n object['searchField'] = currentSearchFields[i].value;\r\n }\r\n else if(i == 'status'){\r\n object['searchField'] = currentSearchFields[i].value;\r\n }\r\n else\r\n {\r\n object['searchField']=currentSearchFields[i].value;\r\n }\r\n searchFieldChips.push(object);\r\n }\r\n k++;\r\n }\r\n\r\n var idx=null,idx2=null, cnt=0;\r\n for( var j in searchFieldChips){\r\n if( [\"business_type_group\",\"shipment_mode\"].includes(searchFieldChips[j].key))\r\n cnt++;\r\n if(searchFieldChips[j].key == \"business_type_group\")\r\n {\r\n idx = j;\r\n }\r\n if(searchFieldChips[j].key == \"shipment_mode\")\r\n {\r\n idx2 = j;\r\n }\r\n if((cnt > 0 && idx2 >0) && idx)\r\n searchFieldChips.splice(idx,1);\r\n\r\n }\r\n\r\n return searchFieldChips;\r\n //return removeTimeZoneInPickUp(searchFieldChips, 'key', 'searchField');\r\n }\r\n\r\n\r\n function removeCloseMarkInChips(chips, page){\r\n\r\n //var chips = vm.chipSearchFields;\r\n modifySearchVal=false;\r\n angular.forEach(chips, function(data,key){\r\n\r\n var dataToBeRemovalkey = '';\r\n\r\n if(data){\r\n\r\n if(data.key && data.searchField){\r\n\r\n if((data.key == 'status' && data.searchField == \"booked\") || (data.key == 'status' && data.searchField == \"Undelivered\") ){\r\n dataToBeRemovalkey = key;\r\n }\r\n\r\n }if(data.value && data.field){\r\n\r\n if((data.field == 'status' && data.value == \"booked\") || (data.field == 'status' && data.value == \"Undelivered\") ){\r\n dataToBeRemovalkey = key;\r\n }\r\n\r\n }\r\n// only removing cancel button on chips for otp shipments\r\n if(data.key == \"otp_date_from\" || data.key == \"otp_date_to\" || data.key == \"otp_type\" || data.key == \"otp_period\"\r\n || data.key == \"arrive_date_from\" || data.key == \"arrive_date_to\" || data.key == \"forecast_cmts_custom_options\"){\r\n dataToBeRemovalkey = key;\r\n var nodes =angular.element( document.querySelectorAll( '.md-chips .md-chip .md-chip-remove-container'));\r\n var myEl = nodes[dataToBeRemovalkey];\r\n if(myEl){\r\n if (angular.element(myEl).find('.md-chips .md-chip .md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).addClass('hide');\r\n modifySearchVal = true;\r\n }\r\n }\r\n }\r\n // end of shipments\r\n }\r\n\r\n\r\n\r\n if(dataToBeRemovalkey !== ''){\r\n\r\n setTimeout(function(){\r\n try{\r\n\r\n var nodes =angular.element( document.querySelectorAll( '.mdChipsCloseMarkRemoval md-chip' ));\r\n var myEl = nodes[dataToBeRemovalkey];\r\n\r\n if(myEl){\r\n if (angular.element(myEl).find('.md-chips .md-chip .md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).addClass('hide');\r\n modifySearchVal = true;\r\n }\r\n }\r\n\r\n var nodes1 =angular.element( document.querySelectorAll( '.mdChipsCloseMarkRemoval1 md-chip' ));\r\n var myEl1 = nodes1[dataToBeRemovalkey];\r\n\r\n if(myEl1){\r\n if (angular.element(myEl).find('.md-chips .md-chip .md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).addClass('hide');\r\n modifySearchVal = true;\r\n }\r\n }\r\n\r\n }\r\n catch(e){\r\n console.warn(\"test\",e)\r\n }\r\n\r\n }, 25);\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n function get_milestone(status_value){\r\n if(status_value == '0'){\r\n var displaycontent = 'open';\r\n }\r\n else if(status_value == '1'){\r\n var displaycontent = 'covered';\r\n }\r\n else if(status_value == '2'){\r\n var displaycontent = 'pickup';\r\n }\r\n else if(status_value == '3'){\r\n var displaycontent = 'dispatched';\r\n }\r\n else if(status_value == '4'){\r\n var displaycontent = 'loaded';\r\n }\r\n else if(status_value == '5'){\r\n var displaycontent = 'consignee';\r\n }\r\n else if(status_value == '6'){\r\n var displaycontent = 'delivered';\r\n }\r\n return displaycontent;\r\n }\r\n\r\n function get_status(searchdata){\r\n\r\n var status_array = new Array();\r\n\r\n status_array =\r\n {\r\n \"planned\":\"planned\",\r\n \"pickup\":\"at pickup\",\r\n \"loaded\":\"loaded\",\r\n \"consignee\":\"at consignee\",\r\n \"delivered\":\"delivered\"\r\n }\r\n\r\n if(status_array[searchdata]){\r\n return status_array[searchdata];\r\n }else{\r\n return searchdata;\r\n }\r\n\r\n }\r\n\r\n function setUrl(){\r\n\r\n var newParams = {};\r\n\r\n // from dount chart dashboard[Aljex] page.\r\n if($location.search().page_from == 'aljex'){\r\n for (var r in $location.search()){\r\n //newParams = $location.search();\r\n }\r\n }\r\n\r\n angular.forEach(Object.keys(currentSearchFields), function(k) {\r\n\r\n // code for between dates invalid issue after refresh\r\n if(currentSearchFields.planned_start_range.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.planned_start_range.value = localStorage.getItem('plannedstartbetweendate');\r\n }\r\n\r\n if(currentSearchFields.planned_end_range.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.planned_end_range.value = localStorage.getItem('plannedendbetweendate');\r\n }\r\n\r\n if (k != 'quick_filter' && currentSearchFields[k].value) {\r\n if (k.includes('_date')){\r\n if (k.includes('transport_mode_name')){\r\n delete newParams['business_type_group'];\r\n }\r\n //newParams[k] = $filter(\"date\")(currentSearchFields[k].value, 'yyyy-MM-dd', \"UTC\");\r\n newParams[k] = $filter(\"date\")(currentSearchFields[k].value, 'yyyy-MM-dd');\r\n }else {\r\n if (k.includes('transport_mode_name')){\r\n delete newParams['business_type_group'];\r\n }\r\n newParams[k] = currentSearchFields[k].value;\r\n }\r\n }\r\n\r\n });\r\n // if (!disableUrlReplacement) {\r\n //debugger;\r\n\r\n var page_number = TrackTraceCmtsPaginationService.get_page_number();\r\n var per_page = TrackTraceCmtsPaginationService.get_per_page();\r\n\r\n newParams.page = page_number;\r\n newParams.per_page = per_page;\r\n\r\n $location.search(newParams);\r\n // }\r\n }\r\n\r\n function saveLastSearchLocally(search) {\r\n\r\n search = search || angular.copy(currentSearchFields);\r\n\r\n for (var field in search){\r\n if (field.includes('_date')){\r\n search[field].value = $filter('date')(search[field].value, 'yyyy-MM-dd', \"IST\");\r\n }\r\n }\r\n\r\n localStorage.setItem(\"lastCmtsSearch\", JSON.stringify(search));\r\n\r\n }\r\n\r\n function updateQuery() {\r\n\r\n for (var prop in currentSearchFields){\r\n\r\n // code for between dates invalid issue after refresh\r\n if(currentSearchFields.planned_start_range.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.planned_start_range.value = localStorage.getItem('plannedstartbetweendate');\r\n }\r\n\r\n if(currentSearchFields.planned_end_range.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.planned_end_range.value = localStorage.getItem('plannedendbetweendate');\r\n }\r\n\r\n if (query[prop] && (currentSearchFields[prop].value === \"\" ||\r\n (prop === 'quick_filter' && currentSearchFields[prop].value.length === 0))){\r\n if(prop.includes('shipment_mode'))\r\n {\r\n delete query['business_type_group'];\r\n }\r\n delete query[prop];\r\n\r\n if($location.search().page_from == 'aljex'){\r\n delete $location.search()[prop];\r\n }\r\n\r\n }\r\n if (currentSearchFields[prop].value != null && ((prop === 'quick_filter' && currentSearchFields[prop].value.length > 0) || (prop !== 'quick_filter' && currentSearchFields[prop].value !== \"\"))) {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n if(prop.includes('shipment_mode'))\r\n delete query['business_type_group'];\r\n query[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n if(prop.includes('shipment_mode'))\r\n delete query['business_type_group'];\r\n query[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function removeTimeZoneInPickUp(chipData, keyname, searchFieldName){\r\n\r\n //searchFieldName = Value name\r\n //keyname = field name\r\n\r\n if(chipData){\r\n\r\n angular.forEach(chipData, function(data,key){\r\n\r\n if(data[keyname].includes('pickup_time')){\r\n\r\n if(data[searchFieldName].toLowerCase().includes('and')){\r\n\r\n var timeList = data[searchFieldName].split(\"and\");\r\n\r\n var remove_ist1 = timeList[0].split(\" \");\r\n var remove_ist2 = timeList[1].split(\" \");\r\n\r\n remove_ist1 = remove_ist1.filter(function(e){return e});\r\n remove_ist2 = remove_ist2.filter(function(e){return e});\r\n\r\n var pickupTime1 = remove_ist1[0]+' '+remove_ist1[1];\r\n\r\n var pickupTime2 = remove_ist2[0]+' '+remove_ist2[1];\r\n\r\n chipData[key][searchFieldName] = pickupTime1+' and '+pickupTime2;\r\n\r\n } else{\r\n\r\n var remove_ist = data[searchFieldName].split(\" \");\r\n var pickupTime = remove_ist[0]+' '+remove_ist[1];\r\n\r\n chipData[key][searchFieldName] = pickupTime;\r\n\r\n }\r\n\r\n }\r\n\r\n });\r\n\r\n return chipData;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n return {\r\n clearTimeout: function() { timeoutPromise = false; },\r\n search: function(query){\r\n var search = query ? query : {};\r\n\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value != null && currentSearchFields[prop].value != \"\") {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n search[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n search[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n if (timeoutPromise) timeoutPromise.resolve('newSearch');\r\n timeoutPromise = $q.defer();\r\n saveLastSearchLocally();\r\n // return ServerTableService.setQuery(search, timeoutPromise);\r\n },\r\n\r\n exportSearchFields: function(fields, params){\r\n\r\n var search = {};\r\n if (fields && fields.length !== 0){\r\n search.columns = fields.map(function(d){return d.field;});\r\n }\r\n search.columns = search.columns || [];\r\n if (params){\r\n if (params.filter){search.filter = params.filter;}\r\n if (params.sorting){search.sorting = params.sorting;}\r\n }\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value !== \"\" &&\r\n currentSearchFields[prop].value.length != 0) {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n search[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n search[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n $log.debug(search);\r\n var csv_date = new Date();\r\n var filename = (moment().format('YYYY-MM-DD') + '-track-trace-cmts-Export.csv');\r\n var params = \"\";\r\n\r\n if(localStorage.customerType == 'cmts'){\r\n\r\n if(localStorage.switchEmailCmtsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCmtsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCmts){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCmts)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }\r\n\r\n\r\n var page_number = TrackTraceCmtsPaginationService.get_page_number();\r\n var per_page = TrackTraceCmtsPaginationService.get_per_page();\r\n\r\n search.page = page_number;\r\n search.per_page = per_page;\r\n\r\n return DownloadService.postDownloadFile(api.url_v2 + '/cmts/search/export'+params, search , filename);\r\n\r\n },\r\n autocomplete: function(query, extraParamString) {\r\n var theQuery = angular.copy(query);\r\n\r\n if(localStorage.customerType == 'cmts'){\r\n if(localStorage.switchEmailCmtsType){\r\n theQuery.userEmail =localStorage.switchEmailCmtsType;\r\n theQuery.customer_type = localStorage.customerType;\r\n }else if(localStorage.userCompanyCmts){\r\n theQuery.userCompany= encodeURIComponent(localStorage.userCompanyCmts);\r\n theQuery.customer_type = localStorage.customerType;\r\n }\r\n }else{\r\n theQuery.customer_type = 'cmts';\r\n }\r\n\r\n if (extraParamString) {\r\n var pairs = extraParamString.split('&');\r\n angular.forEach(pairs, function(p) {\r\n var bits = p.split('=');\r\n theQuery[bits[0]] = bits[1];\r\n });\r\n }\r\n var promise = $http.post(api.url_v2 + '/cmts_autocomplete', theQuery).then(function(res){\r\n //if(theQuery.field != \"t_and_t_citycountry\"){\r\n var autocompletes = res.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n // }else{\r\n // var autocompletes = res.data.map(function(d){\r\n // return {\r\n // value: d.value,\r\n // display: d.display\r\n // };\r\n // });\r\n // }\r\n\r\n return autocompletes;\r\n });\r\n return promise;\r\n },\r\n listSavedSearches: listSavedSearches, //list the saved searches\r\n saveDefaultSearch: function(query, name, isDefault) {\r\n\r\n var fields = query ? query : {};\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value !== \"\") {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n fields[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n fields[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n $log.debug(fields);\r\n fields.search_name = name;\r\n fields.default_search = isDefault;\r\n var promise = $http.post(api.url_v2 + '/search/saved', fields).then(function(res){\r\n $log.debug(res);\r\n var emptySearchSave = true;\r\n for (var prop in currentSearchFields){ //see if they saved an empty search\r\n if (res.data[prop] != null) {\r\n emptySearchSave = false;\r\n }\r\n }\r\n if(emptySearchSave) deleteSearch(res.data.id); //delete the search if it is empty\r\n });\r\n return promise;\r\n },\r\n loadSearch: function(id) {\r\n\r\n var promise = $http.get(api.url_v2 + '/search/saved/' + id).then(function(res){\r\n $log.debug(res);\r\n return res;\r\n });\r\n return promise;\r\n },\r\n deleteSearch: deleteSearch,\r\n getIsSavedSearch: function() {\r\n return isSavedSearch;\r\n },\r\n getEmptySearchFields: function() {\r\n return angular.copy(emptySearchFields);\r\n },\r\n getSearch: function(){\r\n\r\n var promise = $http.get(api.url_v2 + '/cmts/search').then(function(res){\r\n var data = res.data;\r\n data.page=TrackTraceCmtsPaginationService.get_page_number();\r\n data.per_page=TrackTraceCmtsPaginationService.get_per_page();\r\n\r\n //data.business_type_codes.sort(descSort);\r\n //business_type_codes = data.business_type_codes;\r\n\r\n //data.reason_codes.sort(descSort);\r\n //reason_codes = data.reason_codes;\r\n if (data.search_params!=undefined && data.search_params!=null)\r\n search_params = data.search_params;\r\n\r\n //data.service_level_codes.sort(descSort);\r\n //service_level_codes = data.service_level_codes;\r\n\r\n //function descSort(a, b) {debugger;\r\n // return a.description < b.description ? -1 : (a.description > b.description ? 1 : 0);\r\n //}\r\n hasLoadedSearchValues = true;\r\n });\r\n return promise;\r\n },\r\n hasLoadedSearchValues: function() {\r\n return hasLoadedSearchValues;\r\n },\r\n //getBusinessTypeCodes: function(){\r\n // return business_type_codes;\r\n //},\r\n //getReasonCodes: function(){\r\n // return reason_codes;\r\n //},\r\n getSearchParams: function(){\r\n return search_params;\r\n },\r\n getChips: function(){\r\n return searchFieldChips;\r\n },\r\n //getServiceLevelCodes: function(){\r\n // return service_level_codes;\r\n //},\r\n getCurrentSearchFields: function() {\r\n return currentSearchFields;\r\n },\r\n getIsFirstSearch: function() {\r\n return isFirstSearch;\r\n },\r\n setIsFirstSearch: function(first) {\r\n isFirstSearch = first;\r\n },\r\n getCurrentSearch: function(){\r\n return query;\r\n },\r\n setCurrentSearchFields: function(searchFields, disableUrlReplacement, advSearch) {\r\n\r\n var searchPlannedStartDate=searchFields.planned_start_equal_to.value;\r\n var searchPlannedEndDate=searchFields.planned_end_equal_to.value;\r\n\r\n if(searchPlannedStartDate!=\"\"){\r\n var date = new Date(searchPlannedStartDate).toDateString();\r\n var convDueDate = date.slice(4);\r\n searchFields.planned_start_from.value=convDueDate;\r\n\r\n } if(searchPlannedEndDate!=\"\"){\r\n var date = new Date(searchPlannedEndDate).toDateString();\r\n var convDelDate = date.slice(4);\r\n searchFields.planned_end_equal_to.value=convDelDate;\r\n }\r\n\r\n for (var field in searchFields){\r\n try{\r\n currentSearchFields[field].value = searchFields[field].value;\r\n }\r\n catch(e){}\r\n\r\n }\r\n var search = angular.copy(currentSearchFields);\r\n\r\n saveLastSearchLocally(search);\r\n if (!disableUrlReplacement) {\r\n setUrl();\r\n }\r\n if(!advSearch)\r\n updateQuery();\r\n generateChips();\r\n //setUrl();\r\n\r\n },\r\n setClickedChip: function(chip) {\r\n for (var field in currentSearchFields){\r\n if (field === chip.key){\r\n currentSearchFields[field].focus = true;\r\n }\r\n }\r\n },\r\n removeChip: function(chip) { //remove chip from current searchFields\r\n\r\n if (chip.key === 'quick_filter'){\r\n currentSearchFields[chip.key].value = [];\r\n } else if(currentSearchFields[chip.key]) {\r\n currentSearchFields[chip.key].value = \"\";\r\n }\r\n updateQuery();\r\n saveLastSearchLocally();\r\n setUrl();\r\n\r\n },\r\n getSearchFieldsFocus: function() {\r\n return searchFieldsFocus;\r\n },\r\n saveLastSearchLocally: saveLastSearchLocally,\r\n removeTimeZoneInPickUp: removeTimeZoneInPickUp,\r\n removeCloseMarkInChips:removeCloseMarkInChips,\r\n modifySearch: function(){\r\n return modifySearchVal;\r\n },\r\n\r\n getLastSearchLocally: function() {\r\n return localStorage.getItem(\"lastCmtsSearch\");\r\n }\r\n };\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.cancel\r\n * @description method that cancels the advance search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.search\r\n * @description method that button action for when the user clicks search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.saveToDefault\r\n * @description method that saves the current form to default\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.loadDefault\r\n * @description method that loads the saved default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.clearDefault\r\n * @description method that clears the saved default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getReasonCodes\r\n * @description method that returns a list of codes from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getServiceLevels\r\n * @description method that returns a list of service levels from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getBusinessTypes\r\n * @description method that returns a list of business types from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.resetForm\r\n * @description method that resets the advance search form\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.chipClicked\r\n * @description sets the search fields in AdvSearchCmtsService based on the chip clicked\r\n * @param {chip} - the chip that was clicked\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceControzller.chipRemoved\r\n * @description removes the search field from advance search and re-runs the query\r\n * @param {chip} - the chip that was removed\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.generateChips\r\n * @description generates the chips from the AdvSearchCmtsService's currentSearchFields and shows them in the view\r\n * @param {searchFields} - the searchFields to generate the chips from\r\n */\r\n(function() {\r\n 'use strict';\r\n\r\n var multiplepillseperator =\" , \"\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .filter('underscoreless', function () {\r\n return function (input) {\r\n if(input != undefined)\r\n return input.replace(/_/g, ' ');\r\n else\r\n return input;\r\n };\r\n })\r\n .filter('removeTimeZone', function () {\r\n return function (input) {\r\n if(input != undefined){\r\n\r\n if(input.toLowerCase().includes('and')){\r\n\r\n var timeList = input.split(\"and\");\r\n\r\n var remove_ist1 = timeList[0].split(\" \");\r\n var remove_ist2 = timeList[1].split(\" \");\r\n\r\n remove_ist1 = remove_ist1.filter(function(e){return e});\r\n remove_ist2 = remove_ist2.filter(function(e){return e});\r\n\r\n var pickupTime1 = remove_ist1[0]+' '+remove_ist1[1];\r\n\r\n var pickupTime2 = remove_ist2[0]+' '+remove_ist2[1];\r\n\r\n input = pickupTime1+' and '+pickupTime2;\r\n\r\n } else{\r\n\r\n var remove_ist = input.split(\" \");\r\n var pickupTime = remove_ist[0]+' '+remove_ist[1];\r\n\r\n input = pickupTime;\r\n\r\n }\r\n\r\n return input;\r\n }\r\n else{\r\n return input;\r\n }\r\n };\r\n })\r\n\r\n .filter('advSearchSpaceRemove', function () {\r\n return function (input) {\r\n if(input != undefined){\r\n\r\n var a = input.replace(/ /g,'');\r\n input = a.split(',').join(' , ');\r\n\r\n return input;\r\n }\r\n else{\r\n return input;\r\n }\r\n };\r\n })\r\n\r\n .filter('capitalize', function() {\r\n return function(input){\r\n if(input != undefined) {\r\n input = input.toString();\r\n if(input == \"bol_number\") { input = \"bol_number\";}\r\n\r\n //var serviceLevel =\r\n //{ \"HOT\": \"Hot Shot Service\",\r\n // \"IPRI\": \"International Priority Service\",\r\n // \"NFO\":\"Next Flight Out\",\r\n // \"ISTD\": \"International Standard Service\",\r\n // \"3DAY\": \"3rd Day\",\r\n // \"2DAY\": \"2nd Day\",\r\n // \"NDAM\": \"Next Day AM By Commitment Time\",\r\n // \"NDPM\": \"Next Day PM By Commitment Time\",\r\n // \"2DAM\": \"2nd Day AM By Commitment Time\",\r\n // \"2DPM\": \"2nd Day PM By Commitment Time\",\r\n // \"ECO\":\"Economy Service\",\r\n // \"3DAM\": \"3rd Day AM By Commitment Time\",\r\n // \"3DPM\": \"3rd Day PM by Commitment Time\",\r\n // \"DEFR\": \"Deferred Service\",\r\n // \"TKLD\": \"Truckload Service Level\",\r\n // \"LCL\":\"LCL Ocean Freight\",\r\n // \"IECO\": \"International Economy Service\",\r\n // \"PROJ\": \"Projects Charters\",\r\n // \"CSTBKR\": \"Customs Brokerage\",\r\n // \"4TH\":\"4th Day Service\",\r\n // \"5TH\":\"5th Day Service\",\r\n // \"OCN\":\"Ocean Freight\",\r\n // \"NDR\":\"Next Day Regular\",\r\n // \"INVOICE\": \"Invoice Only\",\r\n // \"LOCAL\": \"Local Pick Up and Delivery\"\r\n //};\r\n//\r\n// //var reasoncode = { \"OTPACT\" : \"Force Majeure\",\r\n// // \"OTPAPT\": \"Appointment\",\r\n// // \"OTPCAO\": \"Cargo Aircraft Only\",\r\n// // \"OTPCAR\": \"Air/Sea Carrier Failure\",\r\n// // \"OTPCEC\": \"Civic Event Closures\",\r\n// // \"OTPCIV\": \"Civil Unrest\",\r\n// // \"OTPCON\": \"Client Requested Consolidation\",\r\n// // \"OTPCST\": \"Client Related\",\r\n// // \"OTPCUS\": \"Customs Delay\",\r\n// // \"OTPCUT\": \"Shipped After Cut\",\r\n// // \"OTPDRP\": \"Trailer Dropped/Pending Unload\",\r\n// // \"OTPGND\": \"Ground Carrier Failure\",\r\n// // \"OTPHOL\": \"Holiday\",\r\n// // \"OTPMIS\": \"Misrouted\",\r\n// // \"OTPMPU\": \"Missed Pickup\",\r\n// // \"OTPNFO\": \"Next Flight Out\",\r\n// // \"OTPPCK\": \"Insufficient Packaging of Cargo\",\r\n// // \"OTPPCON\": \"Port Congestion\",\r\n// // \"OTPPRO\": \"Procedural Error\",\r\n// // \"OTPREF\": \"Refused by Consignee\",\r\n// // \"OTPRRH\": \"Restricted Receiving Hours\",\r\n// // \"OTPSEC\": \"Security Delay\",\r\n// // \"OTPUDO\": \"Documentation Delay\",\r\n// // \"OTPWHS\": \"Warehouse Delay\",\r\n// // \"OTPWX\":\"Weather Related Delay\" };\r\n\r\n if(input.indexOf(' ') !== -1){\r\n var inputPieces, i;\r\n\r\n input = input.toLowerCase();\r\n inputPieces = input.split(' ');\r\n //// console.log(input.toUpperCase());\r\n\r\n\r\n for(i = 0; i < inputPieces.length; i++){\r\n\r\n if(inputPieces[i] !='is' && inputPieces[i] !='less' && inputPieces[i] !='greater' && inputPieces[i] !='than'){\r\n if(inputPieces[i] !=\"id\"){\r\n inputPieces[i] = capitalizeString(inputPieces[i]);\r\n if(inputPieces[i] ==\"Equal\"){\r\n inputPieces[i+1] +=\" =\";\r\n }\r\n\r\n } else{\r\n inputPieces[i] = inputPieces[i].toUpperCase();\r\n }\r\n\r\n }else{\r\n if(inputPieces[i] =='than'){\r\n inputPieces[i] += (inputPieces[i-1] == \"greater\") ? \" >\" :\" <\" ;\r\n }\r\n }\r\n }\r\n\r\n return inputPieces.join(\" \");\r\n }\r\n else {\r\n input = input.toLowerCase();\r\n\r\n if(input == \"bol_number\"){\r\n input = input.toUpperCase()+\" #\";\r\n }\r\n\r\n if( input == 'invoice'|| input == 'consol' || input == 'container'){\r\n input +=\" #\";\r\n }\r\n return capitalizeString(input);\r\n }\r\n }else{\r\n return input;\r\n }\r\n };\r\n function capitalizeString(inputString){\r\n if(inputString == 'n/a'){\r\n inputString = 'N/A';\r\n }\r\n return inputString.substring(0,1).toUpperCase() + inputString.substring(1);\r\n }\r\n })\r\n .controller('AdvSearchCmtsController', AdvSearchCmtsController);\r\n\r\n\r\n\r\n /** @ngInject */\r\n AdvSearchCmtsController.$inject = ['$log', '$rootScope', 'UserService', 'AdvSearchCmtsService', '$translatePartialLoader', '$mdBottomSheet', '$mdDialog', '$mdMedia','$filter', '$scope', '$timeout', '$location', '$q', '$http', 'api', 'permissions', 'TrackTraceCmtsPaginationService', 'ServerTableCmtsService','$state'];\r\n function AdvSearchCmtsController($log, $rootScope, UserService, AdvSearchCmtsService, $translatePartialLoader, $mdBottomSheet, $mdDialog, $mdMedia, $filter, $scope, $timeout, $location, $q, $http, api, permissions, TrackTraceCmtsPaginationService, ServerTableCmtsService,$state) {\r\n $translatePartialLoader.addPart('tracktrace');\r\n //variables\r\n var vm = this;\r\n var INVALID_DATE = \"Invalid date\";\r\n $scope.addAllBtnShow = false;\r\n\r\n //set the searchFields to be the current searchFields\r\n vm.searchFields = convertStatusFieldToString(angular.copy(AdvSearchCmtsService.getCurrentSearchFields()));\r\n vm.searchText;\r\n vm.selectedItem;\r\n vm.chipSearchFields = AdvSearchCmtsService.getChips();\r\n vm.modifySearch=false;\r\n\r\n if (!AdvSearchCmtsService.hasLoadedSearchValues()) {\r\n AdvSearchCmtsService.getSearch();\r\n }\r\n vm.isSavedSearch = AdvSearchCmtsService.getIsSavedSearch();\r\n vm.minDate = \"'\" + (moment().subtract(13, 'months').format('YYYY-MM-DD')) + \"'\";\r\n\r\n // Quarter math\r\n var quarterAdjustment= (moment().month() % 3) + 1;\r\n var lastQuarterEndDate = moment().subtract({ months: quarterAdjustment }).endOf('month');\r\n var lastQuarterStartDate = lastQuarterEndDate.clone().subtract({ months: 2 }).startOf('month');\r\n\r\n\r\n vm.autocomplete = autocomplete;\r\n vm.addOneMoreDay = addOneMoreDay;\r\n vm.subtractOneDay = subtractOneDay;\r\n vm.cancel = cancel;\r\n //vm.getBusinessTypes = getBusinessTypes;\r\n //vm.getReasonCodes = getReasonCodes;\r\n //vm.getServiceLevels = getServiceLevels;\r\n vm.resetForm = resetForm;\r\n vm.saveToDefault = saveToDefault;\r\n vm.loadDefault = loadDefault;\r\n vm.clearDefault = clearDefault;\r\n vm.search = search;\r\n vm.selectClear = selectClear;\r\n vm.showAdvSearch = showAdvSearch;\r\n vm.chipClicked = chipClicked;\r\n vm.chipRemoved = chipRemoved;\r\n vm.showListBottomSheet = showListBottomSheet;\r\n vm.resetSearch = resetSearch;\r\n vm.newSearch = newSearch;\r\n vm.dateItemOrNot = dateItemOrNot;\r\n vm.checkrangeOrNot = checkrangeOrNot;\r\n vm.clearFlags = clearFlags;\r\n vm.searchdata = null;\r\n vm.getMatches = getMatches;\r\n vm.searchValue = '';\r\n vm.clearValues = clearValues;\r\n /*Added by Abheesh*/\r\n vm.ttSearch = ttSearch;\r\n vm.advSearch = advSearch;\r\n vm.ttSearchFlag = undefined;\r\n vm.clearSearch = clearSearch;\r\n vm.chipData = [];\r\n vm.chipTempRemoved = chipTempRemoved;\r\n vm.formClick = formClick;\r\n vm.array_unique = array_unique;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n var currentFields = AdvSearchCmtsService.getCurrentSearchFields();\r\n //// console.log(currentFields);\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n //// console.log(currentFields[field].value);\r\n if(currentFields[field].value !== null && currentFields[field].value != ''){\r\n\r\n vm.chipData.push(currentFields[field]);\r\n\r\n }\r\n }\r\n\r\n callingToRemoveCrossIConInChips(vm.chipSearchFields, 'onload'); \r\n\r\n vm.shipment = {\r\n \"status\":\r\n [\"Delivered\",\"Undelivered\"],\r\n\r\n \"load_status\":\r\n [\"planned\", \"Accepted\", \"InTransit\", \"Released\", \"Shipped\", \"Tendered\",\"Delivered\",\"Closed\"],\r\n\r\n \"load_number\": null,\r\n\r\n \"planned_start\": [\"equal_to\",\"range_to\"],\r\n\r\n \"planned_end\": [\"equal_to\",\"range_to\"],\r\n\r\n \"delivery_location\":null,\r\n\r\n \"route_number\":null,\r\n\r\n \"total_gross_wt\": [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"total_piece_count\": [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"bol_number\":null,\r\n\r\n \"pro_number\":null,\r\n\r\n \"load_billing_invoice_status\":[\"Paid\",\"NoInvoice\",\"Billed\",\"Canceled\"],\r\n\r\n \"stop_count\": [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"order_count\": [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"trading_partner_carrier_name\":null,\r\n\r\n \"trading_partner_carrier_number\":null,\r\n\r\n \"transport_mode_name\":[\"TL\", \"LTL\"],\r\n\r\n \"equipment_name\":[\"CARGO VAN\", \"PARTIAL\", \"REMOVABLE GOOSENECK\", \"STRETCH TRAILER\", \"40 Ft Dry Van\", \"40 ft Flatbed\", \"48 ft Dry Van\", \"48 ft Flatbed\", \"48 ft Stepdeck\", \"53 ft Dry Van\", \"53 ft Flatbed\", \"53 ft Reefer\", \"53 ft Stepdeck\", \"Box Truck\", \"Car\", \"Gooseneck\", \"Lowboy\", \"Mini-Float\", \"One-Ton\", \"Pickup Truck\", \"Single-Axle\", \"Sprinter\", \"Straight Truck\", \"Tandem\"],\r\n\r\n \"trading_partner_client_name\":null,\r\n\r\n \"trading_partner_client_number\":null,\r\n\r\n \"service_option_name\":[\"MAGA\", \"HotShot\"],\r\n\r\n \"total_invoice_amount\":[\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"is_bookmarked\":[\"Yes\", \"No\"]\r\n\r\n };\r\n\r\n vm.pickup = [\"name\",\"contact_name\",\"street_address\",\"state\",\"city\",\"zip\",\"phone\"];\r\n\r\n vm.consignee = [\"name\",\"contact_name\",\"street_address\",\"state\",\"city\",\"zip\",\"phone\"];\r\n\r\n $scope.notSorted = function(obj){\r\n if (!obj) {\r\n return [];\r\n }\r\n return Object.keys(obj);\r\n }\r\n\r\n $scope.checkValue = function(key){\r\n // $scope.selectedSearch = key;\r\n return vm.shipment[key];\r\n }\r\n\r\n\r\n function getMatches(key, searchText){\r\n //// console.log(key +\" getMatches() \"+searchText);\r\n var query = {field: key, value: searchText}\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/cmts_autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n //// console.log(d);\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n var contains = function(needle) {\r\n // Per spec, the way to identify NaN is that it is not equal to itself\r\n var findNaN = needle !== needle;\r\n var indexOf;\r\n\r\n if(!findNaN && typeof Array.prototype.indexOf === 'function') {\r\n indexOf = Array.prototype.indexOf;\r\n } else {\r\n indexOf = function(needle) {\r\n var i = -1, index = -1;\r\n\r\n for(i = 0; i < this.length; i++) {\r\n var item = this[i];\r\n\r\n if((findNaN && item !== item) || item === needle) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n };\r\n }\r\n\r\n return indexOf.call(this, needle) > -1;\r\n };\r\n\r\n vm.searchValueFlag = false;\r\n function ttSearch(search){\r\n vm.inputRangeFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = false;\r\n vm.timeInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n vm.textFieldData = undefined;\r\n vm.dateInputFlag =false;\r\n vm.searchValue = '';\r\n vm.nextElem = \"\";\r\n vm.ttserchdata = search;\r\n // vm.thirdChildFlg = 100;\r\n search = search.toLowerCase();\r\n search = search.replace(/ /g, ' ');\r\n vm.ttserchdataNew = search.replace(/mode/g,'business type').replace(/reason code/g,'exception');\r\n search = search.split(\" \");\r\n //// console.log(search[0]);\r\n if('shipment'.includes(search[0])){ vm.ttSearchFlag = 1;vm.nextElem=\"shipment\";}\r\n \r\n if(search[0] == 'shipment'){\r\n\r\n vm.ttSearchFlag = 1;\r\n if(search.length > 1){\r\n var breakFlag = false;\r\n //// console.log(search);\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n if(!breakFlag){\r\n\r\n if(key.includes(search[1])){\r\n\r\n if(key == 'equipment_name' && search[1] == 'type'){\r\n vm.secondChildFlg = 1000;\r\n }else{ \r\n breakFlag = true;\r\n\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+key; \r\n if(contains.call(['invoice','count','amount','total','reference'], search[1])){\r\n\r\n var temStrOne= \"total\";\r\n if(temStrOne.includes(search[1]) && search[2] == 'total_piece_count'){\r\n vm.secondChildFlg = 'total_piece_count';\r\n }\r\n var temStr= \"total\";\r\n if(!temStr.includes(search[2]) && search[1] == 'total_invoice_amount'){\r\n vm.secondChildFlg = 'total_invoice_amount';\r\n vm.nextElem = search[0]+' total_invoice_amount';\r\n }\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[2];\r\n vm.thirdChildFlg = 100;\r\n breakFlag = false;\r\n }\r\n if(key == 'reason_code' || key =='service_level'){\r\n vm.openInputFlag = true;\r\n vm.shipmentOpenInputFlag=true;\r\n }\r\n\r\n if(key == 'bol_number'){\r\n vm.openInputFlag = false;\r\n vm.searchValue = search[2];\r\n vm.secondChildFlg = 'bol_number';\r\n vm.ttserchdata = search[0]+' bol_number';\r\n vm.dateInputFlag=true;\r\n }\r\n\r\n if(key == 'load_number'){\r\n vm.openInputFlag = false;\r\n vm.searchValue = search[2];\r\n vm.secondChildFlg = 'load_number';\r\n vm.ttserchdata = search[0]+' load_number';\r\n vm.shipmentOpenInputFlag=false;\r\n vm.dateInputFlag=true;\r\n }\r\n\r\n\r\n if(key == 'route_number'){\r\n vm.openInputFlag = false;\r\n vm.searchValue = search[2];\r\n vm.secondChildFlg = 'route_number';\r\n vm.ttserchdata = search[0]+' route_number';\r\n vm.shipmentOpenInputFlag=false;\r\n vm.dateInputFlag=true;\r\n }\r\n\r\n\r\n if(key == 'pro_number'){\r\n vm.openInputFlag = false;\r\n vm.searchValue = search[2];\r\n vm.secondChildFlg = 'pro_number';\r\n vm.ttserchdata = search[0]+' pro_number';\r\n vm.dateInputFlag=true;\r\n }\r\n //if(key == 'estimateddelivery_date'){\r\n // vm.openInputFlag = true;\r\n // vm.searchValue = search[6];\r\n // vm.shipmentOpenInputFlag = false;\r\n // vm.dateInputFlag = true;\r\n //}\r\n if(key == 'planned_start' || key == 'planned_end'){\r\n vm.openInputFlag = true;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.dateInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n if(key == 'equipment_name'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n if(key == 'is_bookmarked'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n\r\n if(key == 'load_status'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n\r\n if(key == 'status'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n }\r\n\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n if(!breakFlag){\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n\r\n if(!breakFlag){\r\n if((key == search[1]+\"_\"+search[2]) || (key.includes(search[1]))){\r\n //// console.log(key);\r\n vm.nextElem = search[0]+' '+search[1]+' '+key;\r\n vm.secondChildFlg = key;\r\n\r\n breakFlag = true;\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n if(breakFlag == false){\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n if(!breakFlag){\r\n if((key == search[1]+\"_\"+search[2]+\"_\"+search[3]) || (key.includes(search[1]))){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+search[2]+' '+key;\r\n breakFlag = true;\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n if(search.length > 2){\r\n\r\n var breakFlag = false; \r\n var remainingText=search[2];\r\n angular.forEach(vm.shipment[vm.secondChildFlg],function(ship,key){\r\n\r\n if(!breakFlag){\r\n if(((ship.toLowerCase() == search[2]) || (ship.toLowerCase().includes(search[2]))) && (vm.secondChildFlg.toLowerCase() =='status' || vm.secondChildFlg.toLowerCase() =='load_status' || vm.secondChildFlg.toLowerCase() =='equipment_name' || vm.secondChildFlg.toLowerCase() =='transport_mode_name' \r\n || vm.secondChildFlg.toLowerCase() =='load_billing_invoice_status' || vm.secondChildFlg.toLowerCase() =='service_option_name' || vm.secondChildFlg.toLowerCase() =='is_bookmarked')){\r\n vm.thirdChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+ship;\r\n // if(ship == 'sea'||ship =='air'||ship=='land'){\r\n vm.shipmentOpenInputFlag = true;\r\n // vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n // vm.searchValue = search[2];\r\n //}\r\n\r\n breakFlag = true;\r\n }\r\n else{\r\n vm.thirdChildFlg = 1000;\r\n }\r\n }\r\n });\r\n }\r\n\r\n if(search.length >= 3 && (vm.secondChildFlg.toLowerCase() !='status' && vm.secondChildFlg.toLowerCase() !='load_status' && vm.secondChildFlg.toLowerCase() !='equipment_name' && vm.secondChildFlg.toLowerCase() !='transport_mode_name' \r\n && vm.secondChildFlg.toLowerCase() !='load_billing_invoice_status' && vm.secondChildFlg.toLowerCase() !='service_option_name' && vm.secondChildFlg.toLowerCase() !='is_bookmarked')){\r\n\r\n var breakFlag = false;\r\n var remainingText=\"\";\r\n var limit = search.length;\r\n //// console.log(contains.call(['than','to','range'], search[search.length-1]));\r\n if(contains.call(['than','to','range', 'is'], search[search.length-1]) == false){\r\n limit -= 1;\r\n }\r\n var breakRemaining = false;\r\n for(var i=3;i<limit;i++){\r\n if(!breakRemaining){\r\n if(search[i] != 'date' && search[i] != 'time'){\r\n remainingText +=search[i];\r\n\r\n if(remainingText == \"range\"){\r\n if(search[i+1] != 'to')\r\n breakRemaining = i;\r\n }else if(i+1 != limit ){remainingText +=\"_\";}\r\n }\r\n }\r\n\r\n }\r\n if(search.length == 3){\r\n remainingText = search[2];\r\n }\r\n\r\n angular.forEach(vm.shipment[vm.secondChildFlg],function(ship,key){\r\n\r\n if(remainingText == 'is' && limit <= search.length){\r\n remainingText +=\"_\"+search[ search.length-1];\r\n }\r\n if(!breakFlag && !(search.length == 4 && search[2].includes('delivery'))){\r\n\r\n if((ship == remainingText) || (ship.includes(remainingText))){\r\n vm.thirdChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+search[2]+' '+ship;\r\n breakFlag = true;\r\n if(contains.call(['ontime','delayed','yes','no'], ship)){\r\n\r\n vm.shipmentOpenInputFlag = true;\r\n vm.openInputFlag = true;\r\n\r\n }\r\n if(contains.call(['is_less_than','is_greater_than','range','equal_to', 'range_to'], remainingText)){\r\n\r\n vm.searchValue = \"\";\r\n vm.thirdChildFlg = key;\r\n if(ship.includes('range')){\r\n vm.inputRangeFlag = true;\r\n vm.searchValue2 = \"\";\r\n vm.searchValue =\"\";\r\n }\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n\r\n //// console.log(vm.ttserchdata);\r\n\r\n if(search.length == 6 && search[1] ==\"expected\")\r\n {\r\n //In Shipment -> Expected Delivery date\r\n vm.textFieldData = \"shipment\"+\" \"+search[1]+\"_\"+search[2]+\"_\"+search[3]+\" \"+ remainingText;\r\n }\r\n else\r\n {\r\n //in Shipment -> Due date, etc\r\n vm.textFieldData = \"shipment\"+\" \"+search[1]+\"_\"+search[2]+\" \"+remainingText;\r\n }\r\n\r\n // vm.inputRangeFlag = true;\r\n\r\n }\r\n }else{\r\n vm.thirdChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n }else {\r\n vm.ttSearchFlag = 0;\r\n }\r\n\r\n }\r\n\r\n\r\n angular.element(document).ready(function () {\r\n var el;\r\n AdvSearchCmtsService.removeCloseMarkInChips(vm.chipSearchFields, 'onload');\r\n vm.modifySearch=AdvSearchCmtsService.modifySearch();\r\n angular.forEach(vm.searchFields, function(field){\r\n if (field.focus){\r\n $timeout(function() {\r\n el = angular.element(document.querySelector(\"#\"+field.field));\r\n el.focus();\r\n if(el[0] && el[0].value != null) { //in place becasue mg-datepickers don't have a value\r\n el[0].setSelectionRange(0, el[0].value.length);\r\n }\r\n }, 1000);\r\n }\r\n });\r\n });\r\n\r\n function dateItemOrNot(keyItem){\r\n vm.dateInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n\r\n var index = keyItem.search('date');\r\n if(index>=0){\r\n vm.dateInputFlag = true;\r\n }\r\n }\r\n\r\n\r\n\r\n function checkrangeOrNot(item){\r\n\r\n vm.inputRangeFlag = false;\r\n if(item == 'range'){\r\n vm.inputRangeFlag = true;\r\n }\r\n }\r\n\r\n function clearFlags(flag,searchdata){\r\n vm.nextElem =\"\";\r\n vm.textFieldData = undefined;\r\n vm.openInputFlag = false;\r\n vm.timeInputFlag = false;\r\n $scope.addAllBtnShow = false;\r\n vm.dateInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n //vm.secondChildFlg = 100;\r\n //vm.ttSearchFlag = undefined;\r\n vm.ttserchdata = undefined;\r\n vm.inputRangeFlag = false;\r\n vm.ttserchdataNew = searchdata;\r\n if(flag && searchdata){\r\n vm.ttSearchFlag = flag;\r\n vm.ttserchdata = searchdata;\r\n }\r\n }\r\n\r\n function clearValues(flag){\r\n if(flag == 'reason_code' || flag == 'service_level'){\r\n $scope.addAllBtnShow = true;\r\n }else{\r\n $scope.addAllBtnShow = false;\r\n }\r\n vm.searchValue = '';\r\n vm.searchValue2 = '';\r\n\r\n }\r\n\r\n\r\n\r\n function chipClicked(chip) {\r\n $log.debug('chip was clicked ' + chip.display);\r\n AdvSearchCmtsService.setClickedChip(chip);\r\n showAdvSearch();\r\n }\r\n\r\n function chipRemoved(chip) {\r\n //// console.log(chip);\r\n $log.debug('remove chip ' + chip.title);\r\n AdvSearchCmtsService.removeChip(chip);\r\n vm.searchFields[chip.key]['value'] ='';\r\n //vm.search({});\r\n }\r\n\r\n function chipTempRemoved(chip){\r\n vm.searchFields[chip.field]['value'] ='';\r\n }\r\n\r\n // Show the advanced search md-dialog\r\n\r\n function showAdvSearch(ev) {\r\n var currentFields = AdvSearchCmtsService.getCurrentSearchFields();\r\n\r\n // code for between dates invalid issue after refresh\r\n\r\n if(currentFields.planned_start_range.value == \"Invalid Date\")\r\n {\r\n currentFields.planned_start_range.value = localStorage.getItem('plannedstartbetweendate');\r\n }\r\n\r\n if(currentFields.planned_end_range.value == \"Invalid Date\")\r\n {\r\n currentFields.planned_end_range.value = localStorage.getItem('plannedendbetweendate');\r\n }\r\n\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n //// console.log(currentFields[field].value);\r\n\r\n\r\n if(currentFields[field].value !== null && currentFields[field].value != ''){\r\n\r\n if(currentFields[field].field == \"status\"){\r\n currentFields[field].value = get_status_original_value(currentFields[field].value);\r\n }\r\n\r\n vm.chipData.push(currentFields[field]);\r\n\r\n var ids = [];\r\n\r\n //// console.log(vm.chipData);\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/advanced-search/cmts/adv-search-form.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n\r\n\r\n\r\n }, function() {\r\n\r\n var currentFields = AdvSearchCmtsService.getCurrentSearchFields();\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n //// console.log(currentFields[field].value);\r\n\r\n\r\n }\r\n });\r\n\r\n callingToRemoveCrossIConInChips(vm.chipSearchFields, 'onload');\r\n }\r\n\r\n function resetSearch(){\r\n var params = {}, searchFields = angular.copy(AdvSearchCmtsService.getEmptySearchFields());\r\n for (var field in $location.search()){\r\n //// console.log('test params');\r\n if (!(field in searchFields)){\r\n params[field] = $location.search()[field];\r\n }\r\n }\r\n $location.search(params)\r\n AdvSearchCmtsService.setCurrentSearchFields(searchFields);\r\n //Added by Abheesh\r\n vm.searchFields = searchFields;\r\n vm.modifySearch=false;\r\n $rootScope.$broadcast('cleared_quicksearch',true);\r\n }\r\n\r\n function selectClear(e) {\r\n var focused = document.getElementsByClassName('md-input-focused');\r\n angular.element(focused).removeClass('md-input-focused');\r\n }\r\n\r\n function showListBottomSheet() {\r\n $mdBottomSheet.show({\r\n templateUrl: '/app/advanced-search/adv-search-actions.html',\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n //converts the status field\r\n function convertStatusFieldToString(field) {\r\n switch(field.milestone.value) {\r\n case '0':\r\n field.milestone.value = 'open';\r\n break;\r\n case '1':\r\n field.milestone.value = 'covered';\r\n break;\r\n case '2':\r\n field.milestone.value = 'pickup';\r\n break;\r\n case '3':\r\n field.milestone.value = 'dispatched';\r\n break;\r\n case '4':\r\n field.milestone.value = 'loaded';\r\n break;\r\n case '5':\r\n field.milestone.value = 'consignee';\r\n break;\r\n case '6':\r\n field.milestone.value = 'delivered';\r\n break;\r\n\r\n }\r\n return field;\r\n }\r\n\r\n //convertst the status field\r\n function convertStatusFieldToInt(field) {\r\n switch(field.milestone.value) {\r\n case 'open':\r\n field.milestone.value = '0';\r\n break;\r\n case 'covered':\r\n field.milestone.value = '1';\r\n break;\r\n case 'pickup':\r\n field.milestone.value = '2';\r\n break;\r\n case 'dispatched':\r\n field.milestone.value = '3';\r\n break;\r\n case 'loaded':\r\n field.milestone.value = '4';\r\n break;\r\n case 'consignee':\r\n field.milestone.value = '5';\r\n break;\r\n case 'delivered':\r\n field.milestone.value = '6';\r\n break;\r\n\r\n }\r\n return field;\r\n }\r\n\r\n function autocomplete(field1, query, extraParamString){\r\n $log.debug(\"Value: \"+ query);\r\n return AdvSearchCmtsService.autocomplete({field:field1, value: query}, extraParamString);\r\n }\r\n //cancels the advance search\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n //button action for when the user clicks search\r\n function search() {\r\n if(vm.ttSearchFlag == 2){\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n //// console.log(searchdata);\r\n //// console.log(vm.searchValue);\r\n vm.searchFields[\"customer\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n\r\n }\r\n var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n for (var field in convertedFields) { //set the focus to false\r\n convertedFields[field].focus = false;\r\n }\r\n AdvSearchCmtsService.setCurrentSearchFields(convertedFields);\r\n\r\n //the search is then done in the track and trace controller\r\n $mdDialog.hide();\r\n }\r\n\r\n//Added by Abheesh\r\n function newSearch(isAddAll) {\r\n\r\n vm.nextElem =\"\";\r\n vm.ttserchdataNew = \"\";\r\n if(vm.ttSearchFlag == 1){\r\n\r\n if(vm.textFieldData !=undefined){\r\n vm.ttserchdata = vm.textFieldData;\r\n vm.textFieldData = undefined;\r\n }\r\n\r\n if(vm.searchValue != undefined){\r\n // // console.log('tested');\r\n var searchcontent = vm.ttserchdata.split(\" \");\r\n\r\n if (searchcontent[1] == \"planned_start\" || searchcontent[1] == \"planned_end\"){\r\n vm.ttserchdata = vm.ttserchdata+' '+vm.searchValue;\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n }\r\n else {\r\n if(/(Shipment equipment_name) (.*)/.test(vm.ttserchdata)) {\r\n var searched_eq_type = vm.ttserchdata.match(/(Shipment) (equipment_name) (.*)/)\r\n var searchdata = $.merge([searched_eq_type[1], searched_eq_type[2], searched_eq_type[3]], [ vm.searchValue] );\r\n }else {\r\n var searchdata = $.merge( vm.ttserchdata.split(\" \"), [ vm.searchValue] );\r\n }\r\n }\r\n // vm.ttserchdata = vm.ttserchdata+' '+vm.searchValue;\r\n }\r\n else {\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n }\r\n\r\n var value1 = vm.searchValue.toString();\r\n var value2 = vm.searchValue2.toString();\r\n if(vm.dateInputFlag || vm.timeInputFlag){\r\n for(var key in vm.searchFields)\r\n if(searchdata[0].toLowerCase()==\"shipment\" &&\r\n (\r\n (searchdata[1].toLowerCase().includes(\"planned_start\") && key.includes(\"planned_start\"))\r\n || (key.includes(\"planned_end\") && searchdata[1].toLowerCase().includes(\"planned_end\"))\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\"\r\n }\r\n //debugger;\r\n if(vm.shipment[vm.secondChildFlg][vm.thirdChildFlg] == 'range_to'){\r\n var date2 =' '+vm.searchValue2;\r\n\r\n date2 = date2.split(\" \");\r\n var rangvalue=searchdata[1].replace('_range_to','_range');\r\n\r\n if(searchdata[1] == 'pickup_time'){\r\n //vm.searchFields[searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[7]+' '+searchdata[8]+' '+searchdata[9] + ' and ' + date2[5] +' '+date2[6]+' '+date2[7];\r\n\r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n vm.searchFields[searchdata[1]+\"_\"+'range'][\"value\"] = moment(searchdata[3]+\" \"+searchdata[4]+\" \"+searchdata[5]+\" \"+searchdata[6]+\" \"+searchdata[7]+\" \"+searchdata[8]+\" \"+searchdata[9]).format('hh:mm A') + ' ' +timezone_symbol + ' and '+ moment(date2[1] +' '+date2[2] +' '+date2[3] +' '+date2[4] +' '+ date2[5] +' '+date2[6]+' '+date2[7]).format('hh:mm A') + ' '+timezone_symbol;\r\n\r\n }else{\r\n //vm.searchFields[searchdata[1]+\"_\"+'range'][\"value\"] = searchdata[4]+' '+searchdata[5]+' '+searchdata[6] + ' and ' + date2[2] +' '+date2[3]+' '+date2[4];\r\n vm.searchFields[rangvalue][\"value\"]= moment(vm.searchValue).format('DD-MMM-YYYY') + \" 00:00 AND \" + moment(vm.searchValue2).format('DD-MMM-YYYY') + \" 23:59\";\r\n }\r\n\r\n }else{\r\n\r\n if(searchdata[1] == 'pickup_time'){\r\n //vm.searchFields[searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[7]+\" \"+searchdata[8]+\" \"+searchdata[9];\r\n\r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n vm.searchFields[searchdata[1]+\"_\"+searchdata[2]][\"value\"] = moment(searchdata[3]+\" \"+searchdata[4]+\" \"+searchdata[5]+\" \"+searchdata[6]+\" \"+searchdata[7]+\" \"+searchdata[8]+\" \"+searchdata[9]).format('hh:mm A')+ ' ' +timezone_symbol;\r\n\r\n } else{\r\n //vm.searchFields[searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[4]+' '+searchdata[5]+' '+searchdata[6];\r\n vm.searchFields[searchdata[1]][\"value\"] =moment(vm.searchValue).format('DD-MMM-YYYY')\r\n }\r\n\r\n //searchdata[4]+' '+searchdata[5]+' '+searchdata[6]\r\n }\r\n\r\n }else if(vm.inputRangeFlag){\r\n\r\n for(var key in vm.searchFields)\r\n\r\n if(searchdata[0].toLowerCase() == \"shipment\" &&\r\n (\r\n (key.includes(\"total_invoice_amount\") && searchdata[1].toLowerCase().includes(\"total_invoice_amount\")) ||\r\n (key.includes(\"total_gross_wt\") && searchdata[1].toLowerCase().includes(\"total_gross_wt\")) ||\r\n (key.includes(\"otal_piece_count\") && searchdata[1].toLowerCase().includes(\"total_piece_count\"))\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\";\r\n }\r\n\r\n vm.searchFields[searchdata[1]][\"value\"] = vm.searchValue.toString() +' AND '+vm.searchValue2.toString();\r\n\r\n }\r\n\r\n else if(searchdata.length == 3 || (searchdata.length == 4 && searchdata[3]==\"\") ){ \r\n\r\n // vm.searchFields[searchdata[1]][\"value\"] = searchdata[2];\r\n if(vm.searchValue != '' && searchdata[1] != \"load_status\" && searchdata[1] != \"status\"){\r\n if(vm.thirdChildFlg == 100)\r\n {\r\n add_multiple_values(searchdata[1], searchdata[1])\r\n\r\n }\r\n else{\r\n vm.searchFields[searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString();\r\n }\r\n }else{\r\n if(searchdata[1] == \"load_status\"){\r\n vm.searchFields[\"load_status\"][\"value\"] = get_milestone_displaycontent(searchdata[2]);\r\n }if(searchdata[1] == \"status\"){\r\n vm.searchFields[\"status\"][\"value\"] = get_milestone_displaycontent(searchdata[2]);\r\n }else{\r\n if(searchdata[1] == \"is_bookmarked\"){\r\n vm.searchFields[\"is_bookmarked\"][\"value\"] =searchdata[2];\r\n\r\n }else \r\n if(searchdata[1] == \"equipment_name\"){\r\n\r\n if (vm.searchFields[\"equipment_name\"][\"value\"].length > 0){\r\n\r\n var status_arr = vm.searchFields[\"equipment_name\"][\"value\"].split(',');\r\n if (status_arr.includes(searchdata[2])){\r\n\r\n vm.searchFields[\"equipment_name\"][\"value\"] = get_array_status(status_arr, \"string\") + '' ;\r\n\r\n }else{\r\n vm.searchFields[\"equipment_name\"][\"value\"] = get_array_status(status_arr, \"string\") + multiplepillseperator + get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n }else{\r\n vm.searchFields[\"equipment_name\"][\"value\"] = get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n }\r\n else if(isAddAll && (searchdata[1]==\"reason_code\" || searchdata[1]==\"service_level\")){\r\n vm.searchFields[searchdata[1]][\"value\"] = \"all\";\r\n }\r\n else{\r\n vm.searchFields[searchdata[1]][\"value\"] = searchdata[2];\r\n }\r\n\r\n }\r\n\r\n }\r\n }else{\r\n //vm.searchFields[searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[3];\r\n if(vm.searchValue != ''){\r\n if(vm.thirdChildFlg == 100)\r\n { \r\n vm.searchFields[searchdata[1]][\"value\"] = vm.searchValue.toString(); \r\n }\r\n else{\r\n for(var key in vm.searchFields)\r\n\r\n if(searchdata[0].toLowerCase() == \"shipment\" &&\r\n (\r\n (key.includes(\"total_invoice_amount\") && searchdata[1].toLowerCase().includes(\"total_invoice_amount\"))\r\n || (key.includes(\"total_gross_wt\") && searchdata[1].toLowerCase().includes(\"total_gross_wt\"))\r\n || (key.includes(\"total_piece_count\") && searchdata[1].toLowerCase().includes(\"total_piece_count\"))\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\"\r\n }\r\n\r\n add_multiple_values(searchdata[1], searchdata[1]);\r\n\r\n }\r\n\r\n }\r\n // vm.searchFields[searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue;\r\n else { vm.searchFields[searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[3]; }\r\n }\r\n vm.searchValue = \"\";\r\n vm.searchValue2 = \"\";\r\n vm.ttserchdata = \"\";\r\n\r\n }\r\n\r\n var convertedFields = vm.searchFields;\r\n\r\n vm.chipData = [];\r\n for (var field in convertedFields) { //set the focus to false\r\n\r\n convertedFields[field].focus = false;\r\n\r\n if((convertedFields[field].value !== null && convertedFields[field].value != '' && !convertedFields[field].value.toString().includes('undefined'))){\r\n\r\n if(convertedFields[field].field == \"load_status\"){\r\n\r\n var arr_values = convertedFields[field].value.split(/[\\s,]+/);\r\n\r\n for (var i=0; i< arr_values.length; i++) {\r\n if(arr_values[i] == '0'){\r\n arr_values[i] = \"open\";\r\n }\r\n else if(arr_values[i] == '1'){\r\n arr_values[i] = \"covered\";\r\n }else if (arr_values[i] == '2'){\r\n arr_values[i] = \"pickup\";\r\n }\r\n else if (arr_values[i] == '3'){\r\n arr_values[i] = \"dispatched\";\r\n }\r\n else if (arr_values[i] == '4'){\r\n arr_values[i] = \"loaded\";\r\n }\r\n else if (arr_values[i] == '5'){\r\n arr_values[i] = \"consignee\";\r\n }\r\n else if (arr_values[i] == '6'){\r\n arr_values[i] = \"delivered\";\r\n }\r\n }\r\n convertedFields[field].value = arr_values.join(\", \");\r\n }\r\n\r\n vm.chipData.push(convertedFields[field]);\r\n\r\n //added by chaitanya for removal of multiple pills\r\n\r\n var idx=null,idx2=null, cnt=0\r\n for( var i in vm.chipData){\r\n\r\n //if( [\"shipment_reason_code\"].includes(vm.chipData[i].field)){\r\n //var myArrayRC = vm.chipData[i].value.split(' , ');\r\n //var uniqueRC = array_unique(myArrayRC);\r\n //var fnalvalueRC = uniqueRC.join(' , ');\r\n //vm.chipData[i].value = fnalvalueRC.replace(/,\\s*$/, \"\").trim();\r\n //}\r\n if( [\"service_option_name\"].includes(vm.chipData[i].field)){\r\n var myArraySL = vm.chipData[i].value.split(' , ');\r\n var uniqueSL = array_unique(myArraySL);\r\n var fnalvalueSL = uniqueSL.join(' , ');\r\n vm.chipData[i].value = fnalvalueSL.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"bol_number\"].includes(vm.chipData[i].field)){\r\n var myArrayAW = vm.chipData[i].value.split(' , ');\r\n var uniqueAW = array_unique(myArrayAW);\r\n var fnalvalueAW = uniqueAW.join(' , ');\r\n vm.chipData[i].value = fnalvalueAW.replace(/,\\s*$/, \"\").trim();\r\n }\r\n\r\n if( [\"business_type_group\",\"transport_mode_name\"].includes(vm.chipData[i].field))\r\n cnt++;\r\n\r\n if(vm.chipData[i].field == \"business_type_group\")\r\n {\r\n var value1 = vm.chipData[i].value;\r\n idx = i;\r\n }\r\n else\r\n {\r\n var value1 = \"\";\r\n }\r\n if(vm.chipData[i].field == \"shipment_mode\")\r\n {\r\n idx2 = i;\r\n var value2 = vm.chipData[i].value;\r\n }\r\n else\r\n {\r\n var value2 = \"\";\r\n }\r\n }\r\n if(value1 && value2){\r\n //if(value1 != value2)\r\n var myArray = value2.split(' , ').concat(value1);\r\n var unique = array_unique(myArray);\r\n var fnalvalue = unique.join(' , ');\r\n vm.chipData[idx2].value = fnalvalue.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if(value2){\r\n var myArray = value2.split(' , ').concat(value1);\r\n var unique = array_unique(myArray);\r\n var fnalvalue = unique.join(' , ');\r\n vm.chipData[idx2].value = fnalvalue.replace(/,\\s*$/, \"\").trim();\r\n }\r\n\r\n if((cnt > 0 && idx2 >0) && idx)\r\n vm.chipData.splice(idx,1);\r\n\r\n }\r\n }\r\n // AdvSearchService.setCurrentSearchFields(convertedFields,null,true);\r\n\r\n callingToRemoveCrossIConInChips(vm.chipData, 'popup');\r\n\r\n //the search is then done in the track and trace controller\r\n //$mdDialog.hide();\r\n }\r\n\r\n function add_multiple_values(shipment_searchdata, searchdata){\r\n if(vm.searchFields[shipment_searchdata][\"value\"].length > 0 && !vm.searchFields[shipment_searchdata][\"value\"].split(\" , \").includes(vm.searchValue.toString())\r\n &&\r\n (searchdata==\"status\" || searchdata==\"load_status\" || shipment_searchdata==\"load_status\" || shipment_searchdata == \"load_number\" || shipment_searchdata == \"planned_start\" || shipment_searchdata == \"pickup_location\" ||\r\n shipment_searchdata == \"planned_end\" || searchdata==\"delivery_location\" || searchdata==\"route_number\" || searchdata == \"total_gross_wt\" || searchdata == \"total_piece_count\" ||\r\n searchdata==\"bol_number\" || searchdata==\"pro_number\" || searchdata==\"load_billing_invoice_status\" || searchdata==\"stop_count\" || searchdata==\"order_count\" || shipment_searchdata == \"trading_partner_carrier_name\" ||\r\n shipment_searchdata == \"trading_partner_carrier_number\" || shipment_searchdata == \"transport_mode_name\" || shipment_searchdata == \"equipment_name\" || shipment_searchdata == \"trading_partner_client_name\" ||\r\n shipment_searchdata == \"trading_partner_client_number\" || shipment_searchdata == \"service_option_name\" || shipment_searchdata == \"total_invoice_amount\" ||\r\n searchdata==\"is_bookmarked\")){\r\n //add multiple values to the chip\r\n vm.searchFields[shipment_searchdata][\"value\"] =vm.searchFields[shipment_searchdata][\"value\"]+ multiplepillseperator + vm.searchValue.toString();\r\n }\r\n else if(vm.searchFields[shipment_searchdata][\"value\"].length == 0)\r\n {\r\n vm.searchFields[shipment_searchdata][\"value\"] = vm.searchValue.toString();\r\n }\r\n }\r\n\r\n function get_array_status(status_arr, object_type){\r\n\r\n for (i=0; i < status_arr.length; i++){\r\n if (object_type == \"integer\"){\r\n status_arr[i] = get_milestone_displaycontent(status_arr[i])\r\n }\r\n else {\r\n status_arr[i] = get_string_status_displaycontent(status_arr[i])\r\n }\r\n }\r\n\r\n return status_arr.join(\" , \");\r\n\r\n }\r\n\r\n function get_string_status_displaycontent(searchdata){\r\n if(searchdata == '0'){\r\n var displaycontent = 'open';\r\n }\r\n else if(searchdata == '1'){\r\n var displaycontent = 'covered';\r\n }\r\n else if(searchdata == '2'){\r\n var displaycontent = 'pickup';\r\n }\r\n else if(searchdata == '3'){\r\n var displaycontent = 'dispatched';\r\n }\r\n else if(searchdata == '4'){\r\n var displaycontent = 'loaded';\r\n }\r\n else if(searchdata == '5'){\r\n var displaycontent = 'consignee';\r\n }\r\n else if(searchdata == '6'){\r\n var displaycontent = 'delivered';\r\n }\r\n else {\r\n var displaycontent = searchdata;\r\n }\r\n\r\n return displaycontent;\r\n }\r\n\r\n function get_milestone_displaycontent(searchdata){\r\n if(searchdata == 'open'){\r\n var displaycontent = '0';\r\n }\r\n else if(searchdata == 'covered'){\r\n var displaycontent = '1';\r\n }\r\n else if(searchdata == 'pickup'){\r\n var displaycontent = '2';\r\n }\r\n else if(searchdata == 'dispatched'){\r\n var displaycontent = '3';\r\n }\r\n else if(searchdata == 'loaded'){\r\n var displaycontent = '4';\r\n }\r\n else if(searchdata == 'consignee'){\r\n var displaycontent = '5';\r\n }\r\n else if(searchdata == 'delivered'){\r\n var displaycontent = '6';\r\n }\r\n else {\r\n var displaycontent = searchdata;\r\n }\r\n return displaycontent;\r\n\r\n }\r\n\r\n function get_status_displaycontent(searchdata){\r\n\r\n var status_array = new Array();\r\n\r\n searchdata = searchdata.trim();\r\n var space_text = searchdata.search(\" \");\r\n if(space_text){\r\n searchdata = searchdata.replace(\" \", \"_\");\r\n }\r\n\r\n status_array =\r\n {\r\n \"planned\":\"planned\",\r\n \"at_pickup\":\"pickup\",\r\n \"loaded\":\"loaded\",\r\n \"at_consignee\":\"consignee\",\r\n \"delivered\":\"delivered\"\r\n }\r\n\r\n if(status_array[searchdata]){\r\n return status_array[searchdata];\r\n }else{\r\n return searchdata;\r\n }\r\n\r\n }\r\n\r\n function get_status_original_value(searchdata){\r\n\r\n var status_array = new Array();\r\n\r\n status_array =\r\n {\r\n \"planned\":\"planned\",\r\n \"pickup\":\"at pickup\",\r\n \"loaded\":\"loaded\",\r\n \"consignee\":\"at consignee\",\r\n \"delivered\":\"delivered\"\r\n }\r\n\r\n if(status_array[searchdata]){\r\n return status_array[searchdata];\r\n }else{\r\n return searchdata;\r\n }\r\n }\r\n\r\n function array_unique(arr) {\r\n var result = [];\r\n for (var i = 0; i < arr.length; i++) {\r\n if (result.indexOf(arr[i]) == -1) {\r\n result.push(arr[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function clearSearch(){\r\n vm.chipData = [];\r\n callingToRemoveCrossIConInChips(vm.chipData, 'popup');\r\n }\r\n\r\n function advSearch(event){\r\n var convertedFields = vm.searchFields;\r\n for (var field in convertedFields) {\r\n //set the focus to false\r\n //console.log(convertedFields[field]);\r\n if(field == 'load_status' || field == 'status'){\r\n convertedFields[field].value = get_status_displaycontent(convertedFields[field].value);\r\n }\r\n else if(convertedFields[field].value.toString().includes('undefined')){\r\n convertedFields[field].value = \"\";\r\n }\r\n\r\n convertedFields[field].focus = false;\r\n\r\n }\r\n\r\n AdvSearchCmtsService.setCurrentSearchFields(convertedFields);\r\n\r\n if(event.target.id != \"btnSearch\" || event.target.id != \"spSearch\" ) {\r\n $mdDialog.cancel();\r\n }\r\n\r\n else {\r\n angular.element(document.querySelector('#AdvSearch')).focus();\r\n }\r\n\r\n TrackTraceCmtsPaginationService.save_page_number(1);\r\n TrackTraceCmtsPaginationService.save_per_page(10);\r\n\r\n vm.tableParams = ServerTableCmtsService.getTable();\r\n\r\n vm.tableParams.page(TrackTraceCmtsPaginationService.get_page_number());\r\n vm.tableParams.count(TrackTraceCmtsPaginationService.get_per_page());\r\n vm.tableParams.reload();\r\n\r\n }\r\n\r\n\r\n //saves the current form to default\r\n function saveToDefault() {\r\n vm.clearDefault(); //clear the old one so we can save a new one\r\n $log.debug(\"saved to default\");\r\n var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n AdvSearchCmtsService.setCurrentSearchFields(convertedFields);\r\n AdvSearchCmtsService.saveDefaultSearch({}, 'testDefault', true).then(function() {\r\n AdvSearchCmtsService.listSavedSearches().then(function(res){\r\n vm.isSavedSearch = res['data'].length > 0;\r\n });\r\n });\r\n }\r\n\r\n function loadDefault() {\r\n AdvSearchCmtsService.listSavedSearches().then(function(res){\r\n var isSavedSearch = res['data'].length > 0;\r\n if(isSavedSearch) {\r\n AdvSearchCmtsService.loadSearch((res['data'])['0'].id).then(function(res) {\r\n var searchFields = AdvSearchCmtsService.getCurrentSearchFields();\r\n var data = res['data'];\r\n for (var field in searchFields) {\r\n if(data[field] != null) {\r\n if (field.includes(\"date\")){\r\n searchFields[field].value = new Date(data[field]);\r\n } else {\r\n searchFields[field].value = data[field];\r\n }\r\n } else {\r\n searchFields[field].value = \"\";\r\n }\r\n }\r\n vm.searchFields = searchFields;\r\n vm.searchFields;\r\n });\r\n }\r\n });\r\n }\r\n\r\n function clearDefault() {\r\n //use list to get the correct id to delete\r\n AdvSearchCmtsService.listSavedSearches().then(function(res){\r\n if(res['data'].length > 0) { //if there is one to delete\r\n //delete the saved search with the id\r\n AdvSearchCmtsService.deleteSearch((res['data'])['0'].id).then(function(res) {\r\n //update if there is any saved searches\r\n AdvSearchCmtsService.listSavedSearches().then(function(res){\r\n vm.isSavedSearch = res['data'].length > 0;\r\n //vm.resetForm();\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n function resetForm() {\r\n var emptySearchFields = angular.copy(AdvSearchCmtsService.getEmptySearchFields());\r\n for (var field in emptySearchFields){\r\n vm.searchFields[field].value = emptySearchFields[field].value;\r\n }\r\n }\r\n\r\n //returns a list of the reason codes from the database\r\n //function getReasonCodes() {\r\n // //TODO: change this to return results from a query\r\n // return AdvSearchCmtsService.getReasonCodes();\r\n // }\r\n\r\n //returns a list of the service levels from the database\r\n //function getServiceLevels() {\r\n // //TODO: change this to return results from a query\r\n // return AdvSearchCmtsService.getServiceLevelCodes();\r\n //}\r\n\r\n //function getBusinessTypes() {\r\n // return AdvSearchCmtsService.getBusinessTypeCodes();\r\n //}\r\n\r\n function formClick(event) {\r\n event.preventDefault();\r\n if (vm.openInputFlag) // if input is availble enter click is handled for add btn\r\n {\r\n newSearch();\r\n clearFlags();\r\n angular.element(document.querySelector('#AdvSearch')).focus();\r\n } else {\r\n advSearch(event);\r\n }\r\n }\r\n\r\n\r\n function addOneMoreDay(selectedDate){\r\n $scope.dateMin = moment(selectedDate).add(1,'days');\r\n }\r\n\r\n function subtractOneDay(selectedDate){\r\n $scope.dateMax = moment(selectedDate).subtract(1,'days');\r\n }\r\n\r\n function callingToRemoveCrossIConInChips(data, page){\r\n\r\n switch ($state.current.name){\r\n\r\n case 'track-trace-booking' :\r\n\r\n vm.bookingMode = true;\r\n vm.transitMode = false;\r\n vm.heading_text = \"Booking\";\r\n vm.booking_number_quick_search = true;\r\n vm.status_advanced_search = false;\r\n vm.searchType = 'booking_number';\r\n AdvSearchCmtsService.removeCloseMarkInChips(data, page);\r\n\r\n break;\r\n\r\n case 'track-trace-transit' :\r\n\r\n vm.bookingMode = false;\r\n vm.transitMode = true;\r\n vm.status_advanced_search = false;\r\n vm.heading_text = \"In_Transit\";\r\n AdvSearchCmtsService.removeCloseMarkInChips(data, page);\r\n\r\n break;\r\n\r\n default: \r\n vm.bookingMode = false;\r\n vm.transitMode = false;\r\n vm.heading_text = \"Track & Trace\";\r\n AdvSearchCmtsService.removeCloseMarkInChips(data, page); \r\n \r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n})();\n/**\r\n * @ngdoc directive\r\n * @name auto-complete\r\n * @description directive that creates an autocomplete form\r\n * @restrict E\r\n */\r\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .directive('cfsAutoComplete', cfsAutoComplete)\r\n\r\n /** @ngInject */\r\n function cfsAutoComplete() {\r\n var directive = {\r\n restrict: 'E',\r\n scope: {\r\n field: '@',\r\n searchField: '@',\r\n displayName: '@',\r\n searchText: '=',\r\n focusField: '=',\r\n extraParamString: '@'\r\n },\r\n templateUrl: '/app/advanced-search/auto-complete-field.html',\r\n controller: \"AdvSearchCfsController\",\r\n controllerAs: \"searchCtrl\",\r\n link: function(scope, element, attrs){\r\n // debugger;\r\n }\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.search\r\n * @description method that includes the current search fields into a search\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.autocomplete\r\n * @description method that querys from the database given the letters typed in\r\n * @param {query} - the letters from the input field\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.saveDefaultSearch\r\n * @description method that saves a search\r\n * @param {query} - the searchFields that you want to saved\r\n * @param {name} - name for the search that your saving\r\n * @param {isDefault} - true or false wether this is your default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.listSavedSearches\r\n * @description method that lists all the searches that have been saved\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.loadSearch\r\n * @description method that loads the search with the given id\r\n * @param {id} - the id for the search that you want to load\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.deleteSearch\r\n * @description method that deletes the search with the given id\r\n * @param {id} - the id for the search that you want to delete\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getEmptySearchFields\r\n * @description method that gets the empty search field\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getCurrentSearchFields\r\n * @description method that gets the current search fields\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getIsFirstSearch\r\n * @description method that gets if the search is the first search or not\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setIsFirstSearch\r\n * @description method that sets if the search is the first search or not\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setCurrentSearchFields\r\n * @params {searchFields}\r\n * @description method that sets teh current search fields with searchFields\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setClickedChip\r\n * @description method TODO\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.removeChip\r\n * @description method TODO\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getSearchFieldsFocus\r\n * @description method TODO\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('AdvSearchCfsService', AdvSearchCfsService);\r\n\r\n /** @ngInject */\r\n AdvSearchCfsService.$inject = ['$http', '$log', '$filter', 'api', '$q', '$timeout', '$rootScope', '$location', 'DownloadService', 'TrackTraceCfsPaginationService'];\r\n function AdvSearchCfsService($http, $log, $filter, api, $q, $timeout, $rootScope, $location, DownloadService, TrackTraceCfsPaginationService) {\r\n\r\n var isSavedSearch = false;\r\n var modifySearchVal=false;\r\n var searchFieldChips = [];\r\n listSavedSearches(); //sets isSavedSearch\r\n var isFirstSearch = true; //saves if it is the first search\r\n var timeoutPromise = false;\r\n\r\n var emptySearchFields = {\r\n shipdate_from: {\r\n field: \"shipdate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SHIP_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipdate_to: {\r\n field: \"shipdate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SHIP_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n /*shipper: {\r\n field: \"shipper\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SHIPPER\",\r\n displayValue: true,\r\n focus: false\r\n },*/\r\n reference: {\r\n field: \"reference\",\r\n value: \"\",\r\n display: \"Reference\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n // bol: {\r\n // field: \"bol\",\r\n // value: \"\",\r\n // display: \"TRACKTRACE.AWB_BOL\",\r\n // displayValue: true,\r\n // focus: false\r\n // },\r\n pro: {\r\n field: \"pro\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PRO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickupapptdate_from: {\r\n field: \"pickupapptdate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PICKUP_APPT_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickupapptdate_to: {\r\n field: \"pickupapptdate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PICKUP_APPT_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n deliverydate_from: {\r\n field: \"deliverydate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DELIVERY_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n deliverydate_to: {\r\n field: \"deliverydate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DELIVERY_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consigneeapptdate_from: {\r\n field: \"consigneeapptdate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CONSIGNEE_APPT_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consigneeapptdate_to: {\r\n field: \"consigneeapptdate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CONSIGNEE_APPT_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n duedate_from: {\r\n field: \"duedate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DUE_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n duedate_to: {\r\n field: \"duedate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DUE_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimateddate_from: {\r\n field: \"estimateddate_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ESTIMATED_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimateddate_to: {\r\n field: \"estimateddate_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ESTIMATED_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n reason_code: {\r\n field: \"reason_code\",\r\n value: \"\",\r\n display: \"TRACKTRACE.REASON_CODE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_status: {\r\n field: \"shipment_status\",\r\n value: \"\",\r\n display: \"TRACKTRACE.STATUS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n /*status: {\r\n field: \"status\",\r\n value: \"\",\r\n display: \"TRACKTRACE.STATUS\",\r\n displayValue: true,\r\n focus: false\r\n },*/\r\n milestone: {\r\n field: \"milestone\",\r\n value: \"\",\r\n display: \"TRACKTRACE.MILESTONE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n quick_filter: {\r\n field: \"quick_filter\",\r\n value: [],\r\n display: \"TRACKTRACE.FILTER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n arrive_date_from: {\r\n field: \"arrive_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ARRIVE_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n arrive_date_to: {\r\n field: \"arrive_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ARRIVE_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n origins: {\r\n field: \"origins\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ORIGINS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n destinations: {\r\n field: \"destinations\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DESTINATIONS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n destinationstate: {\r\n field: \"destinationstate\",\r\n value: \"\",\r\n display: \"Delivery City / State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n originstate: {\r\n field: \"originstate\",\r\n value: \"\",\r\n display: \"Pickup City / State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n booking_number: {\r\n field: \"booking_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.BOOKING_NUMBER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n customername: {\r\n field: \"customername\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CUSTOMER_NAME\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n customeraddress1: {\r\n field: \"customeraddress1\",\r\n value: \"\",\r\n display: \"Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n customerphone: {\r\n field: \"customerphone\",\r\n value: \"\",\r\n display: \"Customer Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_delivery_status: {\r\n field: \"shipment_delivery_status\",\r\n value: \"\",\r\n display: \"Delivery Status\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_current_status: {\r\n field: \"shipment_current_status\",\r\n value: \"\",\r\n display: \"Current Status\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_is_less_than: {\r\n field: \"shipment_invoice_total_is_less_than\",\r\n value: \"\",\r\n display: \"Invoice total <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_is_greater_than: {\r\n field: \"shipment_invoice_total_is_greater_than\",\r\n value: \"\",\r\n display: \"Invoice total >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_equal_to: {\r\n field: \"shipment_invoice_total_equal_to\",\r\n value: \"\",\r\n display: \"Invoice total =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_invoice_total_range: {\r\n field: \"shipment_invoice_total_range\",\r\n value: \"\",\r\n display: \"Invoice total between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_range: {\r\n field: \"shipment_gross_weight_range\",\r\n value: \"\",\r\n display: \"Gross Weight between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_equal_to: {\r\n field: \"shipment_gross_weight_equal_to\",\r\n value: \"\",\r\n display: \"Gross Weight =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_is_greater_than: {\r\n field: \"shipment_gross_weight_is_greater_than\",\r\n value: \"\",\r\n display: \"Gross Weight >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_gross_weight_is_less_than: {\r\n field: \"shipment_gross_weight_is_less_than\",\r\n value: \"\",\r\n display: \"Gross Weight <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_is_less_than: {\r\n field: \"shipment_total_pieces_is_less_than\",\r\n value: \"\",\r\n display: \"Total Pieces <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_is_greater_than: {\r\n field: \"shipment_total_pieces_is_greater_than\",\r\n value: \"\",\r\n display: \"Total Pieces >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_equal_to: {\r\n field: \"shipment_total_pieces_equal_to\",\r\n value: \"\",\r\n display: \"Total Pieces =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_total_pieces_range: {\r\n field: \"shipment_total_pieces_range\",\r\n value: \"\",\r\n display: \"Total Pieces Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n\r\n shipment_invoice: {\r\n field: \"shipment_invoice\",\r\n value: \"\",\r\n display: \"Invoice\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_consignee_reference: {\r\n field: \"shipment_consignee_reference\",\r\n value: \"\",\r\n display: \"CONSIGNEE REF #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_pro: {\r\n field: \"shipment_pro\",\r\n value: \"\",\r\n display: \"PRO #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_bol: {\r\n field: \"shipment_bol\",\r\n value: \"\",\r\n display: \"BOL #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_reference: {\r\n field: \"shipment_reference\",\r\n value: \"\",\r\n display: \"REF #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_load: {\r\n field: \"shipment_load\",\r\n value: \"\",\r\n display: \"LOAD #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_container: {\r\n field: \"shipment_container\",\r\n value: \"\",\r\n display: \"Container/Trailer #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_is_bookmarked: {\r\n field: \"shipment_is_bookmarked\",\r\n value: \"\",\r\n display: \"Isbookmarked\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n deliverydate_date_equal_to: {\r\n field: \"deliverydate_date_equal_to\",\r\n value: \"\",\r\n display: \"Delivered Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n deliverydate_date_range_to: {\r\n field: \"deliverydate_date_range_to\",\r\n value: \"\",\r\n display: \"Delivered Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n\r\n shipment_pickup_date_equal_to: {\r\n field: \"shipment_pickup_date_equal_to\",\r\n value: \"\",\r\n display: \"Pick Up Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_pickup_date_range_to: {\r\n field: \"shipment_pickup_date_range_to\",\r\n value: \"\",\r\n display: \"Pickup Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_pickup_time_equal_to: {\r\n field: \"shipment_pickup_time_equal_to\",\r\n value: \"\",\r\n display: \"Pick Up Time\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_pickup_time_range_to: {\r\n field: \"shipment_pickup_time_range_to\",\r\n value: \"\",\r\n display: \"Pick Up Time Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_deliveryeta_date_equal_to: {\r\n field: \"shipment_deliveryeta_date_equal_to\",\r\n value: \"\",\r\n display: \"Delivery ETA Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_deliveryeta_date_range_to: {\r\n field: \"shipment_deliveryeta_date_range_to\",\r\n value: \"\",\r\n display: \"Delivery ETA Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_mustship_date_equal_to: {\r\n field: \"shipment_mustship_date_equal_to\",\r\n value: \"\",\r\n display: \"Must Ship Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_mustship_date_range_to: {\r\n field: \"shipment_mustship_date_range_to\",\r\n value: \"\",\r\n display: \"Must Ship Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_mustdeliver_date_equal_to: {\r\n field: \"shipment_mustdeliver_date_equal_to\",\r\n value: \"\",\r\n display: \"Must Deliver Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_mustdeliver_date_range_to: {\r\n field: \"shipment_mustdeliver_date_range_to\",\r\n value: \"\",\r\n display: \"Must Deliver Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipdate_date_equal_to: {\r\n field: \"shipdate_date_equal_to\",\r\n value: \"\",\r\n display: \"Ship Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipdate_date_range_to: {\r\n field: \"shipdate_date_range_to\",\r\n value: \"\",\r\n display: \"Ship Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n duedate_date_equal_to: {\r\n field: \"duedate_date_equal_to\",\r\n value: \"\",\r\n display: \"Due Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n duedate_date_range_to: {\r\n field: \"duedate_date_range_to\",\r\n value: \"\",\r\n display: \"Due Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimateddelivery_date_equal_to: {\r\n field: \"estimateddelivery_date_equal_to\",\r\n value: \"\",\r\n display: \"Expected Delivery Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimateddelivery_date_range_to: {\r\n field: \"estimateddelivery_date_range_to\",\r\n value: \"\",\r\n display: \"Expected Delivery Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_origin_state: {\r\n field: \"shipment_origin_state\",\r\n value: \"\",\r\n display: \"Pickup State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_origin_city: {\r\n field: \"shipment_origin_city\",\r\n value: \"\",\r\n display: \"Pickup City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_destination_state: {\r\n field: \"shipment_destination_state\",\r\n value: \"\",\r\n display: \"Delivery State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_destination_city: {\r\n field: \"shipment_destination_city\",\r\n value: \"\",\r\n display: \"Delivery City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shippername: {\r\n field: \"shippername\",\r\n value: \"\",\r\n display: \"Shipper Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_name: {\r\n field: \"consignee_name\",\r\n value: \"\",\r\n display: \"Consignee Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_contact_name: {\r\n field: \"consignee_contact_name\",\r\n value: \"\",\r\n display: \"Consignee Contact Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_street_address: {\r\n field: \"consignee_street_address\",\r\n value: \"\",\r\n display: \"Consignee Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_state: {\r\n field: \"consignee_state\",\r\n value: \"\",\r\n display: \"Consignee State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_city: {\r\n field: \"consignee_city\",\r\n value: \"\",\r\n display: \"Consignee City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_zip: {\r\n field: \"consignee_zip\",\r\n value: \"\",\r\n display: \"Consignee Zip\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee_phone: {\r\n field: \"consignee_phone\",\r\n value: \"\",\r\n display: \"Consignee Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_name: {\r\n field: \"pickup_name\",\r\n value: \"\",\r\n display: \"Pickup Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_contact_name: {\r\n field: \"pickup_contact_name\",\r\n value: \"\",\r\n display: \"Pickup Contact Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_street_address: {\r\n field: \"pickup_street_address\",\r\n value: \"\",\r\n display: \"Pickup Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_state: {\r\n field: \"pickup_state\",\r\n value: \"\",\r\n display: \"Pickup State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_city: {\r\n field: \"pickup_city\",\r\n value: \"\",\r\n display: \"Pickup City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_zip: {\r\n field: \"pickup_zip\",\r\n value: \"\",\r\n display: \"Pickup Zip\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pickup_phone: {\r\n field: \"pickup_phone\",\r\n value: \"\",\r\n display: \"Pickup Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_equipment_type: {\r\n field: \"shipment_equipment_type\",\r\n value: \"\",\r\n display: \"Equipment Type\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_type: {\r\n field: \"shipment_type\",\r\n value: \"\",\r\n display: \"Shipment Type\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n reference_number: {\r\n field: \"reference_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.REFERENCE_NUM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipment_revenue_code: {\r\n field: \"shipment_revenue_code\",\r\n value: \"\",\r\n display: \"Revenue Code\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n forecast_aljex_custom_options: {\r\n field: \"forecast_aljex_custom_options\",\r\n value: \"\",\r\n display: \"Forecast Custom Option\",\r\n displayValue: true,\r\n focus: false\r\n }\r\n };\r\n\r\n var search_params = [],\r\n hasLoadedSearchValues = false,\r\n currentSearchFields = angular.copy(emptySearchFields),\r\n query = {};\r\n updateQuery();\r\n removeCloseMarkInChips;\r\n\r\n function listSavedSearches() {\r\n\r\n\r\n var promise = $http.get(api.url_v2 + '/search/saved').then(function(res){\r\n $log.debug(res);\r\n isSavedSearch = res['data'].length > 0;\r\n return res;\r\n });\r\n return promise;\r\n }\r\n\r\n function deleteSearch(id) {\r\n var promise = $http.delete(api.url_v2 + '/search/saved/' + id).then(function(res){\r\n $log.debug(res);\r\n });\r\n return promise;\r\n }\r\n\r\n //goes through the search fields from advance search and generates an object for pills\r\n function generateChips() {\r\n var k = 0; //for the chipTranslations index\r\n searchFieldChips.length = 0;\r\n var shipbetweendate = localStorage.getItem('shipbetweendate');\r\n var duebetweendate = localStorage.getItem('duebetweendate');\r\n var deliveredbetweendate = localStorage.getItem('deliveredbetweendate');\r\n var expectedbetweendate = localStorage.getItem('expectedbetweendate');\r\n for (var i in currentSearchFields) {\r\n\r\n if(currentSearchFields[i].value !== null && currentSearchFields[i].value !== \"\" && i != 'quick_filter' && (i != 'invalidate_cache')) { //dont make chips for quick_filter\r\n var object = {};\r\n object['key'] = currentSearchFields[i].field;\r\n object['display'] = currentSearchFields[i].display;\r\n\r\n /*if(currentSearchFields[i].display.includes('Time') ){\r\n currentSearchFields[i].value = new Date(currentSearchFields[i].value);\r\n }\r\n debugger;*/\r\n // code for between dates invalid issue after refresh\r\n\r\n if(currentSearchFields[i].display == 'Ship Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('shipbetweendate') : currentSearchFields[i].value;\r\n }\r\n else if(currentSearchFields[i].display == 'Due Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('duebetweendate') : currentSearchFields[i].value;\r\n }\r\n\r\n else if(currentSearchFields[i].display == 'Delivered Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('deliveredbetweendate') : currentSearchFields[i].value;\r\n }\r\n\r\n else if(currentSearchFields[i].display == 'Expected Delivery Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('expectedbetweendate') : currentSearchFields[i].value;\r\n }\r\n else{\r\n object['searchField'] = currentSearchFields[i].value;\r\n }\r\n object['displayValue'] = currentSearchFields[i].displayValue;\r\n\r\n if(object.display.includes('Ship Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('shipbetweendate',object['searchField']);\r\n }\r\n\r\n if(object.display.includes('Due Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('duebetweendate',object['searchField']);\r\n }\r\n\r\n if(object.display.includes('Delivered Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('deliveredbetweendate',object['searchField']);\r\n }\r\n\r\n if(object.display.includes('Expected Delivery Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('expectedbetweendate',object['searchField']);\r\n }\r\n\r\n if(i == 'milestone' ) {\r\n if (currentSearchFields[i].value.length > 1){\r\n var status_arr = currentSearchFields[i].value.split(/[\\s,]+/)\r\n\r\n for (j=0; j < status_arr.length; j++){\r\n\r\n status_arr[j] = get_milestone(status_arr[j])\r\n }\r\n\r\n object['searchField'] = status_arr.join(\" , \");\r\n\r\n }else {\r\n object['searchField'] = get_milestone(currentSearchFields[i].value);\r\n }\r\n\r\n // if(currentSearchFields[i].value == '7') object['searchField'] = 'tord';\r\n // if(currentSearchFields[i].value == '8') object['searchField'] = 'released';\r\n // } else if(i == 'business_type' || i == 'service_level' || i == 'reason_code'){\r\n //object['searchField'] = ;\r\n\r\n }else if(i == 'shipment_status'){\r\n object['searchField'] = get_status(currentSearchFields[i].value);\r\n }\r\n\r\n else if (i == 'business_type_group') {\r\n object['searchField'] = object['searchField'].substring(0, 1).toUpperCase() + object['searchField'].substring(1);\r\n }\r\n searchFieldChips.push(object);\r\n }\r\n k++;\r\n }\r\n\r\n var idx=null,idx2=null, cnt=0;\r\n for( var j in searchFieldChips){\r\n if( [\"business_type_group\",\"shipment_mode\"].includes(searchFieldChips[j].key))\r\n cnt++;\r\n if(searchFieldChips[j].key == \"business_type_group\")\r\n {\r\n idx = j;\r\n }\r\n if(searchFieldChips[j].key == \"shipment_mode\")\r\n {\r\n idx2 = j;\r\n }\r\n if((cnt > 0 && idx2 >0) && idx)\r\n searchFieldChips.splice(idx,1);\r\n\r\n }\r\n\r\n return searchFieldChips;\r\n //return removeTimeZoneInPickUp(searchFieldChips, 'key', 'searchField');\r\n\r\n }\r\n\r\n function removeCloseMarkInChips(chips, page){\r\n\r\n //var chips = vm.chipSearchFields;\r\n modifySearchVal=false;\r\n angular.forEach(chips, function(data,key){\r\n\r\n var dataToBeRemovalkey = '';\r\n\r\n if(data){\r\n\r\n if(data.key && data.searchField){\r\n\r\n if((data.key == 'status' && data.searchField == \"booked\") || (data.key == 'status' && data.searchField == \"Undelivered\") ){\r\n dataToBeRemovalkey = key;\r\n }\r\n\r\n }if(data.value && data.field){\r\n\r\n if((data.field == 'status' && data.value == \"booked\") || (data.field == 'status' && data.value == \"Undelivered\") ){\r\n dataToBeRemovalkey = key;\r\n }\r\n\r\n }\r\n// only removing cancel button on chips for otp shipments\r\n if(data.key == \"otp_date_from\" || data.key == \"otp_date_to\" || data.key == \"otp_type\" || data.key == \"otp_period\"\r\n || data.key == \"arrive_date_from\" || data.key == \"arrive_date_to\" || data.key == \"forecast_aljex_custom_options\"){\r\n dataToBeRemovalkey = key;\r\n var nodes =angular.element( document.querySelectorAll( '.md-chips .md-chip .md-chip-remove-container'));\r\n var myEl = nodes[dataToBeRemovalkey];\r\n if(myEl){\r\n if (angular.element(myEl).find('.md-chips .md-chip .md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).addClass('hide');\r\n modifySearchVal = true;\r\n }\r\n }\r\n }\r\n // end of shipments\r\n }\r\n\r\n\r\n\r\n if(dataToBeRemovalkey !== ''){\r\n\r\n setTimeout(function(){\r\n try{\r\n\r\n var nodes =angular.element( document.querySelectorAll( '.mdChipsCloseMarkRemoval md-chip' ));\r\n var myEl = nodes[dataToBeRemovalkey];\r\n\r\n if(myEl){\r\n if (angular.element(myEl).find('.md-chips .md-chip .md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).addClass('hide');\r\n modifySearchVal = true;\r\n }\r\n }\r\n\r\n var nodes1 =angular.element( document.querySelectorAll( '.mdChipsCloseMarkRemoval1 md-chip' ));\r\n var myEl1 = nodes1[dataToBeRemovalkey];\r\n\r\n if(myEl1){\r\n if (angular.element(myEl).find('.md-chips .md-chip .md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).addClass('hide');\r\n modifySearchVal = true;\r\n }\r\n }\r\n\r\n }\r\n catch(e){\r\n console.warn(\"test\",e)\r\n }\r\n\r\n }, 25);\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n function get_milestone(status_value){\r\n if(status_value == '0'){\r\n var displaycontent = 'open';\r\n }\r\n else if(status_value == '1'){\r\n var displaycontent = 'covered';\r\n }\r\n else if(status_value == '2'){\r\n var displaycontent = 'pickup';\r\n }\r\n else if(status_value == '3'){\r\n var displaycontent = 'dispatched';\r\n }\r\n else if(status_value == '4'){\r\n var displaycontent = 'loaded';\r\n }\r\n else if(status_value == '5'){\r\n var displaycontent = 'consignee';\r\n }\r\n else if(status_value == '6'){\r\n var displaycontent = 'delivered';\r\n }\r\n return displaycontent;\r\n }\r\n\r\n function get_status(searchdata){\r\n\r\n var status_array = new Array();\r\n\r\n status_array =\r\n {\r\n \"planned\":\"planned\",\r\n \"pickup\":\"at pickup\",\r\n \"loaded\":\"loaded\",\r\n \"consignee\":\"at consignee\",\r\n \"delivered\":\"delivered\"\r\n }\r\n\r\n if(status_array[searchdata]){\r\n return status_array[searchdata];\r\n }else{\r\n return searchdata;\r\n }\r\n\r\n }\r\n\r\n function setUrl(){\r\n\r\n var newParams = {};\r\n\r\n // from dount chart dashboard[Aljex] page.\r\n if($location.search().page_from == 'aljex'){\r\n for (var r in $location.search()){\r\n //newParams = $location.search();\r\n }\r\n }\r\n\r\n angular.forEach(Object.keys(currentSearchFields), function(k) {\r\n\r\n // code for between dates invalid issue after refresh\r\n if(currentSearchFields.shipdate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipdate_date_range_to.value = localStorage.getItem('shipbetweendate');\r\n }\r\n\r\n if(currentSearchFields.estimateddelivery_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.estimateddelivery_date_range_to.value = localStorage.getItem('expectedbetweendate');\r\n }\r\n\r\n if(currentSearchFields.deliverydate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.deliverydate_date_range_to.value = localStorage.getItem('deliveredbetweendate');\r\n }\r\n\r\n if(currentSearchFields.duedate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.duedate_date_range_to.value = localStorage.getItem('duebetweendate');\r\n }\r\n\r\n if (k != 'quick_filter' && currentSearchFields[k].value) {\r\n if (k.includes('_date')){\r\n if (k.includes('shipment_mode')){\r\n delete newParams['business_type_group'];\r\n }\r\n //newParams[k] = $filter(\"date\")(currentSearchFields[k].value, 'yyyy-MM-dd', \"UTC\");\r\n newParams[k] = $filter(\"date\")(currentSearchFields[k].value, 'yyyy-MM-dd');\r\n }else {\r\n if (k.includes('shipment_mode')){\r\n delete newParams['business_type_group'];\r\n }\r\n newParams[k] = currentSearchFields[k].value;\r\n }\r\n }\r\n\r\n });\r\n // if (!disableUrlReplacement) {\r\n //debugger;\r\n\r\n var page_number = TrackTraceCfsPaginationService.get_page_number();\r\n var per_page = TrackTraceCfsPaginationService.get_per_page();\r\n\r\n newParams.page = page_number;\r\n newParams.per_page = per_page;\r\n\r\n $location.search(newParams);\r\n // }\r\n }\r\n\r\n function saveLastSearchLocally(search) {\r\n\r\n search = search || angular.copy(currentSearchFields);\r\n\r\n var searchShippDueDate=search.duedate_date_equal_to.value;\r\n var searchDelDate=search[\"deliverydate_date_equal_to\"].value;\r\n var searchDeliveryDate=search.estimateddelivery_date_equal_to.value;\r\n\r\n if(searchShippDueDate!=\"\"){\r\n var date = new Date(searchShippDueDate).toDateString();\r\n var convDueDate = date.slice(4);\r\n search.duedate_date_equal_to.value=convDueDate;\r\n }\r\n if(searchDelDate!=\"\"){\r\n var date = new Date(searchDelDate).toDateString();\r\n var convDelDate = date.slice(4);\r\n search[\"deliverydate_date_equal_to\"].value=convDelDate;\r\n }\r\n if(searchDeliveryDate!=\"\"){\r\n var date = new Date(searchDeliveryDate).toDateString();\r\n var conDeliveryDate = date.slice(4);\r\n search.estimateddelivery_date_equal_to.value=conDeliveryDate;\r\n }\r\n\r\n for (var field in search){\r\n if (field.includes('_date')){\r\n search[field].value = $filter('date')(search[field].value, 'yyyy-MM-dd', \"IST\");\r\n }\r\n }\r\n\r\n localStorage.setItem(\"lastCfsSearch\", JSON.stringify(search));\r\n\r\n }\r\n\r\n function updateQuery() {\r\n\r\n for (var prop in currentSearchFields){\r\n\r\n // code for between dates invalid issue after refresh\r\n if(currentSearchFields.shipdate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipdate_date_range_to.value = localStorage.getItem('shipbetweendate');\r\n }\r\n\r\n if(currentSearchFields.estimateddelivery_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.estimateddelivery_date_range_to.value = localStorage.getItem('expectedbetweendate');\r\n }\r\n\r\n if(currentSearchFields.deliverydate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.deliverydate_date_range_to.value = localStorage.getItem('deliveredbetweendate');\r\n }\r\n\r\n if(currentSearchFields.duedate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.duedate_date_range_to.value = localStorage.getItem('duebetweendate');\r\n }\r\n\r\n\r\n if (query[prop] && (currentSearchFields[prop].value === \"\" ||\r\n (prop === 'quick_filter' && currentSearchFields[prop].value.length === 0))){\r\n if(prop.includes('shipment_mode'))\r\n {\r\n delete query['business_type_group'];\r\n }\r\n delete query[prop];\r\n\r\n if($location.search().page_from == 'aljex'){\r\n delete $location.search()[prop];\r\n }\r\n\r\n }\r\n if (currentSearchFields[prop].value != null && ((prop === 'quick_filter' && currentSearchFields[prop].value.length > 0) || (prop !== 'quick_filter' && currentSearchFields[prop].value !== \"\"))) {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n if(prop.includes('shipment_mode'))\r\n delete query['business_type_group'];\r\n query[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n if(prop.includes('shipment_mode'))\r\n delete query['business_type_group'];\r\n query[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n }\r\n\r\n function removeTimeZoneInPickUp(chipData, keyname, searchFieldName){\r\n\r\n //searchFieldName = Value name\r\n //keyname = field name\r\n\r\n if(chipData){\r\n\r\n angular.forEach(chipData, function(data,key){\r\n\r\n if(data[keyname].includes('pickup_time')){\r\n\r\n if(data[searchFieldName].toLowerCase().includes('and')){\r\n\r\n var timeList = data[searchFieldName].split(\"and\");\r\n\r\n var remove_ist1 = timeList[0].split(\" \");\r\n var remove_ist2 = timeList[1].split(\" \");\r\n\r\n remove_ist1 = remove_ist1.filter(function(e){return e});\r\n remove_ist2 = remove_ist2.filter(function(e){return e});\r\n\r\n var pickupTime1 = remove_ist1[0]+' '+remove_ist1[1];\r\n\r\n var pickupTime2 = remove_ist2[0]+' '+remove_ist2[1];\r\n\r\n chipData[key][searchFieldName] = pickupTime1+' and '+pickupTime2;\r\n\r\n } else{\r\n\r\n var remove_ist = data[searchFieldName].split(\" \");\r\n var pickupTime = remove_ist[0]+' '+remove_ist[1];\r\n\r\n chipData[key][searchFieldName] = pickupTime;\r\n\r\n }\r\n\r\n }\r\n\r\n });\r\n\r\n return chipData;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n return {\r\n clearTimeout: function() { timeoutPromise = false; },\r\n search: function(query){\r\n var search = query ? query : {};\r\n\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value != null && currentSearchFields[prop].value != \"\") {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n search[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n search[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n if (timeoutPromise) timeoutPromise.resolve('newSearch');\r\n timeoutPromise = $q.defer();\r\n saveLastSearchLocally();\r\n // return ServerTableService.setQuery(search, timeoutPromise);\r\n },\r\n\r\n exportSearchFields: function(fields, params){\r\n\r\n var search = {};\r\n if (fields && fields.length !== 0){\r\n search.columns = fields.map(function(d){return d.field;});\r\n }\r\n search.columns = search.columns || [];\r\n if (params){\r\n if (params.filter){search.filter = params.filter;}\r\n if (params.sorting){search.sorting = params.sorting;}\r\n }\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value !== \"\" &&\r\n currentSearchFields[prop].value.length != 0) {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n search[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n search[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n $log.debug(search);\r\n var csv_date = new Date();\r\n var filename = (moment().format('YYYY-MM-DD') + '-track-trace-cfs-Export.csv');\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n\r\n if(localStorage.customerType == 'cfs'){\r\n\r\n if(localStorage.switchEmailCfsType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCfsType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCfs){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCfs)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n }else{\r\n params +=\"?customer_type=cfs\";\r\n }\r\n\r\n\r\n var page_number = TrackTraceCfsPaginationService.get_page_number();\r\n var per_page = TrackTraceCfsPaginationService.get_per_page();\r\n\r\n search.page = page_number;\r\n search.per_page = per_page;\r\n\r\n return DownloadService.postDownloadFile(api.url_v2 + '/search/export_aljex'+params, search , filename);\r\n\r\n },\r\n autocomplete: function(query, extraParamString) {\r\n var theQuery = angular.copy(query);\r\n\r\n // if(localStorage.switchEmail){\r\n // theQuery.userEmail =localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // theQuery.userCompany=localStorage.userCompany;\r\n // }\r\n\r\n\r\n if(localStorage.customerType == 'cfs'){\r\n if(localStorage.switchEmailCfsType){\r\n theQuery.userEmail =localStorage.switchEmailCfsType;\r\n theQuery.customer_type = localStorage.customerType;\r\n }else if(localStorage.userCompanyCfs){\r\n theQuery.userCompany= encodeURIComponent(localStorage.userCompanyCfs);\r\n theQuery.customer_type = localStorage.customerType;\r\n }\r\n }else{\r\n theQuery.customer_type = 'cfs';\r\n }\r\n\r\n if (extraParamString) {\r\n var pairs = extraParamString.split('&');\r\n angular.forEach(pairs, function(p) {\r\n var bits = p.split('=');\r\n theQuery[bits[0]] = bits[1];\r\n });\r\n }\r\n var promise = $http.post(api.url_v2 + '/aljex_autocomplete', theQuery).then(function(res){\r\n //if(theQuery.field != \"t_and_t_citycountry\"){\r\n var autocompletes = res.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n // }else{\r\n // var autocompletes = res.data.map(function(d){\r\n // return {\r\n // value: d.value,\r\n // display: d.display\r\n // };\r\n // });\r\n // }\r\n\r\n return autocompletes;\r\n });\r\n return promise;\r\n },\r\n listSavedSearches: listSavedSearches, //list the saved searches\r\n saveDefaultSearch: function(query, name, isDefault) {\r\n\r\n var fields = query ? query : {};\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value !== \"\") {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n fields[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n fields[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n $log.debug(fields);\r\n fields.search_name = name;\r\n fields.default_search = isDefault;\r\n var promise = $http.post(api.url_v2 + '/search/saved', fields).then(function(res){\r\n $log.debug(res);\r\n var emptySearchSave = true;\r\n for (var prop in currentSearchFields){ //see if they saved an empty search\r\n if (res.data[prop] != null) {\r\n emptySearchSave = false;\r\n }\r\n }\r\n if(emptySearchSave) deleteSearch(res.data.id); //delete the search if it is empty\r\n });\r\n return promise;\r\n },\r\n loadSearch: function(id) {\r\n\r\n var promise = $http.get(api.url_v2 + '/search/saved/' + id).then(function(res){\r\n $log.debug(res);\r\n return res;\r\n });\r\n return promise;\r\n },\r\n deleteSearch: deleteSearch,\r\n getIsSavedSearch: function() {\r\n return isSavedSearch;\r\n },\r\n getEmptySearchFields: function() {\r\n return angular.copy(emptySearchFields);\r\n },\r\n getSearch: function(){\r\n\r\n var promise = $http.get(api.url_v2 + '/cfs/search').then(function(res){\r\n var data = res.data;\r\n //data.business_type_codes.sort(descSort);\r\n //business_type_codes = data.business_type_codes;\r\n\r\n //data.reason_codes.sort(descSort);\r\n //reason_codes = data.reason_codes;\r\n\r\n search_params = data.search_params;\r\n\r\n //data.service_level_codes.sort(descSort);\r\n //service_level_codes = data.service_level_codes;\r\n\r\n function descSort(a, b) {\r\n return a.description < b.description ? -1 : (a.description > b.description ? 1 : 0);\r\n }\r\n hasLoadedSearchValues = true;\r\n });\r\n return promise;\r\n },\r\n hasLoadedSearchValues: function() {\r\n return hasLoadedSearchValues;\r\n },\r\n //getBusinessTypeCodes: function(){\r\n // return business_type_codes;\r\n //},\r\n //getReasonCodes: function(){\r\n // return reason_codes;\r\n //},\r\n getSearchParams: function(){\r\n return search_params;\r\n },\r\n getChips: function(){\r\n return searchFieldChips;\r\n },\r\n //getServiceLevelCodes: function(){\r\n // return service_level_codes;\r\n //},\r\n getCurrentSearchFields: function() {\r\n return currentSearchFields;\r\n },\r\n getIsFirstSearch: function() {\r\n return isFirstSearch;\r\n },\r\n setIsFirstSearch: function(first) {\r\n isFirstSearch = first;\r\n },\r\n getCurrentSearch: function(){\r\n return query;\r\n },\r\n setCurrentSearchFields: function(searchFields, disableUrlReplacement, advSearch) {\r\n\r\n var searchDelDate=searchFields.deliverydate_date_equal_to.value;\r\n var searchShippDueDate=searchFields.duedate_date_equal_to.value;\r\n var searchDeliveryDate=searchFields.estimateddelivery_date_equal_to.value;\r\n\r\n if(searchShippDueDate!=\"\"){\r\n var date = new Date(searchShippDueDate).toDateString();\r\n var convDueDate = date.slice(4);\r\n searchFields.duedate_date_equal_to.value=convDueDate;\r\n\r\n } if(searchDelDate!=\"\"){\r\n var date = new Date(searchDelDate).toDateString();\r\n var convDelDate = date.slice(4);\r\n searchFields.deliverydate_date_equal_to.value=convDelDate;\r\n\r\n } if(searchDeliveryDate!=\"\"){\r\n var date = new Date(searchDeliveryDate).toDateString();\r\n var conDeliveryDate = date.slice(4);\r\n searchFields.estimateddelivery_date_equal_to.value=conDeliveryDate;\r\n }\r\n\r\n for (var field in searchFields){\r\n\r\n try{\r\n currentSearchFields[field].value = searchFields[field].value;\r\n }\r\n catch(e){}\r\n\r\n }\r\n var search = angular.copy(currentSearchFields);\r\n\r\n saveLastSearchLocally(search);\r\n if (!disableUrlReplacement) {\r\n setUrl();\r\n }\r\n if(!advSearch)\r\n updateQuery();\r\n generateChips();\r\n //setUrl();\r\n\r\n },\r\n setClickedChip: function(chip) {\r\n for (var field in currentSearchFields){\r\n if (field === chip.key){\r\n currentSearchFields[field].focus = true;\r\n }\r\n }\r\n },\r\n removeChip: function(chip) { //remove chip from current searchFields\r\n\r\n if (chip.key === 'quick_filter'){\r\n currentSearchFields[chip.key].value = [];\r\n } else if(currentSearchFields[chip.key]) {\r\n currentSearchFields[chip.key].value = \"\";\r\n }\r\n updateQuery();\r\n saveLastSearchLocally();\r\n setUrl();\r\n\r\n },\r\n getSearchFieldsFocus: function() {\r\n return searchFieldsFocus;\r\n },\r\n saveLastSearchLocally: saveLastSearchLocally,\r\n removeTimeZoneInPickUp: removeTimeZoneInPickUp,\r\n removeCloseMarkInChips:removeCloseMarkInChips,\r\n modifySearch: function(){\r\n return modifySearchVal;\r\n },\r\n\r\n getLastSearchLocally: function() {\r\n return localStorage.getItem(\"lastCfsSearch\");\r\n }\r\n };\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.cancel\r\n * @description method that cancels the advance search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.search\r\n * @description method that button action for when the user clicks search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.saveToDefault\r\n * @description method that saves the current form to default\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.loadDefault\r\n * @description method that loads the saved default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.clearDefault\r\n * @description method that clears the saved default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getReasonCodes\r\n * @description method that returns a list of codes from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getServiceLevels\r\n * @description method that returns a list of service levels from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getBusinessTypes\r\n * @description method that returns a list of business types from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.resetForm\r\n * @description method that resets the advance search form\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.chipClicked\r\n * @description sets the search fields in AdvSearchCfsService based on the chip clicked\r\n * @param {chip} - the chip that was clicked\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceControzller.chipRemoved\r\n * @description removes the search field from advance search and re-runs the query\r\n * @param {chip} - the chip that was removed\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.generateChips\r\n * @description generates the chips from the AdvSearchCfsService's currentSearchFields and shows them in the view\r\n * @param {searchFields} - the searchFields to generate the chips from\r\n */\r\n(function() {\r\n 'use strict';\r\n\r\n var multiplepillseperator =\" , \"\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .filter('underscoreless', function () {\r\n return function (input) {\r\n if(input != undefined)\r\n return input.replace(/_/g, ' ');\r\n else\r\n return input;\r\n };\r\n })\r\n .filter('removeTimeZone', function () {\r\n return function (input) {\r\n if(input != undefined){\r\n\r\n if(input.toLowerCase().includes('and')){\r\n\r\n var timeList = input.split(\"and\");\r\n\r\n var remove_ist1 = timeList[0].split(\" \");\r\n var remove_ist2 = timeList[1].split(\" \");\r\n\r\n remove_ist1 = remove_ist1.filter(function(e){return e});\r\n remove_ist2 = remove_ist2.filter(function(e){return e});\r\n\r\n var pickupTime1 = remove_ist1[0]+' '+remove_ist1[1];\r\n\r\n var pickupTime2 = remove_ist2[0]+' '+remove_ist2[1];\r\n\r\n input = pickupTime1+' and '+pickupTime2;\r\n\r\n } else{\r\n\r\n var remove_ist = input.split(\" \");\r\n var pickupTime = remove_ist[0]+' '+remove_ist[1];\r\n\r\n input = pickupTime;\r\n\r\n }\r\n\r\n return input;\r\n }\r\n else{\r\n return input;\r\n }\r\n };\r\n })\r\n\r\n .filter('advSearchSpaceRemove', function () {\r\n return function (input) {\r\n if(input != undefined){\r\n\r\n var a = input.replace(/ /g,'');\r\n input = a.split(',').join(' , ');\r\n\r\n return input;\r\n }\r\n else{\r\n return input;\r\n }\r\n };\r\n })\r\n\r\n .filter('capitalize', function() {\r\n return function(input){\r\n if(input != undefined) {\r\n input = input.toString();\r\n if(input == \"awb bol\") { input = \"awb/bol\";}\r\n\r\n //var serviceLevel =\r\n //{ \"HOT\": \"Hot Shot Service\",\r\n // \"IPRI\": \"International Priority Service\",\r\n // \"NFO\":\"Next Flight Out\",\r\n // \"ISTD\": \"International Standard Service\",\r\n // \"3DAY\": \"3rd Day\",\r\n // \"2DAY\": \"2nd Day\",\r\n // \"NDAM\": \"Next Day AM By Commitment Time\",\r\n // \"NDPM\": \"Next Day PM By Commitment Time\",\r\n // \"2DAM\": \"2nd Day AM By Commitment Time\",\r\n // \"2DPM\": \"2nd Day PM By Commitment Time\",\r\n // \"ECO\":\"Economy Service\",\r\n // \"3DAM\": \"3rd Day AM By Commitment Time\",\r\n // \"3DPM\": \"3rd Day PM by Commitment Time\",\r\n // \"DEFR\": \"Deferred Service\",\r\n // \"TKLD\": \"Truckload Service Level\",\r\n // \"LCL\":\"LCL Ocean Freight\",\r\n // \"IECO\": \"International Economy Service\",\r\n // \"PROJ\": \"Projects Charters\",\r\n // \"CSTBKR\": \"Customs Brokerage\",\r\n // \"4TH\":\"4th Day Service\",\r\n // \"5TH\":\"5th Day Service\",\r\n // \"OCN\":\"Ocean Freight\",\r\n // \"NDR\":\"Next Day Regular\",\r\n // \"INVOICE\": \"Invoice Only\",\r\n // \"LOCAL\": \"Local Pick Up and Delivery\"\r\n //};\r\n\r\n //var reasoncode = { \"OTPACT\" : \"Force Majeure\",\r\n // \"OTPAPT\": \"Appointment\",\r\n // \"OTPCAO\": \"Cargo Aircraft Only\",\r\n // \"OTPCAR\": \"Air/Sea Carrier Failure\",\r\n // \"OTPCEC\": \"Civic Event Closures\",\r\n // \"OTPCIV\": \"Civil Unrest\",\r\n // \"OTPCON\": \"Client Requested Consolidation\",\r\n // \"OTPCST\": \"Client Related\",\r\n // \"OTPCUS\": \"Customs Delay\",\r\n // \"OTPCUT\": \"Shipped After Cut\",\r\n // \"OTPDRP\": \"Trailer Dropped/Pending Unload\",\r\n // \"OTPGND\": \"Ground Carrier Failure\",\r\n // \"OTPHOL\": \"Holiday\",\r\n // \"OTPMIS\": \"Misrouted\",\r\n // \"OTPMPU\": \"Missed Pickup\",\r\n // \"OTPNFO\": \"Next Flight Out\",\r\n // \"OTPPCK\": \"Insufficient Packaging of Cargo\",\r\n // \"OTPPCON\": \"Port Congestion\",\r\n // \"OTPPRO\": \"Procedural Error\",\r\n // \"OTPREF\": \"Refused by Consignee\",\r\n // \"OTPRRH\": \"Restricted Receiving Hours\",\r\n // \"OTPSEC\": \"Security Delay\",\r\n // \"OTPUDO\": \"Documentation Delay\",\r\n // \"OTPWHS\": \"Warehouse Delay\",//\r\n// \"OTPWX\":\"Weather Related Delay\" };\r\n\r\n\r\n\r\n\r\n\r\n if(input.indexOf(' ') !== -1){\r\n var inputPieces, i;\r\n\r\n input = input.toLowerCase();\r\n inputPieces = input.split(' ');\r\n //// console.log(input.toUpperCase());\r\n\r\n\r\n for(i = 0; i < inputPieces.length; i++){\r\n\r\n if(reasoncode[inputPieces[i].toUpperCase()] ){\r\n if(inputPieces[i] != multiplepillseperator)\r\n {\r\n // + sign will be discared for conversion\r\n inputPieces[i] = reasoncode[inputPieces[i].toUpperCase()];\r\n }\r\n //input = data.split(' ');\r\n }else if(serviceLevel[inputPieces[i].toUpperCase()]){\r\n if(inputPieces[i] != multiplepillseperator)\r\n {\r\n // + sign will be discared for conversion\r\n inputPieces[i] = serviceLevel[inputPieces[i].toUpperCase()];\r\n }\r\n } else if(inputPieces[i] !='is' && inputPieces[i] !='less' && inputPieces[i] !='greater' && inputPieces[i] !='than'){\r\n if(inputPieces[i] !=\"id\"){\r\n inputPieces[i] = capitalizeString(inputPieces[i]);\r\n if(inputPieces[i] ==\"Equal\"){\r\n inputPieces[i+1] +=\" =\";\r\n }\r\n\r\n } else{\r\n inputPieces[i] = inputPieces[i].toUpperCase();\r\n }\r\n\r\n }else{\r\n if(inputPieces[i] =='than'){\r\n inputPieces[i] += (inputPieces[i-1] == \"greater\") ? \" >\" :\" <\" ;\r\n }\r\n }\r\n\r\n\r\n }\r\n\r\n return inputPieces.join(\" \");\r\n }\r\n else {\r\n input = input.toLowerCase();\r\n\r\n\r\n if(reasoncode[input.toUpperCase()]){\r\n input = reasoncode[input.toUpperCase()];\r\n //input = data.split(' ');\r\n }else if(serviceLevel[input.toUpperCase()]){\r\n input = serviceLevel[input.toUpperCase()];\r\n }\r\n\r\n if(input == \"bol1\"){\r\n input = input.toUpperCase()+\" #\";\r\n }\r\n\r\n if(input == 'reference'){\r\n input = \"Ref #\";\r\n }\r\n\r\n if( input == 'invoice'|| input == 'consol' || input == 'container'){\r\n input +=\" #\";\r\n }\r\n return capitalizeString(input);\r\n }\r\n }else{\r\n return input;\r\n }\r\n };\r\n function capitalizeString(inputString){\r\n if(inputString == 'n/a'){\r\n inputString = 'N/A';\r\n }\r\n return inputString.substring(0,1).toUpperCase() + inputString.substring(1);\r\n }\r\n })\r\n .controller('AdvSearchCfsController', AdvSearchCfsController);\r\n\r\n\r\n\r\n /** @ngInject */\r\n AdvSearchCfsController.$inject = ['$log', '$rootScope', 'UserService', 'AdvSearchCfsService', '$translatePartialLoader', '$mdBottomSheet', '$mdDialog', '$mdMedia','$filter', '$scope', '$timeout', '$location', '$q', '$http', 'api', 'permissions', 'TrackTraceCfsPaginationService', 'ServerTableCfsService','$state'];\r\n function AdvSearchCfsController($log, $rootScope, UserService, AdvSearchCfsService, $translatePartialLoader, $mdBottomSheet, $mdDialog, $mdMedia, $filter, $scope, $timeout, $location, $q, $http, api, permissions, TrackTraceCfsPaginationService, ServerTableCfsService,$state) {\r\n $translatePartialLoader.addPart('tracktrace');\r\n //variables\r\n var vm = this;\r\n var INVALID_DATE = \"Invalid date\";\r\n $scope.addAllBtnShow = false;\r\n vm.modifySearch=false;\r\n\r\n //set the searchFields to be the current searchFields\r\n vm.searchFields = convertStatusFieldToString(angular.copy(AdvSearchCfsService.getCurrentSearchFields()));\r\n vm.searchText;\r\n vm.selectedItem;\r\n vm.chipSearchFields = AdvSearchCfsService.getChips();\r\n\r\n if (!AdvSearchCfsService.hasLoadedSearchValues()) {\r\n AdvSearchCfsService.getSearch();\r\n }\r\n vm.isSavedSearch = AdvSearchCfsService.getIsSavedSearch();\r\n vm.minDate = \"'\" + (moment().subtract(13, 'months').format('YYYY-MM-DD')) + \"'\";\r\n\r\n // Quarter math\r\n var quarterAdjustment= (moment().month() % 3) + 1;\r\n var lastQuarterEndDate = moment().subtract({ months: quarterAdjustment }).endOf('month');\r\n var lastQuarterStartDate = lastQuarterEndDate.clone().subtract({ months: 2 }).startOf('month');\r\n\r\n\r\n vm.autocomplete = autocomplete;\r\n vm.addOneMoreDay = addOneMoreDay;\r\n vm.subtractOneDay = subtractOneDay;\r\n vm.cancel = cancel;\r\n //vm.getBusinessTypes = getBusinessTypes;\r\n //vm.getReasonCodes = getReasonCodes;\r\n //vm.getServiceLevels = getServiceLevels;\r\n vm.resetForm = resetForm;\r\n vm.saveToDefault = saveToDefault;\r\n vm.loadDefault = loadDefault;\r\n vm.clearDefault = clearDefault;\r\n vm.search = search;\r\n vm.selectClear = selectClear;\r\n vm.showAdvSearch = showAdvSearch;\r\n vm.chipClicked = chipClicked;\r\n vm.chipRemoved = chipRemoved;\r\n vm.showListBottomSheet = showListBottomSheet;\r\n vm.resetSearch = resetSearch;\r\n vm.newSearch = newSearch;\r\n vm.dateItemOrNot = dateItemOrNot;\r\n vm.checkrangeOrNot = checkrangeOrNot;\r\n vm.clearFlags = clearFlags;\r\n vm.searchdata = null;\r\n vm.getMatches = getMatches;\r\n vm.searchValue = '';\r\n vm.clearValues = clearValues;\r\n /*Added by Abheesh*/\r\n vm.ttSearch = ttSearch;\r\n vm.advSearch = advSearch;\r\n vm.ttSearchFlag = undefined;\r\n vm.clearSearch = clearSearch;\r\n vm.chipData = [];\r\n vm.chipTempRemoved = chipTempRemoved;\r\n vm.formClick = formClick;\r\n vm.array_unique = array_unique;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n var currentFields = AdvSearchCfsService.getCurrentSearchFields();\r\n //// console.log(currentFields);\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n //// console.log(currentFields[field].value);\r\n if(currentFields[field].value !== null && currentFields[field].value != ''){\r\n\r\n vm.chipData.push(currentFields[field]);\r\n\r\n }\r\n }\r\n\r\n callingToRemoveCrossIConInChips(vm.chipSearchFields, 'onload'); \r\n\r\n vm.shipment = {\r\n\r\n \"status\":\r\n [\"planned\", \"at_pickup\", \"loaded\", \"at_consignee\", \"delivered\", \"undelivered\"],\r\n\r\n /*\"milestone\":\r\n [\"open\",\"covered\",\"pickup\", \"dispatched\", \"loaded\",\"consignee\", \"delivered\"],*/\r\n\r\n \"invoice_total\":\r\n [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"gross_weight\":\r\n [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"total_pieces\":\r\n [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n\r\n \"equipment_type\":\r\n [\"CONESTOGA\", \"CARGO VAN\", \"DOUBLE DROP\", \"CONTAINER DRAYAGE\", \"FLATBED\", \"FLATBED - TEAM\", \"LOWBOY\", \"LESS THAN TRUCKLOAD\", \"PARTIAL\", \"POWER ONLY\",\r\n \"REEFER\", \"REMOVABLE GOOSENECK\", \"REEFER - TEAM\", \"STRAIGHT TRUCK\", \"STEP DECK OR DROP DECK\", \"SPOT SHIPMENT\", \"STRETCH TRAILER\", \"STORAGE WAREHOUSING\",\r\n \"SPRINTER VAN\", \"TRUCK ORDERED NOT USED\", \"VAN - DRY\", \"VAN - TEAM\", \"VAN - INTERMODAL\", \"VAN OR REEFER\", \"TRANSLOADING HANDLING\", \"YARD MULE\"],\r\n // [\"Other\",\"N/A\",\"20C\",\"40C\",\"53R\",\"BT12\",\"BT16\",\"BT20\",\"BT24\",\"BT8\",\"CVN\",\"DD\",\"DROP\",\"F\",\"F48\",\"F53\",\r\n // \"GN28\",\"GN40\",\"GNFL\",\"PICK\",\"PO\",\"PVAN\",\"R\",\"SB12\",\"SB16\",\"SB20\",\"SB24\",\"SB8\",\"SD\",\"STOR\",\"V\",\r\n // \"V48\",\"V53\",\"WINC\"],\r\n\r\n // Shipment Types\r\n \"type\":\r\n [\"TL\",\"LOCAL\",\"LTL\"],\r\n //[\"FTL\",\"LTL\",\"INTERMODAL\"],\r\n\r\n \"revenue_code\":\r\n [\"HOT SHOT\",\"BROKERAGE\",\"SCHEDULED-NON LOCAL\",\"TRUCKLOAD\",\"TRAILER DROP\",\"REGULAR\",\r\n \"SPECIAL\",\"DIRECT\",\"RIG DOWN\",\"SCHEDULED (LOCAL)\",\"CONSOLIDATED\",\"RETURN TRIP\",\"SITE WORK\",\r\n \"CARTAGE\",\"DEDICATED\",\"LESS THAN TRUCKLOAD\",\"NATIONAL LTL NETWORK\"],\r\n\r\n \"is_bookmarked\":\r\n [\"yes\",\"no\"],\r\n\r\n \"consignee_reference\":null,\r\n\r\n \"pro\":null,\r\n\r\n \"bol\":null,\r\n\r\n \"reference\":null,\r\n\r\n \"load\":null,\r\n\r\n \"container\":null,\r\n\r\n \"pickup_date\": [\"equal_to\",\"range_to\"],\r\n\r\n \"pickup_time\": [\"equal_to\",\"range_to\"],\r\n\r\n \"deliveryeta_date\": [\"equal_to\",\"range_to\"],\r\n\r\n \"mustship_date\": [\"equal_to\",\"range_to\"],\r\n\r\n \"mustdeliver_date\": [\"equal_to\",\"range_to\"],\r\n\r\n \"origin\":\r\n [\"state\",\"city\"],\r\n\r\n \"destination\":\r\n [\"state\", \"city\"]\r\n\r\n };\r\n\r\n vm.pickup = [\"name\",\"contact_name\",\"street_address\",\"state\",\"city\",\"zip\",\"phone\"];\r\n\r\n vm.consignee = [\"name\",\"contact_name\",\"street_address\",\"state\",\"city\",\"zip\",\"phone\"];\r\n\r\n $scope.notSorted = function(obj){\r\n if (!obj) {\r\n return [];\r\n }\r\n return Object.keys(obj);\r\n }\r\n\r\n $scope.checkValue = function(key){\r\n // $scope.selectedSearch = key;\r\n return vm.shipment[key];\r\n }\r\n\r\n\r\n function getMatches(key, searchText){\r\n //// console.log(key +\" getMatches() \"+searchText);\r\n var query = {field: key, value: searchText}\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/aljex_autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n //// console.log(d);\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n var contains = function(needle) {\r\n // Per spec, the way to identify NaN is that it is not equal to itself\r\n var findNaN = needle !== needle;\r\n var indexOf;\r\n\r\n if(!findNaN && typeof Array.prototype.indexOf === 'function') {\r\n indexOf = Array.prototype.indexOf;\r\n } else {\r\n indexOf = function(needle) {\r\n var i = -1, index = -1;\r\n\r\n for(i = 0; i < this.length; i++) {\r\n var item = this[i];\r\n\r\n if((findNaN && item !== item) || item === needle) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n };\r\n }\r\n\r\n return indexOf.call(this, needle) > -1;\r\n };\r\n\r\n vm.searchValueFlag = false;\r\n function ttSearch(search){\r\n vm.inputRangeFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = false;\r\n vm.timeInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n vm.textFieldData = undefined;\r\n vm.dateInputFlag =false;\r\n vm.searchValue = '';\r\n vm.nextElem = \"\";\r\n vm.ttserchdata = search;\r\n // vm.thirdChildFlg = 100;\r\n search = search.toLowerCase();\r\n search = search.replace(/_/g, ' ');\r\n vm.ttserchdataNew = search.replace(/mode/g,'business type').replace(/reason code/g,'exception');\r\n search = search.split(\" \");\r\n //// console.log(search[0]);\r\n if('shipment'.includes(search[0])){ vm.ttSearchFlag = 1;vm.nextElem=\"shipment\";}\r\n if('pickup'.includes(search[0])){ vm.ttSearchFlag = 2; vm.nextElem=\"pickup\";}\r\n //if('shipper'.includes(search[0])){ vm.ttSearchFlag = 3; vm.nextElem=\"shipper\";}\r\n if('consignee'.includes(search[0])){ vm.ttSearchFlag = 3;vm.nextElem=\"consignee\";}\r\n\r\n if(search[0] == 'shipment'){\r\n\r\n vm.ttSearchFlag = 1;\r\n if(search.length > 1){\r\n var breakFlag = false;\r\n //// console.log(search);\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n if(!breakFlag){\r\n\r\n if(key.includes(search[1])){\r\n\r\n if(key == 'equipment_type' && search[1] == 'type'){\r\n vm.secondChildFlg = 1000;\r\n }else{\r\n\r\n\r\n if(search[1] == 'reference')\r\n key = search[1];\r\n //console.log(key);\r\n\r\n if(search[1] == 'pickup' && search[2] == 'time' ){\r\n key = 'pickup_time';\r\n }\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+key;\r\n breakFlag = true;\r\n if(contains.call(['invoice','ref','consol','total','reference'], search[1])){\r\n\r\n var temStrOne= \"reference\";\r\n if(temStrOne.includes(search[1]) && search[1] == 'reference'){\r\n vm.secondChildFlg = 'reference';\r\n }\r\n var temStrOne= \"total\";\r\n if(temStrOne.includes(search[1]) && search[2] == 'pieces'){\r\n vm.secondChildFlg = 'total_pieces';\r\n }\r\n var temStr= \"total\";\r\n if(!temStr.includes(search[2]) && search[1] == 'invoice'){\r\n vm.secondChildFlg = 'invoice';\r\n vm.nextElem = search[0]+' invoice';\r\n }\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[2];\r\n vm.thirdChildFlg = 100;\r\n }\r\n if(key == 'reason_code' || key =='service_level'){\r\n vm.openInputFlag = true;\r\n vm.shipmentOpenInputFlag=true;\r\n }\r\n if(key == 'lane_pair'){\r\n vm.searchValue = search[3];\r\n vm.openInputFlag = true;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.timeInputFlag = false;\r\n vm.dateInputFlag =false;\r\n }\r\n if(key == 'awb_bol'){\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[3];\r\n }\r\n if(key == 'awb' || key == 'bol'){\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[2];\r\n vm.secondChildFlg = 'bol';\r\n vm.ttserchdata = search[0]+' bol';\r\n }\r\n if(key == 'estimateddelivery_date'){\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[6];\r\n vm.shipmentOpenInputFlag = false;\r\n vm.dateInputFlag = true;\r\n }\r\n if(key == 'shipdate_date' || key == 'duedate_date' || key == 'deliverydate_date'\r\n || key == 'pickup_date' || key == 'deliveryeta_date' || key == 'mustship_date'\r\n || key == 'mustdeliver_date' || key == 'mustdeliver_date'){\r\n vm.openInputFlag = true;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.dateInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n if(key == 'pickup_time'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = true;\r\n }\r\n if(key == 'equipment_type'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n if(key == 'type'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n if(key == 'revenue_code'){\r\n vm.dateInputFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n vm.timeInputFlag = false;\r\n }\r\n\r\n }\r\n\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n if(!breakFlag){\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n\r\n if(!breakFlag){\r\n if((key == search[1]+\"_\"+search[2]) || (key.includes(search[1]))){\r\n //// console.log(key);\r\n vm.nextElem = search[0]+' '+search[1]+' '+key;\r\n vm.secondChildFlg = key;\r\n\r\n breakFlag = true;\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n if(breakFlag == false){\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n if(!breakFlag){\r\n if((key == search[1]+\"_\"+search[2]+\"_\"+search[3]) || (key.includes(search[1]))){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+search[2]+' '+key;\r\n breakFlag = true;\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n if(search.length > 2){\r\n\r\n var breakFlag = false;\r\n angular.forEach(vm.shipment[vm.secondChildFlg],function(ship,key){\r\n\r\n if(!breakFlag){\r\n if((ship == search[2]) || (ship.includes(search[2]))){\r\n vm.thirdChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+ship;\r\n // if(ship == 'sea'||ship =='air'||ship=='land'){\r\n vm.shipmentOpenInputFlag = true;\r\n // vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n // vm.searchValue = search[2];\r\n //}\r\n\r\n breakFlag = true;\r\n }else{\r\n vm.thirdChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n if(search.length > 3){\r\n\r\n var breakFlag = false;\r\n var remainingText=\"\";\r\n var limit = search.length;\r\n //// console.log(contains.call(['than','to','range'], search[search.length-1]));\r\n if(contains.call(['than','to','range', 'is'], search[search.length-1]) == false){\r\n limit -= 1;\r\n }\r\n var breakRemaining = false;\r\n for(var i=3;i<limit;i++){\r\n if(!breakRemaining){\r\n if(search[i] != 'date' && search[i] != 'time'){\r\n remainingText +=search[i];\r\n\r\n if(remainingText == \"range\"){\r\n if(search[i+1] != 'to')\r\n breakRemaining = i;\r\n }else if(i+1 != limit ){remainingText +=\"_\";}\r\n }\r\n }\r\n\r\n }\r\n if(search.length == 4 && limit == 3){\r\n remainingText = search[3];\r\n }\r\n\r\n angular.forEach(vm.shipment[vm.secondChildFlg],function(ship,key){\r\n\r\n if(remainingText == 'is' && limit < search.length){\r\n remainingText +=\"_\"+search[ search.length-1];\r\n }\r\n if(!breakFlag && !(search.length == 4 && search[2].includes('delivery'))){\r\n\r\n if((ship == remainingText) || (ship.includes(remainingText))){\r\n vm.thirdChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+search[2]+' '+ship;\r\n breakFlag = true;\r\n if(contains.call(['ontime','delayed','yes','no'], ship)){\r\n\r\n vm.shipmentOpenInputFlag = true;\r\n vm.openInputFlag = true;\r\n\r\n }\r\n if(contains.call(['is_less_than','is_greater_than','range','equal_to', 'range_to'], remainingText)){\r\n\r\n vm.searchValue = search[limit];\r\n vm.thirdChildFlg = key;\r\n if(ship.includes('range')){\r\n vm.inputRangeFlag = true;\r\n //if(breakRemaining == false){breakRemaining = limit;}\r\n vm.searchValue2 = search[breakRemaining+2];\r\n vm.searchValue = search[breakRemaining+1];\r\n }\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n\r\n //// console.log(vm.ttserchdata);\r\n\r\n if(search.length == 6 && search[1] ==\"expected\")\r\n {\r\n //In Shipment -> Expected Delivery date\r\n vm.textFieldData = \"shipment\"+\" \"+search[1]+\"_\"+search[2]+\"_\"+search[3]+\" \"+ remainingText;\r\n }\r\n else\r\n {\r\n //in Shipment -> Due date, etc\r\n vm.textFieldData = \"shipment\"+\" \"+search[1]+\"_\"+search[2]+\" \"+remainingText;\r\n }\r\n\r\n // vm.inputRangeFlag = true;\r\n\r\n }\r\n }else{\r\n vm.thirdChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n else if(search[0] == 'pickup'){\r\n vm.ttSearchFlag = 2;\r\n if(search.length > 1){\r\n var index = contains.call(vm.pickup, search[1]);\r\n\r\n angular.forEach(vm.pickup, function(data,key){\r\n if(data.includes(search[1])){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+ data;\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n if(data !=\"street_address\" && data !='party_id'){\r\n vm.searchValue = search[2];\r\n }else{\r\n //vm.searchValue = search[3];\r\n vm.searchValue =\"\";\r\n for(var i=3; i<search.length; i++){\r\n vm.searchValue += search[i] +' ';\r\n }\r\n }\r\n }\r\n });\r\n\r\n if(index == true){\r\n vm.secondChildFlg = vm.pickup.indexOf(search[1]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n\r\n }else{\r\n //vm.secondChildFlg = 1000;\r\n if(search.length >2){\r\n var index = contains.call(vm.pickup, search[1]+\"_\"+search[2]);\r\n if(index == true){\r\n vm.secondChildFlg = vm.pickup.indexOf(search[1]+\"_\"+search[2]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n // vm.searchValue = search[3];\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }\r\n\r\n }\r\n }\r\n else if(search[0] == 'consignee'){\r\n vm.ttSearchFlag = 3;\r\n if(search.length > 1){\r\n var index = contains.call(vm.consignee, search[1]);\r\n\r\n angular.forEach(vm.consignee, function(data,key){\r\n if(data.includes(search[1])){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+ data;\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n if(data !=\"street_address\" && data !='party_id'){\r\n vm.searchValue = search[2];\r\n }else{\r\n //vm.searchValue = search[3];\r\n vm.searchValue =\"\";\r\n for(var i=3; i<search.length; i++){\r\n vm.searchValue += search[i] +' ';\r\n }\r\n }\r\n }\r\n });\r\n\r\n if(index == true){\r\n vm.secondChildFlg = vm.consignee.indexOf(search[1]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n\r\n }else{\r\n //vm.secondChildFlg = 1000;\r\n if(search.length >2){\r\n var index = contains.call(vm.consignee, search[1]+\"_\"+search[2]);\r\n if(index == true){\r\n vm.secondChildFlg = vm.consignee.indexOf(search[1]+\"_\"+search[2]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n // vm.searchValue = search[3];\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }\r\n\r\n }\r\n }else {\r\n vm.ttSearchFlag = 0;\r\n }\r\n\r\n }\r\n\r\n\r\n angular.element(document).ready(function () {\r\n var el;\r\n AdvSearchCfsService.removeCloseMarkInChips(vm.chipSearchFields, 'onload');\r\n vm.modifySearch=AdvSearchCfsService.modifySearch();\r\n angular.forEach(vm.searchFields, function(field){\r\n if (field.focus){\r\n $timeout(function() {\r\n el = angular.element(document.querySelector(\"#\"+field.field));\r\n el.focus();\r\n if(el[0] && el[0].value != null) { //in place becasue mg-datepickers don't have a value\r\n el[0].setSelectionRange(0, el[0].value.length);\r\n }\r\n }, 1000);\r\n }\r\n });\r\n });\r\n\r\n function dateItemOrNot(keyItem){\r\n vm.dateInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n\r\n var index = keyItem.search('date');\r\n if(index>=0){\r\n vm.dateInputFlag = true;\r\n }\r\n }\r\n\r\n\r\n\r\n function checkrangeOrNot(item){\r\n\r\n vm.inputRangeFlag = false;\r\n if(item == 'range'){\r\n vm.inputRangeFlag = true;\r\n }\r\n }\r\n\r\n function clearFlags(flag,searchdata){\r\n vm.nextElem =\"\";\r\n vm.textFieldData = undefined;\r\n vm.openInputFlag = false;\r\n vm.timeInputFlag = false;\r\n $scope.addAllBtnShow = false;\r\n vm.dateInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n //vm.secondChildFlg = 100;\r\n //vm.ttSearchFlag = undefined;\r\n vm.ttserchdata = undefined;\r\n vm.inputRangeFlag = false;\r\n vm.ttserchdataNew = searchdata;\r\n if(flag && searchdata){\r\n vm.ttSearchFlag = flag;\r\n vm.ttserchdata = searchdata;\r\n }\r\n }\r\n\r\n function clearValues(flag){\r\n if(flag == 'reason_code' || flag == 'service_level'){\r\n $scope.addAllBtnShow = true;\r\n }else{\r\n $scope.addAllBtnShow = false;\r\n }\r\n vm.searchValue = '';\r\n vm.searchValue2 = '';\r\n\r\n }\r\n\r\n\r\n\r\n function chipClicked(chip) {\r\n $log.debug('chip was clicked ' + chip.display);\r\n AdvSearchCfsService.setClickedChip(chip);\r\n showAdvSearch();\r\n }\r\n\r\n function chipRemoved(chip) {\r\n //// console.log(chip);\r\n $log.debug('remove chip ' + chip.title);\r\n AdvSearchCfsService.removeChip(chip);\r\n vm.searchFields[chip.key]['value'] ='';\r\n //vm.search({});\r\n }\r\n\r\n function chipTempRemoved(chip){\r\n //vm.chipData[chip.key]['value'] ='';\r\n //// console.log('test');\r\n //// console.log(chip.field);\r\n // AdvSearchCfsService.removeChip(chip);\r\n // var temp = convertedFields[field];\r\n // temp.key = convertedFields[field].field;\r\n // temp.searchField = convertedFields[field].value;\r\n // AdvSearchCfsService.removeChip(temp);\r\n //// console.log(vm.searchFields);\r\n //// console.log(vm.searchFields[chip.field]);\r\n vm.searchFields[chip.field]['value'] ='';\r\n }\r\n\r\n // Show the advanced search md-dialog\r\n\r\n function showAdvSearch(ev) {\r\n // var convertedFields = convertStatusFieldToString(angular.copy(AdvSearchCfsService.getCurrentSearchFields()));\r\n // // console.log(convertedFields);\r\n // for (var field in convertedFields) { //set the focus to false\r\n // convertedFields[field].focus = false;\r\n // if(convertedFields[field].value !== null && convertedFields[field].value != ''){\r\n\r\n // if(convertedFields[field].field == \"status\"){\r\n\r\n // if(convertedFields[field].value == 1){\r\n // convertedFields[field].value = \"Delivered\";\r\n // }else{\r\n // convertedFields[field].value = \"Undelivered\";\r\n // }\r\n // }\r\n // vm.chipData.push(convertedFields[field]);\r\n // // console.log(vm.chipData);\r\n // }\r\n // }\r\n\r\n var currentFields = AdvSearchCfsService.getCurrentSearchFields();\r\n\r\n /*if(currentFields.shipment_mode.value != \"\"){\r\n delete currentFields.business_type_group;\r\n }*/\r\n\r\n // code for between dates invalid issue after refresh\r\n\r\n if(currentFields.shipdate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.shipdate_date_range_to.value = localStorage.getItem('shipbetweendate');\r\n }\r\n\r\n if(currentFields.estimateddelivery_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.estimateddelivery_date_range_to.value = localStorage.getItem('expectedbetweendate');\r\n }\r\n\r\n if(currentFields.deliverydate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.deliverydate_date_range_to.value = localStorage.getItem('deliveredbetweendate');\r\n }\r\n\r\n if(currentFields.duedate_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.duedate_date_range_to.value = localStorage.getItem('duebetweendate');\r\n }\r\n\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n //// console.log(currentFields[field].value);\r\n\r\n\r\n if(currentFields[field].value !== null && currentFields[field].value != ''){\r\n\r\n\r\n if(currentFields[field].field == \"milestone\"){\r\n\r\n var status_arr = currentFields[field].value.split(/[\\s,]+/);\r\n\r\n if (status_arr.length > 1 ){\r\n\r\n currentFields[field].value = get_array_status(status_arr, \"string\")\r\n }\r\n else {\r\n currentFields[field].value = get_string_status_displaycontent(currentFields[field].value)\r\n }\r\n }\r\n\r\n if(currentFields[field].field == \"shipment_status\"){\r\n currentFields[field].value = get_status_original_value(currentFields[field].value);\r\n }\r\n\r\n vm.chipData.push(currentFields[field]);\r\n\r\n var ids = [];\r\n\r\n //// console.log(vm.chipData);\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/advanced-search/cfs/adv-search-form.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n\r\n\r\n\r\n }, function() {\r\n\r\n var currentFields = AdvSearchCfsService.getCurrentSearchFields();\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n //// console.log(currentFields[field].value);\r\n\r\n\r\n }\r\n });\r\n callingToRemoveCrossIConInChips(vm.chipSearchFields, 'onload');\r\n }\r\n\r\n function resetSearch(){\r\n\r\n var params = {}, searchFields = angular.copy(AdvSearchCfsService.getEmptySearchFields());\r\n for (var field in $location.search()){\r\n //// console.log('test params');\r\n if (!(field in searchFields)){\r\n params[field] = $location.search()[field];\r\n }\r\n }\r\n $location.search(params)\r\n AdvSearchCfsService.setCurrentSearchFields(searchFields);\r\n //Added by Abheesh\r\n vm.searchFields = searchFields;\r\n vm.modifySearch=false;\r\n $rootScope.$broadcast('cleared_quicksearch',true);\r\n }\r\n\r\n function selectClear(e) {\r\n var focused = document.getElementsByClassName('md-input-focused');\r\n angular.element(focused).removeClass('md-input-focused');\r\n }\r\n\r\n function showListBottomSheet() {\r\n $mdBottomSheet.show({\r\n templateUrl: '/app/advanced-search/adv-search-actions.html',\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n //converts the status field\r\n function convertStatusFieldToString(field) {\r\n switch(field.milestone.value) {\r\n case '0':\r\n field.milestone.value = 'open';\r\n break;\r\n case '1':\r\n field.milestone.value = 'covered';\r\n break;\r\n case '2':\r\n field.milestone.value = 'pickup';\r\n break;\r\n case '3':\r\n field.milestone.value = 'dispatched';\r\n break;\r\n case '4':\r\n field.milestone.value = 'loaded';\r\n break;\r\n case '5':\r\n field.milestone.value = 'consignee';\r\n break;\r\n case '6':\r\n field.milestone.value = 'delivered';\r\n break;\r\n\r\n }\r\n return field;\r\n }\r\n\r\n //convertst the status field\r\n function convertStatusFieldToInt(field) {\r\n switch(field.milestone.value) {\r\n case 'open':\r\n field.milestone.value = '0';\r\n break;\r\n case 'covered':\r\n field.milestone.value = '1';\r\n break;\r\n case 'pickup':\r\n field.milestone.value = '2';\r\n break;\r\n case 'dispatched':\r\n field.milestone.value = '3';\r\n break;\r\n case 'loaded':\r\n field.milestone.value = '4';\r\n break;\r\n case 'consignee':\r\n field.milestone.value = '5';\r\n break;\r\n case 'delivered':\r\n field.milestone.value = '6';\r\n break;\r\n\r\n }\r\n return field;\r\n }\r\n\r\n function autocomplete(field1, query, extraParamString){\r\n $log.debug(\"Value: \"+ query);\r\n return AdvSearchCfsService.autocomplete({field:field1, value: query}, extraParamString);\r\n }\r\n //cancels the advance search\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n //button action for when the user clicks search\r\n function search() {\r\n if(vm.ttSearchFlag == 2){\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n //// console.log(searchdata);\r\n //// console.log(vm.searchValue);\r\n vm.searchFields[\"customer\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n\r\n }\r\n var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n for (var field in convertedFields) { //set the focus to false\r\n convertedFields[field].focus = false;\r\n }\r\n AdvSearchCfsService.setCurrentSearchFields(convertedFields);\r\n\r\n //the search is then done in the track and trace controller\r\n $mdDialog.hide();\r\n }\r\n\r\n//Added by Abheesh\r\n function newSearch(isAddAll) {\r\n\r\n vm.nextElem =\"\";\r\n vm.ttserchdataNew = \"\";\r\n if(vm.ttSearchFlag == 1){\r\n\r\n if(vm.textFieldData !=undefined){\r\n vm.ttserchdata = vm.textFieldData;\r\n vm.textFieldData = undefined;\r\n }\r\n\r\n if(vm.searchValue != undefined){\r\n // // console.log('tested');\r\n var searchcontent = vm.ttserchdata.split(\" \");\r\n\r\n if (searchcontent[1] == \"pickup_time\" || searchcontent[1] == \"delivered_date\" ||searchcontent[1] == \"mustship_date\" || searchcontent[1] == \"mustdeliver_date\" ||\r\n searchcontent[1] == \"shipdate_date\" || searchcontent[1] == \"deliveryeta_date\" || searchcontent[1] == \"pickup_date\"){\r\n vm.ttserchdata = vm.ttserchdata+' '+vm.searchValue;\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n }\r\n else {\r\n if(/(Shipment equipment_type) (.*)/.test(vm.ttserchdata)) {\r\n var searched_eq_type = vm.ttserchdata.match(/(Shipment) (equipment_type) (.*)/)\r\n var searchdata = $.merge([searched_eq_type[1], searched_eq_type[2], searched_eq_type[3]], [ vm.searchValue] );\r\n }else if(/(Shipment revenue_code) (.*)/.test(vm.ttserchdata)) {\r\n var searched_eq_type = vm.ttserchdata.match(/(Shipment) (revenue_code) (.*)/)\r\n var searchdata = $.merge([searched_eq_type[1], searched_eq_type[2], searched_eq_type[3]], [ vm.searchValue] );\r\n } else {\r\n var searchdata = $.merge( vm.ttserchdata.split(\" \"), [ vm.searchValue] );\r\n }\r\n }\r\n // vm.ttserchdata = vm.ttserchdata+' '+vm.searchValue;\r\n }\r\n else {\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n }\r\n\r\n if(searchdata[1] == 'consol'){\r\n searchdata[2] = searchdata[2]+' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n if(searchdata[1] == 'ref'){\r\n searchdata[2] = +' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n\r\n var value1 = vm.searchValue.toString();\r\n var value2 = vm.searchValue2.toString();\r\n if(vm.dateInputFlag || vm.timeInputFlag){\r\n for(var key in vm.searchFields)\r\n if(searchdata[0].toLowerCase()==\"shipment\" &&\r\n (\r\n (searchdata[1].toLowerCase() ==\"delivered_date\" && key.includes(\"shipment_delivered_date\"))\r\n || (key.includes(\"shipment_mustship_date\") && searchdata[1].toLowerCase() ==\"mustship_date\" )\r\n || (key.includes(\"shipment_mustdeliver_date\") && searchdata[1].toLowerCase() ==\"mustdeliver_date\" )\r\n || (key.includes(\"shipdate_date\") && searchdata[1].toLowerCase() ==\"shipdate_date\")\r\n || (key.includes(\"shipment_deliveryeta_date\") && searchdata[1].toLowerCase() ==\"deliveryeta_date\")\r\n || (key.includes(\"shipment_pickup_date\") && searchdata[1].toLowerCase() ==\"pickup_date\")\r\n || (key.includes(\"shipment_pickup_time\") && searchdata[1].toLowerCase() ==\"pickup_time\")\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\"\r\n }\r\n //debugger;\r\n if(vm.shipment[vm.secondChildFlg][vm.thirdChildFlg] == 'range_to'){\r\n var date2 =' '+vm.searchValue2;\r\n\r\n date2 = date2.split(\" \");\r\n\r\n if(searchdata[1] == 'pickup_time'){\r\n //vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[7]+' '+searchdata[8]+' '+searchdata[9] + ' and ' + date2[5] +' '+date2[6]+' '+date2[7];\r\n\r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = moment(searchdata[3]+\" \"+searchdata[4]+\" \"+searchdata[5]+\" \"+searchdata[6]+\" \"+searchdata[7]+\" \"+searchdata[8]+\" \"+searchdata[9]).format('hh:mm A') + ' ' +timezone_symbol + ' and '+ moment(date2[1] +' '+date2[2] +' '+date2[3] +' '+date2[4] +' '+ date2[5] +' '+date2[6]+' '+date2[7]).format('hh:mm A') + ' '+timezone_symbol;\r\n\r\n }else{\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[4]+' '+searchdata[5]+' '+searchdata[6] + ' and ' + date2[2] +' '+date2[3]+' '+date2[4];\r\n }\r\n\r\n }else{\r\n\r\n if(searchdata[1] == 'pickup_time'){\r\n //vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[7]+\" \"+searchdata[8]+\" \"+searchdata[9];\r\n\r\n var timezone_name = moment.tz.guess();\r\n var timezone_symbol = moment.tz(new Date(), timezone_name).format('z');\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = moment(searchdata[3]+\" \"+searchdata[4]+\" \"+searchdata[5]+\" \"+searchdata[6]+\" \"+searchdata[7]+\" \"+searchdata[8]+\" \"+searchdata[9]).format('hh:mm A')+ ' ' +timezone_symbol;\r\n\r\n } else{\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[4]+' '+searchdata[5]+' '+searchdata[6];\r\n }\r\n\r\n //searchdata[4]+' '+searchdata[5]+' '+searchdata[6]\r\n }\r\n\r\n }else if(vm.inputRangeFlag){\r\n\r\n for(var key in vm.searchFields)\r\n\r\n if(searchdata[0].toLowerCase() == \"shipment\" &&\r\n (\r\n (key.includes(\"shipment_invoice_total\") && searchdata[1].toLowerCase() == \"invoice_total\") ||\r\n (key.includes(\"shipment_gross_weight\") && searchdata[1].toLowerCase() == \"gross_weight\") ||\r\n (key.includes(\"shipment_total_pieces\") && searchdata[1].toLowerCase() == \"total_pieces\")\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\";\r\n }\r\n\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString() +' - '+vm.searchValue2.toString();\r\n\r\n }\r\n\r\n else if(searchdata.length == 3 || (searchdata.length == 4 && searchdata[3]==\"\") ){\r\n\r\n // vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = searchdata[2];\r\n if(vm.searchValue != '' && searchdata[1] != \"milestone\"){\r\n if(vm.thirdChildFlg == 100)\r\n {\r\n add_multiple_values(\"shipment_\"+searchdata[1], searchdata[1])\r\n\r\n }\r\n else{\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString();\r\n }\r\n }else{\r\n if(searchdata[1] == \"milestone\"){\r\n\r\n if (vm.searchFields[\"milestone\"][\"value\"].length > 0){\r\n\r\n var status_arr = vm.searchFields[\"milestone\"][\"value\"].split(/[\\s,]+/);\r\n\r\n if (status_arr.includes(searchdata[2])){\r\n\r\n vm.searchFields[\"milestone\"][\"value\"] = get_array_status(status_arr, \"integer\") + '' ;\r\n\r\n }else{\r\n\r\n vm.searchFields[\"milestone\"][\"value\"] = get_array_status(status_arr, \"integer\") + multiplepillseperator + get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n\r\n }else{\r\n\r\n vm.searchFields[\"milestone\"][\"value\"] = get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n\r\n }else{\r\n\r\n if(searchdata[1] == \"equipment_type\"){\r\n\r\n if (vm.searchFields[\"shipment_equipment_type\"][\"value\"].length > 0){\r\n\r\n var status_arr = vm.searchFields[\"shipment_equipment_type\"][\"value\"].split(',');\r\n if (status_arr.includes(searchdata[2])){\r\n\r\n vm.searchFields[\"shipment_equipment_type\"][\"value\"] = get_array_status(status_arr, \"string\") + '' ;\r\n\r\n }else{\r\n vm.searchFields[\"shipment_equipment_type\"][\"value\"] = get_array_status(status_arr, \"string\") + multiplepillseperator + get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n }else{\r\n vm.searchFields[\"shipment_equipment_type\"][\"value\"] = get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n }\r\n else if(searchdata[1] == \"revenue_code\"){\r\n\r\n if (vm.searchFields[\"shipment_revenue_code\"][\"value\"].length > 0){\r\n\r\n var status_arr = vm.searchFields[\"shipment_revenue_code\"][\"value\"].split(',');\r\n if (status_arr.includes(searchdata[2])){\r\n\r\n vm.searchFields[\"shipment_revenue_code\"][\"value\"] = get_array_status(status_arr, \"string\") + '' ;\r\n\r\n }else{\r\n vm.searchFields[\"shipment_revenue_code\"][\"value\"] = get_array_status(status_arr, \"string\") + multiplepillseperator + get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n }else{\r\n vm.searchFields[\"shipment_revenue_code\"][\"value\"] = get_milestone_displaycontent(searchdata[2]);\r\n }\r\n\r\n }\r\n\r\n else if(isAddAll && (searchdata[1]==\"reason_code\" || searchdata[1]==\"service_level\")){\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = \"all\";\r\n }\r\n\r\n else if(vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"].length>0 && (searchdata[1]==\"mode\"\r\n || searchdata[1]==\"reason_code\" || searchdata[1]==\"service_level\")){\r\n //adding multiple chips in shipment - mode tab\r\n if(vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] != 'all')\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] + multiplepillseperator + searchdata[2];\r\n else\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = searchdata[2];\r\n }\r\n\r\n /*else if(searchdata[1] == \"status\"){\r\n vm.searchFields[\"shipment_status\"][\"value\"] = get_status_displaycontent(searchdata[2]);\r\n }*/\r\n\r\n else{\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = searchdata[2];\r\n }\r\n\r\n }\r\n\r\n }\r\n }else{\r\n //vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[3];\r\n if(vm.searchValue != ''){\r\n if(vm.thirdChildFlg == 100)\r\n {\r\n if(searchdata.length == 4 || (searchdata.length == 5 && searchdata[4]==\"\"))\r\n {\r\n //for shipment -> AWB\r\n\r\n if((searchdata[1]==\"awb\" && searchdata[2]==\"bol\") && vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"].length>0 )\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] + multiplepillseperator + vm.searchValue.toString();\r\n }\r\n else\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString();\r\n }\r\n }\r\n else\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = vm.searchValue.toString();\r\n }\r\n\r\n }\r\n else{\r\n for(var key in vm.searchFields)\r\n\r\n if(searchdata[0].toLowerCase() == \"shipment\" &&\r\n (\r\n (key.includes(\"shipment_invoice_total\") && searchdata[1].toLowerCase() == \"invoice_total\")\r\n || (key.includes(\"shipment_gross_weight\") && searchdata[1].toLowerCase() == \"gross_weight\")\r\n || (key.includes(\"shipment_total_pieces\") && searchdata[1].toLowerCase() == \"total_pieces\")\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\"\r\n }\r\n\r\n add_multiple_values(\"shipment_\"+searchdata[1]+\"_\"+searchdata[2], searchdata[1]+\"_\"+searchdata[2])\r\n\r\n }\r\n\r\n }\r\n // vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue;\r\n else { vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[3]; }\r\n }\r\n vm.searchValue = \"\";\r\n vm.searchValue2 = \"\";\r\n vm.ttserchdata = \"\";\r\n\r\n }else if(vm.ttSearchFlag == 2){\r\n\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n\r\n if(vm.searchValue != ''){\r\n\r\n if(searchdata[1] == 'contact' || searchdata[1] == 'street'){\r\n\r\n // vm.searchFields[\"pickup_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString();\r\n add_multiple_values(\"pickup_\"+searchdata[1]+\"_\"+searchdata[2], searchdata[1]+\"_\"+searchdata[2]);\r\n\r\n }else{\r\n\r\n // vm.searchFields[\"pickup_\"+searchdata[1]][\"value\"] = vm.searchValue.toString();\r\n add_multiple_values(\"pickup_\"+searchdata[1], searchdata[1]);\r\n }\r\n }\r\n\r\n }\r\n else if(vm.ttSearchFlag == 3){\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n //vm.searchFields[\"consignee_\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n if(vm.searchValue != ''){\r\n\r\n if(searchdata[1] == 'contact' || searchdata[1] == 'street'){\r\n\r\n // vm.searchFields[\"consignee_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue.toString();\r\n add_multiple_values(\"consignee_\"+searchdata[1]+\"_\"+searchdata[2], searchdata[1]+\"_\"+searchdata[2]);\r\n\r\n }else{\r\n\r\n // vm.searchFields[\"consignee_\"+searchdata[1]][\"value\"] = vm.searchValue.toString();\r\n add_multiple_values(\"consignee_\"+searchdata[1], searchdata[1]);\r\n }\r\n }\r\n\r\n }\r\n // var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n\r\n var convertedFields = vm.searchFields;\r\n\r\n vm.chipData = [];\r\n for (var field in convertedFields) { //set the focus to false\r\n\r\n convertedFields[field].focus = false;\r\n\r\n if((convertedFields[field].value !== null && convertedFields[field].value != '' && !convertedFields[field].value.toString().includes('undefined'))){\r\n\r\n if(convertedFields[field].field == \"milestone\"){\r\n\r\n var arr_values = convertedFields[field].value.split(/[\\s,]+/);\r\n\r\n for (var i=0; i< arr_values.length; i++) {\r\n if(arr_values[i] == '0'){\r\n arr_values[i] = \"open\";\r\n }\r\n else if(arr_values[i] == '1'){\r\n arr_values[i] = \"covered\";\r\n }else if (arr_values[i] == '2'){\r\n arr_values[i] = \"pickup\";\r\n }\r\n else if (arr_values[i] == '3'){\r\n arr_values[i] = \"dispatched\";\r\n }\r\n else if (arr_values[i] == '4'){\r\n arr_values[i] = \"loaded\";\r\n }\r\n else if (arr_values[i] == '5'){\r\n arr_values[i] = \"consignee\";\r\n }\r\n else if (arr_values[i] == '6'){\r\n arr_values[i] = \"delivered\";\r\n }\r\n }\r\n convertedFields[field].value = arr_values.join(\", \");\r\n }\r\n\r\n vm.chipData.push(convertedFields[field]);\r\n\r\n //added by chaitanya for removal of multiple pills\r\n\r\n var idx=null,idx2=null, cnt=0\r\n for( var i in vm.chipData){\r\n\r\n if( [\"shipment_reason_code\"].includes(vm.chipData[i].field)){\r\n var myArrayRC = vm.chipData[i].value.split(' , ');\r\n var uniqueRC = array_unique(myArrayRC);\r\n var fnalvalueRC = uniqueRC.join(' , ');\r\n vm.chipData[i].value = fnalvalueRC.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_service_level\"].includes(vm.chipData[i].field)){\r\n var myArraySL = vm.chipData[i].value.split(' , ');\r\n var uniqueSL = array_unique(myArraySL);\r\n var fnalvalueSL = uniqueSL.join(' , ');\r\n vm.chipData[i].value = fnalvalueSL.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_awb_bol\"].includes(vm.chipData[i].field)){\r\n var myArrayAW = vm.chipData[i].value.split(' , ');\r\n var uniqueAW = array_unique(myArrayAW);\r\n var fnalvalueAW = uniqueAW.join(' , ');\r\n vm.chipData[i].value = fnalvalueAW.replace(/,\\s*$/, \"\").trim();\r\n }\r\n\r\n if( [\"business_type_group\",\"shipment_mode\"].includes(vm.chipData[i].field))\r\n cnt++;\r\n\r\n if(vm.chipData[i].field == \"business_type_group\")\r\n {\r\n var value1 = vm.chipData[i].value;\r\n idx = i;\r\n }\r\n else\r\n {\r\n var value1 = \"\";\r\n }\r\n if(vm.chipData[i].field == \"shipment_mode\")\r\n {\r\n idx2 = i;\r\n var value2 = vm.chipData[i].value;\r\n }\r\n else\r\n {\r\n var value2 = \"\";\r\n }\r\n }\r\n if(value1 && value2){\r\n //if(value1 != value2)\r\n var myArray = value2.split(' , ').concat(value1);\r\n var unique = array_unique(myArray);\r\n var fnalvalue = unique.join(' , ');\r\n vm.chipData[idx2].value = fnalvalue.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if(value2){\r\n var myArray = value2.split(' , ').concat(value1);\r\n var unique = array_unique(myArray);\r\n var fnalvalue = unique.join(' , ');\r\n vm.chipData[idx2].value = fnalvalue.replace(/,\\s*$/, \"\").trim();\r\n }\r\n\r\n if((cnt > 0 && idx2 >0) && idx)\r\n vm.chipData.splice(idx,1);\r\n\r\n }\r\n }\r\n // AdvSearchService.setCurrentSearchFields(convertedFields,null,true);\r\n\r\n callingToRemoveCrossIConInChips(vm.chipData, 'popup');\r\n\r\n //the search is then done in the track and trace controller\r\n //$mdDialog.hide();\r\n }\r\n\r\n function add_multiple_values(shipment_searchdata, searchdata){\r\n if(vm.searchFields[shipment_searchdata][\"value\"].length > 0 && !vm.searchFields[shipment_searchdata][\"value\"].split(\" , \").includes(vm.searchValue.toString())\r\n &&\r\n (searchdata==\"ref\" || shipment_searchdata == \"pickup_name\" || shipment_searchdata == \"pickup_contact_name\" || shipment_searchdata == \"pickup_street_address\" ||\r\n shipment_searchdata == \"pickup_state\" || searchdata==\"origin_state\" || searchdata==\"origin_city\" || searchdata == \"destination_state\" || searchdata == \"destination_city\" ||\r\n searchdata==\"consol\" || searchdata==\"pro\" || searchdata==\"reference\" || searchdata==\"invoice\" || searchdata==\"lane_pair\" || shipment_searchdata == \"pickup_city\" ||\r\n shipment_searchdata == \"pickup_zip\" || shipment_searchdata == \"pickup_phone\" || shipment_searchdata == \"consignee_name\" || shipment_searchdata == \"consignee_contact_name\" ||\r\n shipment_searchdata == \"consignee_street_address\" || shipment_searchdata == \"consignee_state\" || shipment_searchdata == \"consignee_city\" ||\r\n shipment_searchdata == \"consignee_zip\" || shipment_searchdata == \"consignee_phone\"\r\n || searchdata==\"bol\" || searchdata==\"container\" || searchdata==\"consignee_reference\" || searchdata==\"load\" ))\r\n {\r\n //add multiple values to the chip\r\n vm.searchFields[shipment_searchdata][\"value\"] =vm.searchFields[shipment_searchdata][\"value\"]+ multiplepillseperator + vm.searchValue.toString();\r\n }\r\n else if(vm.searchFields[shipment_searchdata][\"value\"].length == 0)\r\n {\r\n vm.searchFields[shipment_searchdata][\"value\"] = vm.searchValue.toString();\r\n }\r\n }\r\n\r\n function get_array_status(status_arr, object_type){\r\n\r\n for (i=0; i < status_arr.length; i++){\r\n if (object_type == \"integer\"){\r\n status_arr[i] = get_milestone_displaycontent(status_arr[i])\r\n }\r\n else {\r\n status_arr[i] = get_string_status_displaycontent(status_arr[i])\r\n }\r\n }\r\n\r\n return status_arr.join(\" , \");\r\n\r\n }\r\n\r\n function get_string_status_displaycontent(searchdata){\r\n if(searchdata == '0'){\r\n var displaycontent = 'open';\r\n }\r\n else if(searchdata == '1'){\r\n var displaycontent = 'covered';\r\n }\r\n else if(searchdata == '2'){\r\n var displaycontent = 'pickup';\r\n }\r\n else if(searchdata == '3'){\r\n var displaycontent = 'dispatched';\r\n }\r\n else if(searchdata == '4'){\r\n var displaycontent = 'loaded';\r\n }\r\n else if(searchdata == '5'){\r\n var displaycontent = 'consignee';\r\n }\r\n else if(searchdata == '6'){\r\n var displaycontent = 'delivered';\r\n }\r\n else {\r\n var displaycontent = searchdata;\r\n }\r\n\r\n return displaycontent;\r\n }\r\n\r\n function get_milestone_displaycontent(searchdata){\r\n if(searchdata == 'open'){\r\n var displaycontent = '0';\r\n }\r\n else if(searchdata == 'covered'){\r\n var displaycontent = '1';\r\n }\r\n else if(searchdata == 'pickup'){\r\n var displaycontent = '2';\r\n }\r\n else if(searchdata == 'dispatched'){\r\n var displaycontent = '3';\r\n }\r\n else if(searchdata == 'loaded'){\r\n var displaycontent = '4';\r\n }\r\n else if(searchdata == 'consignee'){\r\n var displaycontent = '5';\r\n }\r\n else if(searchdata == 'delivered'){\r\n var displaycontent = '6';\r\n }\r\n else {\r\n var displaycontent = searchdata;\r\n }\r\n return displaycontent;\r\n\r\n }\r\n\r\n function get_status_displaycontent(searchdata){\r\n\r\n var status_array = new Array();\r\n\r\n searchdata = searchdata.trim();\r\n var space_text = searchdata.search(\" \");\r\n if(space_text){\r\n searchdata = searchdata.replace(\" \", \"_\");\r\n }\r\n\r\n status_array =\r\n {\r\n \"planned\":\"planned\",\r\n \"at_pickup\":\"pickup\",\r\n \"loaded\":\"loaded\",\r\n \"at_consignee\":\"consignee\",\r\n \"delivered\":\"delivered\"\r\n }\r\n\r\n if(status_array[searchdata]){\r\n return status_array[searchdata];\r\n }else{\r\n return searchdata;\r\n }\r\n\r\n }\r\n\r\n function get_status_original_value(searchdata){\r\n\r\n var status_array = new Array();\r\n\r\n status_array =\r\n {\r\n \"planned\":\"planned\",\r\n \"pickup\":\"at pickup\",\r\n \"loaded\":\"loaded\",\r\n \"consignee\":\"at consignee\",\r\n \"delivered\":\"delivered\"\r\n }\r\n\r\n if(status_array[searchdata]){\r\n return status_array[searchdata];\r\n }else{\r\n return searchdata;\r\n }\r\n }\r\n\r\n function array_unique(arr) {\r\n var result = [];\r\n for (var i = 0; i < arr.length; i++) {\r\n if (result.indexOf(arr[i]) == -1) {\r\n result.push(arr[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function clearSearch(){\r\n vm.chipData = []; \r\n callingToRemoveCrossIConInChips(vm.chipData, 'popup');\r\n }\r\n\r\n function advSearch(event){\r\n var convertedFields = vm.searchFields;\r\n for (var field in convertedFields) {\r\n //set the focus to false\r\n //console.log(convertedFields[field]);\r\n\r\n if(field == 'milestone'){\r\n\r\n var status_arr = vm.searchFields[\"milestone\"][\"value\"].split(/[\\s,]+/);\r\n\r\n if (status_arr.length > 1 ){\r\n convertedFields[field].value = get_array_status(status_arr, \"integer\");\r\n }\r\n else {\r\n convertedFields[field].value = get_milestone_displaycontent(convertedFields[field].value);\r\n }\r\n\r\n }\r\n\r\n else if(field == 'shipment_status'){\r\n convertedFields[field].value = get_status_displaycontent(convertedFields[field].value);\r\n }\r\n\r\n else if(convertedFields[field].value.toString().includes('undefined')){\r\n convertedFields[field].value = \"\";\r\n }\r\n\r\n convertedFields[field].focus = false;\r\n\r\n }\r\n\r\n AdvSearchCfsService.setCurrentSearchFields(convertedFields);\r\n\r\n if(event.target.id != \"btnSearch\" || event.target.id != \"spSearch\" ) {\r\n $mdDialog.cancel();\r\n }\r\n\r\n else {\r\n angular.element(document.querySelector('#AdvSearch')).focus();\r\n }\r\n\r\n TrackTraceCfsPaginationService.save_page_number(1);\r\n TrackTraceCfsPaginationService.save_per_page(10);\r\n\r\n vm.tableParams = ServerTableCfsService.getTable();\r\n\r\n vm.tableParams.page(TrackTraceCfsPaginationService.get_page_number());\r\n vm.tableParams.count(TrackTraceCfsPaginationService.get_per_page());\r\n vm.tableParams.reload();\r\n\r\n }\r\n\r\n\r\n //saves the current form to default\r\n function saveToDefault() {\r\n vm.clearDefault(); //clear the old one so we can save a new one\r\n $log.debug(\"saved to default\");\r\n var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n AdvSearchCfsService.setCurrentSearchFields(convertedFields);\r\n AdvSearchCfsService.saveDefaultSearch({}, 'testDefault', true).then(function() {\r\n AdvSearchCfsService.listSavedSearches().then(function(res){\r\n vm.isSavedSearch = res['data'].length > 0;\r\n });\r\n });\r\n }\r\n\r\n function loadDefault() {\r\n AdvSearchCfsService.listSavedSearches().then(function(res){\r\n var isSavedSearch = res['data'].length > 0;\r\n if(isSavedSearch) {\r\n AdvSearchCfsService.loadSearch((res['data'])['0'].id).then(function(res) {\r\n var searchFields = AdvSearchCfsService.getCurrentSearchFields();\r\n var data = res['data'];\r\n for (var field in searchFields) {\r\n if(data[field] != null) {\r\n if (field.includes(\"date\")){\r\n searchFields[field].value = new Date(data[field]);\r\n } else {\r\n searchFields[field].value = data[field];\r\n }\r\n } else {\r\n searchFields[field].value = \"\";\r\n }\r\n }\r\n vm.searchFields = searchFields;\r\n vm.searchFields;\r\n });\r\n }\r\n });\r\n }\r\n\r\n function clearDefault() {\r\n //use list to get the correct id to delete\r\n AdvSearchCfsService.listSavedSearches().then(function(res){\r\n if(res['data'].length > 0) { //if there is one to delete\r\n //delete the saved search with the id\r\n AdvSearchCfsService.deleteSearch((res['data'])['0'].id).then(function(res) {\r\n //update if there is any saved searches\r\n AdvSearchCfsService.listSavedSearches().then(function(res){\r\n vm.isSavedSearch = res['data'].length > 0;\r\n //vm.resetForm();\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n function resetForm() {\r\n var emptySearchFields = angular.copy(AdvSearchCfsService.getEmptySearchFields());\r\n for (var field in emptySearchFields){\r\n vm.searchFields[field].value = emptySearchFields[field].value;\r\n }\r\n }\r\n\r\n //returns a list of the reason codes from the database\r\n //function getReasonCodes() {\r\n // //TODO: change this to return results from a query\r\n // return AdvSearchCfsService.getReasonCodes();\r\n //}\r\n\r\n //returns a list of the service levels from the database\r\n //function getServiceLevels() {\r\n // //TODO: change this to return results from a query\r\n // return AdvSearchCfsService.getServiceLevelCodes();\r\n //}\r\n\r\n //function getBusinessTypes() {\r\n // return AdvSearchCfsService.getBusinessTypeCodes();\r\n //}\r\n\r\n function formClick(event) {\r\n event.preventDefault();\r\n if (vm.openInputFlag) // if input is availble enter click is handled for add btn\r\n {\r\n newSearch();\r\n clearFlags();\r\n angular.element(document.querySelector('#AdvSearch')).focus();\r\n } else {\r\n advSearch(event);\r\n }\r\n }\r\n\r\n\r\n function addOneMoreDay(selectedDate){\r\n $scope.dateMin = moment(selectedDate).add(1,'days');\r\n }\r\n\r\n function subtractOneDay(selectedDate){\r\n $scope.dateMax = moment(selectedDate).subtract(1,'days');\r\n }\r\n\r\n function callingToRemoveCrossIConInChips(data, page){\r\n\r\n switch ($state.current.name){\r\n\r\n case 'track-trace-booking' :\r\n\r\n vm.bookingMode = true;\r\n vm.transitMode = false;\r\n vm.heading_text = \"Booking\";\r\n vm.booking_number_quick_search = true;\r\n vm.status_advanced_search = false;\r\n vm.searchType = 'booking_number';\r\n AdvSearchCfsService.removeCloseMarkInChips(data, page);\r\n\r\n break;\r\n\r\n case 'track-trace-transit' :\r\n\r\n vm.bookingMode = false;\r\n vm.transitMode = true;\r\n vm.status_advanced_search = false;\r\n vm.heading_text = \"In_Transit\";\r\n AdvSearchCfsService.removeCloseMarkInChips(data, page);\r\n\r\n break;\r\n\r\n default: \r\n vm.bookingMode = false;\r\n vm.transitMode = false;\r\n vm.heading_text = \"Track & Trace\";\r\n AdvSearchCfsService.removeCloseMarkInChips(data, page); \r\n \r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name UserManagementService\r\n *\r\n * @description\r\n * The UserManagementService does stuff\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('UserManagementService', UserManagementService);\r\n\r\n /** @ngInject */\r\n UserManagementService.$inject = ['$http', '$rootScope', '$q','$timeout', '$location', '$stateParams', 'NgTableParams', 'api', 'PermissionsService', 'UserService',\r\n 'AJAX', 'DownloadService', 'Upload','$state'];\r\n function UserManagementService($http, $rootScope, $q, $timeout,\r\n $location,$stateParams, NgTableParams, api, PermissionsService,\r\n UserService, AJAX, DownloadService, Upload,$state) {\r\n\r\n var exceptionFilterPersist = {}; //used to persist the search\r\n var awaitFilterPersist = {};\r\n exceptionFilterPersist.value = 'all';\r\n awaitFilterPersist.value = 'mine';\r\n\r\n var user = createUserObject(),\r\n permissions = PermissionsService.generatePotentialPermissions(UserService.getUserData().permissions),\r\n company = {},\r\n\r\n users = [],\r\n query = {},\r\n timeoutTid = false,\r\n allFilter = 'all',\r\n addUserCheck = true,\r\n url = api.url + '/users/',\r\n bulkUrl = api.url + \"/bulk_users/\",\r\n loading = false,\r\n isEmpty = true,\r\n allUsersCount=0,\r\n userTableData=[],\r\n deferred = $q.defer(),\r\n userTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: userTableData,\r\n total: allUsersCount,\r\n getData: function ($defer, params) {\r\n //if($state.current.name.includes('companies')) {\r\n // params.total(allUsersCount);\r\n // var filterData=userTableData;\r\n //\r\n // filterData = params.filter() ? $filter('filter')(filterData, params.filter()) : filterData;\r\n // filterData = params.orderBy() ? $filter('orderBy')(filterData, params.orderBy()) : filterData;\r\n // params.total(filterData.length);\r\n //\r\n // filterData = filterData.slice((params.page() - 1) * params.count(), params.page() * params.count());\r\n //} else {\r\n params.total(allUsersCount);\r\n var filterData=userTableData;\r\n\r\n if(params.count()<userTableData.length)\r\n filterData = userTableData.slice((params.page() - 1) * params.count(), params.page() * params.count());\r\n //}\r\n $defer.resolve(filterData);\r\n }\r\n }),\r\n roles = [\r\n {key: \"crane_admin\", display: \"Crane - Admin\", permissions:['Shipment.View', 'Shipment.View', 'PotentialException.Edit Potential Exceptions', 'PotentialException.Approve Potential Exceptions', 'User.Manage Users',\r\n 'User.C-View Lens Mode', 'Company.Access Company Lens Data', 'Company.Admin', 'Group.Admin', 'LensGroup.Manage Lens Groups', 'Admin.Super Admin','Shipment.T&T Export', 'Shipment.Financial', 'Spotlight.Manage Spotlight', 'User.Demo']},\r\n {key: \"crane_user\", display: \"Crane - User\", permissions:['Shipment.View', 'Shipment.View', 'User.C-View Lens Mode' , 'Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: \"customer\", display: \"Customer - Standard\", permissions:['Shipment.View', 'Shipment.View', 'Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: \"customer_no_tt_export\", display: \"Customer - No T&T Export\", permissions:['Shipment.View', 'Shipment.View', 'Shipment.Financial']},\r\n {key: \"customer_no_financial\", display: \"Customer - No Financial\", permissions:['Shipment.View', 'Shipment.View', 'Shipment.T&T Export']},\r\n {key: \"customer_lens\", display: \"Customer-Lens\", permissions:['Shipment.View', 'Shipment.View','User.C-View Lens Mode', 'Company.Access Company Lens Data', 'Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: \"editor\", display: \"Crane - PE Editor\", permissions:['Shipment.View', 'Shipment.View', 'PotentialException.Edit Potential Exceptions','User.C-View Lens Mode','Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: \"approver\", display: \"Crane - PE Approver\", permissions:['Shipment.View', 'Shipment.View', 'PotentialException.Edit Potential Exceptions', 'PotentialException.Approve Potential Exceptions','User.C-View Lens Mode','Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: 'custom', display: 'Custom', permissions:['Shipment.NONE', 'Shipment.NONE', 'PotentialException.NONE', 'PotentialException.NONE', 'User.NONE',\r\n 'User.NONE', 'Company.NONE', 'Company.NONE', 'Group.NONE', 'LensGroup.NONE', 'Shipment.T&T Export', 'Shipment.Financial']}\r\n ],\r\n roles_shipper = [\r\n {key: \"customer_shipper\", display: \"Customer-Shipper\", permissions:['Shipment.View', 'Shipment.View','Shipment.T&T Export']},\r\n {key: 'custom', display: 'Custom', permissions:['Shipment.NONE', 'Shipment.NONE', 'PotentialException.NONE', 'PotentialException.NONE', 'User.NONE',\r\n 'User.NONE', 'Company.NONE', 'Company.NONE', 'Group.NONE', 'LensGroup.NONE', 'Shipment.T&T Export', 'Shipment.Financial']}\r\n ],\r\n roles_consignee = [\r\n {key: \"customer_consignee\", display: \"Customer-Consignee\", permissions:['Shipment.View', 'Shipment.View','Shipment.T&T Export']},\r\n {key: 'custom', display: 'Custom', permissions:['Shipment.NONE', 'Shipment.NONE', 'PotentialException.NONE', 'PotentialException.NONE', 'User.NONE',\r\n 'User.NONE', 'Company.NONE', 'Company.NONE', 'Group.NONE', 'LensGroup.NONE', 'Shipment.T&T Export', 'Shipment.Financial']}\r\n ],\r\n roles_classic = [\r\n {key: \"customer_classic\", display: \"Customer - Pathway Customer\", permissions:['User.Transportation', 'User.Warehouse', 'User.Accounts Receivables', 'User.Book Shipment', 'User.Reporting', 'User.Operations-KPI', 'User.Operations-Dashboard', 'User.Customs']},\r\n {key: \"classic_customer_ops\", display: \"Customer - Pathway Ops\", permissions:['User.Transportation', 'User.Warehouse', 'User.Operations-KPI', 'User.Book Shipment']},\r\n {key: \"classic_customer_shipper\", display: \"Customer - Pathway Shipper\", permissions:['User.Transportation', 'User.Operations-KPI', 'User.Book Shipment']},\r\n {key: \"classic_customer_consignee\", display: \"Customer - Pathway Consignee\", permissions:['User.Transportation', 'User.Operations-KPI']}\r\n ],\r\n roles_classic_consignee = [\r\n {key: \"classic_customer_consignee\", display: \"Customer - Pathway Consignee\", permissions:['User.Transportation', 'User.Operations-KPI']}\r\n ],\r\n roles_classic_shipper = [\r\n {key: \"classic_customer_shipper\", display: \"Customer - Pathway Shipper\", permissions:['User.Transportation', 'User.Operations-KPI', 'User.Book Shipment']}\r\n ],\r\n roles_csl = [\r\n {key: \"crane_admin\", display: \"CSL - Admin\", permissions:['Load.View', 'Load.View', 'User.Manage Users',\r\n 'User.C-View Lens Mode', 'Company.Access Company Lens Data', 'Company.Admin', 'Group.Admin', 'LensGroup.Manage Lens Groups', 'Admin.Super Admin', 'Shipment.T&T Export', 'Shipment.Financial', 'Spotlight.Manage Spotlight', 'User.Demo']},\r\n {key: \"crane_user\", display: \"CSL - User\", permissions:['Load.View', 'Load.View', 'User.C-View Lens Mode' , 'Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: \"customer\", display: \"Customer - Standard\", permissions:['Load.View', 'Load.View', 'Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: \"customer_no_tt_export\", display: \"Customer - No T&T Export\", permissions:['Load.View', 'Load.View', 'Shipment.Financial']},\r\n {key: \"customer_no_financial\", display: \"Customer - No Financial\", permissions:['Load.View', 'Load.View', 'Shipment.T&T Export']},\r\n {key: 'custom', display: 'Custom', permissions:['Shipment.NONE', 'Load.NONE', 'User.NONE',\r\n 'User.NONE', 'Company.NONE', 'Company.NONE', 'Group.NONE', 'LensGroup.NONE', 'Shipment.T&T Export', 'Shipment.Financial']}\r\n ],\r\n roles_cfs = [\r\n {key: \"crane_admin\", display: \"CFS - Admin\", permissions:['Load.View', 'Load.View', 'Load.View', 'User.Manage Users',\r\n 'User.C-View Lens Mode', 'Company.Access Company Lens Data', 'Company.Admin', 'Group.Admin', 'LensGroup.Manage Lens Groups', 'Admin.Super Admin', 'Shipment.T&T Export', 'Shipment.Financial', 'Spotlight.Manage Spotlight', 'User.Demo']},\r\n {key: \"crane_user\", display: \"CFS - User\", permissions:['Load.View', 'Load.View', 'User.C-View Lens Mode' , 'Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: \"customer\", display: \"Customer - Standard\", permissions:['Load.View', 'Load.View', 'Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: \"customer_no_tt_export\", display: \"Customer - No T&T Export\", permissions:['Load.View', 'Load.View', 'Shipment.Financial']},\r\n {key: \"customer_no_financial\", display: \"Customer - No Financial\", permissions:['Load.View', 'Load.View', 'Shipment.T&T Export']},\r\n {key: 'custom', display: 'Custom', permissions:['Shipment.NONE', 'Load.NONE', 'User.NONE',\r\n 'User.NONE', 'Company.NONE', 'Company.NONE', 'Group.NONE', 'LensGroup.NONE', 'Shipment.T&T Export', 'Shipment.Financial']}\r\n ],\r\n roles_cmts = [\r\n {key: \"crane_admin\", display: \"CMTS - Admin\", permissions:['Load.View', 'Load.View', 'Load.View', 'User.Manage Users',\r\n 'User.C-View Lens Mode', 'Company.Access Company Lens Data', 'Company.Admin', 'Group.Admin', 'LensGroup.Manage Lens Groups', 'Admin.Super Admin', 'Shipment.T&T Export', 'Shipment.Financial', 'Spotlight.Manage Spotlight', 'User.Demo']},\r\n {key: \"crane_user\", display: \"CMTS - User\", permissions:['Load.View', 'Load.View', 'User.C-View Lens Mode' , 'Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: \"customer\", display: \"Customer - Standard\", permissions:['Load.View', 'Load.View', 'Shipment.T&T Export', 'Shipment.Financial']},\r\n {key: \"customer_no_tt_export\", display: \"Customer - No T&T Export\", permissions:['Load.View', 'Load.View', 'Shipment.Financial']},\r\n {key: \"customer_no_financial\", display: \"Customer - No Financial\", permissions:['Load.View', 'Load.View', 'Shipment.T&T Export']},\r\n {key: 'custom', display: 'Custom', permissions:['Shipment.NONE', 'Load.NONE', 'User.NONE',\r\n 'User.NONE', 'Company.NONE', 'Company.NONE', 'Group.NONE', 'LensGroup.NONE', 'Shipment.T&T Export', 'Shipment.Financial']}\r\n ];\r\n var clean_user = angular.copy(user);\r\n var bulk_users = [];\r\n var selectedUsers;\r\n\r\n return {\r\n find: find,\r\n autoComplete: autoComplete,\r\n autoCompletes: autoCompletes,\r\n autocompleteCww: autocompleteCww,\r\n autocompleteCsl: autocompleteCsl,\r\n autocompleteCfs: autocompleteCfs,\r\n autocompleteCmts: autocompleteCmts,\r\n bulkCreate: bulkCreate,\r\n bulkUpdate: bulkUpdate,\r\n bulkDelete: bulkDelete,\r\n bulkActivation: bulkActivation,\r\n bulkDeactivation: bulkDeactivation,\r\n bulkResendVerificationEmail: bulkResendVerificationEmail,\r\n bulkResetPasswordAndSecurityQuestion: bulkResetPasswordAndSecurityQuestion,\r\n bulkDeleteAndResendVerificationEmail: bulkDeleteAndResendVerificationEmail,\r\n bulkResendImmediateActionEmail: bulkResendImmediateActionEmail,\r\n bulkReimportUsers: bulkReimportUsers,\r\n reimportUser: reimportUser,\r\n deleteAndResend: deleteAndResend,\r\n immediateActionEmail: immediateActionEmail,\r\n clearUser: function() { user = angular.copy(clean_user); return user; },\r\n getContacts: getContacts,\r\n getCompany: getCompany,\r\n getCompanies: getCompanies,\r\n //getGroups: getGroups,\r\n getCompanyDetails: function() { return company; },\r\n getPermissions: getPermissions,\r\n getUser: getUser,\r\n getUsers: getUsers,\r\n getUsersFilter: getUsersFilter,\r\n getRoles: function(){ return roles;},\r\n getRolesShipper: function(){ return roles_shipper;},\r\n getRolesConsignee: function(){ return roles_consignee;},\r\n getRolesCsl: function(){ return roles_csl;},\r\n getRolesCfs: function(){ return roles_cfs;},\r\n getRolesCmts: function(){ return roles_cmts;},\r\n getRolesClassic: function(){ return roles_classic;},\r\n getRolesClassicConsignee: function(){ return roles_classic_consignee;},\r\n getRolesClassicShipper: function(){ return roles_classic_shipper;},\r\n getUserDetails: function() { return user; },\r\n getUserTable: function() {\r\n if($state.current.name.includes('new')){\r\n userTable.settings().data =[];\r\n }\r\n return userTable;\r\n },\r\n addUserTable: function(data,count){userTable.data.push(data);\r\n if(count >0){\r\n userTable.total(count);\r\n }else{\r\n userTable.total(userTable.data.length);\r\n }\r\n },\r\n deleteUserTable: function(data){\r\n userTable.data=data;\r\n userTable.total(userTable.data.length);\r\n //userTable.data.length;\r\n },\r\n getExceptionFilterPersist: function() {\r\n return exceptionFilterPersist;\r\n },\r\n getAllFilter: function(){\r\n return allFilter;\r\n },\r\n setAllFilter: function(filter){\r\n allFilter = filter;\r\n },\r\n getAllUserCount : function(){\r\n return allUsersCount;\r\n },\r\n getUsersTableData : function(){\r\n return userTableData;\r\n },\r\n getSelectedUsers: getSelectedUsers,\r\n createUserObject: createUserObject,\r\n parsePermissions: parsePermissions,\r\n parsePermissionsCsl: parsePermissionsCsl,\r\n parsePermissionsCfs: parsePermissionsCfs,\r\n parsePermissionsCmts: parsePermissionsCmts,\r\n postUser: postUser,\r\n updateUser: updateUser,\r\n updateAdUserData: updateAdUserData,\r\n getBulkUsers: getBulkUsers,\r\n // postUserContact: postUserContact,\r\n // updateUserContact: updateUserContact,\r\n // deleteUserContact: deleteUserContact,\r\n deleteUser: deleteUser,\r\n setQuery: setQuery,\r\n getContactPhotos: getContactPhotos,\r\n exportUserLogs: exportUserLogs,\r\n uploadFile: uploadFile,\r\n postBulkUsers: postBulkUsers,\r\n resendConfirmation: resendConfirmation,\r\n oktaDeactivateUser: oktaDeactivateUser,\r\n oktaActivateUser: oktaActivateUser,\r\n setSelectedLensUsers : setSelectedLensUsers,\r\n getSelectedLensUsers : getSelectedLensUsers,\r\n getCompanyUsers :getCompanyUsers,\r\n clearUserData : clearUserData,\r\n RemoveUser : RemoveUser,\r\n setUserAddCheck : setUserAddCheck,\r\n setUserTableData : setUserTableData,\r\n getLensgroupUsers : getLensgroupUsers,\r\n sendErrorsToEmails:sendErrorsToEmails\r\n\r\n };\r\n\r\n //update user after removing\r\n\r\n function RemoveUser(RemoveUser){\r\n addUserTable(totallength);\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function setQuery(q){\r\n userTable.filter({});\r\n userTable.filter(q);\r\n userTable.page(1);\r\n userTable.reload();\r\n }\r\n\r\n\r\n function exportUserLogs(user) {\r\n\r\n var url = api.url_v2 + \"/users/\"+ user.id + \"/export_logs\";\r\n\r\n\r\n var req_params = {};\r\n\r\n var csv_date = new Date();\r\n var filename = (moment().format('YYYY-MM-DD') + '-User'+ user.id+ 'Logs.csv');\r\n return DownloadService.getDownloadFile(url, req_params, filename);\r\n // var promise = $http({url: url, method: \"GET\", params: req_params}).then(function(res){\r\n // var anchor = angular.element('<a/>');\r\n // anchor.attr({\r\n // href: 'data:attachment/csv;charset=utf-8,'+ encodeURI(res.data),\r\n // target: '_blank',\r\n // download: moment().format('YYYY-MM-DD') + '-PotentialExceptions.csv'\r\n // })[0].click();\r\n\r\n // return res.data;\r\n // });\r\n // return promise;\r\n }\r\n // ---------------------\r\n // Retrieve a list of groups\r\n // // ------------------\r\n //function getGroups(){\r\n // return $http.get(api.url + '/groups', {timeout: deferred.promise})\r\n // .then(function onSuccess(response){\r\n // return response.data.groups;\r\n // }, function onError(response){\r\n // if (response.status === 0){\r\n // // Handle timeout or network error\r\n // } else {\r\n // // Handle error from server\r\n // }\r\n // });\r\n //}\r\n // ---------------------\r\n // Retrieve a list of companies\r\n // // ------------------\r\n function getCompanies(){\r\n return $http.get(api.url_v2 + '/companies?user_edit=true', {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return response.data.companies;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a company\r\n // // ------------------\r\n function getCompany(id){\r\n return $http.get(api.url_v2 + '/companies/' + id, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n //// console.log(response.data);\r\n for (var field in response.data){\r\n company[field] = response.data[field];\r\n }\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n }\r\n\r\n var cachedContacts = false;\r\n function getContacts(forceLoad){\r\n forceLoad = typeof forceLoad === 'undefined' ? false : forceLoad;\r\n if (cachedContacts && !forceLoad) {\r\n var promise = $q.defer();\r\n promise.resolve(cachedContacts);\r\n return promise.promise;\r\n }\r\n else {\r\n return $http.get(api.url_v2 + '/contacts'/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n cachedContacts = response.data.contacts;\r\n return cachedContacts;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n }\r\n }\r\n\r\n\r\n //--------------------------------\r\n // Retrieve Contact Photos\r\n //--------------------------------\r\n\r\n var contactPhotos = false;\r\n function getContactPhotos() {\r\n if (contactPhotos) {\r\n var promise = $q.defer();\r\n promise.resolve(contactPhotos);\r\n return promise.promise;\r\n }\r\n else {\r\n return $http.get(api.url_v2 + '/contacts/photos')\r\n .then(function onSuccess(response){\r\n contactPhotos = response.data;\r\n return contactPhotos;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n }\r\n }\r\n\r\n function getPermissions(){\r\n // var curr_user = UserService.getUserData();\r\n // permissions = PermissionsService.generatePotentialPermissions(curr_user.permissions);\r\n return permissions;\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a user\r\n // // ------------------\r\n function getUser(id){\r\n user = createUserObject();\r\n return $http.get(api.url_v2 + '/users/' + id/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n //// console.log(response);\r\n unpackageUser(response.data);\r\n //// console.log(response.data);\r\n if(response.data.contact.primary_contact){\r\n user.contact.default = response.data.contact.default;\r\n user.contact.primary_contact = response.data.contact.primary_contact.id;\r\n }\r\n //// console.log(user);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Do something else;\r\n }\r\n user = null;\r\n });\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n\r\n }\r\n\r\n function getSelectedUsers(){\r\n if(userTable.settings().data){\r\n return userTable.settings().data\r\n .filter(function(user){\r\n return user.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n // ----------------------------\r\n // Bulk create users\r\n // ----------------------------\r\n function bulkCreate(users){\r\n prepare_bulk_communications();\r\n var promise = $http.post(api.url_v2 + \"/bulk_users/\", packageUsers(users), {timeout: deferred.promise})\r\n .then(function(response){\r\n unpackageUsers(response);\r\n return response;\r\n }, function(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n\r\n // ----------------------------\r\n // Bulk Update Users\r\n // ----------------------------\r\n function bulkUpdate(params){\r\n prepare_bulk_communications();\r\n var promise = $http.put(api.url_v2 + \"/bulk_users\", params, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return api.url +(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response.data;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n\r\n //okta status update bulk\r\n\r\n function bulkActivation(params){\r\n prepare_bulk_communications();\r\n var resendUrl = api.url_v2 +'/bulk_users/activate';\r\n var promise = $http.put(resendUrl, params, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return response;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n function bulkDeactivation(params){\r\n prepare_bulk_communications();\r\n var resendUrl = api.url_v2 +'/bulk_users/deactivate';\r\n var promise = $http.put(resendUrl, params, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return response;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n\r\n\r\n function bulkResendVerificationEmail(params){\r\n prepare_bulk_communications();\r\n var resendUrl = api.url_v2 +'/bulk_users/resend_confirmation';\r\n var promise = $http.put(resendUrl, params, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return response;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n function bulkResetPasswordAndSecurityQuestion(params){\r\n prepare_bulk_communications();\r\n var resendUrl = api.url +'/bulk_users/reset_password_and_security_question';\r\n var promise = $http.put(resendUrl, params, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return unpackageUsers(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response.data;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n function bulkDeleteAndResendVerificationEmail(params){\r\n prepare_bulk_communications();\r\n var resendUrl = api.url +'/bulk_users/resend_okta_confirmation';\r\n var promise = $http.put(resendUrl, params, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return unpackageUsers(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response.data;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n function bulkResendImmediateActionEmail(params){\r\n prepare_bulk_communications();\r\n var resendUrl = api.url +'/bulk_users/send_immediate_action_mail';\r\n var promise = $http.put(resendUrl, params, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return unpackageUsers(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response.data;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n function bulkReimportUsers(params){\r\n prepare_bulk_communications();\r\n var resendUrl = api.url +'/bulk_users/reimport';\r\n var promise = $http.put(resendUrl, params, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return unpackageUsers(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response.data;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n\r\n\r\n\r\n\r\n // ----------------------------\r\n // delete the user\r\n // ----------------------------\r\n function bulkDelete(params){\r\n prepare_bulk_communications();\r\n var users = \"?\"+params.user_ids.map(function(d, i){\r\n return \"user_ids%5B%5D=\"+d;}).join('&');\r\n var promise = $http\r\n .delete(api.url_v2 + \"/bulk_users/\" + users, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n unpackageUsers(response);\r\n return response.data.users;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n exitLoadState();\r\n //return promise.reject(response);\r\n } else {\r\n exitLoadState();\r\n return response.data;\r\n }\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n function resendConfirmation(id){\r\n $timeout.cancel(deferred.promise);\r\n return $http.get(api.url_v2 + '/users/' + id + '/resend_confirmation')\r\n }\r\n\r\n function oktaDeactivateUser(id){\r\n $timeout.cancel(deferred.promise);\r\n return $http.put(api.url_v2 + '/users/' + id + '/deactivate')\r\n }\r\n\r\n function oktaActivateUser(id){\r\n $timeout.cancel(deferred.promise);\r\n return $http.put(api.url_v2 + '/users/' + id + '/activate')\r\n }\r\n\r\n function reimportUser(id){\r\n $timeout.cancel(deferred.promise);\r\n return $http.put(api.url + '/users/' + id + '/reimport')\r\n }\r\n\r\n function deleteAndResend(id){\r\n $timeout.cancel(deferred.promise);\r\n return $http.put(api.url + '/users/' + id + '/resend_okta_confirmation')\r\n }\r\n\r\n function immediateActionEmail(id){\r\n $timeout.cancel(deferred.promise);\r\n return $http.put(api.url + '/users/' + id + '/send_immediate_action_mail')\r\n }\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"usersTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"usersTable:loaded\", data);\r\n }\r\n\r\n function unpackageUsers(response,filter){\r\n if(allFilter == 'all'){\r\n var res = response.data.users;\r\n }\r\n if(allFilter == 'ad'){\r\n var res = response.data.ad_users;\r\n }\r\n if(allFilter == 'nonad'){\r\n var res = response.data.non_ad_users;\r\n }\r\n var data_settings = res.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n //user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n //userTable.total(response.headers().total);\r\n userTable.settings({data: data_settings });\r\n userTable.data = data_settings; //response.data.users;\r\n isEmpty = userTable.data.length === 0;\r\n allUsersCount=userTable.data.length;\r\n userTable.page(1);\r\n userTable.total(userTable.data.length);\r\n userTableData=userTable.data;\r\n exitLoadState();\r\n return userTable.data;\r\n }\r\n\r\n\r\n function setUserTableData(response,filter){\r\n var res = response.data.users;\r\n var data_settings = res.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n //user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n userTable.total(response.headers().total);\r\n userTable.settings({data: data_settings });\r\n userTable.data = data_settings; //response.data.users;\r\n isEmpty = userTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return userTable.data;\r\n }\r\n\r\n function getLensgroupUsers(){\r\n var users_url = api.url_v2+'/lens_groups/'+$stateParams.id+'/lens_group_users';\r\n var promise = $http({url: users_url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n var res = response.data.users;\r\n var data_settings = res.map(function(u, i){\r\n var user = angular.copy(u);\r\n //user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n //userTable.total(response.headers().total);\r\n userTable.settings({data: data_settings });\r\n userTable.data = data_settings; //response.data.users;\r\n isEmpty = userTable.data.length === 0;\r\n allUsersCount=userTable.data.length;\r\n userTable.page(1);\r\n userTable.total(userTable.data.length);\r\n userTableData=response.data.users;\r\n\r\n exitLoadState();\r\n return userTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n\r\n }\r\n\r\n // This function sets up comm\r\n function prepare_bulk_communications(){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n $rootScope.$broadcast(\"usersTable:stateChanged\", loading);\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n // console.log(AJAX.TIMEOUT , AJAX)\r\n timeoutTid = $timeout(function() {\r\n // if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n // ---------------------\r\n // Retrieve users\r\n // // ------------------\r\n function getUsers(params,filter,searchParam){\r\n prepare_bulk_communications();\r\n var users_url = api.url_v2+\"/users?\";\r\n\r\n if(filter == 'ad'){\r\n users_url = users_url+\"user_type=ad_users\";\r\n }\r\n if(filter == 'nonad'){\r\n users_url = users_url+\"user_type=non_ad_users\";\r\n }\r\n\r\n if(params == 'lens_group'){\r\n users_url = users_url+\"&lens_group=true\";\r\n }else if(params == 'lens_group_users'){\r\n users_url = api.url_v2+'/lens_groups/'+$stateParams.id+'/edit';\r\n }\r\n else if(params == true){\r\n users_url = users_url+\"&active=true\";\r\n //if(filter == 'ad'){\r\n // users_url = users_url+\"&active=true&user_type=ad_users\";\r\n //}\r\n //if(filter == 'nonad'){\r\n // users_url = users_url+\"&active=true&user_type=non_ad_users\";\r\n //}\r\n }\r\n\r\n if(searchParam){\r\n var queryBuildStr='';\r\n if(searchParam.first_name !== undefined)\r\n queryBuildStr+=\"&first_name=\"+searchParam.first_name;\r\n\r\n if(searchParam.last_name !== undefined)\r\n queryBuildStr+=\"&last_name=\"+searchParam.last_name;\r\n\r\n if(searchParam.email !== undefined)\r\n queryBuildStr+=\"&email=\"+searchParam.email;\r\n\r\n if(searchParam.company){\r\n if(searchParam.company.name !== undefined)\r\n queryBuildStr+=\"&company=\"+searchParam.company.name;\r\n }\r\n\r\n if(searchParam.page !== undefined)\r\n queryBuildStr+=\"&page=\"+searchParam.page;\r\n\r\n if(searchParam.per_page !== undefined)\r\n queryBuildStr+=\"&per_page=\"+searchParam.per_page;\r\n\r\n if(searchParam.key !== undefined){\r\n queryBuildStr+=\"&key=\"+searchParam.key;\r\n queryBuildStr+=\"&criteria=\"+ searchParam.criteria;\r\n }\r\n else\r\n {\r\n queryBuildStr+=\"&key=created_at&criteria=asc\";\r\n }\r\n\r\n if(params !==undefined && params !== '' && params !== false && queryBuildStr != undefined && queryBuildStr!=''){\r\n users_url = users_url+\"&\"+queryBuildStr;\r\n if(users_url.includes('?&'))\r\n users_url = users_url.replace('?&','?');\r\n if(users_url.includes('&&'))\r\n users_url = users_url.replace('&&','&');\r\n }\r\n else if(queryBuildStr != undefined && queryBuildStr!=''){\r\n users_url = users_url+queryBuildStr;\r\n if(users_url.includes('?&'))\r\n users_url = users_url.replace('?&','?');\r\n if(users_url.includes('&&'))\r\n users_url = users_url.replace('&&','&');\r\n\r\n }\r\n }\r\n\r\n var promise = $http({url: users_url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n //// console.log(response);\r\n userTable.settings({data: response.data.users});\r\n userTable.data = response.data.users;\r\n $rootScope.$broadcast(\"userTable:all:loaded\", response.data);\r\n $rootScope.$broadcast(\"userTable:all:loadedlensusers\", response.data.users);\r\n allUsersCount=response.data.total_count;\r\n userTableData=response.data.users;\r\n userTable.page(searchParam.page);\r\n userTable.total(response.data.total_count);\r\n $rootScope.$broadcast(\"usersTable:stateChanged\", false);\r\n return userTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n\r\n function getUsersFilter(query,filter,status,type){\r\n prepare_bulk_communications();\r\n var users_url = api.url_v2+\"/users?\";\r\n\r\n if(type == 'ad'){\r\n users_url = users_url+\"user_type=ad_users\";\r\n }\r\n if(type == 'nonad'){\r\n users_url = users_url+\"user_type=non_ad_users\";\r\n }\r\n\r\n if(status)\r\n users_url = users_url+\"&active=true\";\r\n\r\n\r\n if(query.search){\r\n var queryBuildStr='';\r\n if(query.search.first_name !== undefined)\r\n queryBuildStr+=\"&first_name=\"+query.search.first_name;\r\n\r\n if(query.search.last_name !== undefined)\r\n queryBuildStr+=\"&last_name=\"+query.search.last_name;\r\n\r\n if(query.search.email !== undefined)\r\n queryBuildStr+=\"&email=\"+query.search.email;\r\n\r\n if(query.search.company){\r\n if(query.search.company.name !== undefined)\r\n queryBuildStr+=\"&company=\"+query.search.company.name;\r\n }\r\n\r\n if(query.search.page !== undefined)\r\n queryBuildStr+=\"&page=\"+query.search.page;\r\n\r\n if(query.search.per_page !== undefined)\r\n queryBuildStr+=\"&per_page=\"+query.search.per_page;\r\n\r\n if(query.search.key !== undefined){\r\n queryBuildStr+=\"&key=\"+query.search.key;\r\n queryBuildStr+=\"&criteria=\"+ query.search.criteria;\r\n }\r\n else\r\n {\r\n queryBuildStr+=\"&key=created_at&criteria=asc\";\r\n }\r\n\r\n if(type !==undefined && type !== 'all' && queryBuildStr != undefined && queryBuildStr!=''){\r\n users_url = users_url+\"&\"+queryBuildStr;\r\n if(users_url.includes('?&'))\r\n users_url = users_url.replace('?&','?');\r\n if(users_url.includes('&&'))\r\n users_url = users_url.replace('&&','&');\r\n }\r\n else if(queryBuildStr != undefined && queryBuildStr!=''){\r\n users_url = users_url+queryBuildStr;\r\n if(users_url.includes('?&'))\r\n users_url = users_url.replace('?&','?');\r\n if(users_url.includes('&&'))\r\n users_url = users_url.replace('&&','&');\r\n }\r\n }\r\n\r\n var user_params = {};\r\n if(status == false)\r\n user_params = {customer_types:JSON.stringify(query.customer_types), filter_only: filter};\r\n else\r\n user_params = {customer_types:JSON.stringify(query.customer_types), filter_only: filter, active: status};\r\n\r\n var promise =\r\n $http({\r\n url: users_url,\r\n method: \"GET\",\r\n params: user_params\r\n }).then(function onSuccess(response){\r\n //// console.log(response);\r\n\r\n userTable.settings({data: response.data.users});\r\n userTable.data = response.data.users;\r\n $rootScope.$broadcast(\"userTable:all:loaded\", response.data);\r\n $rootScope.$broadcast(\"userTable:all:loadedlensusers\", response.data.users);\r\n allUsersCount=response.data.total_count;\r\n userTableData=response.data.users;\r\n userTable.page(query.search.page);\r\n userTable.total(response.data.total_count);\r\n $rootScope.$broadcast(\"usersTable:stateChanged\", false);\r\n return userTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // ----------------------------\r\n // POST to upload a file\r\n // ----------------------------\r\n function uploadFile(file, errFiles) {\r\n return Upload.upload({\r\n url: api.url_v2 + '/bulk_users/import',\r\n method: 'POST',\r\n data: {user_csv: file}\r\n }).then(function (response) {\r\n bulk_users.length = 0;\r\n response.data.map(function(f){ bulk_users.push(f); });\r\n });\r\n }\r\n\r\n // ----------------------------\r\n // Post errors to mail users\r\n // ----------------------------\r\n function sendErrorsToEmails(emailList, users){\r\n return $http.post(api.url_v2 + '/bulk_users/error_export', {\"emailList\" : emailList,\"users\" :users }, {timeout: deferred.promise})\r\n .then(function(response){\r\n return response;\r\n }, function(response){\r\n return response;\r\n });\r\n }\r\n\r\n function getBulkUsers(){\r\n //// console.log(bulk_users);\r\n\r\n return bulk_users;\r\n }\r\n\r\n // ----------------------------\r\n // Create Users in bulk\r\n // ----------------------------\r\n function postBulkUsers(users){\r\n users = users.map(function(user){\r\n var u = {};\r\n [\"first_name\", \"last_name\", \"company_id\", \"email\",\"customer_types\", \"roles\", \"pathway_role\",\"party_id_overrides\",\"bccs_overrides\",\"primary_contact_overrides\"].map(function(key){\r\n u[key] = user[key];\r\n });\r\n return u;\r\n })\r\n\r\n\r\n return $http.post(api.url_v2 + '/bulk_users', {\"users\" : users}, {timeout: deferred.promise})\r\n .then(function(response){\r\n return response;\r\n }, function(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n // return $http.post(url, packageUser(user), {timeout: deferred.promise})\r\n //\r\n }\r\n\r\n function parsePermissions(permissions){\r\n var results = {}, field = \"\";\r\n for (var key in permissions){\r\n results[key] = {};\r\n for (var i in permissions[key].options){\r\n field = permissions[key].options[i];\r\n field.group.map(function(d) { results[key][d] = field.value ? field.value: false; });\r\n }\r\n for (var i in permissions[key].options_classic){\r\n field = permissions[key].options_classic[i];\r\n field.group.map(function(d) { results[key][d] = field.value ? field.value: false; });\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function parsePermissionsCsl(permissions){\r\n var results = {}, field = \"\";\r\n for (var key in permissions){\r\n results[key] = {};\r\n for (var i in permissions[key].options_csl){\r\n field = permissions[key].options_csl[i];\r\n field.group.map(function(d) { results[key][d] = field.value ? field.value: false; });\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function parsePermissionsCfs(permissions){\r\n var results = {}, field = \"\";\r\n for (var key in permissions){\r\n results[key] = {};\r\n for (var i in permissions[key].options_cfs){\r\n field = permissions[key].options_cfs[i];\r\n field.group.map(function(d) { results[key][d] = field.value ? field.value: false; });\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function parsePermissionsCmts(permissions){\r\n var results = {}, field = \"\";\r\n for (var key in permissions){\r\n results[key] = {};\r\n for (var i in permissions[key].options_cmts){\r\n field = permissions[key].options_cmts[i];\r\n field.group.map(function(d) { results[key][d] = field.value ? field.value: false; });\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n\r\n // --------------------------------------\r\n // Package the user for create and update\r\n // --------------------------------------\r\n function packageUser(theUser){\r\n\r\n theUser = theUser || user;\r\n\r\n //// console.log(theUser);\r\n var keys = ['first_name', 'last_name', 'email', 'phone', 'title', 'password', 'company_id','customer_types','customer_type_setup',\r\n 'group_ids', 'is_active', 'notification_settings','milestone_setting','crane_contact',\r\n 'roles', 'role', 'super_admin', 'photo_url', 'force_verify','lens_group_ids','ad_user','is_reskin','is_discussion','is_discussion_csl','is_discussion_cfs','reskin_type'];\r\n\r\n /*var keys = ['first_name', 'last_name', 'email', 'phone', 'title', 'password', 'company_id','customer_type','customer_type_setup',\r\n 'group_ids', 'party_id_names', 'related_party_id_names', 'is_active', 'notification_settings',\r\n 'roles', 'role', 'super_admin', 'photo_url', 'force_verify','lens_group_ids','ad_user','department_ids','is_reskin_company','company_reskin_type'];*/\r\n\r\n var superAdminCheck = theUser.permissions['Admin']['options'][0]['value'] ? true : false;\r\n var superAdminCheckCsl = theUser.permissions['Admin']['options_csl'][0]['value'] ? true : false;\r\n var superAdminCheckCfs = theUser.permissions['Admin']['options_cfs'][0]['value'] ? true : false;\r\n var superAdminCheckCmts = theUser.permissions['Admin']['options_cmts'][0]['value'] ? true : false;\r\n\r\n var updatedUser = {};\r\n\r\n\r\n for(var k in keys) {\r\n\r\n if((theUser[keys[k]] || theUser[keys[k]] === false) && theUser[keys[k]] !== '') {\r\n updatedUser[keys[k]] = theUser[keys[k]];\r\n\r\n\r\n }\r\n\r\n\r\n if (theUser[\"del_\"+keys[k]]){\r\n\r\n updatedUser[keys[k]] = \"\";\r\n }\r\n }\r\n\r\n\r\n // Contacts\r\n var meUser = UserService.getUserData();\r\n if (meUser.company.is_crane) {\r\n if (!theUser.bccs.default){\r\n updatedUser.bccs = theUser.bccs.values;\r\n }\r\n //if (!theUser.contact.default && theUser.contact.primary_contact && theUser.contact.primary_contact.id){\r\n if (!theUser.contact.default && theUser.contact.primary_contact ){\r\n updatedUser.contact_id = \"\"+theUser.contact.primary_contact;\r\n } else {\r\n updatedUser.contact_id = \"\";\r\n }\r\n }\r\n else {\r\n delete updatedUser['bccs'];\r\n delete updatedUser['contact_id'];\r\n }\r\n\r\n updatedUser.permissions = {};\r\n updatedUser.permissions.cww = parsePermissions(theUser.permissions);\r\n updatedUser.permissions.csl = parsePermissionsCsl(theUser.permissions);\r\n updatedUser.permissions.cfs = parsePermissionsCfs(theUser.permissions);\r\n updatedUser.permissions.cmts = parsePermissionsCmts(theUser.permissions);\r\n\r\n // for (var key in theUser.permissions){\r\n // updatedUser.permissions[key] = {};\r\n // for (var i in theUser.permissions[key].options){\r\n // var field = theUser.permissions[key].options[i];\r\n // field.group.map(function(d){ updatedUser.permissions[key][d] = field.value; });\r\n // }\r\n // }\r\n\r\n if (theUser.is_ad_user) {\r\n updatedUser.ad_user = true;\r\n }else{\r\n updatedUser.ad_user = false;\r\n }\r\n\r\n //updatedUser.super_admin = superAdminCheck;\r\n updatedUser.super_admin = {};\r\n updatedUser.super_admin.cww = superAdminCheck;\r\n updatedUser.super_admin.csl = superAdminCheckCsl;\r\n updatedUser.super_admin.cfs = superAdminCheckCfs;\r\n updatedUser.super_admin.cmts = superAdminCheckCmts;\r\n\r\n // is crane contact\r\n //updatedUser.roles = [theUser.role] || [];\r\n\r\n updatedUser.roles = {};\r\n\r\n if(theUser.role == null){ theUser.role = \"\"; }\r\n\r\n if(theUser.role != null || theUser.role != undefined){ updatedUser.roles.cww = [theUser.role] || []; }\r\n if(theUser.role_csl != null || theUser.role_csl != undefined){ updatedUser.roles.csl = [theUser.role_csl] || []; }\r\n if(theUser.role_cfs != null || theUser.role_cfs != undefined){ updatedUser.roles.cfs = [theUser.role_cfs] || []; }\r\n if(theUser.role_cmts != null || theUser.role_cmts != undefined){ updatedUser.roles.cmts = [theUser.role_cmts] || []; }\r\n if(theUser.role_classic != null || theUser.role_classic != undefined){\r\n updatedUser.roles.cww.push(theUser.role_classic); }\r\n\r\n if(superAdminCheck){ updatedUser.roles.cww.push('super_admin'); }\r\n if(superAdminCheckCsl){ updatedUser.roles.csl.push('super_admin'); }\r\n if(superAdminCheckCfs){ updatedUser.roles.cfs.push('super_admin'); }\r\n if(superAdminCheckCmts){ updatedUser.roles.cmts.push('super_admin'); }\r\n if (theUser.is_crane_contact) {\r\n //updatedUser.roles.generic = [];\r\n //updatedUser.roles.generic.push('crane_contact');\r\n updatedUser.crane_contact = theUser.is_crane_contact;\r\n // uncaching the contacts so this user can be added\r\n cachedContacts = false;\r\n }else{\r\n updatedUser.crane_contact = theUser.is_crane_contact;\r\n // uncaching the contacts so this user can be added\r\n cachedContacts = false;\r\n }\r\n if(theUser.permissions.SupportRequestUser.options[0].value == true){\r\n //updatedUser.roles.push('support_request_user');\r\n updatedUser.roles.cww.push('support_request_user');\r\n }\r\n if(theUser.permissions.SupportRequestAdmin.options[0].value == true){\r\n //updatedUser.roles.push('support_request_admin');\r\n updatedUser.roles.cww.push('support_request_admin');\r\n }\r\n if(theUser.permissions.SupportRequestValidator.options[0].value == true){\r\n //updatedUser.roles.push('support_request_user');\r\n updatedUser.roles.cww.push('support_request_validator');\r\n }\r\n if(theUser.permissions.CviewClassicAdmin.options[0].value == true){\r\n //updatedUser.roles.push('support_request_admin');\r\n updatedUser.roles.cww.push('cview_classic_admin');\r\n }\r\n // else {\r\n // var ix = theUser.roles ? theUser.roles.indexOf('crane_contact') : -1;\r\n // if (ix !== -1) {\r\n // updatedUser.roles.splice(ix, 1);\r\n // // uncaching the contacts so this user can be removed\r\n // cachedContacts = false;\r\n // }\r\n // }\r\n return updatedUser;\r\n }\r\n\r\n function unpackageUser(user_data){\r\n for (var field in user_data){\r\n\r\n if(field == 'customer_types'){\r\n if(user_data[field].includes('cww')){ user['is_cww'] = true; }else{ user['is_cww'] = false; }\r\n if(user_data[field].includes('csl')){ user['is_csl'] = true; }else{ user['is_csl'] = false; }\r\n if(user_data[field].includes('cfs')){ user['is_cfs'] = true; }else{ user['is_cfs'] = false; }\r\n if(user_data[field].includes('cmts')){ user['is_cmts'] = true; }else{ user['is_cmts'] = false; }\r\n }\r\n if (field == 'bccs' && user_data.bccs.default) continue;\r\n if (field == 'contact' && user_data.contact.default){\r\n // user.contact.primary_contact = user_data.contact.primary_contact.id;\r\n //user[field]['primary_contact'] = user_data.contact.primary_contact.id;\r\n continue;\r\n }\r\n user[field] = user_data[field];\r\n }\r\n user.company_id = user.company.id;\r\n\r\n // if (user.roles && user.roles.indexOf('crane_contact') !== -1) {\r\n // user.is_crane_contact = true;\r\n // }\r\n\r\n user.is_crane_contact = user.crane_contact;\r\n\r\n if (user.ad_user == true) {\r\n user.is_ad_user = true;\r\n }\r\n user.permissions = PermissionsService.hasPermissions(permissions, user.permissions);\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autoCompletes(query,departments,type){\r\n var dfd = $q.defer();\r\n var depart = [];\r\n var autocompletes = departments.map(function(d){\r\n if(d.customer_type == type){\r\n depart.push(d.name);\r\n }\r\n return {\r\n value: d.id,\r\n display: d.name\r\n };\r\n });\r\n var filterVals = find(query.value,depart);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCww(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCsl(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCfs(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCmts(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n // function validateField(field, value){\r\n // var url = api.url + '/bulk_users/validate_field';\r\n\r\n // var deferred = $q.defer();\r\n\r\n // $http({\r\n // url: url,\r\n // method: 'GET',\r\n // params: {field: field, value: value}\r\n // }).then(function(data) {\r\n // // Found the user, therefore not unique.\r\n\r\n\r\n // //if (data[field].valid === true){\r\n // deferred.resolve()\r\n // // }\r\n // //else {\r\n // //deferred.reject();\r\n // // }\r\n\r\n // });\r\n\r\n // return deferred.promise;\r\n // }\r\n\r\n\r\n\r\n // ----------------------------\r\n // Create a user\r\n // ----------------------------\r\n function postUser(user){\r\n $timeout.cancel(deferred.promise);\r\n return $http.post(api.url_v2 + '/users', packageUser(user), {timeout: deferred.promise})\r\n .then(function(response){\r\n unpackageUser(response.data);\r\n return response;\r\n }, function(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n }\r\n\r\n\r\n // ----------------------------\r\n // Update the user\r\n // ----------------------------\r\n function updateUser(id, theUser){\r\n //// console.log(theUser);\r\n $timeout.cancel(deferred.promise);\r\n return $http.put(api.url_v2 + '/users/' + id, packageUser(theUser)/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n //// console.log(response.data);\r\n unpackageUser(response.data);\r\n return response;\r\n\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n }\r\n\r\n\r\n //-----------------------------------\r\n // update sync AD Data\r\n //-----------------------------------\r\n\r\n function updateAdUserData(id){\r\n //// console.log(theUser);\r\n var adurl = api.url + \"/users/\"+ user.id +\"/resync_ad\";\r\n $timeout.cancel(deferred.promise);\r\n var promise = $http({url: adurl, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return response;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n\r\n // ----------------------------\r\n // delete the user\r\n // ----------------------------\r\n function deleteUser(id){\r\n $timeout.cancel(deferred.promise);\r\n var promise = $q.defer();\r\n $http.delete(api.url_v2 + '/users/' + id, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n //--------------------------\r\n // Returns a blank user object\r\n //--------------------------\r\n function createUserObject(user_data) {\r\n var u = {\r\n bccs:{values:[]},\r\n contact:{},\r\n permissions: {\r\n PotentialException: {},\r\n Shipment: {},\r\n User: {},\r\n BookShipment: {}\r\n },\r\n department_ids: [],\r\n department_ids_cww: [],\r\n department_ids_csl: [],\r\n department_ids_cfs: [],\r\n department_ids_cmts: [],\r\n party_id_names: [],\r\n party_id_names_cww: [],\r\n party_id_names_csl: [],\r\n party_id_names_cfs: [],\r\n party_id_names_cmts: [],\r\n default_bccs_cfs: [],\r\n default_bccs_csl: [],\r\n default_bccs_cww: [],\r\n default_bccs_cmts: [],\r\n related_party_id_names: [],\r\n notification_settings: {\r\n potential_exceptions: true,\r\n exceptions: true,\r\n milestone_delivered: true\r\n },\r\n is_crane_contact: false,\r\n is_ad_user: false,\r\n is_cww:false,\r\n is_csl:false,\r\n is_cfs:false,\r\n is_cmts:false,\r\n is_reskin: false,\r\n is_discussion: false,\r\n is_discussion_csl: false,\r\n is_discussion_cfs: false,\r\n is_discussion_cmts: false,\r\n crane_contact: false,\r\n resetBCCS: resetBCCS,\r\n getName: getName,\r\n resetPrimary: resetPrimary,\r\n loadData: loadData\r\n\r\n };\r\n\r\n\r\n if (user_data){\r\n loadData();\r\n }\r\n\r\n function getName() {\r\n return u.first_name || u.last_name ? u.first_name + \" \" + u.last_name : u.email;\r\n }\r\n\r\n function resetBCCS(){\r\n u.bccs.values = [];\r\n u.bccs.values.length = 0;\r\n }\r\n\r\n function resetPrimary(){\r\n u.contact.primary_contact = {};\r\n }\r\n\r\n\r\n\r\n\r\n function loadData(){\r\n for (var field in user_data){\r\n if (field == 'bccs' && user_data.bccs.default) continue;\r\n if (field == 'contact' && user_data.contact.default) continue;\r\n u[field] = user_data[field];\r\n }\r\n u.company_id = u.company.id;\r\n if (u.roles && u.roles.indexOf('crane_contact') !== -1) {\r\n u.is_crane_contact = true;\r\n }\r\n if (u.ad_user == true) {\r\n u.is_ad_user = true;\r\n }\r\n u.permissions = PermissionsService.hasPermissions(permissions, u.permissions);\r\n }\r\n return u;\r\n }\r\n\r\n function setSelectedLensUsers(data){\r\n selectedUsers = data;\r\n\r\n\r\n }\r\n function getSelectedLensUsers(data){\r\n return selectedUsers;\r\n\r\n }\r\n function clearUserData(){\r\n userTable.data = [];\r\n userTable.settings().dataset = [];\r\n userTable.reload();\r\n }\r\n function getCompanyUsers(){\r\n\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n var company_url = api.url_v2+\"/companies\";\r\n //// console.log(company_url);\r\n if($stateParams.id)\r\n company_url = api.url_v2+'/companies/'+$stateParams.id;\r\n\r\n var promise = $http({url: company_url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n //// console.log(response);\r\n userTable.settings({data: response.data.users});\r\n userTable.data = response.data.users;\r\n isEmpty = userTable.data.length === 0;\r\n allUsersCount=userTable.data.length;\r\n userTable.page(1);\r\n userTable.total(userTable.data.length);\r\n userTableData=response.data.users;\r\n loading = false;\r\n return userTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n }\r\n\r\n\r\n\r\n\r\n\r\n }\r\n})();\r\n\nangular.module('app.admin').directive('iframeOnload', [function () {\r\n return {\r\n link: function (scope, element, attrs) {\r\n element.on(\"load\", function () { iframeReady(scope) });\r\n }\r\n }\r\n}])\r\n\r\nangular.module('app.admin').directive('cstockIframeOnload', [function () {\r\n return {\r\n link: function (scope, element, attrs) {\r\n element.ready(function () { iframeReady(scope) });\r\n }\r\n }\r\n}])\r\n\r\nfunction iframeReady(scope) {\r\n scope.showLoaderImage = false;\r\n}\r\n\r\n\r\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('UserManagementController', UserManagementController)\r\n .controller('UserController', UserController);\r\n\r\n UserManagementController.$inject = [\"$scope\", \"$filter\", \"$rootScope\", \"UserManagementService\", 'UserService', \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', '$mdMedia', '$mdDialog', '$http', 'mdSelectHelper', '$timeout', 'DownloadService', 'userLensGroupService', 'ngTableEventsChannel', 'CompanyManagementService'];\r\n function UserManagementController($scope, $filter, $rootScope, UserManagementService, UserService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, $mdMedia, $mdDialog, $http, mdSelectHelper, $timeout, DownloadService, userLensGroupService, ngTableEventsChannel, CompanyManagementService) {\r\n\r\n var vm = this;\r\n // ----------------------------------------------------\r\n // User Table Variables\r\n // ----------------------------------------------------\r\n vm.exceptionFilter = UserManagementService.getExceptionFilterPersist();\r\n vm.counts = { all: { all: 0, ad: 0, nonad: 0 } };\r\n vm.link = [\r\n { field: \"id\", column: \"email\", url: \"users\" },\r\n { field: \"id\", column: \"edit\", url: \"users\" },\r\n { field: \"company.id\", column: \"company.name\", url: \"companies\" }\r\n ];\r\n vm.icon = \"supervisor_account\";\r\n vm.columns = [\r\n { \"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"user_status\", \"title\": 'USER.STATUS', \"sortable\": \"user_status\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n //{\"field\": \"is_active\", \"title\": 'USER.STATUS', \"sortable\": \"status\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n { \"field\": \"customer_types\", \"title\": 'Customer Type', \"sortable\": \"customer_types\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"last_name\", \"title\": 'USER.LAST_NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"first_name\", \"title\": 'USER.FIRST_NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"email\", \"title\": 'USER.EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"company.name\", \"title\": 'USER.COMPANY', \"sortable\": \"company.name\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"edit\", \"title\": 'Actions', \"sortable\": \"\", \"filter\": {}, \"show\": \"true\", isDate: false }\r\n ];\r\n vm.buttons = [\r\n { id: 0, action: add_user, display: 'USER.ADD_USER', icon: 'add' },\r\n { id: 1, action: importUsers, display: 'USER.BULK.IMPORT_USERS', icon: 'assignment_ind' }\r\n ];\r\n // Collapisible widgit\r\n vm.lookup = { first_name: \"\", last_name: \"\", company: { name: \"\" }, email: \"\", group: \"\", active: \"\" };\r\n vm.user_states = [\"\", \"Active\", \"Inactive\"];\r\n // ----------------------------------------------------\r\n // User Edit Variables\r\n // ----------------------------------------------------\r\n vm.role = [];\r\n vm.switchTrue = true;\r\n vm.switchFalse = false;\r\n vm.lookupTimeout = false;\r\n vm.bulk_users = [];\r\n vm.file = null;\r\n vm.isSave = false;\r\n vm.saveBtnShow = false;\r\n vm.canSelect = true;\r\n vm.userSearchNotEnable = true;\r\n vm.lastSelected = 0;\r\n vm.lastSelectedValue = true;\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n vm.isLoading = { account: false, role: false, contact: false, table: true };\r\n vm.isActionLoading = { save: false };\r\n vm.status = { cssClass: \"md-primary\" }\r\n vm.roles = UserManagementService.getRoles();\r\n vm.roles_csl = UserManagementService.getRolesCsl();\r\n vm.roles_cfs = UserManagementService.getRolesCfs();\r\n vm.roles_cmts = UserManagementService.getRolesCmts();\r\n vm.roles_classic = UserManagementService.getRolesClassic();\r\n vm.permissions = UserManagementService.getPermissions();\r\n vm.selectAll = false;\r\n vm.permissions_display = ['PotentialException', 'Shipment', 'Company', 'User', 'BookShipment', 'Group'].filter(function (g) {\r\n return isPermissionsIn(g)\r\n });\r\n vm.permissions_enable = {};\r\n vm.permissions_display.map(function (p) { vm.permissions_enable[p] = false; });\r\n\r\n vm.clean_permissions = angular.copy(vm.permissions);\r\n\r\n //-----------\r\n // Functions\r\n //-----------\r\n // Table\r\n // ----------\r\n vm.getField = getField;\r\n vm.isLink = isLink;\r\n vm.getClass = getClass;\r\n vm.getLink = getLink;\r\n vm.getTable = getTable;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.selectUser = selectUser;\r\n vm.currentUser = UserService.getUserData();\r\n vm.setFilter = setFilter;\r\n vm.onCompanyChange = onCompanyChange;\r\n vm.addDepartments = addDepartments;\r\n vm.removeDepartments = removeDepartments;\r\n // ----------\r\n // Edit User\r\n // ----------\r\n vm.activateUser = activateUser;\r\n vm.checkAll = checkAll;\r\n vm.bulkActivate = bulkActivate;\r\n vm.bulkDeactivate = bulkDeactivate;\r\n vm.bulkDelete = bulkDelete;\r\n vm.bulkEdit = bulkEdit;\r\n vm.bulkResendVerificationEmail = bulkResendVerificationEmail;\r\n vm.bulkResetPasswordAndSecurityQuestion = bulkResetPasswordAndSecurityQuestion;\r\n vm.bulkResendImmediateActionEmail = bulkResendImmediateActionEmail;\r\n vm.bulkReimportUsers = bulkReimportUsers;\r\n vm.bulkDeleteAndResendVerificationEmail = bulkDeleteAndResendVerificationEmail;\r\n vm.deactivateUser = deactivateUser;\r\n vm.reimportUser = reimportUser;\r\n vm.deleteAndResend = deleteAndResend;\r\n vm.immediateActionEmail = immediateActionEmail;\r\n vm.deleteUser = deleteUser;\r\n vm.confirmUser = confirmUser;\r\n vm.importUsers = importUsers;\r\n vm.uploadFile = uploadFile;\r\n vm.getDefaultContact = getDefaultContact;\r\n vm.getDefaultBCCs = getDefaultBCCs;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.getName = getName;\r\n vm.getMatch = getMatch;\r\n vm.getMatchs = getMatchs;\r\n vm.getMatchCww = getMatchCww;\r\n vm.getMatchCsl = getMatchCsl;\r\n vm.getMatchCfs = getMatchCfs;\r\n vm.getMatchCmts = getMatchCmts;\r\n vm.hasIcon = hasIcon;\r\n vm.getIcon = getIcon;\r\n vm.isSafari = isSafari;\r\n vm.resetAll = resetAll;\r\n vm.resetBCCS = resetBCCS;\r\n vm.resetPrimary = resetPrimary;\r\n vm.updateAccount = updateAccount;\r\n vm.formIsValid = formIsValid;\r\n vm.checkError = checkError;\r\n vm.userSearch = userSearch;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.canSetIsCraneContact = canSetIsCraneContact;\r\n vm.canSetSuperAdmin = canSetSuperAdmin;\r\n vm.canSetPermissions = canSetPermissions;\r\n vm.onRoleChange = onRoleChange;\r\n vm.onRoleChangeClassic = onRoleChangeClassic;\r\n vm.onRoleChangeCSL = onRoleChangeCSL;\r\n vm.onRoleChangeCFS = onRoleChangeCFS;\r\n vm.onRoleChangeCMTS = onRoleChangeCMTS;\r\n vm.onPermissionsChange = onPermissionsChange;\r\n vm.onPermissionsChangeClassic = onPermissionsChangeClassic;\r\n vm.onPermissionsChangeCSL = onPermissionsChangeCSL;\r\n vm.onCslToggle = onCslToggle;\r\n vm.onCfsToggle = onCfsToggle;\r\n vm.onCmtsToggle = onCmtsToggle;\r\n vm.onPermissionsChangeCFS = onPermissionsChangeCFS;\r\n vm.onPermissionsChangeCMTS = onPermissionsChangeCMTS;\r\n vm.manageLensGroupDisabled = manageLensGroupDisabled;\r\n vm.isPermissionsIn = isPermissionsIn;\r\n vm.getRemainingPermissionGroupsAmountArray = getRemainingPermissionGroupsAmountArray; // for when you really want to be descriptive!\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.parseFilename = parseFilename;\r\n vm.logsVisible = logsVisible;\r\n vm.downloadXLSXTemplate = downloadXLSXTemplate;\r\n vm.getBulkUsers = UserManagementService.getBulkUsers();\r\n vm.resendConfirmation = resendConfirmation;\r\n vm.onClose = onClose;\r\n vm.testChange = testChange();\r\n vm.showLensView = showLensView;\r\n vm.changePermissions = changePermissions;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $scope.stateName = $state.current.name;\r\n vm.removeDuplicates = removeDuplicates;\r\n $scope.party_id_names_exist = [];\r\n $scope.related_party_id_names_exist = [];\r\n vm.isReadOnly = true;\r\n $scope.showLoaderImage = true;\r\n vm.changeReskin = changeReskin;\r\n vm.reskin_check = true;\r\n vm.onReskinChange = onReskinChange;\r\n vm.updateAdUserData = updateAdUserData;\r\n vm.array_unique = array_unique;\r\n vm.customerCheck = false;\r\n vm.cww_check = true;\r\n vm.csl_check = true;\r\n vm.cfs_check = true;\r\n vm.cmts_check = true;\r\n vm.cww_visibility = true;\r\n vm.discussion_visibility = false;\r\n vm.discussion_visibility_csl = false;\r\n vm.discussion_visibility_cfs = false;\r\n vm.csl_visibility = true;\r\n vm.cfs_visibility = true;\r\n vm.cmts_visibility = true;\r\n vm.is_active_cehck = false;\r\n vm.changeActiveStatus = changeActiveStatus;\r\n vm.customer_type_cehck = false;\r\n vm.cww_setup = cww_setup;\r\n vm.csl_setup = csl_setup;\r\n vm.cfs_setup = cfs_setup;\r\n vm.cmts_setup = cmts_setup;\r\n vm.userSearchFilter = userSearchFilter;\r\n vm.showCwwData = showCwwData;\r\n vm.showCslData = showCslData;\r\n vm.showCfsData = showCfsData;\r\n vm.showCmtsData = showCmtsData;\r\n vm.filterCheck = true;\r\n vm.CustomerFilter = CustomerFilter;\r\n vm.c_view_lens_mode_check = false;\r\n vm.changeCslAllClients = changeCslAllClients;\r\n vm.classicDivCheck = false;\r\n vm.selectAllClientRole = \"\";\r\n vm.cww_filter = false;\r\n vm.csl_filter = false;\r\n vm.cfs_filter = false;\r\n vm.cmts_filter = false;\r\n var searchInitial = {};\r\n if ($location.search() && !($location.search().per_page > 0))\r\n searchInitial['per_page'] = 10;\r\n if ($location.search() && !($location.search().page > 0))\r\n searchInitial['page'] = 1;\r\n $location.search(searchInitial);\r\n\r\n if ($state.current.name == 'manageUsers') {\r\n vm.EditTab = true;\r\n }\r\n\r\n vm.globals = {};\r\n vm.globals.tableParams1 = new NgTableParams({}, {\r\n debugId: \"Table 1\",\r\n dataset: []\r\n });\r\n\r\n $scope.$on('saveBtnChecking', function (evt, loading) {\r\n if (loading == undefined) {\r\n vm.saveBtnShow = false;\r\n } else {\r\n vm.saveBtnShow = loading;\r\n }\r\n\r\n });\r\n\r\n\r\n UserManagementService.setUserAddCheck();\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n function subscribeToTable(tableParams) {\r\n if (!tableParams) return;\r\n ngTableEventsChannel.onPagesChanged(function (p1, p2, p3) {\r\n var tmp = 0\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n angular.forEach(vm.userTable.data, function (v, k) {\r\n if (v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.userTable.data.length == tmp && tmp > 0)\r\n }, $scope, tableParams);\r\n }\r\n\r\n vm.lensviewtitle = \"This User has access to the following Lens Groups:\";\r\n\r\n var newPrimaryContact = 0;\r\n function testChange(test) {\r\n // console.log(test);\r\n }\r\n\r\n vm.removableFields = [\"first_name\", \"last_name\", \"phone\", \"title\"];\r\n\r\n\r\n function CustomerFilter(val) {\r\n if (vm.cww_filter == true || vm.csl_filter == true || vm.cfs_filter == true || vm.cmts_filter == true) {\r\n vm.filterCheck = false;\r\n } else {\r\n vm.filterCheck = true;\r\n vm.filter_only = false;\r\n }\r\n }\r\n\r\n function changeCslAllClients(ev, val, selectedAllCleintRole) {\r\n vm.selectAllClientRole = selectedAllCleintRole;\r\n if (val == false) {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/users/modals/csl-all-clients.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n }\r\n\r\n\r\n function changeActiveStatus(val) {\r\n var check;\r\n var query = {};\r\n var customer_type = [];\r\n var search = $location.search();\r\n\r\n if (search.page == undefined)\r\n search.page = 1;\r\n\r\n if (search.per_page == undefined)\r\n search.per_page = 10;\r\n\r\n if (vm.cww_filter == true) {\r\n customer_type.push('cww');\r\n }\r\n if (vm.csl_filter == true) {\r\n customer_type.push('csl');\r\n }\r\n if (vm.cfs_filter == true) {\r\n customer_type.push('cfs');\r\n }\r\n if (vm.cmts_filter == true) {\r\n customer_type.push('cmts');\r\n }\r\n\r\n if (val == false && customer_type.length == 0) {\r\n check = true;\r\n UserManagementService.getUsers(check, vm.exceptionFilter.value, search);\r\n }\r\n if (val == true && customer_type.length == 0) {\r\n check = false;\r\n UserManagementService.getUsers('', vm.exceptionFilter.value, search);\r\n }\r\n\r\n if (val == false && customer_type.length > 0) {\r\n check = true;\r\n if (vm.cww_filter == true || vm.csl_filter == true || vm.cfs_filter == true || vm.cmts_filter == true) {\r\n vm.isLoading.table = true;\r\n query.customer_types = customer_type;\r\n query.search = search;\r\n UserManagementService.getUsersFilter(query, vm.filter_only, check);\r\n }\r\n }\r\n\r\n if (val == true && customer_type.length > 0) {\r\n check = false;\r\n if (vm.cww_filter == true || vm.csl_filter == true || vm.cfs_filter == true || vm.cmts_filter == true) {\r\n vm.isLoading.table = true;\r\n query.customer_types = customer_type;\r\n query.search = search;\r\n UserManagementService.getUsersFilter(query, vm.filter_only, check);\r\n }\r\n }\r\n }\r\n\r\n function onReskinChange(val) {\r\n if (val == \"default\") {\r\n vm.reskin_check = true;\r\n vm.user.is_reskin = false;\r\n }\r\n }\r\n\r\n function cww_setup(val) {\r\n if (val == false) {\r\n vm.cww_check = true;\r\n }\r\n if (val == true) {\r\n vm.cww_check = false;\r\n }\r\n if (val == false || val == true) {\r\n vm.user.role = null;\r\n vm.user.role_classic = null;\r\n // vm.user.is_reskin = false;\r\n // vm.user.primary_contact_cww = \"\";\r\n // vm.user.default_bccs_cww = [];\r\n // vm.user.party_id_names_cww = [];\r\n // vm.user.related_party_id_names = [];\r\n // vm.user.department_ids_cww = [];\r\n // $scope.related_party_id_names_exist_cww = [];\r\n\r\n //vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options[0].value = false;\r\n vm.permissions.Company.options[0].value = false;\r\n vm.permissions.Company.options[1].value = false;\r\n vm.permissions.Company.options[2].value = false;\r\n vm.permissions.Group.options[0].value = false;\r\n vm.permissions.Shipment.options[0].value = false;\r\n vm.permissions.Shipment.options[1].value = false;\r\n vm.permissions.Shipment.options[2].value = false;\r\n vm.permissions.PotentialException.options[0].value = false;\r\n vm.permissions.PotentialException.options[1].value = false;\r\n vm.permissions.PotentialException.options[2].value = false;\r\n vm.permissions.LensGroup.options[0].value = false;\r\n vm.permissions.User.options[0].value = false;\r\n vm.permissions.User.options[1].value = false;\r\n vm.permissions.User.options[2].value = false;\r\n vm.permissions.User.options_classic[0].value = false;\r\n vm.permissions.User.options_classic[1].value = false;\r\n vm.permissions.User.options_classic[2].value = false;\r\n vm.permissions.User.options_classic[3].value = false;\r\n vm.permissions.User.options_classic[4].value = false;\r\n vm.permissions.User.options_classic[5].value = false;\r\n vm.permissions.User.options_classic[6].value = false;\r\n vm.permissions.User.options_classic[7].value = false;\r\n\r\n vm.permissions.Spotlight.options[0].value = false;\r\n vm.permissions.SupportRequestUser.options[0].value = false;\r\n vm.permissions.SupportRequestAdmin.options[0].value = false;\r\n vm.permissions.SupportRequestValidator.options[0].value = false;\r\n vm.permissions.CviewClassicAdmin.options[0].value = false;\r\n\r\n\r\n vm.user.permissions = vm.permissions;\r\n }\r\n\r\n if (vm.user.is_cww == true || vm.user.is_csl == true || vm.user.is_cfs == true || vm.user.is_cmts == true) {\r\n vm.customer_type_cehck = false;\r\n } else {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function csl_setup(val) {\r\n if (val == false) {\r\n vm.csl_check = true;\r\n }\r\n if (val == true) {\r\n vm.csl_check = false;\r\n }\r\n if (val == false || val == true) {\r\n vm.user.role_csl = null;\r\n // vm.user.primary_contact_csl = \"\";\r\n // vm.user.default_bccs_csl = [];\r\n // vm.user.party_id_names_csl = [];\r\n // vm.user.department_ids_csl = [];\r\n // $scope.related_party_id_names_exist_csl = [];\r\n\r\n //vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[1].value = false;\r\n vm.permissions.Group.options_csl[0].value = false;\r\n vm.permissions.Load.options_csl[0].value = false;\r\n vm.permissions.LensGroup.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[1].value = false;\r\n vm.permissions.User.options_csl[2].value = false;\r\n vm.permissions.Shipment.options_csl[1].value = false;\r\n vm.permissions.Shipment.options_csl[2].value = false;\r\n vm.permissions.Spotlight.options_csl[0].value = false;\r\n vm.permissions.CslException.options_csl[0].value = false;\r\n vm.permissions.CslException.options_csl[1].value = false;\r\n vm.permissions.CslException.options_csl[2].value = false;\r\n vm.permissions.CslException.options_csl[3].value = false;\r\n vm.user.permissions = vm.permissions;\r\n\r\n }\r\n if (vm.user.is_cww == true || vm.user.is_csl == true || vm.user.is_cfs == true || vm.user.is_cmts == true) {\r\n vm.customer_type_cehck = false;\r\n } else {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function cfs_setup(val) {\r\n if (val == false) {\r\n vm.cfs_check = true;\r\n }\r\n if (val == true) {\r\n vm.cfs_check = false;\r\n }\r\n if (val == false || val == true) {\r\n vm.user.role_cfs = null;\r\n // vm.user.primary_contact_cfs = \"\";\r\n // vm.user.default_bccs_cfs = [];\r\n // vm.user.party_id_names_cfs = [];\r\n // vm.user.department_ids_cfs = [];\r\n // $scope.related_party_id_names_exist_cfs = [];\r\n\r\n //vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[1].value = false;\r\n vm.permissions.Group.options_cfs[0].value = false;\r\n vm.permissions.Load.options_cfs[0].value = false;\r\n vm.permissions.LensGroup.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[1].value = false;\r\n vm.permissions.User.options_cfs[2].value = false;\r\n vm.permissions.Shipment.options_cfs[1].value = false;\r\n vm.permissions.Shipment.options_cfs[2].value = false;\r\n vm.permissions.Spotlight.options_cfs[0].value = false;\r\n vm.permissions.CslException.options_cfs[0].value = false;\r\n vm.permissions.CslException.options_cfs[1].value = false;\r\n vm.permissions.CslException.options_cfs[2].value = false;\r\n vm.permissions.CslException.options_cfs[3].value = false;\r\n vm.user.permissions = vm.permissions;\r\n }\r\n if (vm.user.is_cww == true || vm.user.is_csl == true || vm.user.is_cfs == true || vm.user.is_cmts == true) {\r\n vm.customer_type_cehck = false;\r\n } else {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function cmts_setup(val) {\r\n if (val == false) {\r\n vm.cmts_check = true;\r\n }\r\n if (val == true) {\r\n vm.cmts_check = false;\r\n }\r\n if (val == false || val == true) {\r\n vm.user.role_cmts = null;\r\n vm.permissions.Admin.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[1].value = false;\r\n vm.permissions.Group.options_cmts[0].value = false;\r\n vm.permissions.Load.options_cmts[0].value = false;\r\n vm.permissions.LensGroup.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[1].value = false;\r\n vm.permissions.User.options_cmts[2].value = false;\r\n vm.permissions.Shipment.options_cmts[1].value = false;\r\n vm.permissions.Shipment.options_cmts[2].value = false;\r\n vm.permissions.Spotlight.options_cmts[0].value = false;\r\n vm.permissions.CslException.options_cmts[0].value = false;\r\n vm.permissions.CslException.options_cmts[1].value = false;\r\n vm.permissions.CslException.options_cmts[2].value = false;\r\n vm.permissions.CslException.options_cmts[3].value = false;\r\n vm.user.permissions = vm.permissions;\r\n }\r\n if (vm.user.is_cww == true || vm.user.is_csl == true || vm.user.is_cfs == true || vm.user.is_cmts == true) {\r\n vm.customer_type_cehck = false;\r\n } else {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function changeReskin(val) {\r\n var check = (val == true ? false : true);\r\n vm.reskin_check = check;\r\n }\r\n\r\n function getMatch(key, query) {\r\n return UserManagementService.autoComplete({ field: key, value: query });\r\n }\r\n\r\n function getMatchCww(key, query) {\r\n return UserManagementService.autocompleteCww({ field: key, portal_type: vm.company.portal_type, customer_type: 'cww', value: query });\r\n }\r\n\r\n function getMatchCsl(key, query) {\r\n return UserManagementService.autocompleteCww({ field: key, customer_type: 'csl', value: query });\r\n }\r\n\r\n function getMatchCfs(key, query) {\r\n return UserManagementService.autocompleteCww({ field: key, customer_type: 'cfs', value: query });\r\n }\r\n\r\n function getMatchCmts(key, query) {\r\n return UserManagementService.autocompleteCww({ field: key, customer_type: 'cmts', value: query });\r\n }\r\n\r\n function getMatchs(key, query, cid, type) {\r\n // console.log(cid);\r\n // console.log(vm.company);\r\n return UserManagementService.autoCompletes({ field: key, value: query }, vm.company.departments, type);\r\n }\r\n\r\n function onClose() {\r\n\r\n }\r\n function setFilter(filter, mode, active) {\r\n vm.exceptionFilter.value = filter;\r\n var search = $location.search();\r\n search.page = 1;\r\n\r\n if (search.per_page == undefined)\r\n search.per_page = 10;\r\n\r\n $location.search(search);\r\n userSearchFilter();\r\n vm.userTable = UserManagementService.getUserTable();\r\n }\r\n\r\n function removeDuplicates(origArr) {\r\n var newArr = [],\r\n origLen = origArr.length,\r\n found, x, y;\r\n for (x = 0; x < origLen; x++) {\r\n found = undefined;\r\n for (y = 0; y < newArr.length; y++) {\r\n if (origArr[x] === newArr[y]) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n newArr.push(origArr[x]);\r\n }\r\n }\r\n return newArr;\r\n }\r\n\r\n // -------------------------\r\n // User Edit Setup Functions\r\n // -------------------------\r\n\r\n function onCompanyChange(id) {\r\n CompanyManagementService.getCompany(id).then(function (res) {\r\n vm.company = CompanyManagementService.getCompanyDetails();\r\n vm.customerCheck = true;\r\n vm.user.is_cww = false;\r\n vm.user.is_csl = false;\r\n vm.user.is_cfs = false;\r\n vm.user.is_cmts = false;\r\n vm.cww_check = true;\r\n vm.csl_check = true;\r\n vm.cfs_check = true;\r\n vm.cmts_check = true;\r\n vm.user.role = \"\";\r\n vm.user.role_csl = \"\";\r\n vm.user.role_cfs = \"\";\r\n vm.user.role_cmts = \"\";\r\n\r\n if (vm.company.access_type.includes('classic') && vm.company.access_type.includes('portal')) {\r\n vm.cwwUserCheck = false;\r\n } else if (vm.company.access_type.includes('classic') && !vm.company.access_type.includes('portal')) {\r\n vm.cwwUserCheck = true;\r\n } else if (!vm.company.access_type.includes('classic') && vm.company.access_type.includes('portal')) {\r\n vm.cwwUserCheck = false;\r\n }\r\n\r\n if (vm.company.portal_type == 'customer') {\r\n vm.roles = UserManagementService.getRoles();\r\n vm.roles_classic = UserManagementService.getRolesClassic();\r\n }\r\n else if (vm.company.portal_type == 'shipper') {\r\n vm.roles = UserManagementService.getRolesShipper();\r\n vm.roles_classic = UserManagementService.getRolesClassicShipper();\r\n }\r\n else if (vm.company.portal_type == 'consignee') {\r\n vm.roles = UserManagementService.getRolesConsignee();\r\n vm.roles_classic = UserManagementService.getRolesClassicConsignee();\r\n }\r\n\r\n if (vm.company.access_type.includes('portal') && vm.company.access_type.includes('classic')) {\r\n vm.classicDivCheck = true;\r\n }\r\n else if (vm.company.access_type.includes('classic')) {\r\n vm.classicDivCheck = true;\r\n }\r\n else {\r\n vm.classicDivCheck = false;\r\n }\r\n\r\n\r\n clearToggles();\r\n\r\n if (vm.company.customer_types.length > 0) {\r\n if (vm.company.customer_types.includes('cww')) {\r\n //vm.cww_check = false;\r\n vm.cww_visibility = false;\r\n vm.discussion_visibility = vm.company.customer_type_setup.cww.discussion_enabled;\r\n $scope.party_id_names_exist_cww = removeDuplicates(vm.company.customer_type_setup.cww.party_id_names.concat(vm.company.customer_type_setup.cww.related_party_id_names));\r\n } else {\r\n //vm.cww_check = true;\r\n vm.cww_visibility = true;\r\n vm.discussion_visibility = false;\r\n }\r\n if (vm.company.customer_types.includes('csl')) {\r\n //vm.csl_check = false;\r\n vm.csl_visibility = false;\r\n //vm.discussion_visibility_csl = vm.company.customer_type_setup.csl.discussion_enabled;\r\n $scope.party_id_names_exist_csl = removeDuplicates(vm.company.customer_type_setup.csl.party_id_names);\r\n } else {\r\n //vm.csl_check = true;\r\n vm.csl_visibility = true;\r\n //vm.discussion_visibility_csl = false;\r\n }\r\n if (vm.company.customer_types.includes('cfs')) {\r\n //vm.cfs_check = false;\r\n vm.cfs_visibility = false;\r\n //vm.discussion_visibility_cfs = vm.company.customer_type_setup.cfs.discussion_enabled;\r\n $scope.party_id_names_exist_cfs = removeDuplicates(vm.company.customer_type_setup.cfs.party_id_names);\r\n } else {\r\n //vm.cfs_check = true;\r\n vm.cfs_visibility = true;\r\n //vm.discussion_visibility_cfs = false;\r\n }\r\n if (vm.company.customer_types.includes('cmts')) {\r\n vm.cmts_visibility = false;\r\n $scope.party_id_names_exist_cmts = removeDuplicates(vm.company.customer_type_setup.cmts.party_id_names);\r\n } else {\r\n vm.cmts_visibility = true;\r\n }\r\n }\r\n\r\n vm.user.department_ids_cww = [];\r\n vm.user.department_ids_csl = [];\r\n vm.user.department_ids_cfs = [];\r\n vm.user.department_ids_cmts = [];\r\n\r\n $scope.related_party_id_names_exist_cww = [];\r\n $scope.related_party_id_names_exist_csl = [];\r\n $scope.related_party_id_names_exist_cfs = [];\r\n $scope.related_party_id_names_exist_cmts = [];\r\n\r\n if (vm.company.party_id_names == null) {\r\n vm.company.party_id_names = [];\r\n }\r\n if (vm.company.related_party_id_names == null) {\r\n vm.company.related_party_id_names = [];\r\n }\r\n $scope.party_id_names_exist = removeDuplicates(vm.company.party_id_names.concat(vm.company.related_party_id_names));\r\n\r\n vm.user.department_ids = [];\r\n $scope.related_party_id_names_exist = [];\r\n });\r\n }\r\n\r\n function addDepartments(ids, type) {\r\n var partids = [];\r\n\r\n if (type == 'CWW') {\r\n $scope.related_party_id_names_exist_cww = [];\r\n if (ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < ids.length; j++) {\r\n if (vm.company.departments[i]['name'] == ids[j]) {\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n if (vm.company.departments[i]['related_party_id_names'] == null) {\r\n vm.company.departments[i]['related_party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names'].concat(vm.company.departments[i]['related_party_id_names']));\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cww = removeDuplicates(mergedids);\r\n }\r\n\r\n if (type == 'CSL') {\r\n $scope.related_party_id_names_exist_csl = [];\r\n if (ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < ids.length; j++) {\r\n if (vm.company.departments[i]['name'] == ids[j]) {\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_csl = removeDuplicates(mergedids);\r\n }\r\n\r\n if (type == 'CFS') {\r\n $scope.related_party_id_names_exist_cfs = [];\r\n if (ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < ids.length; j++) {\r\n if (vm.company.departments[i]['name'] == ids[j]) {\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cfs = removeDuplicates(mergedids);\r\n }\r\n\r\n if (type == 'CMTS') {\r\n $scope.related_party_id_names_exist_cmts = [];\r\n if (ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < ids.length; j++) {\r\n if (vm.company.departments[i]['name'] == ids[j]) {\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cmts = removeDuplicates(mergedids);\r\n }\r\n }\r\n\r\n function removeDepartments(ids, type) {\r\n var partids = [];\r\n // $scope.related_party_id_names_exist = [];\r\n // $scope.related_party_id_names_exist_cww = [];\r\n // $scope.related_party_id_names_exist_csl = [];\r\n // $scope.related_party_id_names_exist_cfs = [];\r\n\r\n if (type == 'CWW') {\r\n $scope.related_party_id_names_exist_cww = [];\r\n if (ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < ids.length; j++) {\r\n if (vm.company.departments[i]['name'] == ids[j]) {\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n if (vm.company.departments[i]['related_party_id_names'] == null) {\r\n vm.company.departments[i]['related_party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names'].concat(vm.company.departments[i]['related_party_id_names']));\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cww = removeDuplicates(mergedids);\r\n }\r\n\r\n if (type == 'CSL') {\r\n $scope.related_party_id_names_exist_csl = [];\r\n if (ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < ids.length; j++) {\r\n if (vm.company.departments[i]['name'] == ids[j]) {\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_csl = removeDuplicates(mergedids);\r\n }\r\n\r\n if (type == 'CFS') {\r\n $scope.related_party_id_names_exist_cfs = [];\r\n if (ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < ids.length; j++) {\r\n if (vm.company.departments[i]['name'] == ids[j]) {\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cfs = removeDuplicates(mergedids);\r\n }\r\n\r\n if (type == 'CMTS') {\r\n $scope.related_party_id_names_exist_cmts = [];\r\n if (ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < ids.length; j++) {\r\n if (vm.company.departments[i]['name'] == ids[j]) {\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cmts = removeDuplicates(mergedids);\r\n }\r\n\r\n }\r\n\r\n function clearToggles() {\r\n vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options[0].value = false;\r\n vm.permissions.Company.options[0].value = false;\r\n vm.permissions.Company.options[1].value = false;\r\n vm.permissions.Company.options[2].value = false;\r\n vm.permissions.Group.options[0].value = false;\r\n vm.permissions.Shipment.options[0].value = false;\r\n vm.permissions.Shipment.options[1].value = false;\r\n vm.permissions.Shipment.options[2].value = false;\r\n vm.permissions.PotentialException.options[0].value = false;\r\n vm.permissions.PotentialException.options[1].value = false;\r\n vm.permissions.PotentialException.options[2].value = false;\r\n vm.permissions.LensGroup.options[0].value = false;\r\n vm.permissions.User.options[0].value = false;\r\n vm.permissions.User.options[1].value = false;\r\n vm.permissions.User.options[2].value = false;\r\n vm.permissions.User.options_classic[0].value = false;\r\n vm.permissions.User.options_classic[1].value = false;\r\n vm.permissions.User.options_classic[2].value = false;\r\n vm.permissions.User.options_classic[3].value = false;\r\n vm.permissions.User.options_classic[4].value = false;\r\n vm.permissions.User.options_classic[5].value = false;\r\n vm.permissions.User.options_classic[6].value = false;\r\n vm.permissions.User.options_classic[7].value = false;\r\n vm.permissions.Spotlight.options[0].value = false;\r\n vm.permissions.SupportRequestUser.options[0].value = false;\r\n vm.permissions.SupportRequestAdmin.options[0].value = false;\r\n vm.permissions.SupportRequestValidator.options[0].value = false;\r\n vm.permissions.CviewClassicAdmin.options[0].value = false;\r\n\r\n\r\n vm.permissions.Admin.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[1].value = false;\r\n vm.permissions.Group.options_csl[0].value = false;\r\n vm.permissions.Load.options_csl[0].value = false;\r\n vm.permissions.LensGroup.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[1].value = false;\r\n vm.permissions.User.options_csl[2].value = false;\r\n vm.permissions.Shipment.options_csl[1].value = false;\r\n vm.permissions.Shipment.options_csl[2].value = false;\r\n vm.permissions.Spotlight.options_csl[0].value = false;\r\n vm.permissions.CslException.options_csl[0].value = false;\r\n vm.permissions.CslException.options_csl[1].value = false;\r\n vm.permissions.CslException.options_csl[2].value = false;\r\n vm.permissions.CslException.options_csl[3].value = false;\r\n\r\n\r\n vm.permissions.Admin.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[1].value = false;\r\n vm.permissions.Group.options_cfs[0].value = false;\r\n vm.permissions.Load.options_cfs[0].value = false;\r\n vm.permissions.LensGroup.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[1].value = false;\r\n vm.permissions.User.options_cfs[2].value = false;\r\n vm.permissions.Shipment.options_cfs[1].value = false;\r\n vm.permissions.Shipment.options_cfs[2].value = false;\r\n vm.permissions.Spotlight.options_cfs[0].value = false;\r\n vm.permissions.CslException.options_cfs[0].value = false;\r\n vm.permissions.CslException.options_cfs[1].value = false;\r\n vm.permissions.CslException.options_cfs[2].value = false;\r\n vm.permissions.CslException.options_cfs[3].value = false;\r\n\r\n vm.permissions.Admin.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[1].value = false;\r\n vm.permissions.Group.options_cmts[0].value = false;\r\n vm.permissions.Load.options_cmts[0].value = false;\r\n vm.permissions.LensGroup.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[1].value = false;\r\n vm.permissions.User.options_cmts[2].value = false;\r\n vm.permissions.Shipment.options_cmts[1].value = false;\r\n vm.permissions.Shipment.options_cmts[2].value = false;\r\n vm.permissions.Spotlight.options_cmts[0].value = false;\r\n vm.permissions.CslException.options_cmts[0].value = false;\r\n vm.permissions.CslException.options_cmts[1].value = false;\r\n vm.permissions.CslException.options_cmts[2].value = false;\r\n vm.permissions.CslException.options_cmts[3].value = false;\r\n\r\n\r\n vm.user.permissions = vm.permissions;\r\n\r\n\r\n vm.user.is_reskin = false;\r\n vm.user.is_discussion = false;\r\n vm.user.is_discussion_csl = false;\r\n vm.user.is_discussion_cfs = false;\r\n vm.user.is_discussion_cmts = false;\r\n vm.user.view_air_shipments_cww = false;\r\n vm.user.view_ground_shipments_cww = false;\r\n vm.user.view_sea_shipments_cww = false;\r\n vm.user.primary_contact_cww = \"\";\r\n vm.user.default_bccs_cww = [];\r\n vm.user.party_id_names_cww = [];\r\n vm.user.related_party_id_names = [];\r\n vm.user.department_ids_cww = [];\r\n $scope.related_party_id_names_exist_cww = [];\r\n\r\n vm.user.primary_contact_csl = \"\";\r\n vm.user.default_bccs_csl = [];\r\n vm.user.party_id_names_csl = [];\r\n vm.user.department_ids_csl = [];\r\n $scope.related_party_id_names_exist_csl = [];\r\n\r\n vm.user.primary_contact_cfs = \"\";\r\n vm.user.default_bccs_cfs = [];\r\n vm.user.party_id_names_cfs = [];\r\n vm.user.department_ids_cfs = [];\r\n $scope.related_party_id_names_exist_cfs = [];\r\n\r\n vm.user.primary_contact_cmts = \"\";\r\n vm.user.default_bccs_cmts = [];\r\n vm.user.party_id_names_cmts = [];\r\n vm.user.department_ids_cmts = [];\r\n $scope.related_party_id_names_exist_cmts = [];\r\n\r\n\r\n }\r\n\r\n function clearTogglesEdit() {\r\n vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options[0].value = false;\r\n vm.permissions.Company.options[0].value = false;\r\n vm.permissions.Company.options[1].value = false;\r\n vm.permissions.Company.options[2].value = false;\r\n vm.permissions.Group.options[0].value = false;\r\n vm.permissions.Shipment.options[0].value = false;\r\n vm.permissions.Shipment.options[1].value = false;\r\n vm.permissions.Shipment.options[2].value = false;\r\n vm.permissions.PotentialException.options[0].value = false;\r\n vm.permissions.PotentialException.options[1].value = false;\r\n vm.permissions.PotentialException.options[2].value = false;\r\n vm.permissions.LensGroup.options[0].value = false;\r\n vm.permissions.User.options[0].value = false;\r\n vm.permissions.User.options[1].value = false;\r\n vm.permissions.User.options[2].value = false;\r\n vm.permissions.Spotlight.options[0].value = false;\r\n vm.permissions.SupportRequestUser.options[0].value = false;\r\n vm.permissions.SupportRequestAdmin.options[0].value = false;\r\n vm.permissions.SupportRequestValidator.options[0].value = false;\r\n vm.permissions.CviewClassicAdmin.options[0].value = false;\r\n\r\n\r\n vm.permissions.Admin.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[1].value = false;\r\n vm.permissions.Group.options_csl[0].value = false;\r\n vm.permissions.Load.options_csl[0].value = false;\r\n vm.permissions.LensGroup.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[1].value = false;\r\n vm.permissions.User.options_csl[2].value = false;\r\n vm.permissions.Shipment.options_csl[1].value = false;\r\n vm.permissions.Shipment.options_csl[2].value = false;\r\n vm.permissions.Spotlight.options_csl[0].value = false;\r\n vm.permissions.CslException.options_csl[0].value = false;\r\n vm.permissions.CslException.options_csl[1].value = false;\r\n vm.permissions.CslException.options_csl[2].value = false;\r\n vm.permissions.CslException.options_csl[3].value = false;\r\n\r\n\r\n vm.permissions.Admin.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[1].value = false;\r\n vm.permissions.Group.options_cfs[0].value = false;\r\n vm.permissions.Load.options_cfs[0].value = false;\r\n vm.permissions.LensGroup.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[1].value = false;\r\n vm.permissions.User.options_cfs[2].value = false;\r\n vm.permissions.Shipment.options_cfs[1].value = false;\r\n vm.permissions.Shipment.options_cfs[2].value = false;\r\n vm.permissions.Spotlight.options_cfs[0].value = false;\r\n vm.permissions.CslException.options_cfs[0].value = false;\r\n vm.permissions.CslException.options_cfs[1].value = false;\r\n vm.permissions.CslException.options_cfs[2].value = false;\r\n vm.permissions.CslException.options_cfs[3].value = false;\r\n\r\n vm.permissions.Admin.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[1].value = false;\r\n vm.permissions.Group.options_cmts[0].value = false;\r\n vm.permissions.Load.options_cmts[0].value = false;\r\n vm.permissions.LensGroup.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[1].value = false;\r\n vm.permissions.User.options_cmts[2].value = false;\r\n vm.permissions.Shipment.options_cmts[1].value = false;\r\n vm.permissions.Shipment.options_cmts[2].value = false;\r\n vm.permissions.Spotlight.options_cmts[0].value = false;\r\n vm.permissions.CslException.options_cmts[0].value = false;\r\n vm.permissions.CslException.options_cmts[1].value = false;\r\n vm.permissions.CslException.options_cmts[2].value = false;\r\n vm.permissions.CslException.options_cmts[3].value = false;\r\n\r\n vm.user.permissions = vm.permissions;\r\n\r\n\r\n vm.user.is_reskin = false;\r\n vm.user.is_discussion = false;\r\n vm.user.is_discussion_csl = false;\r\n vm.user.is_discussion_cfs = false;\r\n vm.user.is_discussion_cmts = false;\r\n vm.user.view_air_shipments_cww = false;\r\n vm.user.view_ground_shipments_cww = false;\r\n vm.user.view_sea_shipments_cww = false;\r\n vm.user.primary_contact_cww = \"\";\r\n vm.user.default_bccs_cww = [];\r\n vm.user.party_id_names_cww = [];\r\n vm.user.related_party_id_names = [];\r\n vm.user.department_ids_cww = [];\r\n $scope.related_party_id_names_exist_cww = [];\r\n\r\n vm.user.primary_contact_csl = \"\";\r\n vm.user.default_bccs_csl = [];\r\n vm.user.party_id_names_csl = [];\r\n vm.user.department_ids_csl = [];\r\n $scope.related_party_id_names_exist_csl = [];\r\n\r\n vm.user.primary_contact_cfs = \"\";\r\n vm.user.default_bccs_cfs = [];\r\n vm.user.party_id_names_cfs = [];\r\n vm.user.department_ids_cfs = [];\r\n $scope.related_party_id_names_exist_cfs = [];\r\n\r\n vm.user.primary_contact_cmts = \"\";\r\n vm.user.default_bccs_cmts = [];\r\n vm.user.party_id_names_cmts = [];\r\n vm.user.department_ids_cmts = [];\r\n $scope.related_party_id_names_exist_cmts = [];\r\n\r\n }\r\n\r\n function setupNewUser() {\r\n vm.isCreate = true;\r\n vm.user = UserManagementService.clearUser();\r\n vm.user.synced_with_ad = true;\r\n $scope.party_id_names_exist = [];\r\n $scope.party_id_names_exist_cww = [];\r\n $scope.party_id_names_exist_csl = [];\r\n $scope.party_id_names_exist_cfs = [];\r\n $scope.party_id_names_exist_cmts = [];\r\n $scope.related_party_id_names_exist = [];\r\n $scope.related_party_id_names_exist_cww = [];\r\n $scope.related_party_id_names_exist_cfs = [];\r\n $scope.related_party_id_names_exist_csl = [];\r\n $scope.related_party_id_names_exist_cmts = [];\r\n\r\n vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options[0].value = false;\r\n vm.permissions.Company.options[0].value = false;\r\n vm.permissions.Company.options[1].value = false;\r\n vm.permissions.Company.options[2].value = false;\r\n vm.permissions.Group.options[0].value = false;\r\n vm.permissions.Shipment.options[0].value = false;\r\n vm.permissions.Shipment.options[1].value = false;\r\n vm.permissions.Shipment.options[2].value = false;\r\n vm.permissions.PotentialException.options[0].value = false;\r\n vm.permissions.PotentialException.options[1].value = false;\r\n vm.permissions.PotentialException.options[2].value = false;\r\n vm.permissions.LensGroup.options[0].value = false;\r\n vm.permissions.User.options[0].value = false;\r\n vm.permissions.User.options[1].value = false;\r\n vm.permissions.User.options[2].value = false;\r\n vm.permissions.User.options_classic[0].value = false;\r\n vm.permissions.User.options_classic[1].value = false;\r\n vm.permissions.User.options_classic[2].value = false;\r\n vm.permissions.User.options_classic[3].value = false;\r\n vm.permissions.User.options_classic[4].value = false;\r\n vm.permissions.User.options_classic[5].value = false;\r\n vm.permissions.User.options_classic[6].value = false;\r\n vm.permissions.User.options_classic[7].value = false;\r\n vm.permissions.Spotlight.options[0].value = false;\r\n vm.permissions.SupportRequestUser.options[0].value = false;\r\n vm.permissions.SupportRequestAdmin.options[0].value = false;\r\n vm.permissions.SupportRequestValidator.options[0].value = false;\r\n vm.permissions.CviewClassicAdmin.options[0].value = false;\r\n\r\n vm.permissions.Admin.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[1].value = false;\r\n vm.permissions.Group.options_csl[0].value = false;\r\n vm.permissions.Load.options_csl[0].value = false;\r\n vm.permissions.LensGroup.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[1].value = false;\r\n vm.permissions.User.options_csl[2].value = false;\r\n vm.permissions.Shipment.options_csl[1].value = false;\r\n vm.permissions.Shipment.options_csl[2].value = false;\r\n vm.permissions.Spotlight.options_csl[0].value = false;\r\n vm.permissions.CslException.options_csl[0].value = false;\r\n vm.permissions.CslException.options_csl[1].value = false;\r\n vm.permissions.CslException.options_csl[2].value = false;\r\n vm.permissions.CslException.options_csl[3].value = false;\r\n\r\n vm.permissions.Admin.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[1].value = false;\r\n vm.permissions.Group.options_cfs[0].value = false;\r\n vm.permissions.Load.options_cfs[0].value = false;\r\n vm.permissions.LensGroup.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[1].value = false;\r\n vm.permissions.User.options_cfs[2].value = false;\r\n vm.permissions.Shipment.options_cfs[1].value = false;\r\n vm.permissions.Shipment.options_cfs[2].value = false;\r\n vm.permissions.Spotlight.options_cfs[0].value = false;\r\n vm.permissions.CslException.options_cfs[0].value = false;\r\n vm.permissions.CslException.options_cfs[1].value = false;\r\n vm.permissions.CslException.options_cfs[2].value = false;\r\n vm.permissions.CslException.options_cfs[3].value = false;\r\n\r\n vm.permissions.Admin.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[1].value = false;\r\n vm.permissions.Group.options_cmts[0].value = false;\r\n vm.permissions.Load.options_cmts[0].value = false;\r\n vm.permissions.LensGroup.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[1].value = false;\r\n vm.permissions.User.options_cmts[2].value = false;\r\n vm.permissions.Shipment.options_cmts[1].value = false;\r\n vm.permissions.Shipment.options_cmts[2].value = false;\r\n vm.permissions.Spotlight.options_cmts[0].value = false;\r\n vm.permissions.CslException.options_cmts[0].value = false;\r\n vm.permissions.CslException.options_cmts[1].value = false;\r\n vm.permissions.CslException.options_cmts[2].value = false;\r\n vm.permissions.CslException.options_cmts[3].value = false;\r\n\r\n vm.user.permissions = vm.permissions;\r\n // console.log('new setup');\r\n setup();\r\n }\r\n\r\n\r\n function setup() {\r\n UserManagementService.getContacts().then(function (data) {\r\n vm.possibleContacts = data;\r\n // Added Blank In Primary Contact Option\r\n if (!vm.isCreate) {\r\n // Get the users primary contact\r\n for (var i in vm.possibleContacts) {\r\n\r\n if (vm.user.contact.primary_contact && vm.possibleContacts[i].id === vm.user.contact.primary_contact.id) {\r\n vm.user.contact.primary_contact = vm.possibleContacts[i];\r\n }\r\n }\r\n }\r\n });\r\n UserManagementService.getCompanies().then(function (data) {\r\n vm.companies = data;\r\n // if (vm.companies.length == 1) {\r\n // vm.user.company_id = vm.companies[0].id;\r\n // }\r\n });\r\n UserManagementService.getContactPhotos().then(function (data) {\r\n vm.contactPhotos = data;\r\n });\r\n // UserManagementService.getGroups().then(function(data){\r\n // vm.groups = data;\r\n // });\r\n }\r\n\r\n // ----------------------------------------\r\n // Page Initialization\r\n // ----------------------------------------\r\n // Take action depending on state\r\n // ----------------------------------------\r\n\r\n switch ($state.current.name) {\r\n\r\n case 'showUser':\r\n vm.isCreate = false;\r\n vm.isLoading.account = true;\r\n vm.saveBtnShowNew = true;\r\n $location.search('');\r\n // Get the user from the service\r\n vm.user = UserManagementService.createUserObject();\r\n UserManagementService.getUser($stateParams.id).then(function () {\r\n\r\n vm.user = UserManagementService.getUserDetails();\r\n\r\n if ((!vm.user) || (!UserService.canAccess(\"User.manage\"))) {\r\n showUserNotFoundError(\"The user with ID \" + $stateParams.id + \" was not found\");\r\n return;\r\n }\r\n\r\n if ((vm.user.c_view_lens_mode.cww ? ((vm.user.c_view_lens_mode.cww == true) ? true : false) : false) ||\r\n (vm.user.c_view_lens_mode.csl ? ((vm.user.c_view_lens_mode.csl == true) ? true : false) : false) ||\r\n (vm.user.c_view_lens_mode.cfs ? ((vm.user.c_view_lens_mode.cfs == true) ? true : false) : false) ||\r\n (vm.user.c_view_lens_mode.cmts ? ((vm.user.c_view_lens_mode.cmts == true) ? true : false) : false)) {\r\n vm.c_view_lens_mode_check = true;\r\n } else {\r\n vm.c_view_lens_mode_check = false;\r\n }\r\n\r\n if (vm.user.customer_types.includes('cww')) {\r\n vm.cww_check = false;\r\n vm.showCwwData(vm.user);\r\n }\r\n\r\n if (vm.user.customer_types.includes('csl')) {\r\n vm.csl_check = false;\r\n vm.showCslData(vm.user);\r\n }\r\n\r\n if (vm.user.customer_types.includes('cfs')) {\r\n vm.cfs_check = false;\r\n vm.showCfsData(vm.user);\r\n }\r\n\r\n if (vm.user.customer_types.includes('cmts')) {\r\n vm.cmts_check = false;\r\n vm.showCmtsData(vm.user);\r\n }\r\n\r\n $scope.ad_user_enable = vm.user.ad_user;\r\n\r\n CompanyManagementService.getCompany(vm.user.company_id).then(function (res) {\r\n\r\n vm.company = CompanyManagementService.getCompanyDetails();\r\n\r\n if (vm.company.access_type.includes('classic') && vm.company.access_type.includes('portal')) {\r\n vm.cwwUserCheck = false;\r\n } else if (vm.company.access_type.includes('classic') && !vm.company.access_type.includes('portal')) {\r\n vm.cwwUserCheck = true;\r\n } else if (!vm.company.access_type.includes('classic') && vm.company.access_type.includes('portal')) {\r\n vm.cwwUserCheck = false;\r\n }\r\n\r\n if (vm.company.portal_type == 'customer') {\r\n vm.roles = UserManagementService.getRoles();\r\n vm.roles_classic = UserManagementService.getRolesClassic();\r\n }\r\n else if (vm.company.portal_type == 'shipper') {\r\n vm.roles = UserManagementService.getRolesShipper();\r\n vm.roles_classic = UserManagementService.getRolesClassicShipper();\r\n }\r\n else if (vm.company.portal_type == 'consignee') {\r\n vm.roles = UserManagementService.getRolesConsignee();\r\n vm.roles_classic = UserManagementService.getRolesClassicConsignee();\r\n }\r\n\r\n if (vm.company.access_type.includes('portal') && vm.company.access_type.includes('classic')) {\r\n vm.classicDivCheck = true;\r\n }\r\n else if (vm.company.access_type.includes('classic')) {\r\n vm.classicDivCheck = true;\r\n }\r\n else {\r\n vm.classicDivCheck = false;\r\n }\r\n\r\n\r\n if (vm.company.customer_types.length > 0) {\r\n if (vm.company.customer_types.includes('cww')) {\r\n vm.cww_visibility = false;\r\n vm.discussion_visibility = vm.company.customer_type_setup.cww.discussion_enabled;\r\n if (vm.company.customer_type_setup.cww.party_id_names == null) {\r\n vm.company.customer_type_setup.cww.party_id_names = [];\r\n }\r\n if (vm.company.customer_type_setup.cww.related_party_id_names == null) {\r\n vm.company.customer_type_setup.cww.related_party_id_names = [];\r\n }\r\n $scope.party_id_names_exist_cww = removeDuplicates(vm.company.customer_type_setup.cww.party_id_names.concat(vm.company.customer_type_setup.cww.related_party_id_names));\r\n } else {\r\n vm.cww_visibility = true;\r\n vm.discussion_visibility = false;\r\n }\r\n if (vm.company.customer_types.includes('csl')) {\r\n vm.csl_visibility = false;\r\n //vm.discussion_visibility_csl = vm.company.customer_type_setup.csl.discussion_enabled;\r\n if (vm.company.customer_type_setup.csl.party_id_names == null) {\r\n vm.company.customer_type_setup.csl.party_id_names = [];\r\n }\r\n $scope.party_id_names_exist_csl = removeDuplicates(vm.company.customer_type_setup.csl.party_id_names);\r\n } else {\r\n vm.csl_visibility = true;\r\n //vm.discussion_visibility_csl = false;\r\n }\r\n if (vm.company.customer_types.includes('cfs')) {\r\n vm.cfs_visibility = false;\r\n //vm.discussion_visibility_cfs = vm.company.customer_type_setup.cfs.discussion_enabled;\r\n if (vm.company.customer_type_setup.cfs.party_id_names == null) {\r\n vm.company.customer_type_setup.cfs.party_id_names = [];\r\n }\r\n $scope.party_id_names_exist_cfs = removeDuplicates(vm.company.customer_type_setup.cfs.party_id_names);\r\n } else {\r\n vm.cfs_visibility = true;\r\n //vm.discussion_visibility_cfs = false;\r\n }\r\n if (vm.company.customer_types.includes('cmts')) {\r\n vm.cmts_visibility = false;\r\n if (vm.company.customer_type_setup.cmts.party_id_names == null) {\r\n vm.company.customer_type_setup.cmts.party_id_names = [];\r\n }\r\n $scope.party_id_names_exist_cmts = removeDuplicates(vm.company.customer_type_setup.cmts.party_id_names);\r\n } else {\r\n vm.cmts_visibility = true;\r\n }\r\n }\r\n\r\n if (vm.user.customer_types.includes('cww')) {\r\n var partids_old = [];\r\n if (vm.user.customer_type_setup.cww.department_ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < vm.user.customer_type_setup.cww.department_ids.length; j++) {\r\n if (vm.company.departments[i]['customer_type'] == 'CWW') {\r\n if (vm.company.departments[i]['name'] == vm.user.customer_type_setup.cww.department_ids[j]) {\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n if (vm.company.departments[i]['related_party_id_names'] == null) {\r\n vm.company.departments[i]['related_party_id_names'] = [];\r\n }\r\n partids_old.push(vm.company.departments[i]['party_id_names'].concat(vm.company.departments[i]['related_party_id_names']));\r\n\r\n var mergedids_old = [].concat.apply([], partids_old);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cww = removeDuplicates(mergedids_old);\r\n }\r\n }\r\n\r\n if (vm.user.customer_types.includes('csl')) {\r\n var partids_old = [];\r\n if (vm.user.customer_type_setup.csl.department_ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < vm.user.customer_type_setup.csl.department_ids.length; j++) {\r\n if (vm.company.departments[i]['customer_type'] == 'CSL') {\r\n if (vm.company.departments[i]['name'] == vm.user.customer_type_setup.csl.department_ids[j]) {\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n if (vm.company.departments[i]['related_party_id_names'] == null) {\r\n vm.company.departments[i]['related_party_id_names'] = [];\r\n }\r\n partids_old.push(vm.company.departments[i]['party_id_names']);\r\n\r\n var mergedids_old = [].concat.apply([], partids_old);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_csl = removeDuplicates(mergedids_old);\r\n }\r\n }\r\n\r\n if (vm.user.customer_types.includes('cfs')) {\r\n var partids_old = [];\r\n if (vm.user.customer_type_setup.cfs.department_ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < vm.user.customer_type_setup.cfs.department_ids.length; j++) {\r\n if (vm.company.departments[i]['customer_type'] == 'CFS') {\r\n if (vm.company.departments[i]['name'] == vm.user.customer_type_setup.cfs.department_ids[j]) {\r\n\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n if (vm.company.departments[i]['related_party_id_names'] == null) {\r\n vm.company.departments[i]['related_party_id_names'] = [];\r\n }\r\n partids_old.push(vm.company.departments[i]['party_id_names']);\r\n\r\n var mergedids_old = [].concat.apply([], partids_old);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cfs = removeDuplicates(mergedids_old);\r\n }\r\n }\r\n\r\n if (vm.user.customer_types.includes('cmts')) {\r\n var partids_old = [];\r\n if (vm.user.customer_type_setup.cmts.department_ids.length > 0) {\r\n for (var i = vm.company.departments.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < vm.user.customer_type_setup.cmts.department_ids.length; j++) {\r\n if (vm.company.departments[i]['customer_type'] == 'CMTS') {\r\n if (vm.company.departments[i]['name'] == vm.user.customer_type_setup.cmts.department_ids[j]) {\r\n\r\n if (vm.company.departments[i]['party_id_names'] == null) {\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n if (vm.company.departments[i]['related_party_id_names'] == null) {\r\n vm.company.departments[i]['related_party_id_names'] = [];\r\n }\r\n partids_old.push(vm.company.departments[i]['party_id_names']);\r\n\r\n var mergedids_old = [].concat.apply([], partids_old);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cmts = removeDuplicates(mergedids_old);\r\n }\r\n }\r\n\r\n });\r\n\r\n if (vm.user.roles.cww) {\r\n if (vm.user.roles.cww.length > 0) {\r\n vm.cww_check = false;\r\n for (var i = 0; i < vm.user.roles.cww.length; i++) {\r\n if (vm.user.roles.cww[i] != 'super_admin' && vm.user.roles.cww[i] != 'cview_classic_admin' && vm.user.roles.cww[i] != 'support_request_admin'\r\n && vm.user.roles.cww[i] != 'support_request_user' && vm.user.roles.cww[i] != 'support_request_validator' && !(vm.user.roles.cww[i].includes('classic'))) {\r\n vm.user.role = vm.user.roles.cww[i];\r\n }\r\n if (vm.user.roles.cww[i] != 'super_admin' && vm.user.roles.cww[i] != 'cview_classic_admin' && vm.user.roles.cww[i] != 'support_request_admin'\r\n && vm.user.roles.cww[i] != 'support_request_user' && vm.user.roles.cww[i] != 'support_request_validator' && (vm.user.roles.cww[i].includes('classic'))) {\r\n vm.user.role_classic = vm.user.roles.cww[i];\r\n }\r\n }\r\n }\r\n }\r\n if (vm.user.roles.csl) {\r\n if (vm.user.roles.csl.length > 0) {\r\n vm.csl_check = false;\r\n for (var i = 0; i < vm.user.roles.csl.length; i++) {\r\n if (vm.user.roles.csl[i] != 'super_admin') {\r\n vm.user.role_csl = vm.user.roles.csl[i];\r\n }\r\n }\r\n }\r\n }\r\n if (vm.user.roles.cfs) {\r\n if (vm.user.roles.cfs.length > 0) {\r\n vm.cfs_check = false;\r\n //vm.user.role_cfs = vm.user.roles.cfs[0];\r\n for (var i = 0; i < vm.user.roles.cfs.length; i++) {\r\n if (vm.user.roles.cfs[i] != 'super_admin') {\r\n vm.user.role_cfs = vm.user.roles.cfs[i];\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (vm.user.roles.cmts) {\r\n if (vm.user.roles.cmts.length > 0) {\r\n vm.cmts_check = false;\r\n for (var i = 0; i < vm.user.roles.cmts.length; i++) {\r\n if (vm.user.roles.cmts[i] != 'super_admin') {\r\n vm.user.role_cmts = vm.user.roles.cmts[i];\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (vm.user.roles.cww) {\r\n if (vm.user.roles.cww.length > 0) {\r\n if (vm.user.roles.cww.includes('super_admin')) {\r\n vm.permissions['Admin']['options'][0]['value'] = true;\r\n } else {\r\n vm.permissions['Admin']['options'][0]['value'] = false;\r\n }\r\n\r\n if (vm.user.roles.cww.includes('support_request_admin')) {\r\n vm.permissions['SupportRequestAdmin']['options'][0]['value'] = true;\r\n } else {\r\n vm.permissions['SupportRequestAdmin']['options'][0]['value'] = false;\r\n }\r\n\r\n if (vm.user.roles.cww.includes('support_request_user')) {\r\n vm.permissions['SupportRequestUser']['options'][0]['value'] = true;\r\n } else {\r\n vm.permissions['SupportRequestUser']['options'][0]['value'] = false;\r\n }\r\n\r\n if (vm.user.roles.cww.includes('support_request_validator')) {\r\n vm.permissions['SupportRequestValidator']['options'][0]['value'] = true;\r\n } else {\r\n vm.permissions['SupportRequestValidator']['options'][0]['value'] = false;\r\n }\r\n\r\n if (vm.user.roles.cww.includes('cview_classic_admin')) {\r\n vm.permissions['CviewClassicAdmin']['options'][0]['value'] = true;\r\n } else {\r\n vm.permissions['CviewClassicAdmin']['options'][0]['value'] = false;\r\n }\r\n\r\n }\r\n }\r\n\r\n if (vm.user.roles.csl) {\r\n if (vm.user.roles.csl.length > 0) {\r\n if (vm.user.roles.csl.includes('super_admin')) {\r\n vm.permissions['Admin']['options_csl'][0]['value'] = true;\r\n } else {\r\n vm.permissions['Admin']['options_csl'][0]['value'] = false;\r\n }\r\n }\r\n }\r\n\r\n if (vm.user.roles.cfs) {\r\n if (vm.user.roles.cfs.length > 0) {\r\n if (vm.user.roles.cfs.includes('super_admin')) {\r\n vm.permissions['Admin']['options_cfs'][0]['value'] = true;\r\n } else {\r\n vm.permissions['Admin']['options_cfs'][0]['value'] = false;\r\n }\r\n }\r\n }\r\n\r\n if (vm.user.roles.cmts) {\r\n if (vm.user.roles.cmts.length > 0) {\r\n if (vm.user.roles.cmts.includes('super_admin')) {\r\n vm.permissions['Admin']['options_cmts'][0]['value'] = true;\r\n } else {\r\n vm.permissions['Admin']['options_cmts'][0]['value'] = false;\r\n }\r\n }\r\n }\r\n\r\n // if(vm.user.support_request_user == true){\r\n\r\n // vm.permissions['SupportRequestUser']['options'][0]['value'] = true;\r\n\r\n // }else{\r\n // vm.permissions['SupportRequestUser']['options'][0]['value'] = false;\r\n // }\r\n\r\n\r\n // if(vm.user.support_request_admin == true){\r\n\r\n // vm.permissions['SupportRequestAdmin']['options'][0]['value'] = true;\r\n\r\n // }else{\r\n // vm.permissions['SupportRequestAdmin']['options'][0]['value'] = false;\r\n // }\r\n\r\n\r\n if (vm.user.pwd_exists) {\r\n vm.user.password = \"********\";\r\n vm.user.password_confirmation = \"********\";\r\n }\r\n if (!vm.user) {\r\n $location.url(\"/users\");\r\n }\r\n setup();\r\n vm.isLoading.account = false;\r\n if (!vm.user.is_active) {\r\n vm.status.cssClass = \"md-danger\";\r\n }\r\n $scope.$watch(\"vm.user.bccs.values\", function (newValue, oldValue) {\r\n if (newValue != oldValue) {\r\n vm.user.bccs.default = false;\r\n }\r\n }, true);\r\n // console.log(vm.user);\r\n\r\n $scope.$watch(\"vm.user.contact.primary_contact\", function (newValue, oldValue) {\r\n // console.log(newValue +' '+ oldValue);\r\n // console.log(vm.user.contact.primary_contact);\r\n // newPrimaryContact = newValue;\r\n if (newValue != oldValue) {\r\n vm.user.contact.default = false;\r\n }\r\n }, true);\r\n\r\n vm.removableFields.forEach(function (field) {\r\n $scope.$watch(function () {\r\n return vm.user[field];\r\n }, function (n, o) {\r\n if (n === \"\" || n === undefined) {\r\n vm.user[\"del_\" + field] = true;\r\n //do something\r\n }\r\n else {\r\n vm.user[\"del_\" + field] = false;\r\n }\r\n });\r\n }, true);\r\n //getUserPermissions();\r\n });\r\n\r\n break;\r\n\r\n case 'createUser':\r\n setupNewUser();\r\n $location.search('');\r\n break;\r\n\r\n case 'manageUsers':\r\n vm.isLoading.table = true;\r\n var search = $location.search();\r\n for (var key in search) {\r\n vm.lookup[key] = search[key];\r\n }\r\n if (search.per_page == undefined)\r\n search.per_page = 10;\r\n\r\n if (search.page == undefined)\r\n search.page = 1;\r\n\r\n //UserManagementService.setQuery(search);\r\n $scope.$on(\"usersTable:stateChanged\", function (event, loading) {\r\n vm.isLoading.table = loading;\r\n });\r\n\r\n $scope.$watch('vm.userTable.parameters().sorting', function (evt, data) {\r\n var searchValChanges = $location.search();\r\n var searchEanble = false;\r\n if (vm.userTable.parameters().sorting[\"first_name\"]) {\r\n searchValChanges.key = 'first_name';\r\n searchValChanges.criteria = vm.userTable.parameters().sorting[\"first_name\"];\r\n searchEanble = true;\r\n }\r\n\r\n if (vm.userTable.parameters().sorting[\"user_status\"]) {\r\n searchValChanges.key = 'user_status';\r\n searchValChanges.criteria = vm.userTable.parameters().sorting[\"user_status\"];\r\n searchEanble = true;\r\n }\r\n\r\n if (vm.userTable.parameters().sorting[\"is_active\"]) {\r\n searchValChanges.key = 'is_active';\r\n searchValChanges.criteria = vm.userTable.parameters().sorting[\"is_active\"];\r\n searchEanble = true;\r\n }\r\n\r\n if (vm.userTable.parameters().sorting[\"customer_types\"]) {\r\n searchValChanges.key = 'customer_types';\r\n searchValChanges.criteria = vm.userTable.parameters().sorting[\"customer_types\"];\r\n searchEanble = true;\r\n }\r\n\r\n if (vm.userTable.parameters().sorting[\"last_name\"]) {\r\n searchValChanges.key = 'last_name';\r\n searchValChanges.criteria = vm.userTable.parameters().sorting[\"last_name\"];\r\n searchEanble = true;\r\n }\r\n\r\n if (vm.userTable.parameters().sorting[\"email\"]) {\r\n searchValChanges.key = 'email';\r\n searchValChanges.criteria = vm.userTable.parameters().sorting[\"email\"];\r\n searchEanble = true;\r\n }\r\n\r\n if (vm.userTable.parameters().sorting[\"company.name\"]) {\r\n searchValChanges.key = 'company';\r\n searchValChanges.criteria = data[\"company.name\"];\r\n searchEanble = true;\r\n }\r\n\r\n if (searchEanble) {\r\n $location.search(searchValChanges);\r\n userSearchFilter();\r\n }\r\n\r\n });\r\n\r\n $scope.$on(\"userTable:all:loaded\", function (event, data) {\r\n $rootScope.allUsers = data.all_users_count ? data.all_users_count : 0;\r\n $rootScope.allAdUsers = data.ad_user_count ? data.ad_user_count : 0;\r\n $rootScope.allNonadUsers = data.non_ad_users_count ? data.non_ad_users_count : 0;\r\n });\r\n\r\n $scope.$watch('vm.userTable.parameters().count', function () {\r\n if (vm.userTable.parameters().count != undefined && $location.search().per_page != vm.userTable.parameters().count) {\r\n var searchValChanges = $location.search();\r\n searchValChanges.per_page = vm.userTable.parameters().count;\r\n searchValChanges.page = 1;\r\n $location.search(searchValChanges);\r\n userSearchFilter();\r\n vm.userTable = UserManagementService.getUserTable();\r\n }\r\n });\r\n\r\n $scope.$watch('vm.userTable.parameters().page', function () {\r\n if (vm.userTable.parameters().page != undefined && $location.search().page != vm.userTable.parameters().page) {\r\n var searchValChanges = $location.search();\r\n searchValChanges.per_page = vm.userTable.parameters().count;\r\n searchValChanges.page = vm.userTable.parameters().page;\r\n $location.search(searchValChanges);\r\n userSearchFilter();\r\n vm.userTable = UserManagementService.getUserTable();\r\n }\r\n });\r\n\r\n UserManagementService.getUsers('', vm.exceptionFilter.value, search);\r\n vm.userTable = UserManagementService.getUserTable();\r\n break;\r\n case 'importUsers':\r\n $location.search('');\r\n $scope.$watch(\"vm.file\", function (newValue, oldValue) {\r\n if (newValue != oldValue) {\r\n vm.uploadFile(vm.file);\r\n }\r\n });\r\n break;\r\n }\r\n\r\n\r\n function showCwwData(user) {\r\n vm.user = user;\r\n vm.user.is_reskin = vm.user.customer_type_setup.cww.is_reskin;\r\n vm.user.is_discussion = vm.user.customer_type_setup.cww.discussion_enabled;\r\n vm.user.reskin_type = vm.user.customer_type_setup.cww.reskin_type;\r\n\r\n vm.user.view_air_shipments_cww = vm.user.customer_type_setup.cww.view_air_shipments;\r\n vm.user.view_ground_shipments_cww = vm.user.customer_type_setup.cww.view_ground_shipments;\r\n vm.user.view_sea_shipments_cww = vm.user.customer_type_setup.cww.view_sea_shipments;\r\n\r\n if (vm.user.is_reskin == true) { vm.reskin_check = false; }\r\n if (vm.user.is_reskin == false) { vm.reskin_check = true; }\r\n\r\n if (vm.user.customer_type_setup.cww.default_contact_id) {\r\n vm.user.primary_contact_cww = vm.user.customer_type_setup.cww.default_contact_id;\r\n }\r\n if (vm.user.customer_type_setup.cww.default_bccs.length > 0) {\r\n vm.user.default_bccs_cww = vm.user.customer_type_setup.cww.default_bccs;\r\n }\r\n if (vm.user.customer_type_setup.cww.party_id_names.length > 0) {\r\n vm.user.party_id_names_cww = vm.user.customer_type_setup.cww.party_id_names;\r\n }\r\n if (vm.user.customer_type_setup.cww.related_party_id_names.length > 0) {\r\n vm.user.related_party_id_names = vm.user.customer_type_setup.cww.related_party_id_names;\r\n }\r\n if (vm.user.customer_type_setup.cww.department_ids.length > 0) {\r\n vm.user.department_ids_cww = vm.user.customer_type_setup.cww.department_ids;\r\n }\r\n }\r\n\r\n function showCslData(user) {\r\n vm.user = user;\r\n vm.user.is_discussion_csl = vm.user.customer_type_setup.csl.discussion_enabled;\r\n if (vm.user.customer_type_setup.csl.default_contact_id) {\r\n vm.user.primary_contact_csl = vm.user.customer_type_setup.csl.default_contact_id;\r\n }\r\n if (vm.user.customer_type_setup.csl.default_bccs.length > 0) {\r\n vm.user.default_bccs_csl = vm.user.customer_type_setup.csl.default_bccs;\r\n }\r\n if (vm.user.customer_type_setup.csl.party_id_names.length > 0) {\r\n vm.user.party_id_names_csl = vm.user.customer_type_setup.csl.party_id_names;\r\n }\r\n if (vm.user.customer_type_setup.csl.department_ids.length > 0) {\r\n vm.user.department_ids_csl = vm.user.customer_type_setup.csl.department_ids;\r\n }\r\n }\r\n\r\n function showCfsData(user) {\r\n vm.user = user;\r\n vm.user.is_discussion_cfs = vm.user.customer_type_setup.cfs.discussion_enabled;\r\n if (vm.user.customer_type_setup.cfs.default_contact_id) {\r\n vm.user.primary_contact_cfs = vm.user.customer_type_setup.cfs.default_contact_id;\r\n }\r\n if (vm.user.customer_type_setup.cfs.default_bccs.length > 0) {\r\n vm.user.default_bccs_cfs = vm.user.customer_type_setup.cfs.default_bccs;\r\n }\r\n if (vm.user.customer_type_setup.cfs.party_id_names.length > 0) {\r\n vm.user.party_id_names_cfs = vm.user.customer_type_setup.cfs.party_id_names;\r\n }\r\n if (vm.user.customer_type_setup.cfs.department_ids.length > 0) {\r\n vm.user.department_ids_cfs = vm.user.customer_type_setup.cfs.department_ids;\r\n }\r\n }\r\n\r\n function showCmtsData(user) {\r\n vm.user = user;\r\n vm.user.is_discussion_cmts = vm.user.customer_type_setup.cmts.discussion_enabled;\r\n if (vm.user.customer_type_setup.cmts.default_contact_id) {\r\n vm.user.primary_contact_cmts = vm.user.customer_type_setup.cmts.default_contact_id;\r\n }\r\n if (vm.user.customer_type_setup.cmts.default_bccs.length > 0) {\r\n vm.user.default_bccs_cmts = vm.user.customer_type_setup.cmts.default_bccs;\r\n }\r\n if (vm.user.customer_type_setup.cmts.party_id_names.length > 0) {\r\n vm.user.party_id_names_cmts = vm.user.customer_type_setup.cmts.party_id_names;\r\n }\r\n if (vm.user.customer_type_setup.cmts.department_ids.length > 0) {\r\n vm.user.department_ids_cmts = vm.user.customer_type_setup.cmts.department_ids;\r\n }\r\n }\r\n\r\n // ----------------------------------\r\n // Uploads files to the backend\r\n // ----------------------------------\r\n function uploadFile(file, errFiles) {\r\n var selectedFile = file;\r\n var dublicateRecordExists = false;\r\n var headers = [\"FirstName*\", \"LastName*\", \"Email*\", \"Company*\", \"CustomerTypes*\", \"Roles*\", \"PathwayRole\", \"PartyIdOverrides\", \"BccsOverrides\", \"PrimaryContactOverrides\"];\r\n var file_headers = [], count = 0;\r\n\r\n if (!file) { return; }\r\n var reader = new FileReader();\r\n reader.readAsBinaryString(selectedFile);\r\n reader.onload = function (event) {\r\n var data = event.target.result; //reader.result.split(/\\r?\\n/),\r\n var workbook = XLSX.read(data, { type: \"binary\" });\r\n workbook.SheetNames.forEach(function (sheet) {\r\n if (sheet == 'Sheet1') {\r\n var rowObject = XLSX.utils.sheet_to_row_object_array(workbook.Sheets[sheet], {\r\n header: 1,\r\n defval: '',\r\n blankrows: true\r\n });\r\n if (rowObject.length > 0)\r\n rowObject = rowObject.slice(1);\r\n count = rowObject.length;\r\n angular.forEach(rowObject, function (value, key) {\r\n angular.forEach(rowObject, function (val2, key2) {\r\n if (key2 != 0 && key != 0 && key2 > key && angular.equals(value[2], val2[2])) {\r\n dublicateRecordExists = true;\r\n return;\r\n }\r\n ;\r\n });\r\n if (dublicateRecordExists === true) {\r\n return;\r\n }\r\n });\r\n rowObject[0].forEach(function (strHeader, index) {\r\n if (index < headers.length)\r\n file_headers.push(strHeader);\r\n if (index >= headers.length)\r\n return false;\r\n });\r\n }\r\n });\r\n\r\n //var file_headers = data[0].split(',').map(function(d){return d.toLowerCase();}), count = data.length - 1;\r\n //file_headers = file_headers;\r\n if (!dublicateRecordExists && headers.length === file_headers.length && count <= 500 && headers.every(function (n, i) { return n.toLowerCase() === file_headers[i].toLowerCase() })) {\r\n upload();\r\n } else if (dublicateRecordExists) {\r\n $scope.errorMsg = 'Duplicate records';\r\n showToastWithFile('attach-doc.error.html', [\"Duplicate user email found in xlsx file.\"], 7000);\r\n } else if (count > 500) {\r\n $scope.errorMsg = 'Too many records';\r\n showToastWithFile('attach-doc.error.html', [\"Max Exceeded: Upload User Limit is 500\"], 7000);\r\n } else {\r\n $scope.errorMsg = 'Invalid headers';\r\n showToastWithFile('attach-doc.invalid.error.html', [\"'Accepted Headers: 'LastName*','FirstName*', 'Email*', 'Company*', 'CustomerTypes*','Roles*','PathwayRole','PartyIdOverrides','BccsOverrides','PrimaryContactOverrides'\"], 7000);\r\n }\r\n }\r\n //reader.readAsText(file);\r\n vm.errFile = errFiles && errFiles[0];\r\n function upload() {\r\n vm.file.isUploading = true;\r\n UserManagementService.uploadFile(file, errFiles).then(function (response) {\r\n $timeout(function () {\r\n\r\n $location.path(\"/users/verify-users\");\r\n\r\n });\r\n }).catch(function (response) {\r\n if (response.status > 0) {\r\n $scope.errorMsg = response.status + ': ' + response.data;\r\n }\r\n showToastWithFile('attach-doc.error.html', response.error);\r\n }).finally(function () {\r\n vm.file.isUploading = false;\r\n });\r\n }\r\n }\r\n\r\n // -------------------------------\r\n // User Edit Form validation\r\n // -------------------------------\r\n function checkError(form, field) {\r\n if (form) {\r\n return form.$invalid && form[field] && form[field].$invalid && (vm.isSave || form[field].$touched);\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n $scope.enableSaveButton = function () {\r\n return vm.formDetails.$pristine && vm.formRole.$pristine && vm.formSettings.$pristine && vm.companyDetails.$pristine;\r\n }\r\n\r\n $scope.checkValidation = function () {\r\n var ctype = true;\r\n if (vm.user.is_cww == true || vm.user.is_csl == true || vm.user.is_cfs == true || vm.user.is_cmts == true) {\r\n ctype = false;\r\n } else {\r\n ctype = true;\r\n }\r\n return vm.companyDetails.$pristine || vm.formDetails.$pristine || ctype;\r\n }\r\n\r\n function formIsValid() {\r\n // Ensure all subforms are valid\r\n if (canSetIsCraneContact() && vm.formDetails && vm.formRole && vm.formSettings) {\r\n return vm.formDetails.$valid && vm.formRole.$valid && vm.formSettings.$valid;\r\n } else if (!canSetIsCraneContact() && vm.formDetails && vm.formRole) {\r\n return vm.formDetails.$valid && vm.formRole.$valid\r\n } else {\r\n return false;\r\n }\r\n }\r\n //=================================\r\n\r\n // -----------------------------------\r\n // User Table functions\r\n // -----------------------------------\r\n function add_user() {\r\n $location.path('/users/new');\r\n }\r\n\r\n function import_users() {\r\n $location.path('/users/bulk-import-users');\r\n }\r\n\r\n function checkAll(selected) {\r\n vm.userTable.data.map(function (user) {\r\n user.selected = selected;\r\n });\r\n }\r\n\r\n function getLink(data, field) {\r\n try {\r\n if (!field) {\r\n field = \"edit\"\r\n }\r\n for (var i in vm.link) {\r\n if (field == vm.link[i].column) {\r\n return vm.link[i].url + \"/\" + eval(\"data.\" + vm.link[i].field);\r\n }\r\n }\r\n }\r\n catch (e) {\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n function isLink(field) {\r\n for (var i in vm.link) {\r\n if (field == vm.link[i].column) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n function hasIcon(field) {\r\n return field == \"edit\";\r\n }\r\n\r\n function getIcon(data, field) {\r\n return \"edit\";\r\n }\r\n\r\n function getClass(item, field) {\r\n if (!item.is_active && item.user_status == 'issue(non-ad)' && item[field] == 'issue(non-ad)') {\r\n return 'inactive-user';\r\n }\r\n switch (field) {\r\n case \"user_status\":\r\n if (item[field] == 'active') { return \"active-user\"; }\r\n if (item[field] == 'inactive') { return \"inactive-user\"; }\r\n if (item[field] == 'unverified') { return \"inactive-user\"; }\r\n if (item[field] == 'issue(ad)') { return \"issue-ad-user\"; }\r\n if (item[field] == 'issue(non-ad)') { return \"issue-nonad-user\"; }\r\n if (item[field] == 'no-security') { return \"no-security-user\"; }\r\n if (item[field] == 'bad state') { return \"inactive-user\"; }\r\n if (item[field] == 'reset') { return \"inactive-user\"; }\r\n // case \"is_active\":\r\n // return item[field] ? (item.confirmed ? \"active-user\" : \"inactive-user\") : \"inactive-user\";\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function getField(item, field) {\r\n switch (field) {\r\n case \"company.name\":\r\n return item.company ? item.company.name : '';\r\n case \"user_status\":\r\n if (item[field].charAt(0) != null || item[field].charAt(0) != undefined) {\r\n return item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n }\r\n case \"customer_types\":\r\n if (item[field].length > 0) {\r\n return item[field].join(',').toUpperCase();\r\n }\r\n // case \"is_active\":\r\n // return item[field] ? (item.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n case \"edit\":\r\n return 'Edit';\r\n case \"selected\":\r\n return '';\r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function userSearch(isClear) {\r\n var search = {};\r\n\r\n if (isClear) {\r\n search.page = 1;\r\n vm.userSearchNotEnable = true;\r\n\r\n if (search.per_page == undefined)\r\n search.per_page = 10;\r\n else\r\n search.per_page = vm.userTable.parameters().count;\r\n\r\n //if(vm.cww_filter == true || vm.csl_filter == true || vm.cfs_filter == true || vm.cmts_filter == true){\r\n UserManagementService.getUsers(vm.is_active_cehck, vm.exceptionFilter.value, search);\r\n //}\r\n vm.cww_filter = false;\r\n vm.csl_filter = false;\r\n vm.cfs_filter = false;\r\n vm.cmts_filter = false;\r\n vm.filter_only = false;\r\n vm.filterCheck = true;\r\n }\r\n else\r\n vm.userSearchNotEnable = false;\r\n\r\n for (var key in vm.lookup) {\r\n if (isClear) {\r\n delete vm.lookup[key];\r\n } else {\r\n switch (key) {\r\n case 'active':\r\n if (vm.lookup[key]) { search.is_active = vm.lookup[key] === 'Active' ? true : false; }\r\n break;\r\n case 'company':\r\n if (vm.lookup[key].name) { search[key] = vm.lookup[key]; }\r\n break;\r\n default:\r\n if (vm.lookup[key]) { search[key] = vm.lookup[key]; }\r\n }\r\n }\r\n }\r\n // vm.resetSelected();\r\n search['per_page'] = vm.userTable.parameters().count;\r\n search['page'] = 1;\r\n\r\n $location.search(search);\r\n //if (vm.lookupTimeout){\r\n // $timeout.cancel(vm.lookupTimeout);\r\n //}\r\n //vm.lookupTimeout = $timeout(function(){\r\n // UserManagementService.setQuery(search)\r\n //}, 150);\r\n }\r\n\r\n function userSearchFilter() {\r\n\r\n var query = {};\r\n var customer_type = [];\r\n var search = $location.search();\r\n\r\n if (vm.cww_filter == true) {\r\n customer_type.push('cww');\r\n }\r\n if (vm.csl_filter == true) {\r\n customer_type.push('csl');\r\n }\r\n if (vm.cfs_filter == true) {\r\n customer_type.push('cfs');\r\n }\r\n if (vm.cmts_filter == true) {\r\n customer_type.push('cmts');\r\n }\r\n if (customer_type.length == 0) {\r\n UserManagementService.getUsers(vm.is_active_cehck, vm.exceptionFilter.value, search);\r\n }\r\n\r\n if (vm.cww_filter == true || vm.csl_filter == true || vm.cfs_filter == true || vm.cmts_filter == true) {\r\n vm.isLoading.table = true;\r\n query.customer_types = customer_type;\r\n query.search = search;\r\n UserManagementService.getUsersFilter(query, vm.filter_only, vm.is_active_cehck, vm.exceptionFilter.value);\r\n }\r\n\r\n }\r\n\r\n function getTable() {\r\n //// console.log(UserManagementService.getUserTable());\r\n return UserManagementService.getUserTable();\r\n }\r\n\r\n function selected(index) {\r\n vm.lastSelected = index;\r\n if (vm.userTable.data.length) {\r\n vm.lastSelectedValue = vm.userTable.data[index].selected;\r\n }\r\n }\r\n\r\n function selectUser($event, index) {\r\n\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey) {\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n\r\n\r\n\r\n if (vm.userTable != undefined)\r\n vm.listSelectedCount = $filter('filter')(vm.userTable.data, { selected: true }).length;\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n }\r\n\r\n function shiftSelect(index) {\r\n\r\n var first, last;\r\n if (vm.lastSelected > index) {\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++) {\r\n vm.userTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected() {\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.userTable.settings().data.map(function (user) {\r\n user.selected = false;\r\n });\r\n }\r\n\r\n function getSelectedCount(action) {\r\n\r\n if (vm.userTable.settings().data) {\r\n $scope.ad_user_check = vm.userTable.settings().data.map(function (user) {\r\n if (user.selected == true) return user.ad_user;\r\n }).includes(true);\r\n\r\n $scope.ad_user_length = vm.userTable.settings().data.filter(function (user) {\r\n return user.selected && user.ad_user;\r\n }).length;\r\n\r\n $scope.active_user_length = vm.userTable.settings().data.filter(function (user) {\r\n if (user.user_status == 'active') return user.selected;\r\n }).length;\r\n\r\n $scope.inactive_user_length = vm.userTable.settings().data.filter(function (user) {\r\n if (user.user_status == 'inactive') return user.selected;\r\n }).length;\r\n\r\n $scope.issue_ad_length = vm.userTable.settings().data.filter(function (user) {\r\n if (user.user_status == 'issue(ad)') return user.selected;\r\n }).length;\r\n\r\n $scope.issue_nonad_length = vm.userTable.settings().data.filter(function (user) {\r\n if (user.user_status == 'issue(non-ad)' && user.is_active == false) return user.selected;\r\n }).length;\r\n\r\n $scope.issue_nonad_length1 = vm.userTable.settings().data.filter(function (user) {\r\n if (user.user_status == 'issue(non-ad)' && user.is_active == true) return user.selected;\r\n }).length;\r\n\r\n $scope.no_security_length = vm.userTable.settings().data.filter(function (user) {\r\n if (user.user_status == 'no-security') return user.selected;\r\n }).length;\r\n\r\n $scope.unverified_length = vm.userTable.settings().data.filter(function (user) {\r\n if (user.user_status == 'unverified') return user.selected;\r\n }).length;\r\n\r\n $scope.null_length = vm.userTable.settings().data.filter(function (user) {\r\n if (user.user_status == 'bad state') return user.selected;\r\n }).length;\r\n\r\n $scope.reset_user_length = vm.userTable.settings().data.filter(function (user) {\r\n if (user.user_status == 'reset') return user.selected;\r\n }).length;\r\n\r\n return vm.userTable.settings().data.filter(function (user) {\r\n //return user.selected && performFilter(user);\r\n return user.selected;\r\n }).length;\r\n\r\n } else {\r\n return 0;\r\n }\r\n }\r\n // ========================\r\n // End User Table Functions\r\n // ========================\r\n\r\n // ------------------------\r\n // User Edit Form actions\r\n // ------------------------\r\n function resetAll() {\r\n resetPrimary();\r\n resetBCCS();\r\n }\r\n\r\n function getName() {\r\n return (vm.user.first_name || vm.user.last_name) ? (vm.user.first_name ? vm.user.first_name + \" \" : \"\") + (vm.user.last_name ? vm.user.last_name : \"\") : vm.user.email;\r\n }\r\n\r\n function getCompany(id) {\r\n for (var i in vm.companies) {\r\n if (id == vm.companies[i].id) {\r\n return vm.companies[i];\r\n }\r\n }\r\n }\r\n\r\n function getContact(id) {\r\n for (var i in vm.possibleContacts) {\r\n if (id == vm.possibleContacts[i].id) {\r\n return vm.possibleContacts[i];\r\n }\r\n }\r\n }\r\n\r\n function getDefaultContact() {\r\n if (typeof (vm.user.company_id) == 'undefined') return \"\";\r\n var company = getCompany(vm.user.company_id);\r\n if (typeof (company) == 'undefined') return \"\";\r\n var contact = getContact(company.default_contact_id);\r\n if (typeof (contact) == 'undefined') return \"\";\r\n return contact.email;\r\n }\r\n\r\n function getDefaultBCCs() {\r\n if (typeof (vm.user.company_id) == 'undefined') return \"\";\r\n var company = getCompany(vm.user.company_id);\r\n if (typeof (company) == 'undefined') return \"\";\r\n return company.default_bccs.join(', ');\r\n }\r\n\r\n function isPermissionsIn(pgroup) {\r\n if (vm.permissions[pgroup].options) {\r\n return !vm.permissions[pgroup].options.every(function (opt) { return opt.display === false; });\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function logsVisible() {\r\n var logs_empty = !(vm.user && vm.user.log && vm.user.log.length > 0);\r\n return vm.canSetSuperAdmin && !logs_empty;\r\n }\r\n\r\n function resetBCCS() {\r\n vm.user.bccs.values = [];\r\n vm.user.bccs.values.length = 0;\r\n }\r\n\r\n function resetPrimary() {\r\n\r\n vm.user.contact.primary_contact = {};\r\n }\r\n\r\n // Set the primary contact to be a copy of a possible contact\r\n function setPrimaryContact(id) {\r\n vm.possibleContacts.map(function (contact) {\r\n if (contact.id == id) {\r\n vm.user.contact.primary_contact = angular.copy(contact);\r\n }\r\n });\r\n }\r\n\r\n /** Parse a filename from a URL **/\r\n function parseFilename(url) {\r\n var filename = url.substring(url.lastIndexOf('/') + 1);\r\n return filename;\r\n }\r\n\r\n /**\r\n * Handles setting the permissions when a role is selected\r\n */\r\n\r\n function onRoleChangeClassic() {\r\n var role = vm.user.role_classic;\r\n if (role == 'classic_custom') {\r\n angular.forEach(Object.keys(vm.permissions), function (feature) {\r\n var options = vm.permissions[feature].options_classic;\r\n angular.forEach(options, function (o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n\r\n if (role === undefined || role == \"none\") {\r\n vm.permissions.User.options_classic[0].value = false;\r\n vm.permissions.User.options_classic[1].value = false;\r\n vm.permissions.User.options_classic[2].value = false;\r\n vm.permissions.User.options_classic[3].value = false;\r\n vm.permissions.User.options_classic[4].value = false;\r\n vm.permissions.User.options_classic[5].value = false;\r\n vm.permissions.User.options_classic[6].value = false;\r\n vm.permissions.User.options_classic[7].value = false;\r\n }\r\n var permissions = false;\r\n // find the role's permissions\r\n // console.log('testing on Role');\r\n angular.forEach(Object.keys(vm.roles_classic), function (k) {\r\n if (vm.roles_classic[k].key == role) {\r\n permissions = vm.roles_classic[k].permissions;\r\n return false;\r\n }\r\n });\r\n if (!permissions) return;\r\n\r\n // assign the permissions\r\n var permissionsMap = {};\r\n angular.forEach(permissions, function (perm) {\r\n var bits = perm.split('.');\r\n permissionsMap[bits[0]] = permissionsMap[bits[0]] || {};\r\n permissionsMap[bits[0]][bits[1]] = true;\r\n });\r\n angular.forEach(Object.keys(vm.permissions), function (feature) {\r\n var options = vm.permissions[feature].options_classic;\r\n\r\n angular.forEach(options, function (o) {\r\n o.value = permissionsMap[feature] && permissionsMap[feature][o.name];\r\n });\r\n });\r\n // console.log('inside onrole');\r\n }\r\n\r\n function onRoleChange() {\r\n // console.log('vm.permissions', vm.roles);\r\n var role = vm.user.role;\r\n if (role == 'custom') {\r\n angular.forEach(Object.keys(vm.permissions), function (feature) {\r\n var options = vm.permissions[feature].options;\r\n angular.forEach(options, function (o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n var permissions = false;\r\n // find the role's permissions\r\n // console.log('testing on Role');\r\n angular.forEach(Object.keys(vm.roles), function (k) {\r\n if (vm.roles[k].key == role) {\r\n permissions = vm.roles[k].permissions;\r\n return false;\r\n }\r\n });\r\n if (!permissions) return;\r\n\r\n // assign the permissions\r\n var permissionsMap = {};\r\n angular.forEach(permissions, function (perm) {\r\n var bits = perm.split('.');\r\n permissionsMap[bits[0]] = permissionsMap[bits[0]] || {};\r\n permissionsMap[bits[0]][bits[1]] = true;\r\n });\r\n angular.forEach(Object.keys(vm.permissions), function (feature) {\r\n var options = vm.permissions[feature].options;\r\n\r\n angular.forEach(options, function (o) {\r\n o.value = permissionsMap[feature] && permissionsMap[feature][o.name];\r\n });\r\n });\r\n // console.log('inside onrole');\r\n }\r\n\r\n function onRoleChangeCSL() {\r\n // console.log('vm.permissions', vm.roles);\r\n var role = vm.user.role_csl;\r\n if (role == 'custom') {\r\n angular.forEach(Object.keys(vm.permissions), function (feature) {\r\n var options = vm.permissions[feature].options_csl;\r\n angular.forEach(options, function (o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n var permissions = false;\r\n // find the role's permissions\r\n // console.log('testing on Role');\r\n angular.forEach(Object.keys(vm.roles_csl), function (k) {\r\n if (vm.roles_csl[k].key == role) {\r\n permissions = vm.roles_csl[k].permissions;\r\n return false;\r\n }\r\n });\r\n if (!permissions) return;\r\n\r\n // assign the permissions\r\n var permissionsMap = {};\r\n angular.forEach(permissions, function (perm) {\r\n var bits = perm.split('.');\r\n permissionsMap[bits[0]] = permissionsMap[bits[0]] || {};\r\n permissionsMap[bits[0]][bits[1]] = true;\r\n });\r\n angular.forEach(Object.keys(vm.permissions), function (feature) {\r\n var options = vm.permissions[feature].options_csl;\r\n\r\n angular.forEach(options, function (o) {\r\n o.value = permissionsMap[feature] && permissionsMap[feature][o.name];\r\n });\r\n });\r\n // console.log('inside onrole');\r\n }\r\n\r\n function onRoleChangeCFS() {\r\n // console.log('vm.permissions', vm.roles);\r\n var role = vm.user.role_cfs;\r\n if (role == 'custom') {\r\n angular.forEach(Object.keys(vm.permissions), function (feature) {\r\n var options = vm.permissions[feature].options_cfs;\r\n angular.forEach(options, function (o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n var permissions = false;\r\n // find the role's permissions\r\n // console.log('testing on Role');\r\n angular.forEach(Object.keys(vm.roles_cfs), function (k) {\r\n if (vm.roles_cfs[k].key == role) {\r\n permissions = vm.roles_cfs[k].permissions;\r\n return false;\r\n }\r\n });\r\n if (!permissions) return;\r\n\r\n // assign the permissions\r\n var permissionsMap = {};\r\n angular.forEach(permissions, function (perm) {\r\n var bits = perm.split('.');\r\n permissionsMap[bits[0]] = permissionsMap[bits[0]] || {};\r\n permissionsMap[bits[0]][bits[1]] = true;\r\n });\r\n angular.forEach(Object.keys(vm.permissions), function (feature) {\r\n var options = vm.permissions[feature].options_cfs;\r\n\r\n angular.forEach(options, function (o) {\r\n o.value = permissionsMap[feature] && permissionsMap[feature][o.name];\r\n });\r\n });\r\n // console.log('inside onrole');\r\n }\r\n\r\n function onRoleChangeCMTS() {\r\n var role = vm.user.role_cmts;\r\n if (role == 'custom') {\r\n angular.forEach(Object.keys(vm.permissions), function (feature) {\r\n var options = vm.permissions[feature].options_cmts;\r\n angular.forEach(options, function (o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n var permissions = false;\r\n // find the role's permissions\r\n angular.forEach(Object.keys(vm.roles_cmts), function (k) {\r\n if (vm.roles_cmts[k].key == role) {\r\n permissions = vm.roles_cmts[k].permissions;\r\n return false;\r\n }\r\n });\r\n if (!permissions) return;\r\n\r\n // assign the permissions\r\n var permissionsMap = {};\r\n angular.forEach(permissions, function (perm) {\r\n var bits = perm.split('.');\r\n permissionsMap[bits[0]] = permissionsMap[bits[0]] || {};\r\n permissionsMap[bits[0]][bits[1]] = true;\r\n });\r\n angular.forEach(Object.keys(vm.permissions), function (feature) {\r\n var options = vm.permissions[feature].options_cmts;\r\n\r\n angular.forEach(options, function (o) {\r\n o.value = permissionsMap[feature] && permissionsMap[feature][o.name];\r\n });\r\n });\r\n }\r\n\r\n\r\n /**\r\n * Handles setting the role to Custom whenever a permission has changed\r\n */\r\n\r\n\r\n function onPermissionsChangeClassic(permission, event) {\r\n\r\n var transport = permission.User.options_classic[0].value ? true : false;\r\n var warehouse = permission.User.options_classic[1].value ? true : false;\r\n var accounts_recievables = permission.User.options_classic[2].value ? true : false;\r\n var book_shipment = permission.User.options_classic[3].value ? true : false;\r\n var reporting = permission.User.options_classic[4].value ? true : false;\r\n var operations_kpi = permission.User.options_classic[5].value ? true : false;\r\n var operations_dashboard = permission.User.options_classic[6].value ? true : false;\r\n var customs = permission.User.options_classic[7].value ? true : false;\r\n\r\n var cview_full_access = (transport == true && warehouse == true && accounts_recievables == true && book_shipment == true && reporting == true && operations_kpi == true && operations_dashboard == true && customs == true)\r\n\r\n var cview_customer_ops = (transport == true && warehouse == true && book_shipment == true && operations_kpi == true && accounts_recievables == false && reporting == false && operations_dashboard == false && customs == false);\r\n\r\n var cview_customer_shipper = (transport == true && book_shipment == true && operations_kpi == true && warehouse == false && accounts_recievables == false && reporting == false && operations_dashboard == false && customs == false);\r\n\r\n var cview_customer_consignee = (transport == true && operations_kpi == true && warehouse == false && book_shipment == false && accounts_recievables == false && reporting == false && operations_dashboard == false && customs == false);\r\n\r\n var cview_no_access = (transport == false && warehouse == false && accounts_recievables == false && book_shipment == false && reporting == false && operations_kpi == false && operations_dashboard == false && customs == false);\r\n\r\n\r\n if ((cview_full_access)) {\r\n vm.user.role_classic = 'customer_classic';\r\n }\r\n else if ((cview_customer_ops)) {\r\n vm.user.role_classic = 'classic_customer_ops';\r\n }\r\n else if ((cview_customer_shipper)) {\r\n vm.user.role_classic = 'classic_customer_shipper';\r\n }\r\n else if ((cview_customer_consignee)) {\r\n vm.user.role_classic = 'classic_customer_consignee';\r\n }\r\n // else\r\n // {\r\n // vm.user.role_classic = 'classic_custom';\r\n // }\r\n\r\n\r\n }\r\n\r\n function onPermissionsChange(permission, event) {\r\n\r\n if (vm.permissions['Company'].options[1].value == true) {\r\n vm.permissions['User'].options[1].value = true;\r\n }\r\n\r\n var pe_perm1 = permission.Company.options\r\n if (pe_perm1[0].value == true) {\r\n pe_perm1[2].value = false;\r\n }\r\n var pe_perm = permission.PotentialException.options\r\n if (pe_perm[1].value == true) {\r\n pe_perm[0].value = true;\r\n }\r\n if (pe_perm[1].value == true || pe_perm[0].value == true) {\r\n pe_perm[2].value = false;\r\n }\r\n if ((pe_perm[1].value == true || pe_perm[0].value == true) && pe_perm[2] == false) {\r\n pe_perm[1].value = false;\r\n pe_perm[0].value = false;\r\n }\r\n\r\n var permission1 = permission.SupportRequestAdmin.options;\r\n var permission2 = permission.SupportRequestUser.options;\r\n var permission3 = permission.SupportRequestValidator.options;\r\n var permission4 = permission.CviewClassicAdmin.options;\r\n\r\n if (permission1[0].value == true) {\r\n permission2[0].value = false;\r\n permission3[0].value = false;\r\n permission4[0].value = false;\r\n }\r\n\r\n if (permission2[0].value == true) {\r\n permission1[0].value = false;\r\n permission3[0].value = false;\r\n permission4[0].value = false;\r\n }\r\n\r\n if (permission3[0].value == true) {\r\n permission2[0].value = false;\r\n permission1[0].value = false;\r\n permission4[0].value = false;\r\n }\r\n\r\n if (permission4[0].value == true) {\r\n permission2[0].value = false;\r\n permission1[0].value = false;\r\n permission3[0].value = false;\r\n }\r\n\r\n\r\n var lensGroup = permission.LensGroup.options[0];\r\n // Only crane admin should be allowed to toggle on/off manage lens group\r\n if (vm.currentUser.roles.cww) {\r\n if (!vm.currentUser.roles.cww.includes(\"crane_admin\") && event == 'Manage Lens Groups') {\r\n lensGroup.value = lensGroup.value ? false : true;\r\n }\r\n }\r\n\r\n var superAdmin = permission.Admin.options[0].value ? true : false;\r\n var companyAdmin = permission.Company.options[0].value ? true : false;\r\n var accessCompanyLensData = permission.Company.options[1].value ? true : false;\r\n var groupAdmin = permission.Group.options[0].value ? true : false;\r\n var shipmentView = permission.Shipment.options[0].value ? true : false;\r\n var editPotentialExceptions = permission.PotentialException.options[0].value ? true : false;\r\n var approvePotentialExceptions = permission.PotentialException.options[1].value ? true : false;\r\n var manageLensGroup = permission.LensGroup.options[0].value ? true : false;\r\n var mangeUsers = permission.User.options[0].value ? true : false;\r\n var cviewLensMode = permission.User.options[1].value ? true : false;\r\n var canExport = permission.Shipment.options[1].value ? true : false;\r\n var financial = permission.Shipment.options[2].value ? true : false;\r\n var supportRequestUser = permission.SupportRequestUser.options[0].value ? true : false;\r\n var supportRequestAdmin = permission.SupportRequestAdmin.options[0].value ? true : false;\r\n var supportRequestValidator = permission.SupportRequestValidator.options[0].value ? true : false;\r\n var cviewClassicAdmin = permission.CviewClassicAdmin.options[0].value ? true : false;\r\n var pe_read = permission.PotentialException.options[2].value ? true : false;\r\n\r\n if (vm.company.portal_type == 'customer') {\r\n if ((approvePotentialExceptions == true && editPotentialExceptions == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == false && companyAdmin == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && !pe_read && canExport && financial)) {\r\n vm.user.role = 'approver';\r\n }\r\n else if ((approvePotentialExceptions == false && editPotentialExceptions == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == false && companyAdmin == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && !pe_read && canExport && financial)) {\r\n vm.user.role = 'editor';\r\n }\r\n else if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && editPotentialExceptions == false && approvePotentialExceptions == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && !pe_read && canExport && financial)) {\r\n vm.user.role = 'customer';\r\n }\r\n else if ((approvePotentialExceptions == false && editPotentialExceptions == false && cviewLensMode == true && shipmentView == true && accessCompanyLensData == true && companyAdmin == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && !pe_read && canExport && financial)) {\r\n vm.user.role = 'customer_lens';\r\n }\r\n else if ((shipmentView == true && cviewLensMode == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && editPotentialExceptions == false && approvePotentialExceptions == false && manageLensGroup == false && mangeUsers == false && !pe_read && canExport && financial)) {\r\n vm.user.role = 'crane_user';\r\n }\r\n else if ((superAdmin == true && approvePotentialExceptions == true && editPotentialExceptions == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == true && companyAdmin == true && groupAdmin == true && manageLensGroup == true && mangeUsers == true && !pe_read && canExport && financial)) {\r\n vm.user.role = 'crane_admin';\r\n }\r\n else if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && editPotentialExceptions == false && approvePotentialExceptions == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && !pe_read && canExport == false && financial)) {\r\n vm.user.role = 'customer_no_tt_export'\r\n }\r\n else if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && editPotentialExceptions == false && approvePotentialExceptions == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && !pe_read && financial == false && canExport)) {\r\n vm.user.role = 'customer_no_financial'\r\n }\r\n else {\r\n vm.user.role = 'custom';\r\n }\r\n }\r\n else if (vm.company.portal_type == 'shipper') {\r\n if ((shipmentView == true && financial == false && canExport)) {\r\n vm.user.role = 'customer_shipper'\r\n } else {\r\n vm.user.role = 'custom';\r\n }\r\n }\r\n else if (vm.company.portal_type == 'consignee') {\r\n if ((shipmentView == true && financial == false && canExport)) {\r\n vm.user.role = 'customer_consignee'\r\n } else {\r\n vm.user.role = 'custom';\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n function onPermissionsChangeCSL(permission, event) {\r\n\r\n if (vm.permissions['Company'].options_csl[1].value == true) {\r\n vm.permissions['User'].options_csl[1].value = true;\r\n }\r\n\r\n var pe_perm1 = permission.Company.options_csl\r\n if (pe_perm1[0].value == true) {\r\n pe_perm1[2].value = false;\r\n }\r\n\r\n if (vm.permissions['CslException'].options_csl[1].value == true) {\r\n vm.permissions['CslException'].options_csl[0].value = true;\r\n }\r\n\r\n var lensGroup = permission.LensGroup.options_csl[0];\r\n // Only crane admin should be allowed to toggle on/off manage lens group\r\n if (vm.currentUser.roles.csl) {\r\n if (!vm.currentUser.roles.csl.includes(\"crane_admin\") && event == 'Manage Lens Groups') {\r\n lensGroup.value = lensGroup.value ? false : true;\r\n }\r\n }\r\n\r\n var superAdmin = permission.Admin.options_csl[0].value ? true : false;\r\n var companyAdmin = permission.Company.options_csl[0].value ? true : false;\r\n var accessCompanyLensData = permission.Company.options_csl[1].value ? true : false;\r\n var groupAdmin = permission.Group.options_csl[0].value ? true : false;\r\n var shipmentView = permission.Load.options_csl[0].value ? true : false;\r\n var manageLensGroup = permission.LensGroup.options_csl[0].value ? true : false;\r\n var mangeUsers = permission.User.options_csl[0].value ? true : false;\r\n var cviewLensMode = permission.User.options_csl[1].value ? true : false;\r\n var canExport = permission.Shipment.options_csl[1].value ? true : false;\r\n var financial = permission.Shipment.options_csl[2].value ? true : false;\r\n\r\n\r\n if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport && financial)) {\r\n vm.user.role_csl = 'customer';\r\n }\r\n else if ((shipmentView == true && cviewLensMode == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && canExport && financial)) {\r\n vm.user.role_csl = 'crane_user';\r\n }\r\n else if ((superAdmin == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == true && companyAdmin == true && groupAdmin == true && manageLensGroup == true && mangeUsers == true && canExport && financial)) {\r\n vm.user.role_csl = 'crane_admin';\r\n }\r\n else if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport == false && financial)) {\r\n vm.user.role_csl = 'customer_no_tt_export'\r\n }\r\n else if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && financial == false && canExport)) {\r\n vm.user.role_csl = 'customer_no_financial'\r\n }\r\n else {\r\n vm.user.role_csl = 'custom';\r\n }\r\n }\r\n\r\n function onCslToggle(event, permission) {\r\n if (permission.name === \"Read Only\" && permission.value === true) {\r\n vm.permissions['CslException'].options_csl[0].value = false;\r\n vm.permissions['CslException'].options_csl[1].value = false;\r\n }\r\n if (permission.name === \"All Clients\" && permission.value === true) {\r\n vm.permissions['CslException'].options_csl[2].value = false;\r\n }\r\n if (permission.name === \"Approver\" && permission.value === true) {\r\n vm.permissions['CslException'].options_csl[2].value = false;\r\n }\r\n\r\n\r\n }\r\n\r\n function onCfsToggle(event, permission) {\r\n if (permission.name === \"Read Only\" && permission.value === true) {\r\n vm.permissions['CslException'].options_cfs[0].value = false;\r\n vm.permissions['CslException'].options_cfs[1].value = false;\r\n }\r\n if (permission.name === \"All Clients\" && permission.value === true) {\r\n vm.permissions['CslException'].options_cfs[2].value = false;\r\n }\r\n if (permission.name === \"Approver\" && permission.value === true) {\r\n vm.permissions['CslException'].options_cfs[2].value = false;\r\n }\r\n }\r\n\r\n function onCmtsToggle(event, permission) {\r\n if (permission.name === \"Read Only\" && permission.value === true) {\r\n vm.permissions['CslException'].options_cmts[0].value = false;\r\n vm.permissions['CslException'].options_cmts[1].value = false;\r\n }\r\n if (permission.name === \"All Clients\" && permission.value === true) {\r\n vm.permissions['CslException'].options_cmts[2].value = false;\r\n }\r\n if (permission.name === \"Approver\" && permission.value === true) {\r\n vm.permissions['CslException'].options_cmts[2].value = false;\r\n }\r\n }\r\n\r\n function onPermissionsChangeCFS(permission, event) {\r\n\r\n if (vm.permissions['Company'].options_cfs[1].value == true) {\r\n vm.permissions['User'].options_cfs[1].value = true;\r\n }\r\n\r\n var pe_perm1 = permission.Company.options_cfs\r\n if (pe_perm1[0].value == true) {\r\n pe_perm1[2].value = false;\r\n }\r\n\r\n if (vm.permissions['CslException'].options_cfs[1].value == true) {\r\n vm.permissions['CslException'].options_cfs[0].value = true;\r\n }\r\n\r\n var lensGroup = permission.LensGroup.options_cfs[0];\r\n // Only crane admin should be allowed to toggle on/off manage lens group\r\n if (vm.currentUser.roles.cfs) {\r\n if (!vm.currentUser.roles.cfs.includes(\"crane_admin\") && event == 'Manage Lens Groups') {\r\n lensGroup.value = lensGroup.value ? false : true;\r\n }\r\n }\r\n\r\n var superAdmin = permission.Admin.options_cfs[0].value ? true : false;\r\n var companyAdmin = permission.Company.options_cfs[0].value ? true : false;\r\n var accessCompanyLensData = permission.Company.options_cfs[1].value ? true : false;\r\n var groupAdmin = permission.Group.options_cfs[0].value ? true : false;\r\n var shipmentView = permission.Load.options_cfs[0].value ? true : false;\r\n var manageLensGroup = permission.LensGroup.options_cfs[0].value ? true : false;\r\n var mangeUsers = permission.User.options_cfs[0].value ? true : false;\r\n var cviewLensMode = permission.User.options_cfs[1].value ? true : false;\r\n var canExport = permission.Shipment.options_cfs[1].value ? true : false;\r\n var financial = permission.Shipment.options_cfs[2].value ? true : false;\r\n\r\n\r\n if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport && financial)) {\r\n vm.user.role_cfs = 'customer';\r\n }\r\n else if ((shipmentView == true && cviewLensMode == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && canExport && financial)) {\r\n vm.user.role_cfs = 'crane_user';\r\n }\r\n else if ((superAdmin == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == true && companyAdmin == true && groupAdmin == true && manageLensGroup == true && mangeUsers == true && canExport && financial)) {\r\n vm.user.role_cfs = 'crane_admin';\r\n }\r\n else if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport == false && financial)) {\r\n vm.user.role_cfs = 'customer_no_tt_export'\r\n }\r\n else if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && financial == false && canExport)) {\r\n vm.user.role_cfs = 'customer_no_financial'\r\n }\r\n else {\r\n vm.user.role_cfs = 'custom';\r\n }\r\n }\r\n\r\n function onPermissionsChangeCMTS(permission, event) {\r\n\r\n if (vm.permissions['Company'].options_cmts[1].value == true) {\r\n vm.permissions['User'].options_cmts[1].value = true;\r\n }\r\n\r\n var pe_perm1 = permission.Company.options_cmts\r\n if (pe_perm1[0].value == true) {\r\n pe_perm1[2].value = false;\r\n }\r\n\r\n if (vm.permissions['CslException'].options_cmts[1].value == true) {\r\n vm.permissions['CslException'].options_cmts[0].value = true;\r\n }\r\n\r\n var lensGroup = permission.LensGroup.options_cmts[0];\r\n // Only crane admin should be allowed to toggle on/off manage lens group\r\n if (vm.currentUser.roles.cmts) {\r\n if (!vm.currentUser.roles.cmts.includes(\"crane_admin\") && event == 'Manage Lens Groups') {\r\n lensGroup.value = lensGroup.value ? false : true;\r\n }\r\n }\r\n\r\n var superAdmin = permission.Admin.options_cmts[0].value ? true : false;\r\n var companyAdmin = permission.Company.options_cmts[0].value ? true : false;\r\n var accessCompanyLensData = permission.Company.options_cmts[1].value ? true : false;\r\n var groupAdmin = permission.Group.options_cmts[0].value ? true : false;\r\n var shipmentView = permission.Load.options_cmts[0].value ? true : false;\r\n var manageLensGroup = permission.LensGroup.options_cmts[0].value ? true : false;\r\n var mangeUsers = permission.User.options_cmts[0].value ? true : false;\r\n var cviewLensMode = permission.User.options_cmts[1].value ? true : false;\r\n var canExport = permission.Shipment.options_cmts[1].value ? true : false;\r\n var financial = permission.Shipment.options_cmts[2].value ? true : false;\r\n\r\n\r\n if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport && financial)) {\r\n vm.user.role_cmts = 'customer';\r\n }\r\n else if ((shipmentView == true && cviewLensMode == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && canExport && financial)) {\r\n vm.user.role_cmts = 'crane_user';\r\n }\r\n else if ((superAdmin == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == true && companyAdmin == true && groupAdmin == true && manageLensGroup == true && mangeUsers == true && canExport && financial)) {\r\n vm.user.role_cmts = 'crane_admin';\r\n }\r\n else if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport == false && financial)) {\r\n vm.user.role_cmts = 'customer_no_tt_export'\r\n }\r\n else if ((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && financial == false && canExport)) {\r\n vm.user.role_cmts = 'customer_no_financial'\r\n }\r\n else {\r\n vm.user.role_cmts = 'custom';\r\n }\r\n }\r\n\r\n function manageLensGroupDisabled() {\r\n return (vm.user.company_id != 4) || (UserService.canAccess(\"User.manage\") && vm.user.role && vm.user.role != 'crane_admin');\r\n }\r\n\r\n\r\n function canSetIsCraneContact() {\r\n var meUser = UserService.getUserData();\r\n return meUser.company && meUser.company.is_crane;\r\n }\r\n\r\n function canSetSuperAdmin() {\r\n var meUser = UserService.getUserData();\r\n\r\n if ((meUser.roles.cww ? (meUser.roles.cww.includes('super_admin')) : false) ||\r\n (meUser.roles.csl ? (meUser.roles.csl.includes('super_admin')) : false) ||\r\n (meUser.roles.cfs ? (meUser.roles.cfs.includes('super_admin')) : false) ||\r\n (meUser.roles.cmts ? (meUser.roles.cmts.includes('super_admin')) : false)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n //return meUser.super_admin;\r\n }\r\n\r\n function canSetPermissions() {\r\n var meUser = UserService.getUserData();\r\n var superadminCheck;\r\n if (vm.user) {\r\n\r\n if ((meUser.roles.cww ? (meUser.roles.cww.includes('super_admin')) : false) ||\r\n (meUser.roles.csl ? (meUser.roles.csl.includes('super_admin')) : false) ||\r\n (meUser.roles.cfs ? (meUser.roles.cfs.includes('super_admin')) : false) ||\r\n (meUser.roles.cmts ? (meUser.roles.cmts.includes('super_admin')) : false)) {\r\n var superadminCheck = true;\r\n } else {\r\n var superadminCheck = false;\r\n }\r\n\r\n return meUser.id != vm.user.id || superadminCheck;\r\n } else {\r\n //meUser.super_admin;\r\n\r\n if ((meUser.roles.cww ? (meUser.roles.cww.includes('super_admin')) : false) ||\r\n (meUser.roles.csl ? (meUser.roles.csl.includes('super_admin')) : false) ||\r\n (meUser.roles.cfs ? (meUser.roles.cfs.includes('super_admin')) : false) ||\r\n (meUser.roles.cmts ? (meUser.roles.cmts.includes('super_admin')) : false)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n }\r\n }\r\n\r\n /**\r\n * Returns an array that is based on the number of permissions displayed % mod\r\n * @param {Integer} mod Number to mod by\r\n * @return {Array}\r\n */\r\n function getRemainingPermissionGroupsAmountArray(mod) {\r\n var arr = [],\r\n empty = 3 - vm.permissions_display.length % mod;\r\n\r\n if (empty == mod) return arr;\r\n\r\n for (var i = 0; i < empty; i++) {\r\n arr.push(i);\r\n }\r\n return arr;\r\n }\r\n\r\n function updateAccount(newUser) {\r\n // if(parseInt(localStorage.user_id) == vm.user.id){\r\n // window.location.reload(true);\r\n // }\r\n vm.isSave = true;\r\n if (!vm.formIsValid()) {\r\n var errors = \"\"\r\n showToastWithFile('update-account-invalid.error.html', errors);\r\n return;\r\n }\r\n var lens_group_ids = [];\r\n var lensGroupTable = userLensGroupService.getLensGroupTable();\r\n angular.forEach(lensGroupTable.data, function (lens) {\r\n lens_group_ids.push(lens.id);\r\n });\r\n vm.user.lens_group_ids = lens_group_ids;\r\n vm.isLoading.account = true;\r\n if (vm.user.password == \"********\") {\r\n vm.user.password = \"\";\r\n vm.user.password_confirmation = \"\";\r\n }\r\n\r\n vm.user.customer_types = [];\r\n vm.user.customer_type_setup = {};\r\n\r\n if (vm.user.is_cww == true) {\r\n vm.user.customer_types.push('cww');\r\n vm.user.customer_type_setup.cww = {};\r\n vm.user.customer_type_setup.cww.discussion_enabled = vm.user.is_discussion;\r\n\r\n vm.user.customer_type_setup.cww.view_air_shipments = vm.user.view_air_shipments_cww;\r\n vm.user.customer_type_setup.cww.view_ground_shipments = vm.user.view_ground_shipments_cww;\r\n vm.user.customer_type_setup.cww.view_sea_shipments = vm.user.view_sea_shipments_cww;\r\n\r\n if (vm.user.is_reskin == true) {\r\n if (vm.user.reskin_type == undefined) {\r\n vm.user.customer_type_setup.cww.reskin_type = 'magno';\r\n }\r\n else {\r\n vm.user.customer_type_setup.cww.reskin_type = vm.user.reskin_type;\r\n }\r\n vm.user.customer_type_setup.cww.is_reskin = true;\r\n }\r\n if (vm.user.is_reskin == false) {\r\n if (vm.user.reskin_type == undefined) {\r\n vm.user.customer_type_setup.cww.reskin_type = 'default';\r\n }\r\n else {\r\n vm.user.customer_type_setup.cww.reskin_type = vm.user.reskin_type;\r\n }\r\n vm.user.customer_type_setup.cww.is_reskin = false;\r\n }\r\n if (vm.user.primary_contact_cww) {\r\n vm.user.customer_type_setup.cww.default_contact_id = vm.user.primary_contact_cww;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cww.default_contact_id = \"\";\r\n }\r\n }\r\n if (vm.user.default_bccs_cww.length > 0) {\r\n vm.user.customer_type_setup.cww.default_bccs = vm.user.default_bccs_cww;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cww.default_bccs = [];\r\n }\r\n }\r\n if (vm.user.party_id_names_cww.length > 0) {\r\n vm.user.customer_type_setup.cww.party_id_names = vm.user.party_id_names_cww;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cww.party_id_names = [];\r\n }\r\n }\r\n if (vm.user.related_party_id_names.length > 0) {\r\n vm.user.customer_type_setup.cww.related_party_id_names = vm.user.related_party_id_names;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cww.related_party_id_names = [];\r\n }\r\n }\r\n if (vm.user.department_ids_cww.length > 0) {\r\n vm.user.customer_type_setup.cww.department_ids = vm.user.department_ids_cww;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cww.department_ids = [];\r\n }\r\n }\r\n\r\n\r\n }\r\n\r\n if (vm.user.is_csl == true) {\r\n vm.user.customer_types.push('csl');\r\n vm.user.customer_type_setup.csl = {};\r\n vm.user.customer_type_setup.csl.discussion_enabled = vm.user.is_discussion_csl;\r\n if (vm.user.primary_contact_csl) {\r\n vm.user.customer_type_setup.csl.default_contact_id = vm.user.primary_contact_csl;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.csl.default_contact_id = \"\";\r\n }\r\n }\r\n if (vm.user.default_bccs_csl.length > 0) {\r\n vm.user.customer_type_setup.csl.default_bccs = vm.user.default_bccs_csl;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.csl.default_bccs = [];\r\n }\r\n }\r\n if (vm.user.party_id_names_csl.length > 0) {\r\n vm.user.customer_type_setup.csl.party_id_names = vm.user.party_id_names_csl;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.csl.party_id_names = [];\r\n }\r\n }\r\n if (vm.user.department_ids_csl.length > 0) {\r\n vm.user.customer_type_setup.csl.department_ids = vm.user.department_ids_csl;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.csl.department_ids = [];\r\n }\r\n }\r\n }\r\n\r\n if (vm.user.is_cfs == true) {\r\n vm.user.customer_types.push('cfs');\r\n vm.user.customer_type_setup.cfs = {};\r\n vm.user.customer_type_setup.cfs.discussion_enabled = vm.user.is_discussion_cfs;\r\n if (vm.user.primary_contact_cfs) {\r\n vm.user.customer_type_setup.cfs.default_contact_id = vm.user.primary_contact_cfs;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cfs.default_contact_id = \"\";\r\n }\r\n }\r\n if (vm.user.default_bccs_cfs.length > 0) {\r\n vm.user.customer_type_setup.cfs.default_bccs = vm.user.default_bccs_cfs;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cfs.default_bccs = [];\r\n }\r\n }\r\n if (vm.user.party_id_names_cfs.length > 0) {\r\n vm.user.customer_type_setup.cfs.party_id_names = vm.user.party_id_names_cfs;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cfs.party_id_names = [];\r\n }\r\n }\r\n if (vm.user.department_ids_cfs.length > 0) {\r\n vm.user.customer_type_setup.cfs.department_ids = vm.user.department_ids_cfs;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cfs.department_ids = [];\r\n }\r\n }\r\n }\r\n\r\n if (vm.user.is_cmts == true) {\r\n vm.user.customer_types.push('cmts');\r\n vm.user.customer_type_setup.cmts = {};\r\n vm.user.customer_type_setup.cmts.discussion_enabled = vm.user.is_discussion_cmts;\r\n if (vm.user.primary_contact_cmts) {\r\n vm.user.customer_type_setup.cmts.default_contact_id = vm.user.primary_contact_cmts;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cmts.default_contact_id = \"\";\r\n }\r\n }\r\n if (vm.user.default_bccs_cmts.length > 0) {\r\n vm.user.customer_type_setup.cmts.default_bccs = vm.user.default_bccs_cmts;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cmts.default_bccs = [];\r\n }\r\n }\r\n if (vm.user.party_id_names_cmts.length > 0) {\r\n vm.user.customer_type_setup.cmts.party_id_names = vm.user.party_id_names_cmts;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cmts.party_id_names = [];\r\n }\r\n }\r\n if (vm.user.department_ids_cmts.length > 0) {\r\n vm.user.customer_type_setup.cmts.department_ids = vm.user.department_ids_cmts;\r\n }\r\n else {\r\n if (!vm.isCreate) {\r\n vm.user.customer_type_setup.cmts.department_ids = [];\r\n }\r\n }\r\n }\r\n\r\n\r\n if (vm.user.is_cww == true || vm.user.is_csl == true || vm.user.is_cfs == true || vm.user.is_cmts == true) {\r\n vm.customer_type_cehck = false;\r\n } else {\r\n vm.customer_type_cehck = true;\r\n }\r\n\r\n\r\n\r\n if (vm.isCreate) {\r\n vm.user.lens_group_ids = [];\r\n\r\n UserManagementService.postUser(vm.user).then(function (response) {\r\n vm.isLoading.account = false;\r\n vm.saveBtnShow = false;\r\n vm.user.synced_with_ad = true;\r\n\r\n if (response.data.error == \"Internal Server Error\") {\r\n var message = [];\r\n message[0] = \"This email address was used for a deleted account.\"\r\n + \" If you would like to re-create this account, please contact a database administrator\";\r\n showApiError(message);\r\n }\r\n if (response.status != 200) {\r\n showApiError(response.data.message);\r\n } else {\r\n\r\n showToastWithFile('create-account.success.html');\r\n\r\n if (!newUser) {\r\n setTimeout(function () {\r\n $location.path('/users');\r\n }, 2500);\r\n }\r\n\r\n if (newUser) {\r\n setupNewUser();\r\n $location.path('/users/new');\r\n }\r\n }\r\n });\r\n } else {\r\n\r\n // console.log(vm.user);\r\n\r\n\r\n UserManagementService.updateUser($stateParams.id, vm.user).then(function (response) {\r\n //vm.user = UserManagementService.getUserDetails();\r\n\r\n if (response.status != 200) {\r\n showApiError(response.data.message);\r\n } else {\r\n\r\n // if(response.data.contact.primary_contact != null){\r\n // vm.user.contact.primary_contact = response.data.contact.primary_contact.id;\r\n // }\r\n\r\n // if(vm.user.super_admin == true){\r\n // vm.permissions['Admin']['options'][0]['value'] = true;\r\n // }else{\r\n // vm.permissions['Admin']['options'][0]['value'] = false;\r\n // }\r\n\r\n if (vm.user.roles.cww) {\r\n if (vm.user.customer_type_setup.cww.related_party_id_names.length > 0) {\r\n vm.user.related_party_id_names = vm.user.customer_type_setup.cww.related_party_id_names;\r\n }\r\n if (vm.user.roles.cww.length > 0) {\r\n if (vm.user.roles.cww.includes('super_admin')) {\r\n vm.permissions['Admin']['options'][0]['value'] = true;\r\n } else {\r\n vm.permissions['Admin']['options'][0]['value'] = false;\r\n }\r\n }\r\n }\r\n\r\n if (vm.user.roles.csl) {\r\n if (vm.user.roles.csl.length > 0) {\r\n if (vm.user.roles.csl.includes('super_admin')) {\r\n vm.permissions['Admin']['options_csl'][0]['value'] = true;\r\n } else {\r\n vm.permissions['Admin']['options_csl'][0]['value'] = false;\r\n }\r\n }\r\n }\r\n\r\n if (vm.user.roles.cfs) {\r\n if (vm.user.roles.cfs.length > 0) {\r\n if (vm.user.roles.cfs.includes('super_admin')) {\r\n vm.permissions['Admin']['options_cfs'][0]['value'] = true;\r\n } else {\r\n vm.permissions['Admin']['options_cfs'][0]['value'] = false;\r\n }\r\n }\r\n }\r\n\r\n if (vm.user.roles.cmts) {\r\n if (vm.user.roles.cmts.length > 0) {\r\n if (vm.user.roles.cmts.includes('super_admin')) {\r\n vm.permissions['Admin']['options_cmts'][0]['value'] = true;\r\n } else {\r\n vm.permissions['Admin']['options_cmts'][0]['value'] = false;\r\n }\r\n }\r\n }\r\n\r\n if (vm.user.support_request_user == true) {\r\n\r\n vm.permissions['SupportRequestUser']['options'][0]['value'] = true;\r\n } else {\r\n vm.permissions['SupportRequestUser']['options'][0]['value'] = false;\r\n }\r\n\r\n if (vm.user.support_request_admin == true) {\r\n vm.permissions['SupportRequestAdmin']['options'][0]['value'] = true;\r\n } else {\r\n vm.permissions['SupportRequestAdmin']['options'][0]['value'] = false;\r\n }\r\n\r\n if (vm.user.support_request_validator == true) {\r\n vm.permissions['SupportRequestValidator']['options'][0]['value'] = true;\r\n } else {\r\n vm.permissions['SupportRequestValidator']['options'][0]['value'] = false;\r\n }\r\n\r\n if (vm.user.cview_classic_admin == true) {\r\n vm.permissions['CviewClassicAdmin']['options'][0]['value'] = true;\r\n } else {\r\n vm.permissions['CviewClassicAdmin']['options'][0]['value'] = false;\r\n }\r\n\r\n showToastWithFile('update-account.success.html');\r\n }\r\n\r\n if (!newUser) {\r\n setTimeout(function () {\r\n if (parseInt(localStorage.user_id) == vm.user.id) {\r\n window.location.reload(true);\r\n }\r\n }, 2500);\r\n }\r\n vm.saveBtnShow = true;\r\n vm.isLoading.account = false;\r\n\r\n // setTimeout(function() {$state.reload();}, 2000);\r\n if (newUser) {\r\n setupNewUser();\r\n $location.path('/users/new');\r\n }\r\n }).catch(function (error) {\r\n vm.isLoading.account = false;\r\n showToastWithFile('update-account.error.html');\r\n });\r\n }\r\n }\r\n\r\n function bulkEdit() {\r\n vm.isLoading.table = true;\r\n $location.url(\"/users/bulk-edit\");\r\n }\r\n\r\n function bulkActivate() {\r\n var params = {};\r\n vm.isLoading.table = true;\r\n vm.isActionLoading.confirmDelete = true;\r\n params.user_ids = UserManagementService.getSelectedUsers().map(function (user) { return user.id; });\r\n\r\n var msg = [];\r\n if (params.user_ids.length == 1) {\r\n var users = {};\r\n users.email = UserManagementService.getSelectedUsers().map(function (user) { return user.email; });\r\n msg.push(users.email[0] + \" has been activated from the users list\");\r\n\r\n }\r\n if (UserService.canAccess(\"User.manage\")) {\r\n UserManagementService.bulkActivation(params)\r\n .then(function (res) {\r\n userSearchFilter();\r\n vm.isActionLoading.confirmDelete = false;\r\n if (!res.errors) {\r\n vm.showToastWithFile('activate-users.success.html', msg);\r\n $location.path(\"/users\");\r\n } else {\r\n vm.showToastWithFile('activate-users.error.html', ['' + res.errors]);\r\n }\r\n vm.closeModal();\r\n })\r\n .finally(function () { vm.isLoading.table = false; });\r\n }\r\n }\r\n\r\n\r\n function bulkDeleteAndResendVerificationEmail() {\r\n var params = {};\r\n vm.isLoading.table = true;\r\n vm.isActionLoading.confirmDelete = true;\r\n params.user_ids = UserManagementService.getSelectedUsers().map(function (user) { return user.id; });\r\n\r\n var msg = [];\r\n if (UserService.canAccess(\"User.manage\")) {\r\n UserManagementService.bulkDeleteAndResendVerificationEmail(params)\r\n .then(function (res) {\r\n vm.isActionLoading.confirmDelete = false;\r\n if (!res.errors) {\r\n vm.showToastWithFile('bulk-delete-resend-verification-email.success.html', msg);\r\n $location.path(\"/users\");\r\n } else {\r\n vm.showToastWithFile('bulk-delete-resend-verification-email.error.html', ['' + res.errors]);\r\n }\r\n vm.closeModal();\r\n })\r\n .finally(function () { vm.isLoading.table = false; });\r\n }\r\n }\r\n\r\n function bulkReimportUsers() {\r\n var params = {};\r\n vm.isLoading.table = true;\r\n vm.isActionLoading.confirmDelete = true;\r\n params.user_ids = UserManagementService.getSelectedUsers().map(function (user) { return user.id; });\r\n\r\n var msg = [];\r\n if (UserService.canAccess(\"User.manage\")) {\r\n UserManagementService.bulkReimportUsers(params)\r\n .then(function (res) {\r\n vm.isActionLoading.confirmDelete = false;\r\n if (!res.errors) {\r\n vm.showToastWithFile('bulk-reimport-users.success.html', msg);\r\n $location.path(\"/users\");\r\n } else {\r\n vm.showToastWithFile('bulk-reimport-users.error.html', ['' + res.errors]);\r\n }\r\n vm.closeModal();\r\n })\r\n .finally(function () { vm.isLoading.table = false; });\r\n }\r\n }\r\n\r\n function bulkResendImmediateActionEmail() {\r\n var params = {};\r\n vm.isLoading.table = true;\r\n vm.isActionLoading.confirmDelete = true;\r\n params.user_ids = UserManagementService.getSelectedUsers().map(function (user) { return user.id; });\r\n\r\n var msg = [];\r\n if (UserService.canAccess(\"User.manage\")) {\r\n UserManagementService.bulkResendImmediateActionEmail(params)\r\n .then(function (res) {\r\n vm.isActionLoading.confirmDelete = false;\r\n if (!res.errors) {\r\n vm.showToastWithFile('bulk-resend-immediate-action-email.success.html', msg);\r\n $location.path(\"/users\");\r\n } else {\r\n vm.showToastWithFile('bulk-resend-immediate-action-email.error.html', ['' + res.errors]);\r\n }\r\n vm.closeModal();\r\n })\r\n .finally(function () { vm.isLoading.table = false; });\r\n }\r\n }\r\n\r\n function bulkResendVerificationEmail() {\r\n var params = {};\r\n vm.isLoading.table = true;\r\n vm.isActionLoading.confirmDelete = true;\r\n params.user_ids = UserManagementService.getSelectedUsers().map(function (user) { return user.id; });\r\n\r\n var msg = [];\r\n if (UserService.canAccess(\"User.manage\")) {\r\n UserManagementService.bulkResendVerificationEmail(params)\r\n .then(function (res) {\r\n userSearchFilter();\r\n vm.isActionLoading.confirmDelete = false;\r\n if (!res.errors) {\r\n vm.showToastWithFile('bulk-resend-verification-email.success.html', msg);\r\n $location.path(\"/users\");\r\n } else {\r\n vm.showToastWithFile('bulk-resend-verification-email.error.html', ['' + res.errors]);\r\n }\r\n vm.closeModal();\r\n })\r\n .finally(function () { vm.isLoading.table = false; });\r\n }\r\n }\r\n\r\n function bulkResetPasswordAndSecurityQuestion() {\r\n var params = {};\r\n vm.isLoading.table = true;\r\n vm.isActionLoading.confirmDelete = true;\r\n params.user_ids = UserManagementService.getSelectedUsers().map(function (user) { return user.id; });\r\n\r\n var msg = [];\r\n if (UserService.canAccess(\"User.manage\")) {\r\n UserManagementService.bulkResetPasswordAndSecurityQuestion(params)\r\n .then(function (res) {\r\n vm.isActionLoading.confirmDelete = false;\r\n if (!res.errors) {\r\n vm.showToastWithFile('bulk-reset-password-and-security-question-email.success.html', msg);\r\n $location.path(\"/users\");\r\n } else {\r\n vm.showToastWithFile('bulk-reset-password-and-security-question-email.error.html', ['' + res.errors]);\r\n }\r\n vm.closeModal();\r\n })\r\n .finally(function () { vm.isLoading.table = false; });\r\n }\r\n\r\n }\r\n\r\n function array_unique(arr) {\r\n var result = [];\r\n for (var i = 0; i < arr.length; i++) {\r\n if (result.indexOf(arr[i]) == -1) {\r\n result.push(arr[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function bulkDeactivate() {\r\n var params = {};\r\n vm.isActionLoading.confirmDelete = true;\r\n params.user_ids = UserManagementService.getSelectedUsers().map(function (user) { return user.id; });\r\n params.ad_user_ids = UserManagementService.getSelectedUsers().map(function (user) { return user.ad_user; });\r\n var ad_user_ids = UserManagementService.getSelectedUsers().map(function (user) { if (user.ad_user == true) { return user.id } });\r\n var addata = ad_user_ids.filter(function (element) {\r\n return element !== undefined;\r\n });\r\n\r\n var inactive_user_ids = UserManagementService.getSelectedUsers().map(function (user) { if (user.user_status == 'inactive' || user.user_status == 'bad state' || user.user_status == 'issue(ad)') { return user.id } });\r\n var inactivedata = inactive_user_ids.filter(function (element) {\r\n return element !== undefined;\r\n });\r\n\r\n var array3 = array_unique(addata.concat(inactivedata));\r\n\r\n if (array3.length > 0) {\r\n for (var i = params.user_ids.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < array3.length; j++) {\r\n if (params.user_ids[i] == array3[j]) {\r\n params.user_ids.splice(i, 1);\r\n }\r\n }\r\n }\r\n }\r\n\r\n // for( var i=params.ad_user_ids.length - 1; i>=0; i--){\r\n // for( var j=0; j<params.user_ids.length; j++){\r\n // if(params.ad_user_ids[i] == true){\r\n // params.user_ids.splice(i, 1);\r\n // }\r\n // }\r\n // }\r\n\r\n var msg = [];\r\n if (params.user_ids.length == 1) {\r\n var users = {};\r\n users.email = UserManagementService.getSelectedUsers().map(function (user) { return user.email; });\r\n msg.push(users.email[0] + \" has been deactivated from the users list\");\r\n\r\n }\r\n\r\n\r\n if (UserService.canAccess(\"User.manage\")) {\r\n UserManagementService.bulkDeactivation(params).then(function (res) {\r\n //res added by Abheesh\r\n userSearchFilter();\r\n vm.isActionLoading.confirmDelete = false;\r\n if (!res.errors) {\r\n vm.closeModal();\r\n vm.showToastWithFile('deactivate-users.success.html', msg);\r\n $location.path(\"/users\");\r\n } else {\r\n vm.closeModal();\r\n vm.showToastWithFile('deactivate-users.error.html', ['' + res.errors]);\r\n setTimeout(function () {\r\n $state.reload();\r\n }, 2500);\r\n }\r\n });\r\n }\r\n }\r\n\r\n function bulkDelete() {\r\n\r\n var params = {};\r\n vm.isActionLoading.confirmDelete = true;\r\n //params.user_ids = UserManagementService.getSelectedUsers().map(function(user){return user.id;});\r\n params.ad_user_ids = UserManagementService.getSelectedUsers().map(function (user) { return user.ad_user; });\r\n params.user_ids = UserManagementService.getSelectedUsers().map(function (user) {\r\n if (user.user_status == 'inactive' || user.user_status == 'bad state'\r\n || (user.user_status == 'issue(non-ad)' && user.is_active == false)) return user.id;\r\n }).filter(Boolean);\r\n\r\n var ad_user_ids = UserManagementService.getSelectedUsers().map(function (user) { if (user.ad_user == true) { return user.id } });\r\n var addata = ad_user_ids.filter(function (element) {\r\n return element !== undefined;\r\n });\r\n\r\n if (addata.length > 0) {\r\n for (var i = params.user_ids.length - 1; i >= 0; i--) {\r\n for (var j = 0; j < addata.length; j++) {\r\n if (params.user_ids[i] == addata[j]) {\r\n params.user_ids.splice(i, 1);\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n // for( var i=params.ad_user_ids.length - 1; i>=0; i--){\r\n // for( var j=0; j<params.user_ids.length; j++){\r\n // if(params.ad_user_ids[i] == true){\r\n // params.user_ids.splice(i, 1);\r\n // }\r\n // }\r\n // }\r\n\r\n if (UserService.canAccess(\"User.manage\")) {\r\n UserManagementService.bulkDelete(params).then(function (res) {\r\n vm.isActionLoading.confirmDelete = false;\r\n var ad_user_length = res.filter(function (user) {\r\n return user.ad_user;\r\n }).length;\r\n var nonad_user_length = res.filter(function (user) {\r\n return !user.ad_user;\r\n }).length;\r\n var total_users_length = res.length;\r\n $rootScope.allUsers = total_users_length;\r\n $rootScope.allAdUsers = ad_user_length;\r\n $rootScope.allNonadUsers = nonad_user_length;\r\n if (!res.errors) {\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-users.success.html', name);\r\n window.location = window.location.href.split(\"?\")[0];\r\n } else {\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-users.error.html', ['' + res.errors]);\r\n }\r\n });\r\n }\r\n }\r\n\r\n function downloadXLSXTemplate() {\r\n var createXLSLFormatObj = [];\r\n var filename = 'Form_C-View_NewExternalUser.xlsx', headerIndex = 1, instructionIndex = 0, ws_name = \"Sheet1\", ws2_name = \"Instructions\";\r\n\r\n var headers = [['Instructions: Start entering the new C-View user account info in row 4. Use the info in row 3 as an example (and then delete row 3). Go to the Instructions tab for detailed instructions.']\r\n , [\"FirstName*\", \"LastName*\", \"Email*\", \"Company*\", \"CustomerTypes*\", \"Roles*\", \"PathwayRole\", \"PartyIdOverrides\", \"BccsOverrides\", \"PrimaryContactOverrides\"]\r\n , [\"John\", \"Smith\", \"john.smith@gmail.com\", \"Test Company\", \"CWW\", \"Customer - Standard\", \"Customer - Pathway Customer\", \"\", \"\", \"\"]\r\n ];\r\n\r\n var ws2_headers = [\r\n ['These are the detailed instructions to complete the Form_C-View_NewExternalUser.xlsx.'],\r\n ['Columns A, B, C, D, E and F are required.'],\r\n [],\r\n ['(column A) First Name : first name of the user being added'],\r\n ['(column B) Last Name : last name of the user being added'],\r\n ['(column C) Email : email address of the user being added'],\r\n ['(column D) Company : enter the C-View company name with the shipments that need to be accessed (not the company where the user works).'],\r\n ['(column F) Roles – Select from below. The default is \"Customer – Standard\".'],\r\n ['', '\"Customer – Standard\" : displays details of the shipments, Financial data, and the Track and Trace Export feature (shipment list to an Excel file). This is the default.'],\r\n ['', '\"Customer - No T&T Export\" : displays details of the shipments, and Financial data, but not the Track and Trace Export feature. This is typically for monitoring the shipments without the full spectrum of the supply chain)'],\r\n ['', '\"Customer - No Financial\" : displays details of the shipments, and the Track and Trace Export feature, but no Financial data. This is typically for users that only need the location of their shipments.'],\r\n ['(column G) Pathway Role – If the company has the link to Pathway enabled, this will allow the user account to access that link to Pathway. The default it \"Customer - Pathway Customer\".'],\r\n [],\r\n [],\r\n [],\r\n ['Use a new row for each new C-View user account.'],\r\n ['If you are not sure what goes in a column/field, leave it blank.'],\r\n ['There is no place for additional notes in this form. Please add additional notes in the Description field in the ticket.'],\r\n\r\n ];\r\n\r\n var wb = new Workbook(), ws = sheet_from_array_of_arrays(headers, headerIndex, instructionIndex);\r\n //Added Sheet 2\r\n var ws2 = sheet_from_array_of_arrays(ws2_headers, headerIndex, instructionIndex);\r\n\r\n /* add worksheet to workbook */\r\n wb.SheetNames.push(ws_name);\r\n wb.SheetNames.push(ws2_name); //Added Sheet 2 to workbook\r\n wb.Sheets[ws_name] = ws;\r\n wb.Sheets[ws2_name] = ws2; //Added Sheet 2 to workbook\r\n var wbout = XLSX.write(wb, { bookType: 'xlsx', bookSST: true, type: 'binary' });\r\n saveAs(new Blob([s2ab(wbout)], { type: \"application/octet-stream\" }), filename);\r\n }\r\n\r\n function isSafari() {\r\n function present(browser) {\r\n return navigator.userAgent.toLowerCase().indexOf(browser) > -1\r\n }\r\n return present(\"safari/\") && !present(\"chrome/\");\r\n }\r\n\r\n function activateUser() {\r\n //vm.user.is_active = true;\r\n vm.isActionLoading.confirmDelete = true;\r\n var name = vm.getName();\r\n UserManagementService.oktaActivateUser(vm.user.id).then(\r\n function (res) {\r\n vm.user.user_status = res.data.user_status;\r\n vm.user.is_active = res.data.is_active;\r\n vm.isActionLoading.confirmDelete = false;\r\n vm.status.cssClass = \"md-primary\";\r\n vm.closeModal();\r\n vm.showToastWithFile('activate-user.success.html', [name]);\r\n }, function (error) {\r\n vm.isActionLoading.confirmDelete = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('deactivate-user.error.html', ['' + error.data.message]);\r\n });\r\n }\r\n\r\n // function activateUser(){\r\n // var name = vm.getName();\r\n // UserManagementService.oktaActivateUser(vm.user.id).then(\r\n // function(res){\r\n // vm.status.cssClass=\"md-primary\";\r\n // vm.closeModal();\r\n // vm.showToastWithFile('activate-user.success.html', [name]);\r\n // }, function(error){\r\n // vm.closeModal();\r\n // vm.showToastWithFile('activate-user.error.html', [''+error.status+': '+error.data.errors]);\r\n // });\r\n // }\r\n\r\n\r\n function updateAdUserData() {\r\n var user_id = $stateParams.id;\r\n UserManagementService.updateAdUserData(user_id).then(\r\n function (res) {\r\n vm.user.first_name = res.data.first_name;\r\n vm.user.last_name = res.data.last_name;\r\n vm.user.email = res.data.email;\r\n vm.user.phone = res.data.phone;\r\n vm.user.synced_with_ad = res.data.synced_with_ad;\r\n vm.closeModal();\r\n vm.showToastWithFile('aduser.success.html');\r\n }, function (error) {\r\n vm.closeModal();\r\n vm.showToastWithFile('aduser.error.html');\r\n });\r\n }\r\n\r\n function confirmUser() {\r\n vm.user.force_verify = true;\r\n var name = vm.getName();\r\n UserManagementService.updateUser(vm.user.id).then(\r\n function (res) {\r\n vm.closeModal();\r\n vm.showToastWithFile('update-account.success.html', [name]);\r\n }, function (error) {\r\n vm.closeModal();\r\n vm.showToastWithFile('update-account.error.html', ['' + error.status + ': ' + error.statusText]);\r\n });\r\n }\r\n\r\n function resendConfirmation() {\r\n vm.isActionLoading.resendConfirmation = true;\r\n var name = vm.getName();\r\n UserManagementService.resendConfirmation(vm.user.id).then(\r\n function (res) {\r\n vm.user.user_status = res.data.user_status;\r\n vm.isActionLoading.resendConfirmation = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('resend-confirmation.success.html', [name]);\r\n }, function (error) {\r\n\r\n vm.isActionLoading.resendConfirmation = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('resend-confirmation.error.html', ['' + error.status + ': ' + error.data.errors]);\r\n });\r\n }\r\n\r\n // function deactivateUser(){\r\n // var name = vm.getName();\r\n // UserManagementService.oktaDeactivateUser(vm.user.id).then(\r\n // function(res){\r\n // vm.status.cssClass=\"md-danger\";\r\n // vm.closeModal();\r\n // vm.showToastWithFile('deactivate-user.success.html', [name]);\r\n // }, function(error){\r\n // vm.closeModal();\r\n // vm.showToastWithFile('deactivate-user.error.html', [''+error.status+': '+error.data.errors]);\r\n // });\r\n // }\r\n\r\n function reimportUser() {\r\n vm.isActionLoading.resendConfirmation = true;\r\n var name = vm.getName();\r\n UserManagementService.reimportUser(vm.user.id).then(\r\n function (res) {\r\n vm.user.user_status = res.data.user_status;\r\n vm.isActionLoading.resendConfirmation = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('reimport-user.success.html', [name]);\r\n $state.reload();\r\n }, function (error) {\r\n vm.isActionLoading.resendConfirmation = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('reimport-user.error.html', ['' + error.data.message]);\r\n });\r\n }\r\n\r\n function deleteAndResend() {\r\n vm.isActionLoading.resendConfirmation = true;\r\n var name = vm.getName();\r\n UserManagementService.deleteAndResend(vm.user.id).then(\r\n function (res) {\r\n vm.user.user_status = res.data.user_status;\r\n vm.isActionLoading.resendConfirmation = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-resend.success.html', [name]);\r\n }, function (error) {\r\n vm.isActionLoading.resendConfirmation = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-resend.error.html', ['' + error.data.message]);\r\n });\r\n }\r\n\r\n function immediateActionEmail() {\r\n vm.isActionLoading.resendConfirmation = true;\r\n var name = vm.getName();\r\n UserManagementService.immediateActionEmail(vm.user.id).then(\r\n function (res) {\r\n vm.user.user_status = res.data.user_status;\r\n vm.isActionLoading.resendConfirmation = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('immediate-actionmail.success.html', [name]);\r\n }, function (error) {\r\n vm.isActionLoading.resendConfirmation = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('immediate-actionmail.error.html', ['' + error.data.message]);\r\n });\r\n }\r\n\r\n function deactivateUser() {\r\n //vm.user.is_active = false;\r\n vm.isActionLoading.confirmDelete = true;\r\n var name = vm.getName();\r\n UserManagementService.oktaDeactivateUser(vm.user.id).then(\r\n function (res) {\r\n vm.user.user_status = res.data.user_status;\r\n vm.isActionLoading.confirmDelete = false;\r\n vm.user.is_active = res.data.is_active;\r\n vm.status.cssClass = \"md-danger\";\r\n vm.closeModal();\r\n vm.showToastWithFile('deactivate-user.success.html', [name]);\r\n }, function (error) {\r\n vm.isActionLoading.confirmDelete = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('deactivate-user.error.html', ['' + error.data.message]);\r\n });\r\n }\r\n\r\n function deleteUser() {\r\n var name = vm.getName();\r\n UserManagementService.deleteUser(vm.user.id).then(\r\n function (res) {\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-user.success.html', name);\r\n $location.path(\"/users\");\r\n }, function errorCallback(error) {\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-user.error.html', ['' + error.status + ': ' + error.statusText]);\r\n });\r\n }\r\n\r\n function importUsers() {\r\n $location.path(\"/users/import-users\");\r\n }\r\n\r\n function showModal(ev, modal) {\r\n /* Show the modal */\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/users/modals/' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showLensView(ev, modal) {\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/users/modals/lensview.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showApiError(messages) {\r\n $scope.apiErrorMessages = [];\r\n if (Array.isArray(messages) == false) {\r\n $scope.apiErrorMessages.push(messages);\r\n }\r\n else {\r\n angular.forEach(messages, function (m) {\r\n // filter out some of the meaningless messages\r\n if (m.toLowerCase().indexOf('user contact') === 0) return;\r\n $scope.apiErrorMessages.push(m);\r\n });\r\n }\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/users/modals/api-error.modal.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showUserNotFoundError(messages) {\r\n $scope.apiErrorMessages = [];\r\n if (Array.isArray(messages) == false) {\r\n $scope.apiErrorMessages.push(messages);\r\n }\r\n else {\r\n angular.forEach(messages, function (m) {\r\n // filter out some of the meaningless messages\r\n if (m.toLowerCase().indexOf('user contact') === 0) return;\r\n $scope.apiErrorMessages.push(m);\r\n });\r\n }\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n var errorMessagesArray = $scope.apiErrorMessages;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/users/modals/user-not-found.modal.html',\r\n parent: angular.element(document.body),\r\n controller: UserController,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n locals: { errorMessages: errorMessagesArray }\r\n });\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.hide();\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, messages, delay) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: delay ? delay : 3000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/users/toast/' + file,\r\n locals: { messages: messages },\r\n controller: function ($scope, messages) {\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n function changePermissions(permission) {\r\n // if(vm.permissions['LensGroup'].options[0].value == true){\r\n // vm.permissions['User'].options[1].value = true;\r\n // vm.permissions['Company'].options[1].value = true;\r\n // }\r\n if (vm.permissions['Company'].options[1].value == true) {\r\n vm.permissions['User'].options[1].value = true;\r\n }\r\n }\r\n }\r\n\r\n function UserController($scope, $mdDialog, errorMessages) {\r\n $scope.templateMessages = errorMessages;\r\n\r\n $scope.close = function () {\r\n $mdDialog.hide();\r\n };\r\n }\r\n\r\n}\r\n)();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .component('logUserRecord', {\r\n templateUrl: \"/app/admin/users/log.html\",\r\n controller: UserLogDetailController,\r\n bindings: {\r\n data: '<'\r\n }\r\n });\r\n\r\n UserLogDetailController.inject = [\"$scope\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', 'UserManagementService', 'mdSelectHelper', '$mdMedia', '$mdDialog', 'UserService']\r\n \r\n function UserLogDetailController($scope, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, UserManagementService, mdSelectHelper, $mdMedia, $mdDialog, UserService){\r\n var ctrl = this;\r\n\r\n ctrl.processActions = function(actions){\r\n return Object.keys(actions).map(function(key){\r\n var action = actions[key] === Object(actions[key]) ? JSON.stringify(actions[key]) : actions[key];\r\n return \"<strong>\" + key + \"</strong>\" + \": \" + action +\"\\n\";\r\n }).join(', ');\r\n }\r\n\r\n\r\n\r\n ctrl.logExportShowCSV = function(){\r\n\r\n \r\n $scope.exportCsvLoaded = false;\r\n UserManagementService.exportUserLogs(ctrl.data).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function(e) {\r\n \r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant(e.data.errors))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n }\r\n \r\n\r\n}) ();\n // example = {\r\n // contact_id: x,\r\n // company_id: y,\r\n // is_active: bool,\r\n // group_ids: [],\r\n // party_id_names: [],\r\n // related_party_id_names: [],\r\n // user_ids: [],\r\n // permissions: []\r\n // }\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('BulkEditController', BulkEditController);\r\n\r\n BulkEditController.$inject = [\"$scope\", \"UserManagementService\", 'UserService', \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', '$mdMedia', '$mdDialog', '$http', 'mdSelectHelper', 'CompanyManagementService'];\r\n function BulkEditController($scope, UserManagementService, UserService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, $mdMedia, $mdDialog, $http, mdSelectHelper,CompanyManagementService) {\r\n\r\n // =================================\r\n // Setup variables\r\n // =================================\r\n var vm = this;\r\n vm.users = [];\r\n vm.currentUser = UserService.getUserData();\r\n vm.permissions = UserManagementService.getPermissions();\r\n\r\n vm.permissions.Admin.options[0].value = false;\r\n vm.permissions.Company.options[0].value = false;\r\n vm.permissions.Company.options[1].value = false;\r\n vm.permissions.Company.options[2].value = false;\r\n vm.permissions.Group.options[0].value = false;\r\n vm.permissions.Shipment.options[0].value = false;\r\n vm.permissions.Shipment.options[1].value = false;\r\n vm.permissions.Shipment.options[2].value = false;\r\n vm.permissions.PotentialException.options[0].value = false;\r\n vm.permissions.PotentialException.options[1].value = false;\r\n vm.permissions.LensGroup.options[0].value = false;\r\n vm.permissions.User.options[0].value = false;\r\n vm.permissions.User.options[1].value = false;\r\n vm.permissions.User.options[2].value = false;\r\n vm.permissions.User.options_classic[0].value = false;\r\n vm.permissions.User.options_classic[1].value = false;\r\n vm.permissions.User.options_classic[2].value = false;\r\n vm.permissions.User.options_classic[3].value = false;\r\n vm.permissions.User.options_classic[4].value = false;\r\n vm.permissions.User.options_classic[5].value = false;\r\n vm.permissions.User.options_classic[6].value = false;\r\n vm.permissions.User.options_classic[7].value = false;\r\n vm.permissions.Spotlight.options[0].value = false;\r\n vm.permissions.SupportRequestUser.options[0].value = false;\r\n vm.permissions.SupportRequestAdmin.options[0].value = false;\r\n vm.permissions.SupportRequestValidator.options[0].value = false;\r\n vm.permissions.CviewClassicAdmin.options[0].value = false;\r\n\r\n\r\n vm.permissions.Admin.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[1].value = false;\r\n vm.permissions.Group.options_csl[0].value = false;\r\n vm.permissions.Load.options_csl[0].value = false;\r\n vm.permissions.LensGroup.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[1].value = false;\r\n vm.permissions.User.options_csl[2].value = false;\r\n vm.permissions.Shipment.options_csl[1].value = false;\r\n vm.permissions.Shipment.options_csl[2].value = false;\r\n vm.permissions.Spotlight.options_csl[0].value = false;\r\n vm.permissions.CslException.options_csl[0].value = false;\r\n vm.permissions.CslException.options_csl[1].value = false;\r\n vm.permissions.CslException.options_csl[2].value = false;\r\n vm.permissions.CslException.options_csl[3].value = false;\r\n\r\n vm.permissions.Admin.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[1].value = false;\r\n vm.permissions.Group.options_cfs[0].value = false;\r\n vm.permissions.Load.options_cfs[0].value = false;\r\n vm.permissions.LensGroup.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[1].value = false;\r\n vm.permissions.User.options_cfs[2].value = false;\r\n vm.permissions.Shipment.options_cfs[1].value = false;\r\n vm.permissions.Shipment.options_cfs[2].value = false;\r\n vm.permissions.Spotlight.options_cfs[0].value = false;\r\n\r\n vm.permissions.Admin.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[1].value = false;\r\n vm.permissions.Group.options_cmts[0].value = false;\r\n vm.permissions.Load.options_cmts[0].value = false;\r\n vm.permissions.LensGroup.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[1].value = false;\r\n vm.permissions.User.options_cmts[2].value = false;\r\n vm.permissions.Shipment.options_cmts[1].value = false;\r\n vm.permissions.Shipment.options_cmts[2].value = false;\r\n vm.permissions.Spotlight.options_cmts[0].value = false;\r\n\r\n vm.permissions_display = ['PotentialException', 'Shipment', 'Company', 'User', 'BookShipment', 'Group'].filter(function(g) {\r\n return isPermissionsIn(g)\r\n });\r\n vm.permissions_enable = {};\r\n vm.permissions_display.map(function(p){vm.permissions_enable[p] = false;});\r\n vm.clean_permissions = angular.copy(vm.permissions);\r\n\r\n vm.roles = UserManagementService.getRoles();\r\n vm.roles_csl = UserManagementService.getRolesCsl();\r\n vm.roles_cfs = UserManagementService.getRolesCfs();\r\n vm.roles_cmts = UserManagementService.getRolesCmts();\r\n vm.roles_classic = UserManagementService.getRolesClassic();\r\n vm.isCompanySelected = isCompanySelected;\r\n vm.contact = {}\r\n vm.isLoading = true;\r\n vm.role = \"\";\r\n vm.selected_company_id = \"\";\r\n vm.isSelected = false;\r\n // Include tracks whether the user opts to include the parameters or not\r\n vm.include = {\r\n user_ids: true,\r\n roles: true,\r\n company: false,\r\n group: false,/*Added by Abheesh*/\r\n contact_id: false,\r\n bccs: false,\r\n party_id_names: false,\r\n related_party_id_names: false,\r\n crane_contact: false,\r\n department: false\r\n\r\n }\r\n\r\n // params stores the parameters that the user modifies\r\n vm.params = {\r\n user_ids: [],\r\n roles: [],\r\n bccs: [],\r\n permissions: vm.permissions,\r\n department_ids: [],\r\n department_ids_cww: [],\r\n department_ids_csl: [],\r\n department_ids_cfs: [],\r\n department_ids_cmts: [],\r\n party_id_names: [],\r\n party_id_names_cww: [],\r\n party_id_names_csl: [],\r\n party_id_names_cfs: [],\r\n party_id_names_cmts: [],\r\n default_bccs_cfs: [],\r\n default_bccs_cmts: [],\r\n default_bccs_csl: [],\r\n default_bccs_cww: [],\r\n related_party_id_names: [],\r\n notification_settings: {\r\n potential_exceptions: true,\r\n exceptions: true,\r\n milestone_delivered: true\r\n },\r\n is_crane_contact: false,\r\n is_ad_user: false,\r\n is_cww:false,\r\n is_csl:false,\r\n is_cfs:false,\r\n is_cmts:false,\r\n is_reskin: false,\r\n crane_contact: false\r\n }\r\n // Server data storage\r\n vm.companies = [];\r\n vm.departments = [];\r\n vm.contactPhotos = [];\r\n vm.groups = [];\r\n vm.possibleContacts = [];\r\n vm.getMatchForDepartment = getMatchForDepartment;\r\n\r\n // =================================\r\n // Define functions\r\n // =================================\r\n vm.cancel = cancel;\r\n vm.save = save;\r\n vm.getMatch = getMatch;\r\n vm.getMatchs = getMatchs;\r\n vm.onPermissionsChange = onPermissionsChange;\r\n vm.onPermissionsChangeCSL = onPermissionsChangeCSL;\r\n vm.onPermissionsChangeCFS = onPermissionsChangeCFS;\r\n vm.onPermissionsChangeCMTS = onPermissionsChangeCMTS;\r\n vm.onPermissionsChangeClassic = onPermissionsChangeClassic;\r\n vm.isCrane = isCrane;\r\n vm.isPermissionsIn = isPermissionsIn;\r\n vm.onRoleChange = onRoleChange;\r\n vm.onRoleChangeCSL = onRoleChangeCSL;\r\n vm.onRoleChangeCFS = onRoleChangeCFS;\r\n vm.onRoleChangeCMTS = onRoleChangeCMTS;\r\n vm.onRoleChangeClassic = onRoleChangeClassic;\r\n vm.chipRemoved = chipRemoved;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.resetRolesPermissions = resetRolesPermissions;\r\n vm.customerCheck = false;\r\n vm.cww_check = true;\r\n vm.csl_check = true;\r\n vm.cfs_check = true;\r\n vm.cmts_check = true;\r\n vm.cww_visibility = true;\r\n vm.csl_visibility = true;\r\n vm.cfs_visibility = true;\r\n vm.cmts_visibility = true;\r\n vm.onCompanyChange = onCompanyChange;\r\n vm.removeDuplicates = removeDuplicates;\r\n vm.canSetPermissions = canSetPermissions;\r\n vm.cww_setup = cww_setup;\r\n vm.csl_setup = csl_setup;\r\n vm.cfs_setup = cfs_setup;\r\n vm.cmts_setup = cmts_setup;\r\n vm.addDepartments = addDepartments;\r\n vm.removeDepartments = removeDepartments;\r\n vm.getMatchCww = getMatchCww;\r\n vm.getMatchCsl = getMatchCsl;\r\n vm.getMatchCfs = getMatchCfs;\r\n vm.getMatchCmts = getMatchCmts;\r\n vm.isCreate = false;\r\n vm.classicDivCheck = true;\r\n vm.changeCslAllClients = changeCslAllClients;\r\n vm.closeModal = closeModal;\r\n vm.onCslToggle = onCslToggle;\r\n vm.onCfsToggle = onCfsToggle; \r\n vm.onCmtsToggle = onCmtsToggle;\r\n\r\n\r\n // ==============================================================\r\n // Setup the controller and service\r\n // --------------------------------\r\n // If there are user_ids in the search then we directly navigated\r\n // here and need to load them. Otherwise we assume we\r\n // normally transitioned here.\r\n // ==============================================================\r\n if ($location.search().user_ids){\r\n var ids = $location.search().user_ids;\r\n UserManagementService.getUsers();\r\n vm.userTable = UserManagementService.getUserTable();\r\n $scope.$watch('vm.userTable.data', function(){\r\n if (vm.userTable.settings().data){\r\n vm.userTable.settings().data.map(function(user){\r\n if (typeof ids === \"object\" && ids.includes(\"\"+user.id)){\r\n user.selected = true;\r\n } else if (typeof ids === \"string\" && ids == user.id){\r\n user.selected = true;\r\n }\r\n });\r\n vm.users = UserManagementService.getSelectedUsers();\r\n vm.isLoading = false;\r\n }\r\n });\r\n } else {\r\n vm.users = UserManagementService.getSelectedUsers();\r\n $location.search('user_ids', vm.users.map(function(u){return u.id;}) );\r\n vm.isLoading = false;\r\n }\r\n\r\n // added by sangeeta\r\n\r\n function isCompanySelected(company_id){\r\n if(company_id){\r\n vm.isSelected = true;\r\n vm.selected_company_id = company_id;\r\n }\r\n }\r\n\r\n // Get data from the service\r\n UserManagementService.getContacts().then(function(data){\r\n vm.possibleContacts = data;\r\n });\r\n UserManagementService.getCompanies().then(function(data){\r\n vm.companies = data;\r\n });\r\n UserManagementService.getContactPhotos().then(function(data){\r\n vm.contactPhotos = data;\r\n });\r\n // UserManagementService.getGroups().then(function(data){\r\n // vm.groups = data;\r\n // });\r\n\r\n\r\n // Removes a piece of styling from Md-chips that is automatically generated\r\n angular.element(document).ready(function(){\r\n angular.element(document).find(\"md-chips-wrap\").addClass(\"no-border\");\r\n });\r\n\r\n // =================================\r\n // Function Definitions\r\n // =================================\r\n\r\n //added by chaitanya\r\n\r\n // for bulk edit\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n\r\n function changeCslAllClients(ev,val,selectedAllCleintRole){\r\n vm.selectAllClientRole=selectedAllCleintRole;\r\n if(val == false){\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/users/modals/csl-all-clients.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n }\r\n\r\n function canSetPermissions() {\r\n var meUser = UserService.getUserData();\r\n var superadminCheck;\r\n if (vm.user){\r\n\r\n if((meUser.roles.cww ? (meUser.roles.cww.includes('super_admin')) : false) ||\r\n (meUser.roles.csl ? (meUser.roles.csl.includes('super_admin')) : false) ||\r\n (meUser.roles.cfs ? (meUser.roles.cfs.includes('super_admin')) : false) ||\r\n (meUser.roles.cmts ? (meUser.roles.cmts.includes('super_admin')) : false)){\r\n var superadminCheck = true;\r\n }else{\r\n var superadminCheck = false;\r\n }\r\n\r\n return meUser.id != vm.user.id || superadminCheck;\r\n } else {\r\n //meUser.super_admin;\r\n\r\n if((meUser.roles.cww ? (meUser.roles.cww.includes('super_admin')) : false) ||\r\n (meUser.roles.csl ? (meUser.roles.csl.includes('super_admin')) : false) ||\r\n (meUser.roles.cfs ? (meUser.roles.cfs.includes('super_admin')) : false) ||\r\n (meUser.roles.cmts ? (meUser.roles.cmts.includes('super_admin')) : false)){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n\r\n }\r\n }\r\n\r\n function getMatchCww(key, query){\r\n return UserManagementService.autocompleteCww({field: key, customer_type: 'cww', value: query});\r\n }\r\n\r\n function getMatchCsl(key, query){\r\n return UserManagementService.autocompleteCww({field: key, customer_type: 'csl', value: query});\r\n }\r\n\r\n function getMatchCfs(key, query){\r\n return UserManagementService.autocompleteCww({field: key, customer_type: 'cfs', value: query});\r\n }\r\n\r\n function getMatchCmts(key, query){\r\n return UserManagementService.autocompleteCww({field: key, customer_type: 'cmts', value: query});\r\n }\r\n\r\n function getMatchs(key, query, cid, type){\r\n // console.log(cid);\r\n // console.log(vm.company);\r\n return UserManagementService.autoCompletes({field: key, value: query},vm.company.departments,type);\r\n }\r\n\r\n function addDepartments(ids,type){\r\n var partids = [];\r\n\r\n if(type == 'CWW'){\r\n $scope.related_party_id_names_exist_cww = [];\r\n if(ids.length >0){\r\n for( var i=vm.company.departments.length - 1; i>=0; i--){\r\n for( var j=0; j<ids.length; j++){\r\n if(vm.company.departments[i]['name'] == ids[j]){\r\n if(vm.company.departments[i]['party_id_names'] == null){\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n if(vm.company.departments[i]['related_party_id_names'] == null){\r\n vm.company.departments[i]['related_party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names'].concat(vm.company.departments[i]['related_party_id_names']));\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cww = removeDuplicates(mergedids);\r\n }\r\n\r\n if(type == 'CSL'){\r\n $scope.related_party_id_names_exist_csl = [];\r\n if(ids.length >0){\r\n for( var i=vm.company.departments.length - 1; i>=0; i--){\r\n for( var j=0; j<ids.length; j++){\r\n if(vm.company.departments[i]['name'] == ids[j]){\r\n if(vm.company.departments[i]['party_id_names'] == null){\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_csl = removeDuplicates(mergedids);\r\n }\r\n\r\n if(type == 'CFS'){\r\n $scope.related_party_id_names_exist_cfs = [];\r\n if(ids.length >0){\r\n for( var i=vm.company.departments.length - 1; i>=0; i--){\r\n for( var j=0; j<ids.length; j++){\r\n if(vm.company.departments[i]['name'] == ids[j]){\r\n if(vm.company.departments[i]['party_id_names'] == null){\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cfs = removeDuplicates(mergedids);\r\n }\r\n\r\n if(type == 'CMTS'){\r\n $scope.related_party_id_names_exist_cmts = [];\r\n if(ids.length >0){\r\n for( var i=vm.company.departments.length - 1; i>=0; i--){\r\n for( var j=0; j<ids.length; j++){\r\n if(vm.company.departments[i]['name'] == ids[j]){\r\n if(vm.company.departments[i]['party_id_names'] == null){\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cmts = removeDuplicates(mergedids);\r\n }\r\n }\r\n\r\n function removeDepartments(ids,type){\r\n var partids = [];\r\n // $scope.related_party_id_names_exist = [];\r\n // $scope.related_party_id_names_exist_cww = [];\r\n // $scope.related_party_id_names_exist_csl = [];\r\n // $scope.related_party_id_names_exist_cfs = [];\r\n\r\n if(type == 'CWW'){\r\n $scope.related_party_id_names_exist_cww = [];\r\n if(ids.length >0){\r\n for( var i=vm.company.departments.length - 1; i>=0; i--){\r\n for( var j=0; j<ids.length; j++){\r\n if(vm.company.departments[i]['name'] == ids[j]){\r\n if(vm.company.departments[i]['party_id_names'] == null){\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n if(vm.company.departments[i]['related_party_id_names'] == null){\r\n vm.company.departments[i]['related_party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names'].concat(vm.company.departments[i]['related_party_id_names']));\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cww = removeDuplicates(mergedids);\r\n }\r\n\r\n if(type == 'CSL'){\r\n $scope.related_party_id_names_exist_csl = [];\r\n if(ids.length >0){\r\n for( var i=vm.company.departments.length - 1; i>=0; i--){\r\n for( var j=0; j<ids.length; j++){\r\n if(vm.company.departments[i]['name'] == ids[j]){\r\n if(vm.company.departments[i]['party_id_names'] == null){\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_csl = removeDuplicates(mergedids);\r\n }\r\n\r\n if(type == 'CFS'){\r\n $scope.related_party_id_names_exist_cfs = [];\r\n if(ids.length >0){\r\n for( var i=vm.company.departments.length - 1; i>=0; i--){\r\n for( var j=0; j<ids.length; j++){\r\n if(vm.company.departments[i]['name'] == ids[j]){\r\n if(vm.company.departments[i]['party_id_names'] == null){\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cfs = removeDuplicates(mergedids);\r\n }\r\n\r\n if(type == 'CMTS'){\r\n $scope.related_party_id_names_exist_cmts = [];\r\n if(ids.length >0){\r\n for( var i=vm.company.departments.length - 1; i>=0; i--){\r\n for( var j=0; j<ids.length; j++){\r\n if(vm.company.departments[i]['name'] == ids[j]){\r\n if(vm.company.departments[i]['party_id_names'] == null){\r\n vm.company.departments[i]['party_id_names'] = [];\r\n }\r\n partids.push(vm.company.departments[i]['party_id_names']);\r\n var mergedids = [].concat.apply([], partids);\r\n }\r\n }\r\n }\r\n }\r\n $scope.related_party_id_names_exist_cmts = removeDuplicates(mergedids);\r\n }\r\n\r\n }\r\n\r\n\r\n function onCompanyChange(id){\r\n CompanyManagementService.getCompany(id).then(function(res){\r\n vm.company = CompanyManagementService.getCompanyDetails();\r\n vm.customerCheck = true;\r\n vm.params.is_cww = false;\r\n vm.params.is_csl = false;\r\n vm.params.is_cfs = false;\r\n vm.params.is_cmts = false;\r\n vm.cww_check = true;\r\n vm.csl_check = true;\r\n vm.cfs_check = true;\r\n vm.cmts_check = true;\r\n vm.params.role = \"\";\r\n vm.params.role_csl = \"\";\r\n vm.params.role_cfs = \"\";\r\n vm.params.role_cmts = \"\";\r\n\r\n if(vm.company.access_type.includes('classic') && vm.company.access_type.includes('portal')){\r\n vm.cwwUserCheck = false;\r\n }else if(vm.company.access_type.includes('classic') && !vm.company.access_type.includes('portal')){\r\n vm.cwwUserCheck = true;\r\n }else if(!vm.company.access_type.includes('classic') && vm.company.access_type.includes('portal')){\r\n vm.cwwUserCheck = false;\r\n }\r\n\r\n if(vm.company.portal_type == 'customer'){\r\n vm.roles = UserManagementService.getRoles(); \r\n vm.roles_classic = UserManagementService.getRolesClassic();\r\n }\r\n else if(vm.company.portal_type == 'shipper'){\r\n vm.roles = UserManagementService.getRolesShipper(); \r\n vm.roles_classic = UserManagementService.getRolesClassicShipper();\r\n }\r\n else if(vm.company.portal_type == 'consignee'){\r\n vm.roles = UserManagementService.getRolesConsignee(); \r\n vm.roles_classic = UserManagementService.getRolesClassicConsignee();\r\n }\r\n\r\n if(vm.company.access_type.includes('portal') && vm.company.access_type.includes('classic')){\r\n vm.classicDivCheck = true;\r\n }\r\n else if(vm.company.access_type.includes('classic')){\r\n vm.classicDivCheck = true;\r\n }\r\n else{\r\n vm.classicDivCheck = false;\r\n }\r\n\r\n clearToggles();\r\n\r\n if(vm.company.customer_types.length > 0){\r\n if(vm.company.customer_types.includes('cww')){\r\n //vm.cww_check = false;\r\n vm.cww_visibility = false;\r\n $scope.party_id_names_exist_cww = removeDuplicates(vm.company.customer_type_setup.cww.party_id_names.concat(vm.company.customer_type_setup.cww.related_party_id_names));\r\n }else{\r\n //vm.cww_check = true;\r\n vm.cww_visibility = true;\r\n }\r\n if(vm.company.customer_types.includes('csl')){\r\n //vm.csl_check = false;\r\n vm.csl_visibility = false;\r\n $scope.party_id_names_exist_csl = removeDuplicates(vm.company.customer_type_setup.csl.party_id_names);\r\n }else{\r\n //vm.csl_check = true;\r\n vm.csl_visibility = true;\r\n }\r\n if(vm.company.customer_types.includes('cfs')){\r\n //vm.cfs_check = false;\r\n vm.cfs_visibility = false;\r\n $scope.party_id_names_exist_cfs = removeDuplicates(vm.company.customer_type_setup.cfs.party_id_names);\r\n }else{\r\n //vm.cfs_check = true;\r\n vm.cfs_visibility = true;\r\n }\r\n if(vm.company.customer_types.includes('cmts')){\r\n //vm.cfs_check = false;\r\n vm.cmts_visibility = false;\r\n $scope.party_id_names_exist_cmts = removeDuplicates(vm.company.customer_type_setup.cmts.party_id_names);\r\n }else{\r\n //vm.cfs_check = true;\r\n vm.cmts_visibility = true;\r\n }\r\n }\r\n\r\n vm.params.department_ids_cww = [];\r\n vm.params.department_ids_csl = [];\r\n vm.params.department_ids_cfs = [];\r\n vm.params.department_ids_cmts = [];\r\n\r\n $scope.related_party_id_names_exist_cww = [];\r\n $scope.related_party_id_names_exist_csl = [];\r\n $scope.related_party_id_names_exist_cfs = [];\r\n $scope.related_party_id_names_exist_cmts = [];\r\n\r\n if(vm.company.party_id_names == null){\r\n vm.company.party_id_names = [];\r\n }\r\n if(vm.company.related_party_id_names == null){\r\n vm.company.related_party_id_names = [];\r\n }\r\n $scope.party_id_names_exist = removeDuplicates(vm.company.party_id_names.concat(vm.company.related_party_id_names));\r\n\r\n vm.params.department_ids = [];\r\n $scope.related_party_id_names_exist = [];\r\n });\r\n }\r\n\r\n function cww_setup(val){\r\n if(val == false){\r\n vm.cww_check = true;\r\n }\r\n if(val == true){\r\n vm.cww_check = false;\r\n }\r\n if(val == false || val == true){\r\n vm.params.role = null;\r\n //vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options[0].value = false;\r\n vm.permissions.Company.options[0].value = false;\r\n vm.permissions.Company.options[1].value = false;\r\n vm.permissions.Company.options[2].value = false;\r\n vm.permissions.Group.options[0].value = false;\r\n vm.permissions.Shipment.options[0].value = false;\r\n vm.permissions.Shipment.options[1].value = false;\r\n vm.permissions.Shipment.options[2].value = false;\r\n vm.permissions.PotentialException.options[0].value = false;\r\n vm.permissions.PotentialException.options[1].value = false;\r\n vm.permissions.PotentialException.options[2].value = false;\r\n vm.permissions.LensGroup.options[0].value = false;\r\n vm.permissions.User.options[0].value = false;\r\n vm.permissions.User.options[1].value = false;\r\n vm.permissions.User.options[2].value = false;\r\n vm.permissions.User.options_classic[0].value = false;\r\n vm.permissions.User.options_classic[1].value = false;\r\n vm.permissions.User.options_classic[2].value = false;\r\n vm.permissions.User.options_classic[3].value = false;\r\n vm.permissions.User.options_classic[4].value = false;\r\n vm.permissions.User.options_classic[5].value = false;\r\n vm.permissions.User.options_classic[6].value = false;\r\n vm.permissions.User.options_classic[7].value = false;\r\n vm.permissions.Spotlight.options[0].value = false;\r\n vm.permissions.SupportRequestUser.options[0].value = false;\r\n vm.permissions.SupportRequestAdmin.options[0].value = false;\r\n vm.permissions.SupportRequestValidator.options[0].value = false;\r\n vm.permissions.CviewClassicAdmin.options[0].value = false;\r\n\r\n vm.params.permissions = vm.permissions;\r\n }\r\n\r\n if(vm.params.is_cww == true || vm.params.is_csl == true || vm.params.is_cfs == true || vm.params.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function csl_setup(val){\r\n if(val == false){\r\n vm.csl_check = true;\r\n }\r\n if(val == true){\r\n vm.csl_check = false;\r\n }\r\n if(val == false || val == true){\r\n vm.params.role_csl = null;\r\n\r\n //vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[1].value = false;\r\n vm.permissions.Group.options_csl[0].value = false;\r\n vm.permissions.Load.options_csl[0].value = false;\r\n vm.permissions.LensGroup.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[1].value = false;\r\n vm.permissions.User.options_csl[2].value = false;\r\n vm.permissions.Shipment.options_csl[1].value = false;\r\n vm.permissions.Shipment.options_csl[2].value = false;\r\n vm.permissions.Spotlight.options_csl[0].value = false;\r\n vm.params.permissions = vm.permissions;\r\n\r\n }\r\n if(vm.params.is_cww == true || vm.params.is_csl == true || vm.params.is_cfs == true || vm.params.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function cfs_setup(val){\r\n if(val == false){\r\n vm.cfs_check = true;\r\n }\r\n if(val == true){\r\n vm.cfs_check = false;\r\n }\r\n if(val == false || val == true){\r\n vm.params.role_cfs = null;\r\n //vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[1].value = false;\r\n vm.permissions.Group.options_cfs[0].value = false;\r\n vm.permissions.Load.options_cfs[0].value = false;\r\n vm.permissions.LensGroup.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[1].value = false;\r\n vm.permissions.User.options_cfs[2].value = false;\r\n vm.permissions.Shipment.options_cfs[1].value = false;\r\n vm.permissions.Shipment.options_cfs[2].value = false;\r\n vm.permissions.Spotlight.options_cfs[0].value = false;\r\n vm.params.permissions = vm.permissions;\r\n }\r\n if(vm.params.is_cww == true || vm.params.is_csl == true || vm.params.is_cfs == true || vm.params.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function cmts_setup(val){\r\n if(val == false){\r\n vm.cmts_check = true;\r\n }\r\n if(val == true){\r\n vm.cmts_check = false;\r\n }\r\n if(val == false || val == true){\r\n vm.params.role_cmts = null;\r\n //vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[1].value = false;\r\n vm.permissions.Group.options_cmts[0].value = false;\r\n vm.permissions.Load.options_cmts[0].value = false;\r\n vm.permissions.LensGroup.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[1].value = false;\r\n vm.permissions.User.options_cmts[2].value = false;\r\n vm.permissions.Shipment.options_cmts[1].value = false;\r\n vm.permissions.Shipment.options_cmts[2].value = false;\r\n vm.permissions.Spotlight.options_cmts[0].value = false;\r\n vm.params.permissions = vm.permissions;\r\n }\r\n if(vm.params.is_cww == true || vm.params.is_csl == true || vm.params.is_cfs == true || vm.params.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n\r\n function removeDuplicates(origArr) {\r\n try{\r\n var newArr = [],\r\n origLen = origArr.length,\r\n found, x, y;\r\n for (x = 0; x < origLen; x++) {\r\n found = undefined;\r\n for (y = 0; y < newArr.length; y++) {\r\n if (origArr[x] === newArr[y]) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n newArr.push(origArr[x]);\r\n }\r\n }\r\n return newArr;\r\n }catch(e){\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n function clearToggles(){\r\n vm.permissions = angular.copy(vm.clean_permissions);\r\n vm.permissions.Admin.options[0].value = false;\r\n vm.permissions.Company.options[0].value = false;\r\n vm.permissions.Company.options[1].value = false;\r\n vm.permissions.Company.options[2].value = false;\r\n vm.permissions.Group.options[0].value = false;\r\n vm.permissions.Shipment.options[0].value = false;\r\n vm.permissions.Shipment.options[1].value = false;\r\n vm.permissions.Shipment.options[2].value = false;\r\n vm.permissions.PotentialException.options[0].value = false;\r\n vm.permissions.PotentialException.options[1].value = false;\r\n vm.permissions.PotentialException.options[2].value = false;\r\n vm.permissions.LensGroup.options[0].value = false;\r\n vm.permissions.User.options[0].value = false;\r\n vm.permissions.User.options[1].value = false;\r\n vm.permissions.User.options[2].value = false;\r\n vm.permissions.User.options_classic[0].value = false;\r\n vm.permissions.User.options_classic[1].value = false;\r\n vm.permissions.User.options_classic[2].value = false;\r\n vm.permissions.User.options_classic[3].value = false;\r\n vm.permissions.User.options_classic[4].value = false;\r\n vm.permissions.User.options_classic[5].value = false;\r\n vm.permissions.User.options_classic[6].value = false;\r\n vm.permissions.User.options_classic[7].value = false;\r\n vm.permissions.Spotlight.options[0].value = false;\r\n vm.permissions.SupportRequestUser.options[0].value = false;\r\n vm.permissions.SupportRequestAdmin.options[0].value = false;\r\n vm.permissions.SupportRequestValidator.options[0].value = false;\r\n vm.permissions.CviewClassicAdmin.options[0].value = false;\r\n\r\n vm.permissions.Admin.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[0].value = false;\r\n vm.permissions.Company.options_csl[1].value = false;\r\n vm.permissions.Group.options_csl[0].value = false;\r\n vm.permissions.Load.options_csl[0].value = false;\r\n vm.permissions.LensGroup.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[0].value = false;\r\n vm.permissions.User.options_csl[1].value = false;\r\n vm.permissions.User.options_csl[2].value = false;\r\n vm.permissions.Shipment.options_csl[1].value = false;\r\n vm.permissions.Shipment.options_csl[2].value = false;\r\n vm.permissions.Spotlight.options_csl[0].value = false;\r\n\r\n vm.permissions.Admin.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[0].value = false;\r\n vm.permissions.Company.options_cfs[1].value = false;\r\n vm.permissions.Group.options_cfs[0].value = false;\r\n vm.permissions.Load.options_cfs[0].value = false;\r\n vm.permissions.LensGroup.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[0].value = false;\r\n vm.permissions.User.options_cfs[1].value = false;\r\n vm.permissions.User.options_cfs[2].value = false;\r\n vm.permissions.Shipment.options_cfs[1].value = false;\r\n vm.permissions.Shipment.options_cfs[2].value = false;\r\n vm.permissions.Spotlight.options_cfs[0].value = false;\r\n\r\n vm.permissions.Admin.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[0].value = false;\r\n vm.permissions.Company.options_cmts[1].value = false;\r\n vm.permissions.Group.options_cmts[0].value = false;\r\n vm.permissions.Load.options_cmts[0].value = false;\r\n vm.permissions.LensGroup.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[0].value = false;\r\n vm.permissions.User.options_cmts[1].value = false;\r\n vm.permissions.User.options_cmts[2].value = false;\r\n vm.permissions.Shipment.options_cmts[1].value = false;\r\n vm.permissions.Shipment.options_cmts[2].value = false;\r\n vm.permissions.Spotlight.options_cmts[0].value = false;\r\n\r\n\r\n vm.params.permissions = vm.permissions;\r\n\r\n\r\n vm.params.is_reskin = false;\r\n vm.params.primary_contact_cww = \"\";\r\n vm.params.default_bccs_cww = [];\r\n vm.params.party_id_names_cww = [];\r\n vm.params.related_party_id_names = [];\r\n vm.params.department_ids_cww = [];\r\n $scope.related_party_id_names_exist_cww = [];\r\n\r\n vm.params.primary_contact_csl = \"\";\r\n vm.params.default_bccs_csl = [];\r\n vm.params.party_id_names_csl = [];\r\n vm.params.department_ids_csl = [];\r\n $scope.related_party_id_names_exist_csl = [];\r\n\r\n vm.params.primary_contact_cfs = \"\";\r\n vm.params.default_bccs_cfs = [];\r\n vm.params.party_id_names_cfs = [];\r\n vm.params.department_ids_cfs = [];\r\n $scope.related_party_id_names_exist_cfs = [];\r\n\r\n vm.params.primary_contact_cmts = \"\";\r\n vm.params.default_bccs_cmts = [];\r\n vm.params.party_id_names_cmts = [];\r\n vm.params.department_ids_cmts = [];\r\n $scope.related_party_id_names_exist_cmts = [];\r\n\r\n }\r\n\r\n\r\n //permissions change functions\r\n\r\n function onPermissionsChangeClassic(permission,event){\r\n\r\n var transport = permission.User.options_classic[0].value ? true : false;\r\n var warehouse = permission.User.options_classic[1].value ? true : false;\r\n var accounts_recievables = permission.User.options_classic[2].value ? true : false;\r\n var book_shipment = permission.User.options_classic[3].value ? true : false;\r\n var reporting = permission.User.options_classic[4].value ? true : false;\r\n var operations_kpi = permission.User.options_classic[5].value ? true : false;\r\n var operations_dashboard = permission.User.options_classic[6].value ? true : false;\r\n var customs = permission.User.options_classic[7].value ? true : false;\r\n\r\n var cview_full_access = (transport == true && warehouse == true && accounts_recievables == true && book_shipment == true && reporting == true && operations_kpi == true && operations_dashboard == true && customs == true)\r\n\r\n var cview_customer_ops = (transport == true && warehouse == true && book_shipment == true && operations_kpi == true && accounts_recievables ==false && reporting == false && operations_dashboard == false && customs == false);\r\n\r\n var cview_customer_shipper = (transport == true && book_shipment == true && operations_kpi == true && warehouse == false && accounts_recievables ==false && reporting ==false && operations_dashboard ==false && customs ==false);\r\n\r\n var cview_customer_consignee = (transport == true && operations_kpi == true && warehouse == false && book_shipment ==false && accounts_recievables ==false && reporting ==false && operations_dashboard ==false && customs ==false);\r\n\r\n var cview_no_access = (transport == false && warehouse == false && accounts_recievables == false && book_shipment == false && reporting == false && operations_kpi == false && operations_dashboard == false && customs == false);\r\n \r\n\r\n if((cview_full_access)){\r\n vm.params.role_classic = 'customer_classic';\r\n }\r\n else if((cview_customer_ops)){\r\n vm.params.role_classic = 'classic_customer_ops';\r\n }\r\n else if((cview_customer_shipper)){\r\n vm.params.role_classic = 'classic_customer_shipper';\r\n }\r\n else if((cview_customer_consignee)){\r\n vm.params.role_classic = 'classic_customer_consignee';\r\n }\r\n // else\r\n // {\r\n // vm.params.role_classic = 'classic_custom';\r\n // }\r\n \r\n\r\n }\r\n\r\n function onPermissionsChange(permission,event) {\r\n\r\n if(vm.permissions['Company'].options[1].value == true) {\r\n vm.permissions['User'].options[1].value = true;\r\n }\r\n\r\n var pe_perm1 = permission.Company.options\r\n if(pe_perm1[0].value == true ) {\r\n pe_perm1[2].value = false;\r\n }\r\n var pe_perm = permission.PotentialException.options\r\n if(pe_perm[1].value == true) {\r\n pe_perm[0].value = true;\r\n }\r\n if(pe_perm[1].value == true || pe_perm[0].value == true) {\r\n pe_perm[2].value = false;\r\n }\r\n if((pe_perm[1].value == true || pe_perm[0].value == true) && pe_perm[2] == false ) {\r\n pe_perm[1].value = false;\r\n pe_perm[0].value = false;\r\n }\r\n\r\n var permission1 = permission.SupportRequestAdmin.options;\r\n var permission2 = permission.SupportRequestUser.options;\r\n var permission3 = permission.SupportRequestValidator.options;\r\n var permission4 = permission.CviewClassicAdmin.options;\r\n\r\n if(permission1[0].value == true){\r\n permission2[0].value = false;\r\n permission3[0].value = false;\r\n permission4[0].value = false;\r\n }\r\n\r\n if(permission2[0].value == true){\r\n permission1[0].value = false;\r\n permission3[0].value = false;\r\n permission4[0].value = false;\r\n }\r\n\r\n if(permission3[0].value == true){\r\n permission2[0].value = false;\r\n permission1[0].value = false;\r\n permission4[0].value = false;\r\n }\r\n\r\n if(permission4[0].value == true){\r\n permission2[0].value = false;\r\n permission1[0].value = false;\r\n permission3[0].value = false;\r\n }\r\n\r\n var lensGroup = permission.LensGroup.options[0];\r\n // Only crane admin should be allowed to toggle on/off manage lens group\r\n if (vm.currentUser.roles.cww){\r\n if (!vm.currentUser.roles.cww.includes(\"crane_admin\") && event=='Manage Lens Groups'){\r\n lensGroup.value = lensGroup.value ? false : true;\r\n }\r\n }\r\n\r\n var superAdmin = permission.Admin.options[0].value ? true : false;\r\n var companyAdmin = permission.Company.options[0].value ? true : false;\r\n var accessCompanyLensData = permission.Company.options[1].value ? true : false;\r\n var groupAdmin = permission.Group.options[0].value ? true : false;\r\n var shipmentView = permission.Shipment.options[0].value ? true : false;\r\n var editPotentialExceptions = permission.PotentialException.options[0].value ? true : false;\r\n var approvePotentialExceptions = permission.PotentialException.options[1].value ? true : false;\r\n var manageLensGroup = permission.LensGroup.options[0].value ? true : false;\r\n var mangeUsers = permission.User.options[0].value ? true : false;\r\n var cviewLensMode = permission.User.options[1].value ? true : false; \r\n var canExport = permission.Shipment.options[1].value ? true : false;\r\n var financial = permission.Shipment.options[2].value ? true : false;\r\n var supportRequestUser = permission.SupportRequestUser.options[0].value ? true : false;\r\n var supportRequestAdmin = permission.SupportRequestAdmin.options[0].value ? true : false;\r\n var supportRequestValidator = permission.SupportRequestValidator.options[0].value ? true : false;\r\n var cviewClassicAdmin = permission.CviewClassicAdmin.options[0].value ? true : false;\r\n var pe_read = permission.PotentialException.options[2].value ? true : false;\r\n\r\n if(vm.company.portal_type == 'customer')\r\n {\r\n if((approvePotentialExceptions == true && editPotentialExceptions == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == false && companyAdmin == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && !pe_read && canExport && financial)){\r\n vm.params.role = 'approver';\r\n }\r\n else if((approvePotentialExceptions == false && editPotentialExceptions == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == false && companyAdmin == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && !pe_read && canExport && financial)){\r\n vm.params.role = 'editor';\r\n }\r\n else if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && editPotentialExceptions == false && approvePotentialExceptions == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && !pe_read && canExport && financial)){\r\n vm.params.role = 'customer';\r\n }\r\n else if((approvePotentialExceptions == false && editPotentialExceptions == false && cviewLensMode == true && shipmentView == true && accessCompanyLensData == true && companyAdmin == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && !pe_read && canExport && financial)){\r\n vm.params.role = 'customer_lens';\r\n }\r\n else if((shipmentView == true && cviewLensMode == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && editPotentialExceptions == false && approvePotentialExceptions == false && manageLensGroup == false && mangeUsers == false && !pe_read && canExport && financial)){\r\n vm.params.role = 'crane_user';\r\n } \r\n else if((superAdmin == true && approvePotentialExceptions == true && editPotentialExceptions == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == true && companyAdmin == true && groupAdmin == true && manageLensGroup == true && mangeUsers == true && !pe_read && canExport && financial)){\r\n vm.params.role = 'crane_admin';\r\n }\r\n else if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && editPotentialExceptions == false && approvePotentialExceptions == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && !pe_read && canExport == false && financial)){\r\n vm.params.role = 'customer_no_tt_export'\r\n }\r\n else if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && editPotentialExceptions == false && approvePotentialExceptions == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && !pe_read && financial == false && canExport)){\r\n vm.params.role = 'customer_no_financial'\r\n }\r\n else\r\n {\r\n vm.params.role = 'custom';\r\n }\r\n } \r\n else if(vm.company.portal_type == 'shipper')\r\n {\r\n if((shipmentView == true && financial == false && canExport)){\r\n vm.params.role = 'customer_shipper'\r\n } else {\r\n vm.params.role = 'custom';\r\n }\r\n }\r\n else if(vm.company.portal_type == 'consignee') \r\n {\r\n if((shipmentView == true && financial == false && canExport)){\r\n vm.params.role = 'customer_consignee'\r\n } else {\r\n vm.params.role = 'custom';\r\n }\r\n } \r\n \r\n }\r\n\r\n function onPermissionsChangeCSL(permission,event) {\r\n\r\n if(vm.permissions['Company'].options_csl[1].value == true) {\r\n vm.permissions['User'].options_csl[1].value = true;\r\n }\r\n\r\n var pe_perm1 = permission.Company.options_csl\r\n if(pe_perm1[0].value == true ) {\r\n pe_perm1[2].value = false;\r\n }\r\n\r\n if(vm.permissions['CslException'].options_csl[1].value == true) {\r\n vm.permissions['CslException'].options_csl[0].value = true;\r\n } \r\n\r\n var lensGroup = permission.LensGroup.options_csl[0];\r\n // Only crane admin should be allowed to toggle on/off manage lens group\r\n if (vm.currentUser.roles.csl){\r\n if (!vm.currentUser.roles.csl.includes(\"crane_admin\") && event=='Manage Lens Groups'){\r\n lensGroup.value = lensGroup.value ? false : true;\r\n }\r\n }\r\n\r\n var superAdmin = permission.Admin.options_csl[0].value ? true : false;\r\n var companyAdmin = permission.Company.options_csl[0].value ? true : false;\r\n var accessCompanyLensData = permission.Company.options_csl[1].value ? true : false;\r\n var groupAdmin = permission.Group.options_csl[0].value ? true : false;\r\n var shipmentView = permission.Load.options_csl[0].value ? true : false;\r\n var manageLensGroup = permission.LensGroup.options_csl[0].value ? true : false;\r\n var mangeUsers = permission.User.options_csl[0].value ? true : false;\r\n var cviewLensMode = permission.User.options_csl[1].value ? true : false;\r\n var canExport = permission.Shipment.options_csl[1].value ? true : false;\r\n var financial = permission.Shipment.options_csl[2].value ? true : false;\r\n\r\n\r\n if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport && financial)){\r\n vm.params.role_csl = 'customer';\r\n }\r\n else if((shipmentView == true && cviewLensMode == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && canExport && financial)){\r\n vm.params.role_csl = 'crane_user';\r\n }\r\n else if((superAdmin == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == true && companyAdmin == true && groupAdmin == true && manageLensGroup == true && mangeUsers == true && canExport && financial)){\r\n vm.params.role_csl = 'crane_admin';\r\n }\r\n else if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport == false && financial)){\r\n vm.params.role_csl = 'customer_no_tt_export'\r\n }\r\n else if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && financial == false && canExport)){\r\n vm.params.role_csl = 'customer_no_financial'\r\n }\r\n else\r\n {\r\n vm.params.role_csl = 'custom';\r\n }\r\n }\r\n\r\n function onPermissionsChangeCFS(permission,event) {\r\n\r\n if(vm.permissions['Company'].options_cfs[1].value == true) {\r\n vm.permissions['User'].options_cfs[1].value = true;\r\n }\r\n\r\n var pe_perm1 = permission.Company.options_cfs\r\n if(pe_perm1[0].value == true ) {\r\n pe_perm1[2].value = false;\r\n }\r\n\r\n var lensGroup = permission.LensGroup.options_cfs[0];\r\n // Only crane admin should be allowed to toggle on/off manage lens group\r\n if (vm.currentUser.roles.cfs){\r\n if (!vm.currentUser.roles.cfs.includes(\"crane_admin\") && event=='Manage Lens Groups'){\r\n lensGroup.value = lensGroup.value ? false : true;\r\n }\r\n }\r\n\r\n if(vm.permissions['CslException'].options_cfs[1].value == true) {\r\n vm.permissions['CslException'].options_cfs[0].value = true;\r\n } \r\n\r\n var superAdmin = permission.Admin.options_cfs[0].value ? true : false;\r\n var companyAdmin = permission.Company.options_cfs[0].value ? true : false;\r\n var accessCompanyLensData = permission.Company.options_cfs[1].value ? true : false;\r\n var groupAdmin = permission.Group.options_cfs[0].value ? true : false;\r\n var shipmentView = permission.Load.options_cfs[0].value ? true : false;\r\n var manageLensGroup = permission.LensGroup.options_cfs[0].value ? true : false;\r\n var mangeUsers = permission.User.options_cfs[0].value ? true : false;\r\n var cviewLensMode = permission.User.options_cfs[1].value ? true : false;\r\n var canExport = permission.Shipment.options_cfs[1].value ? true : false;\r\n var financial = permission.Shipment.options_cfs[2].value ? true : false;\r\n\r\n\r\n if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport && financial)){\r\n vm.params.role_cfs = 'customer';\r\n }\r\n else if((shipmentView == true && cviewLensMode == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && canExport && financial)){\r\n vm.params.role_cfs = 'crane_user';\r\n }\r\n else if((superAdmin == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == true && companyAdmin == true && groupAdmin == true && manageLensGroup == true && mangeUsers == true && canExport && financial)){\r\n vm.params.role_cfs = 'crane_admin';\r\n }\r\n else if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport == false && financial)){\r\n vm.params.role_cfs = 'customer_no_tt_export'\r\n }\r\n else if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && financial == false && canExport)){\r\n vm.params.role_cfs = 'customer_no_financial'\r\n }\r\n else\r\n {\r\n vm.params.role_cfs = 'custom';\r\n }\r\n }\r\n\r\n function onPermissionsChangeCMTS(permission,event) {\r\n\r\n if(vm.permissions['Company'].options_cmts[1].value == true) {\r\n vm.permissions['User'].options_cmts[1].value = true;\r\n }\r\n\r\n var pe_perm1 = permission.Company.options_cmts\r\n if(pe_perm1[0].value == true ) {\r\n pe_perm1[2].value = false;\r\n }\r\n\r\n var lensGroup = permission.LensGroup.options_cmts[0];\r\n // Only crane admin should be allowed to toggle on/off manage lens group\r\n if (vm.currentUser.roles.cmts){\r\n if (!vm.currentUser.roles.cmts.includes(\"crane_admin\") && event=='Manage Lens Groups'){\r\n lensGroup.value = lensGroup.value ? false : true;\r\n }\r\n }\r\n\r\n if(vm.permissions['CslException'].options_cmts[1].value == true) {\r\n vm.permissions['CslException'].options_cmts[0].value = true;\r\n } \r\n\r\n var superAdmin = permission.Admin.options_cmts[0].value ? true : false;\r\n var companyAdmin = permission.Company.options_cmts[0].value ? true : false;\r\n var accessCompanyLensData = permission.Company.options_cmts[1].value ? true : false;\r\n var groupAdmin = permission.Group.options_cmts[0].value ? true : false;\r\n var shipmentView = permission.Load.options_cmts[0].value ? true : false;\r\n var manageLensGroup = permission.LensGroup.options_cmts[0].value ? true : false;\r\n var mangeUsers = permission.User.options_cmts[0].value ? true : false;\r\n var cviewLensMode = permission.User.options_cmts[1].value ? true : false;\r\n var canExport = permission.Shipment.options_cmts[1].value ? true : false;\r\n var financial = permission.Shipment.options_cmts[2].value ? true : false;\r\n\r\n\r\n if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport && financial)){\r\n vm.params.role_cmts = 'customer';\r\n }\r\n else if((shipmentView == true && cviewLensMode == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && canExport && financial)){\r\n vm.params.role_cmts = 'crane_user';\r\n }\r\n else if((superAdmin == true && cviewLensMode == true && shipmentView == true && accessCompanyLensData == true && companyAdmin == true && groupAdmin == true && manageLensGroup == true && mangeUsers == true && canExport && financial)){\r\n vm.params.role_cmts = 'crane_admin';\r\n }\r\n else if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && canExport == false && financial)){\r\n vm.params.role_cmts = 'customer_no_tt_export'\r\n }\r\n else if((shipmentView == true && companyAdmin == false && accessCompanyLensData == false && groupAdmin == false && manageLensGroup == false && mangeUsers == false && cviewLensMode == false && financial == false && canExport)){\r\n vm.params.role_cmts = 'customer_no_financial'\r\n }\r\n else\r\n {\r\n vm.params.role_cmts = 'custom';\r\n }\r\n } \r\n\r\n\r\n // Check whether the selected company is crane to add crane contact\r\n function isCrane(){\r\n if (vm.companies.length > 0){\r\n return vm.params.company_id == vm.companies.filter(function(c){return c.is_crane === true})[0].id;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function cancel(){\r\n vm.isLoading = true;\r\n $location.url(\"/users\");\r\n }\r\n\r\n /**\r\n * This is a little ugly, but wanted to be sure the updates are getting set correctly, since not all of\r\n * parameters translate cleanly\r\n */\r\n function save(){\r\n vm.isLoading = true;\r\n\r\n // Update params as necessary\r\n\r\n\r\n // if(vm.include.role)\r\n // {\r\n // vm.params.roles = [vm.role] || [];\r\n // }\r\n\r\n // if (vm.isCrane() && vm.params.is_crane_contact){\r\n // vm.params.roles.push('crane_contact');\r\n // }\r\n\r\n\r\n // if (vm.contact.primary_contact){\r\n // vm.params.contact_id = vm.contact.primary_contact.id;\r\n // }\r\n\r\n vm.params.customer_types = [];\r\n vm.params.customer_type_setup = {};\r\n\r\n if(vm.params.is_cww == true){\r\n vm.params.customer_types.push('cww');\r\n vm.params.customer_type_setup.cww = {};\r\n if(vm.params.is_reskin == true){\r\n if(vm.params.reskin_type == undefined){\r\n vm.params.customer_type_setup.cww.reskin_type = 'magno';\r\n }\r\n else{\r\n vm.params.customer_type_setup.cww.reskin_type = vm.params.reskin_type;\r\n }\r\n vm.params.customer_type_setup.cww.is_reskin = true;\r\n }\r\n if(vm.params.is_reskin == false){\r\n if(vm.params.reskin_type == undefined){\r\n vm.params.customer_type_setup.cww.reskin_type = 'default';\r\n }\r\n else{\r\n vm.params.customer_type_setup.cww.reskin_type = vm.params.reskin_type;\r\n }\r\n vm.params.customer_type_setup.cww.is_reskin = false;\r\n }\r\n if(vm.params.primary_contact_cww){\r\n vm.params.customer_type_setup.cww.default_contact_id = vm.params.primary_contact_cww;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cww.default_contact_id = \"\";\r\n }\r\n }\r\n if(vm.params.default_bccs_cww.length > 0){\r\n vm.params.customer_type_setup.cww.default_bccs = vm.params.default_bccs_cww;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cww.default_bccs = [];\r\n }\r\n }\r\n if(vm.params.party_id_names_cww.length > 0){\r\n vm.params.customer_type_setup.cww.party_id_names = vm.params.party_id_names_cww;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cww.party_id_names = [];\r\n }\r\n }\r\n if(vm.params.related_party_id_names.length > 0){\r\n vm.params.customer_type_setup.cww.related_party_id_names = vm.params.related_party_id_names;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cww.related_party_id_names = [];\r\n }\r\n }\r\n if(vm.params.department_ids_cww.length > 0){\r\n vm.params.customer_type_setup.cww.department_ids = vm.params.department_ids_cww;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cww.department_ids = [];\r\n }\r\n }\r\n }\r\n\r\n\r\n if(vm.params.is_csl == true){\r\n vm.params.customer_types.push('csl');\r\n vm.params.customer_type_setup.csl = {};\r\n if(vm.params.primary_contact_csl){\r\n vm.params.customer_type_setup.csl.default_contact_id = vm.params.primary_contact_csl;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.csl.default_contact_id = \"\";\r\n }\r\n }\r\n if(vm.params.default_bccs_csl.length > 0){\r\n vm.params.customer_type_setup.csl.default_bccs = vm.params.default_bccs_csl;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.csl.default_bccs = [];\r\n }\r\n }\r\n if(vm.params.party_id_names_csl.length > 0){\r\n vm.params.customer_type_setup.csl.party_id_names = vm.params.party_id_names_csl;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.csl.party_id_names = [];\r\n }\r\n }\r\n if(vm.params.department_ids_csl.length > 0){\r\n vm.params.customer_type_setup.csl.department_ids = vm.params.department_ids_csl;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.csl.department_ids = [];\r\n }\r\n }\r\n } \r\n\r\n if(vm.params.is_cfs == true){\r\n vm.params.customer_types.push('cfs');\r\n vm.params.customer_type_setup.cfs = {};\r\n if(vm.params.primary_contact_cfs){\r\n vm.params.customer_type_setup.cfs.default_contact_id = vm.params.primary_contact_cfs;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cfs.default_contact_id = \"\";\r\n }\r\n }\r\n if(vm.params.default_bccs_cfs.length > 0){\r\n vm.params.customer_type_setup.cfs.default_bccs = vm.params.default_bccs_cfs;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cfs.default_bccs = [];\r\n }\r\n }\r\n if(vm.params.party_id_names_cfs.length > 0){\r\n vm.params.customer_type_setup.cfs.party_id_names = vm.params.party_id_names_cfs;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cfs.party_id_names = [];\r\n }\r\n }\r\n if(vm.params.department_ids_cfs.length > 0){\r\n vm.params.customer_type_setup.cfs.department_ids = vm.params.department_ids_cfs;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cfs.department_ids = [];\r\n }\r\n }\r\n }\r\n\r\n if(vm.params.is_cmts == true){\r\n vm.params.customer_types.push('cmts');\r\n vm.params.customer_type_setup.cmts = {};\r\n if(vm.params.primary_contact_cmts){\r\n vm.params.customer_type_setup.cmts.default_contact_id = vm.params.primary_contact_cmts;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cmts.default_contact_id = \"\";\r\n }\r\n }\r\n if(vm.params.default_bccs_cmts.length > 0){\r\n vm.params.customer_type_setup.cmts.default_bccs = vm.params.default_bccs_cmts;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cmts.default_bccs = [];\r\n }\r\n }\r\n if(vm.params.party_id_names_cmts.length > 0){\r\n vm.params.customer_type_setup.cmts.party_id_names = vm.params.party_id_names_cmts;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cmts.party_id_names = [];\r\n }\r\n }\r\n if(vm.params.department_ids_cmts.length > 0){\r\n vm.params.customer_type_setup.cmts.department_ids = vm.params.department_ids_cmts;\r\n }\r\n else\r\n {\r\n if(!vm.isCreate){\r\n vm.params.customer_type_setup.cmts.department_ids = [];\r\n }\r\n }\r\n }\r\n\r\n if(vm.params.is_cww == true || vm.params.is_csl == true || vm.params.is_cfs == true || vm.params.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n\r\n\r\n vm.params.permissions = {}; //UserManagementService.parsePermissions(vm.permissions);\r\n vm.params.permissions.cww = UserManagementService.parsePermissions(vm.permissions);\r\n vm.params.permissions.csl = UserManagementService.parsePermissionsCsl(vm.permissions);\r\n vm.params.permissions.cfs = UserManagementService.parsePermissionsCfs(vm.permissions);\r\n vm.params.permissions.cmts = UserManagementService.parsePermissionsCmts(vm.permissions);\r\n\r\n vm.params.user_ids = vm.users.map( function(user){return user.id;} );\r\n\r\n //var superAdminCheck = vm.permissions['Admin']['options'][0]['value'] ? true : false;\r\n\r\n // Translate the params to the update\r\n var updates = {\r\n user_ids: vm.users.map( function(user){return user.id;})\r\n };\r\n\r\n updates[\"company_id\"] = vm.params.company_id;\r\n\r\n\r\n // if (vm.include.role){\r\n // updates['role'] = vm.params.role;\r\n // updates['roles'] = vm.params.roles;\r\n // }\r\n // if (vm.include.party_id_names){\r\n // updates['party_id_names'] = vm.params.party_id_names;\r\n // }\r\n // if (vm.include.related_party_id_names){\r\n // updates['related_party_id_names'] = vm.params.related_party_id_names;\r\n // }\r\n\r\n // if (vm.include.primary_contact){\r\n // updates['contact_id'] = vm.params.contact_id;\r\n // }\r\n // if (vm.include.bccs){\r\n // updates[\"bccs\"] = vm.params.bccs;\r\n // }\r\n\r\n if(vm.include.group){\r\n updates[\"group_ids\"] = vm.params.group_id;\r\n }\r\n\r\n // if (vm.include.department){\r\n // updates[\"department_ids\"] = vm.params.department_ids;\r\n // }\r\n\r\n updates.permissions = {};\r\n //updates.super_admin = superAdminCheck;\r\n\r\n updates.permissions = vm.params.permissions;\r\n\r\n updates.customer_types = vm.params.customer_types;\r\n updates.customer_type_setup = vm.params.customer_type_setup;\r\n\r\n var superAdminCheck = vm.permissions['Admin']['options'][0]['value'] ? true : false;\r\n var superAdminCheckCsl = vm.permissions['Admin']['options_csl'][0]['value'] ? true : false;\r\n var superAdminCheckCfs = vm.permissions['Admin']['options_cfs'][0]['value'] ? true : false;\r\n var superAdminCheckCmts = vm.permissions['Admin']['options_cmts'][0]['value'] ? true : false;\r\n\r\n updates.super_admin = {};\r\n updates.super_admin.cww = superAdminCheck;\r\n updates.super_admin.csl = superAdminCheckCsl;\r\n updates.super_admin.cfs = superAdminCheckCfs;\r\n updates.super_admin.cmts = superAdminCheckCmts;\r\n\r\n updates.roles = {};\r\n\r\n if(vm.params.role != null || vm.params.role != undefined){ updates.roles.cww = [vm.params.role] || []; }\r\n if(vm.params.role_csl != null || vm.params.role_csl != undefined){ updates.roles.csl = [vm.params.role_csl] || []; }\r\n if(vm.params.role_cfs != null || vm.params.role_cfs != undefined){ updates.roles.cfs = [vm.params.role_cfs] || []; }\r\n if(vm.params.role_cmts != null || vm.params.role_cmts != undefined){ updates.roles.cmts = [vm.params.role_cmts] || []; }\r\n if(vm.params.role_classic != null || vm.params.role_classic != undefined){ \r\n updates.roles.cww.push(vm.params.role_classic); }\r\n\r\n\r\n\r\n if(superAdminCheck){ updates.roles.cww.push('super_admin'); }\r\n if(superAdminCheckCsl){ updates.roles.csl.push('super_admin'); }\r\n if(superAdminCheckCfs){ updates.roles.cfs.push('super_admin'); }\r\n if(superAdminCheckCmts){ updates.roles.cmts.push('super_admin'); }\r\n\r\n if(vm.permissions.SupportRequestUser.options[0].value == true){\r\n updates.roles.cww.push('support_request_user');\r\n }\r\n if(vm.permissions.SupportRequestAdmin.options[0].value == true){\r\n updates.roles.cww.push('support_request_admin');\r\n } \r\n if(vm.permissions.SupportRequestValidator.options[0].value == true){\r\n //updatedUser.roles.push('support_request_user');\r\n updates.roles.cww.push('support_request_validator');\r\n }\r\n if(vm.permissions.CviewClassicAdmin.options[0].value == true){\r\n //updatedUser.roles.push('support_request_admin');\r\n updates.roles.cww.push('cview_classic_admin');\r\n }\r\n\r\n\r\n\r\n // Translate the permissions to the update\r\n // Object.keys(vm.permissions).map(function(permission){\r\n // if (vm.permissions[permission]){\r\n // updates.permissions[permission] = vm.params.permissions[permission];\r\n // }\r\n // })\r\n // Run the update\r\n\r\n\r\n UserManagementService.bulkUpdate(updates).then(function(){\r\n $location.url(\"/users\");\r\n }).finally(function(){ vm.isLoading = false; });\r\n }\r\n\r\n // Update URL when a chip is removed\r\n function chipRemoved(chip){\r\n $location.search('user_ids', vm.users.map(function(u){return u.id;}));\r\n }\r\n\r\n\r\n // reset the role and permission value\r\n function resetRolesPermissions(){\r\n if(!vm.include.role){\r\n vm.role = \"\"\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options;\r\n angular.forEach(options, function(o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n }\r\n\r\n /**\r\n * Handles setting the permissions when a role is selected\r\n */\r\n\r\n function onRoleChangeClassic() {\r\n // console.log('vm.permissions', vm.roles_classic);\r\n var role = vm.params.role_classic;\r\n if (role == 'classic_custom'){\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options_classic;\r\n angular.forEach(options, function(o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n var permissions = false;\r\n // find the role's permissions\r\n // console.log('testing on Role');\r\n angular.forEach(Object.keys(vm.roles_classic), function(k) {\r\n if (vm.roles_classic[k].key == role) {\r\n permissions = vm.roles_classic[k].permissions;\r\n return false;\r\n }\r\n });\r\n if (!permissions) return;\r\n\r\n // assign the permissions\r\n var permissionsMap = {};\r\n angular.forEach(permissions, function(perm) {\r\n var bits = perm.split('.');\r\n permissionsMap[bits[0]] = permissionsMap[bits[0]] || {};\r\n permissionsMap[bits[0]][bits[1]] = true;\r\n });\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options_classic;\r\n\r\n angular.forEach(options, function(o) {\r\n o.value = permissionsMap[feature] && permissionsMap[feature][o.name];\r\n });\r\n });\r\n // console.log('inside onrole');\r\n }\r\n\r\n function onRoleChange() {\r\n // console.log('vm.permissions', vm.roles);\r\n var role = vm.params.role;\r\n if (role == 'custom'){\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options;\r\n angular.forEach(options, function(o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n var permissions = false;\r\n // find the role's permissions\r\n // console.log('testing on Role');\r\n angular.forEach(Object.keys(vm.roles), function(k) {\r\n if (vm.roles[k].key == role) {\r\n permissions = vm.roles[k].permissions;\r\n return false;\r\n }\r\n });\r\n if (!permissions) return;\r\n\r\n // assign the permissions\r\n var permissionsMap = {};\r\n angular.forEach(permissions, function(perm) {\r\n var bits = perm.split('.');\r\n permissionsMap[bits[0]] = permissionsMap[bits[0]] || {};\r\n permissionsMap[bits[0]][bits[1]] = true;\r\n });\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options;\r\n\r\n angular.forEach(options, function(o) {\r\n o.value = permissionsMap[feature] && permissionsMap[feature][o.name];\r\n });\r\n });\r\n // console.log('inside onrole');\r\n }\r\n\r\n function onRoleChangeCSL() {\r\n // console.log('vm.permissions', vm.roles);\r\n var role = vm.params.role_csl;\r\n if (role == 'custom'){\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options_csl;\r\n angular.forEach(options, function(o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n var permissions = false;\r\n // find the role's permissions\r\n // console.log('testing on Role');\r\n angular.forEach(Object.keys(vm.roles_csl), function(k) {\r\n if (vm.roles_csl[k].key == role) {\r\n permissions = vm.roles_csl[k].permissions;\r\n return false;\r\n }\r\n });\r\n if (!permissions) return;\r\n\r\n // assign the permissions\r\n var permissionsMap = {};\r\n angular.forEach(permissions, function(perm) {\r\n var bits = perm.split('.');\r\n permissionsMap[bits[0]] = permissionsMap[bits[0]] || {};\r\n permissionsMap[bits[0]][bits[1]] = true;\r\n });\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options_csl;\r\n\r\n angular.forEach(options, function(o) {\r\n o.value = permissionsMap[feature] && permissionsMap[feature][o.name];\r\n });\r\n });\r\n // console.log('inside onrole');\r\n }\r\n\r\n function onRoleChangeCFS() {\r\n // console.log('vm.permissions', vm.roles);\r\n var role = vm.params.role_cfs;\r\n if (role == 'custom'){\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options_cfs;\r\n angular.forEach(options, function(o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n var permissions = false;\r\n // find the role's permissions\r\n // console.log('testing on Role');\r\n angular.forEach(Object.keys(vm.roles_cfs), function(k) {\r\n if (vm.roles_cfs[k].key == role) {\r\n permissions = vm.roles_cfs[k].permissions;\r\n return false;\r\n }\r\n });\r\n if (!permissions) return;\r\n\r\n // assign the permissions\r\n var permissionsMap = {};\r\n angular.forEach(permissions, function(perm) {\r\n var bits = perm.split('.');\r\n permissionsMap[bits[0]] = permissionsMap[bits[0]] || {};\r\n permissionsMap[bits[0]][bits[1]] = true;\r\n });\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options_cfs;\r\n\r\n angular.forEach(options, function(o) {\r\n o.value = permissionsMap[feature] && permissionsMap[feature][o.name];\r\n });\r\n });\r\n // console.log('inside onrole');\r\n }\r\n\r\n function onRoleChangeCMTS() {\r\n var role = vm.params.role_cmts;\r\n if (role == 'custom'){\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options_cmts;\r\n angular.forEach(options, function(o) {\r\n o.value = false\r\n });\r\n });\r\n return\r\n }\r\n var permissions = false;\r\n // find the role's permissions\r\n // console.log('testing on Role');\r\n angular.forEach(Object.keys(vm.roles_cmts), function(k) {\r\n if (vm.roles_cmts[k].key == role) {\r\n permissions = vm.roles_cmts[k].permissions;\r\n return false;\r\n }\r\n });\r\n if (!permissions) return;\r\n\r\n // assign the permissions\r\n var permissionsMap = {};\r\n angular.forEach(permissions, function(perm) {\r\n var bits = perm.split('.');\r\n permissionsMap[bits[0]] = permissionsMap[bits[0]] || {};\r\n permissionsMap[bits[0]][bits[1]] = true;\r\n });\r\n angular.forEach(Object.keys(vm.permissions), function(feature) {\r\n var options = vm.permissions[feature].options_cmts;\r\n\r\n angular.forEach(options, function(o) {\r\n o.value = permissionsMap[feature] && permissionsMap[feature][o.name];\r\n });\r\n });\r\n // console.log('inside onrole');\r\n }\r\n\r\n function onCslToggle(event,permission){\r\n if(permission.name === \"Read Only\" && permission.value === true){\r\n vm.permissions['CslException'].options_csl[0].value = false;\r\n vm.permissions['CslException'].options_csl[1].value = false;\r\n }\r\n if (permission.name === \"All Clients\" && permission.value === true){\r\n vm.permissions['CslException'].options_csl[2].value = false;\r\n }\r\n if (permission.name === \"Approver\" && permission.value === true){\r\n vm.permissions['CslException'].options_csl[2].value = false;\r\n }\r\n \r\n \r\n }\r\n\r\n function onCfsToggle(event,permission){ \r\n if(permission.name === \"Read Only\" && permission.value === true){\r\n vm.permissions['CslException'].options_cfs[0].value = false;\r\n vm.permissions['CslException'].options_cfs[1].value = false;\r\n }\r\n if (permission.name === \"All Clients\" && permission.value === true){\r\n vm.permissions['CslException'].options_cfs[2].value = false;\r\n }\r\n if (permission.name === \"Approver\" && permission.value === true){\r\n vm.permissions['CslException'].options_cfs[2].value = false;\r\n }\r\n }\r\n\r\n function onCmtsToggle(event,permission){ \r\n if(permission.name === \"Read Only\" && permission.value === true){\r\n vm.permissions['CslException'].options_cmts[0].value = false;\r\n vm.permissions['CslException'].options_cmts[1].value = false;\r\n }\r\n if (permission.name === \"All Clients\" && permission.value === true){\r\n vm.permissions['CslException'].options_cmts[2].value = false;\r\n }\r\n if (permission.name === \"Approver\" && permission.value === true){\r\n vm.permissions['CslException'].options_cmts[2].value = false;\r\n }\r\n }\r\n\r\n // Autocomplete Match Maker\r\n function getMatch(key, query){\r\n return UserManagementService.autoComplete({field: key, value: query});\r\n }\r\n\r\n // Autocomplete match maker for departments\r\n\r\n function getMatchForDepartment(key, searchText){\r\n var query = {field: key, value: searchText, company_id: vm.selected_company_id};\r\n return UserManagementService.autoComplete(query);\r\n }\r\n\r\n // Check for Permission inclusion\r\n function isPermissionsIn(pgroup){\r\n if (vm.permissions[pgroup].options){\r\n return !vm.permissions[pgroup].options.every(function(opt){return opt.display === false;});\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n // Copy the permissions state\r\n function getPermissions(){\r\n return angular.copy(UserManagementService.getPermissions());\r\n }\r\n\r\n // function onPermissionsChange() {\r\n // vm.role = 'custom';\r\n // }\r\n }\r\n})();\r\n\n/* Add to Homescreen v3.2.3 ~ (c) 2015 Matteo Spinelli ~ @license: http://cubiq.org/license */\r\n(function (window, document) {\r\n/*\r\n _ _ _____ _____\r\n ___ _| |_| |_ _|___| | |___ _____ ___ ___ ___ ___ ___ ___ ___\r\n| .'| . | . | | | | . | | . | | -_|_ -| _| _| -_| -_| |\r\n|__,|___|___| |_| |___|__|__|___|_|_|_|___|___|___|_| |___|___|_|_|\r\n by Matteo Spinelli ~ http://cubiq.org\r\n*/\r\n\r\n// Check for addEventListener browser support (prevent errors in IE<9)\r\nvar _eventListener = 'addEventListener' in window;\r\n\r\n// Check if document is loaded, needed by autostart\r\nvar _DOMReady = false;\r\nif ( document.readyState === 'complete' ) {\r\n\t_DOMReady = true;\r\n} else if ( _eventListener ) {\r\n\twindow.addEventListener('load', loaded, false);\r\n}\r\n\r\nfunction loaded () {\r\n\twindow.removeEventListener('load', loaded, false);\r\n\t_DOMReady = true;\r\n}\r\n\r\n// regex used to detect if app has been added to the homescreen\r\nvar _reSmartURL = /\\/ath(\\/)?$/;\r\nvar _reQueryString = /([\\?&]ath=[^&]*$|&ath=[^&]*(&))/;\r\n\r\n// singleton\r\nvar _instance;\r\nfunction ath (options) {\r\n\t_instance = _instance || new ath.Class(options);\r\n\r\n\treturn _instance;\r\n}\r\n\r\n// message in all supported languages\r\nath.intl = {\r\n\tcs_cs: {\r\n\t\tios: 'Pro přidáni této webové aplikace na úvodní obrazovku: stlačte %icon a pak <strong>Přidat na úvodní obrazovku</strong>.',\r\n\t\tandroid: 'Pro přidáni této webové aplikace na úvodní obrazovku otevřete menu nastavení prohlížeče a stlačte <strong>Přidat na úvodní obrazovku</strong>. <small>K menu se dostanete stlačením hardwaroveho tlačítka, když ho vaše zařízení má, nebo stlačením pravé horní menu ikony <span class=\"ath-action-icon\">icon</span>.</small>'\r\n\t},\r\n\r\n\tde_de: {\r\n\t\tios: 'Um diese Web-App zum Home-Bildschirm hinzuzufügen, tippen Sie auf %icon und dann <strong>Zum Home-Bildschirm</strong>.',\r\n\t\tandroid: 'Um diese Web-App zum Home-Bildschirm hinzuzufügen, öffnen Sie das Menü und tippen dann auf <strong>Zum Startbildschirm hinzufügen</strong>. <small>Wenn Ihr Gerät eine Menütaste hat, lässt sich das Browsermenü über diese öffnen. Ansonsten tippen Sie auf %icon.</small>'\r\n\t},\r\n\r\n\tda_dk: {\r\n\t\tios: 'For at tilføje denne web app til hjemmeskærmen: Tryk %icon og derefter <strong>Føj til hjemmeskærm</strong>.',\r\n\t\tandroid: 'For at tilføje denne web app til hjemmeskærmen, åbn browser egenskaber menuen og tryk på <strong>Føj til hjemmeskærm</strong>. <small>Denne menu kan tilgås ved at trykke på menu knappen, hvis din enhed har en, eller ved at trykke på det øverste højre menu ikon %icon.</small>'\r\n\t},\r\n\r\n\tel_gr: {\r\n\t\tios: 'Για να προσθέσετε την εφαρμογή στην αρχική οθόνη: πατήστε το %icon και μετά <strong>Πρόσθεσε στην αρχική οθόνη</strong>.',\r\n\t\tandroid: 'Για να προσθέσετε την εφαρμογή στην αρχική οθόνη, ανοίξτε τις επιλογές του browser σας και πατήστε το <strong>Προσθήκη στην αρχική οθόνη</strong>. <small>Μπορείτε να έχετε πρόσβαση στο μενού, πατώντας το κουμπί του μενού του κινητού σας ή το πάνω δεξιά κουμπί του μενού %icon.</small>'\r\n\t},\r\n\r\n\ten_us: {\r\n\t\tios: 'To add this web app to the home screen: tap %icon and then <strong>Add to Home Screen</strong>.',\r\n\t\tandroid: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon %icon.</small>'\r\n\t},\r\n\r\n\tes_es: {\r\n\t\tios: 'Para añadir esta aplicación web a la pantalla de inicio: pulsa %icon y selecciona <strong>Añadir a pantalla de inicio</strong>.',\r\n\t\tandroid: 'Para añadir esta aplicación web a la pantalla de inicio, abre las opciones y pulsa <strong>Añadir a pantalla inicio</strong>. <small>El menú se puede acceder pulsando el botón táctil en caso de tenerlo, o bien el icono de la parte superior derecha de la pantalla %icon.</small>'\r\n\t},\r\n\r\n\tfi_fi: {\r\n\t\tios: 'Liitä tämä sovellus kotivalikkoon: klikkaa %icon ja tämän jälkeen <strong>Lisää kotivalikkoon</strong>.',\r\n\t\tandroid: 'Lisätäksesi tämän sovelluksen aloitusnäytölle, avaa selaimen valikko ja klikkaa tähti -ikonia tai <strong>Lisää aloitusnäytölle tekstiä</strong>. <small>Valikkoon pääsee myös painamalla menuvalikkoa, jos laitteessasi on sellainen tai koskettamalla oikealla yläkulmassa menu ikonia %icon.</small>'\r\n\t},\r\n\r\n\tfr_fr: {\r\n\t\tios: 'Pour ajouter cette application web sur l\\'écran d\\'accueil : Appuyez %icon et sélectionnez <strong>Ajouter sur l\\'écran d\\'accueil</strong>.',\r\n\t\tandroid: 'Pour ajouter cette application web sur l\\'écran d\\'accueil : Appuyez sur le bouton \"menu\", puis sur <strong>Ajouter sur l\\'écran d\\'accueil</strong>. <small>Le menu peut-être accessible en appuyant sur le bouton \"menu\" du téléphone s\\'il en possède un <i class=\"fa fa-bars\"></i>. Sinon, il se trouve probablement dans la coin supérieur droit du navigateur %icon.</small>'\r\n\t},\r\n\r\n\the_il: {\r\n\t\tios: '<span dir=\"rtl\">להוספת האפליקציה למסך הבית: ללחוץ על %icon ואז <strong>הוסף למסך הבית</strong>.</span>',\r\n\t\tandroid: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon %icon.</small>'\r\n\t},\r\n\r\n\thu_hu: {\r\n\t\tios: 'Ha hozzá szeretné adni ezt az alkalmazást a kezdőképernyőjéhez, érintse meg a következő ikont: %icon , majd a <strong>Hozzáadás a kezdőképernyőhöz</strong> menüpontot.',\r\n\t\tandroid: 'Ha hozzá szeretné adni ezt az alkalmazást a kezdőképernyőjéhez, a böngésző menüjében kattintson a <strong>Hozzáadás a kezdőképernyőhöz</strong> menüpontra. <small>A böngésző menüjét a következő ikon megérintésével tudja megnyitni: %icon.</small>'\r\n\t},\r\n\r\n\tit_it: {\r\n\t\tios: 'Per aggiungere questa web app alla schermata iniziale: premi %icon e poi <strong>Aggiungi a Home</strong>.',\r\n\t\tandroid: 'Per aggiungere questa web app alla schermata iniziale, apri il menu opzioni del browser e premi su <strong>Aggiungi alla homescreen</strong>. <small>Puoi accedere al menu premendo il pulsante hardware delle opzioni se la tua device ne ha uno, oppure premendo l\\'icona %icon in alto a destra.</small>'\r\n\t},\r\n\r\n\tja_jp: {\r\n\t\tios: 'このウェプアプリをホーム画面に追加するには、%iconをタップして<strong>ホーム画面に追加</strong>してください。',\r\n\t\tandroid: 'このウェプアプリをホーム画面に追加するには、ブラウザのオプションメニューから<strong>ホーム画面に追加</strong>をタップしてください。<small>オプションメニューは、一部の機種ではデバイスのメニューボタンから、それ以外では画面右上の%iconからアクセスできます。</small>'\r\n \t},\r\n\r\n\tko_kr: {\r\n\t\tios: '홈 화면에 바로가기 생성: %icon 을 클릭한 후 <strong>홈 화면에 추가</strong>.',\r\n\t\tandroid: '브라우저 옵션 메뉴의 <string>홈 화면에 추가</string>를 클릭하여 홈화면에 바로가기를 생성할 수 있습니다. <small>옵션 메뉴는 장치의 메뉴 버튼을 누르거나 오른쪽 상단의 메뉴 아이콘 %icon을 클릭하여 접근할 수 있습니다.</small>'\r\n\t},\r\n\r\n\tnb_no: {\r\n\t\tios: 'For å installere denne appen på hjem-skjermen: trykk på %icon og deretter <strong>Legg til på Hjem-skjerm</strong>.',\r\n\t\tandroid: 'For å legge til denne webappen på startsiden åpner en nettlesermenyen og velger <strong>Legg til på startsiden</strong>. <small>Menyen åpnes ved å trykke på den fysiske menyknappen hvis enheten har det, eller ved å trykke på menyikonet øverst til høyre %icon.</small>'\r\n\t},\r\n\r\n\tpt_br: {\r\n\t\tios: 'Para adicionar este app à tela de início: clique %icon e então <strong>Tela de início</strong>.',\r\n\t\tandroid: 'Para adicionar este app à tela de início, abra o menu de opções do navegador e selecione <strong>Adicionar à tela inicial</strong>. <small>O menu pode ser acessado pressionando o \"menu\" button se o seu dispositivo tiver um, ou selecionando o ícone %icon no canto superior direito.</small>'\r\n\t},\r\n\r\n\tpt_pt: {\r\n\t\tios: 'Para adicionar esta app ao ecrã principal: clique %icon e depois <strong>Ecrã principal</strong>.',\r\n\t\tandroid: 'Para adicionar esta app web ecrã principal, abra o menu de opções do navegador e selecione <strong>Adicionar à tela inicial</strong>. <small>O menu pode ser acessado pressionando o \"menu\" button se o seu dispositivo tiver um, ou selecionando o ícone %icon no canto superior direito.</small>'\r\n\t},\r\n\r\n\tnl_nl: {\r\n\t\tios: 'Om deze webapp aan je startscherm toe te voegen, klik op %icon en dan <strong>Zet in startscherm</strong>.',\r\n\t\tandroid: 'Om deze webapp aan je startscherm toe te voegen, open de browserinstellingen en tik op <strong>Toevoegen aan startscherm</strong>. <small>Gebruik de \"menu\" knop als je telefoon die heeft, anders het menu-icoon rechtsbovenin %icon.</small>'\r\n\t},\r\n\r\n\tru_ru: {\r\n\t\tios: 'Чтобы добавить этот сайт на свой домашний экран, нажмите на иконку %icon и затем <strong>На экран \"Домой\"</strong>.',\r\n\t\tandroid: 'Чтобы добавить сайт на свой домашний экран, откройте меню браузера и нажмите на <strong>Добавить на главный экран</strong>. <small>Меню можно вызвать, нажав на кнопку меню вашего телефона, если она есть. Или найдите иконку сверху справа %icon[иконка].</small>'\r\n\t},\r\n\r\n\tsk_sk: {\r\n\t\tios: 'Pre pridanie tejto webovej aplikácie na úvodnú obrazovku: stlačte %icon a potom <strong>Pridať na úvodnú obrazovku</strong>.',\r\n\t\tandroid: 'Pre pridanie tejto webovej aplikácie na úvodnú obrazovku otvorte menu nastavenia prehliadača a stlačte <strong>Pridať na úvodnú obrazovku</strong>. <small>K menu sa dostanete stlačením hardwaroveho tlačidla, ak ho vaše zariadenie má, alebo stlačením pravej hornej menu ikony <span class=\"ath-action-icon\">icon</span>.</small>'\r\n\t},\r\n\r\n\tsv_se: {\r\n\t\tios: 'För att lägga till denna webbapplikation på hemskärmen: tryck på %icon och därefter <strong>Lägg till på hemskärmen</strong>.',\r\n\t\tandroid: 'För att lägga till den här webbappen på hemskärmen öppnar du webbläsarens alternativ-meny och väljer <strong>Lägg till på startskärmen</strong>. <small>Man hittar menyn genom att trycka på hårdvaruknappen om din enhet har en sådan, eller genom att trycka på menyikonen högst upp till höger %icon.</small>'\r\n\t},\r\n\r\n\ttr_tr: {\r\n\t\tios: 'Uygulamayı ana ekrana eklemek için, %icon ve ardından <strong>ana ekrana ekle</strong> butonunu tıklayın.',\r\n\t\tandroid: 'Uygulamayı ana ekrana eklemek için, menüye girin ve <strong>ana ekrana ekle</strong> butonunu tıklayın. <small>Cihazınız menü tuşuna sahip ise menüye girmek için menü tuşunu tıklayın. Aksi takdirde %icon butonunu tıklayın.</small>'\r\n\t},\r\n\r\n\tuk_ua: {\r\n\t\tios: 'Щоб додати цей сайт на початковий екран, натисніть %icon, а потім <strong>На початковий екран</strong>.',\r\n\t\tandroid: 'Щоб додати цей сайт на домашній екран, відкрийте меню браузера та виберіть <strong>Додати на головний екран</strong>. <small>Це можливо зробити, натиснувши кнопку меню на вашому смартфоні, якщо така є. Або ж на іконці зверху справа %icon.</small>'\r\n\t},\r\n\r\n\tzh_cn: {\r\n\t\tios: '如要把应用程序加至主屏幕,请点击%icon, 然后<strong>添加到主屏幕</strong>',\r\n\t\tandroid: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon %icon.</small>'\r\n\t},\r\n\r\n\tzh_tw: {\r\n\t\tios: '如要把應用程式加至主屏幕, 請點擊%icon, 然後<strong>加至主屏幕</strong>.',\r\n\t\tandroid: 'To add this web app to the home screen open the browser option menu and tap on <strong>Add to homescreen</strong>. <small>The menu can be accessed by pressing the menu hardware button if your device has one, or by tapping the top right menu icon %icon.</small>'\r\n\t}\r\n};\r\n\r\n// Add 2 characters language support (Android mostly)\r\nfor ( var lang in ath.intl ) {\r\n\tath.intl[lang.substr(0, 2)] = ath.intl[lang];\r\n}\r\n\r\n// default options\r\nath.defaults = {\r\n\tappID: 'org.cubiq.addtohome',\t\t// local storage name (no need to change)\r\n\tfontSize: 15,\t\t\t\t// base font size, used to properly resize the popup based on viewport scale factor\r\n\tdebug: false,\t\t\t\t// override browser checks\r\n\tlogging: false,\t\t\t\t// log reasons for showing or not showing to js console; defaults to true when debug is true\r\n\tmodal: false,\t\t\t\t// prevent further actions until the message is closed\r\n\tmandatory: false,\t\t\t// you can't proceed if you don't add the app to the homescreen\r\n\tautostart: true,\t\t\t// show the message automatically\r\n\tskipFirstVisit: false,\t\t// show only to returning visitors (ie: skip the first time you visit)\r\n\tstartDelay: 1,\t\t\t\t// display the message after that many seconds from page load\r\n\tlifespan: 15,\t\t\t\t// life of the message in seconds\r\n\tdisplayPace: 1440,\t\t\t// minutes before the message is shown again (0: display every time, default 24 hours)\r\n\tmaxDisplayCount: 0,\t\t\t// absolute maximum number of times the message will be shown to the user (0: no limit)\r\n\ticon: true,\t\t\t\t\t// add touch icon to the message\r\n\tmessage: '',\t\t\t\t// the message can be customized\r\n\tvalidLocation: [],\t\t\t// list of pages where the message will be shown (array of regexes)\r\n\tonInit: null,\t\t\t\t// executed on instance creation\r\n\tonShow: null,\t\t\t\t// executed when the message is shown\r\n\tonRemove: null,\t\t\t\t// executed when the message is removed\r\n\tonAdd: null,\t\t\t\t// when the application is launched the first time from the homescreen (guesstimate)\r\n\tonPrivate: null,\t\t\t// executed if user is in private mode\r\n\tprivateModeOverride: false,\t// show the message even in private mode (very rude)\r\n\tdetectHomescreen: false\t\t// try to detect if the site has been added to the homescreen (false | true | 'hash' | 'queryString' | 'smartURL')\r\n};\r\n\r\n// browser info and capability\r\nvar _ua = window.navigator.userAgent;\r\n\r\nvar _nav = window.navigator;\r\n_extend(ath, {\r\n\thasToken: document.location.hash == '#ath' || _reSmartURL.test(document.location.href) || _reQueryString.test(document.location.search),\r\n\tisRetina: window.devicePixelRatio && window.devicePixelRatio > 1,\r\n\tisIDevice: (/iphone|ipod|ipad/i).test(_ua),\r\n\tisMobileChrome: _ua.indexOf('Android') > -1 && (/Chrome\\/[.0-9]*/).test(_ua) && _ua.indexOf(\"Version\") == -1,\r\n\tisMobileIE: _ua.indexOf('Windows Phone') > -1,\r\n\tlanguage: _nav.language && _nav.language.toLowerCase().replace('-', '_') || ''\r\n});\r\n\r\n// falls back to en_us if language is unsupported\r\nath.language = ath.language && ath.language in ath.intl ? ath.language : 'en_us';\r\n\r\nath.isMobileSafari = ath.isIDevice && _ua.indexOf('Safari') > -1 && _ua.indexOf('CriOS') < 0;\r\nath.OS = ath.isIDevice ? 'ios' : ath.isMobileChrome ? 'android' : ath.isMobileIE ? 'windows' : 'unsupported';\r\n\r\nath.OSVersion = _ua.match(/(OS|Android) (\\d+[_\\.]\\d+)/);\r\nath.OSVersion = ath.OSVersion && ath.OSVersion[2] ? +ath.OSVersion[2].replace('_', '.') : 0;\r\n\r\nath.isStandalone = 'standalone' in window.navigator && window.navigator.standalone;\r\nath.isTablet = (ath.isMobileSafari && _ua.indexOf('iPad') > -1) || (ath.isMobileChrome && _ua.indexOf('Mobile') < 0);\r\n\r\nath.isCompatible = (ath.isMobileSafari && ath.OSVersion >= 6) || ath.isMobileChrome;\t// TODO: add winphone\r\n\r\nvar _defaultSession = {\r\n\tlastDisplayTime: 0,\t\t\t// last time we displayed the message\r\n\treturningVisitor: false,\t// is this the first time you visit\r\n\tdisplayCount: 0,\t\t\t// number of times the message has been shown\r\n\toptedout: false,\t\t\t// has the user opted out\r\n\tadded: false\t\t\t\t// has been actually added to the homescreen\r\n};\r\n\r\nath.removeSession = function (appID) {\r\n\ttry {\r\n\t\tif (!localStorage) {\r\n\t\t\tthrow new Error('localStorage is not defined');\r\n\t\t}\r\n\r\n\t\tlocalStorage.removeItem(appID || ath.defaults.appID);\r\n\t} catch (e) {\r\n\t\t// we are most likely in private mode\r\n\t}\r\n};\r\n\r\nath.doLog = function (logStr) {\r\n\tif ( this.options.logging ) {\r\n\t}\r\n};\r\n\r\nath.Class = function (options) {\r\n\t// class methods\r\n\tthis.doLog = ath.doLog;\r\n\r\n\t// merge default options with user config\r\n\tthis.options = _extend({}, ath.defaults);\r\n\t_extend(this.options, options);\r\n\t// override defaults that are dependent on each other\r\n\tif ( this.options && this.options.debug && (typeof this.options.logging === \"undefined\") ) {\r\n\t\tthis.options.logging = true;\r\n\t}\r\n\r\n\t// IE<9 so exit (I hate you, really)\r\n\tif ( !_eventListener ) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// normalize some options\r\n\tthis.options.mandatory = this.options.mandatory && ( 'standalone' in window.navigator || this.options.debug );\r\n\tthis.options.modal = this.options.modal || this.options.mandatory;\r\n\tif ( this.options.mandatory ) {\r\n\t\tthis.options.startDelay = -0.5;\t\t// make the popup hasty\r\n\t}\r\n\tthis.options.detectHomescreen = this.options.detectHomescreen === true ? 'hash' : this.options.detectHomescreen;\r\n\r\n\t// setup the debug environment\r\n\tif ( this.options.debug ) {\r\n\t\tath.isCompatible = true;\r\n\t\tath.OS = typeof this.options.debug == 'string' ? this.options.debug : ath.OS == 'unsupported' ? 'android' : ath.OS;\r\n\t\tath.OSVersion = ath.OS == 'ios' ? '8' : '4';\r\n\t}\r\n\r\n\t// the element the message will be appended to\r\n\tthis.container = document.body;\r\n\r\n\t// load session\r\n\tthis.session = this.getItem(this.options.appID);\r\n\tthis.session = this.session ? JSON.parse(this.session) : undefined;\r\n\r\n\t// user most likely came from a direct link containing our token, we don't need it and we remove it\r\n\tif ( ath.hasToken && ( !ath.isCompatible || !this.session ) ) {\r\n\t\tath.hasToken = false;\r\n\t\t_removeToken();\r\n\t}\r\n\r\n\t// the device is not supported\r\n\tif ( !ath.isCompatible ) {\r\n \t\tthis.doLog(\"Add to homescreen: not displaying callout because device not supported\");\r\n\t\treturn;\r\n\t}\r\n\r\n\tthis.session = this.session || _defaultSession;\r\n\r\n\t// check if we can use the local storage\r\n\ttry {\r\n\t\tif (!localStorage) {\r\n\t\t\tthrow new Error('localStorage is not defined');\r\n\t\t}\r\n\r\n\t\tlocalStorage.setItem(this.options.appID, JSON.stringify(this.session));\r\n\t\tath.hasLocalStorage = true;\r\n\t} catch (e) {\r\n\t\t// we are most likely in private mode\r\n\t\tath.hasLocalStorage = false;\r\n\r\n\t\tif ( this.options.onPrivate ) {\r\n\t\t\tthis.options.onPrivate.call(this);\r\n\t\t}\r\n\t}\r\n\r\n\t// check if this is a valid location\r\n\tvar isValidLocation = !this.options.validLocation.length;\r\n\tfor ( var i = this.options.validLocation.length; i--; ) {\r\n\t\tif ( this.options.validLocation[i].test(document.location.href) ) {\r\n\t\t\tisValidLocation = true;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\t// check compatibility with old versions of add to homescreen. Opt-out if an old session is found\r\n\tif ( this.getItem('addToHome') ) {\r\n\t\tthis.optOut();\r\n\t}\r\n\r\n\t// critical errors:\r\n\tif ( this.session.optedout ) {\r\n\t\tthis.doLog(\"Add to homescreen: not displaying callout because user opted out\");\r\n\t\treturn;\r\n\t}\r\n\tif ( this.session.added ) {\r\n\t\tthis.doLog(\"Add to homescreen: not displaying callout because already added to the homescreen\");\r\n\t\treturn;\r\n\t}\r\n\tif ( !isValidLocation ) {\r\n\t\tthis.doLog(\"Add to homescreen: not displaying callout because not a valid location\");\r\n\t\treturn;\r\n\t}\r\n\r\n\t// check if the app is in stand alone mode\r\n\tif ( ath.isStandalone ) {\r\n\t\t// execute the onAdd event if we haven't already\r\n\t\tif ( !this.session.added ) {\r\n\t\t\tthis.session.added = true;\r\n\t\t\tthis.updateSession();\r\n\r\n\t\t\tif ( this.options.onAdd && ath.hasLocalStorage ) {\t// double check on localstorage to avoid multiple calls to the custom event\r\n\t\t\t\tthis.options.onAdd.call(this);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.doLog(\"Add to homescreen: not displaying callout because in standalone mode\");\r\n\t\treturn;\r\n\t}\r\n\r\n\t// (try to) check if the page has been added to the homescreen\r\n\tif ( this.options.detectHomescreen ) {\r\n\t\t// the URL has the token, we are likely coming from the homescreen\r\n\t\tif ( ath.hasToken ) {\r\n\t\t\t_removeToken();\t\t// we don't actually need the token anymore, we remove it to prevent redistribution\r\n\r\n\t\t\t// this is called the first time the user opens the app from the homescreen\r\n\t\t\tif ( !this.session.added ) {\r\n\t\t\t\tthis.session.added = true;\r\n\t\t\t\tthis.updateSession();\r\n\r\n\t\t\t\tif ( this.options.onAdd && ath.hasLocalStorage ) {\t// double check on localstorage to avoid multiple calls to the custom event\r\n\t\t\t\t\tthis.options.onAdd.call(this);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tthis.doLog(\"Add to homescreen: not displaying callout because URL has token, so we are likely coming from homescreen\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// URL doesn't have the token, so add it\r\n\t\tif ( this.options.detectHomescreen == 'hash' ) {\r\n\t\t\thistory.replaceState('', window.document.title, document.location.href + '#ath');\r\n\t\t} else if ( this.options.detectHomescreen == 'smartURL' ) {\r\n\t\t\thistory.replaceState('', window.document.title, document.location.href.replace(/(\\/)?$/, '/ath$1'));\r\n\t\t} else {\r\n\t\t\thistory.replaceState('', window.document.title, document.location.href + (document.location.search ? '&' : '?' ) + 'ath=');\r\n\t\t}\r\n\t}\r\n\r\n\t// check if this is a returning visitor\r\n\tif ( !this.session.returningVisitor ) {\r\n\t\tthis.session.returningVisitor = true;\r\n\t\tthis.updateSession();\r\n\r\n\t\t// we do not show the message if this is your first visit\r\n\t\tif ( this.options.skipFirstVisit ) {\r\n\t\t\tthis.doLog(\"Add to homescreen: not displaying callout because skipping first visit\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\r\n\t// we do no show the message in private mode\r\n\tif ( !this.options.privateModeOverride && !ath.hasLocalStorage ) {\r\n\t\tthis.doLog(\"Add to homescreen: not displaying callout because browser is in private mode\");\r\n\t\treturn;\r\n\t}\r\n\r\n\t// all checks passed, ready to display\r\n\tthis.ready = true;\r\n\r\n\tif ( this.options.onInit ) {\r\n\t\tthis.options.onInit.call(this);\r\n\t}\r\n\r\n\tif ( this.options.autostart ) {\r\n\t\tthis.doLog(\"Add to homescreen: autostart displaying callout\");\r\n\t\tthis.show();\r\n\t}\r\n};\r\n\r\nath.Class.prototype = {\r\n\t// event type to method conversion\r\n\tevents: {\r\n\t\tload: '_delayedShow',\r\n\t\terror: '_delayedShow',\r\n\t\torientationchange: 'resize',\r\n\t\tresize: 'resize',\r\n\t\tscroll: 'resize',\r\n\t\tclick: 'remove',\r\n\t\ttouchmove: '_preventDefault',\r\n\t\ttransitionend: '_removeElements',\r\n\t\twebkitTransitionEnd: '_removeElements',\r\n\t\tMSTransitionEnd: '_removeElements'\r\n\t},\r\n\r\n\thandleEvent: function (e) {\r\n\t\tvar type = this.events[e.type];\r\n\t\tif ( type ) {\r\n\t\t\tthis[type](e);\r\n\t\t}\r\n\t},\r\n\r\n\tshow: function (force) {\r\n\t\t// in autostart mode wait for the document to be ready\r\n\t\tif ( this.options.autostart && !_DOMReady ) {\r\n\t\t\tsetTimeout(this.show.bind(this), 50);\r\n\t\t\t// we are not displaying callout because DOM not ready, but don't log that because\r\n\t\t\t// it would log too frequently\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// message already on screen\r\n\t\tif ( this.shown ) {\r\n\t\t\tthis.doLog(\"Add to homescreen: not displaying callout because already shown on screen\");\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tvar now = Date.now();\r\n\t\tvar lastDisplayTime = this.session.lastDisplayTime;\r\n\r\n\t\tif ( force !== true ) {\r\n\t\t\t// this is needed if autostart is disabled and you programmatically call the show() method\r\n\t\t\tif ( !this.ready ) {\r\n\t\t\t\tthis.doLog(\"Add to homescreen: not displaying callout because not ready\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// we obey the display pace (prevent the message to popup too often)\r\n\t\t\tif ( now - lastDisplayTime < this.options.displayPace * 60000 ) {\r\n\t\t\t\tthis.doLog(\"Add to homescreen: not displaying callout because displayed recently\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// obey the maximum number of display count\r\n\t\t\tif ( this.options.maxDisplayCount && this.session.displayCount >= this.options.maxDisplayCount ) {\r\n\t\t\t\tthis.doLog(\"Add to homescreen: not displaying callout because displayed too many times already\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tthis.shown = true;\r\n\r\n\t\t// increment the display count\r\n\t\tthis.session.lastDisplayTime = now;\r\n\t\tthis.session.displayCount++;\r\n\t\tthis.updateSession();\r\n\r\n\t\t// try to get the highest resolution application icon\r\n\t\tif ( !this.applicationIcon ) {\r\n\t\t\tif ( ath.OS == 'ios' ) {\r\n\t\t\t\tthis.applicationIcon = document.querySelector('head link[rel^=apple-touch-icon][sizes=\"152x152\"],head link[rel^=apple-touch-icon][sizes=\"144x144\"],head link[rel^=apple-touch-icon][sizes=\"120x120\"],head link[rel^=apple-touch-icon][sizes=\"114x114\"],head link[rel^=apple-touch-icon]');\r\n\t\t\t} else {\r\n\t\t\t\tthis.applicationIcon = document.querySelector('head link[rel^=\"shortcut icon\"][sizes=\"196x196\"],head link[rel^=apple-touch-icon]');\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tvar message = '';\r\n\r\n\t\tif ( typeof this.options.message == 'object' && ath.language in this.options.message ) {\t\t// use custom language message\r\n\t\t\tmessage = this.options.message[ath.language][ath.OS];\r\n\t\t} else if ( typeof this.options.message == 'object' && ath.OS in this.options.message ) {\t\t// use custom os message\r\n\t\t\tmessage = this.options.message[ath.OS];\r\n\t\t} else if ( this.options.message in ath.intl ) {\t\t\t\t// you can force the locale\r\n\t\t\tmessage = ath.intl[this.options.message][ath.OS];\r\n\t\t} else if ( this.options.message !== '' ) {\t\t\t\t\t\t// use a custom message\r\n\t\t\tmessage = this.options.message;\r\n\t\t} else if ( ath.OS in ath.intl[ath.language] ) {\t\t\t\t// otherwise we use our message\r\n\t\t\tmessage = ath.intl[ath.language][ath.OS];\r\n\t\t}\r\n\r\n\t\t// add the action icon\r\n\t\tmessage = '<p>' + message.replace(/%icon(?:\\[([^\\]]+)\\])?/gi, function(matches, group1) {\r\n\t\t\treturn '<span class=\"ath-action-icon\">' + (!!group1 ? group1 : 'icon') + '</span>';\r\n\t\t}) + '</p>';\r\n\r\n\t\t// create the message container\r\n\t\tthis.viewport = document.createElement('div');\r\n\t\tthis.viewport.className = 'ath-viewport';\r\n\t\tif ( this.options.modal ) {\r\n\t\t\tthis.viewport.className += ' ath-modal';\r\n\t\t}\r\n\t\tif ( this.options.mandatory ) {\r\n\t\t\tthis.viewport.className += ' ath-mandatory';\r\n\t\t}\r\n\t\tthis.viewport.style.position = 'absolute';\r\n\r\n\t\t// create the actual message element\r\n\t\tthis.element = document.createElement('div');\r\n\t\tthis.element.className = 'ath-container ath-' + ath.OS + ' ath-' + ath.OS + (parseInt(ath.OSVersion) || '') + ' ath-' + (ath.isTablet ? 'tablet' : 'phone');\r\n\t\tthis.element.style.cssText = '-webkit-transition-property:-webkit-transform,opacity;-webkit-transition-duration:0s;-webkit-transition-timing-function:ease-out;transition-property:transform,opacity;transition-duration:0s;transition-timing-function:ease-out;';\r\n\t\tthis.element.style.webkitTransform = 'translate3d(0,-' + window.innerHeight + 'px,0)';\r\n\t\tthis.element.style.transform = 'translate3d(0,-' + window.innerHeight + 'px,0)';\r\n\r\n\t\t// add the application icon\r\n\t\tif ( this.options.icon && this.applicationIcon ) {\r\n\t\t\tthis.element.className += ' ath-icon';\r\n\t\t\tthis.img = document.createElement('img');\r\n\t\t\tthis.img.className = 'ath-application-icon';\r\n\t\t\tthis.img.addEventListener('load', this, false);\r\n\t\t\tthis.img.addEventListener('error', this, false);\r\n\r\n\t\t\tthis.img.src = this.applicationIcon.href;\r\n\t\t\tthis.element.appendChild(this.img);\r\n\t\t}\r\n\r\n\t\tthis.element.innerHTML += message;\r\n\r\n\t\t// we are not ready to show, place the message out of sight\r\n\t\tthis.viewport.style.left = '-99999em';\r\n\r\n\t\t// attach all elements to the DOM\r\n\t\tthis.viewport.appendChild(this.element);\r\n\t\tthis.container.appendChild(this.viewport);\r\n\r\n\t\t// if we don't have to wait for an image to load, show the message right away\r\n\t\tif ( this.img ) {\r\n\t\t\tthis.doLog(\"Add to homescreen: not displaying callout because waiting for img to load\");\r\n\t\t} else {\r\n\t\t\tthis._delayedShow();\r\n\t\t}\r\n\t},\r\n\r\n\t_delayedShow: function (e) {\r\n\t\tsetTimeout(this._show.bind(this), this.options.startDelay * 1000 + 500);\r\n\t},\r\n\r\n\t_show: function () {\r\n\t\tvar that = this;\r\n\r\n\t\t// update the viewport size and orientation\r\n\t\tthis.updateViewport();\r\n\r\n\t\t// reposition/resize the message on orientation change\r\n\t\twindow.addEventListener('resize', this, false);\r\n\t\twindow.addEventListener('scroll', this, false);\r\n\t\twindow.addEventListener('orientationchange', this, false);\r\n\r\n\t\tif ( this.options.modal ) {\r\n\t\t\t// lock any other interaction\r\n\t\t\tdocument.addEventListener('touchmove', this, true);\r\n\t\t}\r\n\r\n\t\t// Enable closing after 1 second\r\n\t\tif ( !this.options.mandatory ) {\r\n\t\t\tsetTimeout(function () {\r\n\t\t\t\tthat.element.addEventListener('click', that, true);\r\n\t\t\t}, 1000);\r\n\t\t}\r\n\r\n\t\t// kick the animation\r\n\t\tsetTimeout(function () {\r\n\t\t\tthat.element.style.webkitTransitionDuration = '1.2s';\r\n\t\t\tthat.element.style.transitionDuration = '1.2s';\r\n\t\t\tthat.element.style.webkitTransform = 'translate3d(0,0,0)';\r\n\t\t\tthat.element.style.transform = 'translate3d(0,0,0)';\r\n\t\t}, 0);\r\n\r\n\t\t// set the destroy timer\r\n\t\tif ( this.options.lifespan ) {\r\n\t\t\tthis.removeTimer = setTimeout(this.remove.bind(this), this.options.lifespan * 1000);\r\n\t\t}\r\n\r\n\t\t// fire the custom onShow event\r\n\t\tif ( this.options.onShow ) {\r\n\t\t\tthis.options.onShow.call(this);\r\n\t\t}\r\n\t},\r\n\r\n\tremove: function () {\r\n\t\tclearTimeout(this.removeTimer);\r\n\r\n\t\t// clear up the event listeners\r\n\t\tif ( this.img ) {\r\n\t\t\tthis.img.removeEventListener('load', this, false);\r\n\t\t\tthis.img.removeEventListener('error', this, false);\r\n\t\t}\r\n\r\n\t\twindow.removeEventListener('resize', this, false);\r\n\t\twindow.removeEventListener('scroll', this, false);\r\n\t\twindow.removeEventListener('orientationchange', this, false);\r\n\t\tdocument.removeEventListener('touchmove', this, true);\r\n\t\tthis.element.removeEventListener('click', this, true);\r\n\r\n\t\t// remove the message element on transition end\r\n\t\tthis.element.addEventListener('transitionend', this, false);\r\n\t\tthis.element.addEventListener('webkitTransitionEnd', this, false);\r\n\t\tthis.element.addEventListener('MSTransitionEnd', this, false);\r\n\r\n\t\t// start the fade out animation\r\n\t\tthis.element.style.webkitTransitionDuration = '0.3s';\r\n\t\tthis.element.style.opacity = '0';\r\n\t},\r\n\r\n\t_removeElements: function () {\r\n\t\tthis.element.removeEventListener('transitionend', this, false);\r\n\t\tthis.element.removeEventListener('webkitTransitionEnd', this, false);\r\n\t\tthis.element.removeEventListener('MSTransitionEnd', this, false);\r\n\r\n\t\t// remove the message from the DOM\r\n\t\tthis.container.removeChild(this.viewport);\r\n\r\n\t\tthis.shown = false;\r\n\r\n\t\t// fire the custom onRemove event\r\n\t\tif ( this.options.onRemove ) {\r\n\t\t\tthis.options.onRemove.call(this);\r\n\t\t}\r\n\t},\r\n\r\n\tupdateViewport: function () {\r\n\t\tif ( !this.shown ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tthis.viewport.style.width = window.innerWidth + 'px';\r\n\t\tthis.viewport.style.height = window.innerHeight + 'px';\r\n\t\tthis.viewport.style.left = window.scrollX + 'px';\r\n\t\tthis.viewport.style.top = window.scrollY + 'px';\r\n\r\n\t\tvar clientWidth = document.documentElement.clientWidth;\r\n\r\n\t\tthis.orientation = clientWidth > document.documentElement.clientHeight ? 'landscape' : 'portrait';\r\n\r\n\t\tvar screenWidth = ath.OS == 'ios' ? this.orientation == 'portrait' ? screen.width : screen.height : screen.width;\r\n\t\tthis.scale = screen.width > clientWidth ? 1 : screenWidth / window.innerWidth;\r\n\r\n\t\tthis.element.style.fontSize = this.options.fontSize / this.scale + 'px';\r\n\t},\r\n\r\n\tresize: function () {\r\n\t\tclearTimeout(this.resizeTimer);\r\n\t\tthis.resizeTimer = setTimeout(this.updateViewport.bind(this), 100);\r\n\t},\r\n\r\n\tupdateSession: function () {\r\n\t\tif ( ath.hasLocalStorage === false ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n if (localStorage) {\r\n localStorage.setItem(this.options.appID, JSON.stringify(this.session));\r\n }\r\n\t},\r\n\r\n\tclearSession: function () {\r\n\t\tthis.session = _defaultSession;\r\n\t\tthis.updateSession();\r\n\t},\r\n\r\n\tgetItem: function(item) {\r\n\t\ttry {\r\n\t\t\tif (!localStorage) {\r\n\t\t\t\tthrow new Error('localStorage is not defined');\r\n\t\t\t}\r\n\r\n\t\t\treturn localStorage.getItem(item);\r\n\t\t} catch(e) {\r\n\t\t\t// Preventing exception for some browsers when fetching localStorage key\r\n\t\t\tath.hasLocalStorage = false;\r\n\t\t}\r\n\t},\r\n\r\n\toptOut: function () {\r\n\t\tthis.session.optedout = true;\r\n\t\tthis.updateSession();\r\n\t},\r\n\r\n\toptIn: function () {\r\n\t\tthis.session.optedout = false;\r\n\t\tthis.updateSession();\r\n\t},\r\n\r\n\tclearDisplayCount: function () {\r\n\t\tthis.session.displayCount = 0;\r\n\t\tthis.updateSession();\r\n\t},\r\n\r\n\t_preventDefault: function (e) {\r\n\t\te.preventDefault();\r\n\t\te.stopPropagation();\r\n\t}\r\n};\r\n\r\n// utility\r\nfunction _extend (target, obj) {\r\n\tfor ( var i in obj ) {\r\n\t\ttarget[i] = obj[i];\r\n\t}\r\n\r\n\treturn target;\r\n}\r\n\r\nfunction _removeToken () {\r\n\tif ( document.location.hash == '#ath' ) {\r\n\t\thistory.replaceState('', window.document.title, document.location.href.split('#')[0]);\r\n\t}\r\n\r\n\tif ( _reSmartURL.test(document.location.href) ) {\r\n\t\thistory.replaceState('', window.document.title, document.location.href.replace(_reSmartURL, '$1'));\r\n\t}\r\n\r\n\tif ( _reQueryString.test(document.location.search) ) {\r\n\t\thistory.replaceState('', window.document.title, document.location.href.replace(_reQueryString, '$2'));\r\n\t}\r\n}\r\n\r\n// expose to the world\r\nwindow.addToHomescreen = ath;\r\n\r\n})(window, document);\r\n\n/**\r\n * @ngdoc module\r\n * @name SupportRequestsService\r\n *\r\n * @description\r\n * The SupportRequestsService does stuff\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('SupportRequestsService', SupportRequestsService);\r\n\r\n /** @ngInject */\r\n SupportRequestsService.$inject = ['$http', '$log', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX',\r\n 'DownloadService', '$state','Upload'];\r\n function SupportRequestsService($http, $log, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api,\r\n AJAX, DownloadService, $state,Upload) {\r\n var user = {\r\n contact:{\r\n bccs:[],\r\n ccs:[]\r\n }\r\n },\r\n bulk_users = [],\r\n routeStatus = false,\r\n addUserCheck = true,\r\n ticketType = 'company_tickets',\r\n support = getSupportObject(),\r\n supportCompany = getSupportCompanyObject(),\r\n supportCompanyEdit = getSupportCompanyEditObject(),\r\n supportCompanyEditRow = getSupportCompanyEditRowObject(),\r\n timeoutTid = false,\r\n loading = false,\r\n isEmpty = true,\r\n deferred = $q.defer(),\r\n companyTable = new NgTableParams({\r\n page: 1,\r\n count: 10,\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n\r\n\r\n return {\r\n autoComplete: autoComplete,\r\n autocompleteCww: autocompleteCww,\r\n autocompleteCsl: autocompleteCsl,\r\n autocompleteCfs: autocompleteCfs,\r\n getSupportObject: getSupportObject,\r\n getSupportCompanyObject: getSupportCompanyObject,\r\n getSupportCompanyEditObject: getSupportCompanyEditObject,\r\n getSupportCompanyEditRowObject: getSupportCompanyEditRowObject,\r\n uploadFile: uploadFile,\r\n create_new_account:create_new_account,\r\n getUserViewDetails:getUserViewDetails,\r\n changeAccountStatus:changeAccountStatus,\r\n exportSearchFields: exportSearchFields,\r\n setTicketType: setTicketType,\r\n getTicketType: getTicketType,\r\n checkEmailExist: checkEmailExist\r\n };\r\n\r\n\r\n function setTicketType(type){\r\n ticketType = type;\r\n }\r\n\r\n function getTicketType() {\r\n return ticketType;\r\n }\r\n\r\n function checkEmailExist(Useremail){\r\n var url = '/tickets/validate_email?email='+Useremail;\r\n return $http.get(api.url+url)\r\n }\r\n\r\n function exportSearchFields(fields, params){\r\n var search = {};\r\n if (fields && fields.length !== 0){\r\n search.columns = fields.map(function(d){return d.field;});\r\n }\r\n search.columns = search.columns || [];\r\n search.type = ticketType;\r\n if (params){\r\n if (params.filter){search.filter = params.filter;}\r\n if (params.sorting){search.sorting = params.sorting;}\r\n }\r\n $log.debug(search);\r\n var csv_date = new Date();\r\n var filename = (moment().format('YYYY-MM-DD') + '-Support-Request-Export.csv');\r\n var params = \"\";\r\n\r\n\r\n return DownloadService.postDownloadFile(api.url + '/tickets/export'+params, search, filename);\r\n }\r\n\r\n function changeAccountStatus(id,status){\r\n var dfd = $q.defer();\r\n var url = api.url+'/tickets/account_tickets/'+id+'/change_status?status_action='+status;\r\n //var dfd = $q.defer();\r\n $http.put(url).then(function(response){\r\n\r\n if(response.status == 200){\r\n return dfd.resolve(response.data);\r\n }\r\n\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n\r\n return dfd.promise;\r\n }\r\n\r\n function create_new_account(account_det){\r\n //debugger;\r\n //account_det = JSON.stringify(account_det);\r\n\r\n var url = api.url+'/tickets/account_tickets';\r\n var method = $http.post;\r\n\r\n if($stateParams.id != undefined){\r\n var url = api.url+'/tickets/account_tickets/'+$stateParams.id;\r\n var method = $http.put;\r\n }\r\n\r\n var dfd = $q.defer();\r\n method(url, account_det).then(function(response){\r\n //debugger;\r\n if(response.status == 200){\r\n return dfd.resolve(response.data);\r\n }\r\n\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function autoComplete(query){\r\n\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function getUserViewDetails(id){\r\n\r\n var dfd = $q.defer();\r\n var url = api.url+'/tickets/account_tickets/'+id;\r\n //var dfd = $q.defer();\r\n $http.get(url).then(function(response){\r\n\r\n if(response.status == 200){\r\n return dfd.resolve(response.data);\r\n }\r\n\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSupportObject() {\r\n return {title: \"\", company_name: {}, department_name: \"\", default_bccs: [], default_contact_id: \"\", party_group_ids: \"\", description: \"\", is_magno: false, is_department: false};\r\n }\r\n\r\n function getSupportCompanyObject() {\r\n return {company_name: \"\", portalTheme: \"\", crane_sales_rep: {}, cww_default_bccs: [], csl_default_bccs: [],\r\n cfs_default_bccs: [], cww_primary_contact:{}, csl_primary_contact:{}, cfs_primary_contact:{},\r\n accessTypeStandard: false, accessTypeClassic: false,is_reskin:false,csl_exception_hours:\"00\",csl_exception_minutes:\"00\",\r\n companyEnableCheck: false,portalType: \"\",is_threshold_default:true,\r\n copy_contacts_csl: false, copy_contacts_cfs: false,is_cww:false, is_csl:false, is_cfs:false,\r\n cww_party_id_names: [],cww_related_party_id_names: [],csl_customer_ids: [],cfs_customer_ids: [],\r\n cww_primary_contact_name: {}, cww_primary_contact_phone: \"\",\r\n csl_primary_contact_name: {}, csl_primary_contact_phone: \"\",\r\n cfs_primary_contact_name: {}, cfs_primary_contact_phone: \"\", default_contact_id: \"\", party_group_ids: \"\", is_magno: false};\r\n }\r\n\r\n function getSupportCompanyEditObject(){\r\n return {cww_department_name: \"\", cww_default_bccs: [], cww_default_contact: \"\", cww_party_group_ids: [],\r\n csl_department_name: \"\", csl_default_bccs: [], csl_default_contact: \"\", csl_customer_ids: [],\r\n cww_user_first_name: \"\", cww_user_last_name: \"\", cww_user_email: \"\",\r\n csl_user_first_name: \"\", csl_user_last_name: \"\", csl_user_email: \"\",\r\n cfs_user_first_name: \"\", cfs_user_last_name: \"\", cfs_user_email: \"\",\r\n party_group_ids:[],bccs_cww:[],primary_contact_cww:{},\r\n customer_ids_csl:[],bccs_csl:[],primary_contact_csl:{},\r\n customer_ids_cfs:[],bccs_cfs:[],primary_contact_cfs:{},\r\n classic_role: \"\",portal_role: \"\",financial_customer_type:false,\r\n classic_access: true,cww_customer_type:true,csl_customer_type:false,cfs_customer_type:false,\r\n cfs_department_name: \"\", cfs_default_bccs: [], cfs_default_contact: \"\", cfs_customer_ids: [], is_magno: false};\r\n }\r\n\r\n function getSupportCompanyEditRowObject(){\r\n return {cww_department_name: \"\", cww_default_bccs: [], cww_default_contact: \"\", cww_party_group_ids: [],\r\n csl_department_name: \"\", csl_default_bccs: [], csl_default_contact: \"\", csl_customer_ids: [],\r\n cww_user_first_name: \"\", cww_user_last_name: \"\", cww_user_email: \"\",\r\n csl_user_first_name: \"\", csl_user_last_name: \"\", csl_user_email: \"\",\r\n cfs_user_first_name: \"\", cfs_user_last_name: \"\", cfs_user_email: \"\",\r\n classic_role: \"\",portal_role: \"\",financial_customer_type:false,\r\n classic_access: true,\r\n cfs_department_name: \"\", cfs_default_bccs: [], cfs_default_contact: \"\", cfs_customer_ids: [], is_magno: false};\r\n }\r\n\r\n function uploadFile(file, errFiles){\r\n\r\n return Upload.upload({\r\n url: api.url + '/tickets/account_tickets/import',\r\n method: 'POST',\r\n data: {user_csv: file}\r\n }).then(function (response) {\r\n bulk_users.length = 0;\r\n response.data.map(function(f){\r\n bulk_users.push(f);\r\n });\r\n\r\n return bulk_users;\r\n\r\n });\r\n }\r\n\r\n\r\n function autocompleteCww(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCsl(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCfs(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .directive('customOnChange', function() {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs) {\r\n var onChangeFunc = scope.$eval(attrs.customOnChange);\r\n element.bind('change', onChangeFunc);\r\n }\r\n };\r\n })\r\n .filter('strReplace', function () {\r\n return function (input, from, to) {\r\n input = input || '';\r\n from = from || '';\r\n to = to || '';\r\n return input.replace(new RegExp(from, 'g'), to);\r\n };\r\n })\r\n .controller('SupportRequestsController', SupportRequestsController);\r\n\r\n\r\n SupportRequestsController.$inject = [\"$rootScope\",'CustomResultsSRService', \"$translate\", \"$translatePartialLoader\", \"$window\", \"$scope\", \"$q\", \"$http\", \"api\", \"downloadLink\", \"SupportRequestsService\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', 'UserManagementService', 'mdSelectHelper', '$mdMedia', '$mdDialog', 'UserService','ServerTableSRService','CustomResultsService','DownloadService', '$timeout'];\r\n function SupportRequestsController($rootScope, CustomResultsSRService, $translate, $translatePartialLoader, $window, $scope,$q, $http, api, downloadLink, SupportRequestsService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, UserManagementService, mdSelectHelper, $mdMedia, $mdDialog, UserService, ServerTableSRService, CustomResultsService, DownloadService, $timeout) {\r\n\r\n $translatePartialLoader.addPart('supportrequests');\r\n var vm = this;\r\n\r\n // ----------------------------------------------------\r\n // Support Variables\r\n // ----------------------------------------------------\r\n vm.support = SupportRequestsService.getSupportObject();\r\n vm.supportCompany = SupportRequestsService.getSupportCompanyObject();\r\n vm.supportCompanyEdit = SupportRequestsService.getSupportCompanyEditObject();\r\n vm.supportCompanyEditRow = SupportRequestsService.getSupportCompanyEditRowObject();\r\n vm.user_list = new Object();\r\n vm.user_list.user_accounts = new Array;\r\n vm.user_list.bad_party_ids = [];\r\n vm.user_list.user_accounts.bccs=[];\r\n vm.badPartyIds = [];\r\n vm.user_list.company = {};\r\n vm.user_list.company.access_type = false;\r\n vm.add_user = {};\r\n vm.add_user.departments = [];\r\n vm.add_dept_autocomplete = [];\r\n vm.add_user.bccs_cww = [];\r\n vm.add_user.bccs_csl = [];\r\n vm.add_user.bccs_cfs = [];\r\n vm.add_user.party_group_ids = [];\r\n vm.add_user.customer_ids_csl = [];\r\n vm.add_user.customer_ids_cfs = [];\r\n $rootScope.supportRequestfiltersVisible = false;\r\n\r\n vm.isSave = false;\r\n vm.saveBtnShow = false;\r\n vm.party_check = false;\r\n vm.bcc_check_cww = false;\r\n vm.bcc_check_csl = false;\r\n vm.bcc_check_cfs = false;\r\n vm.nameCheck = true;\r\n vm.partyCheck = true;\r\n vm.partyCheck1 = false;\r\n vm.repCheck = true;\r\n vm.bccCheck = true;\r\n vm.primaryContactCheck = true;\r\n vm.primaryPhoneCheck =true;\r\n vm.isLoading = {save: false, createNew: false, account: false};\r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.currentUser = UserService.getUserData();\r\n vm.possibleContacts = [];\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n vm.departments = [];\r\n vm.companyContactsCww = [];\r\n vm.companyContactsCsl = [];\r\n vm.companyContactsCfs = [];\r\n vm.companyDepartmentsCww = [];\r\n vm.companyDepartmentsCsl = [];\r\n vm.companyDepartmentsCfs = [];\r\n vm.companyUsersCww = [];\r\n vm.companyUsersCsl = [];\r\n vm.companyUsersCfs = [];\r\n vm.count = 0;\r\n vm.count1 = 0;\r\n vm.count2 = 0;\r\n vm.count3 = 0;\r\n vm.support_requests_tab = support_requests_tab;\r\n $rootScope.files = [];\r\n vm.ngTableData = new Object();\r\n vm.ngTableData.state = new Object();\r\n\r\n vm.open_status_count = 0;\r\n vm.in_review_count = 0;\r\n vm.general_support_count = 0;\r\n vm.total_account_tickets = 0;\r\n vm.total_company_tickets = 0;\r\n vm.total_general_tickets = 0;\r\n vm.loadingUserData = false;\r\n\r\n //-----------\r\n // Functions\r\n //-----------\r\n\r\n vm.formIsValid = formIsValid;\r\n vm.closeModal = closeModal;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.openPopup = openPopup;\r\n vm.generalSupport = generalSupport;\r\n vm.addUser = addUser;\r\n vm.addCompany = addCompany;\r\n vm.addUserRow = addUserRow;\r\n vm.addUserRowCsv = addUserRowCsv;\r\n vm.add_department_autocomplete = add_department_autocomplete;\r\n vm.removeUserList = removeUserList;\r\n vm.removeUserListStep2 = removeUserListStep2;\r\n vm.removeDepartmentListStep2 = removeDepartmentListStep2;\r\n vm.removeDepartmentListStep2Csl = removeDepartmentListStep2Csl;\r\n vm.removeDepartmentListStep2Cfs = removeDepartmentListStep2Cfs;\r\n vm.removeUserListStep2Csl = removeUserListStep2Csl;\r\n vm.removeUserListStep2Cfs = removeUserListStep2Cfs;\r\n vm.showValidationToasts = showValidationToasts;\r\n vm.removeCompanyContactListCww = removeCompanyContactListCww;\r\n vm.removeCompanyContactListCsl = removeCompanyContactListCsl;\r\n vm.removeCompanyContactListCfs = removeCompanyContactListCfs;\r\n vm.removeCompanyDepartmentListCww = removeCompanyDepartmentListCww;\r\n vm.removeCompanyDepartmentListCsl = removeCompanyDepartmentListCsl;\r\n vm.removeCompanyDepartmentListCfs = removeCompanyDepartmentListCfs;\r\n vm.removeCompanyUserListCww = removeCompanyUserListCww;\r\n vm.removeCompanyUserListCsl = removeCompanyUserListCsl;\r\n vm.removeCompanyUserListCfs = removeCompanyUserListCfs;\r\n vm.updateUserRow = updateUserRow;\r\n vm.updateUserRowCsl = updateUserRowCsl;\r\n vm.updateUserRowCfs = updateUserRowCfs;\r\n vm.updateUserRowCompanyCww = updateUserRowCompanyCww;\r\n vm.updateUserRowCompanyCsl = updateUserRowCompanyCsl;\r\n vm.updateUserRowCompanyCfs = updateUserRowCompanyCfs;\r\n vm.resetStep1Form = resetStep1Form;\r\n vm.display_overrides = display_overrides;\r\n vm.display_departments = display_departments;\r\n vm.create_new_account = create_new_account;\r\n vm.check_selectAll = check_selectAll;\r\n vm.check_selectAll_csl = check_selectAll_csl;\r\n vm.check_selectAll_cfs = check_selectAll_cfs;\r\n vm.check_selectAllMain = check_selectAllMain;\r\n vm.check_selectAllMain_Csl = check_selectAllMain_Csl;\r\n vm.check_selectAllMain_Cfs = check_selectAllMain_Cfs;\r\n vm.redirectToDashboard = redirectToDashboard;\r\n vm.getUserDetails = getUserDetails;\r\n vm.form_step_number = 1;\r\n vm.next_step = next_step;\r\n vm.company_next_step = company_next_step;\r\n vm.skip_department_step = skip_department_step;\r\n vm.skip_override_step = skip_override_step;\r\n vm.prev_step = prev_step;\r\n vm.edit_prev_step = edit_prev_step;\r\n vm.addUserCompanySelect = addUserCompanySelect;\r\n vm.showImportUserPopup = showImportUserPopup;\r\n vm.showImportUserPopupCompany = showImportUserPopupCompany;\r\n vm.uploadFile = uploadFile;\r\n vm.isSafari = isSafari;\r\n vm.downloadCSVTemplate = downloadCSVTemplate;\r\n vm.isEmailAddress = isEmailAddress;\r\n vm.getMatchesDepartment = getMatchesDepartment;\r\n vm.goBackRequest = goBackRequest;\r\n vm.addGeneralRequestDepartment = addGeneralRequestDepartment;\r\n vm.deaprtmentError = false;\r\n vm.addRequestCompanyContactsCww = addRequestCompanyContactsCww;\r\n vm.addRequestCompanyContactsCsl = addRequestCompanyContactsCsl;\r\n vm.addRequestCompanyContactsCfs = addRequestCompanyContactsCfs;\r\n vm.addRequestCompanyDepartmentsCww = addRequestCompanyDepartmentsCww;\r\n vm.addRequestCompanyDepartmentsCsl = addRequestCompanyDepartmentsCsl;\r\n vm.addRequestCompanyDepartmentsCfs= addRequestCompanyDepartmentsCfs;\r\n vm.addRequestCompanyUsersCww = addRequestCompanyUsersCww;\r\n vm.addRequestCompanyUsersCwwCsv = addRequestCompanyUsersCwwCsv;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.getMatch = getMatch;\r\n vm.clearDepartment = clearDepartment;\r\n vm.clearCompanyContactCww = clearCompanyContactCww;\r\n vm.clearCompanyContactCsl = clearCompanyContactCsl;\r\n vm.clearCompanyContactCfs = clearCompanyContactCfs;\r\n vm.clearCompanyDepartmentCww = clearCompanyDepartmentCww;\r\n vm.clearCompanyDepartmentCsl = clearCompanyDepartmentCsl;\r\n vm.clearCompanyDepartmentCfs = clearCompanyDepartmentCfs;\r\n vm.clearCompanyUserCww = clearCompanyUserCww;\r\n vm.clearCompanyUserCsl = clearCompanyUserCsl;\r\n vm.clearCompanyUserCfs = clearCompanyUserCfs;\r\n vm.clearSupportForm = clearSupportForm;\r\n vm.clearSupportCompanyForm = clearSupportCompanyForm;\r\n vm.removeDepartment = removeDepartment;\r\n vm.submitGeneralRequest = submitGeneralRequest;\r\n vm.getMatchesCompanies = getMatchesCompanies;\r\n vm.selectedCompanyChange = selectedCompanyChange;\r\n vm.changeReskin = changeReskin;\r\n vm.removeFile = removeFile;\r\n vm.uploadFiles = uploadFiles;\r\n vm.removable_attachments = [];\r\n\r\n vm.showExportCSV = showExportCSV;\r\n $rootScope.supportRequestTab = 'company_tickets';\r\n vm.requestTab = localStorage.getItem('supportRequestTabDefault');\r\n $rootScope.viewGeneralRequest = viewGeneralRequest;\r\n $rootScope.viewCompanyRequest = viewCompanyRequest;\r\n $rootScope.downloadlink = downloadLink.url;\r\n $rootScope.editGeneralRequest = editGeneralRequest;\r\n $rootScope.editCompanyRequest = editCompanyRequest;\r\n vm.generalSupportComment = '';\r\n vm.generalsupportComments = [];\r\n vm.supportChatComment = '';\r\n vm.supportChatComments = [];\r\n vm.btnMarkCheck = false;\r\n vm.rejectCheck = false;\r\n vm.editCheckCompanyAdminuser = false;\r\n vm.supportrequestAdminCheck = localStorage.getItem(\"supportrequestAdmin\");\r\n vm.supportrequestUserCheck = localStorage.getItem(\"supportrequestUser\");\r\n vm.editUserListRow = editUserListRow;\r\n vm.editUserListRowCww = editUserListRowCww;\r\n vm.editUserListRowCsl = editUserListRowCsl;\r\n vm.editUserListRowCfs = editUserListRowCfs;\r\n vm.editUserId = 'null';\r\n vm.editUserIdCsl = 'null';\r\n vm.editUserIdCfs = 'null';\r\n vm.completeUserListRow = completeUserListRow;\r\n vm.completeUserListRowStep2 = completeUserListRowStep2;\r\n vm.completeUserListRowStep2Csl = completeUserListRowStep2Csl;\r\n vm.completeUserListRowStep2Cfs = completeUserListRowStep2Cfs;\r\n\r\n vm.support_request_add_user = {};\r\n\r\n //add Company variables\r\n //vm.supportCompany.portalTheme = \"c-view\";\r\n vm.editCompanyDepartmentListCww = editCompanyDepartmentListCww;\r\n vm.editCompanyDepartmentListCsl = editCompanyDepartmentListCsl;\r\n vm.editCompanyDepartmentListCfs = editCompanyDepartmentListCfs;\r\n vm.editCompanyUserListCww = editCompanyUserListCww;\r\n vm.submitEditCompanyDepartmentCww = submitEditCompanyDepartmentCww;\r\n vm.submitEditCompanyDepartmentCsl = submitEditCompanyDepartmentCsl;\r\n vm.submitEditCompanyDepartmentCfs = submitEditCompanyDepartmentCfs;\r\n vm.submitEditCompanyUserCww = submitEditCompanyUserCww;\r\n vm.editCheck = false;\r\n vm.editCheckCww = false;\r\n vm.editCheckCsl = false;\r\n vm.editCheckCfs = false;\r\n vm.editCheckCwwUser = false;\r\n vm.editCheckCslUser = false;\r\n vm.editCheckCfsUser = false;\r\n vm.addBccContactsCww = addBccContactsCww;\r\n vm.addBccContactsCsl = addBccContactsCsl;\r\n vm.addBccContactsCfs = addBccContactsCfs;\r\n vm.companyFormSubmit = companyFormSubmit;\r\n vm.closeErrorDiv = closeErrorDiv;\r\n vm.errorDivCheck = false;\r\n vm.showErrorDiv = false;\r\n vm.company_bad_party_ids = [];\r\n vm.removeDuplicates = removeDuplicates;\r\n vm.viewSupportLog = viewSupportLog;\r\n vm.closeSuportLogDiv = closeSuportLogDiv;\r\n vm.chatSoket = chatSoket;\r\n vm.chatComments = chatComments;\r\n vm.supportRequestLogs = supportRequestLogs;\r\n vm.accessTypeEnableCheck = false;\r\n\r\n\r\n //new request functions\r\n vm.portalChange = portalChange;\r\n vm.accessType = accessType;\r\n vm.getMatchCww = getMatchCww;\r\n vm.getMatchCwwUser = getMatchCwwUser;\r\n vm.getMatchCsl = getMatchCsl;\r\n vm.getMatchCslUser = getMatchCslUser;\r\n vm.getMatchCfs = getMatchCfs;\r\n vm.getMatchCfsUser = getMatchCfsUser;\r\n vm.selectedCwwPArtyIdChange = selectedCwwPArtyIdChange;\r\n vm.idCheck = true;\r\n vm.addPartyIdsCww = addPartyIdsCww;\r\n vm.accessToggle = true;\r\n vm.customerToggle = true;\r\n vm.cww_setup = cww_setup;\r\n vm.csl_setup = csl_setup;\r\n vm.cfs_setup = cfs_setup;\r\n vm.notexistIds = [];\r\n vm.copyContactsCww = copyContactsCww;\r\n vm.copyContactsCfs = copyContactsCfs;\r\n vm.portalChangeEdit = portalChangeEdit;\r\n vm.getEditCompanyDetails = getEditCompanyDetails;\r\n vm.cwwDeparmentChips = cwwDeparmentChips;\r\n vm.cslDeparmentChips = cslDeparmentChips;\r\n vm.cfsDeparmentChips = cfsDeparmentChips;\r\n vm.cwwInvalidIds = cwwInvalidIds;\r\n vm.cslInvalidIds = cslInvalidIds;\r\n vm.cfsInvalidIds = cfsInvalidIds;\r\n vm.thresholdChange = thresholdChange;\r\n vm.csl_threshold_default = csl_threshold_default;\r\n vm.showMinsError = false;\r\n vm.showhrsError = false;\r\n vm.copyOverrides = copyOverrides;\r\n vm.copyOverridesCompany = copyOverridesCompany;\r\n vm.addDepartmentUser = addDepartmentUser;\r\n vm.addDepartmentUserCsl = addDepartmentUserCsl;\r\n vm.addDepartmentUserCfs = addDepartmentUserCfs;\r\n vm.cwwDeparments = [];\r\n vm.cslDeparments = [];\r\n vm.cfsDeparments = [];\r\n\r\n vm.customerClassic = [\r\n {key: \"customer_classic\", display: \"Customer\"},\r\n {key: \"classic_customer_ops\", display: \"Customer Ops\"}\r\n //{key: \"customer_shipper\", display: \"Customer Shipper\"},\r\n //{key: \"customer_consignee\", display: \"Customer Consignee\"}\r\n ];\r\n\r\n vm.queryState = ServerTableSRService.getQueryState();\r\n\r\n vm.customFullscreen = $mdMedia('xs') || $mdMedia('sm');\r\n\r\n vm.validation_user = localStorage.getItem(\"supportrequestValidator\");\r\n vm.cview_classic_admin = localStorage.getItem(\"cview_classic_admin\");\r\n\r\n getCount();\r\n getData(vm.requestTab);\r\n CustomResultsSRService.setNewColumnHeaders(vm.requestTab);\r\n SupportRequestsService.setTicketType(vm.requestTab);\r\n resetStep1Form();\r\n\r\n var state = {\r\n loading: false\r\n }\r\n\r\n // load the Crane Contacts\r\n UserManagementService.getContacts().then(function(data){\r\n data.sort(function(a, b) {\r\n return a.email > b.email ? 1 : -1;\r\n });\r\n vm.possibleContacts = data;\r\n });\r\n\r\n /*vm.user_list.user_accounts = [{\"first_name\":\"a\",\"last_name\":\"a\",\"email\":\"a@g.com\",\"departments\":[],\"primary_contact\":{\"id\":\"\",\"email\":\"\"},\"bccs\":[\"brad.logston@craneww.com\",\"chad.smutny@craneww.com\"],\"party_group_ids\":\"ssss, iiiii\"},{\"first_name\":\"b\",\"last_name\":\"b\",\"email\":\"b@g.com\",\"departments\":[]},{\"first_name\":\"c\",\"last_name\":\"c\",\"email\":\"c@g.com\",\"departments\":[],\"primary_contact\":{\"id\":\"\",\"email\":\"\"},\"bccs\":[\"chad.smutny@craneww.com\"],\"party_group_ids\":\"\"}];*/\r\n\r\n switch ($state.current.name){\r\n\r\n case 'generalSupportRequestPreview' :\r\n if($stateParams.id!=undefined){\r\n vm.supportChatComments = [];\r\n $http.get(api.url +'/tickets/general_tickets/'+$stateParams.id)\r\n .then(function(response){\r\n //// console.log(response.data);\r\n vm.requestId = response.data.ticket.id;\r\n vm.title = response.data.ticket.title;\r\n vm.associateCompany = response.data.ticket.associated_company ? response.data.ticket.associated_company.name : \"\";\r\n vm.description = response.data.ticket.description;\r\n vm.attachments = response.data.ticket.attachments;\r\n if(response.data.ticket.status == 'in_review'){\r\n vm.statusText = 'In Review';\r\n }else{\r\n vm.statusText = response.data.ticket.status;\r\n }\r\n vm.status = response.data.ticket.status;\r\n if(vm.status == 'open'){\r\n vm.btnMark = \"Mark in Review\";\r\n vm.openCheck = false;\r\n }\r\n if(vm.status == 'in_review'){\r\n vm.btnMark = \"Mark as Complete\";\r\n vm.openCheck = true;\r\n }\r\n if(vm.status == 'completed'){\r\n vm.btnMark = \"Completed\";\r\n vm.btnMarkCheck = true;\r\n vm.openCheck = true;\r\n }\r\n return response;\r\n });\r\n\r\n vm.supportRequestLogs('general_tickets');\r\n vm.chatComments('general_tickets');\r\n vm.chatSoket('/general_tickets/');\r\n\r\n // var full_url = document.URL; // Get current url\r\n // var url_array = full_url.split('/') // Split the string into an array with / as separator\r\n // var last_segment = url_array[url_array.length-1]; // Get the last part of the array (-1)\r\n // var faye = new Faye.Client(downloadLink.url+':9292/faye');\r\n // faye.subscribe('/general_tickets/'+last_segment+'/comments/new', function (data) {\r\n // angular.forEach(vm.supportChatComments, function(v,k){\r\n // if(v.newComment== true){\r\n // v.newComment = false;\r\n // }\r\n // });\r\n // var dataComment = JSON.parse(data);\r\n // // console.log(dataComment);\r\n // var uId = localStorage.getItem(\"user_id\");\r\n // var cId = dataComment.comment_by.id;\r\n // if(uId != cId){\r\n // var commentObj = {comment_by:dataComment.comment_by,comment_text:dataComment.comment_text,created_at:dataComment.created_at,id:dataComment.id,newComment:true};\r\n // vm.supportChatComments.unshift(commentObj);\r\n // vm.supportChatComment = '';\r\n // }\r\n\r\n // });\r\n\r\n }\r\n break;\r\n\r\n case 'companySupportRequestPreview' :\r\n vm.newArrayBadpartyIds = [];\r\n if($stateParams.id!=undefined){\r\n vm.isLoading.account = true;\r\n vm.supportChatComments = [];\r\n $http.get(api.url +'/tickets/company_tickets/'+$stateParams.id).then(function(response){\r\n\r\n vm.supportCompany = response.data.ticket;\r\n vm.isLoading.account = false;\r\n\r\n vm.data_validated = vm.supportCompany.data_validated;\r\n vm.users_created = vm.supportCompany.users_created;\r\n\r\n if(vm.supportCompany.users.length > 0){\r\n vm.usersExist = true;\r\n }else{\r\n vm.usersExist = false;\r\n }\r\n\r\n vm.errorCount = ((vm.supportCompany.customer_configurations.cww)?(vm.supportCompany.customer_configurations.cww.invalid_party_id_names.length + vm.supportCompany.customer_configurations.cww.invalid_related_party_id_names.length):0) + ((vm.supportCompany.customer_configurations.csl)?(vm.supportCompany.customer_configurations.csl.invalid_customer_ids.length):0) + ((vm.supportCompany.customer_configurations.cfs)?(vm.supportCompany.customer_configurations.cfs.invalid_customer_ids.length):0);\r\n\r\n\r\n /* CALCULATING DEPARTMENT ERRORS */\r\n\r\n if((vm.supportCompany.access_type.includes('portal'))){\r\n\r\n var bad_dept_array = 0;\r\n\r\n /* CWW */\r\n if(vm.supportCompany.customer_configurations.cww){\r\n\r\n if(vm.supportCompany.customer_configurations.cww.departments && vm.supportCompany.customer_configurations.cww.departments.length > 0){\r\n\r\n angular.forEach(vm.supportCompany.customer_configurations.cww.departments, function(v,k){\r\n bad_dept_array += ((v.invalide_party_or_group_ids)?(v.invalide_party_or_group_ids.length):0);\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n /* CSL */\r\n if(vm.supportCompany.customer_configurations.csl){\r\n\r\n $rootScope.hoursCheck = (vm.supportCompany.customer_configurations.csl.exception_threshold_hours ? vm.supportCompany.customer_configurations.csl.exception_threshold_hours : 0);\r\n $rootScope.minutesCheck = (vm.supportCompany.customer_configurations.csl.exception_threshold_minutes ? vm.supportCompany.customer_configurations.csl.exception_threshold_minutes : 0);\r\n if($rootScope.hoursCheck == 0 && $rootScope.minutesCheck == 0){\r\n vm.supportCompany.is_threshold_default = true;\r\n }else{\r\n vm.supportCompany.is_threshold_default = false;\r\n }\r\n\r\n if(vm.supportCompany.customer_configurations.csl.departments && vm.supportCompany.customer_configurations.csl.departments.length > 0){\r\n\r\n angular.forEach(vm.supportCompany.customer_configurations.csl.departments, function(v,k){\r\n bad_dept_array += ((v.invalide_customer_ids)?(v.invalide_customer_ids.length):0);\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n if(!vm.supportCompany.customer_types.includes('csl')){\r\n vm.supportCompany.is_threshold_default = true;\r\n }\r\n\r\n /* CFS */\r\n if(vm.supportCompany.customer_configurations.cfs){\r\n\r\n if(vm.supportCompany.customer_configurations.cfs.departments && vm.supportCompany.customer_configurations.cfs.departments.length > 0){\r\n\r\n angular.forEach(vm.supportCompany.customer_configurations.cfs.departments, function(v,k){\r\n bad_dept_array += ((v.invalide_customer_ids)?(v.invalide_customer_ids.length):0);\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n vm.errorCount += bad_dept_array;\r\n\r\n }\r\n\r\n\r\n if(vm.errorCount >0){\r\n vm.showErrorDiv = true;\r\n }else{\r\n vm.showErrorDiv = false;\r\n }\r\n\r\n if(vm.supportCompany.status == 'in_review'){\r\n vm.statusText = 'In Review';\r\n }else if(vm.supportCompany.status == 'approved'){\r\n vm.statusText = 'Awaiting Company Creation';\r\n }else if(vm.supportCompany.status== 'awaiting_demo'){\r\n vm.statusText = 'Awaiting Demo';\r\n }else{\r\n vm.statusText = vm.supportCompany.status;\r\n }\r\n\r\n vm.status = vm.supportCompany.status;\r\n vm.requestId = response.data.ticket.id;\r\n\r\n vm.btnMark = vm.status;\r\n\r\n if(vm.status == 'open'){\r\n vm.btnMark = \"Mark in Review\";\r\n vm.openCheck = false;\r\n vm.rejectCheck = true;\r\n }\r\n if(vm.status == 'in_review'){\r\n vm.btnMark = \"Approve\";\r\n vm.openCheck = true;\r\n vm.rejectCheck = false;\r\n }\r\n if(vm.status == 'approved'){\r\n vm.btnMark = \"Create Company\";\r\n vm.btnMarkCheck = false;\r\n vm.editCheckCompanyAdminuser = false;\r\n vm.rejectCheck = true;\r\n vm.openCheck = true;\r\n }\r\n if(vm.status == 'awaiting_demo'){\r\n vm.btnMark = \"Demo Completed\";\r\n vm.btnMarkCheck = false;\r\n vm.editCheckCompanyAdminuser = true;\r\n vm.rejectCheck = true;\r\n vm.openCheck = true;\r\n }\r\n if(vm.status == 'closed'){\r\n vm.editCheckCompanyAdminuser = true;\r\n vm.rejectCheck = true;\r\n vm.btnMarkCheck = true;\r\n vm.openCheck = true;\r\n }\r\n if(vm.status == 'rejected'){\r\n vm.editCheckCompanyAdminuser = true;\r\n vm.rejectCheck = true;\r\n vm.btnMarkCheck = true;\r\n vm.openCheck = true;\r\n }\r\n\r\n return response;\r\n });\r\n\r\n $http.get(api.url +'/tickets/company_tickets/'+$stateParams.id+'/logs')\r\n .then(function(response){\r\n //// console.log(response.data);\r\n vm.requestsupportLogs = response.data.ticket_logs;\r\n return response;\r\n });\r\n\r\n vm.supportRequestLogs('company_tickets');\r\n vm.chatComments('company_tickets');\r\n vm.chatSoket('/company_tickets/');\r\n }\r\n\r\n break;\r\n\r\n case 'generalSupportRequestEdit' :\r\n if($stateParams.id!=undefined){\r\n $http.get(api.url +'/tickets/general_tickets/'+$stateParams.id)\r\n .then(function(response){\r\n //// console.log(response.data);\r\n vm.support.requestId = response.data.ticket.id;\r\n vm.support.title = response.data.ticket.title;\r\n vm.searchText1 = response.data.ticket.associated_company.name;\r\n vm.support.company_name = response.data.ticket.associated_company;\r\n vm.support.description = response.data.ticket.description;\r\n vm.support.attachments = response.data.ticket.attachments;\r\n vm.support.is_department = response.data.ticket.departments_added;\r\n vm.departments = response.data.ticket.departments;\r\n angular.forEach(vm.support.attachments, function(v,k){\r\n var fileName = v.url.substring((v.url.lastIndexOf(\"/\")) + 1);\r\n $rootScope.files.push({name:fileName,type:'savedFile'});\r\n });\r\n vm.count = 0;\r\n angular.forEach(vm.departments, function(v,k){\r\n vm.departments[k].id = vm.count;\r\n vm.count = vm.count + 1;\r\n });\r\n\r\n return response;\r\n });\r\n }\r\n break;\r\n\r\n case 'supportRequestCompanyEdit' :\r\n if($stateParams.id!=undefined){\r\n $http.get(api.url +'/tickets/company_tickets/'+$stateParams.id)\r\n .then(function(response){\r\n //// console.log(response.data);\r\n vm.support.requestId = response.data.ticket.id;\r\n vm.supportCompany.company_name = response.data.ticket.name;\r\n\r\n if(response.data.ticket.access_type.includes('portal')){\r\n vm.supportCompany.companyEnableCheck = true;\r\n vm.supportCompany.accessTypeStandard = true;\r\n vm.accessTypeEnableCheck = true;\r\n }\r\n if(response.data.ticket.access_type.includes('classic')){\r\n vm.supportCompany.accessTypeClassic = true;\r\n vm.accessTypeEnableCheck = true;\r\n vm.supportCompany.companyEnableCheck = true;\r\n }\r\n\r\n if(response.data.ticket.portal_type){\r\n vm.supportCompany.portalType = response.data.ticket.portal_type;\r\n }\r\n\r\n if(response.data.ticket.portal_type){\r\n vm.supportCompany.portalType = response.data.ticket.portal_type;\r\n vm.portalChangeEdit(response.data.ticket.portal_type);\r\n vm.customerTypeEnableCheck = false;\r\n }\r\n\r\n vm.nameCheck = false;\r\n vm.accessTypeEnableCheck = true;\r\n vm.customer_type_cehck = false;\r\n vm.customerTypeEnableCheck = true;\r\n\r\n vm.repCheck = false;\r\n vm.primaryContactCheckCww = false;\r\n vm.primaryContactCheckCsl = false;\r\n vm.primaryContactCheckCfs = false;\r\n\r\n if(response.data.ticket.sales_rep){ vm.supportCompany.crane_sales_rep = response.data.ticket.sales_rep;\r\n vm.searchText2 = response.data.ticket.sales_rep.email; }\r\n else{ vm.supportCompany.crane_sales_rep = {}; }\r\n\r\n vm.getEditCompanyDetails(response);\r\n\r\n return response;\r\n });\r\n }\r\n break;\r\n\r\n case 'supportRequestEditUser':\r\n if($stateParams.id!=undefined){\r\n\r\n vm.getUserDetails($stateParams.id);\r\n\r\n }\r\n break;\r\n }\r\n\r\n $scope.changeGeneralsupportStatus = function(statusVal,id){\r\n if(statusVal == 'open'){\r\n var statusNew = 'in_review';\r\n }\r\n if(statusVal == 'in_review'){\r\n var statusNew = 'completed';\r\n }\r\n var query = {status: statusNew};\r\n $http.put(api.url + \"/tickets/general_tickets/\"+id, query).then(function(response){\r\n if(response.data.ticket.status == 'in_review'){\r\n vm.statusText = 'In Review';\r\n }else{\r\n vm.statusText = response.data.ticket.status;\r\n }\r\n vm.status = response.data.ticket.status;\r\n if(statusVal == 'open'){\r\n vm.btnMark = \"Mark as Complete\";\r\n }\r\n if(statusVal == 'in_review'){\r\n vm.btnMarkCheck = true;\r\n vm.btnMark = \"Completed\";\r\n }\r\n return response.data;\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n\r\n }\r\n\r\n $scope.dataValidateCompanysupportStatus = function(statusVal,id){\r\n\r\n vm.isLoading.account = true;\r\n\r\n var url = api.url + \"/tickets/company_tickets/\"+id;\r\n var query = {};\r\n query[statusVal] = true;\r\n\r\n $http.put(url, query).then(function(response){\r\n\r\n vm.data_validated = response.data.ticket.data_validated;\r\n vm.users_created = response.data.ticket.users_created;\r\n\r\n vm.isLoading.account = false;\r\n\r\n }, function errorCallback(error){\r\n vm.isLoading.account = false;\r\n //return error.data.error_hash.company_errors;\r\n showToastWithFile('create-company.error.html',error.data.error_hash.company_errors);\r\n });\r\n\r\n }\r\n\r\n $scope.changeCompanysupportStatus = function(statusVal,id){\r\n\r\n vm.isLoading.account = true\r\n\r\n var url = api.url + \"/tickets/company_tickets/\"+id+\"/change_status\";\r\n\r\n switch(statusVal) {\r\n\r\n case 'open':\r\n var statusNew = 'review';\r\n break;\r\n\r\n case 'in_review':\r\n var statusNew = 'approve';\r\n break;\r\n\r\n case 'approved':\r\n var url = api.url + \"/tickets/company_tickets/\"+id+\"/create_company\";\r\n var statusNew = 'create_company';\r\n break;\r\n\r\n case 'company_created':\r\n var statusNew = 'awaiting_demo';\r\n break;\r\n\r\n case 'awaiting_demo':\r\n var statusNew = 'close';\r\n break;\r\n\r\n default:\r\n var statusNew = statusVal;\r\n\r\n }\r\n\r\n var query = {status_action: statusNew};\r\n\r\n $http.put(url, query).then(function(response){\r\n\r\n switch(response.data.ticket.status) {\r\n\r\n case 'in_review':\r\n vm.statusText = 'In Review';\r\n var statusNew = 'approve';\r\n break;\r\n\r\n case 'approved':\r\n var url = api.url + \"/tickets/company_tickets/\"+id+\"/create_company\";\r\n vm.statusText = 'Awaiting Company Creation';\r\n var statusNew = 'create_company';\r\n break;\r\n\r\n case 'awaiting_demo':\r\n vm.statusText = 'Awaiting Demo';\r\n break;\r\n\r\n default:\r\n vm.statusText = response.data.ticket.status;\r\n\r\n }\r\n\r\n vm.status = response.data.ticket.status;\r\n\r\n switch(vm.status) {\r\n\r\n case 'open':\r\n vm.btnMark = \"Mark in Review\";\r\n vm.rejectCheck = true;\r\n break;\r\n\r\n case 'in_review':\r\n vm.btnMarkCheck = false;\r\n vm.editCheckCompanyAdminuser = false;\r\n vm.rejectCheck = false;\r\n vm.btnMark = \"Approve\";\r\n break;\r\n\r\n case 'approved':\r\n vm.btnMarkCheck = false;\r\n vm.editCheckCompanyAdminuser = false;\r\n vm.rejectCheck = true;\r\n vm.btnMark = \"Create Company\";\r\n break;\r\n\r\n case 'awaiting_demo':\r\n vm.btnMarkCheck = false;\r\n vm.editCheckCompanyAdminuser = true;\r\n vm.rejectCheck = true;\r\n vm.btnMark = \"Demo Completed\";\r\n break;\r\n\r\n case 'rejected':\r\n vm.editCheckCompanyAdminuser = true;\r\n vm.rejectCheck = true;\r\n vm.btnMarkCheck = true;\r\n vm.openCheck = true;\r\n break;\r\n\r\n case 'closed':\r\n vm.editCheckCompanyAdminuser = true;\r\n vm.rejectCheck = true;\r\n vm.btnMarkCheck = true;\r\n vm.openCheck = true;\r\n break;\r\n\r\n }\r\n\r\n if(vm.status == 'awaiting_demo'){ showToastWithFile('create-company.success.html'); }\r\n\r\n vm.isLoading.account = false;\r\n\r\n vm.data_validated = response.data.ticket.data_validated;\r\n vm.users_created = response.data.ticket.users_created;\r\n\r\n }, function errorCallback(error){\r\n vm.isLoading.account = false;\r\n //return error.data.error_hash.company_errors;\r\n showToastWithFile('create-company.error.html',error.data.error_hash.company_errors);\r\n });\r\n\r\n }\r\n\r\n $scope.deleteGeneralsupportRequest = function(id){\r\n var query = {status: 'deleted'};\r\n $http.put(api.url + \"/tickets/general_tickets/\"+id, query).then(function(response){\r\n showToastWithFile('delete-general-request.success.html');\r\n setTimeout(function(){\r\n $location.path('/supportRequests');\r\n },100);\r\n }, function errorCallback(error){\r\n showToastWithFile('delete-general-request.error.html');\r\n });\r\n\r\n }\r\n\r\n $scope.savesupportChatComment = function(comment,id){\r\n if(comment.length >0){\r\n var url = '';\r\n if($state.current.name == 'generalSupportRequestPreview'){\r\n url = api.url + '/tickets/general_tickets/'+id+'/comments';\r\n }\r\n if($state.current.name == 'companySupportRequestPreview'){\r\n url = api.url + '/tickets/company_tickets/'+id+'/comments';\r\n }\r\n if($state.current.name == 'userAccountPreview'){\r\n url = api.url + '/tickets/account_tickets/'+id+'/comments';\r\n }\r\n var query = {comment_text: comment};\r\n $http.post(url, query).then(function(response){\r\n var commentObj = {comment_by:response.data.comment.comment_by,comment_text:response.data.comment.comment_text,created_at:response.data.comment.created_at,id:response.data.comment.id};\r\n vm.supportChatComments.unshift(commentObj);\r\n vm.supportChatComment = '';\r\n return response.data.comment;\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n }\r\n }\r\n\r\n\r\n $scope.uploadFile = function(event){\r\n $rootScope.$apply(function () {\r\n angular.forEach(event.target.files, function(v,k){\r\n $rootScope.files.push(v);\r\n });\r\n });\r\n $rootScope.files = removeDuplicateFiles($rootScope.files);\r\n // console.log($rootScope.files)\r\n\r\n };\r\n\r\n function removeDuplicateFiles(origArr) {\r\n var newArr = [],\r\n origLen = origArr.length,\r\n found, x, y;\r\n for (x = 0; x < origLen; x++) {\r\n found = undefined;\r\n for (y = 0; y < newArr.length; y++) {\r\n if (origArr[x].name === newArr[y].name) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n newArr.push(origArr[x]);\r\n }\r\n }\r\n return newArr;\r\n }\r\n\r\n function chatComments(urlString){\r\n\r\n $http.get(api.url +'/tickets/'+urlString+'/'+$stateParams.id+'/comments')\r\n .then(function(response){\r\n //// console.log(response.data);\r\n vm.supportChatComments = response.data.comments;\r\n return response;\r\n });\r\n }\r\n\r\n function supportRequestLogs(urlString){\r\n $http.get(api.url +'/tickets/'+urlString+'/'+$stateParams.id+'/logs')\r\n .then(function(response){\r\n //// console.log(response.data);\r\n vm.requestsupportLogs = response.data.ticket_logs;\r\n return response;\r\n });\r\n }\r\n\r\n function chatSoket(urlString){\r\n try {\r\n var full_url = document.URL; // Get current url\r\n var url_array = full_url.split('/') // Split the string into an array with / as separator\r\n var last_segment = url_array[url_array.length-1]; // Get the last part of the array (-1)\r\n var faye = new Faye.Client(downloadLink.url+'/faye/faye');\r\n faye.subscribe(urlString+last_segment+'/comments/new', function (data) {\r\n angular.forEach(vm.supportChatComments, function(v,k){\r\n if(v.newComment== true){\r\n v.newComment = false;\r\n }\r\n });\r\n var dataComment = JSON.parse(data);\r\n // console.log(dataComment);\r\n var uId = localStorage.getItem(\"user_id\");\r\n var cId = dataComment.comment_by.id;\r\n if(uId != cId){\r\n var commentObj = {comment_by:dataComment.comment_by,comment_text:dataComment.comment_text,created_at:dataComment.created_at,id:dataComment.id,newComment:true};\r\n vm.supportChatComments.unshift(commentObj);\r\n vm.supportChatComment = '';\r\n }\r\n\r\n });\r\n } catch(e) {\r\n // console.log(\"Error loading faye.js\");\r\n }\r\n }\r\n\r\n function viewSupportLog(id){\r\n angular.element(document.getElementById('requestLog'+id).style.display='block');\r\n }\r\n\r\n function closeSuportLogDiv(id){\r\n angular.element(document.getElementById('requestLog'+id).style.display='none');\r\n }\r\n\r\n function addBccContactsCww(val){\r\n vm.bcc_check_cww = false;\r\n }\r\n\r\n function addBccContactsCsl(val){\r\n vm.bcc_check_csl = false;\r\n }\r\n\r\n function addBccContactsCfs(val){\r\n vm.bcc_check_cfs = false;\r\n }\r\n\r\n function uploadFiles(event){\r\n // console.log('uploadFiles', event)\r\n }\r\n\r\n function closeErrorDiv(){\r\n vm.errorDivCheck = true;\r\n }\r\n\r\n function removeDuplicates(origArr) {\r\n try{\r\n var newArr = [],\r\n origLen = origArr.length,\r\n found, x, y;\r\n for (x = 0; x < origLen; x++) {\r\n found = undefined;\r\n for (y = 0; y < newArr.length; y++) {\r\n if (origArr[x] === newArr[y]) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n newArr.push(origArr[x].trim());\r\n }\r\n }\r\n return newArr;\r\n }\r\n catch(e){\r\n\r\n }\r\n\r\n }\r\n\r\n function removeFile(filename,index){\r\n angular.forEach($rootScope.files, function(v,k){\r\n if(v.type == 'savedFile' && v.name===filename){\r\n vm.removable_attachments.push(v.name);\r\n }\r\n if(v.name===filename){\r\n $rootScope.files.splice(k,1);\r\n }\r\n });\r\n // Removing element\r\n var myEl = angular.element( document.querySelector( '.savedFile'+index ) );\r\n myEl.remove();\r\n }\r\n\r\n function submitGeneralRequest(id){\r\n\r\n var dataRequest = {};\r\n\r\n dataRequest.title = vm.support.title;\r\n dataRequest.description = vm.support.description;\r\n dataRequest.associated_company = vm.support.company_name;\r\n dataRequest.departments_added = vm.support.is_department;\r\n dataRequest.departments = vm.departments;\r\n dataRequest.removable_attachments = vm.removable_attachments;\r\n\r\n\r\n if(id == undefined){\r\n\r\n $http({\r\n method: 'POST',\r\n url: api.url + \"/tickets/general_tickets\",\r\n headers: { 'Content-Type': undefined },\r\n\r\n transformRequest: function (data) {\r\n var formData = new FormData();\r\n // formData.append(\"model\", angular.toJson(data.model));\r\n if(data.files.length > 0){\r\n for (var i = 0; i < data.files.length; i++) {\r\n if(data.files[i].type != \"savedFile\")\r\n formData.append(\"attachments[]\", data.files[i]);\r\n }\r\n }\r\n formData.append(\"title\", dataRequest.title);\r\n formData.append(\"description\", dataRequest.description);\r\n formData.append(\"associated_company\", angular.toJson(dataRequest.associated_company));\r\n formData.append(\"departments_added\", dataRequest.departments_added);\r\n formData.append(\"departments\", angular.toJson(dataRequest.departments));\r\n return formData;\r\n },\r\n data: { files: $rootScope.files }\r\n }).\r\n success(function (data, status, headers, config) {\r\n localStorage.setItem(\"supportRequestTabDefault\",'general_tickets');\r\n vm.clearDepartment();\r\n vm.clearSupportForm();\r\n showToastWithFile('create-general-request.success.html');\r\n setTimeout(function(){\r\n $location.path('/supportRequests');\r\n //$window.location.href = '/supportRequests';\r\n },100);\r\n }).\r\n error(function (data, status, headers, config) {\r\n vm.clearDepartment();\r\n vm.clearSupportForm();\r\n showToastWithFile('create-general-request.error.html');\r\n setTimeout(function(){\r\n $location.path('/supportRequests');\r\n },100);\r\n });\r\n\r\n }\r\n\r\n if(id){\r\n\r\n $http({\r\n method: 'PUT',\r\n url: api.url + \"/tickets/general_tickets/\"+id,\r\n headers: { 'Content-Type': undefined },\r\n\r\n transformRequest: function (data) {\r\n var formData = new FormData();\r\n // formData.append(\"model\", angular.toJson(data.model));\r\n\r\n if(data.files.length > 0){\r\n for (var i = 0; i < data.files.length; i++) {\r\n if(data.files[i].type != \"savedFile\")\r\n formData.append(\"attachments[]\", data.files[i]);\r\n }\r\n }\r\n formData.append(\"title\", dataRequest.title);\r\n formData.append(\"description\", dataRequest.description);\r\n formData.append(\"associated_company\", angular.toJson(dataRequest.associated_company));\r\n formData.append(\"departments_added\", dataRequest.departments_added);\r\n formData.append(\"departments\", angular.toJson(dataRequest.departments));\r\n formData.append(\"removable_attachments\", angular.toJson(dataRequest.removable_attachments));\r\n return formData;\r\n },\r\n data: { files: $rootScope.files }\r\n }).\r\n success(function (data, status, headers, config) {\r\n localStorage.setItem(\"supportRequestTabDefault\",'general_tickets');\r\n vm.clearDepartment();\r\n vm.clearSupportForm();\r\n showToastWithFile('create-general-request.success.html');\r\n setTimeout(function(){\r\n $location.path('/supportRequests');\r\n },100);\r\n }).\r\n error(function (data, status, headers, config) {\r\n vm.clearDepartment();\r\n vm.clearSupportForm();\r\n showToastWithFile('create-general-request.error.html');\r\n setTimeout(function(){\r\n $location.path('/supportRequests');\r\n },100);\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n function editGeneralRequest(id){\r\n $location.path('/generalSupportRequest/'+id);\r\n }\r\n\r\n function editCompanyRequest(id){\r\n $location.path('/supportRequestCompany/'+id);\r\n }\r\n\r\n function viewGeneralRequest(id){\r\n $location.path('/generalSupportRequestView/'+id);\r\n }\r\n\r\n function viewCompanyRequest(id){\r\n $location.path('/companySupportRequestView/'+id);\r\n }\r\n\r\n function changeReskin(val){\r\n if(val == false){\r\n vm.departments = [];\r\n }\r\n }\r\n\r\n function selectedCompanyChange(item) {\r\n if(item != undefined){\r\n vm.company_id = item.value;\r\n vm.company_name = item.display.replace(/ /g,\"_\");\r\n vm.support.company_name = {id:vm.company_id,name:vm.company_name};\r\n }\r\n // console.log(vm.support.company_name)\r\n }\r\n\r\n\r\n function getMatchesCompanies(key, searchText){\r\n\r\n if(searchText.length!=0){\r\n return SupportRequestsService.autoComplete({field: key, value: searchText});\r\n }\r\n\r\n }\r\n\r\n function getMatchesDepartment(key, searchText, companyId){\r\n //companyId = 447;\r\n if(companyId && searchText.length!=0){\r\n\r\n return SupportRequestsService.autoComplete({field: key, customer_type: 'cww', value: searchText,company_id:companyId});\r\n\r\n }else if((searchText.length != 0) && (companyId == undefined || companyId == '')){\r\n showValidationToasts('validation-doc.html', [\"Select Company to add department\"], 'error');\r\n }\r\n }\r\n\r\n function openPopup(ev,modal){\r\n $scope.supportAdminCheck = vm.supportrequestAdminCheck;\r\n $scope.supportUserCheck = vm.supportrequestUserCheck;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/support-requests/modals/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function support_requests_tab(support_tab_selected){\r\n //ServerTableSRService.support_requests_tab(support_tab_selected);\r\n\r\n $rootScope.$broadcast(\"supportRequestTabChanged\", support_tab_selected);\r\n\r\n getData(support_tab_selected);\r\n\r\n }\r\n\r\n function generalSupport(){\r\n\r\n $location.path('/generalSupportRequest');\r\n $rootScope.files = [];\r\n vm.closeModal();\r\n\r\n }\r\n\r\n function addUser(){\r\n $location.path('/supportRequestAddUser');\r\n //$rootScope.files = [];\r\n vm.closeModal();\r\n }\r\n\r\n\r\n function addCompany(){\r\n $location.path('/supportRequestCompany');\r\n vm.closeModal();\r\n }\r\n\r\n function goBackRequest(){\r\n $rootScope.files = [];\r\n $location.path('/supportRequests');\r\n }\r\n\r\n function clearSupportForm(){\r\n vm.support.title = \"\";\r\n vm.support.description = \"\";\r\n vm.support.company_name = {};\r\n vm.support.files = \"\";\r\n vm.support.is_department = false;\r\n $rootScope.files = [];\r\n vm.departments = [];\r\n $rootScope.searchText1 = '';\r\n }\r\n\r\n function clearSupportCompanyForm(){\r\n vm.supportCompany.company_name = \"\";\r\n vm.supportCompany.crane_sales_rep = {};\r\n vm.supportCompany.default_bccs = [];\r\n vm.supportCompany.party_group_ids = \"\";\r\n //vm.supportCompany.portalTheme = \"c-view\";\r\n vm.supportCompany.primary_contact_name = {};\r\n vm.supportCompany.primary_contact_phone = \"\";\r\n }\r\n\r\n function clearDepartment(){\r\n vm.support.department_name = \"\";\r\n vm.support.default_bccs = [];\r\n vm.support.party_group_ids = \"\";\r\n vm.support.is_magno = false;\r\n vm.support.default_contact = \"\";\r\n vm.deaprtmentError = true;\r\n }\r\n\r\n function clearCompanyContactCww(){\r\n vm.supportCompany.cww_contact_name = \"\";\r\n vm.searchText8 = \"\";\r\n vm.supportCompany.cww_contact_location = \"\";\r\n }\r\n\r\n function clearCompanyContactCsl(){\r\n vm.supportCompany.csl_contact_name = \"\";\r\n vm.searchText9 = \"\";\r\n vm.supportCompany.csl_contact_location = \"\";\r\n }\r\n\r\n function clearCompanyContactCfs(){\r\n vm.supportCompany.cfs_contact_name = \"\";\r\n vm.searchText10 = \"\";\r\n vm.supportCompany.cfs_contact_location = \"\";\r\n }\r\n\r\n function clearCompanyDepartmentCww(){\r\n vm.supportCompanyEdit.cww_department_name = \"\";\r\n vm.supportCompanyEdit.cww_default_bccs = [];\r\n vm.supportCompanyEdit.cww_party_group_ids = [];\r\n vm.supportCompanyEdit.is_magno = false;\r\n vm.supportCompanyEdit.cww_default_contact = \"\";\r\n }\r\n\r\n function clearCompanyDepartmentCsl(){\r\n vm.supportCompanyEdit.csl_department_name = \"\";\r\n vm.supportCompanyEdit.csl_default_bccs = [];\r\n vm.supportCompanyEdit.csl_customer_ids = [];\r\n vm.supportCompanyEdit.csl_default_contact = \"\";\r\n }\r\n\r\n function clearCompanyDepartmentCfs(){\r\n vm.supportCompanyEdit.cfs_department_name = \"\";\r\n vm.supportCompanyEdit.cfs_default_bccs = [];\r\n vm.supportCompanyEdit.cfs_customer_ids = [];\r\n vm.supportCompanyEdit.cfs_default_contact = \"\";\r\n }\r\n\r\n function clearCompanyUserCww(){\r\n vm.supportCompanyEdit.cww_user_first_name = \"\";\r\n vm.supportCompanyEdit.cww_user_last_name = \"\";\r\n vm.supportCompanyEdit.cww_user_email = \"\";\r\n }\r\n\r\n function clearCompanyUserCsl(){\r\n vm.supportCompanyEdit.csl_user_first_name = \"\";\r\n vm.supportCompanyEdit.csl_user_last_name = \"\";\r\n vm.supportCompanyEdit.csl_user_email = \"\";\r\n }\r\n\r\n function clearCompanyUserCfs(){\r\n vm.supportCompanyEdit.cfs_user_first_name = \"\";\r\n vm.supportCompanyEdit.cfs_user_last_name = \"\";\r\n vm.supportCompanyEdit.cfs_user_email = \"\";\r\n }\r\n\r\n function getUserDetails(userId){\r\n\r\n if($stateParams.id){\r\n vm.loadingUserData = true;\r\n SupportRequestsService.getUserViewDetails($stateParams.id).then(function(d){\r\n vm.loadingUserData = false;\r\n vm.user_list = d.account_ticket;\r\n vm.searchUserCompany = vm.user_list.company.name;\r\n\r\n vm.user_list.company.id = vm.user_list.company.id;\r\n vm.user_list.company.name = vm.user_list.company.name;\r\n vm.user_list.company.access_type = vm.user_list.company.access_type;\r\n vm.user_list.company.customer_types = vm.user_list.company.customer_types;\r\n vm.user_list.company.portal_type = vm.user_list.company.portal_type;\r\n\r\n if(vm.user_list.company.department.length > 0){\r\n vm.departmentAccess = true;\r\n angular.forEach(vm.user_list.company.department, function(data,index){\r\n\r\n if(data.customer_type == 'cww'){\r\n vm.cwwDeparments.push(data);\r\n }\r\n if(data.customer_type == 'csl'){\r\n vm.cslDeparments.push(data);\r\n }\r\n if(data.customer_type == 'cfs'){\r\n vm.cfsDeparments.push(data);\r\n }\r\n });\r\n\r\n }else{\r\n vm.departmentAccess = false;\r\n }\r\n\r\n if(vm.user_list.company.customer_types.includes('cww')){\r\n vm.user_list.company.is_cww = true;\r\n }\r\n if(vm.user_list.company.customer_types.includes('csl')){\r\n vm.user_list.company.is_csl = true;\r\n }\r\n if(vm.user_list.company.customer_types.includes('cfs')){\r\n vm.user_list.company.is_cfs = true;\r\n }\r\n\r\n }).catch(function(err) {\r\n vm.loadingUserData = false;\r\n vm.failedToRetrieveData = err.data.error;\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\nfunction addUserRow(form,from_add_btn){\r\n\r\n //if(form.$valid){\r\n if(vm.user_list.company.name){\r\n if(vm.add_user.first_name && vm.add_user.last_name && vm.add_user.email){\r\n\r\n if(vm.isEmailAddress(vm.add_user.email)){\r\n\r\n SupportRequestsService.checkEmailExist(vm.add_user.email).then(function(res){\r\n if(!res.data.is_user_exist){\r\n if(vm.add_user.first_name != undefined && vm.add_user.first_name != \"\"){\r\n\r\n var user_array = new Array();\r\n //var user_array['department'] = [];\r\n\r\n user_array['first_name'] = (vm.add_user.first_name)?vm.add_user.first_name:'' ;\r\n user_array['last_name'] = (vm.add_user.last_name)?vm.add_user.last_name:'' ;\r\n user_array['email'] = (vm.add_user.email)?vm.add_user.email:'' ;\r\n\r\n //user_array['departments'] = {'id':(vm.add_user.departmentsId)?vm.add_user.departmentsId:'','name':(vm.add_user.departmentsName)?vm.add_user.departmentsName:''};\r\n\r\n if(user_array['first_name'] || user_array['last_name'] || user_array['email']){\r\n\r\n //vm.user_list.user_accounts.push(user_array);\r\n\r\n var dept_array = [];\r\n angular.forEach(vm.add_user.departments, function(data,index){\r\n\r\n if(data){\r\n dept_array.push({'id':data.value,'name':data.display});\r\n }\r\n\r\n });\r\n\r\n if(vm.user_list.company.access_type.includes('portal') && !vm.user_list.company.access_type.includes('classic')){\r\n var classic_access = false;\r\n vm.accessToggleUser = true;\r\n\r\n if(vm.user_list.company.customer_types.includes('cww') &&\r\n !vm.user_list.company.customer_types.includes('csl') &&\r\n !vm.user_list.company.customer_types.includes('cfs')){\r\n vm.accessToggleUser = false;\r\n var cww_customer_type = true;\r\n var csl_customer_type = false;\r\n var cfs_customer_type = false;\r\n }\r\n else{\r\n vm.accessToggleUser = true;\r\n cww_customer_type = false;\r\n csl_customer_type = false;\r\n cfs_customer_type = false;\r\n }\r\n }\r\n else if(!vm.user_list.company.access_type.includes('portal') && vm.user_list.company.access_type.includes('classic')){\r\n var classic_access = true;\r\n vm.accessToggleUser = true;\r\n var portal_role = '';\r\n var cww_customer_type = true;\r\n var csl_customer_type = false;\r\n var cfs_customer_type = false;\r\n }\r\n if(vm.user_list.company.access_type.includes('portal') && vm.user_list.company.access_type.includes('classic')){\r\n var classic_access = true;\r\n vm.accessToggleUser = false;\r\n var cww_customer_type = true;\r\n var csl_customer_type = false;\r\n var cfs_customer_type = false;\r\n }\r\n\r\n\r\n if(vm.user_list.company.portal_type == 'customer'){\r\n var portal_role = 'customer_no_financial';\r\n var classic_role = 'customer_classic';\r\n }else if(vm.user_list.company.portal_type == 'consignee'){\r\n portal_role = 'customer_consignee';\r\n classic_role = 'classic_customer_consignee';\r\n }else if(vm.user_list.company.portal_type == 'shipper'){\r\n portal_role = 'customer_shipper';\r\n classic_role = 'classic_customer_shipper';\r\n }\r\n var customer_types = [];\r\n if(cww_customer_type == true){\r\n customer_types.push('cww');\r\n }\r\n if(csl_customer_type == true){\r\n customer_types.push('csl');\r\n }\r\n if(cfs_customer_type == true){\r\n customer_types.push('cfs');\r\n }\r\n\r\n vm.user_list.user_accounts.push({\r\n \"first_name\":(vm.add_user.first_name?vm.add_user.first_name:\"\"),\r\n \"last_name\":(vm.add_user.last_name?vm.add_user.last_name:\"\"),\r\n \"email\":(vm.add_user.email?vm.add_user.email:\"\"),\r\n \"portal_role\": portal_role,\r\n \"classic_role\":classic_role,\r\n \"classic_access\": classic_access,\r\n \"cww_access\": cww_customer_type,\r\n \"csl_access\": csl_customer_type,\r\n \"cfs_access\": cfs_customer_type,\r\n \"financial\": false,\r\n \"customer_types\": customer_types,\r\n \"cww_overrides\":{'primary_contact':{},'bccs':[],'party_group_ids':[],'department':{}},\r\n \"csl_overrides\":{'primary_contact':{},'bccs':[],'customer_ids':[],'department':{}},\r\n \"cfs_overrides\":{'primary_contact':{},'bccs':[],'customer_ids':[],'department':{}}\r\n });\r\n\r\n }\r\n\r\n vm.resetStep1Form();\r\n\r\n user_array = new Object();\r\n\r\n if(from_add_btn){\r\n form.$setPristine();\r\n form.$setUntouched();\r\n }\r\n }\r\n }\r\n else{\r\n showValidationToasts('validation-doc.html', [\"Email Already Exists\"], 'error');\r\n }\r\n }, function errorCallback(error){\r\n\r\n });\r\n }else{\r\n showValidationToasts('validation-doc.html', [\"Please Enter Valid Email\"], 'error');\r\n }\r\n } else{\r\n showValidationToasts('validation-doc.html', [\"First Name, Last name, Valid Email are Mandatory to create users\"], 'error');\r\n }\r\n }else{\r\n showValidationToasts('validation-doc.html', [\"Please Select Any Company\"], 'error');\r\n }\r\n\r\n //}\r\n }\r\n\r\n\r\n function addUserRowCsv(form,from_add_btn){\r\n\r\n //if(form.$valid){\r\n if(vm.user_list.company.name){\r\n if(vm.add_user.first_name && vm.add_user.last_name && vm.add_user.email){\r\n\r\n if(vm.isEmailAddress(vm.add_user.email)){\r\n\r\n var user_array = new Array();\r\n //var user_array['department'] = [];\r\n\r\n user_array['first_name'] = (vm.add_user.first_name)?vm.add_user.first_name:'' ;\r\n user_array['last_name'] = (vm.add_user.last_name)?vm.add_user.last_name:'' ;\r\n user_array['email'] = (vm.add_user.email)?vm.add_user.email:'' ;\r\n\r\n //user_array['departments'] = {'id':(vm.add_user.departmentsId)?vm.add_user.departmentsId:'','name':(vm.add_user.departmentsName)?vm.add_user.departmentsName:''};\r\n\r\n if(user_array['first_name'] || user_array['last_name'] || user_array['email']){\r\n\r\n //vm.user_list.user_accounts.push(user_array);\r\n\r\n var dept_array = [];\r\n angular.forEach(vm.add_user.departments, function(data,index){\r\n\r\n if(data){\r\n dept_array.push({'id':data.value,'name':data.display});\r\n }\r\n\r\n });\r\n\r\n if(vm.user_list.company.access_type.includes('portal') && !vm.user_list.company.access_type.includes('classic')){\r\n var classic_access = false;\r\n vm.accessToggleUser = true;\r\n\r\n if(vm.user_list.company.customer_types.includes('cww') &&\r\n !vm.user_list.company.customer_types.includes('csl') &&\r\n !vm.user_list.company.customer_types.includes('cfs')){\r\n vm.accessToggleUser = false;\r\n var cww_customer_type = true;\r\n var csl_customer_type = false;\r\n var cfs_customer_type = false;\r\n }\r\n else{\r\n vm.accessToggleUser = true;\r\n cww_customer_type = false;\r\n csl_customer_type = false;\r\n cfs_customer_type = false;\r\n }\r\n }\r\n else if(!vm.user_list.company.access_type.includes('portal') && vm.user_list.company.access_type.includes('classic')){\r\n var classic_access = true;\r\n vm.accessToggleUser = true;\r\n var portal_role = '';\r\n var cww_customer_type = true;\r\n var csl_customer_type = false;\r\n var cfs_customer_type = false;\r\n }\r\n if(vm.user_list.company.access_type.includes('portal') && vm.user_list.company.access_type.includes('classic')){\r\n var classic_access = true;\r\n vm.accessToggleUser = false;\r\n var cww_customer_type = true;\r\n var csl_customer_type = false;\r\n var cfs_customer_type = false;\r\n }\r\n\r\n\r\n if(vm.user_list.company.portal_type == 'customer'){\r\n var portal_role = 'customer_no_financial';\r\n var classic_role = 'customer_classic';\r\n }else if(vm.user_list.company.portal_type == 'consignee'){\r\n portal_role = 'customer_consignee';\r\n classic_role = 'classic_customer_consignee';\r\n }else if(vm.user_list.company.portal_type == 'shipper'){\r\n portal_role = 'customer_shipper';\r\n classic_role = 'classic_customer_shipper';\r\n }\r\n var customer_types = [];\r\n if(cww_customer_type == true){\r\n customer_types.push('cww');\r\n }\r\n if(csl_customer_type == true){\r\n customer_types.push('csl');\r\n }\r\n if(cfs_customer_type == true){\r\n customer_types.push('cfs');\r\n }\r\n\r\n vm.user_list.user_accounts.push({\r\n \"first_name\":(vm.add_user.first_name?vm.add_user.first_name:\"\"),\r\n \"last_name\":(vm.add_user.last_name?vm.add_user.last_name:\"\"),\r\n \"email\":(vm.add_user.email?vm.add_user.email:\"\"),\r\n \"portal_role\": portal_role,\r\n \"classic_role\":classic_role,\r\n \"classic_access\": classic_access,\r\n \"cww_access\": cww_customer_type,\r\n \"csl_access\": csl_customer_type,\r\n \"cfs_access\": cfs_customer_type,\r\n \"financial\": false,\r\n \"customer_types\": customer_types,\r\n \"cww_overrides\":{'primary_contact':{},'bccs':[],'party_group_ids':[],'department':{}},\r\n \"csl_overrides\":{'primary_contact':{},'bccs':[],'customer_ids':[],'department':{}},\r\n \"cfs_overrides\":{'primary_contact':{},'bccs':[],'customer_ids':[],'department':{}}\r\n });\r\n\r\n }\r\n\r\n vm.resetStep1Form();\r\n\r\n user_array = new Object();\r\n\r\n if(from_add_btn){\r\n form.$setPristine();\r\n form.$setUntouched();\r\n }\r\n }else{\r\n showValidationToasts('validation-doc.html', [\"Please Enter Valid Email\"], 'error');\r\n }\r\n } else{\r\n showValidationToasts('validation-doc.html', [\"First Name, Last name, Valid Email are Mandatory to create users\"], 'error');\r\n }\r\n }else{\r\n showValidationToasts('validation-doc.html', [\"Please Select Any Company\"], 'error');\r\n }\r\n\r\n //}\r\n }\r\n\r\n function add_department_autocomplete(array_values){\r\n\r\n //vm.add_user.departments = [];\r\n\r\n var dept_new_array = [];\r\n\r\n vm.add_dept_autocomplete = angular.forEach(vm.add_dept_autocomplete, function(data,index){\r\n\r\n if(data.value){\r\n vm.add_user.departments.push(data);\r\n dept_new_array[index] = data.display;\r\n }else{\r\n dept_new_array[index] = data;\r\n }\r\n\r\n });\r\n\r\n vm.add_dept_autocomplete = angular.copy(dept_new_array);\r\n\r\n\r\n angular.forEach(vm.add_user.departments, function(data,index){\r\n\r\n if(dept_new_array.indexOf(data.display) != -1){\r\n\r\n }else{\r\n //delete vm.add_user.departments[index];\r\n vm.add_user.departments.splice(index,1);\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n function addDepartmentUser(index,did){\r\n angular.forEach(vm.cwwDeparments,function(department,key){\r\n if(department.id == did){\r\n vm.user_list.user_accounts[index].cww_overrides.department = department;\r\n vm.user_list.user_accounts[index].cww_overrides.department.department_id = did;\r\n vm.user_list.user_accounts[index].cww_overrides.department.party_id_names_combined = removeDuplicates((department.party_id_names).concat(department.related_party_id_names));\r\n }\r\n });\r\n }\r\n\r\n function addDepartmentUserCsl(index,did){\r\n angular.forEach(vm.cslDeparments,function(department,key){\r\n if(department.id == did){\r\n vm.user_list.user_accounts[index].csl_overrides.department = department;\r\n vm.user_list.user_accounts[index].csl_overrides.department.department_id = did;\r\n }\r\n });\r\n }\r\n\r\n function addDepartmentUserCfs(index,did){\r\n angular.forEach(vm.cfsDeparments,function(department,key){\r\n if(department.id == did){\r\n vm.user_list.user_accounts[index].cfs_overrides.department = department;\r\n vm.user_list.user_accounts[index].cfs_overrides.department.department_id = did;\r\n }\r\n });\r\n }\r\n\r\n function updateUserRow(){\r\n\r\n angular.forEach(vm.user_list.user_accounts, function(data,index){\r\n if(!data.cww_access)\r\n return\r\n if(document.getElementById('step2Select'+index).checked){\r\n\r\n if(vm.add_user.primary_contact_cww.id){\r\n\r\n data['cww_overrides']['primary_contact'] = {'id':(vm.add_user.primary_contact_cww.id)?\r\n vm.add_user.primary_contact_cww.id:'',\r\n 'email':(vm.add_user.primary_contact_cww.email)?vm.add_user.primary_contact_cww.email:''};\r\n }else{\r\n data['cww_overrides']['primary_contact'] = {'id':(data['cww_overrides']['primary_contact'].id)?\r\n data['cww_overrides']['primary_contact'].id:'',\r\n 'email':(data['cww_overrides']['primary_contact'].email)?data['cww_overrides']['primary_contact'].email:''};\r\n }\r\n\r\n if((data['cww_overrides']['bccs'] != undefined) && (data['cww_overrides']['bccs'] != '')){\r\n\r\n var c = data['cww_overrides']['bccs'].concat(vm.add_user.bccs_cww.filter(function (item) {\r\n return data['cww_overrides']['bccs'].indexOf(item) < 0;\r\n }));\r\n\r\n data['cww_overrides']['bccs'] = c;\r\n }else{\r\n data['cww_overrides']['bccs'] = angular.copy(vm.add_user.bccs_cww);\r\n }\r\n\r\n if((data['cww_overrides']['party_group_ids'] != undefined) && (data['cww_overrides']['party_group_ids'] != '')){\r\n\r\n var d = data['cww_overrides']['party_group_ids'].concat(vm.add_user.party_group_ids.filter(function (item) {\r\n return data['cww_overrides']['party_group_ids'].indexOf(item) < 0;\r\n }));\r\n\r\n data['cww_overrides']['party_group_ids'] = d;\r\n }else{\r\n data['cww_overrides']['party_group_ids'] = angular.copy(vm.add_user.party_group_ids);\r\n }\r\n\r\n document.getElementById('step2Select'+index).checked = false;\r\n\r\n }\r\n\r\n });\r\n\r\n document.getElementById('userOverrideCheckbox').checked = false;\r\n\r\n vm.add_user.bccs_cww = [];\r\n vm.add_user.primary_contact_cww = [];\r\n vm.add_user.party_group_ids = [];\r\n\r\n }\r\n\r\n\r\n function updateUserRowCompanyCww(){\r\n\r\n angular.forEach(vm.companyUsersCww, function(data,index){\r\n if(!data.cww_access)\r\n return\r\n if(document.getElementById('step2Select'+index).checked){\r\n if(vm.supportCompanyEdit.primary_contact_cww.id){\r\n\r\n data['cww_overrides']['primary_contact'] = {'id':(vm.supportCompanyEdit.primary_contact_cww.id)?\r\n vm.supportCompanyEdit.primary_contact_cww.id:'',\r\n 'email':(vm.supportCompanyEdit.primary_contact_cww.email)?vm.supportCompanyEdit.primary_contact_cww.email:''};\r\n }else{\r\n data['cww_overrides']['primary_contact'] = {'id':(data['cww_overrides']['primary_contact'].id)?\r\n data['cww_overrides']['primary_contact'].id:'',\r\n 'email':(data['cww_overrides']['primary_contact'].email)?data['cww_overrides']['primary_contact'].email:''};\r\n }\r\n\r\n\r\n if((data['cww_overrides']['bccs'] != undefined) && (data['cww_overrides']['bccs'] != '')){\r\n\r\n var c = data['cww_overrides']['bccs'].concat(vm.supportCompanyEdit.bccs_cww.filter(function (item) {\r\n return data['cww_overrides']['bccs'].indexOf(item) < 0;\r\n }));\r\n\r\n data['cww_overrides']['bccs'] = c;\r\n }else{\r\n data['cww_overrides']['bccs'] = angular.copy(vm.supportCompanyEdit.bccs_cww);\r\n }\r\n\r\n\r\n if((data['cww_overrides']['party_group_ids'] != undefined) && (data['cww_overrides']['party_group_ids'] != '')){\r\n\r\n var d = data['cww_overrides']['party_group_ids'].concat(vm.supportCompanyEdit.party_group_ids.filter(function (item) {\r\n return data['cww_overrides']['party_group_ids'].indexOf(item) < 0;\r\n }));\r\n\r\n data['cww_overrides']['party_group_ids'] = d;\r\n }else{\r\n data['cww_overrides']['party_group_ids'] = angular.copy(vm.supportCompanyEdit.party_group_ids);\r\n }\r\n\r\n document.getElementById('step2Select'+index).checked = false;\r\n\r\n }\r\n\r\n });\r\n\r\n document.getElementById('userOverrideCheckbox').checked = false;\r\n\r\n vm.supportCompanyEdit.bccs_cww = [];\r\n vm.supportCompanyEdit.primary_contact_cww = [];\r\n vm.supportCompanyEdit.party_group_ids = [];\r\n\r\n }\r\n\r\n function updateUserRowCompanyCsl(){\r\n\r\n angular.forEach(vm.companyUsersCww, function(data,index){\r\n if(!data.csl_access)\r\n return\r\n if(document.getElementById('step3Select'+index).checked){\r\n\r\n if(vm.supportCompanyEdit.primary_contact_csl.id){\r\n\r\n data['csl_overrides']['primary_contact'] = {'id':(vm.supportCompanyEdit.primary_contact_csl.id)?\r\n vm.supportCompanyEdit.primary_contact_csl.id:'',\r\n 'email':(vm.supportCompanyEdit.primary_contact_csl.email)?vm.supportCompanyEdit.primary_contact_csl.email:''};\r\n }else{\r\n data['csl_overrides']['primary_contact'] = {'id':(data['csl_overrides']['primary_contact'].id)?\r\n data['csl_overrides']['primary_contact'].id:'',\r\n 'email':(data['csl_overrides']['primary_contact'].email)?data['csl_overrides']['primary_contact'].email:''};\r\n }\r\n\r\n if((data['csl_overrides']['bccs'] != undefined) && (data['csl_overrides']['bccs'] != '')){\r\n\r\n var c = data['csl_overrides']['bccs'].concat(vm.supportCompanyEdit.bccs_csl.filter(function (item) {\r\n return data['csl_overrides']['bccs'].indexOf(item) < 0;\r\n }));\r\n\r\n data['csl_overrides']['bccs'] = c;\r\n }else{\r\n data['csl_overrides']['bccs'] = angular.copy(vm.supportCompanyEdit.bccs_csl);\r\n }\r\n\r\n if((data['csl_overrides']['customer_ids'] != undefined) && (data['csl_overrides']['customer_ids'] != '')){\r\n\r\n var d = data['csl_overrides']['customer_ids'].concat(vm.supportCompanyEdit.customer_ids_csl.filter(function (item) {\r\n return data['csl_overrides']['customer_ids'].indexOf(item) < 0;\r\n }));\r\n\r\n data['csl_overrides']['customer_ids'] = d;\r\n }else{\r\n data['csl_overrides']['customer_ids'] = angular.copy(vm.supportCompanyEdit.customer_ids_csl);\r\n }\r\n\r\n document.getElementById('step3Select'+index).checked = false;\r\n\r\n }\r\n\r\n });\r\n\r\n document.getElementById('userOverrideCheckboxCsl').checked = false;\r\n\r\n vm.supportCompanyEdit.bccs_csl = [];\r\n vm.supportCompanyEdit.primary_contact_csl = [];\r\n vm.supportCompanyEdit.customer_ids_csl = [];\r\n }\r\n\r\n function updateUserRowCompanyCfs(){\r\n\r\n angular.forEach(vm.companyUsersCww, function(data,index){\r\n if(!data.cfs_access)\r\n return\r\n if(document.getElementById('step4Select'+index).checked){\r\n\r\n if(vm.supportCompanyEdit.primary_contact_cfs.id){\r\n\r\n data['cfs_overrides']['primary_contact'] = {'id':(vm.supportCompanyEdit.primary_contact_cfs.id)?\r\n vm.supportCompanyEdit.primary_contact_cfs.id:'',\r\n 'email':(vm.supportCompanyEdit.primary_contact_cfs.email)?vm.supportCompanyEdit.primary_contact_cfs.email:''};\r\n }else{\r\n data['cfs_overrides']['primary_contact'] = {'id':(data['cfs_overrides']['primary_contact'].id)?\r\n data['cfs_overrides']['primary_contact'].id:'',\r\n 'email':(data['cfs_overrides']['primary_contact'].email)?data['cfs_overrides']['primary_contact'].email:''};\r\n }\r\n\r\n if((data['cfs_overrides']['bccs'] != undefined) && (data['cfs_overrides']['bccs'] != '')){\r\n\r\n var c = data['cfs_overrides']['bccs'].concat(vm.supportCompanyEdit.bccs_cfs.filter(function (item) {\r\n return data['cfs_overrides']['bccs'].indexOf(item) < 0;\r\n }));\r\n\r\n data['cfs_overrides']['bccs'] = c;\r\n }else{\r\n data['cfs_overrides']['bccs'] = angular.copy(vm.supportCompanyEdit.bccs_cfs);\r\n }\r\n\r\n if((data['cfs_overrides']['customer_ids'] != undefined) && (data['cfs_overrides']['customer_ids'] != '')){\r\n\r\n var d = data['cfs_overrides']['customer_ids'].concat(vm.supportCompanyEdit.customer_ids_cfs.filter(function (item) {\r\n return data['cfs_overrides']['customer_ids'].indexOf(item) < 0;\r\n }));\r\n\r\n data['cfs_overrides']['customer_ids'] = d;\r\n }else{\r\n data['cfs_overrides']['customer_ids'] = angular.copy(vm.supportCompanyEdit.customer_ids_cfs);\r\n }\r\n\r\n document.getElementById('step4Select'+index).checked = false;\r\n\r\n }\r\n\r\n });\r\n\r\n document.getElementById('userOverrideCheckboxCfs').checked = false;\r\n\r\n vm.supportCompanyEdit.bccs_cfs = [];\r\n vm.supportCompanyEdit.primary_contact_cfs = [];\r\n vm.supportCompanyEdit.customer_ids_cfs = [];\r\n\r\n\r\n }\r\n\r\n function updateUserRowCsl(){\r\n\r\n angular.forEach(vm.user_list.user_accounts, function(data,index){\r\n if(!data.csl_access)\r\n return\r\n if(document.getElementById('step3Select'+index).checked){\r\n\r\n if(vm.add_user.primary_contact_csl.id){\r\n\r\n data['csl_overrides']['primary_contact'] = {'id':(vm.add_user.primary_contact_csl.id)?\r\n vm.add_user.primary_contact_csl.id:'',\r\n 'email':(vm.add_user.primary_contact_csl.email)?vm.add_user.primary_contact_csl.email:''};\r\n }else{\r\n data['csl_overrides']['primary_contact'] = {'id':(data['csl_overrides']['primary_contact'].id)?\r\n data['csl_overrides']['primary_contact'].id:'',\r\n 'email':(data['csl_overrides']['primary_contact'].email)?data['csl_overrides']['primary_contact'].email:''};\r\n }\r\n\r\n if((data['csl_overrides']['bccs'] != undefined) && (data['csl_overrides']['bccs'] != '')){\r\n\r\n var c = data['csl_overrides']['bccs'].concat(vm.add_user.bccs_csl.filter(function (item) {\r\n return data['csl_overrides']['bccs'].indexOf(item) < 0;\r\n }));\r\n\r\n data['csl_overrides']['bccs'] = c;\r\n }else{\r\n data['csl_overrides']['bccs'] = angular.copy(vm.add_user.bccs_csl);\r\n }\r\n\r\n if((data['csl_overrides']['customer_ids'] != undefined) && (data['csl_overrides']['customer_ids'] != '')){\r\n\r\n var d = data['csl_overrides']['customer_ids'].concat(vm.add_user.customer_ids_csl.filter(function (item) {\r\n return data['csl_overrides']['customer_ids'].indexOf(item) < 0;\r\n }));\r\n\r\n data['csl_overrides']['customer_ids'] = d;\r\n }else{\r\n data['csl_overrides']['customer_ids'] = angular.copy(vm.add_user.customer_ids_csl);\r\n }\r\n\r\n document.getElementById('step3Select'+index).checked = false;\r\n\r\n }\r\n\r\n });\r\n\r\n document.getElementById('userOverrideCheckboxCsl').checked = false;\r\n\r\n vm.add_user.bccs_csl = [];\r\n vm.add_user.primary_contact_csl = [];\r\n vm.add_user.customer_ids_csl = [];\r\n\r\n }\r\n\r\n function updateUserRowCfs(){\r\n\r\n angular.forEach(vm.user_list.user_accounts, function(data,index){\r\n if(!data.cfs_access)\r\n return\r\n if(document.getElementById('step4Select'+index).checked){\r\n\r\n if(vm.add_user.primary_contact_cfs.id){\r\n\r\n data['cfs_overrides']['primary_contact'] = {'id':(vm.add_user.primary_contact_cfs.id)?\r\n vm.add_user.primary_contact_cfs.id:'',\r\n 'email':(vm.add_user.primary_contact_cfs.email)?vm.add_user.primary_contact_cfs.email:''};\r\n }else{\r\n data['cfs_overrides']['primary_contact'] = {'id':(data['cfs_overrides']['primary_contact'].id)?\r\n data['cfs_overrides']['primary_contact'].id:'',\r\n 'email':(data['cfs_overrides']['primary_contact'].email)?data['cfs_overrides']['primary_contact'].email:''};\r\n }\r\n\r\n if((data['cfs_overrides']['bccs'] != undefined) && (data['cfs_overrides']['bccs'] != '')){\r\n\r\n var c = data['cfs_overrides']['bccs'].concat(vm.add_user.bccs_cfs.filter(function (item) {\r\n return data['cfs_overrides']['bccs'].indexOf(item) < 0;\r\n }));\r\n\r\n data['cfs_overrides']['bccs'] = c;\r\n }else{\r\n data['cfs_overrides']['bccs'] = angular.copy(vm.add_user.bccs_cfs);\r\n }\r\n\r\n if((data['cfs_overrides']['customer_ids'] != undefined) && (data['cfs_overrides']['customer_ids'] != '')){\r\n\r\n var d = data['cfs_overrides']['customer_ids'].concat(vm.add_user.customer_ids_cfs.filter(function (item) {\r\n return data['cfs_overrides']['customer_ids'].indexOf(item) < 0;\r\n }));\r\n\r\n data['cfs_overrides']['customer_ids'] = d;\r\n }else{\r\n data['cfs_overrides']['customer_ids'] = angular.copy(vm.add_user.customer_ids_cfs);\r\n }\r\n\r\n document.getElementById('step4Select'+index).checked = false;\r\n\r\n }\r\n\r\n });\r\n\r\n document.getElementById('userOverrideCheckboxCfs').checked = false;\r\n\r\n vm.add_user.bccs_cfs = [];\r\n vm.add_user.primary_contact_cfs = [];\r\n vm.add_user.customer_ids_cfs = [];\r\n\r\n }\r\n\r\n function isEmailAddress(str) {\r\n var pattern =/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/;\r\n return pattern.test(str); // returns a boolean\r\n }\r\n\r\n function removeUserList(userRemoveId){\r\n vm.user_list.user_accounts.splice(userRemoveId,1);\r\n }\r\n\r\n function removeUserListStep2(userRemoveId,type){\r\n\r\n if(type == 'company'){\r\n vm.companyUsersCww[userRemoveId].cww_overrides.primary_contact = {};\r\n vm.companyUsersCww[userRemoveId].cww_overrides.bccs = [];\r\n vm.companyUsersCww[userRemoveId].cww_overrides.party_group_ids = [];\r\n }else{\r\n vm.user_list.user_accounts[userRemoveId].cww_overrides.primary_contact = {};\r\n vm.user_list.user_accounts[userRemoveId].cww_overrides.bccs = [];\r\n vm.user_list.user_accounts[userRemoveId].cww_overrides.party_group_ids = [];\r\n }\r\n }\r\n\r\n function removeDepartmentListStep2(userRemoveId){\r\n vm.user_list.user_accounts[userRemoveId].cww_overrides.department = {};\r\n vm.user_list.user_accounts[userRemoveId].cww_overrides.department_id = '';\r\n vm.editUserId = 'null';\r\n }\r\n\r\n function removeDepartmentListStep2Csl(userRemoveId){\r\n vm.user_list.user_accounts[userRemoveId].csl_overrides.department = {};\r\n vm.user_list.user_accounts[userRemoveId].csl_overrides.department_id = '';\r\n vm.editUserIdCsl = 'null';\r\n }\r\n\r\n function removeDepartmentListStep2Cfs(userRemoveId){\r\n vm.user_list.user_accounts[userRemoveId].cfs_overrides.department = {};\r\n vm.user_list.user_accounts[userRemoveId].cfs_overrides.department_id = '';\r\n vm.editUserIdCfs = 'null';\r\n }\r\n\r\n function removeUserListStep2Csl(userRemoveId,type){\r\n if(type == 'company'){\r\n vm.companyUsersCww[userRemoveId].csl_overrides.primary_contact = {};\r\n vm.companyUsersCww[userRemoveId].csl_overrides.bccs = [];\r\n vm.companyUsersCww[userRemoveId].csl_overrides.customer_ids = [];\r\n }else{\r\n vm.user_list.user_accounts[userRemoveId].csl_overrides.primary_contact = {};\r\n vm.user_list.user_accounts[userRemoveId].csl_overrides.bccs = [];\r\n vm.user_list.user_accounts[userRemoveId].csl_overrides.customer_ids = [];\r\n }\r\n }\r\n\r\n function removeUserListStep2Cfs(userRemoveId,type){\r\n if(type == 'company'){\r\n vm.companyUsersCww[userRemoveId].csl_overrides.primary_contact = {};\r\n vm.companyUsersCww[userRemoveId].csl_overrides.bccs = [];\r\n vm.companyUsersCww[userRemoveId].csl_overrides.customer_ids = [];\r\n }else{\r\n vm.user_list.user_accounts[userRemoveId].csl_overrides.primary_contact = {};\r\n vm.user_list.user_accounts[userRemoveId].csl_overrides.bccs = [];\r\n vm.user_list.user_accounts[userRemoveId].csl_overrides.customer_ids = [];\r\n }\r\n }\r\n\r\n function copyOverrides(editId,is_csl,is_cfs){\r\n if(is_csl && (document.getElementById('step6Select'+editId).checked)){\r\n vm.user_list.user_accounts[editId].csl_overrides.primary_contact = vm.user_list.user_accounts[editId].cww_overrides.primary_contact;\r\n vm.user_list.user_accounts[editId].csl_overrides.bccs = vm.user_list.user_accounts[editId].cww_overrides.bccs;\r\n }\r\n if(is_cfs && (document.getElementById('step6Select'+editId).checked)){\r\n vm.user_list.user_accounts[editId].cfs_overrides.primary_contact = vm.user_list.user_accounts[editId].cww_overrides.primary_contact;\r\n vm.user_list.user_accounts[editId].cfs_overrides.bccs = vm.user_list.user_accounts[editId].cww_overrides.bccs;\r\n }\r\n\r\n if(is_csl && !(document.getElementById('step6Select'+editId).checked)){\r\n vm.user_list.user_accounts[editId].csl_overrides.primary_contact = {};\r\n vm.user_list.user_accounts[editId].csl_overrides.bccs = [];\r\n }\r\n if(is_cfs && !(document.getElementById('step6Select'+editId).checked)){\r\n vm.user_list.user_accounts[editId].cfs_overrides.primary_contact = {};\r\n vm.user_list.user_accounts[editId].cfs_overrides.bccs = [];\r\n }\r\n }\r\n\r\n function copyOverridesCompany(editId,is_csl,is_cfs){\r\n if(is_csl && (document.getElementById('step5Select'+editId).checked)){\r\n vm.companyUsersCww[editId].csl_overrides.primary_contact = vm.companyUsersCww[editId].cww_overrides.primary_contact;\r\n vm.companyUsersCww[editId].csl_overrides.bccs = vm.companyUsersCww[editId].cww_overrides.bccs;\r\n }\r\n if(is_cfs && (document.getElementById('step5Select'+editId).checked)){\r\n vm.companyUsersCww[editId].cfs_overrides.primary_contact = vm.companyUsersCww[editId].cww_overrides.primary_contact;\r\n vm.companyUsersCww[editId].cfs_overrides.bccs = vm.companyUsersCww[editId].cww_overrides.bccs;\r\n }\r\n\r\n if(is_csl && !(document.getElementById('step5Select'+editId).checked)){\r\n vm.companyUsersCww[editId].csl_overrides.primary_contact = {};\r\n vm.companyUsersCww[editId].csl_overrides.bccs = [];\r\n }\r\n if(is_cfs && !(document.getElementById('step5Select'+editId).checked)){\r\n vm.companyUsersCww[editId].cfs_overrides.primary_contact = {};\r\n vm.companyUsersCww[editId].cfs_overrides.bccs = [];\r\n }\r\n }\r\n\r\n function editUserListRow(editId){\r\n vm.editUserId = editId;\r\n }\r\n\r\n function editUserListRowCww(editId){\r\n vm.editUserIdCww = editId;\r\n }\r\n\r\n function editUserListRowCsl(editId){\r\n vm.editUserIdCsl = editId;\r\n }\r\n\r\n function editUserListRowCfs(editId){\r\n vm.editUserIdCfs = editId;\r\n }\r\n\r\n function completeUserListRow(editId){\r\n\r\n //vm.user_list.user_accounts[editId].\r\n\r\n var customer_types = [];\r\n if(vm.user_list.user_accounts[editId].cww_access == true){\r\n customer_types.push('cww');\r\n }\r\n if(vm.user_list.user_accounts[editId].csl_access == true){\r\n customer_types.push('csl');\r\n }\r\n if(vm.user_list.user_accounts[editId].cfs_access == true){\r\n customer_types.push('cfs');\r\n }\r\n vm.user_list.user_accounts[editId].customer_types = customer_types;\r\n\r\n vm.editUserId = 'null';\r\n }\r\n\r\n function completeUserListRowStep2(editId,type){\r\n if(type == 'company'){\r\n angular.forEach(vm.possibleContacts, function(v,k){\r\n if(v.id===vm.companyUsersCww[editId].cww_overrides.primary_contact.id){\r\n vm.companyUsersCww[editId].cww_overrides.primary_contact.email = v.email;\r\n }\r\n });\r\n\r\n vm.editUserIdCww = 'null';\r\n\r\n }else{\r\n angular.forEach(vm.possibleContacts, function(v,k){\r\n if(v.id===vm.user_list.user_accounts[editId].cww_overrides.primary_contact.id){\r\n vm.user_list.user_accounts[editId].cww_overrides.primary_contact.email = v.email;\r\n }\r\n });\r\n\r\n angular.forEach(vm.cwwDeparments, function(v,k){\r\n if(v.id===vm.user_list.user_accounts[editId].cww_overrides.department.id){\r\n vm.user_list.user_accounts[editId].cww_overrides.department = v;\r\n vm.user_list.user_accounts[editId].cww_overrides.department.party_id_names_combined = removeDuplicates((v.party_id_names).concat(v.related_party_id_names));\r\n }\r\n });\r\n\r\n vm.editUserId = 'null';\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n function completeUserListRowStep2Csl(editId,type){\r\n\r\n //vm.user_list.user_accounts[editId].\r\n\r\n if(type == 'company'){\r\n\r\n angular.forEach(vm.possibleContacts, function(v,k){\r\n if(v.id===vm.companyUsersCww[editId].csl_overrides.primary_contact.id){\r\n vm.companyUsersCww[editId].csl_overrides.primary_contact.email = v.email;\r\n }\r\n });\r\n\r\n }else{\r\n\r\n angular.forEach(vm.possibleContacts, function(v,k){\r\n if(v.id===vm.user_list.user_accounts[editId].csl_overrides.primary_contact.id){\r\n vm.user_list.user_accounts[editId].csl_overrides.primary_contact.email = v.email;\r\n }\r\n });\r\n\r\n angular.forEach(vm.cslDeparments, function(v,k){\r\n if(v.id===vm.user_list.user_accounts[editId].csl_overrides.department.id){\r\n vm.user_list.user_accounts[editId].csl_overrides.department = v;\r\n }\r\n });\r\n\r\n }\r\n\r\n vm.editUserIdCsl = 'null';\r\n }\r\n\r\n\r\n function completeUserListRowStep2Cfs(editId){\r\n\r\n //vm.user_list.user_accounts[editId].\r\n\r\n if(type == 'company'){\r\n\r\n angular.forEach(vm.possibleContacts, function(v,k){\r\n if(v.id===vm.companyUsersCww[editId].cfs_overrides.primary_contact.id){\r\n vm.companyUsersCww[editId].cfs_overrides.primary_contact.email = v.email;\r\n }\r\n });\r\n\r\n }else{\r\n\r\n angular.forEach(vm.possibleContacts, function(v,k){\r\n if(v.id===vm.user_list.user_accounts[editId].cfs_overrides.primary_contact.id){\r\n vm.user_list.user_accounts[editId].cfs_overrides.primary_contact.email = v.email;\r\n }\r\n });\r\n\r\n angular.forEach(vm.cfsDeparments, function(v,k){\r\n if(v.id===vm.user_list.user_accounts[editId].cfs_overrides.department.id){\r\n vm.user_list.user_accounts[editId].cfs_overrides.department = v;\r\n }\r\n });\r\n\r\n }\r\n\r\n vm.editUserIdCfs = 'null';\r\n }\r\n\r\n function removeCompanyContactListCww(contactRemoveId){\r\n vm.companyContactsCww.splice(contactRemoveId,1);\r\n }\r\n\r\n function removeCompanyContactListCsl(contactRemoveId){\r\n vm.companyContactsCsl.splice(contactRemoveId,1);\r\n }\r\n\r\n function removeCompanyContactListCfs(contactRemoveId){\r\n vm.companyContactsCfs.splice(contactRemoveId,1);\r\n }\r\n\r\n function removeCompanyDepartmentListCww(departmentRemoveId){\r\n vm.companyDepartmentsCww.splice(departmentRemoveId,1);\r\n }\r\n\r\n function removeCompanyDepartmentListCsl(departmentRemoveId){\r\n vm.companyDepartmentsCsl.splice(departmentRemoveId,1);\r\n }\r\n\r\n function removeCompanyDepartmentListCfs(departmentRemoveId){\r\n vm.companyDepartmentsCfs.splice(departmentRemoveId,1);\r\n }\r\n\r\n function removeCompanyUserListCww(userRemoveId){\r\n vm.companyUsersCww.splice(userRemoveId,1);\r\n }\r\n\r\n function removeCompanyUserListCsl(userRemoveId){\r\n vm.companyUsersCsl.splice(userRemoveId,1);\r\n }\r\n\r\n function removeCompanyUserListCfs(userRemoveId){\r\n vm.companyUsersCfs.splice(userRemoveId,1);\r\n }\r\n\r\n function next_step(step_number){\r\n vm.cwwShowData = false;\r\n vm.cslShowData = false;\r\n vm.cfsShowData = false;\r\n\r\n if(vm.user_list.company.id && vm.user_list.user_accounts.length){\r\n\r\n angular.forEach(vm.user_list.user_accounts, function(data,index){\r\n if(data.cww_access == true && !vm.cwwShowData){\r\n vm.cwwShowData = true;\r\n }\r\n if(data.csl_access == true && !vm.cslShowData){\r\n vm.cslShowData = true;\r\n }\r\n if(data.cfs_access == true && !vm.cfsShowData){\r\n vm.cfsShowData = true;\r\n }\r\n });\r\n\r\n vm.form_step_number = vm.form_step_number + 1;\r\n }else{\r\n showValidationToasts('validation-doc.html', [\"Select Company and add users to move next page.\"], 'error');\r\n }\r\n\r\n }\r\n\r\n $rootScope.checkNameField = function(val){\r\n if(val == \"\" || val == undefined){\r\n vm.nameCheck = true;\r\n vm.supportCompany.accessTypeStandard = false;\r\n vm.supportCompany.accessTypeClassic = false;\r\n vm.supportCompany.companyEnableCheck = false;\r\n vm.supportCompany.portalType = \"\";\r\n vm.accessTypeEnableCheck = false;\r\n vm.supportCompany.is_cww = false;\r\n vm.supportCompany.is_csl = false;\r\n vm.supportCompany.is_cfs = false;\r\n }else{\r\n vm.nameCheck = false;\r\n vm.supportCompany.companyEnableCheck = true;\r\n }\r\n }\r\n\r\n $rootScope.checkPartyField = function(val){\r\n var format = /[!@#$%^&*()_+\\-=\\[\\]{}':\"\\\\|,.<>\\/?]+/;\r\n if(format.test(val)){\r\n vm.partyCheck1 = true;\r\n } else {\r\n vm.partyCheck1 = false;\r\n }\r\n if(val == \"\" || val == undefined){ vm.partyCheck = true; }else{ vm.partyCheck = false; }\r\n }\r\n\r\n $rootScope.checkRepField = function(val){\r\n if(val != undefined){\r\n vm.rep_id = val.id;\r\n vm.rep_email = val.email;\r\n vm.supportCompany.crane_sales_rep = {id:vm.rep_id,email:vm.rep_email};\r\n }\r\n if(val == \"\" || val == undefined){ vm.repCheck = true; }else{ vm.repCheck = false; }\r\n }\r\n\r\n $rootScope.checkPrimaryContactFieldCww = function(val){\r\n if(val != undefined){\r\n vm.rep_id = val.id;\r\n vm.rep_email = val.email;\r\n vm.supportCompany.cww_primary_contact_name = {id:vm.rep_id,email:vm.rep_email};\r\n if(val.phone_no != null) {\r\n vm.supportCompany.cww_primary_contact_phone = val.phone_no;\r\n vm.primaryPhoneCheck = false;\r\n }else{\r\n vm.primaryPhoneCheck = true;\r\n }\r\n }\r\n if(val == \"\" || val == undefined){ vm.primaryContactCheckCww = true; }else{ vm.primaryContactCheckCww = false; }\r\n }\r\n\r\n $rootScope.checkPrimaryContactFieldCsl = function(val){\r\n if(val != undefined){\r\n vm.rep_id = val.id;\r\n vm.rep_email = val.email;\r\n vm.supportCompany.csl_primary_contact_name = {id:vm.rep_id,email:vm.rep_email};\r\n if(val.phone_no != null) {\r\n vm.supportCompany.csl_primary_contact_phone = val.phone_no;\r\n vm.primaryPhoneCheck = false;\r\n }else{\r\n vm.primaryPhoneCheck = true;\r\n }\r\n }\r\n if(val == \"\" || val == undefined){ vm.primaryContactCheckCsl = true; }else{ vm.primaryContactCheckCsl = false; }\r\n }\r\n\r\n $rootScope.checkPrimaryContactFieldCfs = function(val){\r\n if(val != undefined){\r\n vm.rep_id = val.id;\r\n vm.rep_email = val.email;\r\n vm.supportCompany.cfs_primary_contact_name = {id:vm.rep_id,email:vm.rep_email};\r\n if(val.phone_no != null) {\r\n vm.supportCompany.cfs_primary_contact_phone = val.phone_no;\r\n vm.primaryPhoneCheck = false;\r\n }else{\r\n vm.primaryPhoneCheck = true;\r\n }\r\n }\r\n if(val == \"\" || val == undefined){ vm.primaryContactCheckCfs = true; }else{ vm.primaryContactCheckCfs = false; }\r\n }\r\n\r\n $rootScope.checkContactFieldCww = function(val){\r\n if(val != undefined){\r\n vm.rep_id = val.id;\r\n vm.rep_email = val.email;\r\n vm.supportCompany.cww_contact_id = vm.rep_id;\r\n vm.supportCompany.cww_contact_name = vm.rep_email;\r\n if(val.location != null) {\r\n vm.supportCompany.cww_contact_location = val.location;\r\n vm.primaryPhoneCheck = false;\r\n }else{\r\n vm.primaryPhoneCheck = true;\r\n }\r\n }\r\n if(val == \"\" || val == undefined){ vm.primaryContactCheck = true; }else{ vm.primaryContactCheck = false; }\r\n }\r\n\r\n $rootScope.checkContactFieldCsl = function(val){\r\n if(val != undefined){\r\n vm.rep_id = val.id;\r\n vm.rep_email = val.email;\r\n vm.supportCompany.csl_contact_id = vm.rep_id;\r\n vm.supportCompany.csl_contact_name = vm.rep_email;\r\n if(val.location != null) {\r\n vm.supportCompany.csl_contact_location = val.location;\r\n vm.primaryPhoneCheck = false;\r\n }else{\r\n vm.primaryPhoneCheck = true;\r\n }\r\n }\r\n if(val == \"\" || val == undefined){ vm.primaryContactCheck = true; }else{ vm.primaryContactCheck = false; }\r\n }\r\n\r\n $rootScope.checkContactFieldCfs = function(val){\r\n if(val != undefined){\r\n vm.rep_id = val.id;\r\n vm.rep_email = val.email;\r\n vm.supportCompany.cfs_contact_id = vm.rep_id;\r\n vm.supportCompany.cfs_contact_name = vm.rep_email;\r\n if(val.location != null) {\r\n vm.supportCompany.cfs_contact_location = val.location;\r\n vm.primaryPhoneCheck = false;\r\n }else{\r\n vm.primaryPhoneCheck = true;\r\n }\r\n }\r\n if(val == \"\" || val == undefined){ vm.primaryContactCheck = true; }else{ vm.primaryContactCheck = false; }\r\n }\r\n\r\n $rootScope.checkPrimaryPhoneField = function(val){\r\n if(val == \"\" || val == undefined){ vm.primaryPhoneCheck = true; }else{ vm.primaryPhoneCheck = false; }\r\n }\r\n\r\n function company_next_step(step_number,type){\r\n\r\n if(vm.supportCompany.accessTypeStandard && !vm.supportCompany.accessTypeClassic){\r\n vm.supportCompanyEditRow.classic_access = false;\r\n vm.accessToggle = true;\r\n if(vm.supportCompany.is_cww && !vm.supportCompany.is_csl && !vm.supportCompany.is_cfs){\r\n vm.customerToggle = true;\r\n vm.supportCompanyEditRow.cww_customer_type = true;\r\n vm.supportCompanyEditRow.csl_customer_type = true;\r\n vm.supportCompanyEditRow.cfs_customer_type = true;\r\n }\r\n else{\r\n vm.customerToggle = false;\r\n vm.supportCompanyEditRow.cww_customer_type = false;\r\n vm.supportCompanyEditRow.csl_customer_type = false;\r\n vm.supportCompanyEditRow.cfs_customer_type = false;\r\n }\r\n }\r\n else if(!vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic){\r\n if(vm.supportCompany.portalType == 'customer'){\r\n vm.supportCompanyEdit.classic_role = 'customer_classic';\r\n }\r\n if(vm.supportCompany.portalType == 'consignee'){\r\n vm.supportCompanyEdit.classic_role = 'classic_customer_consignee';\r\n }\r\n if(vm.supportCompany.portalType == 'shipper'){\r\n vm.supportCompanyEdit.classic_role = 'classic_customer_shipper';\r\n }\r\n vm.supportCompanyEdit.portal_role = \"\";\r\n vm.supportCompanyEditRow.classic_access = true;\r\n vm.accessToggle = true;\r\n vm.supportCompanyEditRow.cww_customer_type = true;\r\n vm.supportCompanyEditRow.csl_customer_type = true;\r\n vm.supportCompanyEditRow.cfs_customer_type = true;\r\n }\r\n if(vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic){\r\n vm.supportCompanyEditRow.classic_access = false;\r\n vm.accessToggle = false;\r\n if(vm.supportCompany.portalType == 'customer'){\r\n vm.supportCompanyEdit.classic_role = 'customer_classic';\r\n }\r\n if(vm.supportCompany.portalType == 'consignee'){\r\n vm.supportCompanyEdit.classic_role = 'classic_customer_consignee';\r\n }\r\n if(vm.supportCompany.portalType == 'shipper'){\r\n vm.supportCompanyEdit.classic_role = 'classic_customer_shipper';\r\n }\r\n }\r\n\r\n\r\n if(step_number == 1){\r\n var nameCheck = (vm.supportCompany.company_name) ? true : false;\r\n var partyCheck = (vm.supportCompany.party_group_ids) ? true : false;\r\n //if(nameCheck && partyCheck){\r\n vm.form_step_number = vm.form_step_number + 1;\r\n //}\r\n }\r\n\r\n if(step_number == 2){\r\n // var repCheck = (vm.searchText2) ? true : false;\r\n // var primaryContactCheck = (vm.searchText3) ? true : false;\r\n // var primaryPhoneCheck = (vm.supportCompany.primary_contact_phone) ? true : false;\r\n\r\n\r\n if(vm.supportCompany.is_cww){\r\n var bcc_ids_check_cww = (vm.supportCompany.cww_default_bccs.length > 0) ? true : false;\r\n if(bcc_ids_check_cww == false){ vm.bcc_check_cww = true; }else{ vm.bcc_check_cww = false; }\r\n }else{ bcc_ids_check_cww = true; }\r\n if(vm.supportCompany.is_csl){\r\n var bcc_ids_check_csl = (vm.supportCompany.csl_default_bccs.length > 0) ? true : false;\r\n if(bcc_ids_check_csl == false){ vm.bcc_check_csl = true; }else{ vm.bcc_check_csl = false; }\r\n }else{ bcc_ids_check_csl = true; }\r\n if(vm.supportCompany.is_cfs){\r\n var bcc_ids_check_cfs = (vm.supportCompany.cfs_default_bccs.length > 0) ? true : false;\r\n if(bcc_ids_check_cfs == false){ vm.bcc_check_cfs = true; }else{ vm.bcc_check_cfs = false; }\r\n }else{ bcc_ids_check_cfs = true; }\r\n\r\n if(bcc_ids_check_cww && bcc_ids_check_csl && bcc_ids_check_cfs){\r\n vm.form_step_number = vm.form_step_number + 1;\r\n }\r\n }\r\n if(step_number == 3 && type == 'normal'){\r\n vm.form_step_number = vm.form_step_number + 1;\r\n }\r\n if(step_number == 3 && type == 'user'){\r\n vm.form_step_number = vm.form_step_number + 2;\r\n }\r\n if(step_number == 4 && type == 'normal'){\r\n vm.form_step_number = vm.form_step_number + 1;\r\n }\r\n if(step_number == 4 && type == 'user'){\r\n vm.form_step_number = vm.form_step_number + 2;\r\n }\r\n if(step_number == 5){\r\n vm.form_step_number = vm.form_step_number + 1;\r\n }\r\n }\r\n\r\n function skip_override_step(step_number,type){\r\n if(vm.user_list.user_accounts.length > 0 && step_number == 1 && type == 'override'){\r\n vm.form_step_number = vm.form_step_number + 2;\r\n }\r\n if(vm.user_list.user_accounts.length > 0 && step_number == 2 && type == 'override'){\r\n vm.form_step_number = vm.form_step_number + 2;\r\n }\r\n if(vm.user_list.user_accounts.length > 0 && step_number == 1 && type == 'departments'){\r\n vm.form_step_number = vm.form_step_number + 2;\r\n }\r\n }\r\n\r\n\r\n function skip_department_step(step_number,type){\r\n\r\n\r\n if(step_number == 2 && type == 'department'){\r\n if(vm.supportCompany.is_cww){\r\n var bcc_ids_check_cww = (vm.supportCompany.cww_default_bccs.length > 0) ? true : false;\r\n if(bcc_ids_check_cww == false){ vm.bcc_check_cww = true; }else{ vm.bcc_check_cww = false; }\r\n }else{ bcc_ids_check_cww = true; }\r\n if(vm.supportCompany.is_csl){\r\n var bcc_ids_check_csl = (vm.supportCompany.csl_default_bccs.length > 0) ? true : false;\r\n if(bcc_ids_check_csl == false){ vm.bcc_check_csl = true; }else{ vm.bcc_check_csl = false; }\r\n }else{ bcc_ids_check_csl = true; }\r\n if(vm.supportCompany.is_cfs){\r\n var bcc_ids_check_cfs = (vm.supportCompany.cfs_default_bccs.length > 0) ? true : false;\r\n if(bcc_ids_check_cfs == false){ vm.bcc_check_cfs = true; }else{ vm.bcc_check_cfs = false; }\r\n }else{ bcc_ids_check_cfs = true; }\r\n\r\n if(bcc_ids_check_cww && bcc_ids_check_csl && bcc_ids_check_cfs){\r\n vm.form_step_number = vm.form_step_number + step_number;\r\n }\r\n }\r\n\r\n if(step_number == 2 && type == 'user'){\r\n if(vm.supportCompany.is_cww){\r\n var bcc_ids_check_cww = (vm.supportCompany.cww_default_bccs.length > 0) ? true : false;\r\n if(bcc_ids_check_cww == false){ vm.bcc_check_cww = true; }else{ vm.bcc_check_cww = false; }\r\n }else{ bcc_ids_check_cww = true; }\r\n if(vm.supportCompany.is_csl){\r\n var bcc_ids_check_csl = (vm.supportCompany.csl_default_bccs.length > 0) ? true : false;\r\n if(bcc_ids_check_csl == false){ vm.bcc_check_csl = true; }else{ vm.bcc_check_csl = false; }\r\n }else{ bcc_ids_check_csl = true; }\r\n if(vm.supportCompany.is_cfs){\r\n var bcc_ids_check_cfs = (vm.supportCompany.cfs_default_bccs.length > 0) ? true : false;\r\n if(bcc_ids_check_cfs == false){ vm.bcc_check_cfs = true; }else{ vm.bcc_check_cfs = false; }\r\n }else{ bcc_ids_check_cfs = true; }\r\n\r\n if(bcc_ids_check_cww && bcc_ids_check_csl && bcc_ids_check_cfs){\r\n vm.form_step_number = vm.form_step_number + 3;\r\n }\r\n }\r\n\r\n if(step_number == 3 && type == 'user'){\r\n vm.form_step_number = vm.form_step_number + 3;\r\n }\r\n if(step_number == 3 && type == 'overrides'){\r\n vm.form_step_number = vm.form_step_number + 2;\r\n }\r\n if(step_number == 4 && type == 'overrides'){\r\n vm.form_step_number = vm.form_step_number + 2;\r\n }\r\n // if(step_number == 4){\r\n // vm.form_step_number = vm.form_step_number + 1;\r\n // }\r\n }\r\n\r\n function companyFormSubmit(id){\r\n\r\n var dataResult = {};\r\n\r\n dataResult.name = vm.supportCompany.company_name;\r\n dataResult.access_type = [];\r\n if(vm.supportCompany.accessTypeStandard){\r\n dataResult.access_type.push('portal');\r\n }\r\n if(vm.supportCompany.accessTypeClassic){\r\n dataResult.access_type.push('classic');\r\n }\r\n dataResult.portal_type = vm.supportCompany.portalType;\r\n dataResult.sales_rep = vm.supportCompany.crane_sales_rep;\r\n dataResult.customer_types = [];\r\n dataResult.customer_configurations = {};\r\n\r\n\r\n if(vm.supportCompany.is_cww == true){\r\n dataResult.customer_types.push('cww');\r\n dataResult.customer_configurations.cww = {};\r\n dataResult.customer_configurations.cww.operation_contacts = {};\r\n if(vm.supportCompany.is_reskin == true){\r\n dataResult.customer_configurations.cww.is_reskin = true;\r\n }\r\n if(vm.supportCompany.is_reskin == false){\r\n dataResult.customer_configurations.cww.is_reskin = false;\r\n }\r\n\r\n if(vm.supportCompany.cww_primary_contact_name){\r\n vm.supportCompany.cww_primary_contact_name.phone_no = vm.supportCompany.cww_primary_contact_phone;\r\n dataResult.customer_configurations.cww.primary_crane_contact = vm.supportCompany.cww_primary_contact_name;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cww.primary_crane_contact = {};\r\n }\r\n if(vm.supportCompany.cww_default_bccs.length > 0){\r\n dataResult.customer_configurations.cww.default_bccs = vm.supportCompany.cww_default_bccs;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cww.default_bccs = [];\r\n }\r\n\r\n if(vm.supportCompany.cww_party_id_names.length > 0){\r\n dataResult.customer_configurations.cww.party_id_names = vm.supportCompany.cww_party_id_names.toLocaleString().toUpperCase().split(',');\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cww.party_id_names = [];\r\n }\r\n if(vm.supportCompany.cww_related_party_id_names.length > 0){\r\n dataResult.customer_configurations.cww.related_party_id_names = vm.supportCompany.cww_related_party_id_names.toLocaleString().toUpperCase().split(',');\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cww.related_party_id_names = [];\r\n }\r\n if(vm.companyContactsCww.length > 0){\r\n dataResult.customer_configurations.cww.operation_contacts = vm.companyContactsCww;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cww.operation_contacts = [];\r\n }\r\n\r\n if(vm.companyDepartmentsCww.length > 0){\r\n dataResult.customer_configurations.cww.departments = vm.companyDepartmentsCww;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cww.departments = [];\r\n }\r\n\r\n }\r\n\r\n if(vm.supportCompany.is_csl == true){\r\n dataResult.customer_types.push('csl');\r\n dataResult.customer_configurations.csl = {};\r\n dataResult.customer_configurations.csl.operation_contacts = {};\r\n\r\n dataResult.customer_configurations.csl.exception_threshold_hours = parseInt(vm.supportCompany.csl_exception_hours);\r\n dataResult.customer_configurations.csl.exception_threshold_minutes = parseInt(vm.supportCompany.csl_exception_minutes);\r\n if(vm.supportCompany.is_send_exception_email == true){\r\n dataResult.customer_configurations.csl.do_not_send_exception_mails = true;\r\n }\r\n if(vm.supportCompany.is_send_exception_email == false){\r\n dataResult.customer_configurations.csl.do_not_send_exception_mails = false;\r\n }\r\n if(vm.supportCompany.is_show_class == true){\r\n dataResult.customer_configurations.csl.show_shipment_class = true;\r\n }\r\n if(vm.supportCompany.is_show_class == false){\r\n dataResult.customer_configurations.csl.show_shipment_class = false;\r\n }\r\n\r\n if(vm.supportCompany.csl_primary_contact_name){\r\n vm.supportCompany.csl_primary_contact_name.phone_no = vm.supportCompany.csl_primary_contact_phone;\r\n dataResult.customer_configurations.csl.primary_crane_contact = vm.supportCompany.csl_primary_contact_name;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.csl.primary_crane_contact = {};\r\n }\r\n if(vm.supportCompany.csl_default_bccs.length > 0){\r\n dataResult.customer_configurations.csl.default_bccs = vm.supportCompany.csl_default_bccs;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.csl.default_bccs = [];\r\n }\r\n\r\n if(vm.supportCompany.csl_customer_ids.length > 0){\r\n dataResult.customer_configurations.csl.customer_ids = vm.supportCompany.csl_customer_ids;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.csl.customer_ids = [];\r\n }\r\n if(vm.companyContactsCsl.length > 0){\r\n dataResult.customer_configurations.csl.operation_contacts = vm.companyContactsCsl;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.csl.operation_contacts = [];\r\n }\r\n\r\n if(vm.companyDepartmentsCsl.length > 0){\r\n dataResult.customer_configurations.csl.departments = vm.companyDepartmentsCsl;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.csl.departments = [];\r\n }\r\n\r\n }\r\n\r\n if(vm.supportCompany.is_cfs == true){\r\n dataResult.customer_types.push('cfs');\r\n dataResult.customer_configurations.cfs = {};\r\n dataResult.customer_configurations.cfs.operation_contacts = {};\r\n\r\n if(vm.supportCompany.cfs_primary_contact_name){\r\n vm.supportCompany.cfs_primary_contact_name.phone_no = vm.supportCompany.cfs_primary_contact_phone;\r\n dataResult.customer_configurations.cfs.primary_crane_contact = vm.supportCompany.cfs_primary_contact_name;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cfs.primary_crane_contact = {};\r\n }\r\n if(vm.supportCompany.cfs_default_bccs.length > 0){\r\n dataResult.customer_configurations.cfs.default_bccs = vm.supportCompany.cfs_default_bccs;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cfs.default_bccs = [];\r\n }\r\n\r\n if(vm.supportCompany.cfs_customer_ids.length > 0){\r\n dataResult.customer_configurations.cfs.customer_ids = vm.supportCompany.cfs_customer_ids;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cfs.customer_ids = [];\r\n }\r\n if(vm.companyContactsCfs.length > 0){\r\n dataResult.customer_configurations.cfs.operation_contacts = vm.companyContactsCfs;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cfs.operation_contacts = [];\r\n }\r\n\r\n if(vm.companyDepartmentsCfs.length > 0){\r\n dataResult.customer_configurations.cfs.departments = vm.companyDepartmentsCfs;\r\n }\r\n else\r\n {\r\n dataResult.customer_configurations.cfs.departments = [];\r\n }\r\n\r\n }\r\n\r\n //adding users\r\n\r\n if(vm.companyUsersCww.length > 0){\r\n dataResult.users = vm.companyUsersCww;\r\n }\r\n else\r\n {\r\n dataResult.users = [];\r\n }\r\n\r\n\r\n if(id == undefined){\r\n\r\n $http.post(api.url + \"/tickets/company_tickets\", dataResult).then(function(response){\r\n localStorage.setItem(\"supportRequestTabDefault\",'company_tickets');\r\n vm.clearCompanyDepartmentCww();vm.clearCompanyDepartmentCsl();vm.clearCompanyDepartmentCfs();\r\n vm.clearCompanyContactCww();vm.clearCompanyContactCfs();vm.clearCompanyContactCsl();\r\n vm.clearSupportCompanyForm();\r\n showToastWithFile('create-company-request.success.html');\r\n setTimeout(function(){\r\n $location.path('/supportRequests');\r\n },100);\r\n }, function errorCallback(error){\r\n showToastWithFile('create-company-request.error.html',error.data.message);\r\n });\r\n }\r\n\r\n if(id){\r\n\r\n $http.put(api.url + \"/tickets/company_tickets/\"+id, dataResult).then(function(response){\r\n localStorage.setItem(\"supportRequestTabDefault\",'company_tickets');\r\n vm.clearCompanyDepartmentCww();vm.clearCompanyDepartmentCsl();vm.clearCompanyDepartmentCfs();\r\n vm.clearCompanyContactCww();vm.clearCompanyContactCfs();vm.clearCompanyContactCsl();\r\n vm.clearSupportCompanyForm();\r\n showToastWithFile('create-company-request.success.html');\r\n setTimeout(function(){\r\n $location.path('/supportRequests');\r\n },100);\r\n }, function errorCallback(error){\r\n showToastWithFile('create-company-request.error.html',error.data.message);\r\n });\r\n }\r\n\r\n }\r\n\r\n function prev_step(step_number){\r\n vm.cwwShowData = false;\r\n vm.cslShowData = false;\r\n vm.cfsShowData = false;\r\n\r\n if(vm.user_list.company.id && vm.user_list.user_accounts.length){\r\n\r\n angular.forEach(vm.user_list.user_accounts, function(data,index){\r\n if(data.cww_access == true && !vm.cwwShowData){\r\n vm.cwwShowData = true;\r\n }\r\n if(data.csl_access == true && !vm.cslShowData){\r\n vm.cslShowData = true;\r\n }\r\n if(data.cfs_access == true && !vm.cfsShowData){\r\n vm.cfsShowData = true;\r\n }\r\n });\r\n }\r\n\r\n vm.form_step_number = vm.form_step_number - 1;\r\n }\r\n\r\n function edit_prev_step(step_number){\r\n vm.form_step_number = step_number;\r\n }\r\n\r\n function validateEmail(email) {\r\n var re = /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\r\n return re.test(String(email).toLowerCase());\r\n }\r\n\r\n function resetStep1Form(){\r\n vm.add_user = {};\r\n vm.add_user.first_name = '';\r\n vm.add_user.last_name = '';\r\n vm.add_user.email = '';\r\n vm.add_user.party_group_ids = [];\r\n vm.add_user.customer_ids_csl = [];\r\n vm.add_user.customer_ids_cfs = [];\r\n vm.add_user.departments = [];\r\n vm.add_dept_autocomplete = [];\r\n vm.add_user.bccs_cww = [];\r\n vm.add_user.bccs_csl = [];\r\n vm.add_user.bccs_cfs = [];\r\n vm.add_user.primary_contact_cww = [];\r\n vm.add_user.primary_contact_csl = [];\r\n vm.add_user.primary_contact_cfs = [];\r\n vm.add_user.departmentsId = '';\r\n vm.add_user.departmentsName = '';\r\n vm.overrideSelect = false;\r\n vm.overrideSelectCopy = false;\r\n vm.overrideSelectCsl = false;\r\n vm.overrideSelectCfs = false;\r\n }\r\n\r\n function display_overrides(overridesData,badPartyIds){\r\n\r\n vm.page_name='new';\r\n if($stateParams.id){\r\n vm.page_name='edit';\r\n }\r\n\r\n vm.account_ticket = vm.user_list;\r\n\r\n vm.overridesData = overridesData;\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/support-requests/modals/override.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true,\r\n controller: function () {\r\n return vm;\r\n },\r\n controllerAs: 'vm'\r\n\r\n });\r\n\r\n }\r\n\r\n function display_departments(overridesData){\r\n vm.page_name='new';\r\n if($stateParams.id){\r\n vm.page_name='edit';\r\n }\r\n\r\n vm.account_ticket = vm.user_list;\r\n\r\n vm.overridesData = overridesData;\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/support-requests/modals/departments.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true,\r\n controller: function () {\r\n return vm;\r\n },\r\n controllerAs: 'vm'\r\n\r\n });\r\n }\r\n\r\n function create_new_account(){\r\n\r\n vm.user_list.user_accounts =angular.forEach(vm.user_list.user_accounts, function(data,index){\r\n });\r\n\r\n SupportRequestsService.create_new_account(vm.user_list).then(function(res){\r\n\r\n if(res && !res.error){\r\n localStorage.setItem(\"supportRequestTabDefault\",'account_tickets');\r\n //vm.showValidationToasts('validation-doc.html',['User Created Successfully'],'success');\r\n vm.redirectToDashboard();\r\n }\r\n if(res){\r\n if($stateParams.id != undefined){\r\n vm.showValidationToasts('validation-doc.html',['User Updated Successfully'],'success');\r\n }else{\r\n vm.showValidationToasts('validation-doc.html',['User Created Successfully'],'success');\r\n }\r\n }\r\n if(res.error){\r\n vm.showValidationToasts('validation-doc.html',[res.error],'error');\r\n }\r\n\r\n }).catch(function(err) {\r\n vm.showValidationToasts('validation-doc.html',[err.data.error],'error');\r\n });\r\n\r\n }\r\n\r\n function redirectToDashboard(){\r\n $location.path('/supportRequests');\r\n }\r\n\r\n function check_selectAll(){\r\n\r\n var check = 0;\r\n angular.forEach(document.querySelectorAll('.override_multiple_checkbox'), function(value, key) {\r\n\r\n if (!value.checked) {\r\n check = 1;\r\n document.getElementById('userOverrideCheckbox').checked=false;\r\n return false;\r\n }\r\n\r\n })\r\n\r\n if(check == 0){\r\n document.getElementById('userOverrideCheckbox').checked=true;\r\n }\r\n }\r\n\r\n function check_selectAll_csl(){\r\n\r\n var check = 0;\r\n angular.forEach(document.querySelectorAll('.override_multiple_checkbox_csl'), function(value, key) {\r\n\r\n if (!value.checked) {\r\n check = 1;\r\n document.getElementById('userOverrideCheckboxCsl').checked=false;\r\n return false;\r\n }\r\n\r\n })\r\n\r\n if(check == 0){\r\n document.getElementById('userOverrideCheckboxCsl').checked=true;\r\n }\r\n }\r\n\r\n function check_selectAll_cfs(){\r\n\r\n var check = 0;\r\n angular.forEach(document.querySelectorAll('.override_multiple_checkbox_cfs'), function(value, key) {\r\n\r\n if (!value.checked) {\r\n check = 1;\r\n document.getElementById('userOverrideCheckboxCfs').checked=false;\r\n return false;\r\n }\r\n\r\n })\r\n\r\n if(check == 0){\r\n document.getElementById('userOverrideCheckboxCfs').checked=true;\r\n }\r\n }\r\n\r\n function check_selectAllMain(){\r\n if(document.getElementById('userOverrideCheckbox').checked){\r\n\r\n angular.forEach(document.querySelectorAll('.override_multiple_checkbox'), function(value, key) {\r\n value.checked=true;\r\n })\r\n\r\n }else{\r\n angular.forEach(document.querySelectorAll('.override_multiple_checkbox'), function(value, key) {\r\n value.checked=false;\r\n })\r\n }\r\n }\r\n\r\n function check_selectAllMain_Csl(){\r\n if(document.getElementById('userOverrideCheckboxCsl').checked){\r\n\r\n angular.forEach(document.querySelectorAll('.override_multiple_checkbox_csl'), function(value, key) {\r\n value.checked=true;\r\n })\r\n\r\n }else{\r\n angular.forEach(document.querySelectorAll('.override_multiple_checkbox_csl'), function(value, key) {\r\n value.checked=false;\r\n })\r\n }\r\n }\r\n\r\n function check_selectAllMain_Cfs(){\r\n if(document.getElementById('userOverrideCheckboxCfs').checked){\r\n\r\n angular.forEach(document.querySelectorAll('.override_multiple_checkbox_cfs'), function(value, key) {\r\n value.checked=true;\r\n })\r\n\r\n }else{\r\n angular.forEach(document.querySelectorAll('.override_multiple_checkbox_cfs'), function(value, key) {\r\n value.checked=false;\r\n })\r\n }\r\n }\r\n\r\n function addUserCompanySelect(item){\r\n\r\n if(item != undefined){\r\n //vm.user_list.company.id = item.value;\r\n //vm.user_list.company.name = item.display;\r\n\r\n vm.user_list.company.id = item.id;\r\n vm.user_list.company.name = item.name;\r\n vm.user_list.company.access_type = item.access_type;\r\n vm.user_list.company.customer_types = item.customer_types;\r\n vm.user_list.company.portal_type = item.portal_type;\r\n\r\n if(item.departments.length > 0){\r\n vm.departmentAccess = true;\r\n angular.forEach(item.departments, function(data,index){\r\n\r\n if(data.customer_type == 'cww'){\r\n vm.cwwDeparments.push(data);\r\n }\r\n if(data.customer_type == 'csl'){\r\n vm.cslDeparments.push(data);\r\n }\r\n if(data.customer_type == 'cfs'){\r\n vm.cfsDeparments.push(data);\r\n }\r\n\r\n });\r\n\r\n }else{\r\n vm.departmentAccess = false;\r\n }\r\n\r\n if(item.customer_types.includes('cww')){\r\n vm.user_list.company.is_cww = true;\r\n }\r\n if(item.customer_types.includes('csl')){\r\n vm.user_list.company.is_csl = true;\r\n }\r\n if(item.customer_types.includes('cfs')){\r\n vm.user_list.company.is_cfs = true;\r\n }\r\n\r\n vm.user_list.user_accounts = [];\r\n vm.resetStep1Form();\r\n\r\n //vm.user_list.classic_role = ((item.portal_type == 'customer')?'customer_classic':(item.portal_type=='consignee'?'consignee':'shipper'));\r\n\r\n\r\n //classic_customer_ops\r\n\r\n //vm.user_list.company.name = item.display.replace(/ /g,\"_\");\r\n //vm.add_user.company_name = {id:vm.company_id,name:vm.company_name};\r\n }\r\n\r\n }\r\n\r\n function showImportUserPopup() {\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/support-requests/add-user/import-user.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n\r\n }\r\n\r\n function showImportUserPopupCompany(){\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/support-requests/add-company/import-user.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function isSafari(){\r\n function present(browser){\r\n return navigator.userAgent.toLowerCase().indexOf(browser) > -1\r\n }\r\n return present(\"safari/\") && !present(\"chrome/\");\r\n }\r\n\r\n $scope.$watch(\"vm.file\", function(newValue, oldValue){\r\n if (newValue != oldValue){\r\n console.log($state.current.name)\r\n if($state.current.name == 'supportRequestAddUser' || $state.current.name == 'supportRequestEditUser'){\r\n vm.uploadFile(vm.file,'','user');\r\n }\r\n else if($state.current.name == 'supportRequestCompany' || $state.current.name == 'supportRequestCompanyEdit'){\r\n vm.uploadFile(vm.file,'','company');\r\n }else{\r\n vm.uploadFile(vm.file);\r\n }\r\n }\r\n });\r\n\r\n function uploadFile(file, errFiles,type) {\r\n\r\n if (!file) {\r\n return;\r\n }\r\n var reader = new FileReader();\r\n reader.onload = function(event){\r\n var data = reader.result.split(/\\r?\\n/),\r\n headers = [\"email\", \"firstname\", \"lastname\"];\r\n var file_headers = data[0].split(',').map(function(d){return d.toLowerCase();}), count = data.length - 1;\r\n file_headers = file_headers.sort();\r\n if (count <= 500 && headers.every(function(n,i){return n.toLowerCase() === file_headers[i]})){\r\n upload();\r\n } else if (count > 500) {\r\n $scope.errorMsg = 'Too many records';\r\n showToastWithFile('attach-doc.error.html', [\"Max Exceeded: Upload User Limit is 500\"], 7000);\r\n } else {\r\n $scope.errorMsg = 'Invalid headers';\r\n showToastWithFile('attach-doc.invalid.error.html', [\"'Accepted Headers: 'Email', 'Firstname', 'Lastname'\"], 7000);\r\n }\r\n }\r\n reader.readAsText(file);\r\n vm.errFile = errFiles && errFiles[0];\r\n function upload(){\r\n vm.file.isUploading = true;\r\n SupportRequestsService.uploadFile(file, errFiles).then(function (response) {\r\n $timeout(function () {\r\n\r\n closeModal();\r\n\r\n if(response.length){\r\n var exist_users = [];\r\n angular.forEach(response, function(data,index){\r\n\r\n if(data.is_valid_email == false){\r\n exist_users.push(data.email);\r\n response.splice(index,1);\r\n }\r\n\r\n });\r\n\r\n if(type == 'user'){\r\n\r\n angular.forEach(response, function(data,index){\r\n\r\n vm.add_user.first_name = data.first_name;\r\n vm.add_user.last_name = data.last_name;\r\n vm.add_user.email = data.email;\r\n vm.add_user.departments = [];\r\n vm.add_dept_autocomplete = [];\r\n\r\n addUserRowCsv('','');\r\n });\r\n }\r\n\r\n if(type == 'company'){\r\n\r\n angular.forEach(response, function(data,index){\r\n\r\n vm.supportCompanyEdit.cww_user_first_name = data.first_name;\r\n vm.supportCompanyEdit.cww_user_last_name = data.last_name;\r\n vm.supportCompanyEdit.cww_user_email = data.email;\r\n\r\n addRequestCompanyUsersCwwCsv('','');\r\n });\r\n }\r\n\r\n\r\n\r\n if(exist_users.length > 0){\r\n vm.existUsers = exist_users;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/support-requests/modals/import-users-error.modal.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true,\r\n controller: function () {\r\n return vm;\r\n },\r\n controllerAs: 'vm'\r\n });\r\n }\r\n\r\n }\r\n\r\n });\r\n\r\n }).catch(function (response) {\r\n if(response.status > 0) {\r\n $scope.errorMsg = response.status + ': ' + response.data;\r\n }\r\n showToastWithFile('attach-doc.error.html', response.error);\r\n }).finally(function(){\r\n vm.file.isUploading = false;\r\n });\r\n }\r\n }\r\n\r\n function downloadCSVTemplate(){\r\n var filename = 'User-Template.csv';\r\n var headers = \"FirstName,LastName,Email\\nExample User First,Example User Last,testmail@example.com\\n\";\r\n var data = new Blob([headers], {type: \"text/csv;charset=utf-8;\"});\r\n DownloadService.generateFile(data, filename);\r\n }\r\n\r\n function user_add_cancellation(step_number){\r\n vm.form_step_number = 1;\r\n }\r\n\r\n function addGeneralRequestDepartment(){\r\n vm.department = {};\r\n vm.department.id = vm.count;\r\n vm.department.department_name = vm.support.department_name;\r\n if(vm.support.default_contact){\r\n vm.department.primary_contact = {id:vm.support.default_contact.id,name:vm.support.default_contact.email};\r\n }else{\r\n vm.department.primary_contact = {};\r\n }\r\n if(vm.support.default_bccs.length > 0){\r\n vm.department.bcc_override = vm.support.default_bccs;\r\n }else{\r\n vm.department.bcc_override = [];\r\n }\r\n if(vm.support.party_group_ids){\r\n vm.department.party_or_group_id = (vm.support.party_group_ids).split(';');\r\n }else{\r\n vm.department.party_or_group_id = [];\r\n }\r\n vm.department.magno_re_skin = vm.support.is_magno;\r\n vm.departments.push(vm.department);\r\n vm.clearDepartment();\r\n vm.count = vm.count + 1;\r\n }\r\n\r\n function addRequestCompanyDepartmentsCww(){\r\n vm.departmentNameExistCww = [];\r\n if((vm.supportCompanyEdit.cww_department_name != undefined)\r\n && (vm.supportCompanyEdit.cww_department_name != \"\")\r\n && (vm.supportCompanyEdit.cww_party_group_ids.length > 0)){\r\n if(vm.companyDepartmentsCww.length > 0){\r\n for( var n=0; n<vm.companyDepartmentsCww.length; n++){\r\n if (vm.companyDepartmentsCww[n]['name'] == vm.supportCompanyEdit.cww_department_name){\r\n vm.departmentNameExistCww.push(vm.companyDepartmentsCww[n]['name']);\r\n }else{\r\n vm.departmentNameExistCww.push();\r\n }\r\n }\r\n }else{ vm.departmentNameExistCww = []; }\r\n\r\n if(vm.departmentNameExistCww.length == 0){\r\n vm.companyDepartmentCww = {};\r\n //vm.companyDepartment.id = vm.count;\r\n vm.companyDepartmentCww.name = vm.supportCompanyEdit.cww_department_name;\r\n if(vm.supportCompanyEdit.cww_default_contact){\r\n vm.companyDepartmentCww.primary_contact = {id:vm.supportCompanyEdit.cww_default_contact.id,email:vm.supportCompanyEdit.cww_default_contact.email};\r\n }else{\r\n vm.companyDepartmentCww.primary_contact = {};\r\n }\r\n if(vm.supportCompanyEdit.cww_default_bccs.length > 0){\r\n vm.companyDepartmentCww.bcc_override = vm.supportCompanyEdit.cww_default_bccs;\r\n }else{\r\n vm.companyDepartmentCww.bcc_override = [];\r\n }\r\n if(vm.supportCompanyEdit.cww_party_group_ids.length > 0){\r\n vm.companyDepartmentCww.party_or_group_ids = (vm.supportCompanyEdit.cww_party_group_ids).toLocaleString().toUpperCase().split(',');\r\n }else{\r\n vm.companyDepartmentCww.party_or_group_ids = [];\r\n }\r\n vm.companyDepartmentCww.magno_re_skin = vm.supportCompanyEdit.is_magno;\r\n vm.companyDepartmentsCww.push(vm.companyDepartmentCww);\r\n clearCompanyDepartmentCww();\r\n vm.count1 = vm.count1 + 1;\r\n }\r\n }\r\n }\r\n\r\n function addRequestCompanyDepartmentsCsl(){\r\n vm.departmentNameExistCsl = [];\r\n if((vm.supportCompanyEdit.csl_department_name != undefined)\r\n && (vm.supportCompanyEdit.csl_department_name != \"\")\r\n && (vm.supportCompanyEdit.csl_customer_ids.length > 0)){\r\n if(vm.companyDepartmentsCsl.length > 0){\r\n for( var n=0; n<vm.companyDepartmentsCsl.length; n++){\r\n if (vm.companyDepartmentsCsl[n]['name'] == vm.supportCompanyEdit.csl_department_name){\r\n vm.departmentNameExistCsl.push(vm.companyDepartmentsCsl[n]['name']);\r\n }else{\r\n vm.departmentNameExistCsl.push();\r\n }\r\n }\r\n }else{ vm.departmentNameExistCsl = []; }\r\n\r\n if(vm.departmentNameExistCsl.length == 0){\r\n vm.companyDepartmentCsl = {};\r\n //vm.companyDepartment.id = vm.count;\r\n vm.companyDepartmentCsl.name = vm.supportCompanyEdit.csl_department_name;\r\n if(vm.supportCompanyEdit.csl_default_contact){\r\n vm.companyDepartmentCsl.primary_contact = {id:vm.supportCompanyEdit.csl_default_contact.id,email:vm.supportCompanyEdit.csl_default_contact.email};\r\n }else{\r\n vm.companyDepartmentCsl.primary_contact = {};\r\n }\r\n if(vm.supportCompanyEdit.csl_default_bccs.length > 0){\r\n vm.companyDepartmentCsl.bcc_override = vm.supportCompanyEdit.csl_default_bccs;\r\n }else{\r\n vm.companyDepartmentCsl.bcc_override = [];\r\n }\r\n if(vm.supportCompanyEdit.csl_customer_ids.length > 0){\r\n vm.companyDepartmentCsl.customer_ids = (vm.supportCompanyEdit.csl_customer_ids).toLocaleString().toUpperCase().split(',');\r\n }else{\r\n vm.companyDepartmentCsl.customer_ids = [];\r\n }\r\n vm.companyDepartmentsCsl.push(vm.companyDepartmentCsl);\r\n clearCompanyDepartmentCsl();\r\n vm.count2 = vm.count2 + 1;\r\n }\r\n }\r\n }\r\n\r\n function addRequestCompanyDepartmentsCfs(){\r\n vm.departmentNameExistCfs = [];\r\n if((vm.supportCompanyEdit.cfs_department_name != undefined)\r\n && (vm.supportCompanyEdit.cfs_department_name != \"\")\r\n && (vm.supportCompanyEdit.cfs_customer_ids.length > 0)){\r\n if(vm.companyDepartmentsCfs.length > 0){\r\n for( var n=0; n<vm.companyDepartmentsCfs.length; n++){\r\n if (vm.companyDepartmentsCfs[n]['name'] == vm.supportCompanyEdit.cfs_department_name){\r\n vm.departmentNameExistCfs.push(vm.companyDepartmentsCfs[n]['name']);\r\n }else{\r\n vm.departmentNameExistCfs.push();\r\n }\r\n }\r\n }else{ vm.departmentNameExistCfs = []; }\r\n\r\n if(vm.departmentNameExistCfs.length == 0){\r\n vm.companyDepartmentCfs = {};\r\n //vm.companyDepartment.id = vm.count;\r\n vm.companyDepartmentCfs.name = vm.supportCompanyEdit.cfs_department_name;\r\n if(vm.supportCompanyEdit.cfs_default_contact){\r\n vm.companyDepartmentCfs.primary_contact = {id:vm.supportCompanyEdit.cfs_default_contact.id,email:vm.supportCompanyEdit.cfs_default_contact.email};\r\n }else{\r\n vm.companyDepartmentCfs.primary_contact = {};\r\n }\r\n if(vm.supportCompanyEdit.cfs_default_bccs.length > 0){\r\n vm.companyDepartmentCfs.bcc_override = vm.supportCompanyEdit.cfs_default_bccs;\r\n }else{\r\n vm.companyDepartmentCfs.bcc_override = [];\r\n }\r\n if(vm.supportCompanyEdit.cfs_customer_ids.length > 0){\r\n vm.companyDepartmentCfs.customer_ids = (vm.supportCompanyEdit.cfs_customer_ids).toLocaleString().toUpperCase().split(',');\r\n }else{\r\n vm.companyDepartmentCfs.customer_ids = [];\r\n }\r\n vm.companyDepartmentsCfs.push(vm.companyDepartmentCfs);\r\n clearCompanyDepartmentCfs();\r\n vm.count3 = vm.count3 + 1;\r\n }\r\n }\r\n }\r\n\r\n function addRequestCompanyUsersCww(){\r\n\r\n if(vm.supportCompanyEdit.cww_user_first_name != undefined && vm.supportCompanyEdit.cww_user_first_name != \"\"){\r\n if(vm.isEmailAddress(vm.supportCompanyEdit.cww_user_email)){\r\n SupportRequestsService.checkEmailExist(vm.supportCompanyEdit.cww_user_email).then(function(res){\r\n if(!res.data.is_user_exist){\r\n if(vm.supportCompanyEdit.cww_user_first_name != undefined && vm.supportCompanyEdit.cww_user_first_name != \"\"){\r\n vm.companyUserCww = {};\r\n //vm.companyDepartment.id = vm.count;\r\n vm.companyUserCww.customer_types = [];\r\n\r\n if(vm.supportCompany.accessTypeStandard && !vm.supportCompany.accessTypeClassic){\r\n vm.supportCompanyEdit.classic_access = false;\r\n vm.accessToggle = true;\r\n if(vm.supportCompanyEdit.financial_customer_type == true){\r\n vm.supportCompanyEdit.portal_role = 'customer';\r\n }\r\n if(vm.supportCompanyEdit.financial_customer_type == false){\r\n vm.supportCompanyEdit.portal_role = 'customer_no_financial';\r\n }\r\n if(vm.supportCompany.is_cww && !vm.supportCompany.is_csl && !vm.supportCompany.is_cfs){\r\n vm.customerToggle = true;\r\n vm.supportCompanyEdit.cww_customer_type = true;\r\n vm.supportCompanyEdit.csl_customer_type = false;\r\n vm.supportCompanyEdit.cfs_customer_type = false;\r\n }\r\n else{\r\n vm.customerToggle = false;\r\n vm.supportCompanyEdit.cww_customer_type = false;\r\n vm.supportCompanyEdit.csl_customer_type = false;\r\n vm.supportCompanyEdit.cfs_customer_type = false;\r\n }\r\n }\r\n else if(!vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic){\r\n vm.supportCompanyEdit.classic_access = true;\r\n vm.accessToggle = true;\r\n vm.supportCompanyEdit.portal_role = '';\r\n vm.supportCompanyEdit.cww_customer_type = true;\r\n vm.supportCompanyEdit.csl_customer_type = false;\r\n vm.supportCompanyEdit.cfs_customer_type = false;\r\n }\r\n if(vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic){\r\n vm.supportCompanyEdit.classic_access = true;\r\n vm.accessToggle = false;\r\n if(vm.supportCompany.portalType == 'customer'){\r\n if(vm.supportCompanyEdit.financial_customer_type == true){\r\n vm.supportCompanyEdit.portal_role = 'customer';\r\n }\r\n if(vm.supportCompanyEdit.financial_customer_type == false){\r\n vm.supportCompanyEdit.portal_role = 'customer_no_financial';\r\n }\r\n }else if(vm.supportCompany.portalType == 'consignee'){\r\n vm.supportCompanyEdit.portal_role = 'customer_consignee';\r\n }else if(vm.supportCompany.portalType == 'shipper'){\r\n vm.supportCompanyEdit.portal_role = 'customer_shipper';\r\n }\r\n }\r\n\r\n vm.companyUserCww.first_name = vm.supportCompanyEdit.cww_user_first_name;\r\n vm.companyUserCww.last_name = vm.supportCompanyEdit.cww_user_last_name;\r\n vm.companyUserCww.email = vm.supportCompanyEdit.cww_user_email;\r\n vm.companyUserCww.portal_role = vm.supportCompanyEdit.portal_role;\r\n vm.companyUserCww.classic_role = vm.supportCompanyEdit.classic_role;\r\n vm.companyUserCww.classic_access = vm.supportCompanyEdit.classic_access;\r\n vm.companyUserCww.cww_access = vm.supportCompanyEdit.cww_customer_type;\r\n vm.companyUserCww.csl_access = vm.supportCompanyEdit.csl_customer_type;\r\n vm.companyUserCww.cfs_access = vm.supportCompanyEdit.cfs_customer_type;\r\n vm.companyUserCww.financial = vm.supportCompanyEdit.financial_customer_type;\r\n\r\n vm.companyUserCww.cww_overrides = {'primary_contact':{},'bccs':[],'party_group_ids':[],'department':{}};\r\n vm.companyUserCww.csl_overrides = {'primary_contact':{},'bccs':[],'customer_ids':[],'department':{}};\r\n vm.companyUserCww.cfs_overrides = {'primary_contact':{},'bccs':[],'customer_ids':[],'department':{}};\r\n\r\n if(vm.companyUserCww.cww_access == true){\r\n vm.companyUserCww.customer_types.push('cww');\r\n }\r\n if(vm.companyUserCww.csl_access == true){\r\n vm.companyUserCww.customer_types.push('csl');\r\n }\r\n if(vm.companyUserCww.cfs_access == true){\r\n vm.companyUserCww.customer_types.push('cfs');\r\n }\r\n\r\n vm.companyUsersCww.push(vm.companyUserCww);\r\n clearCompanyUserCww();\r\n vm.count1 = vm.count1 + 1;\r\n }\r\n }\r\n else{\r\n showValidationToasts('validation-doc.html', [\"Email Already Exists\"], 'error');\r\n }\r\n }, function errorCallback(error){\r\n\r\n });\r\n }else{\r\n showValidationToasts('validation-doc.html', [\"Please Enter Valid Email\"], 'error');\r\n }\r\n }\r\n }\r\n\r\n\r\n function addRequestCompanyUsersCwwCsv(){\r\n\r\n if(vm.supportCompanyEdit.cww_user_first_name != undefined && vm.supportCompanyEdit.cww_user_first_name != \"\"){\r\n if(vm.isEmailAddress(vm.supportCompanyEdit.cww_user_email)){\r\n if(vm.supportCompanyEdit.cww_user_first_name != undefined && vm.supportCompanyEdit.cww_user_first_name != \"\"){\r\n vm.companyUserCww = {};\r\n //vm.companyDepartment.id = vm.count;\r\n vm.companyUserCww.customer_types = [];\r\n\r\n if(vm.supportCompany.accessTypeStandard && !vm.supportCompany.accessTypeClassic){\r\n vm.supportCompanyEdit.classic_access = false;\r\n vm.accessToggle = true;\r\n if(vm.supportCompanyEdit.financial_customer_type == true){\r\n vm.supportCompanyEdit.portal_role = 'customer';\r\n }\r\n if(vm.supportCompanyEdit.financial_customer_type == false){\r\n vm.supportCompanyEdit.portal_role = 'customer_no_financial';\r\n }\r\n if(vm.supportCompany.is_cww && !vm.supportCompany.is_csl && !vm.supportCompany.is_cfs){\r\n vm.customerToggle = true;\r\n vm.supportCompanyEdit.cww_customer_type = true;\r\n vm.supportCompanyEdit.csl_customer_type = false;\r\n vm.supportCompanyEdit.cfs_customer_type = false;\r\n }\r\n else{\r\n vm.customerToggle = false;\r\n vm.supportCompanyEdit.cww_customer_type = false;\r\n vm.supportCompanyEdit.csl_customer_type = false;\r\n vm.supportCompanyEdit.cfs_customer_type = false;\r\n }\r\n }\r\n else if(!vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic){\r\n vm.supportCompanyEdit.classic_access = true;\r\n vm.accessToggle = true;\r\n vm.supportCompanyEdit.portal_role = '';\r\n vm.supportCompanyEdit.cww_customer_type = true;\r\n vm.supportCompanyEdit.csl_customer_type = false;\r\n vm.supportCompanyEdit.cfs_customer_type = false;\r\n }\r\n if(vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic){\r\n vm.supportCompanyEdit.classic_access = true;\r\n vm.accessToggle = false;\r\n if(vm.supportCompany.portalType == 'customer'){\r\n if(vm.supportCompanyEdit.financial_customer_type == true){\r\n vm.supportCompanyEdit.portal_role = 'customer';\r\n }\r\n if(vm.supportCompanyEdit.financial_customer_type == false){\r\n vm.supportCompanyEdit.portal_role = 'customer_no_financial';\r\n }\r\n }else if(vm.supportCompany.portalType == 'consignee'){\r\n vm.supportCompanyEdit.portal_role = 'customer_consignee';\r\n }else if(vm.supportCompany.portalType == 'shipper'){\r\n vm.supportCompanyEdit.portal_role = 'customer_shipper';\r\n }\r\n }\r\n\r\n vm.companyUserCww.first_name = vm.supportCompanyEdit.cww_user_first_name;\r\n vm.companyUserCww.last_name = vm.supportCompanyEdit.cww_user_last_name;\r\n vm.companyUserCww.email = vm.supportCompanyEdit.cww_user_email;\r\n vm.companyUserCww.portal_role = vm.supportCompanyEdit.portal_role;\r\n vm.companyUserCww.classic_role = vm.supportCompanyEdit.classic_role;\r\n vm.companyUserCww.classic_access = vm.supportCompanyEdit.classic_access;\r\n vm.companyUserCww.cww_access = vm.supportCompanyEdit.cww_customer_type;\r\n vm.companyUserCww.csl_access = vm.supportCompanyEdit.csl_customer_type;\r\n vm.companyUserCww.cfs_access = vm.supportCompanyEdit.cfs_customer_type;\r\n vm.companyUserCww.financial = vm.supportCompanyEdit.financial_customer_type;\r\n\r\n vm.companyUserCww.cww_overrides = {'primary_contact':{},'bccs':[],'party_group_ids':[],'department':{}};\r\n vm.companyUserCww.csl_overrides = {'primary_contact':{},'bccs':[],'customer_ids':[],'department':{}};\r\n vm.companyUserCww.cfs_overrides = {'primary_contact':{},'bccs':[],'customer_ids':[],'department':{}};\r\n\r\n if(vm.companyUserCww.cww_access == true){\r\n vm.companyUserCww.customer_types.push('cww');\r\n }\r\n if(vm.companyUserCww.csl_access == true){\r\n vm.companyUserCww.customer_types.push('csl');\r\n }\r\n if(vm.companyUserCww.cfs_access == true){\r\n vm.companyUserCww.customer_types.push('cfs');\r\n }\r\n\r\n vm.companyUsersCww.push(vm.companyUserCww);\r\n clearCompanyUserCww();\r\n vm.count1 = vm.count1 + 1;\r\n }\r\n }else{\r\n showValidationToasts('validation-doc.html', [\"Please Enter Valid Email\"], 'error');\r\n }\r\n }\r\n }\r\n\r\n function addRequestCompanyContactsCww(){\r\n if(vm.supportCompany.cww_contact_name != undefined && vm.supportCompany.cww_contact_name != \"\"){\r\n vm.companyContactCww = {};\r\n //vm.companyContact.id = vm.count;\r\n vm.companyContactCww.id = vm.supportCompany.cww_contact_id;\r\n vm.companyContactCww.contact_name = vm.supportCompany.cww_contact_name;\r\n vm.companyContactCww.office_location = vm.supportCompany.cww_contact_location;\r\n vm.companyContactsCww.push(vm.companyContactCww);\r\n vm.clearCompanyContactCww();\r\n vm.count1 = vm.count1 + 1;\r\n }\r\n }\r\n\r\n function addRequestCompanyContactsCsl(){\r\n if(vm.supportCompany.csl_contact_name != undefined && vm.supportCompany.csl_contact_name != \"\"){\r\n vm.companyContactCsl = {};\r\n //vm.companyContact.id = vm.count;\r\n vm.companyContactCsl.id = vm.supportCompany.csl_contact_id;\r\n vm.companyContactCsl.contact_name = vm.supportCompany.csl_contact_name;\r\n vm.companyContactCsl.office_location = vm.supportCompany.csl_contact_location;\r\n vm.companyContactsCsl.push(vm.companyContactCsl);\r\n vm.clearCompanyContactCsl();\r\n vm.count2 = vm.count2 + 1;\r\n }\r\n }\r\n\r\n\r\n function addRequestCompanyContactsCfs(){\r\n if(vm.supportCompany.cfs_contact_name != undefined && vm.supportCompany.cfs_contact_name != \"\"){\r\n vm.companyContactCfs = {};\r\n //vm.companyContact.id = vm.count;\r\n vm.companyContactCfs.id = vm.supportCompany.cfs_contact_id;\r\n vm.companyContactCfs.contact_name = vm.supportCompany.cfs_contact_name;\r\n vm.companyContactCfs.office_location = vm.supportCompany.cfs_contact_location;\r\n vm.companyContactsCfs.push(vm.companyContactCfs);\r\n vm.clearCompanyContactCfs();\r\n vm.count3 = vm.count3 + 1;\r\n }\r\n }\r\n\r\n\r\n function editCompanyDepartmentListCww(index){\r\n var item;\r\n var departmentData = vm.companyDepartmentsCww[index];\r\n vm.editDepatmentId = index;\r\n vm.editCheckCww = true;\r\n vm.supportCompanyEditRow.id = departmentData.id;\r\n vm.supportCompanyEditRow.cww_department_name = departmentData.name;\r\n vm.supportCompanyEditRow.cww_party_group_ids = departmentData.party_or_group_ids;\r\n //vm.supportCompanyEditRow.department_name = departmentData.department_name;\r\n vm.supportCompanyEditRow.cww_default_contact = departmentData.primary_contact.id;\r\n vm.supportCompanyEditRow.cww_default_contact_name = departmentData.primary_contact.email;\r\n vm.supportCompanyEditRow.cww_default_bccs = departmentData.bcc_override;\r\n vm.supportCompanyEditRow.is_magno = departmentData.magno_re_skin;\r\n\r\n setTimeout(function(){\r\n var nodes =angular.element( document.querySelectorAll( '.cwwdepartment-chips .md-chip .md-chip-content' ));\r\n for(item in nodes){\r\n try{\r\n var myEl = nodes[item];\r\n angular.element( document.querySelectorAll( '.cwwdepartment-chips .md-chip'))[item].className+=\r\n ( !vm.notexistIds.includes(myEl.innerText) ? \" database-exist\" : \" database-notexist\")\r\n }\r\n catch(e){console.warn(e)}\r\n }\r\n },100)\r\n\r\n // console.log(vm.supportCompanyEditRow)\r\n }\r\n\r\n function editCompanyUserListCww(index){\r\n var userData = vm.companyUsersCww[index];\r\n vm.editUserId = index;\r\n vm.editCheckCwwUser = true;\r\n vm.supportCompanyEditRow.id = vm.editUserId;\r\n vm.supportCompanyEditRow.cww_user_first_name = userData.first_name;\r\n vm.supportCompanyEditRow.cww_user_last_name = userData.last_name;\r\n vm.supportCompanyEditRow.cww_user_email = userData.email;\r\n vm.supportCompanyEditRow.classic_access = userData.classic_access;\r\n vm.supportCompanyEditRow.portal_role = userData.portal_role;\r\n vm.supportCompanyEditRow.classic_role = userData.classic_role;\r\n vm.supportCompanyEditRow.cww_customer_type = userData.cww_access;\r\n vm.supportCompanyEditRow.csl_customer_type = userData.csl_access;\r\n vm.supportCompanyEditRow.cfs_customer_type = userData.cfs_access;\r\n vm.supportCompanyEditRow.financial_customer_type = userData.financial;\r\n vm.supportCompanyEditRow.cww_overrides = userData.cww_overrides;\r\n vm.supportCompanyEditRow.csl_overrides = userData.csl_overrides;\r\n vm.supportCompanyEditRow.cfs_overrides = userData.cfs_overrides;\r\n }\r\n\r\n function editCompanyDepartmentListCsl(index){\r\n var item;\r\n var departmentData = vm.companyDepartmentsCsl[index];\r\n vm.editDepatmentId = index;\r\n vm.editCheckCsl = true;\r\n vm.supportCompanyEditRow.id = departmentData.id;\r\n vm.supportCompanyEditRow.csl_department_name = departmentData.name;\r\n vm.supportCompanyEditRow.csl_customer_ids = departmentData.customer_ids;\r\n //vm.supportCompanyEditRow.department_name = departmentData.department_name;\r\n vm.supportCompanyEditRow.csl_default_contact = departmentData.primary_contact.id;\r\n vm.supportCompanyEditRow.csl_default_contact_name = departmentData.primary_contact.email;\r\n vm.supportCompanyEditRow.csl_default_bccs = departmentData.bcc_override;\r\n\r\n setTimeout(function(){\r\n var nodes =angular.element( document.querySelectorAll( '.csldepartment-chips .md-chip .md-chip-content' ));\r\n for(item in nodes){\r\n try{\r\n var myEl = nodes[item];\r\n angular.element( document.querySelectorAll( '.csldepartment-chips .md-chip'))[item].className+=\r\n ( !vm.notexistIds.includes(myEl.innerText) ? \" database-exist\" : \" database-notexist\")\r\n }\r\n catch(e){console.warn(e)}\r\n }\r\n },100)\r\n\r\n\r\n // console.log(vm.supportCompanyEditRow)\r\n }\r\n\r\n function editCompanyDepartmentListCfs(index){\r\n var item;\r\n var departmentData = vm.companyDepartmentsCfs[index];\r\n vm.editDepatmentId = index;\r\n vm.editCheckCfs = true;\r\n vm.supportCompanyEditRow.id = departmentData.id;\r\n vm.supportCompanyEditRow.cfs_department_name = departmentData.name;\r\n vm.supportCompanyEditRow.cfs_customer_ids = departmentData.customer_ids;\r\n //vm.supportCompanyEditRow.department_name = departmentData.department_name;\r\n vm.supportCompanyEditRow.cfs_default_contact = departmentData.primary_contact.id;\r\n vm.supportCompanyEditRow.cfs_default_contact_name = departmentData.primary_contact.email;\r\n vm.supportCompanyEditRow.cfs_default_bccs = departmentData.bcc_override;\r\n\r\n setTimeout(function(){\r\n var nodes =angular.element( document.querySelectorAll( '.cfsdepartment-chips .md-chip .md-chip-content' ));\r\n for(item in nodes){\r\n try{\r\n var myEl = nodes[item];\r\n angular.element( document.querySelectorAll( '.cfsdepartment-chips .md-chip'))[item].className+=\r\n ( !vm.notexistIds.includes(myEl.innerText) ? \" database-exist\" : \" database-notexist\")\r\n }\r\n catch(e){console.warn(e)}\r\n }\r\n },100)\r\n\r\n // console.log(vm.supportCompanyEditRow)\r\n }\r\n\r\n function submitEditCompanyDepartmentCww(index){\r\n vm.contactEmail = \"\";\r\n if(vm.supportCompanyEditRow.cww_department_name != undefined && vm.supportCompanyEditRow.cww_department_name != \"\"){\r\n vm.companyDepartment = {};\r\n angular.forEach(vm.possibleContacts, function(v,k){\r\n if(v.id===vm.supportCompanyEditRow.cww_default_contact){\r\n vm.contactEmail = v.email;\r\n }\r\n });\r\n vm.companyDepartment.id = vm.supportCompanyEditRow.id;\r\n vm.companyDepartment.name = vm.supportCompanyEditRow.cww_department_name;\r\n if(vm.supportCompanyEditRow.cww_default_contact){\r\n vm.companyDepartment.primary_contact = {id:vm.supportCompanyEditRow.cww_default_contact,email:vm.contactEmail};\r\n }else{\r\n vm.companyDepartment.primary_contact = {};\r\n }\r\n if(vm.supportCompanyEditRow.cww_default_bccs.length > 0){\r\n vm.companyDepartment.bcc_override = vm.supportCompanyEditRow.cww_default_bccs;\r\n }else{\r\n vm.companyDepartment.bcc_override = [];\r\n }\r\n if(vm.supportCompanyEditRow.cww_party_group_ids.length > 0){\r\n vm.companyDepartment.party_or_group_ids = (vm.supportCompanyEditRow.cww_party_group_ids).toLocaleString().toUpperCase().split(',');\r\n }else{\r\n vm.companyDepartment.party_or_group_ids = [];\r\n }\r\n vm.companyDepartment.magno_re_skin = vm.supportCompanyEditRow.is_magno;\r\n //clearEditCompanyDepartment();\r\n vm.companyDepartmentsCww[index] = vm.companyDepartment;\r\n vm.editCheckCww = false;\r\n }\r\n\r\n }\r\n\r\n\r\n function submitEditCompanyDepartmentCsl(index){\r\n vm.contactEmail = \"\";\r\n if(vm.supportCompanyEditRow.csl_department_name != undefined && vm.supportCompanyEditRow.csl_department_name != \"\"){\r\n vm.companyDepartment = {};\r\n angular.forEach(vm.possibleContacts, function(v,k){\r\n if(v.id===vm.supportCompanyEditRow.csl_default_contact){\r\n vm.contactEmail = v.email;\r\n }\r\n });\r\n vm.companyDepartment.id = vm.supportCompanyEditRow.id;\r\n vm.companyDepartment.name = vm.supportCompanyEditRow.csl_department_name;\r\n if(vm.supportCompanyEditRow.csl_default_contact){\r\n vm.companyDepartment.primary_contact = {id:vm.supportCompanyEditRow.csl_default_contact,email:vm.contactEmail};\r\n }else{\r\n vm.companyDepartment.primary_contact = {};\r\n }\r\n if(vm.supportCompanyEditRow.csl_default_bccs.length > 0){\r\n vm.companyDepartment.bcc_override = vm.supportCompanyEditRow.csl_default_bccs;\r\n }else{\r\n vm.companyDepartment.bcc_override = [];\r\n }\r\n if(vm.supportCompanyEditRow.csl_customer_ids.length > 0){\r\n vm.companyDepartment.customer_ids = (vm.supportCompanyEditRow.csl_customer_ids).toLocaleString().toUpperCase().split(',');\r\n }else{\r\n vm.companyDepartment.customer_ids = [];\r\n }\r\n //clearEditCompanyDepartment();\r\n vm.companyDepartmentsCsl[index] = vm.companyDepartment;\r\n vm.editCheckCsl = false;\r\n }\r\n\r\n }\r\n\r\n function submitEditCompanyDepartmentCfs(index){\r\n vm.contactEmail = \"\";\r\n if(vm.supportCompanyEditRow.cfs_department_name != undefined && vm.supportCompanyEditRow.cfs_department_name != \"\"){\r\n vm.companyDepartment = {};\r\n angular.forEach(vm.possibleContacts, function(v,k){\r\n if(v.id===vm.supportCompanyEditRow.cfs_default_contact){\r\n vm.contactEmail = v.email;\r\n }\r\n });\r\n vm.companyDepartment.id = vm.supportCompanyEditRow.id;\r\n vm.companyDepartment.name = vm.supportCompanyEditRow.cfs_department_name;\r\n if(vm.supportCompanyEditRow.cfs_default_contact){\r\n vm.companyDepartment.primary_contact = {id:vm.supportCompanyEditRow.cfs_default_contact,email:vm.contactEmail};\r\n }else{\r\n vm.companyDepartment.primary_contact = {};\r\n }\r\n if(vm.supportCompanyEditRow.cfs_default_bccs.length > 0){\r\n vm.companyDepartment.bcc_override = vm.supportCompanyEditRow.cfs_default_bccs;\r\n }else{\r\n vm.companyDepartment.bcc_override = [];\r\n }\r\n if(vm.supportCompanyEditRow.cfs_customer_ids.length > 0){\r\n vm.companyDepartment.customer_ids = (vm.supportCompanyEditRow.cfs_customer_ids).toLocaleString().toUpperCase().split(',');\r\n }else{\r\n vm.companyDepartment.customer_ids = [];\r\n }\r\n //clearEditCompanyDepartment();\r\n vm.companyDepartmentsCfs[index] = vm.companyDepartment;\r\n vm.editCheckCfs = false;\r\n }\r\n\r\n }\r\n\r\n function submitEditCompanyUserCww(index){\r\n\r\n if(vm.supportCompanyEditRow.cww_user_first_name != undefined && vm.supportCompanyEditRow.cww_user_first_name != \"\"){\r\n vm.companyUser = {};\r\n\r\n if(vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic){\r\n if(vm.supportCompany.portalType == 'customer'){\r\n if(vm.supportCompanyEditRow.financial_customer_type == true){\r\n vm.supportCompanyEditRow.portal_role = 'customer';\r\n }\r\n if(vm.supportCompanyEditRow.financial_customer_type == false){\r\n vm.supportCompanyEditRow.portal_role = 'customer_no_financial';\r\n }\r\n }else if(vm.supportCompany.portalType == 'consignee'){\r\n vm.supportCompanyEditRow.portal_role = 'customer_consignee';\r\n }else if(vm.supportCompany.portalType == 'shipper'){\r\n vm.supportCompanyEditRow.portal_role = 'customer_shipper';\r\n }\r\n }\r\n\r\n if(vm.supportCompany.accessTypeStandard && !vm.supportCompany.accessTypeClassic){\r\n if(vm.supportCompany.portalType == 'customer'){\r\n if(vm.supportCompanyEditRow.financial_customer_type == true){\r\n vm.supportCompanyEditRow.portal_role = 'customer';\r\n }\r\n if(vm.supportCompanyEditRow.financial_customer_type == false){\r\n vm.supportCompanyEditRow.portal_role = 'customer_no_financial';\r\n }\r\n }else if(vm.supportCompany.portalType == 'consignee'){\r\n vm.supportCompanyEditRow.portal_role = 'customer_consignee';\r\n }else if(vm.supportCompany.portalType == 'shipper'){\r\n vm.supportCompanyEditRow.portal_role = 'customer_shipper';\r\n }\r\n }\r\n\r\n vm.companyUser.id = vm.supportCompanyEditRow.id;\r\n vm.companyUser.first_name = vm.supportCompanyEditRow.cww_user_first_name;\r\n vm.companyUser.last_name = vm.supportCompanyEditRow.cww_user_last_name;\r\n vm.companyUser.email = vm.supportCompanyEditRow.cww_user_email;\r\n vm.companyUser.portal_role = vm.supportCompanyEditRow.portal_role;\r\n vm.companyUser.classic_role = vm.supportCompanyEditRow.classic_role;\r\n vm.companyUser.classic_access = vm.supportCompanyEditRow.classic_access;\r\n vm.companyUser.cww_access = vm.supportCompanyEditRow.cww_customer_type;\r\n vm.companyUser.csl_access = vm.supportCompanyEditRow.csl_customer_type;\r\n vm.companyUser.cfs_access = vm.supportCompanyEditRow.cfs_customer_type;\r\n vm.companyUser.financial = vm.supportCompanyEditRow.financial_customer_type;\r\n vm.companyUser.cww_overrides = vm.supportCompanyEditRow.cww_overrides;\r\n vm.companyUser.csl_overrides = vm.supportCompanyEditRow.csl_overrides;\r\n vm.companyUser.cfs_overrides = vm.supportCompanyEditRow.cfs_overrides;\r\n\r\n //clearEditCompanyDepartment();\r\n vm.companyUsersCww[index] = vm.companyUser;\r\n vm.editCheckCwwUser = false;\r\n }\r\n\r\n }\r\n\r\n\r\n function removeDepartment(id,index){\r\n\r\n angular.forEach(vm.departments, function(v,k){\r\n if(v.id===id){\r\n vm.departments.splice(k,1);\r\n }\r\n });\r\n // Removing element\r\n var myEl = angular.element( document.querySelector( '.savedDepartment'+index ) );\r\n myEl.remove();\r\n }\r\n\r\n function getMatch(key, query){\r\n return SupportRequestsService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function formIsValid(){\r\n if (vm.GeneralRequestForm){\r\n return vm.GeneralRequestForm.$valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/support-requests/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n }\r\n\r\n function showValidationToasts(file, message,status) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/support-requests/toast/' + file,\r\n locals: {message: message,status:status},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n $scope.status = status;\r\n }\r\n });\r\n }\r\n\r\n function showExportCSV(ev){\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n if (vm.queryState.displayNoResults){\r\n $mdDialog.show({\r\n templateUrl: '/app/track-trace/exports/no-results.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n controller: function DialogController($scope, $mdDialog){\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n } else {\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/support-requests/exports/export-csv.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n controller: function DialogController($scope, $mdDialog){\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n $scope.exportAll = function() {\r\n var params = ServerTableSRService.getParams();\r\n $scope.exportCsvLoaded = false;\r\n SupportRequestsService.exportSearchFields([], params).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function() {\r\n $mdDialog.hide();\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n };\r\n $scope.exportCustom = function() {\r\n var fields = CustomResultsService.getActiveColumns();\r\n var params = ServerTableService.getParams();\r\n $scope.exportCsvLoaded = false;\r\n SupportRequestsService.exportSearchFields(fields, params).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function() {\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n };\r\n $scope.exportCsvLoaded = true;\r\n }\r\n });\r\n }\r\n }\r\n\r\n\r\n\r\n function getCount(){\r\n\r\n ServerTableSRService.getCount().then(function(res){\r\n\r\n vm.open_status_count = res['open'];\r\n vm.in_review_count = res['in_review'];\r\n vm.awaiting_demo_count = res['awaiting_demo'];\r\n vm.total_account_tickets = res['total_account_tickets'];\r\n vm.total_company_tickets = res['total_company_tickets'];\r\n vm.total_general_tickets = res['total_general_tickets'];\r\n\r\n }).catch(function(err) {\r\n\r\n //vm.failedToRetrieveData = err.data.error;\r\n });\r\n\r\n }\r\n\r\n function getData(params){\r\n\r\n var tab_name = params;\r\n\r\n if(params == undefined || params == null ){\r\n tab_name = 'company_tickets';\r\n }\r\n\r\n $rootScope.supportRequestTab = tab_name;\r\n\r\n SupportRequestsService.setTicketType(tab_name);\r\n ServerTableSRService.getData(tab_name).then(function(res){\r\n\r\n isEmpty = res.total == 0;\r\n state.loading = false;\r\n var error = res.error ? res.error : undefined;\r\n\r\n var total = res.data[tab_name].length;\r\n\r\n vm.ngTableData.state['loading'] = false;\r\n vm.ngTableData.error = error;\r\n vm.ngTableData.settings = {data: res.data[tab_name]};\r\n vm.ngTableData.data = res.data[tab_name];\r\n vm.ngTableData.total = total;\r\n\r\n vm.noResults = (res.data[tab_name].length)?false:true;\r\n vm.isError = false;\r\n vm.queryState.displayNoResults = vm.noResults;\r\n\r\n ServerTableSRService.ngTableReload(vm.ngTableData);\r\n\r\n vm.ngTableData = new Object();\r\n vm.ngTableData.state = new Object();\r\n\r\n }).catch(function(err) {\r\n vm.noResults = true;\r\n vm.isError = true;\r\n vm.ngTableData.state['loading'] = false;\r\n vm.ngTableData.error = error;\r\n vm.ngTableData.total = 0;\r\n ServerTableSRService.ngTableReload(vm.ngTableData);\r\n\r\n vm.ngTableData = new Object();\r\n vm.ngTableData.state = new Object();\r\n //vm.failedToRetrieveData = err.data.error;\r\n });\r\n\r\n }\r\n\r\n\r\n //new support functions\r\n\r\n vm.customer_type_cehck = true;\r\n\r\n function cww_setup(val){\r\n if(vm.supportCompany.is_cww == true || vm.supportCompany.is_csl == true || vm.supportCompany.is_cfs == true){\r\n vm.customer_type_cehck = false;\r\n vm.primaryContactCheckCww = true;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n vm.primaryContactCheckCww = false;\r\n }\r\n }\r\n\r\n function csl_setup(val){\r\n if(vm.supportCompany.is_cww == true || vm.supportCompany.is_csl == true || vm.supportCompany.is_cfs == true){\r\n vm.customer_type_cehck = false;\r\n vm.primaryContactCheckCsl = true;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n vm.primaryContactCheckCsl = false;\r\n }\r\n }\r\n\r\n function cfs_setup(val){\r\n if(vm.supportCompany.is_cww == true || vm.supportCompany.is_csl == true || vm.supportCompany.is_cfs == true){\r\n vm.customer_type_cehck = false;\r\n vm.primaryContactCheckCfs = true;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n vm.primaryContactCheckCfs = false;\r\n }\r\n }\r\n\r\n function portalChangeEdit(val){\r\n if((val == 'consignee' || val == 'shipper') && (vm.supportCompany.accessTypeStandard == true)){\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n }\r\n if((val == 'customer') && (vm.supportCompany.accessTypeStandard == true)){\r\n vm.checkboxCustType = false;\r\n vm.checkboxCustType1 = false;\r\n vm.customerTypeEnableCheck = true;\r\n }\r\n if((val == 'consignee' || val == 'shipper' || val == 'customer')\r\n && (vm.supportCompany.accessTypeClassic == true)){\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n }\r\n if((val == 'consignee' || val == 'shipper')\r\n && (vm.supportCompany.accessTypeStandard == true)\r\n && (vm.supportCompany.accessTypeClassic == true)){\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n }\r\n if((val == 'customer')\r\n && (vm.supportCompany.accessTypeStandard == true)\r\n && (vm.supportCompany.accessTypeClassic == true)){\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = false;\r\n vm.checkboxCustType1 = true;\r\n }\r\n }\r\n\r\n function portalChange(val){\r\n if((val == 'consignee' || val == 'shipper') && (vm.supportCompany.accessTypeStandard == true)){\r\n vm.supportCompany.is_cww = true;\r\n vm.supportCompany.is_csl = false;\r\n vm.supportCompany.is_cfs = false;\r\n vm.customerTypeEnableCheck = true;\r\n vm.customer_type_cehck = false;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n }\r\n if((val == 'customer') && (vm.supportCompany.accessTypeStandard == true)){\r\n vm.supportCompany.is_cww = false;\r\n vm.supportCompany.is_csl = false;\r\n vm.supportCompany.is_cfs = false;\r\n vm.checkboxCustType = false;\r\n vm.checkboxCustType1 = false;\r\n vm.customer_type_cehck = true;\r\n vm.customerTypeEnableCheck = true;\r\n }\r\n if((val == 'consignee' || val == 'shipper' || val == 'customer')\r\n && (vm.supportCompany.accessTypeClassic == true)){\r\n vm.supportCompany.is_cww = true;\r\n vm.supportCompany.is_csl = false;\r\n vm.supportCompany.is_cfs = false;\r\n vm.customerTypeEnableCheck = true;\r\n vm.customer_type_cehck = false;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n }\r\n if((val == 'consignee' || val == 'shipper')\r\n && (vm.supportCompany.accessTypeStandard == true)\r\n && (vm.supportCompany.accessTypeClassic == true)){\r\n vm.supportCompany.is_cww = true;\r\n vm.supportCompany.is_csl = false;\r\n vm.supportCompany.is_cfs = false;\r\n vm.customerTypeEnableCheck = true;\r\n vm.customer_type_cehck = false;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n }\r\n if((val == 'customer')\r\n && (vm.supportCompany.accessTypeStandard == true)\r\n && (vm.supportCompany.accessTypeClassic == true)){\r\n vm.supportCompany.is_cww = true;\r\n vm.supportCompany.is_csl = false;\r\n vm.supportCompany.is_cfs = false;\r\n vm.customerTypeEnableCheck = true;\r\n vm.customer_type_cehck = false;\r\n vm.checkboxCustType = false;\r\n vm.checkboxCustType1 = true;\r\n }\r\n }\r\n\r\n function accessType(type,val){\r\n if(type == 'standard' && val == false){\r\n vm.supportCompany.portalType = \"\";\r\n vm.supportCompany.is_cww = false;\r\n vm.supportCompany.is_csl = false;\r\n vm.supportCompany.is_cfs = false;\r\n vm.accessTypeEnableCheck = false;\r\n vm.customer_type_cehck = true;\r\n if(vm.supportCompany.accessTypeClassic == true){\r\n vm.accessTypeEnableCheck = true;\r\n }else{ vm.accessTypeEnableCheck = false; }\r\n\r\n }\r\n if(type == 'standard' && val == true){\r\n vm.supportCompany.portalType = \"\";\r\n vm.accessTypeEnableCheck = true;\r\n vm.customerTypeEnableCheck = false;\r\n vm.checkboxCustType = true;\r\n }\r\n if(type == 'classic' && val == true){\r\n vm.supportCompany.portalType = \"\";\r\n vm.accessTypeEnableCheck = true;\r\n vm.customerTypeEnableCheck = false;\r\n vm.checkboxCustType = true;\r\n }\r\n if(type == 'classic' && val == false){\r\n vm.supportCompany.portalType = \"\";\r\n vm.supportCompany.is_cww = false;\r\n vm.supportCompany.is_csl = false;\r\n vm.supportCompany.is_cfs = false;\r\n vm.accessTypeEnableCheck = false;\r\n vm.customer_type_cehck = true;\r\n if(vm.supportCompany.accessTypeStandard == true){\r\n vm.accessTypeEnableCheck = true;\r\n }else{ vm.accessTypeEnableCheck = false; }\r\n }\r\n\r\n if(vm.supportCompany.portalType == \"\"){\r\n vm.customerTypeEnableCheck = false;\r\n vm.checkboxCustType = true;\r\n vm.supportCompany.is_cww = false;\r\n vm.supportCompany.is_csl = false;\r\n vm.supportCompany.is_cfs = false;\r\n vm.customer_type_cehck = true;\r\n\r\n vm.companyDepartmentsCww = [];\r\n vm.companyDepartmentsCfs = [];\r\n vm.companyDepartmentsCsl = [];\r\n vm.companyContactsCww = [];\r\n vm.companyContactsCsl = [];\r\n vm.companyContactsCfs = [];\r\n vm.companyUsersCww = [];\r\n vm.supportCompany.cww_party_id_names = [];\r\n vm.supportCompany.cww_related_party_id_names = [];\r\n vm.supportCompany.csl_customer_ids = [];\r\n vm.supportCompany.cfs_customer_ids = [];\r\n vm.supportCompany.crane_sales_rep = {};\r\n vm.supportCompany.cww_default_bccs = [];\r\n vm.supportCompany.cww_primary_contact_name = {};\r\n vm.searchText2 = \"\";vm.searchText3 = \"\";\r\n vm.searchText5 = \"\";vm.searchText7 = \"\";\r\n vm.supportCompany.cww_primary_contact_phone = \"\";\r\n vm.supportCompany.csl_default_bccs = [];\r\n vm.supportCompany.csl_primary_contact_name = {};\r\n vm.supportCompany.csl_primary_contact_phone = \"\";\r\n vm.supportCompany.cfs_default_bccs = [];\r\n vm.supportCompany.cfs_primary_contact_name = {};\r\n vm.supportCompany.cfs_primary_contact_phone = \"\";\r\n vm.notexistIds = [];\r\n vm.supportCompany.copy_contacts_cfs = false;\r\n vm.supportCompany.copy_contacts_csl = false;\r\n\r\n }\r\n }\r\n\r\n function copyContactsCww(val){\r\n if(val == true){\r\n angular.copy(vm.companyContactsCww,vm.companyContactsCsl);\r\n angular.copy(vm.supportCompany.cww_default_bccs,vm.supportCompany.csl_default_bccs);\r\n vm.supportCompany.csl_primary_contact_name = vm.supportCompany.cww_primary_contact_name;\r\n vm.searchText5 = vm.supportCompany.cww_primary_contact_name.email;\r\n vm.supportCompany.csl_primary_contact_phone = vm.supportCompany.cww_primary_contact_phone;\r\n vm.primaryContactCheckCsl = false;\r\n }else{\r\n vm.primaryContactCheckCsl = true;\r\n }\r\n }\r\n\r\n function copyContactsCfs(val){\r\n if(val == true){\r\n angular.copy(vm.companyContactsCww,vm.companyContactsCfs);\r\n angular.copy(vm.supportCompany.cww_default_bccs,vm.supportCompany.cfs_default_bccs);\r\n vm.supportCompany.cfs_primary_contact_name = vm.supportCompany.cww_primary_contact_name;\r\n vm.searchText7 = vm.supportCompany.cww_primary_contact_name.email;\r\n vm.supportCompany.cfs_primary_contact_phone = vm.supportCompany.cww_primary_contact_phone;\r\n vm.primaryContactCheckCfs = false;\r\n }else{\r\n vm.primaryContactCheckCfs = true;\r\n }\r\n }\r\n\r\n\r\n function getMatchCww(key, query){\r\n return SupportRequestsService.autocompleteCww({field: key, portal_type:vm.supportCompany.portalType, customer_type: 'cww', value: query});\r\n }\r\n\r\n function getMatchCwwUser(key,query){\r\n return SupportRequestsService.autocompleteCww({field: key, portal_type:vm.user_list.company.portal_type, customer_type: 'cww', value: query});\r\n }\r\n\r\n function getMatchCsl(key, query){\r\n return SupportRequestsService.autocompleteCww({field: key, portal_type:vm.supportCompany.portalType, customer_type: 'csl', value: query});\r\n }\r\n\r\n function getMatchCslUser(key, query){\r\n return SupportRequestsService.autocompleteCww({field: key, portal_type:vm.user_list.company.portal_type, customer_type: 'csl', value: query});\r\n }\r\n\r\n function getMatchCfs(key, query){\r\n return SupportRequestsService.autocompleteCww({field: key, portal_type:vm.supportCompany.portalType, customer_type: 'cfs', value: query});\r\n }\r\n\r\n function getMatchCfsUser(key, query){\r\n return SupportRequestsService.autocompleteCww({field: key, portal_type:vm.user_list.company.portal_type, customer_type: 'cfs', value: query});\r\n }\r\n\r\n function selectedCwwPArtyIdChange(item,ctype,type,ptype){\r\n\r\n }\r\n\r\n function addPartyIdsCww(val,index,type,ctype,itype,ptype){\r\n\r\n //var params = \"\";\r\n var query = {};\r\n var id = (val).toUpperCase();\r\n if((itype == 'party_id') && (id)){\r\n //params = '?customer_type='+ctype+'&portal_type='+ptype+'&party_id='+id;\r\n query = {'customer_type':ctype,'portal_type':ptype,'party_id':id};\r\n }\r\n else if((itype == 'related_party_id') && (id)){\r\n //params = '?customer_type='+ctype+'&portal_type='+ptype+'&related_party_id='+id;\r\n query = {'customer_type':ctype,'portal_type':ptype,'related_party_id':id};\r\n }\r\n else if((itype == 'customer_id') && (id)){\r\n //params = '?customer_type='+ctype+'&portal_type='+ptype+'&customer_id='+id;\r\n query = {'customer_type':ctype,'portal_type':ptype,'customer_id':id};\r\n }\r\n else if((itype == 'party_or_group_ids') && (id)){\r\n //params = '?customer_type='+ctype+'&portal_type='+ptype+'&party_or_group_ids='+id;\r\n query = {'customer_type':ctype,'portal_type':ptype,'party_or_group_ids':id};\r\n }\r\n\r\n var url = '/tickets/validate_partyid';\r\n var promise = $http({\r\n url: api.url+url,\r\n method: 'GET',\r\n params: query\r\n }).then(function(res){\r\n if(res.data.is_party == true){\r\n vm.idCheck = true;\r\n }else{\r\n vm.idCheck = false;\r\n vm.notexistIds.push(id);\r\n }\r\n setTimeout(function(){\r\n try{\r\n if(index > 0){\r\n var nodes =angular.element( document.querySelectorAll( '.'+type+'-chips .md-chip' ));\r\n var myEl = nodes[index-1];\r\n myEl.className+= ((vm.idCheck == true) ? \" database-exist\" : \" database-notexist\")\r\n }\r\n }\r\n catch(e){\r\n console.warn(\"test\",e)\r\n }\r\n }, 200);\r\n });\r\n\r\n\r\n\r\n\r\n }\r\n //end support requests\r\n\r\n function thresholdChange(val,type){\r\n\r\n if(type == 'mins'){\r\n if(parseInt(vm.supportCompany.csl_exception_minutes) > 59){\r\n vm.showMinsError = true;\r\n }else{\r\n vm.showMinsError = false;\r\n }\r\n if(val == undefined){\r\n vm.showMinsError = false;\r\n }\r\n\r\n }\r\n\r\n if(type == 'hrs'){\r\n var hrscheck = /^\\d+$/.test(vm.supportCompany.csl_exception_hours);\r\n if(!hrscheck){\r\n vm.showhrsError = true;\r\n }else{\r\n vm.showhrsError = false;\r\n }\r\n if(val == undefined){\r\n vm.showhrsError = false;\r\n }\r\n }\r\n }\r\n\r\n function csl_threshold_default(val,hrs,mins){\r\n if(hrs == undefined){\r\n hrs = '00';\r\n }\r\n if(mins == undefined){\r\n mins = '00';\r\n }\r\n if(val == true){\r\n vm.supportCompany.csl_exception_hours = '00';\r\n vm.supportCompany.csl_exception_minutes = '00';\r\n }\r\n if(val == false){\r\n vm.supportCompany.csl_exception_hours = (hrs !== '00') ? hrs : '00';\r\n vm.supportCompany.csl_exception_minutes = (mins !== '00') ? mins : '00';\r\n }\r\n }\r\n\r\n\r\n function cwwDeparmentChips(departmentsCww){\r\n for( var j=0; j<departmentsCww.length; j++){\r\n departmentsCww[j].party_or_group_ids = departmentsCww[j].party_or_group_ids.concat(departmentsCww[j].invalide_party_or_group_ids);\r\n }\r\n return departmentsCww;\r\n }\r\n\r\n function cwwInvalidIds(departmentsCwwInvalid){\r\n var cwwInvalid = [];\r\n for( var m=0; m<departmentsCwwInvalid.length; m++){\r\n cwwInvalid = cwwInvalid.concat(departmentsCwwInvalid[m].invalide_party_or_group_ids);\r\n }\r\n return cwwInvalid;\r\n }\r\n\r\n function cslDeparmentChips(departmentsCsl){\r\n for( var k=0; k<departmentsCsl.length; k++){\r\n departmentsCsl[k].customer_ids = departmentsCsl[k].customer_ids.concat(departmentsCsl[k].invalide_customer_ids);\r\n }\r\n return departmentsCsl;\r\n }\r\n\r\n function cslInvalidIds(departmentsCslInvalid){\r\n var cslInvalid = [];\r\n for( var n=0; n<departmentsCslInvalid.length; n++){\r\n cslInvalid = cslInvalid.concat(departmentsCslInvalid[n].invalide_customer_ids);\r\n }\r\n return cslInvalid;\r\n }\r\n\r\n function cfsDeparmentChips(departmentsCfs){\r\n for( var l=0; l<departmentsCfs.length; l++){\r\n departmentsCfs[l].customer_ids = departmentsCfs[l].customer_ids.concat(departmentsCfs[l].invalide_customer_ids);\r\n }\r\n return departmentsCfs;\r\n\r\n }\r\n\r\n function cfsInvalidIds(departmentsCfsInvalid){\r\n var cfsInvalid = [];\r\n for( var o=0; o<departmentsCfsInvalid.length; o++){\r\n cfsInvalid = cfsInvalid.concat(departmentsCfsInvalid[o].invalide_customer_ids);\r\n }\r\n return cfsInvalid;\r\n }\r\n\r\n function getEditCompanyDetails(response){\r\n\r\n if(response.data.ticket.customer_types.includes('cww')){\r\n vm.supportCompany.is_cww = true;\r\n\r\n vm.supportCompany.is_reskin = response.data.ticket.customer_configurations.cww.is_reskin;\r\n\r\n if(response.data.ticket.customer_configurations.cww.primary_crane_contact){\r\n vm.supportCompany.cww_primary_contact_name = response.data.ticket.customer_configurations.cww.primary_crane_contact;\r\n vm.supportCompany.cww_primary_contact_phone = vm.supportCompany.cww_primary_contact_name.phone_no;\r\n }\r\n else\r\n {\r\n vm.supportCompany.cww_primary_contact_name = {};\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.cww.default_bccs){\r\n if(response.data.ticket.customer_configurations.cww.default_bccs.length > 0){\r\n vm.supportCompany.cww_default_bccs = response.data.ticket.customer_configurations.cww.default_bccs;\r\n } }\r\n else\r\n {\r\n vm.supportCompany.cww_default_bccs = [];\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.cww.party_id_names){\r\n if(response.data.ticket.customer_configurations.cww.party_id_names.length > 0){\r\n var arr1 = (response.data.ticket.customer_configurations.cww.invalid_party_id_names);\r\n vm.supportCompany.cww_party_id_names = (response.data.ticket.customer_configurations.cww.party_id_names).concat(response.data.ticket.customer_configurations.cww.invalid_party_id_names);\r\n setTimeout(function(){\r\n try{\r\n var curNode =angular.element( document.querySelectorAll( '.party-chips .md-chip .md-chip-content' ));\r\n for(var item in curNode){\r\n var myEl = curNode[item];\r\n if(myEl.innerText){\r\n var invalid =response.data.ticket.customer_configurations.cww.invalid_party_id_names.includes(myEl.innerText)\r\n angular.element( document.querySelectorAll( '.party-chips .md-chip'))[item].className+=\r\n ( !invalid ? \" database-exist\" : \" database-notexist\")\r\n }\r\n }\r\n }\r\n catch(e){console.warn(e)}\r\n },200);\r\n } }\r\n else\r\n {\r\n vm.supportCompany.cww_party_id_names = [];\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.cww.related_party_id_names){\r\n if(response.data.ticket.customer_configurations.cww.related_party_id_names.length > 0){\r\n var arr2 = (response.data.ticket.customer_configurations.cww.invalid_related_party_id_names);\r\n vm.supportCompany.cww_related_party_id_names = (response.data.ticket.customer_configurations.cww.related_party_id_names).concat(response.data.ticket.customer_configurations.cww.invalid_related_party_id_names);\r\n setTimeout(function(){\r\n try{\r\n var curNode1 =angular.element( document.querySelectorAll( '.group-chips .md-chip .md-chip-content' ));\r\n for(var item1 in curNode1){\r\n var myEl1 = curNode1[item1];\r\n if(myEl1.innerText){\r\n var invalid1 =response.data.ticket.customer_configurations.cww.invalid_related_party_id_names.includes(myEl1.innerText)\r\n angular.element( document.querySelectorAll( '.group-chips .md-chip'))[item1].className+=\r\n ( !invalid1 ? \" database-exist\" : \" database-notexist\")\r\n }\r\n }\r\n }\r\n catch(e){console.warn(e)}\r\n },200);\r\n } }\r\n else\r\n {\r\n vm.supportCompany.cww_related_party_id_names = [];\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.cww.operation_contacts){\r\n if(response.data.ticket.customer_configurations.cww.operation_contacts.length > 0){\r\n vm.companyContactsCww = response.data.ticket.customer_configurations.cww.operation_contacts;\r\n } }\r\n else\r\n {\r\n vm.companyContactsCww = [];\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.cww.departments){\r\n if(response.data.ticket.customer_configurations.cww.departments.length > 0){\r\n vm.companyDepartmentsCww = vm.cwwDeparmentChips(response.data.ticket.customer_configurations.cww.departments);\r\n var arr5 = vm.cwwInvalidIds(response.data.ticket.customer_configurations.cww.departments);\r\n } }\r\n else\r\n {\r\n vm.companyDepartmentsCww = [];\r\n }\r\n\r\n }else{ vm.supportCompany.is_cww = false; }\r\n\r\n if(response.data.ticket.customer_types.includes('csl')){\r\n vm.supportCompany.is_csl = true;\r\n\r\n $rootScope.hoursCheck = (response.data.ticket.customer_configurations.csl.exception_threshold_hours ? response.data.ticket.customer_configurations.csl.exception_threshold_hours : 0);\r\n $rootScope.minutesCheck = (response.data.ticket.customer_configurations.csl.exception_threshold_minutes ? response.data.ticket.customer_configurations.csl.exception_threshold_minutes : 0);\r\n if($rootScope.hoursCheck == 0 && $rootScope.minutesCheck == 0){\r\n vm.supportCompany.is_threshold_default = true;\r\n }else{\r\n vm.supportCompany.is_threshold_default = false;\r\n }\r\n vm.supportCompany.csl_exception_hours = (response.data.ticket.customer_configurations.csl.exception_threshold_hours == 0)? '00' : response.data.ticket.customer_configurations.csl.exception_threshold_hours;\r\n vm.supportCompany.csl_exception_minutes = (response.data.ticket.customer_configurations.csl.exception_threshold_minutes == 0)? '00' : response.data.ticket.customer_configurations.csl.exception_threshold_minutes;\r\n vm.supportCompany.csl_exception_hours_exist = (response.data.ticket.customer_configurations.csl.exception_threshold_hours == 0)? '00' : response.data.ticket.customer_configurations.csl.exception_threshold_hours;\r\n vm.supportCompany.csl_exception_minutes_exist = (response.data.ticket.customer_configurations.csl.exception_threshold_minutes == 0)? '00' : response.data.ticket.customer_configurations.csl.exception_threshold_minutes;\r\n\r\n\r\n if(response.data.ticket.customer_configurations.csl.do_not_send_exception_mails == true){\r\n response.data.ticket.customer_configurations.csl.do_not_send_exception_mails = true;\r\n vm.supportCompany.is_send_exception_email = true;\r\n }\r\n if(response.data.ticket.customer_configurations.csl.do_not_send_exception_mails == false){\r\n vm.supportCompany.is_send_exception_email = false;\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.csl.show_shipment_class == true){\r\n response.data.ticket.customer_configurations.csl.show_shipment_class = true;\r\n vm.supportCompany.is_show_class = true;\r\n }\r\n if(response.data.ticket.customer_configurations.csl.show_shipment_class == false){\r\n vm.supportCompany.is_show_class = false;\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.csl.primary_crane_contact){\r\n vm.supportCompany.csl_primary_contact_name = response.data.ticket.customer_configurations.csl.primary_crane_contact;\r\n vm.supportCompany.csl_primary_contact_phone = vm.supportCompany.csl_primary_contact_name.phone_no;\r\n }\r\n else\r\n {\r\n vm.supportCompany.csl_primary_contact_name = {};\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.csl.default_bccs){\r\n if(response.data.ticket.customer_configurations.csl.default_bccs.length > 0){\r\n vm.supportCompany.csl_default_bccs = response.data.ticket.customer_configurations.csl.default_bccs;\r\n } }\r\n else\r\n {\r\n vm.supportCompany.csl_default_bccs = [];\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.csl.customer_ids){\r\n if(response.data.ticket.customer_configurations.csl.customer_ids.length > 0){\r\n var arr3 = (response.data.ticket.customer_configurations.csl.invalid_customer_ids);\r\n vm.supportCompany.csl_customer_ids = (response.data.ticket.customer_configurations.csl.customer_ids).concat(response.data.ticket.customer_configurations.csl.invalid_customer_ids);\r\n setTimeout(function(){\r\n try{\r\n var curNode2 =angular.element( document.querySelectorAll( '.cslcustomer-chips .md-chip .md-chip-content' ));\r\n for(var item2 in curNode2){\r\n var myEl2 = curNode2[item2];\r\n if(myEl2.innerText){\r\n var invalid2 =response.data.ticket.customer_configurations.csl.invalid_customer_ids.includes(myEl2.innerText)\r\n angular.element( document.querySelectorAll( '.cslcustomer-chips .md-chip'))[item2].className+=\r\n ( !invalid2 ? \" database-exist\" : \" database-notexist\")\r\n }\r\n }\r\n }\r\n catch(e){console.warn(e)}\r\n },200);\r\n } }\r\n else\r\n {\r\n vm.supportCompany.csl_customer_ids = [];\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.csl.operation_contacts){\r\n if(response.data.ticket.customer_configurations.csl.operation_contacts.length > 0){\r\n vm.companyContactsCsl = response.data.ticket.customer_configurations.csl.operation_contacts;\r\n } }\r\n else\r\n {\r\n vm.companyContactsCsl = [];\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.csl.departments){\r\n if(response.data.ticket.customer_configurations.csl.departments.length > 0){\r\n vm.companyDepartmentsCsl = vm.cslDeparmentChips(response.data.ticket.customer_configurations.csl.departments);\r\n var arr6 = vm.cslInvalidIds(response.data.ticket.customer_configurations.csl.departments);\r\n } }\r\n else\r\n {\r\n vm.companyDepartmentsCsl = [];\r\n }\r\n\r\n }else{\r\n vm.supportCompany.is_csl = false;\r\n vm.supportCompany.is_threshold_default = true;\r\n vm.supportCompany.csl_exception_hours = '00';\r\n vm.supportCompany.csl_exception_minutes = '00';\r\n }\r\n\r\n if(response.data.ticket.customer_types.includes('cfs')){\r\n vm.supportCompany.is_cfs = true;\r\n\r\n if(response.data.ticket.customer_configurations.cfs.primary_crane_contact){\r\n vm.supportCompany.cfs_primary_contact_name = response.data.ticket.customer_configurations.cfs.primary_crane_contact;\r\n vm.supportCompany.cfs_primary_contact_phone = vm.supportCompany.cfs_primary_contact_name.phone_no;\r\n }\r\n else\r\n {\r\n vm.supportCompany.cfs_primary_contact_name = {};\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.cfs.default_bccs){\r\n if(response.data.ticket.customer_configurations.cfs.default_bccs.length > 0){\r\n vm.supportCompany.cfs_default_bccs = response.data.ticket.customer_configurations.cfs.default_bccs;\r\n } }\r\n else\r\n {\r\n vm.supportCompany.cfs_default_bccs = [];\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.cfs.customer_ids){\r\n if(response.data.ticket.customer_configurations.cfs.customer_ids.length > 0){\r\n var arr4 = (response.data.ticket.customer_configurations.cfs.invalid_customer_ids);\r\n vm.supportCompany.cfs_customer_ids = (response.data.ticket.customer_configurations.cfs.customer_ids).concat(response.data.ticket.customer_configurations.cfs.invalid_customer_ids);\r\n setTimeout(function(){\r\n try{\r\n var curNode3 =angular.element( document.querySelectorAll( '.cfscustomer-chips .md-chip .md-chip-content' ));\r\n for(var item3 in curNode3){\r\n var myEl3 = curNode3[item3];\r\n if(myEl3.innerText){\r\n var invalid3 =response.data.ticket.customer_configurations.cfs.invalid_customer_ids.includes(myEl3.innerText)\r\n angular.element( document.querySelectorAll( '.cfscustomer-chips .md-chip'))[item3].className+=\r\n ( !invalid3 ? \" database-exist\" : \" database-notexist\")\r\n }\r\n }\r\n }\r\n catch(e){console.warn(e)}\r\n },200);\r\n } }\r\n else\r\n {\r\n vm.supportCompany.cfs_customer_ids = [];\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.cfs.operation_contacts){\r\n if(response.data.ticket.customer_configurations.cfs.operation_contacts.length > 0){\r\n vm.companyContactsCfs = response.data.ticket.customer_configurations.cfs.operation_contacts;\r\n } }\r\n else\r\n {\r\n vm.companyContactsCfs = [];\r\n }\r\n\r\n if(response.data.ticket.customer_configurations.cfs.departments){\r\n if(response.data.ticket.customer_configurations.cfs.departments.length > 0){\r\n vm.companyDepartmentsCfs = vm.cfsDeparmentChips(response.data.ticket.customer_configurations.cfs.departments);\r\n var arr7 = vm.cfsInvalidIds(response.data.ticket.customer_configurations.cfs.departments);\r\n } }\r\n else\r\n {\r\n vm.companyDepartmentsCfs = [];\r\n }\r\n\r\n }else{ vm.supportCompany.is_cfs = false; }\r\n\r\n //adding users\r\n\r\n if(response.data.ticket.users){\r\n if(response.data.ticket.users.length > 0){\r\n vm.companyUsersCww = response.data.ticket.users;\r\n } }\r\n else\r\n {\r\n vm.companyUsersCww = [];\r\n }\r\n\r\n vm.notexistIds = arr1.concat(arr2,arr3,arr4,arr5,arr6,arr7).filter(function(e){return e});\r\n\r\n }\r\n\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .component('logCompanyRecord', {\r\n templateUrl: \"/app/admin/companies/log.html\",\r\n controller: CompanyLogDetailController,\r\n bindings: {\r\n data: '<'\r\n }\r\n });\r\n\r\n CompanyLogDetailController.inject = [\"$rootScope\", \"$scope\", \"CompanyManagementService\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', 'UserManagementService', 'mdSelectHelper', '$mdMedia', '$mdDialog', 'UserService']\r\n \r\n function CompanyLogDetailController($rootScope, $scope, CompanyManagementService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, UserManagementService, mdSelectHelper, $mdMedia, $mdDialog, UserService){\r\n var ctrl = this;\r\n\r\n $rootScope.$on('company_updated', function(ev, logs){\r\n ctrl.data.log = logs;\r\n });\r\n\r\n ctrl.processActions = function(actions){\r\n return Object.keys(actions).map(function(key){\r\n var action = actions[key] === Object(actions[key]) ? JSON.stringify(actions[key]) : actions[key];\r\n return \"<strong>\" + key + \"</strong>\" + \": \" + action +\"\\n\";\r\n }).join(', ');\r\n }\r\n\r\n ctrl.logExportShowCSV = function(){\r\n $scope.exportCsvLoaded = false;\r\n CompanyManagementService.exportCompanyLogs(ctrl.data).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function(e) {\r\n \r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant(e.data.errors))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n }\r\n\r\n}) ();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .directive('customOnChange', function() {\r\n return {\r\n restrict: 'A',\r\n link: function (scope, element, attrs) {\r\n var onChangeFunc = scope.$eval(attrs.customOnChange);\r\n element.bind('change', onChangeFunc);\r\n }\r\n };\r\n })\r\n .controller('SupportRequestsViewController', SupportRequestsViewController);\r\n\r\n\r\n SupportRequestsViewController.$inject = [\"$rootScope\", \"$window\", \"$scope\", \"$q\", \"$http\", \"api\", \"downloadLink\", \"SupportRequestsService\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', 'UserManagementService', 'mdSelectHelper', '$mdMedia', '$mdDialog', 'UserService','userLensGroupService','ServerTableSRService','CustomResultsService','AdvSearchService','DownloadService', '$timeout'];\r\n function SupportRequestsViewController($rootScope, $window, $scope,$q, $http, api, downloadLink, SupportRequestsService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, UserManagementService, mdSelectHelper, $mdMedia, $mdDialog, UserService, userLensGroupService, ServerTableSRService, CustomResultsService, AdvSearchService, DownloadService, $timeout) {\r\n\r\n var vm = this;\r\n vm.display_overrides = display_overrides;\r\n vm.display_departments = display_departments;\r\n vm.account_ticket = new Array();\r\n vm.closeModal = closeModal;\r\n vm.getAccountData = getAccountData;\r\n vm.changeAccountStatus = changeAccountStatus;\r\n vm.rediretToUserEdit = rediretToUserEdit;\r\n vm.stateChanges = stateChanges;\r\n vm.approve_button_disable = false;\r\n vm.errorDivCheck = false;\r\n vm.closeErrorDiv = closeErrorDiv;\r\n vm.getMatchArray = getMatchArray;\r\n vm.supportChatComment = '';\r\n vm.supportChatComments = [];\r\n vm.chatComments = chatComments;\r\n vm.chatSoket = chatSoket;\r\n vm.supportRequestLogs = supportRequestLogs;\r\n vm.viewSupportLog = viewSupportLog;\r\n vm.closeSuportLogDiv = closeSuportLogDiv;\r\n vm.isLoading = {save: false, createNew: false, account: false};\r\n\r\n vm.customFullscreen = $mdMedia('xs') || $mdMedia('sm');\r\n\r\n getAccountData();\r\n\r\n vm.chatComments('account_tickets');\r\n vm.chatSoket('/account_tickets/');\r\n vm.supportRequestLogs('account_tickets');\r\n\r\n function rediretToUserEdit(userId){\r\n $location.path('/supportRequestAddUser/'+userId);\r\n }\r\n\r\n function getAccountData(){\r\n\r\n if($stateParams.id){\r\n vm.isLoading.account = true;\r\n SupportRequestsService.getUserViewDetails($stateParams.id).then(function(d){\r\n \r\n vm.isLoading.account = false; \r\n\r\n vm.account_ticket = d.account_ticket;\r\n vm.requestId = vm.account_ticket.id;\r\n\r\n if(vm.account_ticket.company.department.length > 0){\r\n vm.departmentAccess = true; \r\n }else{\r\n vm.departmentAccess = false;\r\n }\r\n\r\n }).catch(function(err) {\r\n\r\n vm.failedToRetrieveData = err.data.error;\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n function viewSupportLog(id){\r\n angular.element(document.getElementById('requestLog'+id).style.display='block');\r\n }\r\n\r\n function closeSuportLogDiv(id){\r\n angular.element(document.getElementById('requestLog'+id).style.display='none');\r\n }\r\n\r\n function chatComments(urlString){\r\n\r\n $http.get(api.url +'/tickets/'+urlString+'/'+$stateParams.id+'/comments')\r\n .then(function(response){\r\n //// console.log(response.data);\r\n vm.supportChatComments = response.data.comments;\r\n return response;\r\n });\r\n }\r\n\r\n function chatSoket(urlString){\r\n try {\r\n var full_url = document.URL; // Get current url\r\n var url_array = full_url.split('/') // Split the string into an array with / as separator\r\n var last_segment = url_array[url_array.length-1]; // Get the last part of the array (-1)\r\n var faye = new Faye.Client(downloadLink.url+'/faye/faye');\r\n faye.subscribe(urlString+last_segment+'/comments/new', function (data) {\r\n angular.forEach(vm.supportChatComments, function(v,k){\r\n if(v.newComment== true){\r\n v.newComment = false;\r\n }\r\n });\r\n var dataComment = JSON.parse(data);\r\n var uId = localStorage.getItem(\"user_id\");\r\n var cId = dataComment.comment_by.id;\r\n if(uId != cId){\r\n var commentObj = {comment_by:dataComment.comment_by,comment_text:dataComment.comment_text,created_at:dataComment.created_at,id:dataComment.id,newComment:true};\r\n vm.supportChatComments.unshift(commentObj);\r\n vm.supportChatComment = '';\r\n }\r\n\r\n });\r\n } catch(e) {\r\n }\r\n\r\n }\r\n\r\n $scope.savesupportChatComment = function(comment,id){\r\n if(comment.length >0){\r\n var url = '';\r\n\r\n url = api.url + '/tickets/account_tickets/'+id+'/comments';\r\n\r\n var query = {comment_text: comment};\r\n $http.post(url, query).then(function(response){\r\n var commentObj = {comment_by:response.data.comment.comment_by,comment_text:response.data.comment.comment_text,created_at:response.data.comment.created_at,id:response.data.comment.id};\r\n vm.supportChatComments.unshift(commentObj);\r\n vm.supportChatComment = '';\r\n return response.data.comment;\r\n }, function errorCallback(error){\r\n return error;\r\n });\r\n }\r\n }\r\n\r\n function supportRequestLogs(urlString){\r\n $http.get(api.url +'/tickets/'+urlString+'/'+$stateParams.id+'/logs')\r\n .then(function(response){\r\n //// console.log(response.data);\r\n vm.requestsupportLogs = response.data.ticket_logs;\r\n return response;\r\n });\r\n }\r\n\r\n function changeAccountStatus(status){\r\n\r\n SupportRequestsService.changeAccountStatus($stateParams.id, status).then(function(resp){\r\n\r\n if(resp && !resp.error){\r\n getAccountData();\r\n }\r\n if(resp.messages){\r\n vm.stateChanges('validation-doc.html',[resp.messages],'success');\r\n }\r\n if(resp.error){\r\n vm.stateChanges('validation-doc.html',[resp.error],'error');\r\n }\r\n\r\n }).catch(function(err) {\r\n vm.stateChanges('validation-doc.html',[err.data.error],'error');\r\n });\r\n\r\n }\r\n\r\n function stateChanges(file,message,status){\r\n\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/support-requests/toast/' + file,\r\n locals: {message: message,status:status},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n $scope.status = status;\r\n }\r\n });\r\n\r\n }\r\n\r\n function closeErrorDiv(){\r\n vm.errorDivCheck = true;\r\n }\r\n\r\n function getMatchArray(rowArray){\r\n\r\n var matches = [];\r\n\r\n for ( var i = 0; i < rowArray.length; i++ ) {\r\n for ( var e = 0; e < vm.account_ticket.bad_party_ids.length; e++ ) {\r\n if ( rowArray[i].trim() === vm.account_ticket.bad_party_ids[e].trim() ){\r\n matches.push( rowArray[i] );\r\n }\r\n }\r\n }\r\n //debugger;\r\n if(matches.length){\r\n return true;\r\n }else{\r\n return false;\r\n }\r\n }\r\n\r\n function display_overrides(overridesData){\r\n\r\n vm.page_name='edit';\r\n\r\n vm.overridesData = overridesData;\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/support-requests/modals/override.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true,\r\n controller: function () {\r\n return vm;\r\n },\r\n controllerAs: 'vm'\r\n });\r\n\r\n }\r\n\r\n function display_departments(overridesData){\r\n \r\n vm.page_name='edit';\r\n \r\n vm.overridesData = overridesData;\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/support-requests/modals/departments.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true,\r\n controller: function () {\r\n return vm;\r\n },\r\n controllerAs: 'vm'\r\n\r\n });\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n\r\n\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('PotentialExceptionsService', PotentialExceptionsService);\r\n\r\n /** @ngInject */\r\n PotentialExceptionsService.$inject = ['ngTableDefaults', '$rootScope', '$http', '$log', 'api', 'NgTableParams', 'DownloadService', 'UserService'];\r\n function PotentialExceptionsService(ngTableDefaults, $rootScope, $http, $log, api, NgTableParams, DownloadService, UserService) {\r\n\r\n var exceptionFilterPersist = {};\t //used to persist the search\r\n var awaitFilterPersist = {};\r\n exceptionFilterPersist.value = 'all';\r\n awaitFilterPersist.value = 'mine';\r\n\r\n var query = {},\r\n data,\r\n isEmpty = {\r\n await: true,\r\n all: true\r\n },\r\n AWAIT = 'await',\r\n ALL = 'all',\r\n awaitingTable = genTable(createGetter(AWAIT), {start_date: \"asc\"}),\r\n potExcTable = genTable(createGetter(ALL), {id: \"desc\"}),\r\n state = {\r\n await: {\r\n loading: false\r\n },\r\n all: {\r\n loading: false\r\n }\r\n },\r\n awaitFilter = \"mine\",\r\n allFilter = \"\";\r\n //THIS SECTION WAS REMOVED TO STANDARDIZE THE RECORD COUNTS\r\n // var pageSizes = [\r\n // { label: \"5 10 20\", sizes: [5,10,20] },\r\n // { label: \"10 20 50\", sizes: [10,20,50] }\r\n // ];\r\n var defaultSettings = {\r\n counts: [10,25,50,100],\r\n defaultSort: \"asc\",\r\n filterOptions: {\r\n filterComparator: true\r\n }\r\n };\r\n\r\n var initialSorting = [\r\n { label: \"Id ASC\", value: { id: \"asc\"} },\r\n { label: \"Id DESC\", value: { id: \"desc\"} },\r\n { label: \"Name ASC\", value: { name: \"asc\"} },\r\n { label: \"Name DESC\", value: { name: \"desc\"} }\r\n ];\r\n var initialParams = {\r\n page: 1,\r\n count: 10,\r\n sorting: undefined\r\n };\r\n\r\n function genTable(datagetter, def_sort){\r\n return new NgTableParams(\r\n {\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: def_sort\r\n }, {\r\n counts: [10,25,50,100],\r\n getData: datagetter\r\n });\r\n }\r\n\r\n function sortFields(orderBy, sorting){\r\n\r\n var result = [];\r\n for (var i in orderBy){\r\n if (!isNaN(+i)){\r\n var x = orderBy[i].replace(/[+-]/g,\"\");\r\n var p = {};\r\n p[x] = sorting[x];\r\n result.push(p);\r\n }\r\n }\r\n\r\n return result;\r\n\r\n }\r\n\r\n function getQuery() {\r\n return query;\r\n }\r\n\r\n\r\n\r\n function createGetter(mode){\r\n return function(params){\r\n var url;\r\n var search = {};\r\n for (var q in query){\r\n search[q] = query[q];\r\n }\r\n\r\n search.page = params.page();\r\n search.per_page = params.count();\r\n search.sorting = sortFields(params.orderBy(), params.sorting());\r\n\r\n if (mode === 'await'){\r\n url = api.url_v2 + '/potential_exceptions' + \"?filters[status]=submitted\";\r\n } else {\r\n url = api.url_v2 + '/potential_exceptions';\r\n\r\n }\r\n var req_params = {\r\n page: params.page(),\r\n per_page: params.count(),\r\n\r\n sort: params.orderBy().map(function(p){return p.replace(\"+\", \"\")}).join(',')\r\n\r\n };\r\n\r\n /* If this is the all table, we need to filter by status */\r\n if (allFilter && mode === \"all\") {\r\n req_params['filters[status]'] = allFilter;\r\n }\r\n if (awaitFilter && mode == \"await\"){\r\n req_params['filters[mine]'] = \"1\";\r\n }\r\n state[mode].loading = true;\r\n $rootScope.$broadcast(\"exceptionsTable:\"+mode+\":stateChanged\", state[mode]);\r\n var promise = $http({url: url, method: \"GET\", params: req_params}).then(function(resp){\r\n params.total(resp.headers().total);\r\n params.data = resp.data.potential_exceptions;\r\n isEmpty[mode] = params.data.length === 0;\r\n state[mode].loading = false;\r\n $rootScope.$broadcast(\"exceptionsTable:\"+mode+\":stateChanged\", state[mode]);\r\n $rootScope.$broadcast(\"exceptionsTable:\"+mode+\":loaded\", resp.data);\r\n return params.data;\r\n });\r\n return promise;\r\n };\r\n }\r\n\r\n return {\r\n isEmpty: function(mode){return isEmpty[mode];},\r\n genTable: genTable,\r\n sortFields: sortFields,\r\n getTable: function(table){\r\n switch (table){\r\n case \"await\":\r\n return awaitingTable;\r\n case \"all\":\r\n return potExcTable;\r\n }\r\n },\r\n getAwaitFilter: function(){\r\n return awaitFilter;\r\n },\r\n setAwaitFilter: function(filter){\r\n switch (filter){\r\n case \"all\":\r\n awaitFilter = \"\";\r\n break;\r\n case \"mine\":\r\n awaitFilter = \"mine\";\r\n break;\r\n }\r\n awaitingTable.reload();\r\n },\r\n getAllFilter: function(){\r\n return allFilter;\r\n },\r\n setAllFilter: function(filter){\r\n switch (filter){\r\n case \"all\":\r\n allFilter = \"\";\r\n break;\r\n case \"draft\":\r\n allFilter = \"draft\";\r\n break;\r\n case \"review\":\r\n allFilter = \"review\";\r\n break;\r\n case \"submitted\":\r\n allFilter = \"submitted\";\r\n break;\r\n case \"published\":\r\n allFilter = \"published\";\r\n break;\r\n case \"expired\":\r\n allFilter = \"expired\";\r\n }\r\n potExcTable.reload();\r\n },\r\n getExceptionFilterPersist: function() {\r\n return exceptionFilterPersist;\r\n },\r\n getAwaitFilterPersist: function() {\r\n return awaitFilterPersist;\r\n },\r\n exportPotentialException: function(mode){\r\n // var pe = {};\r\n // if (fields && fields.length !== 0){\r\n // pe.columns = fields.map(function(d){return d.field;});\r\n // }\r\n // pe.columns = pe.columns || [];\r\n // if (params){\r\n // if (params.filter){pe.filter = params.filter;}\r\n // if (params.sorting){pe.sorting = params.sorting;}\r\n var url = api.url_v2 + \"/potential_exceptions/export\";\r\n var filter = mode.mode == 'all' ? this.getAllFilter() : this.getAwaitFilter();\r\n var sort = mode.mode == 'await' ? potExcTable.orderBy() : awaitingTable.orderBy();\r\n\r\n var req_params = {\r\n sort: sort\r\n };\r\n req_params['filters[status]'] = mode.mode === 'await' ? 'submitted' : filter;\r\n\r\n if (mode.mode === 'await' && filter === 'mine'){\r\n req_params['filters[mine]'] = 1\r\n\r\n }\r\n\r\n\r\n\r\n var csv_date = new Date();\r\n var filename = (moment().format('YYYY-MM-DD') + '-PotentialExceptions.csv');\r\n return DownloadService.getDownloadFile(url, req_params, filename);\r\n // var promise = $http({url: url, method: \"GET\", params: req_params}).then(function(res){\r\n // var anchor = angular.element('<a/>');\r\n // anchor.attr({\r\n // href: 'data:attachment/csv;charset=utf-8,'+ encodeURI(res.data),\r\n // target: '_blank',\r\n // download: moment().format('YYYY-MM-DD') + '-PotentialExceptions.csv'\r\n // })[0].click();\r\n\r\n // return res.data;\r\n // });\r\n // return promise;\r\n }\r\n };\r\n\r\n }\r\n})();\r\n /* Old functions we may want to use */\r\n //getData: getData,\r\n // getParams: function(){\r\n // return ngTable.parameters();\r\n // },\r\n // getTable: function(){ return ngTable;},\r\n // getTableParams: function(){return ngTable;},\r\n // reloadTable: function(){search().then(function(resp){\r\n // ngTable.total(resp.total);\r\n // ngTable.data = resp.shipments;\r\n // });},\r\n // getQuery: getQuery,\r\n // setQuery: function(q) {\r\n // query = q;\r\n // ngTableDefaults.settings = angular.extend({}, ngTableDefaults.settings, defaultSettings);\r\n // ngTableDefaults.params = angular.extend({}, ngTableDefaults.params, initialParams);\r\n // $rootScope.$broadcast(\"ngTableParamsChanged\", ngTableDefaults);\r\n // return ngTable.reload();\r\n // }\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('PotentialExceptionsController', PotentialExceptionsController);\r\n\r\n /** @ngInject */\r\n PotentialExceptionsController.$inject = ['$scope', '$http', '$resource', '$mdMedia','CustomPotentialResultsService', 'PotentialExceptionsService', '$translatePartialLoader', '$log', '$mdDialog', '$filter', '$translate', '$location', 'NgTableParams', 'UserService', 'permissions','slug'];\r\n function PotentialExceptionsController($scope, $http, $resource, $mdMedia, CustomPotentialResultsService, PotentialExceptionsService, $translatePartialLoader, $log, $mdDialog, $filter, $translate, $location, NgTableParams, UserService, permissions, slug) {\r\n\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('admin');\r\n /* Variables */\r\n var vm = this;\r\n vm.query = {};\r\n vm.isEmpty = PotentialExceptionsService.isEmpty();\r\n vm.isAwaitLoading = false;\r\n vm.isAllLoading = false;\r\n vm.showCustomizeResults = showCustomizeResults;/*added by Abheesh */\r\n $scope.getHeaderWidth = getHeaderWidth;\r\n\r\n vm.closeModal = closeModal;\r\n\r\n vm.link = {field: \"id\", column: \"title\", url: \"potential-exceptions\"};\r\n vm.awaitTableParams = PotentialExceptionsService.getTable(\"await\");\r\n vm.exceptionFilter = PotentialExceptionsService.getExceptionFilterPersist();\r\n vm.awaitFilter =PotentialExceptionsService.getAwaitFilterPersist();\r\n vm.canCreate = UserService.canAccess(permissions.potentialExceptions.create);\r\n vm.canApprove = UserService.canAccess(permissions.potentialExceptions.publish);\r\n vm.isReader = UserService.canAccess(permissions.potentialExceptions.reader);\r\n vm.counts = {all: {all: 0, drafts: 0, submitted: 0, published: 0, expired: 0}, await: {all: 0, mine: 0}};\r\n vm.allButtons = [\r\n {id:0, action: createPotentialException, display: 'ADMIN.POTENTIAL.CREATE_BUTTON', icon: 'create', hide: !(vm.canCreate || vm.isReader)},\r\n {id:1, action: exportShowCSV, display: 'Export', param: {mode: 'all'}},\r\n\r\n ];\r\n vm.awaitButtons = [\r\n {id: 0, action: createPotentialException, display: 'ADMIN.POTENTIAL.CREATE_BUTTON', icon: 'create', hide: !(vm.canCreate || vm.isReader)},\r\n {id:2, action: exportShowCSV, display: 'Export', param: {mode: 'await'}}\r\n ]\r\n\r\n vm.potExcTableParams = PotentialExceptionsService.getTable(\"all\");\r\n\r\n // vm.columns = [\r\n // {\"field\": \"workflow_state\", \"title\": 'ADMIN.POTENTIAL.STATUS', \"sortable\": \"workflow_state\", \"filter\": {status: '/app/components/crane-table/filterDefault.html'}, \"show\":\"true\", isDate:false,notstatic:false},\r\n // {\"field\":\"id\", \"title\": 'ADMIN.POTENTIAL.ID', \"sortable\": \"id\", \"filter\": {}, \"show\":\"false\", isDate:false, notstatic:false},\r\n // {\"field\":\"title\", \"title\": 'ADMIN.POTENTIAL.TITLE', \"sortable\": \"title\", \"filter\": {}, \"show\":\"false\", isDate:false, notstatic:true},\r\n // {\"field\":\"start_date\", \"title\": 'ADMIN.POTENTIAL.START_TIME', \"sortable\": \"start_date\", \"filter\": {}, \"show\":\"false\", isDate:true, notstatic:false},\r\n // {\"field\":\"end_date\", \"title\": 'ADMIN.POTENTIAL.END_TIME', \"sortable\": \"end_date\", \"filter\": {}, \"show\":\"false\", isDate:true, notstatic:false},\r\n // {\"field\":\"mode\", \"title\": 'ADMIN.POTENTIAL.MODE', \"sortable\": \"mode\", \"filter\": {}, \"show\":\"false\", isDate:false, notstatic:false},\r\n // {\"field\":\"note\", \"title\": 'ADMIN.POTENTIAL.NOTE', \"sortable\": \"note\", \"filter\": {}, \"show\":\"false\", isDate:false, notstatic:true}\r\n // ];\r\n /*\r\n * Added by Abheesh\r\n */\r\n // vm.columns = CustomPotentialResultsService.getActiveColumns();\r\n vm.columns = CustomPotentialResultsService.getColumnHeaders();\r\n\r\n $scope.$on(\"ngTableParamsChanged\", function(){\r\n vm.tableParams = PotentialExceptionsService.getTable();\r\n vm.isEmpty = PotentialExceptionsService.isEmpty();\r\n });\r\n\r\n $scope.$on(\"exceptionsTable:await:stateChanged\", function(event, state) {\r\n vm.isAwaitLoading = state.loading;\r\n });\r\n $scope.$on(\"exceptionsTable:all:stateChanged\", function(event, state) {\r\n vm.isAllLoading = state.loading;\r\n });\r\n\r\n $scope.$on(\"exceptionsTable:await:loaded\", function(event, data) {\r\n vm.noResultsAwait = data.potential_exceptions.length == 0;\r\n vm.counts.await = data.counts;\r\n });\r\n $scope.$on(\"exceptionsTable:all:loaded\", function(event, data) {\r\n vm.noResultsAll = data.potential_exceptions.length == 0;\r\n vm.counts.all = data.counts;\r\n });\r\n\r\n //functions\r\n vm.getTable = getTable;\r\n vm.isLink = isLink;\r\n vm.getLink = getLink;\r\n vm.getClass = getClass;\r\n vm.getField = getField;\r\n vm.setFilter = setFilter;\r\n vm.exportShowCSV = exportShowCSV;\r\n\r\n function createPotentialException(){\r\n $location.path('potential-exceptions/new');\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n function getLink(data){\r\n return vm.link.url+\"/\"+(data.child ? data.child[vm.link.field] : data[vm.link.field]);\r\n }\r\n function setFilter(filter, mode) {\r\n if (mode === 'all'){\r\n vm.exceptionFilter.value = filter;\r\n PotentialExceptionsService.setAllFilter(filter);\r\n } else {\r\n vm.awaitFilter.value = filter;\r\n PotentialExceptionsService.setAwaitFilter(filter);\r\n }\r\n }\r\n\r\n function getClass(item, field){\r\n var wasPublished = !!item.parent_id;\r\n //for PE's that have been rejected\r\n if (item.rejection_note && item.workflow_state === \"draft\" && field == \"workflow_state\"){\r\n return \"rejected text-semi text-upper status\";\r\n }\r\n switch(field){\r\n case \"workflow_state\":\r\n switch(item[field]){\r\n case \"draft\":\r\n return \"draft text-semi text-upper status\";\r\n case \"published\":\r\n return \"published text-semi text-upper status\";\r\n case \"submitted\":\r\n case \"submitted_expire\":\r\n return \"submitted text-semi text-upper status\";\r\n case \"expired\":\r\n return \"ended text-semi text-upper status\";\r\n default:\r\n return \"\";\r\n }\r\n default:\r\n return \"\";\r\n }\r\n }\r\n\r\n function exportShowCSV(mode){\r\n\r\n\r\n\r\n $scope.exportCsvLoaded = false;\r\n PotentialExceptionsService.exportPotentialException(mode).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function(e) {\r\n\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant(e.data.errors))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n\r\n function getField(item, field){\r\n // if(item.id == 99) {\r\n // debugger;\r\n // }\r\n var wasPublished = !!item.parent_id;\r\n if (wasPublished && field == \"workflow_state\" && item[field] !== \"published\"){\r\n if(item.rejection_note && item.workflow_state === \"draft\") { //if it is rejected and published\r\n return \"<div class=\\\"published\\\">published</div><div class=\\\"\" + item[field] + \" rejected secondary\\\">(update rejected)</div>\";\r\n } else if (item.workflow_state === 'submitted_expire') {\r\n return \"<div class=\\\"published\\\">published</div><div class=\\\"\" + item[field] + \" secondary\\\">(end submitted)</div>\";\r\n } else { //if just published\r\n return \"<div class=\\\"published\\\">published</div><div class=\\\"\" + item[field] + \" secondary\\\">(update \"+item[field]+\")</div>\";\r\n }\r\n } else if (item.rejection_note && item.workflow_state === \"draft\" && field == \"workflow_state\") {\r\n return 'Rejected';\r\n } else if (field == 'mode') {\r\n var modes = [];\r\n if (item.air) modes.push($translate.instant('ADMIN.POTENTIAL.AIR'));\r\n if (item.sea) modes.push($translate.instant('ADMIN.POTENTIAL.SEA'));\r\n return modes.join(', ');\r\n } else {\r\n return item[field];\r\n }\r\n }\r\n\r\n\r\n function getTable(table){\r\n /* Added by Abheesh*/\r\n var data = PotentialExceptionsService.getTable(table);\r\n angular.forEach(data.data,function(content){\r\n\r\n if(content.city_codes){\r\n var city_code_count = content.city_codes.length;\r\n content['city_code_count'] = city_code_count;\r\n }\r\n\r\n });\r\n return data;\r\n\r\n /* return PotentialExceptionsService.getTable(table);*/\r\n }\r\n\r\n/* Added by Abheesh */\r\n function showCustomizeResults(ev) {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/customize-results/customize-exception-results.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n vm.status = 'You said the information was \"' + answer + '\".';\r\n }, function() {\r\n vm.status = 'You cancelled the dialog.';\r\n });\r\n }\r\n\r\n function getHeaderWidth(item){\r\n var width = localStorage.getItem(\"resize-tt-\" + slug(item));\r\n if(width == null){\r\n width = 200;\r\n }\r\n return width ? \"width: \" + width + \"px;\" : \"\";\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('userLensGroupService', userLensGroupService);\r\n\r\n /** @ngInject */\r\n userLensGroupService.$inject = ['$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'PermissionsService', 'UserService', 'AJAX', 'DownloadService', 'Upload'];\r\n function userLensGroupService($http, $rootScope, $q, $timeout, $location, $stateParams, NgTableParams, api, PermissionsService, UserService, AJAX, DownloadService, Upload) {\r\n\r\n var query,\r\n timeoutTid = false,\r\n loading = false,\r\n isEmpty = true,\r\n companyDetails = [],\r\n readOnly = false,\r\n deferred = $q.defer(),\r\n lensGroupTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n\r\n return{\r\n\r\n updateLensGroup : updateLensGroup,\r\n companiesList : companiesList,\r\n loadLensGroupData : loadLensGroupData,\r\n getLensGroupTable: function(){return lensGroupTable;},\r\n getLensGroups : getLensGroups,\r\n getLensGroup : getLensGroup,\r\n setCompanyDetails : setCompanyDetails,\r\n getCompanyDetails : getCompanyDetails,\r\n getSelectedLensGroup : getSelectedLensGroup,\r\n addToLensGroupTable : function(data,count){\r\n lensGroupTable.data.push(data);\r\n if(count >0){\r\n lensGroupTable.total(count);\r\n }else{\r\n lensGroupTable.total(lensGroupTable.data.length);\r\n }\r\n // lensGroupTable.total(lensGroupTable.data.length);\r\n // lensGroupTable.total(lensGroupTable.data.length););\r\n\r\n },\r\n DeleteLensGroupTable: function(data){\r\n lensGroupTable.total(lensGroupTable.data.length);\r\n\r\n\r\n },\r\n setReadOnly : function(data){readOnly = data;},\r\n getReadOnly : function(){return readOnly;}\r\n\r\n\r\n };\r\n\r\n function updateLensGroup(theData,id){\r\n var query = theData;\r\n var url = api.url_v2 + '/lens_groups';\r\n var dfd = $q.defer();\r\n if(id){\r\n url = url+'/'+id;\r\n $http.put(url, query).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n }else{\r\n $http.post(url, query).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n }\r\n return dfd.promise;\r\n\r\n // return $http.put(url + id,theData)\r\n // .then(function onSuccess(response){\r\n // // console.log(response.data);\r\n\r\n\r\n // }, function onError(response){\r\n\r\n\r\n // });\r\n }\r\n\r\n function companiesList(){\r\n ///lens_groups/companies_list\r\n var dfd = $q.defer();\r\n $http.get(api.url + '/lens_groups/companies_list').then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function loadLensGroupData(){\r\n\r\n var dfd = $q.defer();\r\n $http.get(api.url_v2 + '/lens_groups').then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n // ---------------------\r\n // Retrieve a list of lensGroups\r\n // // ------------------\r\n function getLensGroups(id){\r\n\r\n // lensGroupTable.total(lensData.length);\r\n // lensGroupTable.settings({data: lensData});\r\n // lensGroupTable.data = lensData;\r\n //isEmpty = lensGroupTable.data.length === 0;\r\n\r\n\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n var url = api.url_v2 + '/users/'+id;\r\n\r\n\r\n var promise = $http({url: url, method: \"GET\"})\r\n .then(function onSuccess(response){\r\n if(response.data.lens_groups == null){\r\n response.data.lens_groups = [];\r\n }\r\n lensGroupTable.total(response.data.lens_groups.length);\r\n lensGroupTable.settings({data: response.data.lens_groups});\r\n lensGroupTable.data = response.data.lens_groups;\r\n isEmpty = lensGroupTable.data.length === 0;\r\n loading = false;\r\n //$rootScope.$broadcast(\"lensGroupTable:stateChanged\", loading);\r\n\r\n return lensGroupTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n\r\n } else {\r\n\r\n }\r\n }).finally(function(){\r\n //if (timeoutTid) $timeout.cancel(timeoutTid);\r\n //deferred = false;\r\n });\r\n // timeoutTid = $timeout(function() {\r\n // if (deferred) deferred.resolve();\r\n // }, AJAX.TIMEOUT);\r\n return promise;\r\n }\r\n\r\n function getLensGroup(id){\r\n\r\n $http.get(api.url_v2 +'/lens_groups/'+id+'/edit')\r\n .then(function(response){\r\n return response;\r\n });\r\n\r\n }\r\n\r\n\r\n function setCompanyDetails(data){\r\n companyDetails = data;\r\n }\r\n\r\n function getCompanyDetails(){\r\n return companyDetails;\r\n }\r\n\r\n function getSelectedLensGroup(){\r\n if(lensGroupTable.settings().data){\r\n return lensGroupTable.settings().data\r\n .filter(function(lensGroup){\r\n\r\n return lensGroup.selected;\r\n })\r\n } else {\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\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('lensviewService', lensviewService);\r\n\r\n /** @ngInject */\r\n lensviewService.$inject = ['$http', '$state', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams','$filter', 'api', 'PermissionsService', 'UserService', 'AJAX', 'DownloadService', 'Upload'];\r\n function lensviewService($http, $state, $rootScope, $q, $timeout, $location, $stateParams, NgTableParams,$filter, api, PermissionsService, UserService, AJAX, DownloadService, Upload) {\r\n\r\n var query,\r\n timeoutTid = false,\r\n loading = false,\r\n isEmpty = true,\r\n readOnly = false,\r\n AllClients = \"\",\r\n addUserCheck = true,\r\n companyDetails = [],\r\n deferred = $q.defer(),\r\n bulkUrl = api.url_v2 + '/lens_groups/destroy_multiple/',\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3/*,\r\n sorting: {name: \"asc\"}*/\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n lensGroupTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3/*,\r\n sorting: {name: \"asc\"}*/\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n\r\n return{\r\n\r\n \tupdateLensGroup : updateLensGroup,\r\n \tcompaniesList : companiesList,\r\n loadLensGroupData : loadLensGroupData,\r\n getLensGroupTable: function(){return lensGroupTable;},\r\n getExceptionTable: function(){return exceptionTable;},\r\n getLensGroups : getLensGroups,\r\n getExceptions: getExceptions,\r\n getLensGroup : getLensGroup,\r\n setQuery : setQuery,\r\n setQueryExce : setQueryExce,\r\n setCompanyDetails : setCompanyDetails,\r\n getCompanyDetails : getCompanyDetails,\r\n getSelectedLensGroup : getSelectedLensGroup,\r\n getSelectedException : getSelectedException,\r\n bulkDelete : bulkDelete,\r\n getRoles: getRoles,\r\n setReadOnly : function(data){readOnly = data;},\r\n getReadOnly : function(){return readOnly;},\r\n setNameData : function(data){ AllClients = data;},\r\n getNameData : function(){return AllClients;},\r\n setUserAddCheck : setUserAddCheck\r\n };\r\n\r\n\r\n function getRoles(type){\r\n ///lens_groups/companies_list\r\n //if(type == 'none'){ type = 'cww' }\r\n var dfd = $q.defer();\r\n $http.get(api.url_v2 + '/demo_roles?customer_type='+type).then(function(response){\r\n return dfd.resolve(response.data.roles);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function setQuery(q){\r\n\r\n lensGroupTable.filter({});\r\n lensGroupTable.filter(q)\r\n lensGroupTable.page(1)\r\n lensGroupTable.reload();\r\n }\r\n\r\n function setQueryExce(q){\r\n\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function setNameData(lensgroupName){\r\n return lensgroupName;\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n \tfunction updateLensGroup(theData,id){\r\n var query = theData;\r\n var url = api.url_v2 + '/lens_groups';\r\n var dfd = $q.defer();\r\n if(id){\r\n url = url+'/'+id;\r\n $http.put(url, query).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n }else{\r\n $http.post(url, query).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n }\r\n return dfd.promise;\r\n\r\n // return $http.put(url + id,theData)\r\n // .then(function onSuccess(response){\r\n // // console.log(response.data);\r\n\r\n\r\n // }, function onError(response){\r\n\r\n\r\n // });\r\n }\r\n function companiesList(){\r\n \t///lens_groups/companies_list\r\n var dfd = $q.defer();\r\n $http.get(api.url + '/lens_groups/companies_list').then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function loadLensGroupData(){\r\n\r\n var dfd = $q.defer();\r\n $http.get(api.url_v2 + '/lens_groups').then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n // ---------------------\r\n // Retrieve a list of lensGroups\r\n // // ------------------\r\n function getLensGroups(id){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n var url = api.url_v2 + '/lens_groups';\r\n\r\n if(id==\"non_all_client_len_grps\"){\r\n\r\n if($state.current.name == 'showUser'){\r\n url = api.url_v2+'/users/'+$stateParams.id+'/user_excluded_lens_groups';\r\n }\r\n if($state.current.name == 'showCompany'){\r\n url = api.url_v2+'/companies/'+$stateParams.id+'/company_excluded_lens_groups';\r\n }\r\n\r\n }\r\n // $rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n lensGroupTable.total(response.headers().total);\r\n lensGroupTable.settings({data: response.data.lens_groups});\r\n lensGroupTable.data = response.data.lens_groups;\r\n isEmpty = lensGroupTable.data.length === 0;\r\n loading = false;\r\n $rootScope.$broadcast(\"lensGroupTable:stateChanged\", loading);\r\n lensGroupTable.data = $filter('orderBy')(lensGroupTable.data, 'name');\r\n angular.forEach(lensGroupTable.data, function(v,k){\r\n \t if(v.name==='ALL CLIENTS'){\r\n \t\t var oldData =lensGroupTable.data[0];\r\n \t\t var newData = lensGroupTable.data[k];\r\n\r\n \t\t lensGroupTable.data[0] = lensGroupTable.data[k];\r\n \t\t lensGroupTable.data[k] = oldData;\r\n \t }\r\n });\r\n response.data.lens_groups = lensGroupTable.data;\r\n return lensGroupTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n }\r\n\r\n function getExceptions(id,cust_type){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n var url = api.url_v2 + '/lens_groups';\r\n\r\n if(id==\"non_all_client_len_grps\"){\r\n\r\n if($state.current.name == 'showCompany'){\r\n url = api.url_v2+'/companies/'+$stateParams.id+'/excluded_approvers?customer_type='+cust_type;\r\n }\r\n\r\n }\r\n // $rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: response.data.excluded_approvers});\r\n exceptionTable.data = response.data.excluded_approvers;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionTable:stateChanged\", loading);\r\n exceptionTable.data = $filter('orderBy')(exceptionTable.data, 'first_name');\r\n // angular.forEach(exceptionTable.data, function(v,k){\r\n // if(v.name==='ALL CLIENTS'){\r\n // var oldData =lensGroupTable.data[0];\r\n // var newData = lensGroupTable.data[k];\r\n\r\n // lensGroupTable.data[0] = lensGroupTable.data[k];\r\n // lensGroupTable.data[k] = oldData;\r\n // }\r\n // });\r\n response.data.excluded_approvers = exceptionTable.data;\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n }\r\n\r\n function getLensGroup(id){\r\n\r\n $http.get(api.url_v2 +'/lens_groups/'+id+'/edit')\r\n .then(function(response){\r\n return response;\r\n });\r\n\r\n }\r\n\r\n\r\n function setCompanyDetails(data){\r\n companyDetails = data;\r\n }\r\n\r\n function getCompanyDetails(){\r\n return companyDetails;\r\n }\r\n\r\n function getSelectedLensGroup(){\r\n if(lensGroupTable.settings().data){\r\n return lensGroupTable.settings().data\r\n .filter(function(lensGroup){\r\n\r\n return lensGroup.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n // This function sets up comm\r\n function prepare_bulk_communications(){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n $rootScope.$broadcast(\"lensGroupTable:stateChanged\", loading);\r\n }\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"lensGroupTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"lensGroupTable:loaded\", data);\r\n }\r\n\r\n // ----------------------------\r\n // delete the user\r\n // ----------------------------\r\n function bulkDelete(params){\r\n prepare_bulk_communications();\r\n var lensGroup = \"?\"+params.lensGroups_ids.map(function(d, i){\r\n return \"lens_grp_ids%5B%5D=\"+d;}).join('&');\r\n var promise = $http\r\n .delete(bulkUrl+lensGroup, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return response.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n exitLoadState();\r\n //return promise.reject(response);\r\n } else {\r\n exitLoadState();\r\n return response.data;\r\n }\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n\r\n\r\n\r\n\r\n }\r\n})();\r\n\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('addLensGroupPopUpController', addLensGroupPopUpController);\r\n addLensGroupPopUpController.$inject = ['$scope','$filter','$location', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http', '$state', 'api', 'lensviewService', 'LensviewCompanyPopUpService',\r\n 'userLensGroupService','CompanyManagementService','UserManagementService','$stateParams','$rootScope','ngTableEventsChannel','NgTableParams'];\r\n function addLensGroupPopUpController($scope, $filter, $location, $mdDialog, $mdMedia, $mdToast, $q, $http,\r\n \t$state, api, lensviewService, LensviewCompanyPopUpService,\r\n \tuserLensGroupService, CompanyManagementService, UserManagementService,$stateParams,$rootScope,ngTableEventsChannel,NgTableParam){\r\n\t var vm = this;\r\n\r\n\t vm.columns = [\r\n\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"name\", \"title\": 'ADMIN.LENS.NAME', \"sortable\": \"name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"company_count\", \"title\": 'ADMIN.LENS.OF_COMPANIES', \"sortable\": \"company\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t {\"field\": \"description\", \"title\": 'ADMIN.LENS.DESCRIPTION', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n\t //{\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n\r\n\t ];\r\n\r\n\r\n\t vm.buttons = [\r\n\t // {id: 0, action: add_companieslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t // {id: 1, action: search_companieslens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t ];\r\n\r\n\t vm.icon=\"\";\r\n\t vm.lensviewtitle = \"This Company Contains the following Departments:\";\r\n\t vm.lensviewAddTitle = \"Add Lens Group to this User\";\r\n vm.lensviewAddTitle2 = \"Add Lens Group to this Company\";\r\n\t vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n\t vm.getClass = getClass;\r\n\t vm.addSectedLensGroup = addSectedLensGroup;\r\n\t vm.checkAll = checkAll;\r\n\t vm.clearAll = clearAll;\r\n\t vm.cancel = cancel;\r\n\t // vm.getLink = getLink;\r\n\t // vm.isLink = isLink;\r\n vm.companiesList = [];\r\n vm.getList = [];\r\n vm.link = {field: \"id\", column: \"name\", url: \"companies\"};\r\n\r\n lensviewService.getLensGroups('non_all_client_len_grps');\r\n\r\n if($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n vm.lensviewAddTitle = \"Add Company to Existing Lens Group\";\r\n }\r\n\r\n\t function search_companieslens(){\r\n\t \tvm.searchflag = !vm.searchflag;\r\n\t }\r\n\r\n\t if($state.current.name == 'showUser' || $state.current.name == 'createUser'){\r\n\r\n\t $rootScope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n\r\n var res = userLensGroupService.getLensGroups($stateParams.id);\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n\t}\r\n\r\n\tif($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n\r\n\t $rootScope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n\r\n var res = CompanyManagementService.getCompanies('lens_group_companies');\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n\t}\r\n\r\nif($state.current.name == 'showUser' || $state.current.name == 'createUser'){\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n}\r\n\r\nif($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n}\r\n function subscribeToTable(tableParams){\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n var tmp = 0;\r\n angular.forEach(vm.companyTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.companyTable.data.length == tmp && tmp > 0)\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n\t\tfunction getTable(){\r\n\r\n\t\t\t //return LensviewCompanyPopUpService.getCompanyTable();\r\n\t\t\t //return lensviewService.getLensGroupTable();\r\n\r\n\t\tif($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n\t\tvar selectedCompanies = CompanyManagementService.getCompanyLensTable();\r\n var companyList = lensviewService.getLensGroupTable();\r\n vm.companyTable = companyList;\r\n companyList.data.map(function(objCompany){\r\n \tselectedCompanies.data.map(function(item){\r\n \t\tif(objCompany.id == item.id)\r\n\t\t objCompany.selected = true;\r\n \t})\r\n });\r\n\t\t\t return companyList;\r\n\t\t}\r\n\r\n\t\tif($state.current.name == 'showUser' || $state.current.name == 'createUser'){\r\n\t\tvar selectedCompanies = userLensGroupService.getLensGroupTable();\r\n var companyList = lensviewService.getLensGroupTable();\r\n vm.companyTable = companyList;\r\n companyList.data.map(function(objCompany){\r\n \tselectedCompanies.data.map(function(item){\r\n \t\tif(objCompany.id == item.id)\r\n\t\t objCompany.selected = true;\r\n \t})\r\n });\r\n\t\t\t return companyList;\r\n\t\t}\r\n\r\n\t\t}\r\n\t\t function getField(item, field){\r\n\t\t switch (field){\r\n\t\t case \"is_active\":\r\n\t\t return item[field] ? \"Active\" : \"Inactive\";\r\n\t\t default:\r\n\t\t return item[field];\r\n\t\t }\r\n\t\t}\r\n\t\tfunction getLink(data){\r\n\t return vm.link.url+\"/\"+data[vm.link.field];\r\n\t }\r\n\t function isLink(field){\r\n\t return field == vm.link.column;\r\n\t }\r\n\r\n\t function getClass(item, field){\r\n\t switch (field){\r\n\t case \"is_active\":\r\n\t return item[field] ? \"active-user\" : \"inactive-user\";\r\n\t default:\r\n\t return '';\r\n\t }\r\n\t }\r\n\r\n\t function checkAll(selected){\r\n\t\t\tvm.getTable().data.map(function(lensGroup){\r\n\t\t\t lensGroup.selected = selected;\r\n\t\t\t });\r\n\r\n\t }\r\n\t function addSectedLensGroup(){\r\n // vm.selectedLensGroup = lensviewService.getSelectedLensGroup().map(function(lensGroup){\r\n // \tuserLensGroupService.addToLensGroupTable(lensGroup);\r\n\t\t\t// CompanyManagementService.addCompanytable(lensGroup);\r\n // \treturn lensGroup.id;\r\n\r\n \t\tif($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n var companyTable = CompanyManagementService.getCompanyLensTable();\r\n if(vm.getList.length >0) var countCompanyLens = vm.getList;\r\n vm.selectedLensGroup = lensviewService.getSelectedLensGroup().map(function(lensGroup){\r\n //var companyExists = $filter('filter')(companyTable.data, {id: lensGroup.id });\r\n var companyExists = companyTable.data.map(function(data){ return data[\"id\"]; }).includes(lensGroup.id);\r\n var tempCompany = angular.copy(lensGroup);\r\n tempCompany.selected = false;\r\n if(companyExists == false) {\r\n tempCompany.new = true;\r\n if(countCompanyLens != undefined) countCompanyLens.push(tempCompany);\r\n CompanyManagementService.addCompanyLenstable(tempCompany,vm.getList.length);\r\n }\r\n return lensGroup.id;\r\n\r\n });\r\n CompanyManagementService.setUserAddCheck(true);\r\n cancel();\r\n }\r\n if($state.current.name == 'showUser' || $state.current.name == 'createUser'){\r\n var companyTable = userLensGroupService.getLensGroupTable();\r\n if(vm.getList.length >0) var countUserLens = vm.getList;\r\n vm.selectedLensGroup = lensviewService.getSelectedLensGroup().map(function(lensGroup){\r\n //var companyExists = $filter('filter')(companyTable.data, {id: lensGroup.id });\r\n var companyExists = companyTable.data.map(function(data){ return data[\"id\"]; }).includes(lensGroup.id);\r\n var tempCompany = angular.copy(lensGroup);\r\n tempCompany.selected = false;\r\n if(companyExists == false) {\r\n tempCompany.new = true;\r\n if(countUserLens != undefined) countUserLens.push(tempCompany);\r\n userLensGroupService.addToLensGroupTable(tempCompany,vm.getList.length);\r\n }\r\n return lensGroup.id;\r\n\r\n });\r\n\r\n // var all_Ids = userLensGroupService.getLensGroupTable();\r\n // if(countUserLens != undefined) all_Ids.data = countUserLens;\r\n // vm.selectedLensGroup = [];\r\n // angular.forEach(all_Ids.data,function(data){\r\n // \tvm.selectedLensGroup.push(data.id);\r\n\r\n // });\r\n\r\n\r\n UserManagementService.setUserAddCheck(true);\r\n cancel();\r\n }\r\n\r\n\r\n\t }\r\n\t function clearAll(){\r\n\t LensviewCompanyPopUpService.getCompanies('lens_group');\r\n\t }\r\n\t function cancel() {\r\n\t $mdDialog.cancel();\r\n\t }\r\n\r\n\r\n\r\n\r\n\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('addExceptionPopUpController', addExceptionPopUpController);\r\n addExceptionPopUpController.$inject = ['$scope','$filter','$location', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http', '$state', 'api', 'lensviewService', 'LensviewCompanyPopUpService',\r\n 'userLensGroupService','CompanyManagementService','UserManagementService','$stateParams','$rootScope','ngTableEventsChannel','NgTableParams','CslExceptionService'];\r\n function addExceptionPopUpController($scope, $filter, $location, $mdDialog, $mdMedia, $mdToast, $q, $http,\r\n \t$state, api, lensviewService, LensviewCompanyPopUpService,\r\n \tuserLensGroupService, CompanyManagementService, UserManagementService,$stateParams,$rootScope,ngTableEventsChannel,NgTableParam, CslExceptionService){\r\n\t var vm = this;\r\n\r\n\t vm.columns = [\r\n\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n\t // {\"field\": \"approver_level\", \"title\": 'APPROVER LEVEL', \"sortable\": \"approver_level\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n\t // {\"field\": \"aprrover_level\", \"title\": 'APPROVER LEVEL', \"sortable\": \"aprrover_level\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t //{\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n\r\n\t ];\r\n\r\n\r\n\t vm.buttons = [\r\n\t // {id: 0, action: add_companieslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t {id: 1, action: search_companieslens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t ];\r\n\r\n\t vm.icon=\"\";\r\n\t vm.lensviewtitle = \"This Company Contains the following Departments:\";\r\n\t vm.lensviewAddTitle = \"Add Exception Approvers to Existing Exception Approvers List\"; \r\n\t vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n\t vm.getClass = getClass;\r\n\t vm.addSectedLensGroup = addSectedLensGroup;\r\n\t vm.checkAll = checkAll;\r\n\t vm.clearAll = clearAll;\r\n\t vm.cancel = cancel;\r\n\t vm.searchListData = search_users;\r\n\t // vm.getLink = getLink;\r\n\t // vm.isLink = isLink;\r\n vm.companiesList = [];\r\n vm.getList = [];\r\n vm.link = {field: \"id\", column: \"name\", url: \"companies\"};\r\n\r\n lensviewService.getExceptions('non_all_client_len_grps','csl');\r\n\r\n \r\n\t function search_companieslens(){\r\n\t \tvm.searchflag = !vm.searchflag;\r\n\t }\r\n\r\n\t function search_users(isClear){\r\n\r\n\t \t//vm.searchflag = !vm.searchflag;\r\n\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search); \r\n\t lensviewService.setQueryExce(search); \r\n\t }\r\n\r\n\t \r\n\tif($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n\r\n\t $rootScope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n\r\n var res = CompanyManagementService.getCompanies('company_exceptions');\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n\t}\r\n \r\n\r\n\tif($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n\t $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n\t}\r\n function subscribeToTable(tableParams){\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n var tmp = 0;\r\n angular.forEach(vm.companyTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.companyTable.data.length == tmp && tmp > 0)\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n\t\tfunction getTable(){ \r\n\r\n\t\tif($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\t\t\r\n\t var companyList = lensviewService.getExceptionTable();\r\n\t vm.companyTable = companyList; \r\n\t\t\treturn companyList;\r\n\t\t} \r\n\r\n\t\t}\r\n\r\n\t\tfunction getField(item, field){\r\n\t switch (field){\r\n\t case \"is_active\":\r\n\t return item[field] ? \"Active\" : \"Inactive\";\r\n\t case \"approver_level\":\r\n\t return (item[field] == 'all_clients_approver') ? \"All Clients\" : \"\";\r\n\t default:\r\n\t return item[field];\r\n\t }\r\n\t }\r\n\t\tfunction getLink(data){\r\n\t return vm.link.url+\"/\"+data[vm.link.field];\r\n\t }\r\n\t function isLink(field){\r\n\t return field == vm.link.column;\r\n\t }\r\n\r\n\t function getClass(item, field){\r\n\t if(!item.is_active && item.user_status == 'issue(non-ad)' && item[field] == 'issue(non-ad)') {\r\n\t return 'inactive-user';\r\n\t }\r\n\t switch (field){\r\n\t case \"user_status\":\r\n\t if(item[field] == 'active'){ return \"active-user\"; }\r\n\t if(item[field] == 'inactive'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'unverified'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'issue(ad)'){ return \"issue-ad-user\"; }\r\n\t if(item[field] == 'issue(non-ad)'){ return \"issue-nonad-user\"; }\r\n\t if(item[field] == 'no-security'){ return \"no-security-user\"; }\r\n\t if(item[field] == 'bad state'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'reset'){ return \"inactive-user\"; }\r\n\t // case \"is_active\":\r\n\t // return item[field] ? (item.confirmed ? \"active-user\" : \"inactive-user\") : \"inactive-user\";\r\n\t default:\r\n\t return '';\r\n\t }\r\n\t }\r\n\r\n\t function checkAll(selected){\r\n\t\t\tvm.getTable().data.map(function(lensGroup){\r\n\t\t\t lensGroup.selected = selected;\r\n\t\t\t });\r\n\r\n\t }\r\n\t \r\n function addSectedLensGroup(){ \r\n\r\n if($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n var companyTable = CslExceptionService.getExceptionTable();\r\n if(vm.getList.length >0) var countCompanyLens = vm.getList;\r\n vm.selectedLensGroup = lensviewService.getSelectedException().map(function(lensGroup){\r\n //var companyExists = $filter('filter')(companyTable.data, {id: lensGroup.id });\r\n var companyExists = companyTable.data.map(function(data){ return data[\"id\"]; }).includes(lensGroup.id);\r\n var tempCompany = angular.copy(lensGroup);\r\n tempCompany.selected = false;\r\n if(companyExists == false) {\r\n tempCompany.new = true;\r\n if(countCompanyLens != undefined) countCompanyLens.push(tempCompany);\r\n CslExceptionService.addExceptionstable(tempCompany,vm.getList.length);\r\n }\r\n return lensGroup.id;\r\n\r\n });\r\n CslExceptionService.setUserAddCheck(true);\r\n cancel();\r\n } \r\n\r\n }\r\n\r\n\t function clearAll(){\r\n\t LensviewCompanyPopUpService.getCompanies('lens_group');\r\n\t }\r\n\t function cancel() {\r\n\t $mdDialog.cancel();\r\n\t }\r\n\r\n\r\n\r\n\r\n\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n \r\n angular\r\n .module('app.layout')\r\n .controller('addCfsExceptionPopUpController', addCfsExceptionPopUpController);\r\n addCfsExceptionPopUpController.$inject = ['$scope','$filter','$location', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http', '$state', 'api', 'lensviewService', 'LensviewCompanyPopUpService',\r\n 'userLensGroupService','CompanyManagementService','UserManagementService','$stateParams','$rootScope','ngTableEventsChannel','NgTableParams','CfsExceptionService'];\r\n function addCfsExceptionPopUpController($scope, $filter, $location, $mdDialog, $mdMedia, $mdToast, $q, $http,\r\n $state, api, lensviewService, LensviewCompanyPopUpService,\r\n userLensGroupService, CompanyManagementService, UserManagementService,$stateParams,$rootScope,ngTableEventsChannel,NgTableParam, CfsExceptionService){\r\n var vm = this;\r\n \r\n vm.columns = [\r\n {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n // {\"field\": \"approver_level\", \"title\": 'APPROVER LEVEL', \"sortable\": \"approver_level\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n // {\"field\": \"aprrover_level\", \"title\": 'APPROVER LEVEL', \"sortable\": \"aprrover_level\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n //{\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false}\r\n \r\n ];\r\n \r\n \r\n vm.buttons = [\r\n // {id: 0, action: add_companieslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n {id: 1, action: search_companieslens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n \r\n vm.icon=\"\";\r\n vm.lensviewtitle = \"This Company Contains the following Departments:\";\r\n vm.lensviewAddTitle = \"Add Exception Approvers to Existing Exception Approvers List\"; \r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.getClass = getClass;\r\n vm.addSectedLensGroup = addSectedLensGroup;\r\n vm.checkAll = checkAll;\r\n vm.clearAll = clearAll;\r\n vm.cancel = cancel;\r\n vm.searchListData = search_users;\r\n // vm.getLink = getLink;\r\n // vm.isLink = isLink;\r\n vm.companiesList = [];\r\n vm.getList = [];\r\n vm.link = {field: \"id\", column: \"name\", url: \"companies\"};\r\n \r\n lensviewService.getExceptions('non_all_client_len_grps','cfs');\r\n \r\n \r\n function search_companieslens(){\r\n vm.searchflag = !vm.searchflag;\r\n }\r\n \r\n function search_users(isClear){\r\n \r\n //vm.searchflag = !vm.searchflag;\r\n \r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n \r\n }\r\n $location.search(search); \r\n lensviewService.setQueryExce(search); \r\n }\r\n \r\n \r\n if($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n \r\n $rootScope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n \r\n var res = CompanyManagementService.getCompanies('company_exceptions');\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n }\r\n \r\n \r\n if($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n }\r\n function subscribeToTable(tableParams){\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n var tmp = 0;\r\n angular.forEach(vm.companyTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.companyTable.data.length == tmp && tmp > 0)\r\n }, $scope, tableParams);\r\n }\r\n \r\n \r\n function getTable(){ \r\n \r\n if($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\t\t\r\n var companyList = lensviewService.getExceptionTable();\r\n vm.companyTable = companyList; \r\n return companyList;\r\n } \r\n \r\n }\r\n \r\n function getField(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"approver_level\":\r\n return (item[field] == 'all_clients_approver') ? \"All Clients\" : \"\";\r\n default:\r\n return item[field];\r\n }\r\n }\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n \r\n function getClass(item, field){\r\n if(!item.is_active && item.user_status == 'issue(non-ad)' && item[field] == 'issue(non-ad)') {\r\n return 'inactive-user';\r\n }\r\n switch (field){\r\n case \"user_status\":\r\n if(item[field] == 'active'){ return \"active-user\"; }\r\n if(item[field] == 'inactive'){ return \"inactive-user\"; }\r\n if(item[field] == 'unverified'){ return \"inactive-user\"; }\r\n if(item[field] == 'issue(ad)'){ return \"issue-ad-user\"; }\r\n if(item[field] == 'issue(non-ad)'){ return \"issue-nonad-user\"; }\r\n if(item[field] == 'no-security'){ return \"no-security-user\"; }\r\n if(item[field] == 'bad state'){ return \"inactive-user\"; }\r\n if(item[field] == 'reset'){ return \"inactive-user\"; }\r\n // case \"is_active\":\r\n // return item[field] ? (item.confirmed ? \"active-user\" : \"inactive-user\") : \"inactive-user\";\r\n default:\r\n return '';\r\n }\r\n }\r\n \r\n function checkAll(selected){\r\n vm.getTable().data.map(function(lensGroup){\r\n lensGroup.selected = selected;\r\n });\r\n \r\n }\r\n \r\n function addSectedLensGroup(){ \r\n \r\n if($state.current.name == 'showCompany' || $state.current.name == 'createCompany'){\r\n var companyTable = CfsExceptionService.getExceptionTable();\r\n if(vm.getList.length >0) var countCompanyLens = vm.getList;\r\n vm.selectedLensGroup = lensviewService.getSelectedException().map(function(lensGroup){\r\n //var companyExists = $filter('filter')(companyTable.data, {id: lensGroup.id });\r\n var companyExists = companyTable.data.map(function(data){ return data[\"id\"]; }).includes(lensGroup.id);\r\n var tempCompany = angular.copy(lensGroup);\r\n tempCompany.selected = false;\r\n if(companyExists == false) {\r\n tempCompany.new = true;\r\n if(countCompanyLens != undefined) countCompanyLens.push(tempCompany);\r\n CfsExceptionService.addExceptionstable(tempCompany,vm.getList.length);\r\n }\r\n return lensGroup.id;\r\n \r\n });\r\n CfsExceptionService.setUserAddCheck(true);\r\n cancel();\r\n } \r\n \r\n }\r\n \r\n function clearAll(){\r\n LensviewCompanyPopUpService.getCompanies('lens_group');\r\n }\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n \r\n \r\n \r\n \r\n \r\n }\r\n })();\r\n \n/**\r\n * @ngdoc module\r\n * @name GroupsService\r\n *\r\n * @description\r\n * The GroupsService provides an abstraction layer to the API, and\r\n * helper methods for working with Groups\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('GroupsService', GroupsService);\r\n\r\n /** @ngInject */\r\n GroupsService.$inject = ['$http', '$rootScope', '$q','$timeout', '$location', 'api', 'AJAX'];\r\n function GroupsService($http, $rootScope, $q, $timeout, $location, api, AJAX) {\r\n var groups = false;\r\n return {\r\n getGroups: getGroups,\r\n getGroup: getGroup,\r\n saveGroup: saveGroup\r\n };\r\n\r\n // ---------------------\r\n // Retrieve a list of groups\r\n // ------------------\r\n /**\r\n * Retrives the list of groups\r\n * @param {object} parameters Search paramters (optional)\r\n * @param {Defer} deferred A Defer to use for the timeout (optional)\r\n * @param {boolean} forceLoad Whether or not to force a server load (optional)\r\n * @return {Promise} Promise for loading which is passed an object {groups: Array, total: Int}\r\n * or false if the load failed\r\n */\r\n function getGroups(parameters, deferred, forceLoad){\r\n var defaultsParams = {\r\n page: 1,\r\n per_page: 15,\r\n sort: 'name'\r\n };\r\n parameters = angular.merge(defaultsParams, parameters || {});\r\n forceLoad = typeof forceLoad === 'undefined' ? false : forceLoad;\r\n\r\n if (!deferred) {\r\n deferred = $q.defer();\r\n var timeout = $timeout(function() {\r\n deferred.resolve(false);\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n // cached results\r\n if (!forceLoad && groups) {\r\n deferred.resolve(groups);\r\n }\r\n // server load\r\n else {\r\n $http.get(api.url + '/groups', {timeout: deferred.promise})\r\n .then(function(response){\r\n if (response.status !== 200) {\r\n deferred.resolve(false);\r\n return;\r\n }\r\n\r\n deferred.resolve({groups: response.data.groups, total: response.headers().total});\r\n });\r\n }\r\n return deferred.promise;\r\n }\r\n\r\n function getGroup(id) {\r\n var deferred = $q.defer();\r\n\r\n $http.get(api.url + '/groups/' + id).then(function(response) {\r\n if (response.status !== 200) {\r\n deferred.resolve(false);\r\n return;\r\n }\r\n\r\n deferred.resolve(response.data.group);\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n function saveGroup(group) {\r\n var endpoint = group.id ? $http.put(api.url + '/groups/' + group.id, getRequestData(group)) : $http.post(api.url + '/groups', getRequestData(group)),\r\n deferred = $q.defer();\r\n\r\n endpoint.then(function(response) {\r\n if (response.status !== 200) {\r\n deferred.resolve({success: false, messages: response.data.messages});\r\n return;\r\n }\r\n\r\n deferred.resolve({success: true, group: response.data.group});\r\n }, function(response) {\r\n deferred.resolve({success: false, messages: response.data.messages});\r\n });\r\n\r\n return deferred.promise;\r\n }\r\n\r\n function getRequestData(group) {\r\n return {\r\n name: group.name,\r\n data: group.data\r\n }\r\n }\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc controller\r\n * @name GroupsManageController\r\n *\r\n * @description\r\n * The GroupsManageController controller provides communication between the create and update\r\n * views, and the GroupsService\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('GroupsManageController', GroupsManageController);\r\n\r\n /** @ngInject */\r\n GroupsManageController.$inject = ['$scope', '$log', '$translatePartialLoader', '$q', '$timeout', '$location', '$stateParams', '$mdToast', '$mdDialog', '$mdMedia', 'NgTableParams', 'GroupsService'];\r\n function GroupsManageController($scope, $log, $translatePartialLoader, $q, $timeout, $location, $stateParams, $mdToast, $mdDialog, $mdMedia, NgTableParams, GroupsService) {\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('admin');\r\n\r\n //variables\r\n var vm = this;\r\n vm.isLoading = false;\r\n vm.isSaving = false;\r\n vm.isCreate = !$stateParams.id\r\n vm.groupData = [{key:'', value:''}];\r\n vm.showDataRemoveButton = false;\r\n\r\n // functions\r\n vm.editDataRows = editDataRows;\r\n vm.doneEditingData = doneEditingData;\r\n vm.addData = addData;\r\n vm.removeData = removeData;\r\n vm.save = saveGroup;\r\n vm.closeModal = closeModal;\r\n\r\n if (!vm.isCreate) {\r\n loadGroup();\r\n }\r\n\r\n function editDataRows() {\r\n vm.showDataRemoveButton = true;\r\n }\r\n\r\n function doneEditingData() {\r\n vm.showDataRemoveButton = false;\r\n }\r\n\r\n function addData() {\r\n vm.groupData.push({key:'', value:''});\r\n }\r\n\r\n function removeData(index) {\r\n vm.groupData.splice(index, 1);\r\n if (vm.groupData.length == 0) {\r\n vm.groupData.push({key:'', value:''});\r\n }\r\n }\r\n\r\n function saveGroup() {\r\n vm.isSaving = true;\r\n vm.group.data = {};\r\n angular.forEach(vm.groupData, function(d) {\r\n if (d.key && d.value) {\r\n vm.group.data[d.key] = d.value;\r\n }\r\n });\r\n\r\n GroupsService.saveGroup(vm.group).then(function(response) {\r\n vm.isSaving = false;\r\n if (!response.success) {\r\n showApiError(response.messages);\r\n return;\r\n }\r\n if (vm.isCreate) {\r\n $location.path('/groups/' + response.group.id);\r\n }\r\n else {\r\n vm.group = response.group;\r\n }\r\n showToastWithFile('update-group.success.html');\r\n })\r\n }\r\n\r\n function loadGroup() {\r\n vm.isLoading = true;\r\n vm.groupData = [];\r\n GroupsService.getGroup($stateParams.id).then(function(group) {\r\n vm.group = group;\r\n angular.forEach(Object.keys(group.data), function(k) {\r\n vm.groupData.push({key: k, value:group.data[k]});\r\n });\r\n vm.groupData.push({key:'', value:''});\r\n vm.isLoading = false;\r\n })\r\n }\r\n\r\n function showApiError(messages) {\r\n $scope.apiErrorMessages = messages;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/groups/modals/api-error.modal.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, messages) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/groups/toast/' + file,\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc controller\r\n * @name GroupsIndexController\r\n *\r\n * @description\r\n * The GroupsIndexController controller provides communication between the index view and the\r\n * GroupsService\r\n *\r\n */\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('GroupsIndexController', GroupsIndexController);\r\n\r\n /** @ngInject */\r\n GroupsIndexController.$inject = ['$log', '$translatePartialLoader', '$q', '$timeout', '$location', 'NgTableParams', 'GroupsService', 'AJAX', 'UserService'];\r\n function GroupsIndexController($log, $translatePartialLoader, $q, $timeout, $location, NgTableParams, GroupsService, AJAX, UserService) {\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('admin');\r\n\r\n //variables\r\n var vm = this;\r\n vm.isLoading = false;\r\n // table stuff\r\n vm.link = {field: \"id\", column: \"name\", url: \"groups\"};\r\n vm.icon = \"group_work\";\r\n vm.columns = [\r\n {\"field\": \"name\", \"title\": 'ADMIN.GROUPS.NAME', \"sortable\": \"name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n ];\r\n vm.buttons = [\r\n {id: 0, action: addGroup, display: 'ADMIN.GROUPS.ADD_GROUP', icon: 'create'}\r\n ];\r\n\r\n // functions\r\n vm.getLink = getLink;\r\n vm.isLink = isLink;\r\n vm.getClass = getClass;\r\n vm.getField = getField;\r\n vm.getTable = getTable;\r\n\r\n function addGroup() {\r\n $location.path('/groups/new');\r\n }\r\n\r\n function getLink(data) {\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n function isLink(field) {\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field) {\r\n return '';\r\n }\r\n\r\n function getField(item, field) {\r\n return item[field];\r\n }\r\n\r\n var table = false;\r\n function getTable() {\r\n if (!table) {\r\n table = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 1,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n getData: getGroups\r\n });\r\n }\r\n return table;\r\n }\r\n\r\n var loadDeferred = false,\r\n timeoutTid = false;\r\n function getGroups(params) {\r\n var req_params = {\r\n page: params.page(),\r\n per_page: params.count(),\r\n\r\n sort: params.orderBy().map(function(p){return p.replace(\"+\", \"\");}).join(',')\r\n };\r\n\r\n // cancel a previous request\r\n if (loadDeferred) loadDeferred.resolve();\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n\r\n loadDeferred = $q.defer();\r\n vm.isLoading = true;\r\n\r\n var defer = $q.defer();\r\n GroupsService.getGroups(req_params, loadDeferred)\r\n .then(function(data) {\r\n if (data) {\r\n params.total(data.total);\r\n params.data = data.groups;\r\n defer.resolve(params.data);\r\n }\r\n // failed\r\n else {\r\n params.total(0);\r\n defer.resolve([]);\r\n }\r\n })\r\n .finally(function() {\r\n if (timeoutId) $timeout.cancel(timeoutTid);\r\n vm.isLoading = false;\r\n loadDeferred = false;\r\n });\r\n\r\n timeoutTid = $timeout(function() {\r\n if (loadDeferred) loadDeferred.resolve();\r\n timeoutTid = false;\r\n }, AJAX.TIMEOUT);\r\n\r\n return defer.promise;\r\n }\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name FeatureSpotlightService\r\n *\r\n * @description\r\n * The FeatureSpotlightService does stuff\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('FeatureSpotlightService', FeatureSpotlightService);\r\n /** @ngInject */\r\n \tFeatureSpotlightService.$inject = ['$http', '$rootScope', '$q','$timeout', '$location',\r\n \t'$stateParams', 'NgTableParams', 'AJAX', '$state', 'UserService', 'api', '$filter', 'Upload'];\r\n function FeatureSpotlightService($http, $rootScope, $q, $timeout, $location, $stateParams,\r\n \tNgTableParams, AJAX, $state, UserService, api, $filter, Upload) {\r\n\r\n \tvar user = createUserObject(),\r\n loading = false,\r\n timeoutTid = false,\r\n deferred = $q.defer(),\r\n \t\tusers = [],\r\n \t \tspotlightTable = new NgTableParams({\r\n\t \tpage: 1,\r\n\t \tcount: UserService.getUserTableSettings(),\r\n\t \tpaginationMaxBlocks: 3\r\n\t \t//sorting: {name: \"asc\"}\r\n\t\t }, {\r\n\t \tcounts: [10,25,50,100],\r\n\t dataset: []\r\n\t \t});\r\n\r\n \treturn {\r\n \t\tgetFeatureSpotlight: getFeatureSpotlight,\r\n \t\tcreateUserObject: createUserObject,\r\n \t\tsetQuery : setQuery,\r\n createSlide: createSlide,\r\n setSpotlightSlide: setSpotlightSlide,\r\n updateSlide: updateSlide,\r\n getSelectedSlides: getSelectedSlides,\r\n bulkUpdate: bulkUpdate,\r\n bulkDelete: bulkDelete,\r\n deleteSlide: deleteSlide,\r\n setUnSeenSpotlight: setUnSeenSpotlight,\r\n \t\tgetUserTable: function() {\r\n\t \t// if($state.current.name.includes('new')){\r\n\t // \tspotlightTable.settings().data =[];\r\n\t \t// }\r\n\t \t\treturn spotlightTable;\r\n \t\t},\r\n\r\n \t};\r\n \tfunction setQuery(q){\r\n\t \t// spotlightTable.filter({});\r\n\t \tspotlightTable.filter(q)\r\n\t \tspotlightTable.page(1)\r\n\t \tspotlightTable.reload();\r\n\t }\r\n\r\n function prepare_bulk_communications(){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n $rootScope.$broadcast(\"spotlightTable:stateChanged\", loading);\r\n }\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"spotlightTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"spotlightTable:loaded\", data);\r\n }\r\n\r\n \tfunction getFeatureSpotlight(params) {\r\n prepare_bulk_communications();\r\n \t\tvar urls = api.url_v2+\"/spotlights\"\r\n \t\tvar responseData = [];\r\n var promise = $http({\r\n\t\t\t \tmethod: 'GET',\r\n\t\t\t \turl: urls\r\n\t\t\t}).then(function onSuccess(response) {\r\n\t\t\t\t// // console.log('Service resp', response.data.spotlights);\r\n\t\t\t\tif (response.data != null && response.data.spotlights.length > 0 ) {\r\n\t\t\t\t\tfor (var i = 0; i < response.data.spotlights.length; i++) {\r\n\t\t\t\t\t\t//if (response.data.spotlights[i].active) {\r\n response.data.spotlights[i].slide_status = response.data.spotlights[i].slide_status[0]\r\n if (response.data.spotlights[i].published_date_time)\r\n response.data.spotlights[i].published_date_time = (moment.tz(response.data.spotlights[i].published_date_time, \"America/New_York\").format('YYYY-MM-DD'));\r\n\t\t\t\t\t\t\tresponseData.push(response.data.spotlights[i]);\r\n\t\t\t\t\t\t//}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n exitLoadState();\r\n\t\t\t\t// return unpackageUsers(response);\r\n\t\t\t\tusers = responseData;\r\n\t \t\t// spotlightTable.total(response.headers().total);\r\n\t \t\tspotlightTable.settings({data: responseData});\r\n\t \t\tspotlightTable.data = responseData; //response.data.users;\r\n\t \t\t// isEmpty = userTable.data.length === 0;\r\n\t \t\t// exitLoadState();\r\n\r\n\t \t\treturn spotlightTable.data;\r\n\t\t\t}, function errorCallback(response) {\r\n\t\t\t\t// // console.log('no response', response);\r\n\t\t\t});\r\n\t\t\treturn promise;\r\n \t}\r\n\r\n\r\n function setSpotlightSlide(id){\r\n return $http.get(api.url_v2 + '/spotlights/' + id)\r\n .then(function onSuccess(response){\r\n return response.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n }\r\n\r\n function uploadFile(file, errFiles) {\r\n return Upload.upload({\r\n url: api.url + '/spotlights/attach_file',\r\n method: 'POST',\r\n data: {attachments: file}\r\n });\r\n }\r\n\r\n function createSlide(params){\r\n var promise = $q.defer();\r\n Upload.upload({\r\n url: api.url_v2 + '/spotlights',\r\n method: 'POST',\r\n data: params\r\n }).then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n function updateSlide(params){\r\n var promise = $q.defer();\r\n Upload.upload({\r\n url: api.url_v2 + '/spotlights/' + params.id,\r\n method: 'PUT',\r\n data: params\r\n })\r\n .then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n\r\n function getSelectedSlides(){\r\n if(spotlightTable.settings().data){\r\n return spotlightTable.settings().data\r\n .filter(function(slide){\r\n return slide.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function bulkUpdate(params, api_method_url){\r\n var bulkUrl = api.url_v2 + api_method_url;\r\n var promise = $q.defer();\r\n $http.put(bulkUrl, params)\r\n .then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n function deleteSlide(params){\r\n var url = api.url_v2 + \"/spotlights/\" + params.id;\r\n var promise = $q.defer();\r\n $http.delete(url)\r\n .then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n function bulkDelete(params){\r\n var spotlights = \"?\"+params.spotlight_ids.map(function(d, i){\r\n return \"spotlight_ids%5B%5D=\"+d;}).join('&');\r\n var bulkUrl = api.url_v2 + \"/spotlights/bulk_delete/\" + spotlights;\r\n var promise = $q.defer();\r\n $http.delete(bulkUrl, params)\r\n .then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n function setUnSeenSpotlight(params){\r\n var responseData = [];\r\n var promise = $http({\r\n url: api.url_v2 + '/user_spotlights/set_unseen/' + params.id,\r\n method: 'PUT',\r\n data: {id: params.id, seen: false}\r\n }).then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n \tfunction createUserObject(user_data) {\r\n\t var u = {\r\n\t \tgetLabel: getLabel,\r\n\t \tgetdescription: getdescription,\r\n\t \tgetslideheadline: getslideheadline\r\n\t \t};\r\n\t \tfunction getLabel() {\r\n\t \treturn u.label;\r\n\t \t}\r\n\t \tfunction getdescription() {\r\n\t \treturn u.description;\r\n\t \t}\r\n\t \tfunction getslideheadline() {\r\n\t \treturn u.slideheadline;\r\n\t \t}\r\n\t \t}\r\n\r\n }\r\n})();\r\n\n(function() {\r\n angular.\r\n module('app.admin').\r\n controller('featureSpotlightController', featureSpotlightController);\r\n\r\n /** @ngInject */\r\n featureSpotlightController.$inject = ['$scope', 'FeatureSpotlightService', '$log', '$state', '$translatePartialLoader', '$q',\r\n '$timeout', '$location', '$stateParams', '$mdToast', '$mdDialog', '$mdMedia',\r\n '$http', 'NgTableParams', 'UserService', '$rootScope', '$window', 'UserManagementService',\r\n 'ngTableEventsChannel', '$filter', 'api'\r\n ];\r\n\r\n function featureSpotlightController($scope, FeatureSpotlightService, $log, $state, $translatePartialLoader, $q, $timeout, $location,\r\n $stateParams, $mdToast, $mdDialog, $mdMedia, $http, NgTableParams, UserService, $rootScope, $window,\r\n UserManagementService, ngTableEventsChannel, $filter, api) {\r\n\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('spotlight');\r\n\r\n var vm = this;\r\n vm.icon = \"\";\r\n vm.featureSpotlight = true;\r\n vm.searchFlag = false;\r\n vm.searchSlide = searchSlide;\r\n vm.filterClose = filterClose;\r\n vm.lensviewtable = true;\r\n vm.getTable = getTable;\r\n vm.getLink = getLink;\r\n vm.getClass = getClass;\r\n vm.getField = getField;\r\n vm.isLinkImg = isLinkImg;\r\n vm.getPrority = getPrority;\r\n vm.getProrityColor = getProrityColor;\r\n vm.getColumnWidth = getColumnWidth;\r\n vm.gotoSelectUser = gotoSelectUser;\r\n vm.spotlighttable = true;\r\n vm.listSelectedCount = 0;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.selected = selected;\r\n vm.getFeatureSpotlight = FeatureSpotlightService.getFeatureSpotlight();\r\n vm.lensviewtitle = \"Maximum of 10 Active Slides\";\r\n vm.searchListData = search_spotlight;\r\n vm.slide_status = [{\"type\": \"DRAFT\", \"status\": \"draft\"}, {\"type\": \"ACTIVE\", \"status\": \"active\"}, {\"type\": \"INACTIVE\", \"status\": \"inactive\"}];\r\n vm.priority = [{\"type\": \"High Priority\", \"status\": \"true\", \"color\": \"orange\", \"icon\": \"star\"}, {\"type\": \"Low Priority\", \"status\": \"false\", \"color\": \"#ccc\", \"icon\": \"star_border\"}];\r\n vm.checkAll = checkAll;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.isLoading = {table: true};\r\n vm.getSelectedFilterCount = getSelectedFilterCount;\r\n vm.getSelectedActiveCount = getSelectedActiveCount;\r\n vm.currentUser = UserService.getUserData();\r\n var columns = [\r\n { \"field\": \"selected\", \"title\": \"Select\" },\r\n { \"field\": \"feature_name\", \"title\": 'ADMIN.FEATURE.FEATURE_LABEL',\"sortable\": \"feature_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n { \"field\": \"published_date_time\", \"title\": 'ADMIN.FEATURE.PUB_DATE', \"sortable\": \"published_date_time\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n { \"field\": \"priority\", \"title\": 'ADMIN.FEATURE.PRIORITY', \"sortable\": \"priority\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n { \"field\": \"slide_image\", \"title\": 'ADMIN.FEATURE.FEATURE_IMAGE', \"sortable\": null, \"filter\": {} },\r\n { \"field\": \"slide_title\", \"title\": 'ADMIN.FEATURE.SLIDE_HEADLINE', \"sortable\": \"slide_title\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n { \"field\": \"index_status\", \"title\": 'ADMIN.FEATURE.STATUS', \"sortable\": \"index_status\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n { \"field\": \"action\", \"title\": '', \"sortable\": null, \"filter\": {}}\r\n\r\n ];\r\n vm.columns = columns;\r\n vm.imgLink = {field: \"slide_image.url\", column: \"slide_image\", url: \"slide_image\"};\r\n vm.buttons = [\r\n { id: 0, action: add_slide_click, display: 'ADMIN.FEATURE.ADD_SLIDE', icon: 'local_play' },\r\n { id: 1, action: searchSlide, display: 'ADMIN.FEATURE.SPOTLIGHT_SEARCH', icon: '', lensviewIcon: true },\r\n { id: 2, action: filterClose, icon: '', closeButton: true }\r\n ];\r\n vm.priorityStar = {field: \"slide_image.url\", column: \"priority\", icon: \"star\", newicon: \"star_border\", style: \"orange\"};\r\n vm.globals={};\r\n vm.globals.tableParams1 = new NgTableParams({}, {\r\n debugId: \"Table 1\",\r\n dataset: []\r\n });\r\n vm.selectUser = selectUser;\r\n vm.shiftSelect = shiftSelect;\r\n vm.bulkUpdate = bulkUpdate;\r\n vm.canDelete = canDelete;\r\n vm.bulkDelete = bulkDelete;\r\n vm.showToastWithFile = showToastWithFile;\r\n\r\n $scope.$on('$mdMenuOpen', function() {\r\n $timeout(function () {\r\n //getting menu content container by tag id from html\r\n var menuIndexContentContainer = angular.element(document.getElementById('spotlightIndexMenu'));\r\n // Using parent() method to get parent warper with .md-open-menu-container class and adding custom class.\r\n menuIndexContentContainer.parent().addClass('spotlightIndexDropdown');\r\n });\r\n });\r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n function subscribeToTable(tableParams){\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n if(vm.spotlightTable!=undefined){\r\n angular.forEach(vm.spotlightTable.data, function(v,k){\r\n vm.spotlightTable.data[k].selected = false;\r\n });\r\n }\r\n }, $scope, tableParams);\r\n }\r\n $scope.$on(\"spotlightTable:stateChanged\", function(event, loading){\r\n vm.isLoading.table = loading;\r\n });\r\n\r\n function getSelectedCount() {\r\n return getselectedUsersCount().length;\r\n function performFilter(user){\r\n switch(action){\r\n case 'activate':\r\n return !user.is_active;\r\n case 'deactivate':\r\n return user.is_active;\r\n default:\r\n return true;\r\n }\r\n if (vm.spotlightTable.settings().data){\r\n return vm.spotlightTable.settings().data.filter(function(user){\r\n return user.selected && performFilter(user);\r\n }).length;\r\n } else {\r\n return 0;\r\n }\r\n // return vm.listSelectedCount;\r\n }\r\n }\r\n\r\n\r\n\r\n function getSelectedFilterCount(key, val) {\r\n selectedUsers = getselectedUsersCount();\r\n selectedUsers = selectedUsers.filter(function (el) {\r\n return (el[key] === val);\r\n });\r\n return selectedUsers.length\r\n }\r\n\r\n function getSelectedActiveCount() {\r\n selectedUsers = getselectedUsersCount();\r\n selectedUsers = selectedUsers.filter(function (el) {\r\n return (el['slide_status'] == \"published\" && el['is_active'] == false)\r\n });\r\n return selectedUsers.length\r\n }\r\n\r\n function getColumnWidth(column) {\r\n if (column == 'slide_title'){\r\n return '210px';\r\n } else if (column == 'selected' || column == 'action'){\r\n return '70px';\r\n }else if (column == 'priority') {\r\n return '150px';\r\n }else if (column == 'index_status'){\r\n return '100px';\r\n }else {\r\n return '150px';\r\n }\r\n\r\n }\r\n\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/feature-spotlight/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n }\r\n\r\n function getselectedUsersCount(){\r\n if(vm.getTable().data){\r\n return vm.getTable().data\r\n .filter(function(user){\r\n return user.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/feature-spotlight/modals/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n function checkAll(selected){\r\n vm.spotlightTable.data.map(function(user){\r\n user.selected = selected;\r\n });\r\n if(selected)\r\n vm.listSelectedCount = vm.spotlightTable.data.length;\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n function selected(index){\r\n vm.lastSelected = index;\r\n if (vm.spotlightTable.data.length){\r\n vm.lastSelectedValue = vm.spotlightTable.data[index].selected;\r\n }\r\n }\r\n\r\n function selectUser($event, index){\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n if(vm.spotlightTable != undefined)\r\n vm.listSelectedCount = $filter('filter')(vm.spotlightTable.data, {selected: true}).length;\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n function shiftSelect(index){\r\n\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.spotlightTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n function search_spotlight(isClear){\r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (key == \"index_status\"){\r\n if (vm.searchData[key] == \"active\"){\r\n search[\"slide_status\"] = \"published\"\r\n search[\"active\"] = true\r\n }\r\n else if (vm.searchData[key] == \"inactive\"){\r\n search[\"slide_status\"] = \"published\"\r\n search[\"active\"] = false\r\n }\r\n else if (vm.searchData[key] == \"draft\") {\r\n search[\"slide_status\"] = \"draft\"\r\n }\r\n else {\r\n search\r\n }\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n }\r\n\r\n $location.search(search);\r\n FeatureSpotlightService.setQuery(search);\r\n }\r\n\r\n\r\n function getTable(){\r\n // // console.log(filterActiveSlide.data);\r\n // if (filterActiveSlide.) {}\r\n vm.spotlightTable = FeatureSpotlightService.getUserTable();\r\n \treturn FeatureSpotlightService.getUserTable();\r\n }\r\n /*\r\n * These function is navigate to Add Spotlight Slide page\r\n */\r\n function add_slide_click() {\r\n $location.path('/featureSpotlight/addspotlight');\r\n }\r\n\r\n function searchSlide() {\r\n vm.searchFlag = true;\r\n\r\n }\r\n\r\n function filterClose() {\r\n vm.searchFlag = false;\r\n\r\n }\r\n\r\n function gotoSelectUser(ev, data){\r\n var spotlightId = data;\r\n $location.url(\"/featureSpotlight/addspotlight/\"+data.id);\r\n }\r\n // $rootScope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n // // console.log('edit params', params1, params2);\r\n // // if(params1 != params2 || UserService.getCompanyRouteStatus()){\r\n // // // // console.log('edit params', UserManagementService.getUsers('lens_group_users'));\r\n // // }\r\n // });\r\n function getLink(data){\r\n // // console.log('data url', data.slide_image);\r\n if (data.slide_image && data.slide_image.url)\r\n {\r\n return data.slide_image.url;\r\n }\r\n }\r\n function isLinkImg(field){\r\n return field == vm.imgLink.column;\r\n }\r\n\r\n function getPrority(data){\r\n if (data.priority == true){\r\n $scope.myColor = \"orange\";\r\n return vm.priorityStar.icon;\r\n } else {\r\n $scope.myColor = \"#ccc\";\r\n return vm.priorityStar.newicon;\r\n }\r\n }\r\n\r\n function getProrityColor(data){\r\n if (data.priority == true){\r\n return \"orange\";\r\n } else {\r\n return none;\r\n }\r\n }\r\n function getField(item, field){\r\n switch (field){\r\n case \"index_status\":\r\n {\r\n return item[field].toUpperCase();\r\n }\r\n default:\r\n return item[field];\r\n }\r\n }\r\n function getClass(item, field){\r\n switch (field){\r\n case \"index_status\":\r\n {\r\n //return item[\"active\"] ? \"ACTIVE\" : item[field] == \"published\" ? \"INACTIVE\" : \"DRAFT\";\r\n if (item[field] == \"inactive\"){\r\n return \"inactive-user\"\r\n }\r\n else if (item[field] == \"active\") {\r\n if (!item[\"is_active\"])\r\n return \"future-active-user\"\r\n else\r\n return \"current-active-user\"\r\n }\r\n else {\r\n return \"draft-status\"\r\n }\r\n }\r\n //return item[field] ? \"draft-status\" : \"active-user\" || \"inactive-user\";\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function createBulkParamsSpotlightIds()\r\n {\r\n var params = {};\r\n params.spotlight_ids = FeatureSpotlightService.getSelectedSlides().map(function(slide){return slide.id;});\r\n var msg = [];\r\n if(params.spotlight_ids.length == 1){\r\n var slides = {};\r\n slides.name = FeatureSpotlightService.getSelectedSlides().map(function(slide){return slide.feature_name;});\r\n msg.push(slides.name[0]+\" has been activated from the slides list\");\r\n }\r\n return params\r\n }\r\n\r\n function bulkUpdate(hsh, api_method_url) {\r\n params = createBulkParamsSpotlightIds()\r\n Object.assign(params, hsh)\r\n FeatureSpotlightService.bulkUpdate(params, api_method_url).then(function onSuccess(response) {\r\n vm.closeModal();\r\n vm.showToastWithFile('save-slide.success.html', [response.data.messages]);\r\n vm.getFeatureSpotlight = FeatureSpotlightService.getFeatureSpotlight();\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n }, function onError(response) {\r\n vm.showToastWithFile('save-slide.error.html', [response.data.messages]);\r\n });\r\n }\r\n\r\n function canDelete(ev, modal)\r\n {\r\n var active_spotlights = []\r\n active_spotlights = FeatureSpotlightService.getSelectedSlides().filter(function(slide){return slide.is_active;});\r\n if (active_spotlights.length > 0)\r\n showToastWithFile('delete-slide.error.html', [\"Only draft or inactive status slides can be deleted\"]);\r\n else\r\n showModal(ev, modal)\r\n }\r\n\r\n function bulkDelete()\r\n {\r\n params = createBulkParamsSpotlightIds()\r\n FeatureSpotlightService.bulkDelete(params).then(function onSuccess(response) {\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-slide.success.html', [response.data.messages]);\r\n vm.getFeatureSpotlight = FeatureSpotlightService.getFeatureSpotlight();\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n }, function onError(response) {\r\n vm.showToastWithFile('delete-slide.error.html', [response.data.messages]);\r\n });\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n\tangular.\r\n\tmodule('textAngular').\r\n\tcontroller('addfeatureSpotlightController', addfeatureSpotlightController);\r\n\r\n\t/** @ngInject */\r\n\taddfeatureSpotlightController.$inject = ['$scope', '$log', '$state', '$translatePartialLoader', '$q',\r\n\t\t'$timeout', '$location', '$stateParams', '$mdToast', '$mdDialog', '$mdMedia', 'NgTableParams', 'FeatureSpotlightService', 'mdSelectHelper', 'api'];\r\n\r\n\tfunction addfeatureSpotlightController($scope, $log, $state, $translatePartialLoader, $q, $timeout, $location,\r\n\t\t$stateParams, $mdToast, $mdDialog, $mdMedia, NgTableParams, FeatureSpotlightService, mdSelectHelper, api) {\r\n\r\n\t\t/* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('spotlight');\r\n\r\n var vm = this;\r\n vm.createSlide = createSlide;\r\n vm.newSlide = {priority: false, active: false};\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.publishOptionsArr = [\"Draft\", \"Published\"];\r\n vm.uploadFile = uploadFile;\r\n vm.isCreate = true;\r\n vm.uploadFile = uploadFile;\r\n vm.minDate = new Date();\r\n vm.deleteSlide = deleteSlide;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.isRequired = false;\r\n vm.isDisabled = false;\r\n vm.isSaveDisabled = false;\r\n vm.formIsValid = formIsValid;\r\n vm.publishedDateTimeValid = publishedDateTimeValid;\r\n vm.canDelete = canDelete;\r\n vm.canSetNew = false;\r\n vm.checkValue = checkValue;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.convertToEst = convertToEst;\r\n vm.validateDateGreaterThanCheck = true;\r\n\r\n if($stateParams.id)\r\n {\r\n vm.isCreate = false;\r\n vm.isSlideActiveDisabled = false;\r\n vm.validateDateGreaterThanCheck = false;\r\n FeatureSpotlightService.setSpotlightSlide($stateParams.id).then(function(response){\r\n if(response != null)\r\n {\r\n vm.newSlide = response;\r\n //vm.newSlide.slide_status = response.slide_status[0];\r\n if (response.slide_status[0])\r\n vm.newSlide.slide_status = response.slide_status[0][0].toUpperCase() + response.slide_status[0].slice(1);\r\n if (response.published_date_time)\r\n {\r\n var tz = moment.tz.guess();\r\n vm.slideDate = new Date(moment.tz(response.published_date_time, \"America/New_York\").format('YYYY-MM-DD'));\r\n vm.slideTime = new Date(moment.tz(response.published_date_time, tz).format('YYYY-MM-DD HH:mm:ss') + \".000Z\");\r\n // vm.slideTime = new Date(response.published_date_time);\r\n\r\n }\r\n\r\n vm.newSlide.slide_image = vm.newSlide.slide_image || {};\r\n if (!vm.newSlide.slide_image || (vm.newSlide.slide_image.url != null))\r\n vm.newSlide.slide_image.url = '';\r\n\r\n\r\n\r\n }\r\n });\r\n }\r\n else\r\n {\r\n vm.isSlideActiveDisabled = true;\r\n vm.newSlide.slide_status = \"Draft\";\r\n }\r\n\r\n $scope.$on('$mdMenuOpen', function() {\r\n $timeout(function () {\r\n //getting menu content container by tag id from html\r\n var menuEditContentContainer = angular.element(document.getElementById('spotlightEditMenu'));\r\n // Using parent() method to get parent warper with .md-open-menu-container class and adding custom class.\r\n menuEditContentContainer.parent().addClass('spotlightEditDropdown');\r\n });\r\n });\r\n\r\n $scope.$watch(\"vm.newSlide.slide_image\", function(newValue, oldValue){\r\n if (newValue != oldValue){\r\n vm.uploadFile(vm.newSlide.slide_image);\r\n }\r\n });\r\n\r\n $scope.$watch(\"vm.newSlide.slide_status\", function(newValue, oldValue){\r\n if (newValue == \"Published\"){\r\n vm.isRequired = true;\r\n vm.isDisabled = true;\r\n var isChanged;\r\n if (!vm.isCreate){\r\n if(vm.SpotlightForm.slide_active)\r\n isChanged = vm.SpotlightForm.slide_active.$dirty;\r\n if(vm.SpotlightForm)\r\n isFormChanged = vm.SpotlightForm.$dirty;\r\n if ((vm.newSlide.active && isChanged && isFormChanged) || (vm.newSlide.index_status == \"inactive\" && isFormChanged) || (vm.newSlide.active_slide && isFormChanged )){\r\n vm.canSetNew = true;\r\n }\r\n }\r\n if (oldValue == \"Draft\")\r\n {\r\n vm.validateDateGreaterThanCheck = true\r\n }\r\n }\r\n else\r\n {\r\n vm.isRequired = false;\r\n vm.isDisabled = false;\r\n vm.canSetNew = false;\r\n vm.validateDateGreaterThanCheck = false\r\n }\r\n publishedDateTimeValid()\r\n });\r\n\r\n $scope.$watch(\"vm.newSlide.active\", function(newValue, oldValue){\r\n if (newValue == true){\r\n vm.isPublishedDisabled = true\r\n if($stateParams.id)\r\n vm.isSlideActiveDisabled = false;\r\n }\r\n else\r\n {\r\n vm.isPublishedDisabled = false\r\n if($stateParams.id)\r\n vm.isSlideActiveDisabled = true;\r\n }\r\n });\r\n\r\n $scope.$watch(\"vm.newSlide.is_active\", function(newValue, oldValue){\r\n if (newValue == true){\r\n vm.isPublishedDisabled = true\r\n if($stateParams.id)\r\n vm.isSlideActiveDisabled = false;\r\n }\r\n else\r\n {\r\n vm.isPublishedDisabled = false\r\n if($stateParams.id)\r\n vm.isSlideActiveDisabled = true;\r\n }\r\n });\r\n\r\n $scope.$watch(\"vm.slideDate\", function(newValue, oldValue){\r\n slideDate = newValue\r\n slideTime = vm.slideTime\r\n if (slideDate != null && slideTime != null)\r\n vm.newSlide.published_date_time = convertToEst(slideDate, slideTime);\r\n else\r\n vm.newSlide.published_date_time = undefined;\r\n publishedDateTimeValid()\r\n });\r\n\r\n $scope.$watch(\"vm.slideTime\", function(newValue, oldValue){\r\n slideDate = vm.slideDate\r\n slideTime = newValue\r\n if (slideDate != null && slideTime != null)\r\n vm.newSlide.published_date_time = convertToEst(slideDate, slideTime);\r\n else\r\n vm.newSlide.published_date_time = undefined;\r\n publishedDateTimeValid()\r\n });\r\n\r\n function convertToEst(dateVal, timeVal) {\r\n var date = new Date(moment(dateVal).format('YYYY-MM-DD ') + moment(timeVal).format('HH:mm:ss'));\r\n return moment(date.toGMTString()).format(); //.tz('America/New_York')\r\n\r\n /*Refactored the logic*/\r\n // dt_time = dateVal.toString().substr(0, 16) + moment(timeVal).format().substr(11, 8) + \" GMT-0400\"\r\n // return new Date(dt_time)\r\n }\r\n\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 250,\r\n templateUrl: '/app/admin/feature-spotlight/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n }\r\n\r\n function uploadFile(file, errFiles) {\r\n if (!file || file.constructor != File) {return;}\r\n var reader = new FileReader();\r\n reader.onload = function(event){\r\n vm.newSlide.slide_image.url = event.target.result\r\n }\r\n reader.readAsDataURL(file);\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n\r\n function showModal(ev, modal) {\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/feature-spotlight/modals/' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function publishedDateTimeValid()\r\n {\r\n if (vm.SpotlightForm)\r\n {\r\n validatSlideDate = vm.SpotlightForm.publish_date\r\n validatSlideTime = vm.SpotlightForm.publish_time\r\n }\r\n if (vm.newSlide.slide_status == \"Published\" && (vm.newSlide.is_active == false || vm.newSlide.is_active == undefined))\r\n {\r\n if (vm.slideDate)\r\n delete validatSlideDate.$error.required;\r\n else\r\n validatSlideDate.$error.required = true;\r\n if (vm.slideTime)\r\n delete validatSlideTime.$error.required;\r\n else\r\n validatSlideTime.$error.required = true;\r\n if (vm.validateDateGreaterThanCheck && vm.newSlide.published_date_time && (new Date(vm.newSlide.published_date_time) <= new Date))\r\n validatSlideDate.$error.minDate = true;\r\n }\r\n else\r\n {\r\n if (vm.SpotlightForm && vm.SpotlightForm.publish_date)\r\n {\r\n delete validatSlideDate.$error.required;\r\n delete validatSlideTime.$error.required;\r\n delete validatSlideDate.$error.minDate;\r\n }\r\n }\r\n }\r\n\r\n function formIsValid(){\r\n if (vm.SpotlightForm){\r\n return (vm.SpotlightForm.$valid && !vm.SpotlightForm.publish_date.$error.minDate)\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n\r\n function checkValue(newSlide){\r\n if (!newSlide.slide_image)\r\n newSlide.slide_image = undefined;\r\n if (newSlide.published_date_time == null)\r\n newSlide.published_date_time = undefined;\r\n if (newSlide.slide_title == null)\r\n newSlide.slide_title = undefined;\r\n if (newSlide.slide_content == null)\r\n newSlide.slide_content = undefined;\r\n }\r\n\r\n function createSlide(newSlide) {\r\n if (vm.formIsValid()) {\r\n vm.isSaveDisabled = true;\r\n checkValue(newSlide)\r\n if (newSlide.id) {\r\n FeatureSpotlightService.updateSlide(newSlide).then(function(resp) {\r\n showToastWithFile('save-slide.success.html', ['Spotlight Updated Successfully']);\r\n if (newSlide.mark_as_new)\r\n {\r\n FeatureSpotlightService.setUnSeenSpotlight(newSlide)\r\n }\r\n\r\n setTimeout(function(){\r\n $location.path('/featureSpotlight');\r\n },500);\r\n }).catch(function(error) {\r\n vm.isSaveDisabled = false;\r\n if(error.data.messages)\r\n showToastWithFile('save-slide.error.html', error.data.messages);\r\n else if(error.data.error)\r\n showToastWithFile('save-slide.error.html', [error.data.error]);\r\n else if(error.error)\r\n showToastWithFile('save-slide.error.html', error.error);\r\n else\r\n showToastWithFile('save-slide.error.html', '');\r\n });\r\n }\r\n else {\r\n FeatureSpotlightService.createSlide(newSlide).then(function(resp) {\r\n showToastWithFile('save-slide.success.html', ['Spotlight Created Successfully']);\r\n setTimeout(function(){\r\n $location.path('/featureSpotlight');\r\n },500);\r\n }).catch(function(error) {\r\n vm.isSaveDisabled = false;\r\n if(error.data.messages)\r\n showToastWithFile('save-slide.error.html', error.data.messages);\r\n else if(error.data.error)\r\n showToastWithFile('save-slide.error.html', [error.data.error]);\r\n else if(error.error)\r\n showToastWithFile('save-slide.error.html', error.error);\r\n else\r\n showToastWithFile('save-slide.error.html', '');\r\n });\r\n }\r\n }\r\n }\r\n\r\n function canDelete(params, ev, modal)\r\n {\r\n if (params.is_active)\r\n showToastWithFile('delete-slide.error.html', [\"Only draft or inactive status slides can be deleted\"]);\r\n else\r\n showModal(ev, modal)\r\n }\r\n\r\n function deleteSlide(params) {\r\n FeatureSpotlightService.deleteSlide(params).then(\r\n function(res){\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-slide.success.html', ['Spotlight Deleted Successfully']);\r\n $location.path(\"/featureSpotlight\");\r\n }, function errorCallback(error){\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-slide.error.html', [''+error.status+': '+error.statusText]);\r\n });\r\n }\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .component('logExceptionRecord', {\r\n templateUrl: \"/app/admin/exceptions-csl/log.html\",\r\n controller: ExceptionLogDetailController,\r\n bindings: {\r\n data: '<'\r\n }\r\n });\r\n\r\n ExceptionLogDetailController.inject = [\"$rootScope\", \"$scope\", \"CompanyManagementService\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', 'UserManagementService', 'mdSelectHelper', '$mdMedia', '$mdDialog', 'UserService']\r\n \r\n function ExceptionLogDetailController($rootScope, $scope, CompanyManagementService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, UserManagementService, mdSelectHelper, $mdMedia, $mdDialog, UserService){\r\n var ctrl = this;\r\n\r\n $rootScope.$on('exception_updated', function(ev, logs){\r\n ctrl.data.log = logs;\r\n });\r\n\r\n ctrl.processActions = function(actions){\r\n return Object.keys(actions).map(function(key){\r\n var action = actions[key] === Object(actions[key]) ? JSON.stringify(actions[key]) : actions[key];\r\n return \"<strong>\" + key + \"</strong>\" + \": \" + action +\"\\n\";\r\n }).join(', ');\r\n }\r\n\r\n ctrl.logExportShowCSV = function(){\r\n $scope.exportCsvLoaded = false;\r\n CompanyManagementService.exportCompanyLogs(ctrl.data).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function(e) {\r\n \r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant(e.data.errors))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n }\r\n\r\n}) ();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('ExceptionsCslService', ExceptionsCslService);\r\n\r\n /** @ngInject */\r\n ExceptionsCslService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function ExceptionsCslService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var isEmpty = true,\r\n exception = getExceptionObject(),\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n changeStatusException: changeStatusException,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n getExceptionObject : getExceptionObject,\r\n sendEmailException : sendEmailException,\r\n getException : getException,\r\n getExceptionDetails: function() { return exception; },\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getExceptions : getExceptions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a exception\r\n // // ------------------\r\n function getException(id){\r\n try{\r\n exception = getExceptionObject();\r\n return $http.get(api.url_v2 + '/csl/exceptions/'+ id/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n //// console.log(response);\r\n unpackageException(response.data);\r\n //// console.log(user);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Do something else;\r\n }\r\n exception = null;\r\n });\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function unpackageException(exception_data){\r\n for (var field in exception_data){\r\n exception[field] = exception_data[field];\r\n }\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getExceptions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function changeStatusException(params,id,type){\r\n try{\r\n var query = params;\r\n var url = api.url_v2 +'/csl/exceptions/'+ id;\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n if(type == 'end-live'){\r\n loading = true;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }else{\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }catch(e){\r\n\r\n }\r\n\r\n }\r\n\r\n function sendEmailException(params,id){\r\n var query = params;\r\n var url = api.url_v2 +'/csl/exceptions/'+id+'/send_exception_emails';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n data :query\r\n }).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", is_active: true};\r\n }\r\n\r\n function getExceptions(){\r\n loading = true;\r\n timeoutTid = false;\r\n //var url=api.url+\"/companies/\"+$stateParams.id+\"/departments\";\r\n var url=api.url_v2+\"/csl/exceptions/pending_exceptions\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.exceptions.length);\r\n exceptionTable.settings({data: response.data.exceptions});\r\n exceptionTable.data = response.data.exceptions;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", exceptionTable.data);\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response){\r\n var data_settings = response.data.exceptions.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }\r\n\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('ExceptionsCslController', ExceptionsCslController);\r\n ExceptionsCslController.$inject = ['$scope', '$window', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'ExceptionsCslService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper', 'UserService'];\r\n function ExceptionsCslController($scope, $window, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, ExceptionsCslService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService) {\r\n var vm = this;\r\n\r\n vm.columns = [\r\n { \"field\": \"status\", \"title\": 'STATUS', \"sortable\": \"status\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"created_at\", \"title\": 'DATE CREATED', \"sortable\": \"created_at\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"company_name\", \"title\": 'CUSTOMER', \"sortable\": \"company_name\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"pronumber\", \"title\": 'PRO #', \"sortable\": \"pronumber\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"estimated_date\", \"title\": 'APPT.DATE', \"sortable\": \"estimated_date\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"estimated_time\", \"title\": 'APPT.TIME', \"sortable\": \"estimated_time\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"actual_date\", \"title\": 'ACTUAL DATE', \"sortable\": \"actual_date\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"actual_time\", \"title\": 'ACTUAL TIME', \"sortable\": \"actual_time\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\": \"true\", isDate: false }\r\n ];\r\n\r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n { id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '', lensviewIcon: true }\r\n ];\r\n\r\n\r\n vm.icon = \"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n vm.getMatch = getMatch;\r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = ExceptionsCslService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.getClass = getClass;\r\n vm.checkAll = checkAll;\r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.cancelException = cancelException;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.showRejectModal = showRejectModal;\r\n vm.showEndModal = showEndModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.status = { cssClass: \"md-primary\" };\r\n vm.possibleContacts = [];\r\n vm.link = { field: \"id\", column: \"name\", url: \"csl-exceptions\" };\r\n vm.gotoSelectUser = gotoSelectUser;\r\n $rootScope.isLoading = true;\r\n vm.user = UserService.getUserData();\r\n vm.rejectSubmit = rejectSubmit;\r\n vm.endExceptionSubmit = endExceptionSubmit;\r\n vm.approveException = approveException;\r\n vm.textCustType = false;\r\n vm.textEndedType = false;\r\n vm.isdeliverdShipment = false;\r\n vm.endException = endException;\r\n vm.reOpenException = reOpenException;\r\n vm.cancelEndException = cancelEndException;\r\n vm.deliverdException = deliverdException;\r\n vm.cancelOpenException = cancelOpenException;\r\n vm.cancelDeliverdException = cancelDeliverdException;\r\n vm.changeEndExceptionStatus = changeEndExceptionStatus;\r\n vm.changeOpenExceptionStatus = changeOpenExceptionStatus;\r\n vm.viewShipment = viewShipment;\r\n vm.logsVisible = logsVisible;\r\n //vm.clearAll = clearAll; \r\n vm.user = UserService.getUserData();\r\n vm.showModalWithFile = showModalWithFile\r\n\r\n\r\n vm.logsVisible();\r\n vm.excAprover = '';\r\n if (vm.user) {\r\n if (vm.user.first_name || vm.user.last_name) {\r\n vm.excAprover = (vm.user.first_name ? vm.user.first_name : \"\") + \" \" + (vm.user.last_name ? vm.user.last_name : \"\");\r\n } else {\r\n vm.excAprover = vm.user.email;\r\n }\r\n }\r\n\r\n vm.getUser = function () {\r\n\r\n if (vm.user.first_name || vm.user.last_name) {\r\n return (vm.user.first_name ? vm.user.first_name : \"\") + \" \" + (vm.user.last_name ? vm.user.last_name : \"\");\r\n } else {\r\n return vm.user.email;\r\n }\r\n };\r\n\r\n if ($state.current.name == 'cslExceptions') {\r\n vm.viewExceptionText = true;\r\n }\r\n\r\n switch ($state.current.name) {\r\n\r\n case 'vieCSLExceptions':\r\n vm.isCreate = false;\r\n vm.saveBtnShowNew = true;\r\n //Get the exception from the service \r\n try {\r\n vm.exception = ExceptionsCslService.getExceptionObject();\r\n ExceptionsCslService.getException($stateParams.id).then(function () {\r\n vm.exception = ExceptionsCslService.getExceptionDetails();\r\n vm.exception.estimated = vm.exception.estimated_date + \" \" + vm.exception.estimated_time;\r\n vm.exception.actual = vm.exception.actual_date + \" \" + vm.exception.actual_time;\r\n\r\n try {\r\n //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if (JSON.parse(localStorage.getItem(\"user\")).permissions.csl.CslException.includes('all_clients_approver')) {\r\n vm.readAccess = false;\r\n } else if (JSON.parse(localStorage.getItem(\"user\")).permissions.csl.CslException.includes('read')\r\n && !JSON.parse(localStorage.getItem(\"user\")).permissions.csl.CslException.includes('approver')) {\r\n vm.readAccess = true;\r\n } else {\r\n if (vm.user.approver_level_company_ids.includes(vm.exception.company_id)) {\r\n vm.readAccess = false;\r\n } else {\r\n vm.readAccess = true;\r\n }\r\n\r\n }\r\n }\r\n catch (e) {\r\n vm.readAccess = false;\r\n }\r\n\r\n\r\n });\r\n } catch (e) {\r\n\r\n }\r\n\r\n\r\n break;\r\n\r\n case 'cslExceptions':\r\n $rootScope.isLoading = true;\r\n var search = $location.search();\r\n for (var key in search) {\r\n vm.lookup[key] = search[key];\r\n }\r\n ExceptionsCslService.setQuery(search);\r\n\r\n // $scope.$on(\"exceptionsTable:loaded\", function(event, data) {\r\n // vm.noResults = data.length == 0; \r\n // });\r\n\r\n $scope.$on(\"exceptionsTable:stateChanged\", function (event, loading) {\r\n $rootScope.isLoading = loading;\r\n });\r\n $scope.$on\r\n ExceptionsCslService.getExceptions();\r\n break;\r\n\r\n }\r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n ExceptionsCslService.getExceptions();\r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n vm.addAllClientRow = addAllClientRow;\r\n\r\n function subscribeToTable(tableParams) {\r\n if ($state.current.name == 'lensgroup' || $state.current.name == 'showCompany' || $state.current.name == 'showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function (p1, p2, p3) {\r\n angular.forEach(p2, function (v, k) {\r\n if (v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if (vm.currentPage <= 1) {\r\n angular.copy(vm.showAllClientExceptionOrg, vm.showAllClientException);\r\n }\r\n else {\r\n vm.showAllClientException = [];\r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function (v, k) {\r\n if (v.selected || v.aprrover_level == \"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if ($state.current.name == 'showCompany') {\r\n\r\n $scope.$watch(function () { return $location.path() }, function (params1, params2) {\r\n var res = ExceptionsCslService.getExceptions();\r\n res.then(function (dd) {\r\n vm.getList = dd;\r\n });\r\n });\r\n }\r\n\r\n\r\n\r\n function getSelectedCount() {\r\n return vm.listSelectedCount;\r\n }\r\n\r\n function logsVisible() {\r\n vm.logs_visible = false;\r\n if (vm.exception.log != null)\r\n var logs_empty = typeof vm.exception.log == 'undefined' ? true : !vm.exception.log.length > 0;\r\n\r\n vm.logs_visible = true;\r\n\r\n return !logs_empty;\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function gotoSelectUser(ev, data) {\r\n var lensGroupId = data;\r\n $location.url(\"/csl-exceptions/\" + data.id);\r\n }\r\n\r\n function viewShipment(number) {\r\n $window.open(\"/shipping-details-csl/\" + number, '_blank');\r\n }\r\n\r\n\r\n function endException() {\r\n vm.textCustType = true;\r\n }\r\n\r\n function reOpenException() {\r\n vm.textEndedType = true;\r\n }\r\n\r\n function deliverdException() {\r\n vm.isdeliverdShipment = true;\r\n }\r\n\r\n function cancelDeliverdException() {\r\n vm.isdeliverdShipment = false;\r\n }\r\n\r\n function cancelEndException() {\r\n vm.textCustType = false;\r\n }\r\n\r\n function cancelOpenException() {\r\n vm.textEndedType = false;\r\n }\r\n\r\n function rejectSubmit(val, id, status) {\r\n if (val == undefined || val.length == 0) {\r\n $scope.reject_reason_check = true;\r\n } else if (val.length > 0) {\r\n $scope.reject_reason_check = false;\r\n var params = {};\r\n params.status = status;\r\n params.rejection_reason = val;\r\n\r\n ExceptionsCslService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n vm.closeModal();\r\n $location.url(\"/csl-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('rejected-exception.success.html', '');\r\n }, 2500);\r\n\r\n\r\n } else {\r\n vm.closeModal();\r\n }\r\n }).catch(function (res) {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.data.messages !== 'undefined' ? res.data.messages : 'rejectException csl-exception error returned');\r\n });\r\n }\r\n\r\n }\r\n\r\n function changeEndExceptionStatus(id, status) {\r\n var params = {};\r\n\r\n params.status = status;\r\n\r\n ExceptionsCslService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n $location.url(\"/csl-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('posted-exception.success.html', '');\r\n }, 2500);\r\n } else {\r\n }\r\n });\r\n }\r\n\r\n function changeOpenExceptionStatus(id, status) {\r\n var params = {};\r\n\r\n params.status = status;\r\n\r\n ExceptionsCslService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n $location.url(\"/csl-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('posted-exception.success.html', '');\r\n }, 2500);\r\n } else {\r\n }\r\n });\r\n }\r\n\r\n function endExceptionSubmit(val, id, status) {\r\n\r\n var params = {};\r\n\r\n params.status = status;\r\n params.rejection_reason = val;\r\n\r\n ExceptionsCslService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n vm.closeModal();\r\n $location.url(\"/csl-exceptions\");\r\n } else {\r\n vm.closeModal();\r\n }\r\n });\r\n }\r\n\r\n function approveException(id, status) {\r\n var params = {};\r\n\r\n params.status = status;\r\n\r\n ExceptionsCslService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n $location.url(\"/csl-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('posted-exception.success.html', '');\r\n }, 2500);\r\n } else {\r\n }\r\n }).catch(function (res) {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.data.messages !== 'undefined' ? res.data.messages : 'generic csl-exception approveException error returned');\r\n });\r\n }\r\n\r\n function bulkDelete() {\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel();\r\n\r\n var params = {};\r\n params.exception_ids = ExceptionsCslService.getSelectedException().map(function (exception) { return exception.id; });\r\n\r\n ExceptionsCslService.bulkDeleteExceptions(params).then(function (res) {\r\n if (!res.errors) {\r\n vm.closeModal();\r\n showToastWithFile('delete-exception.success.html', '');\r\n } else {\r\n vm.closeModal();\r\n }\r\n });\r\n\r\n }\r\n\r\n function showModal(ev, modal) {\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showRejectModal(ev, modal) {\r\n /* Show the modal */\r\n $scope.reject_reason_check = false;\r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-csl/' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showEndModal(ev, modal) {\r\n /* Show the modal */\r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-csl/' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function addExceptions(ev, id, status, type) {\r\n\r\n if (type == 'end-live') {\r\n $scope.exceptionStatus = 'reopen';\r\n } else if (type == 'reject') {\r\n $scope.exceptionStatus = 'rejected';\r\n }\r\n else {\r\n $scope.exceptionStatus = status;\r\n }\r\n\r\n if (status == 'approve') {\r\n var params = {};\r\n params.status = status;\r\n ExceptionsCslService.changeStatusException(params, id, type).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n } else {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.error !== 'undefined' ? res.error : 'addException csl-exception error returned');\r\n }\r\n }).catch(function (res) {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.data.messages !== 'undefined' ? res.data.messages : 'generic csl-exception approveException error returned');\r\n });\r\n }\r\n if (status == 'end') {\r\n var params = {};\r\n params.status = status;\r\n ExceptionsCslService.changeStatusException(params, id, type).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n } else {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.error !== 'undefined' ? res.error : 'addException csl-exception error returned');\r\n }\r\n }).catch(function (res) {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.data.messages !== 'undefined' ? res.data.messages : 'generic csl-exception approveException error returned');\r\n });\r\n }\r\n \r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-csl/add-exception-approvers.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: false,\r\n scope: $scope,\r\n fullscreen: useFullScreen\r\n }).then(function (answer) {\r\n\r\n }, function () {\r\n\r\n });\r\n \r\n }\r\n\r\n function cancelException() {\r\n $location.url(\"/csl-exceptions\");\r\n }\r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function search_exceptions(isClear) {\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData) {\r\n if (isClear) {\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]) {\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n ExceptionsCslService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query) {\r\n //return CslExceptionService.autoComplete({field: key, value: query},vm.company);\r\n return ExceptionsCslService.autoComplete({ field: key, value: query });\r\n }\r\n\r\n function getMatchs(key, query) {\r\n return ExceptionsCslService.autoCompletes({ field: key, value: query }, vm.company);\r\n }\r\n\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: { message: message },\r\n controller: function ($scope, message) {\r\n $scope.messages = message;\r\n }\r\n });\r\n }\r\n function showModalWithFile(file, message) {\r\n $mdDialog.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/modals/' + file,\r\n locals: { message: message },\r\n controller: function ($scope, message) {\r\n $scope.messages = message;\r\n }\r\n }).then(function () {\r\n $location.url(\"/csl-exceptions\");\r\n });\r\n }\r\n\r\n function formIsValid() {\r\n if (vm.formDetails) {\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function getTable() {\r\n vm.exceptionTable = ExceptionsCslService.getExceptionTable();\r\n return ExceptionsCslService.getExceptionTable();\r\n }\r\n\r\n function addAllClientRow(exceptionTable, state) {\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){ \r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]); \r\n // }\r\n // });\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if (vm.exceptionTable.data[i].aprrover_level == 'All Clients') {\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n }\r\n }\r\n\r\n if (vm.currentPage <= 1) {\r\n angular.copy(vm.showAllClientExceptionOrg, vm.showAllClientException);\r\n }\r\n else {\r\n vm.showAllClientException = [];\r\n }\r\n\r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field) {\r\n switch (field) {\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"status\":\r\n if (item[field].charAt(0) != null || item[field].charAt(0) != undefined) {\r\n return item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n }\r\n case \"company_name\":\r\n return item[field] ? item[field].toUpperCase() : \"\";\r\n case \"created_at\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"\";\r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data) {\r\n return vm.link.url + \"/\" + data[vm.link.field];\r\n }\r\n\r\n function isLink(field) {\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field) {\r\n switch (field) {\r\n case \"status\":\r\n if (item[field] == 'pending') { return \"exception-pending\"; }\r\n if (item[field] == 'expired') { return \"exception-expired\"; }\r\n if (item[field] == 'ended') { return \"exception-ended\"; }\r\n if (item[field] == 'rejected') { return \"exception-rejected\"; }\r\n if (item[field] == 'live') { return \"exception-live\"; }\r\n case \"actual_date\":\r\n if (item[field]) { return \"exception-date\"; }\r\n case \"actual_time\":\r\n if (item[field]) { return \"exception-date\"; }\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index) {\r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length) {\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index) {\r\n var first, last;\r\n if (vm.lastSelected > index) {\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++) {\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected() {\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function (depart) {\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index) {\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey) {\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens = []\r\n vm.exceptionTable.data.map(function (exception) {\r\n vm.getList.map(function (obj) {\r\n if (obj.id == exception.id && exception.aprrover_level != \"All Clients\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if (vm.getList.length > 0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function (allException) {\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, { selected: true }).length;\r\n if (count1 > 0) {\r\n count = count1;\r\n }\r\n if (count2 > count1) {\r\n count = count2;\r\n }\r\n else {\r\n count = count1;\r\n }\r\n\r\n if (vm.exceptionTable != undefined) {\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if (vm.exceptionTable.data[i].aprrover_level == \"All Clients\") {\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected) {\r\n vm.exceptionTable.data.map(function (exception) {\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens = []\r\n vm.exceptionTable.data.map(function (exception) {\r\n exception.selected = selected;\r\n vm.getList.map(function (obj) {\r\n if (obj.id == exception.id && exception.aprrover_level != \"All Clients\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if (vm.getList.length > 0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function (allException) {\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if (count1 > 0) {\r\n count = count1;\r\n }\r\n if (count2 > count1) {\r\n count = count2;\r\n }\r\n else {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if (selected) {\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if (($state.current.name == 'lensgroup') || ($state.current.name == 'showUser') || ($state.current.name == 'showCompany')) {\r\n angular.forEach(vm.exceptionTable.data, function (v, k) {\r\n if (v.aprrover_level == 'All Clients') {\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected = false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers() {\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('ExceptionsCslExistService', ExceptionsCslExistService);\r\n\r\n /** @ngInject */\r\n ExceptionsCslExistService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function ExceptionsCslExistService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var exceptionFilterPersist = {}; //used to persist the search\r\n var awaitFilterPersist = {};\r\n exceptionFilterPersist.value = 'all';\r\n awaitFilterPersist.value = 'mine';\r\n\r\n var isEmpty = true,\r\n allFilter = 'all',\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n unpackageExceptions: unpackageExceptions,\r\n getExceptionObject : getExceptionObject,\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n getExceptionFilterPersist: function() {\r\n return exceptionFilterPersist;\r\n },\r\n getAllFilter: function(){\r\n return allFilter;\r\n },\r\n setAllFilter: function(filter){\r\n allFilter = filter;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getExceptions : getExceptions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function unpackageExceptions(response,filter){\r\n try{\r\n if(allFilter == 'all'){\r\n var res = response.data.exceptions.all;\r\n }\r\n if(allFilter == 'expired'){\r\n var res = response.data.exceptions.expired;\r\n }\r\n if(allFilter == 'ended'){\r\n var res = response.data.exceptions.ended;\r\n }\r\n if(allFilter == 'live'){\r\n var res = response.data.exceptions.live;\r\n }\r\n if(allFilter == 'rejected'){\r\n var res = response.data.exceptions.rejected;\r\n }\r\n var data_settings = res.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n //user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTableExist:loaded\", data);\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getExceptions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true};\r\n }\r\n\r\n function getExceptions(type){\r\n loading = true;\r\n timeoutTid = false;\r\n var url;\r\n if(type == undefined){\r\n url=api.url_v2+\"/csl/exceptions\";\r\n }else if(type == 'all'){\r\n url=api.url_v2+\"/csl/exceptions\";\r\n }\r\n else{\r\n url=api.url_v2+\"/csl/exceptions?state=\"+type;\r\n }\r\n //var url=api.url+\"/companies/\"+$stateParams.id+\"/departments\";\r\n //var url=api.url+\"/csl/exceptions\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n\r\n exceptionTable.total(response.data.exceptions.length);\r\n exceptionTable.settings({data: response.data.exceptions});\r\n exceptionTable.data = response.data.exceptions;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTableExist:loaded\", response.data);\r\n\r\n return unpackageExceptions(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout') \r\n .controller('ExceptionsCslExistController', ExceptionsCslExistController);\r\n ExceptionsCslExistController.$inject = ['$scope', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'ExceptionsCslExistService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper','UserService'];\r\n function ExceptionsCslExistController($scope, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, ExceptionsCslExistService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService){\r\n var vm = this; \r\n \r\n vm.columns = [ \r\n {\"field\": \"status\", \"title\": 'STATUS', \"sortable\": \"status\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"created_at\", \"title\": 'DATE CREATED', \"sortable\": \"created_at\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"company_name\", \"title\": 'CUSTOMER', \"sortable\": \"company_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pronumber\", \"title\": 'PRO #', \"sortable\": \"pronumber\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"estimated_date\", \"title\": 'APPT.DATE', \"sortable\": \"estimated_date\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"estimated_time\", \"title\": 'APPT.TIME', \"sortable\": \"estimated_time\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"actual_date\", \"title\": 'ACTUAL DATE', \"sortable\": \"actual_date\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"actual_time\", \"title\": 'ACTUAL TIME', \"sortable\": \"actual_time\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false} \r\n ]; \r\n \r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n {id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n vm.exceptionFilter = ExceptionsCslExistService.getExceptionFilterPersist();\r\n vm.counts = {all: {all: 0, live: 0, expired: 0, ended: 0, rejected: 0}}; \r\n vm.icon=\"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false; \r\n vm.getMatch = getMatch; \r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = ExceptionsCslExistService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField; \r\n vm.getClass = getClass; \r\n vm.checkAll = checkAll; \r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions; \r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete; \r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose; \r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.possibleContacts = []; \r\n vm.setFilter = setFilter;\r\n vm.isLoading = {account: false, role: false, contact: false, table: true};\r\n $rootScope.isLoadingExist = true;\r\n vm.link = {field: \"id\", column: \"name\", url: \"csl-exceptions\"};\r\n vm.gotoSelectUser = gotoSelectUser; \r\n\r\n //vm.clearAll = clearAll; \r\n\r\n if($state.current.name =='cslExceptions'){\r\n vm.viewExceptionText = true;\r\n } \r\n \r\n switch ($state.current.name){\r\n\r\n case 'vieCSLExceptions':\r\n vm.isCreate = false;\r\n vm.isLoading.account = true;\r\n vm.saveBtnShowNew = true;\r\n \r\n break; \r\n\r\n case 'cslExceptions':\r\n $rootScope.isLoadingExist = true;\r\n vm.exceptionFilter.value = 'all';\r\n $rootScope.all = 0;\r\n $rootScope.expired = 0;\r\n $rootScope.live = 0;\r\n $rootScope.ended = 0;\r\n $rootScope.rejected = 0;\r\n var search = $location.search();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n ExceptionsCslExistService.setQuery(search);\r\n $scope.$on(\"exceptionsTableExist:stateChanged\", function(event, loading){\r\n $rootScope.isLoadingExist = loading;\r\n });\r\n $scope.$on(\"exceptionsTableExist:loaded\", function(event, data){\r\n try{\r\n $rootScope.all = data.all_count;\r\n $rootScope.expired = data.expired_count;\r\n $rootScope.live = data.live_count;\r\n $rootScope.ended = data.ended_count;\r\n $rootScope.rejected = data.rejected_count; \r\n }catch(e){\r\n \r\n }\r\n });\r\n $scope.$on\r\n ExceptionsCslExistService.getExceptions('all');\r\n vm.exceptionTable = ExceptionsCslExistService.getExceptionTable();\r\n break;\r\n \r\n } \r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n ExceptionsCslExistService.getExceptions('all'); \r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false; \r\n\r\n vm.addAllClientRow = addAllClientRow; \r\n \r\n function subscribeToTable(tableParams){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n angular.forEach(p2,function(v,k){\r\n if(v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.aprrover_level ==\"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n $scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = ExceptionsCslExistService.getExceptions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n } \r\n\r\n\r\n function setFilter(filter, mode) {\r\n vm.exceptionFilter.value = filter;\r\n $rootScope.filterValue = filter;\r\n ExceptionsCslExistService.setAllFilter(filter);\r\n $rootScope.isLoadingExist = true;\r\n ExceptionsCslExistService.getExceptions(filter);\r\n }\r\n\r\n function gotoSelectUser(ev,data){\r\n var lensGroupId = data; \r\n $location.url(\"/csl-exceptions/\"+data.id); \r\n }\r\n \r\n\r\n function getSelectedCount() { \r\n return vm.listSelectedCount;\r\n } \r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n\r\n function bulkDelete(){\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel(); \r\n\r\n var params = {};\r\n params.exception_ids = ExceptionsCslExistService.getSelectedException().map(function(exception){return exception.id;});\r\n\r\n ExceptionsCslExistService.bulkDeleteExceptions(params).then(function(res){\r\n if (!res.errors){\r\n vm.closeModal(); \r\n showToastWithFile('delete-exception.success.html', ''); \r\n } else {\r\n vm.closeModal(); \r\n }\r\n }); \r\n\r\n } \r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function addExceptions(ev){\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/csl_exceptions/add-exception.html',\r\n parent: angular.element(document.body),\r\n\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n } \r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n \r\n function search_exceptions(isClear){\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n ExceptionsCslExistService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query){ \r\n //return CslExceptionService.autoComplete({field: key, value: query},vm.company);\r\n return ExceptionsCslExistService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function getMatchs(key, query){ \r\n return ExceptionsCslExistService.autoCompletes({field: key, value: query},vm.company); \r\n }\r\n\r\n \r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n } \r\n\r\n function getTable(){ \r\n vm.exceptionTable = ExceptionsCslExistService.getExceptionTable(); \r\n return ExceptionsCslExistService.getExceptionTable(); \r\n }\r\n\r\n function addAllClientRow(exceptionTable,state){\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException= [];\r\n vm.showAllClientExceptionOrg =[];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){ \r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]); \r\n // }\r\n // });\r\n\r\n for(var i=0; i<vm.exceptionTable.data.length; i++){ \r\n if(vm.exceptionTable.data[i].aprrover_level == 'All Clients'){\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n } \r\n }\r\n\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n \r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"status\":\r\n if(item[field].charAt(0) != null || item[field].charAt(0) != undefined){\r\n return item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n }\r\n case \"company_name\":\r\n return item[field] ? item[field].toUpperCase() : \"\";\r\n case \"estimated_date\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"\"; \r\n case \"created_at\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"\"; \r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"status\":\r\n if(item[field] == 'pending'){ return \"exception-pending\"; }\r\n if(item[field] == 'expired'){ return \"exception-expired\"; }\r\n if(item[field] == 'ended'){ return \"exception-ended\"; }\r\n if(item[field] == 'rejected'){ return \"exception-rejected\"; }\r\n if(item[field] == 'live'){ return \"exception-live\"; } \r\n case \"actual_date\":\r\n if(item[field]){ return \"exception-date\"; }\r\n case \"actual_time\":\r\n if(item[field]){ return \"exception-date\"; }\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index){ \r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length){\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].aprrover_level==\"All Clients\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected){\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if(($state.current.name=='lensgroup') || ($state.current.name == 'showUser')||($state.current.name == 'showCompany')){\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.aprrover_level=='All Clients'){\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers(){\r\n }\r\n }\r\n})(); \n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('addApproverPopUpService', addApproverPopUpService);\r\n\r\n /** @ngInject */\r\n addApproverPopUpService.$inject = ['$http', '$state', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams','$filter', 'api', 'PermissionsService', 'UserService', 'AJAX', 'DownloadService', 'Upload'];\r\n function addApproverPopUpService($http, $state, $rootScope, $q, $timeout, $location, $stateParams, NgTableParams,$filter, api, PermissionsService, UserService, AJAX, DownloadService, Upload) {\r\n\r\n var query,\r\n timeoutTid = false,\r\n loading = false,\r\n isEmpty = true,\r\n readOnly = false,\r\n AllClients = \"\",\r\n addUserCheck = true,\r\n companyDetails = [],\r\n deferred = $q.defer(),\r\n bulkUrl = api.url_v2 + '/lens_groups/destroy_multiple/',\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3/*,\r\n sorting: {name: \"asc\"}*/\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n\r\n return{\r\n\r\n getExceptionTable: function(){return exceptionTable;},\r\n getExceptions: getExceptions,\r\n setQuery : setQuery,\r\n getSelectedException : getSelectedException,\r\n setReadOnly : function(data){readOnly = data;},\r\n getReadOnly : function(){return readOnly;},\r\n setNameData : function(data){ AllClients = data;},\r\n getNameData : function(){return AllClients;},\r\n setUserAddCheck : setUserAddCheck\r\n };\r\n\r\n\r\n function setQuery(q){\r\n\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function setNameData(lensgroupName){\r\n return lensgroupName;\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n\r\n\r\n function getExceptions(id){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n var url = api.url_v2+'/csl/exceptions/'+$stateParams.id;\r\n\r\n\r\n // $rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: response.data.users});\r\n exceptionTable.data = response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", response.data);\r\n exceptionTable.data = $filter('orderBy')(exceptionTable.data, 'first_name');\r\n\r\n response.data.users = exceptionTable.data;\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"lensGroupTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"lensGroupTable:loaded\", data);\r\n }\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('addApproverPopUpController', addApproverPopUpController);\r\n addApproverPopUpController.$inject = ['$scope','$filter','$location', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http', '$state', 'api', 'addApproverPopUpService', 'LensviewCompanyPopUpService',\r\n 'userLensGroupService','CompanyManagementService','UserManagementService','$stateParams','$rootScope','ngTableEventsChannel','NgTableParams','CslExceptionService','ExceptionsCslService'];\r\n function addApproverPopUpController($scope, $filter, $location, $mdDialog, $mdMedia, $mdToast, $q, $http,\r\n \t$state, api, addApproverPopUpService, LensviewCompanyPopUpService,\r\n \tuserLensGroupService, CompanyManagementService, UserManagementService,$stateParams,$rootScope,ngTableEventsChannel,NgTableParam, CslExceptionService,ExceptionsCslService){\r\n\t var vm = this;\r\n\r\n\t vm.columns = [\r\n\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false} \r\n\t ];\r\n\r\n\r\n\t vm.buttons = [\r\n\t // {id: 0, action: add_companieslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t {id: 0, action: search_companieslens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t ];\r\n\r\n\t vm.icon=\"\";\r\n\t vm.lensviewtitle = \"Users\";\r\n\t vm.lensviewAddTitle = \"Select which users are informed about this approved exception via email.\"; \r\n\t vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false; \r\n\t vm.getClass = getClass;\r\n\t vm.addSectedLensGroup = addSectedLensGroup;\r\n\t vm.checkAll = checkAll; \r\n\t vm.getSelectedCount = getSelectedCount;\r\n\t vm.searchListData = search_users;\r\n \tvm.selectUser = selectUser;\r\n\t vm.clearAll = clearAll;\r\n\t vm.cancel = cancel;\r\n\t vm.selected = selected;\r\n\t vm.shiftSelect = shiftSelect;\r\n \tvm.resetSelected = resetSelected;\r\n \tvm.dontSendEmailException = dontSendEmailException;\r\n \tvm.showToastWithFile = showToastWithFile;\r\n \tvm.exception = ExceptionsCslService.getExceptionObject();\r\n\t // vm.getLink = getLink;\r\n\t // vm.isLink = isLink;\r\n vm.companiesList = [];\r\n vm.getList = [];\r\n vm.link = {field: \"id\", column: \"name\", url: \"companies\"};\r\n\r\n if($state.current.name == 'vieCSLExceptions'){\r\n\t \tvm.showPouptext = true;\r\n\r\n\t \ttry{\r\n\t\t \t$scope.$on(\"exceptionsTable:endChanged\", function(event, loading){\r\n\t\t $rootScope.isLoading = loading;\r\n\t\t }); \t \r\n\t\t ExceptionsCslService.changeStatusException(); \r\n\t\t}catch(e){\r\n\r\n }\r\n\r\n\t \ttry{ vm.exception = ExceptionsCslService.getExceptionObject();\r\n \tExceptionsCslService.getException($stateParams.id).then(function(){\r\n vm.exception = ExceptionsCslService.getExceptionDetails(); \r\n if(vm.exception.status == 'ended'){\r\n\t\t\t vm.lensviewAddTitle = \"Select which users are informed about this ended exception via email.\"; \r\n\t\t\t}\r\n\t\t\tif($rootScope.isLoading == true){\r\n\t\t\t vm.lensviewAddTitle = \"Select which users are informed about this reopened exception via email.\"; \r\n\t\t\t}\r\n\t\t\t// if(vm.exception.status == 'live'){\r\n\t\t\t// vm.lensviewAddTitle = \"Select which users are informed about this reopened exception via email.\"; \r\n\t\t\t// }\r\n });\r\n }catch(e){\r\n\r\n }\r\n\t}\r\n\r\n\r\n $scope.$on(\"exceptionsTable:loaded\", function(event, data){\r\n try{\r\n vm.noResults = data.users.length == 0;\r\n }catch(e){\r\n \r\n }\r\n });\r\n\r\n addApproverPopUpService.getExceptions();\r\n\r\n \r\n\t function search_companieslens(){\r\n\t \tvm.searchflag = !vm.searchflag;\r\n\t }\r\n\r\n\t function search_users(isClear){\r\n\r\n\t \t//vm.searchflag = !vm.searchflag;\r\n\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search); \r\n\t addApproverPopUpService.setQuery(search); \r\n\t } \r\n \r\n\r\n\tif($state.current.name == 'vieCSLExceptions'){\r\n\t $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n\t}\r\n function subscribeToTable(tableParams){\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n var tmp = 0;\r\n angular.forEach(vm.companyTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.companyTable.data.length == tmp && tmp > 0)\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n\t\tfunction getTable(){ \r\n\r\n\t\tif($state.current.name == 'vieCSLExceptions'){\t\t\r\n\t var companyList = addApproverPopUpService.getExceptionTable();\r\n\t vm.companyTable = companyList; \r\n\t\t\treturn companyList;\r\n\t\t} \r\n\r\n\t\t}\r\n\r\n\t\t//toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n\t\tfunction getSelectedCount() { \r\n return vm.listSelectedCount;\r\n } \r\n\r\n function selected(index){ \r\n vm.lastSelected = index;\r\n if (vm.companyTable.data.length){\r\n vm.lastSelectedValue = vm.companyTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.companyTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.companyTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.companyTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id)\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.companyTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.companyTable != undefined){\r\n vm.listSelectedCount = count; \r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n function checkAll(selected){\r\n vm.companyTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.companyTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id)\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.companyTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.companyTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n \r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\t\tfunction getField(item, field){\r\n\t switch (field){\r\n\t case \"is_active\":\r\n\t return item[field] ? \"Active\" : \"Inactive\";\r\n\t case \"approver_level\":\r\n\t return (item[field] == 'all_clients_approver') ? \"All Clients\" : \"\";\r\n\t default:\r\n\t return item[field];\r\n\t }\r\n\t }\r\n\t\tfunction getLink(data){\r\n\t return vm.link.url+\"/\"+data[vm.link.field];\r\n\t }\r\n\t function isLink(field){\r\n\t return field == vm.link.column;\r\n\t }\r\n\r\n\t function getClass(item, field){\r\n\t if(!item.is_active && item.user_status == 'issue(non-ad)' && item[field] == 'issue(non-ad)') {\r\n\t return 'inactive-user';\r\n\t }\r\n\t switch (field){\r\n\t case \"user_status\":\r\n\t if(item[field] == 'active'){ return \"active-user\"; }\r\n\t if(item[field] == 'inactive'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'unverified'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'issue(ad)'){ return \"issue-ad-user\"; }\r\n\t if(item[field] == 'issue(non-ad)'){ return \"issue-nonad-user\"; }\r\n\t if(item[field] == 'no-security'){ return \"no-security-user\"; }\r\n\t if(item[field] == 'bad state'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'reset'){ return \"inactive-user\"; }\r\n\t // case \"is_active\":\r\n\t // return item[field] ? (item.confirmed ? \"active-user\" : \"inactive-user\") : \"inactive-user\";\r\n\t default:\r\n\t return '';\r\n\t }\r\n\t }\r\n\r\n\t \r\n\t \r\n function addSectedLensGroup(status){ \r\n\r\n if($state.current.name == 'vieCSLExceptions'){\r\n var companyTable = addApproverPopUpService.getExceptionTable();\r\n \r\n vm.selectedLensGroup = addApproverPopUpService.getSelectedException().map(function(lensGroup){\r\n //var companyExists = $filter('filter')(companyTable.data, {id: lensGroup.id });\r\n var companyExists = companyTable.data.map(function(data){ return data[\"id\"]; }).includes(lensGroup.id);\r\n var tempCompany = angular.copy(lensGroup);\r\n tempCompany.selected = false;\r\n if(companyExists == false) {\r\n tempCompany.new = true; \r\n }\r\n return lensGroup.id;\r\n\r\n });\r\n\r\n if(vm.selectedLensGroup.length > 0){\r\n\r\n\r\n \tvar params = {};\r\n\t params.user_ids = vm.selectedLensGroup; \r\n params.old_status = status;\r\n\r\n\t ExceptionsCslService.sendEmailException(params,$state.params.id).then(function(res){\r\n\t if (!res.errors){\r\n\t $mdDialog.cancel();\r\n\t $location.url(\"/csl-exceptions\"); \r\n\t setTimeout(function(){\r\n\t showToastWithFile('posted-email-exception.success.html', ''); \r\n\t },1500);\r\n\r\n\r\n\t } else {\r\n\t vm.closeModal(); \r\n\t }\r\n\t }); \r\n\r\n }\r\n \r\n //// console.log(vm.selectedLensGroup) ;\r\n //cancel();\r\n } \r\n\r\n }\r\n\r\n function dontSendEmailException(id,status){\r\n \t$mdDialog.cancel();\r\n $location.url(\"/csl-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },1500); \r\n \t}\r\n\r\n\t function clearAll(){\r\n\t LensviewCompanyPopUpService.getCompanies('lens_group');\r\n\t }\r\n\t function cancel() {\r\n\t $mdDialog.cancel();\r\n\t $location.url(\"/csl-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },1500); \r\n\t }\r\n\r\n\r\n\r\n\r\n\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .component('logExceptionRecord', {\r\n templateUrl: \"/app/admin/exceptions-cmts/log.html\",\r\n controller: ExceptionLogDetailController,\r\n bindings: {\r\n data: '<'\r\n }\r\n });\r\n\r\n ExceptionLogDetailController.inject = [\"$rootScope\", \"$scope\", \"CompanyManagementService\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', 'UserManagementService', 'mdSelectHelper', '$mdMedia', '$mdDialog', 'UserService']\r\n \r\n function ExceptionLogDetailController($rootScope, $scope, CompanyManagementService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, UserManagementService, mdSelectHelper, $mdMedia, $mdDialog, UserService){\r\n var ctrl = this;\r\n\r\n $rootScope.$on('exception_updated', function(ev, logs){\r\n ctrl.data.log = logs;\r\n });\r\n\r\n ctrl.processActions = function(actions){\r\n return Object.keys(actions).map(function(key){\r\n var action = actions[key] === Object(actions[key]) ? JSON.stringify(actions[key]) : actions[key];\r\n return \"<strong>\" + key + \"</strong>\" + \": \" + action +\"\\n\";\r\n }).join(', ');\r\n }\r\n\r\n ctrl.logExportShowCSV = function(){\r\n $scope.exportCsvLoaded = false;\r\n CompanyManagementService.exportCompanyLogs(ctrl.data).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function(e) {\r\n \r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant(e.data.errors))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n }\r\n\r\n}) ();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('ExceptionsCmtsService', ExceptionsCmtsService);\r\n\r\n /** @ngInject */\r\n ExceptionsCmtsService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function ExceptionsCmtsService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var isEmpty = true,\r\n exception = getExceptionObject(),\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n changeStatusException: changeStatusException,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n getExceptionObject : getExceptionObject,\r\n sendEmailException : sendEmailException,\r\n getException : getException,\r\n getExceptionDetails: function() { return exception; },\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getExceptions : getExceptions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a exception\r\n // // ------------------\r\n function getException(id){\r\n try{\r\n exception = getExceptionObject();\r\n return $http.get(api.url + '/cmts/exceptions/'+ id/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n //// console.log(response);\r\n unpackageException(response.data);\r\n //// console.log(user);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Do something else;\r\n }\r\n exception = null;\r\n });\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function unpackageException(exception_data){\r\n for (var field in exception_data){\r\n exception[field] = exception_data[field];\r\n }\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getExceptions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function changeStatusException(params,id,type){\r\n try{\r\n var query = params;\r\n var url = api.url +'/cmts/exceptions/'+ id;\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n if(type == 'end-live'){\r\n loading = true;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }else{\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }catch(e){\r\n\r\n }\r\n\r\n }\r\n\r\n function sendEmailException(params,id){\r\n var query = params;\r\n var url = api.url +'/cmt/exceptions/'+id+'/send_exception_emails';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n data :query\r\n }).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", is_active: true};\r\n }\r\n\r\n function getExceptions(){\r\n loading = true;\r\n timeoutTid = false;\r\n //var url=api.url+\"/companies/\"+$stateParams.id+\"/departments\";\r\n var url=api.url+\"/cmts/exceptions/pending_exceptions\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.exceptions.length);\r\n exceptionTable.settings({data: response.data.exceptions});\r\n exceptionTable.data = response.data.exceptions;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", exceptionTable.data);\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response){\r\n var data_settings = response.data.exceptions.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }\r\n\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('ExceptionsCmtsController', ExceptionsCmtsController);\r\n ExceptionsCmtsController.$inject = ['$scope', '$window', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'ExceptionsCmtsService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper', 'UserService'];\r\n function ExceptionsCmtsController($scope, $window, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, ExceptionsCmtsService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService) {\r\n var vm = this;\r\n\r\n vm.columns = [\r\n { \"field\": \"status\", \"title\": 'STATUS', \"sortable\": \"status\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"created_at\", \"title\": 'DATE CREATED', \"sortable\": \"created_at\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"company_name\", \"title\": 'CUSTOMER', \"sortable\": \"company_name\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"pronumber\", \"title\": 'PRO #', \"sortable\": \"pronumber\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"estimated_date\", \"title\": 'APPT.DATE', \"sortable\": \"estimated_date\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"estimated_time\", \"title\": 'APPT.TIME', \"sortable\": \"estimated_time\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"actual_date\", \"title\": 'ACTUAL DATE', \"sortable\": \"actual_date\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"actual_time\", \"title\": 'ACTUAL TIME', \"sortable\": \"actual_time\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\": \"true\", isDate: false }\r\n ];\r\n\r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n { id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '', lensviewIcon: true }\r\n ];\r\n\r\n\r\n vm.icon = \"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n vm.getMatch = getMatch;\r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = ExceptionsCmtsService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.getClass = getClass;\r\n vm.checkAll = checkAll;\r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.cancelException = cancelException;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.showRejectModal = showRejectModal;\r\n vm.showEndModal = showEndModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.status = { cssClass: \"md-primary\" };\r\n vm.possibleContacts = [];\r\n vm.link = { field: \"id\", column: \"name\", url: \"cmts-exceptions\" };\r\n vm.gotoSelectUser = gotoSelectUser;\r\n $rootScope.isLoading = true;\r\n vm.user = UserService.getUserData();\r\n vm.rejectSubmit = rejectSubmit;\r\n vm.endExceptionSubmit = endExceptionSubmit;\r\n vm.approveException = approveException;\r\n vm.textCustType = false;\r\n vm.textEndedType = false;\r\n vm.isdeliverdShipment = false;\r\n vm.endException = endException;\r\n vm.reOpenException = reOpenException;\r\n vm.cancelEndException = cancelEndException;\r\n vm.deliverdException = deliverdException;\r\n vm.cancelOpenException = cancelOpenException;\r\n vm.cancelDeliverdException = cancelDeliverdException;\r\n vm.changeEndExceptionStatus = changeEndExceptionStatus;\r\n vm.changeOpenExceptionStatus = changeOpenExceptionStatus;\r\n vm.viewShipment = viewShipment;\r\n vm.logsVisible = logsVisible;\r\n //vm.clearAll = clearAll; \r\n vm.user = UserService.getUserData();\r\n\r\n\r\n vm.logsVisible();\r\n vm.excAprover = '';\r\n if (vm.user) {\r\n if (vm.user.first_name || vm.user.last_name) {\r\n vm.excAprover = (vm.user.first_name ? vm.user.first_name : \"\") + \" \" + (vm.user.last_name ? vm.user.last_name : \"\");\r\n } else {\r\n vm.excAprover = vm.user.email;\r\n }\r\n }\r\n\r\n vm.getUser = function () {\r\n\r\n if (vm.user.first_name || vm.user.last_name) {\r\n return (vm.user.first_name ? vm.user.first_name : \"\") + \" \" + (vm.user.last_name ? vm.user.last_name : \"\");\r\n } else {\r\n return vm.user.email;\r\n }\r\n };\r\n\r\n if ($state.current.name == 'cmtsExceptions') {\r\n vm.viewExceptionText = true;\r\n }\r\n\r\n switch ($state.current.name) {\r\n\r\n case 'vieCMTSExceptions':\r\n vm.isCreate = false;\r\n vm.saveBtnShowNew = true;\r\n //Get the exception from the service \r\n try {\r\n vm.exception = ExceptionsCmtsService.getExceptionObject();\r\n ExceptionsCmtsService.getException($stateParams.id).then(function () {\r\n vm.exception = ExceptionsCmtsService.getExceptionDetails();\r\n vm.exception.estimated = vm.exception.estimated_date + \" \" + vm.exception.estimated_time;\r\n vm.exception.actual = vm.exception.actual_date + \" \" + vm.exception.actual_time;\r\n\r\n try {\r\n //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if (JSON.parse(localStorage.getItem(\"user\")).permissions.cmts.CmtsException.includes('all_clients_approver')) {\r\n vm.readAccess = false;\r\n } else if (JSON.parse(localStorage.getItem(\"user\")).permissions.cmts.CmtsException.includes('read')\r\n && !JSON.parse(localStorage.getItem(\"user\")).permissions.cmts.CmtsException.includes('approver')) {\r\n vm.readAccess = true;\r\n } else {\r\n if (vm.user.approver_level_company_ids.includes(vm.exception.company_id)) {\r\n vm.readAccess = false;\r\n } else {\r\n vm.readAccess = true;\r\n }\r\n\r\n }\r\n }\r\n catch (e) {\r\n vm.readAccess = false;\r\n }\r\n\r\n\r\n });\r\n } catch (e) {\r\n\r\n }\r\n\r\n\r\n break;\r\n\r\n case 'cmtsExceptions':\r\n $rootScope.isLoading = true;\r\n var search = $location.search();\r\n for (var key in search) {\r\n vm.lookup[key] = search[key];\r\n }\r\n ExceptionsCmtsService.setQuery(search);\r\n\r\n // $scope.$on(\"exceptionsTable:loaded\", function(event, data) {\r\n // vm.noResults = data.length == 0; \r\n // });\r\n\r\n $scope.$on(\"exceptionsTable:stateChanged\", function (event, loading) {\r\n $rootScope.isLoading = loading;\r\n });\r\n $scope.$on\r\n ExceptionsCmtsService.getExceptions();\r\n break;\r\n\r\n }\r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n ExceptionsCmtsService.getExceptions();\r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n vm.addAllClientRow = addAllClientRow;\r\n\r\n function subscribeToTable(tableParams) {\r\n if ($state.current.name == 'lensgroup' || $state.current.name == 'showCompany' || $state.current.name == 'showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function (p1, p2, p3) {\r\n angular.forEach(p2, function (v, k) {\r\n if (v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if (vm.currentPage <= 1) {\r\n angular.copy(vm.showAllClientExceptionOrg, vm.showAllClientException);\r\n }\r\n else {\r\n vm.showAllClientException = [];\r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function (v, k) {\r\n if (v.selected || v.aprrover_level == \"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if ($state.current.name == 'showCompany') {\r\n\r\n $scope.$watch(function () { return $location.path() }, function (params1, params2) {\r\n var res = ExceptionsCmtsService.getExceptions();\r\n res.then(function (dd) {\r\n vm.getList = dd;\r\n });\r\n });\r\n }\r\n\r\n\r\n\r\n function getSelectedCount() {\r\n return vm.listSelectedCount;\r\n }\r\n\r\n function logsVisible() {\r\n vm.logs_visible = false;\r\n if (vm.exception.log != null)\r\n var logs_empty = typeof vm.exception.log == 'undefined' ? true : !vm.exception.log.length > 0;\r\n\r\n vm.logs_visible = true;\r\n\r\n return !logs_empty;\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function gotoSelectUser(ev, data) {\r\n var lensGroupId = data;\r\n $location.url(\"/cmts-exceptions/\" + data.id);\r\n }\r\n\r\n function viewShipment(number) {\r\n $window.open(\"/shipping-details-cmts/\" + number, '_blank');\r\n }\r\n\r\n\r\n function endException() {\r\n vm.textCustType = true;\r\n }\r\n\r\n function reOpenException() {\r\n vm.textEndedType = true;\r\n }\r\n\r\n function deliverdException() {\r\n vm.isdeliverdShipment = true;\r\n }\r\n\r\n function cancelDeliverdException() {\r\n vm.isdeliverdShipment = false;\r\n }\r\n\r\n function cancelEndException() {\r\n vm.textCustType = false;\r\n }\r\n\r\n function cancelOpenException() {\r\n vm.textEndedType = false;\r\n }\r\n\r\n function rejectSubmit(val, id, status) {\r\n if (val == undefined || val.length == 0) {\r\n $scope.reject_reason_check = true;\r\n } else if (val.length > 0) {\r\n $scope.reject_reason_check = false;\r\n var params = {};\r\n params.status = status;\r\n params.rejection_reason = val;\r\n\r\n ExceptionsCmtsService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n vm.closeModal();\r\n $location.url(\"/cmts-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('rejected-exception.success.html', '');\r\n }, 2500);\r\n\r\n\r\n } else {\r\n vm.closeModal();\r\n }\r\n }).catch(function (error) {\r\n //add a way to show error\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n });\r\n }\r\n\r\n }\r\n\r\n function changeEndExceptionStatus(id, status) {\r\n var params = {};\r\n\r\n params.status = status;\r\n\r\n ExceptionsCmtsService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n $location.url(\"/cmts-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('posted-exception.success.html', '');\r\n }, 2500);\r\n } else {\r\n }\r\n }).catch(function (error) {\r\n //add a way to show error\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n });\r\n }\r\n\r\n function changeOpenExceptionStatus(id, status) {\r\n var params = {};\r\n\r\n params.status = status;\r\n\r\n ExceptionsCmtsService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n $location.url(\"/cmts-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('posted-exception.success.html', '');\r\n }, 2500);\r\n } else {\r\n }\r\n });\r\n }\r\n\r\n function endExceptionSubmit(val, id, status) {\r\n\r\n var params = {};\r\n\r\n params.status = status;\r\n params.rejection_reason = val;\r\n\r\n ExceptionsCmtsService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n vm.closeModal();\r\n $location.url(\"/cmts-exceptions\");\r\n } else {\r\n vm.closeModal();\r\n }\r\n });\r\n }\r\n\r\n function approveException(id, status) {\r\n var params = {};\r\n\r\n params.status = status;\r\n\r\n ExceptionsCmtsService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n $location.url(\"/cmts-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('posted-exception.success.html', '');\r\n }, 2500);\r\n } else {\r\n }\r\n });\r\n }\r\n\r\n function bulkDelete() {\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel();\r\n\r\n var params = {};\r\n params.exception_ids = ExceptionsCmtsService.getSelectedException().map(function (exception) { return exception.id; });\r\n\r\n ExceptionsCmtsService.bulkDeleteExceptions(params).then(function (res) {\r\n if (!res.errors) {\r\n vm.closeModal();\r\n showToastWithFile('cmts-delete-exception.success.html', '');\r\n } else {\r\n vm.closeModal();\r\n }\r\n });\r\n\r\n }\r\n\r\n function showModal(ev, modal) {\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/cmts-' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showRejectModal(ev, modal) {\r\n /* Show the modal */\r\n $scope.reject_reason_check = false;\r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-cmts/' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showEndModal(ev, modal) {\r\n /* Show the modal */\r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-cmts/' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function addExceptions(ev, id, status, type) {\r\n\r\n if (type == 'end-live') {\r\n $scope.exceptionStatus = 'reopen';\r\n } else if (type == 'reject') {\r\n $scope.exceptionStatus = 'rejected';\r\n }\r\n else {\r\n $scope.exceptionStatus = status;\r\n }\r\n\r\n if (status == 'approve') {\r\n var params = {};\r\n params.status = status;\r\n ExceptionsCmtsService.changeStatusException(params, id, type).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n } else {\r\n }\r\n }).catch(function (error) {\r\n //add a way to show error\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n });\r\n }\r\n if (status == 'end') {\r\n var params = {};\r\n params.status = status;\r\n ExceptionsCmtsService.changeStatusException(params, id, type).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n } else {\r\n }\r\n });\r\n }\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-cmts/add-exception-approvers.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: false,\r\n scope: $scope,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function (answer) {\r\n\r\n }, function () {\r\n\r\n });\r\n\r\n }\r\n\r\n function cancelException() {\r\n $location.url(\"/cmts-exceptions\");\r\n }\r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function search_exceptions(isClear) {\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData) {\r\n if (isClear) {\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]) {\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n ExceptionsCmtsService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query) {\r\n return ExceptionsCmtsService.autoComplete({ field: key, value: query });\r\n }\r\n\r\n function getMatchs(key, query) {\r\n return ExceptionsCmtsService.autoCompletes({ field: key, value: query }, vm.company);\r\n }\r\n\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: { message: message },\r\n controller: function ($scope, message) {\r\n $scope.messages = message;\r\n }\r\n });\r\n }\r\n\r\n function formIsValid() {\r\n if (vm.formDetails) {\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function getTable() {\r\n vm.exceptionTable = ExceptionsCmtsService.getExceptionTable();\r\n return ExceptionsCmtsService.getExceptionTable();\r\n }\r\n\r\n function addAllClientRow(exceptionTable, state) {\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){ \r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]); \r\n // }\r\n // });\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if (vm.exceptionTable.data[i].aprrover_level == 'All Clients') {\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n }\r\n }\r\n\r\n if (vm.currentPage <= 1) {\r\n angular.copy(vm.showAllClientExceptionOrg, vm.showAllClientException);\r\n }\r\n else {\r\n vm.showAllClientException = [];\r\n }\r\n\r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field) {\r\n switch (field) {\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"status\":\r\n if (item[field].charAt(0) != null || item[field].charAt(0) != undefined) {\r\n return item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n }\r\n case \"company_name\":\r\n return item[field] ? item[field].toUpperCase() : \"\";\r\n case \"created_at\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"\";\r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data) {\r\n return vm.link.url + \"/\" + data[vm.link.field];\r\n }\r\n\r\n function isLink(field) {\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field) {\r\n switch (field) {\r\n case \"status\":\r\n if (item[field] == 'pending') { return \"exception-pending\"; }\r\n if (item[field] == 'expired') { return \"exception-expired\"; }\r\n if (item[field] == 'ended') { return \"exception-ended\"; }\r\n if (item[field] == 'rejected') { return \"exception-rejected\"; }\r\n if (item[field] == 'live') { return \"exception-live\"; }\r\n case \"actual_date\":\r\n if (item[field]) { return \"exception-date\"; }\r\n case \"actual_time\":\r\n if (item[field]) { return \"exception-date\"; }\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index) {\r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length) {\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index) {\r\n var first, last;\r\n if (vm.lastSelected > index) {\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++) {\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected() {\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function (depart) {\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index) {\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey) {\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens = []\r\n vm.exceptionTable.data.map(function (exception) {\r\n vm.getList.map(function (obj) {\r\n if (obj.id == exception.id && exception.aprrover_level != \"All Clients\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if (vm.getList.length > 0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function (allException) {\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, { selected: true }).length;\r\n if (count1 > 0) {\r\n count = count1;\r\n }\r\n if (count2 > count1) {\r\n count = count2;\r\n }\r\n else {\r\n count = count1;\r\n }\r\n\r\n if (vm.exceptionTable != undefined) {\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if (vm.exceptionTable.data[i].aprrover_level == \"All Clients\") {\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected) {\r\n vm.exceptionTable.data.map(function (exception) {\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens = []\r\n vm.exceptionTable.data.map(function (exception) {\r\n exception.selected = selected;\r\n vm.getList.map(function (obj) {\r\n if (obj.id == exception.id && exception.aprrover_level != \"All Clients\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if (vm.getList.length > 0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function (allException) {\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if (count1 > 0) {\r\n count = count1;\r\n }\r\n if (count2 > count1) {\r\n count = count2;\r\n }\r\n else {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if (selected) {\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if (($state.current.name == 'lensgroup') || ($state.current.name == 'showUser') || ($state.current.name == 'showCompany')) {\r\n angular.forEach(vm.exceptionTable.data, function (v, k) {\r\n if (v.aprrover_level == 'All Clients') {\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected = false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers() {\r\n }\r\n }\r\n})(); \n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('ExceptionsCmtsExistService', ExceptionsCmtsExistService);\r\n\r\n /** @ngInject */\r\n ExceptionsCmtsExistService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function ExceptionsCmtsExistService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var exceptionFilterPersist = {}; //used to persist the search\r\n var awaitFilterPersist = {};\r\n exceptionFilterPersist.value = 'all';\r\n awaitFilterPersist.value = 'mine';\r\n\r\n var isEmpty = true,\r\n allFilter = 'all',\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n unpackageExceptions: unpackageExceptions,\r\n getExceptionObject : getExceptionObject,\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n getExceptionFilterPersist: function() {\r\n return exceptionFilterPersist;\r\n },\r\n getAllFilter: function(){\r\n return allFilter;\r\n },\r\n setAllFilter: function(filter){\r\n allFilter = filter;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getExceptions : getExceptions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function unpackageExceptions(response,filter){\r\n try{\r\n if(allFilter == 'all'){\r\n var res = response.data.exceptions.all;\r\n }\r\n if(allFilter == 'expired'){\r\n var res = response.data.exceptions.expired;\r\n }\r\n if(allFilter == 'ended'){\r\n var res = response.data.exceptions.ended;\r\n }\r\n if(allFilter == 'live'){\r\n var res = response.data.exceptions.live;\r\n }\r\n if(allFilter == 'rejected'){\r\n var res = response.data.exceptions.rejected;\r\n }\r\n var data_settings = res.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n //user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function exitLoadState(cmtsdata){\r\n loading = false;\r\n $rootScope.$broadcast(\"cmtsExceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"cmtsExceptionsTableExist:loaded\", cmtsdata);\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getExceptions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true};\r\n }\r\n\r\n function getExceptions(type){\r\n loading = true;\r\n timeoutTid = false;\r\n var url;\r\n if(type == undefined){\r\n url=api.url+\"/cmts/exceptions\";\r\n }else if(type == 'all'){\r\n url=api.url+\"/cmts/exceptions\";\r\n }\r\n else{\r\n url=api.url+\"/cmts/exceptions?state=\"+type;\r\n }\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n\r\n exceptionTable.total(response.data.exceptions.length);\r\n exceptionTable.settings({data: response.data.exceptions});\r\n exceptionTable.data = response.data.exceptions;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"cmtsExceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"cmtsExceptionsTableExist:loaded\", response.data);\r\n\r\n return unpackageExceptions(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout') \r\n .controller('ExceptionsCmtsExistController', ExceptionsCmtsExistController);\r\n ExceptionsCmtsExistController.$inject = ['$scope', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'ExceptionsCmtsExistService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper','UserService'];\r\n function ExceptionsCmtsExistController($scope, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, ExceptionsCmtsExistService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService){\r\n var vm = this; \r\n \r\n vm.columns = [ \r\n {\"field\": \"status\", \"title\": 'STATUS', \"sortable\": \"status\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"created_at\", \"title\": 'DATE CREATED', \"sortable\": \"created_at\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"company_name\", \"title\": 'CUSTOMER', \"sortable\": \"company_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pronumber\", \"title\": 'PRO #', \"sortable\": \"pronumber\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"estimated_date\", \"title\": 'APPT.DATE', \"sortable\": \"estimated_date\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"estimated_time\", \"title\": 'APPT.TIME', \"sortable\": \"estimated_time\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"actual_date\", \"title\": 'ACTUAL DATE', \"sortable\": \"actual_date\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"actual_time\", \"title\": 'ACTUAL TIME', \"sortable\": \"actual_time\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false} \r\n ]; \r\n \r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n {id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n vm.exceptionFilter = ExceptionsCmtsExistService.getExceptionFilterPersist();\r\n vm.counts = {all: {all: 0, live: 0, expired: 0, ended: 0, rejected: 0}}; \r\n vm.icon=\"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false; \r\n vm.getMatch = getMatch; \r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = ExceptionsCmtsExistService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField; \r\n vm.getClass = getClass; \r\n vm.checkAll = checkAll; \r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions; \r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete; \r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose; \r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.possibleContacts = []; \r\n vm.setFilter = setFilter;\r\n vm.isLoading = {account: false, role: false, contact: false, table: true};\r\n $rootScope.isLoadingExist = true;\r\n vm.link = {field: \"id\", column: \"name\", url: \"cmts-exceptions\"};\r\n vm.gotoSelectUser = gotoSelectUser; \r\n\r\n //vm.clearAll = clearAll; \r\n\r\n if($state.current.name =='cmtsExceptions'){\r\n vm.viewExceptionText = true;\r\n } \r\n \r\n switch ($state.current.name){\r\n\r\n case 'vieCMTSExceptions':\r\n vm.isCreate = false;\r\n vm.isLoading.account = true;\r\n vm.saveBtnShowNew = true;\r\n \r\n break; \r\n\r\n case 'cmtsExceptions':\r\n $rootScope.isLoadingExist = true;\r\n vm.exceptionFilter.value = 'all';\r\n $rootScope.all = 0;\r\n $rootScope.expired = 0;\r\n $rootScope.live = 0;\r\n $rootScope.ended = 0;\r\n $rootScope.rejected = 0;\r\n var search = $location.search();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n ExceptionsCmtsExistService.setQuery(search);\r\n $scope.$on(\"cmtsExceptionsTableExist:stateChanged\", function(event, loading){\r\n $rootScope.isLoadingExist = loading;\r\n \r\n });\r\n $scope.$on(\"cmtsExceptionsTableExist:loaded\", function(event, data){\r\n try{\r\n $rootScope.all = data.all_count;\r\n $rootScope.expired = data.expired_count;\r\n $rootScope.live = data.live_count;\r\n $rootScope.ended = data.ended_count;\r\n $rootScope.rejected = data.rejected_count; \r\n }catch(e){\r\n \r\n }\r\n });\r\n $scope.$on\r\n ExceptionsCmtsExistService.getExceptions('all');\r\n vm.exceptionTable = ExceptionsCmtsExistService.getExceptionTable();\r\n break;\r\n \r\n } \r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n ExceptionsCmtsExistService.getExceptions('all'); \r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false; \r\n\r\n vm.addAllClientRow = addAllClientRow; \r\n \r\n function subscribeToTable(tableParams){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n angular.forEach(p2,function(v,k){\r\n if(v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.aprrover_level ==\"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n $scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = ExceptionsCmtsExistService.getExceptions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n } \r\n\r\n\r\n function setFilter(filter, mode) {\r\n vm.exceptionFilter.value = filter;\r\n $rootScope.filterValue = filter;\r\n ExceptionsCmtsExistService.setAllFilter(filter);\r\n $rootScope.isLoadingExist = true;\r\n ExceptionsCmtsExistService.getExceptions(filter);\r\n }\r\n\r\n function gotoSelectUser(ev,data){\r\n var lensGroupId = data; \r\n $location.url(\"/cmts-exceptions/\"+data.id); \r\n }\r\n \r\n\r\n function getSelectedCount() { \r\n return vm.listSelectedCount;\r\n } \r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n\r\n function bulkDelete(){\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel(); \r\n\r\n var params = {};\r\n params.exception_ids = ExceptionsCmtsExistService.getSelectedException().map(function(exception){return exception.id;});\r\n\r\n ExceptionsCmtsExistService.bulkDeleteExceptions(params).then(function(res){\r\n if (!res.errors){\r\n vm.closeModal(); \r\n showToastWithFile('cmts-delete-exception.success.html', ''); \r\n } else {\r\n vm.closeModal(); \r\n }\r\n }); \r\n\r\n } \r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/cmts-'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function addExceptions(ev){\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/cmts_exceptions/add-exception.html',\r\n parent: angular.element(document.body),\r\n\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n } \r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n \r\n function search_exceptions(isClear){\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n ExceptionsCmtsExistService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query){ \r\n return ExceptionsCmtsExistService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function getMatchs(key, query){ \r\n return ExceptionsCmtsExistService.autoCompletes({field: key, value: query},vm.company); \r\n }\r\n\r\n \r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n } \r\n\r\n function getTable(){ \r\n vm.exceptionTable = ExceptionsCmtsExistService.getExceptionTable(); \r\n return ExceptionsCmtsExistService.getExceptionTable(); \r\n }\r\n\r\n function addAllClientRow(exceptionTable,state){\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException= [];\r\n vm.showAllClientExceptionOrg =[];\r\n\r\n for(var i=0; i<vm.exceptionTable.data.length; i++){ \r\n if(vm.exceptionTable.data[i].aprrover_level == 'All Clients'){\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n } \r\n }\r\n\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n \r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"status\":\r\n if(item[field].charAt(0) != null || item[field].charAt(0) != undefined){\r\n return item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n }\r\n case \"company_name\":\r\n return item[field] ? item[field].toUpperCase() : \"\";\r\n case \"estimated_date\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"\"; \r\n case \"created_at\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"\"; \r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"status\":\r\n if(item[field] == 'pending'){ return \"exception-pending\"; }\r\n if(item[field] == 'expired'){ return \"exception-expired\"; }\r\n if(item[field] == 'ended'){ return \"exception-ended\"; }\r\n if(item[field] == 'rejected'){ return \"exception-rejected\"; }\r\n if(item[field] == 'live'){ return \"exception-live\"; } \r\n case \"actual_date\":\r\n if(item[field]){ return \"exception-date\"; }\r\n case \"actual_time\":\r\n if(item[field]){ return \"exception-date\"; }\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index){ \r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length){\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].aprrover_level==\"All Clients\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected){\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if(($state.current.name=='lensgroup') || ($state.current.name == 'showUser')||($state.current.name == 'showCompany')){\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.aprrover_level=='All Clients'){\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers(){\r\n }\r\n }\r\n})(); \n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('addApproverCmtsPopUpService', addApproverCmtsPopUpService);\r\n\r\n /** @ngInject */\r\n addApproverCmtsPopUpService.$inject = ['$http', '$state', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams','$filter', 'api', 'PermissionsService', 'UserService', 'AJAX', 'DownloadService', 'Upload'];\r\n function addApproverCmtsPopUpService($http, $state, $rootScope, $q, $timeout, $location, $stateParams, NgTableParams,$filter, api, PermissionsService, UserService, AJAX, DownloadService, Upload) {\r\n\r\n var query,\r\n timeoutTid = false,\r\n loading = false,\r\n isEmpty = true,\r\n readOnly = false,\r\n AllClients = \"\",\r\n addUserCheck = true,\r\n companyDetails = [],\r\n deferred = $q.defer(),\r\n bulkUrl = api.url_v2 + '/lens_groups/destroy_multiple/',\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3/*,\r\n sorting: {name: \"asc\"}*/\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n\r\n return{\r\n\r\n getExceptionTable: function(){return exceptionTable;},\r\n getExceptions: getExceptions,\r\n setQuery : setQuery,\r\n getSelectedException : getSelectedException,\r\n setReadOnly : function(data){readOnly = data;},\r\n getReadOnly : function(){return readOnly;},\r\n setNameData : function(data){ AllClients = data;},\r\n getNameData : function(){return AllClients;},\r\n setUserAddCheck : setUserAddCheck\r\n };\r\n\r\n\r\n function setQuery(q){\r\n\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function setNameData(lensgroupName){\r\n return lensgroupName;\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n\r\n\r\n function getExceptions(id){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n var url = api.url+'/cmts/exceptions/'+$stateParams.id;\r\n\r\n\r\n // $rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: response.data.users});\r\n exceptionTable.data = response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", response.data);\r\n exceptionTable.data = $filter('orderBy')(exceptionTable.data, 'first_name');\r\n\r\n response.data.users = exceptionTable.data;\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"lensGroupTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"lensGroupTable:loaded\", data);\r\n }\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('addApproverCmtsPopUpController', addApproverCmtsPopUpController);\r\n addApproverCmtsPopUpController.$inject = ['$scope','$filter','$location', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http', '$state', 'api', 'addApproverCmtsPopUpService', 'LensviewCompanyPopUpService',\r\n 'userLensGroupService','CompanyManagementService','UserManagementService','$stateParams','$rootScope','ngTableEventsChannel','NgTableParams','CmtsExceptionService','ExceptionsCmtsService'];\r\n function addApproverCmtsPopUpController($scope, $filter, $location, $mdDialog, $mdMedia, $mdToast, $q, $http,\r\n \t$state, api, addApproverCmtsPopUpService, LensviewCompanyPopUpService,\r\n \tuserLensGroupService, CompanyManagementService, UserManagementService,$stateParams,$rootScope,ngTableEventsChannel,NgTableParam, CmtsExceptionService,ExceptionsCmtsService){\r\n\t var vm = this;\r\n\r\n\t vm.columns = [\r\n\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false} \r\n\t ];\r\n\r\n\r\n\t vm.buttons = [\r\n\t // {id: 0, action: add_companieslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t {id: 0, action: search_companieslens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t ];\r\n\r\n\t vm.icon=\"\";\r\n\t vm.lensviewtitle = \"Users\";\r\n\t vm.lensviewAddTitle = \"Select which users are informed about this approved exception via email.\"; \r\n\t vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false; \r\n\t vm.getClass = getClass;\r\n\t vm.addSectedLensGroup = addSectedLensGroup;\r\n\t vm.checkAll = checkAll; \r\n\t vm.getSelectedCount = getSelectedCount;\r\n\t vm.searchListData = search_users;\r\n \tvm.selectUser = selectUser;\r\n\t vm.clearAll = clearAll;\r\n\t vm.cancel = cancel;\r\n\t vm.selected = selected;\r\n\t vm.shiftSelect = shiftSelect;\r\n \tvm.resetSelected = resetSelected;\r\n \tvm.dontSendEmailException = dontSendEmailException;\r\n \tvm.showToastWithFile = showToastWithFile;\r\n \tvm.exception = ExceptionsCmtsService.getExceptionObject();\r\n\t // vm.getLink = getLink;\r\n\t // vm.isLink = isLink;\r\n vm.companiesList = [];\r\n vm.getList = [];\r\n vm.link = {field: \"id\", column: \"name\", url: \"companies\"};\r\n\r\n if($state.current.name == 'vieCMTSExceptions'){\r\n\t \tvm.showPouptext = true;\r\n\r\n\t \ttry{\r\n\t\t \t$scope.$on(\"exceptionsTable:endChanged\", function(event, loading){\r\n\t\t $rootScope.isLoading = loading;\r\n\t\t }); \t \r\n\t\t ExceptionsCmtsService.changeStatusException(); \r\n\t\t}catch(e){\r\n\r\n }\r\n\r\n\t \ttry{ vm.exception = ExceptionsCmtsService.getExceptionObject();\r\n \tExceptionsCmtsService.getException($stateParams.id).then(function(){\r\n vm.exception = ExceptionsCmtsService.getExceptionDetails(); \r\n if(vm.exception.status == 'ended'){\r\n\t\t\t vm.lensviewAddTitle = \"Select which users are informed about this ended exception via email.\"; \r\n\t\t\t}\r\n\t\t\tif($rootScope.isLoading == true){\r\n\t\t\t vm.lensviewAddTitle = \"Select which users are informed about this reopened exception via email.\"; \r\n\t\t\t}\r\n\t\t\t// if(vm.exception.status == 'live'){\r\n\t\t\t// vm.lensviewAddTitle = \"Select which users are informed about this reopened exception via email.\"; \r\n\t\t\t// }\r\n });\r\n }catch(e){\r\n\r\n }\r\n\t}\r\n\r\n\r\n $scope.$on(\"exceptionsTable:loaded\", function(event, data){\r\n try{\r\n vm.noResults = data.users.length == 0;\r\n }catch(e){\r\n \r\n }\r\n });\r\n\r\n addApproverCmtsPopUpService.getExceptions();\r\n\r\n \r\n\t function search_companieslens(){\r\n\t \tvm.searchflag = !vm.searchflag;\r\n\t }\r\n\r\n\t function search_users(isClear){\r\n\r\n\t \t//vm.searchflag = !vm.searchflag;\r\n\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search); \r\n\t addApproverCmtsPopUpService.setQuery(search); \r\n\t } \r\n \r\n\r\n\tif($state.current.name == 'vieCMTSExceptions'){\r\n\t $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n\t}\r\n function subscribeToTable(tableParams){\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n var tmp = 0;\r\n angular.forEach(vm.companyTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.companyTable.data.length == tmp && tmp > 0)\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n\t\tfunction getTable(){ \r\n\r\n\t\tif($state.current.name == 'vieCMTSExceptions'){\t\t\r\n\t var companyList = addApproverCmtsPopUpService.getExceptionTable();\r\n\t vm.companyTable = companyList; \r\n\t\t\treturn companyList;\r\n\t\t} \r\n\r\n\t\t}\r\n\r\n\t\t//toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n\t\tfunction getSelectedCount() { \r\n return vm.listSelectedCount;\r\n } \r\n\r\n function selected(index){ \r\n vm.lastSelected = index;\r\n if (vm.companyTable.data.length){\r\n vm.lastSelectedValue = vm.companyTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.companyTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.companyTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.companyTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id)\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.companyTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.companyTable != undefined){\r\n vm.listSelectedCount = count; \r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n function checkAll(selected){\r\n vm.companyTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.companyTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id)\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.companyTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.companyTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n \r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\t\tfunction getField(item, field){\r\n\t switch (field){\r\n\t case \"is_active\":\r\n\t return item[field] ? \"Active\" : \"Inactive\";\r\n\t case \"approver_level\":\r\n\t return (item[field] == 'all_clients_approver') ? \"All Clients\" : \"\";\r\n\t default:\r\n\t return item[field];\r\n\t }\r\n\t }\r\n\t\tfunction getLink(data){\r\n\t return vm.link.url+\"/\"+data[vm.link.field];\r\n\t }\r\n\t function isLink(field){\r\n\t return field == vm.link.column;\r\n\t }\r\n\r\n\t function getClass(item, field){\r\n\t if(!item.is_active && item.user_status == 'issue(non-ad)' && item[field] == 'issue(non-ad)') {\r\n\t return 'inactive-user';\r\n\t }\r\n\t switch (field){\r\n\t case \"user_status\":\r\n\t if(item[field] == 'active'){ return \"active-user\"; }\r\n\t if(item[field] == 'inactive'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'unverified'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'issue(ad)'){ return \"issue-ad-user\"; }\r\n\t if(item[field] == 'issue(non-ad)'){ return \"issue-nonad-user\"; }\r\n\t if(item[field] == 'no-security'){ return \"no-security-user\"; }\r\n\t if(item[field] == 'bad state'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'reset'){ return \"inactive-user\"; }\r\n\t // case \"is_active\":\r\n\t // return item[field] ? (item.confirmed ? \"active-user\" : \"inactive-user\") : \"inactive-user\";\r\n\t default:\r\n\t return '';\r\n\t }\r\n\t }\r\n\r\n\t \r\n\t \r\n function addSectedLensGroup(status){ \r\n\r\n if($state.current.name == 'vieCMTSExceptions'){\r\n var companyTable = addApproverCmtsPopUpService.getExceptionTable();\r\n \r\n vm.selectedLensGroup = addApproverCmtsPopUpService.getSelectedException().map(function(lensGroup){\r\n //var companyExists = $filter('filter')(companyTable.data, {id: lensGroup.id });\r\n var companyExists = companyTable.data.map(function(data){ return data[\"id\"]; }).includes(lensGroup.id);\r\n var tempCompany = angular.copy(lensGroup);\r\n tempCompany.selected = false;\r\n if(companyExists == false) {\r\n tempCompany.new = true; \r\n }\r\n return lensGroup.id;\r\n\r\n });\r\n\r\n if(vm.selectedLensGroup.length > 0){\r\n\r\n\r\n \tvar params = {};\r\n\t params.user_ids = vm.selectedLensGroup; \r\n params.old_status = status;\r\n\r\n\t ExceptionsCmtsService.sendEmailException(params,$state.params.id).then(function(res){\r\n\t if (!res.errors){\r\n\t $mdDialog.cancel();\r\n\t $location.url(\"/cmts-exceptions\"); \r\n\t setTimeout(function(){\r\n\t showToastWithFile('posted-email-exception.success.html', ''); \r\n\t },1500);\r\n\r\n\r\n\t } else {\r\n\t vm.closeModal(); \r\n\t }\r\n\t }); \r\n\r\n }\r\n \r\n //// console.log(vm.selectedLensGroup) ;\r\n //cancel();\r\n } \r\n\r\n }\r\n\r\n function dontSendEmailException(id,status){\r\n \t$mdDialog.cancel();\r\n $location.url(\"/cmts-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },1500); \r\n \t}\r\n\r\n\t function clearAll(){\r\n\t LensviewCompanyPopUpService.getCompanies('lens_group');\r\n\t }\r\n\t function cancel() {\r\n\t $mdDialog.cancel();\r\n\t $location.url(\"/cmts-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },1500); \r\n\t }\r\n\r\n\r\n\r\n\r\n\r\n\t}\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .component('logExceptionRecord', {\r\n templateUrl: \"/app/admin/exceptions-cfs/log.html\",\r\n controller: ExceptionLogDetailController,\r\n bindings: {\r\n data: '<'\r\n }\r\n });\r\n\r\n ExceptionLogDetailController.inject = [\"$rootScope\", \"$scope\", \"CompanyManagementService\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', 'UserManagementService', 'mdSelectHelper', '$mdMedia', '$mdDialog', 'UserService']\r\n \r\n function ExceptionLogDetailController($rootScope, $scope, CompanyManagementService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, UserManagementService, mdSelectHelper, $mdMedia, $mdDialog, UserService){\r\n var ctrl = this;\r\n\r\n $rootScope.$on('exception_updated', function(ev, logs){\r\n ctrl.data.log = logs;\r\n });\r\n\r\n ctrl.processActions = function(actions){\r\n return Object.keys(actions).map(function(key){\r\n var action = actions[key] === Object(actions[key]) ? JSON.stringify(actions[key]) : actions[key];\r\n return \"<strong>\" + key + \"</strong>\" + \": \" + action +\"\\n\";\r\n }).join(', ');\r\n }\r\n\r\n ctrl.logExportShowCSV = function(){\r\n $scope.exportCsvLoaded = false;\r\n CompanyManagementService.exportCompanyLogs(ctrl.data).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function(e) {\r\n \r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant(e.data.errors))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n }\r\n\r\n}) ();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('ExceptionsCfsService', ExceptionsCfsService);\r\n\r\n /** @ngInject */\r\n ExceptionsCfsService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function ExceptionsCfsService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var isEmpty = true,\r\n exception = getExceptionObject(),\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n changeStatusException: changeStatusException,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n getExceptionObject : getExceptionObject,\r\n sendEmailException : sendEmailException,\r\n getException : getException,\r\n getExceptionDetails: function() { return exception; },\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getExceptions : getExceptions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a exception\r\n // // ------------------\r\n function getException(id){\r\n try{\r\n exception = getExceptionObject();\r\n return $http.get(api.url_v2 + '/cfs/exceptions/'+ id/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n //// console.log(response);\r\n unpackageException(response.data);\r\n //// console.log(user);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Do something else;\r\n }\r\n exception = null;\r\n });\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function unpackageException(exception_data){\r\n for (var field in exception_data){\r\n exception[field] = exception_data[field];\r\n }\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getExceptions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function changeStatusException(params,id,type){\r\n try{\r\n var query = params;\r\n var url = api.url_v2 +'/cfs/exceptions/'+ id;\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n if(type == 'end-live'){\r\n loading = true;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }else{\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n\r\n console.log(\"callback error in exception-cfs-service: \", error)\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }catch(e){\r\n console.log(\"try catch error in exception-cfs-service: \", e)\r\n }\r\n\r\n }\r\n\r\n function sendEmailException(params,id){\r\n var query = params;\r\n var url = api.url_v2 +'/cfs/exceptions/'+id+'/send_exception_emails';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n data :query\r\n }).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", is_active: true};\r\n }\r\n\r\n function getExceptions(){\r\n loading = true;\r\n timeoutTid = false;\r\n //var url=api.url+\"/companies/\"+$stateParams.id+\"/departments\";\r\n var url=api.url_v2+\"/cfs/exceptions/pending_exceptions\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.exceptions.length);\r\n exceptionTable.settings({data: response.data.exceptions});\r\n exceptionTable.data = response.data.exceptions;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", exceptionTable.data);\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response){\r\n var data_settings = response.data.exceptions.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }\r\n\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('ExceptionsCfsController', ExceptionsCfsController);\r\n ExceptionsCfsController.$inject = ['$scope', '$window', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'ExceptionsCfsService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper', 'UserService'];\r\n function ExceptionsCfsController($scope, $window, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, ExceptionsCfsService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService) {\r\n var vm = this;\r\n\r\n vm.columns = [\r\n { \"field\": \"status\", \"title\": 'STATUS', \"sortable\": \"status\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"created_at\", \"title\": 'DATE CREATED', \"sortable\": \"created_at\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"company_name\", \"title\": 'CUSTOMER', \"sortable\": \"company_name\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"pronumber\", \"title\": 'PRO #', \"sortable\": \"pronumber\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"estimated_date\", \"title\": 'APPT.DATE', \"sortable\": \"estimated_date\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"estimated_time\", \"title\": 'APPT.TIME', \"sortable\": \"estimated_time\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"actual_date\", \"title\": 'ACTUAL DATE', \"sortable\": \"actual_date\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"actual_time\", \"title\": 'ACTUAL TIME', \"sortable\": \"actual_time\", \"filter\": {}, \"show\": \"true\", isDate: false },\r\n { \"field\": \"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\": \"true\", isDate: false }\r\n ];\r\n\r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n { id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '', lensviewIcon: true }\r\n ];\r\n\r\n\r\n vm.icon = \"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n vm.getMatch = getMatch;\r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = ExceptionsCfsService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.getClass = getClass;\r\n vm.checkAll = checkAll;\r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.cancelException = cancelException;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.showRejectModal = showRejectModal;\r\n vm.showEndModal = showEndModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.status = { cssClass: \"md-primary\" };\r\n vm.possibleContacts = [];\r\n vm.link = { field: \"id\", column: \"name\", url: \"cfs-exceptions\" };\r\n vm.gotoSelectUser = gotoSelectUser;\r\n $rootScope.isLoading = true;\r\n vm.user = UserService.getUserData();\r\n vm.rejectSubmit = rejectSubmit;\r\n vm.endExceptionSubmit = endExceptionSubmit;\r\n vm.approveException = approveException;\r\n vm.textCustType = false;\r\n vm.textEndedType = false;\r\n vm.isdeliverdShipment = false;\r\n vm.endException = endException;\r\n vm.reOpenException = reOpenException;\r\n vm.cancelEndException = cancelEndException;\r\n vm.deliverdException = deliverdException;\r\n vm.cancelOpenException = cancelOpenException;\r\n vm.cancelDeliverdException = cancelDeliverdException;\r\n vm.changeEndExceptionStatus = changeEndExceptionStatus;\r\n vm.changeOpenExceptionStatus = changeOpenExceptionStatus;\r\n vm.viewShipment = viewShipment;\r\n vm.logsVisible = logsVisible;\r\n //vm.clearAll = clearAll; \r\n vm.user = UserService.getUserData();\r\n vm.showModalWithFile = showModalWithFile\r\n\r\n\r\n vm.logsVisible();\r\n vm.excAprover = '';\r\n if (vm.user) {\r\n if (vm.user.first_name || vm.user.last_name) {\r\n vm.excAprover = (vm.user.first_name ? vm.user.first_name : \"\") + \" \" + (vm.user.last_name ? vm.user.last_name : \"\");\r\n } else {\r\n vm.excAprover = vm.user.email;\r\n }\r\n }\r\n\r\n vm.getUser = function () {\r\n\r\n if (vm.user.first_name || vm.user.last_name) {\r\n return (vm.user.first_name ? vm.user.first_name : \"\") + \" \" + (vm.user.last_name ? vm.user.last_name : \"\");\r\n } else {\r\n return vm.user.email;\r\n }\r\n };\r\n\r\n if ($state.current.name == 'cfsExceptions') {\r\n vm.viewExceptionText = true;\r\n }\r\n\r\n switch ($state.current.name) {\r\n\r\n case 'vieCFSExceptions':\r\n vm.isCreate = false;\r\n vm.saveBtnShowNew = true;\r\n //Get the exception from the service \r\n try {\r\n vm.exception = ExceptionsCfsService.getExceptionObject();\r\n ExceptionsCfsService.getException($stateParams.id).then(function () {\r\n vm.exception = ExceptionsCfsService.getExceptionDetails();\r\n vm.exception.estimated = vm.exception.estimated_date + \" \" + vm.exception.estimated_time;\r\n vm.exception.actual = vm.exception.actual_date + \" \" + vm.exception.actual_time;\r\n\r\n try {\r\n //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if (JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.CfsException.includes('all_clients_approver')) {\r\n vm.readAccess = false;\r\n } else if (JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.CfsException.includes('read')\r\n && !JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.CfsException.includes('approver')) {\r\n vm.readAccess = true;\r\n } else {\r\n if (vm.user.approver_level_company_ids.includes(vm.exception.company_id)) {\r\n vm.readAccess = false;\r\n } else {\r\n vm.readAccess = true;\r\n }\r\n\r\n }\r\n }\r\n catch (e) {\r\n vm.readAccess = false;\r\n }\r\n\r\n\r\n });\r\n } catch (e) {\r\n\r\n }\r\n\r\n\r\n break;\r\n\r\n case 'cfsExceptions':\r\n $rootScope.isLoading = true;\r\n var search = $location.search();\r\n for (var key in search) {\r\n vm.lookup[key] = search[key];\r\n }\r\n ExceptionsCfsService.setQuery(search);\r\n\r\n // $scope.$on(\"exceptionsTable:loaded\", function(event, data) {\r\n // vm.noResults = data.length == 0; \r\n // });\r\n\r\n $scope.$on(\"exceptionsTable:stateChanged\", function (event, loading) {\r\n $rootScope.isLoading = loading;\r\n });\r\n $scope.$on\r\n ExceptionsCfsService.getExceptions();\r\n break;\r\n\r\n }\r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n ExceptionsCfsService.getExceptions();\r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n vm.addAllClientRow = addAllClientRow;\r\n\r\n function subscribeToTable(tableParams) {\r\n if ($state.current.name == 'lensgroup' || $state.current.name == 'showCompany' || $state.current.name == 'showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function (p1, p2, p3) {\r\n angular.forEach(p2, function (v, k) {\r\n if (v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if (vm.currentPage <= 1) {\r\n angular.copy(vm.showAllClientExceptionOrg, vm.showAllClientException);\r\n }\r\n else {\r\n vm.showAllClientException = [];\r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function (v, k) {\r\n if (v.selected || v.aprrover_level == \"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if ($state.current.name == 'showCompany') {\r\n\r\n $scope.$watch(function () { return $location.path() }, function (params1, params2) {\r\n var res = ExceptionsCfsService.getExceptions();\r\n res.then(function (dd) {\r\n vm.getList = dd;\r\n });\r\n });\r\n }\r\n\r\n\r\n\r\n function getSelectedCount() {\r\n return vm.listSelectedCount;\r\n }\r\n\r\n function logsVisible() {\r\n vm.logs_visible = false;\r\n if (vm.exception.log != null)\r\n var logs_empty = typeof vm.exception.log == 'undefined' ? true : !vm.exception.log.length > 0;\r\n\r\n vm.logs_visible = true;\r\n\r\n return !logs_empty;\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function gotoSelectUser(ev, data) {\r\n var lensGroupId = data;\r\n $location.url(\"/cfs-exceptions/\" + data.id);\r\n }\r\n\r\n function viewShipment(number) {\r\n $window.open(\"/shipping-details-cfs/\" + number, '_blank');\r\n }\r\n\r\n\r\n function endException() {\r\n vm.textCustType = true;\r\n }\r\n\r\n function reOpenException() {\r\n vm.textEndedType = true;\r\n }\r\n\r\n function deliverdException() {\r\n vm.isdeliverdShipment = true;\r\n }\r\n\r\n function cancelDeliverdException() {\r\n vm.isdeliverdShipment = false;\r\n }\r\n\r\n function cancelEndException() {\r\n vm.textCustType = false;\r\n }\r\n\r\n function cancelOpenException() {\r\n vm.textEndedType = false;\r\n }\r\n\r\n function rejectSubmit(val, id, status) {\r\n if (val == undefined || val.length == 0) {\r\n $scope.reject_reason_check = true;\r\n } else if (val.length > 0) {\r\n $scope.reject_reason_check = false;\r\n var params = {};\r\n params.status = status;\r\n params.rejection_reason = val;\r\n\r\n ExceptionsCfsService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n vm.closeModal();\r\n $location.url(\"/cfs-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('rejected-exception.success.html', '');\r\n }, 2500);\r\n\r\n\r\n } else {\r\n vm.closeModal();\r\n }\r\n }).catch(function (res) {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.data.messages !== 'undefined' ? res.data.messages : 'rejectException cfs-exception error returned');\r\n });\r\n }\r\n\r\n }\r\n\r\n function changeEndExceptionStatus(id, status) {\r\n var params = {};\r\n\r\n params.status = status;\r\n\r\n ExceptionsCfsService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n $location.url(\"/cfs-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('posted-exception.success.html', '');\r\n }, 2500);\r\n } else {\r\n }\r\n });\r\n }\r\n\r\n function changeOpenExceptionStatus(id, status) {\r\n var params = {};\r\n\r\n params.status = status;\r\n\r\n ExceptionsCfsService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n $location.url(\"/cfs-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('posted-exception.success.html', '');\r\n }, 2500);\r\n } else {\r\n }\r\n });\r\n }\r\n\r\n function endExceptionSubmit(val, id, status) {\r\n\r\n var params = {};\r\n\r\n params.status = status;\r\n params.rejection_reason = val;\r\n\r\n ExceptionsCfsService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n vm.closeModal();\r\n $location.url(\"/cfs-exceptions\");\r\n } else {\r\n vm.closeModal();\r\n }\r\n })\r\n }\r\n\r\n function approveException(id, status) {\r\n var params = {};\r\n\r\n params.status = status;\r\n\r\n console.log(\"Debugging Approve Exception with status:\", status);\r\n ExceptionsCfsService.changeStatusException(params, id).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n $location.url(\"/cfs-exceptions\");\r\n setTimeout(function () {\r\n showToastWithFile('posted-exception.success.html', '');\r\n }, 2500);\r\n } else {\r\n }\r\n }).catch(function (res) {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.data.messages !== 'undefined' ? res.data.messages : 'approveException cfs-exception error returned');\r\n });\r\n }\r\n\r\n function bulkDelete() {\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel();\r\n\r\n var params = {};\r\n params.exception_ids = ExceptionsCfsService.getSelectedException().map(function (exception) { return exception.id; });\r\n\r\n ExceptionsCfsService.bulkDeleteExceptions(params).then(function (res) {\r\n if (!res.errors) {\r\n vm.closeModal();\r\n showToastWithFile('cfs-delete-exception.success.html', '');\r\n } else {\r\n vm.closeModal();\r\n }\r\n });\r\n\r\n }\r\n\r\n function showModal(ev, modal) {\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/cfs-' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showRejectModal(ev, modal) {\r\n /* Show the modal */\r\n $scope.reject_reason_check = false;\r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-cfs/' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showEndModal(ev, modal) {\r\n /* Show the modal */\r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-cfs/' + modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function addExceptions(ev, id, status, type) {\r\n\r\n if (type == 'end-live') {\r\n $scope.exceptionStatus = 'reopen';\r\n } else if (type == 'reject') {\r\n $scope.exceptionStatus = 'rejected';\r\n }\r\n else {\r\n $scope.exceptionStatus = status;\r\n }\r\n\r\n if (status == 'approve') {\r\n var params = {};\r\n params.status = status;\r\n ExceptionsCfsService.changeStatusException(params, id, type).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n } else {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.error !== 'undefined' ? res.error : 'addException cfs-exception error returned');\r\n }\r\n }).catch(function (res) {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.data.messages !== 'undefined' ? res.data.messages : 'addExceptions cfs-exception error returned');\r\n });\r\n }\r\n if (status == 'end') {\r\n var params = {};\r\n params.status = status;\r\n ExceptionsCfsService.changeStatusException(params, id, type).then(function (res) {\r\n if (!res.errors) {\r\n $rootScope.$broadcast('exception_updated', res.log);\r\n } else {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.error !== 'undefined' ? res.error : 'addException cfs-exception error returned');\r\n }\r\n }).catch(function (res) {\r\n vm.showModalWithFile('generic-exception.error.modal.html', res.data.messages !== 'undefined' ? res.data.messages : 'addExceptions cfs-exception error returned');\r\n });\r\n }\r\n\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-cfs/add-exception-approvers.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: false,\r\n scope: $scope,\r\n fullscreen: useFullScreen\r\n }).then(function (answer) {\r\n\r\n }, function () {\r\n\r\n });\r\n\r\n }\r\n\r\n function cancelException() {\r\n $location.url(\"/cfs-exceptions\");\r\n }\r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function search_exceptions(isClear) {\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData) {\r\n if (isClear) {\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]) {\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n ExceptionsCfsService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query) {\r\n //return CfsExceptionService.autoComplete({field: key, value: query},vm.company);\r\n return ExceptionsCfsService.autoComplete({ field: key, value: query });\r\n }\r\n\r\n function getMatchs(key, query) {\r\n return ExceptionsCfsService.autoCompletes({ field: key, value: query }, vm.company);\r\n }\r\n\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: { message: message },\r\n controller: function ($scope, message) {\r\n $scope.messages = message;\r\n }\r\n });\r\n }\r\n function showModalWithFile(file, message) {\r\n $mdDialog.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/modals/' + file,\r\n locals: { message: message },\r\n controller: function ($scope, message) {\r\n $scope.messages = message;\r\n }\r\n }).then(function () {\r\n $location.url(\"/cfs-exceptions\");\r\n });\r\n }\r\n\r\n function formIsValid() {\r\n if (vm.formDetails) {\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function getTable() {\r\n vm.exceptionTable = ExceptionsCfsService.getExceptionTable();\r\n return ExceptionsCfsService.getExceptionTable();\r\n }\r\n\r\n function addAllClientRow(exceptionTable, state) {\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){ \r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]); \r\n // }\r\n // });\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if (vm.exceptionTable.data[i].aprrover_level == 'All Clients') {\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n }\r\n }\r\n\r\n if (vm.currentPage <= 1) {\r\n angular.copy(vm.showAllClientExceptionOrg, vm.showAllClientException);\r\n }\r\n else {\r\n vm.showAllClientException = [];\r\n }\r\n\r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field) {\r\n switch (field) {\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"status\":\r\n if (item[field].charAt(0) != null || item[field].charAt(0) != undefined) {\r\n return item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n }\r\n case \"company_name\":\r\n return item[field] ? item[field].toUpperCase() : \"\";\r\n case \"created_at\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"\";\r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data) {\r\n return vm.link.url + \"/\" + data[vm.link.field];\r\n }\r\n\r\n function isLink(field) {\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field) {\r\n switch (field) {\r\n case \"status\":\r\n if (item[field] == 'pending') { return \"exception-pending\"; }\r\n if (item[field] == 'expired') { return \"exception-expired\"; }\r\n if (item[field] == 'ended') { return \"exception-ended\"; }\r\n if (item[field] == 'rejected') { return \"exception-rejected\"; }\r\n if (item[field] == 'live') { return \"exception-live\"; }\r\n case \"actual_date\":\r\n if (item[field]) { return \"exception-date\"; }\r\n case \"actual_time\":\r\n if (item[field]) { return \"exception-date\"; }\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index) {\r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length) {\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index) {\r\n var first, last;\r\n if (vm.lastSelected > index) {\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++) {\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected() {\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function (depart) {\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index) {\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey) {\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens = []\r\n vm.exceptionTable.data.map(function (exception) {\r\n vm.getList.map(function (obj) {\r\n if (obj.id == exception.id && exception.aprrover_level != \"All Clients\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if (vm.getList.length > 0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function (allException) {\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, { selected: true }).length;\r\n if (count1 > 0) {\r\n count = count1;\r\n }\r\n if (count2 > count1) {\r\n count = count2;\r\n }\r\n else {\r\n count = count1;\r\n }\r\n\r\n if (vm.exceptionTable != undefined) {\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if (vm.exceptionTable.data[i].aprrover_level == \"All Clients\") {\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected) {\r\n vm.exceptionTable.data.map(function (exception) {\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens = []\r\n vm.exceptionTable.data.map(function (exception) {\r\n exception.selected = selected;\r\n vm.getList.map(function (obj) {\r\n if (obj.id == exception.id && exception.aprrover_level != \"All Clients\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if (vm.getList.length > 0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function (allException) {\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if (count1 > 0) {\r\n count = count1;\r\n }\r\n if (count2 > count1) {\r\n count = count2;\r\n }\r\n else {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if (selected) {\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if (($state.current.name == 'lensgroup') || ($state.current.name == 'showUser') || ($state.current.name == 'showCompany')) {\r\n angular.forEach(vm.exceptionTable.data, function (v, k) {\r\n if (v.aprrover_level == 'All Clients') {\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected = false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers() {\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('ExceptionsCfsExistService', ExceptionsCfsExistService);\r\n\r\n /** @ngInject */\r\n ExceptionsCfsExistService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function ExceptionsCfsExistService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var exceptionFilterPersist = {}; //used to persist the search\r\n var awaitFilterPersist = {};\r\n exceptionFilterPersist.value = 'all';\r\n awaitFilterPersist.value = 'mine';\r\n\r\n var isEmpty = true,\r\n allFilter = 'all',\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n unpackageExceptions: unpackageExceptions,\r\n getExceptionObject : getExceptionObject,\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n getExceptionFilterPersist: function() {\r\n return exceptionFilterPersist;\r\n },\r\n getAllFilter: function(){\r\n return allFilter;\r\n },\r\n setAllFilter: function(filter){\r\n allFilter = filter;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getExceptions : getExceptions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function unpackageExceptions(response,filter){\r\n try{\r\n if(allFilter == 'all'){\r\n var res = response.data.exceptions.all;\r\n }\r\n if(allFilter == 'expired'){\r\n var res = response.data.exceptions.expired;\r\n }\r\n if(allFilter == 'ended'){\r\n var res = response.data.exceptions.ended;\r\n }\r\n if(allFilter == 'live'){\r\n var res = response.data.exceptions.live;\r\n }\r\n if(allFilter == 'rejected'){\r\n var res = response.data.exceptions.rejected;\r\n }\r\n var data_settings = res.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n //user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function exitLoadState(cfsdata){\r\n loading = false;\r\n $rootScope.$broadcast(\"cfsExceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"cfsExceptionsTableExist:loaded\", cfsdata);\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getExceptions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true};\r\n }\r\n\r\n function getExceptions(type){\r\n loading = true;\r\n timeoutTid = false;\r\n var url;\r\n if(type == undefined){\r\n url=api.url_v2+\"/cfs/exceptions\";\r\n }else if(type == 'all'){\r\n url=api.url_v2+\"/cfs/exceptions\";\r\n }\r\n else{\r\n url=api.url_v2+\"/cfs/exceptions?state=\"+type;\r\n }\r\n //var url=api.url+\"/companies/\"+$stateParams.id+\"/departments\";\r\n //var url=api.url+\"/cfs/exceptions\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n\r\n exceptionTable.total(response.data.exceptions.length);\r\n exceptionTable.settings({data: response.data.exceptions});\r\n exceptionTable.data = response.data.exceptions;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"cfsExceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"cfsExceptionsTableExist:loaded\", response.data);\r\n\r\n return unpackageExceptions(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout') \r\n .controller('ExceptionsCfsExistController', ExceptionsCfsExistController);\r\n ExceptionsCfsExistController.$inject = ['$scope', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'ExceptionsCfsExistService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper','UserService'];\r\n function ExceptionsCfsExistController($scope, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, ExceptionsCfsExistService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService){\r\n var vm = this; \r\n \r\n vm.columns = [ \r\n {\"field\": \"status\", \"title\": 'STATUS', \"sortable\": \"status\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"created_at\", \"title\": 'DATE CREATED', \"sortable\": \"created_at\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"company_name\", \"title\": 'CUSTOMER', \"sortable\": \"company_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pronumber\", \"title\": 'PRO #', \"sortable\": \"pronumber\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"estimated_date\", \"title\": 'APPT.DATE', \"sortable\": \"estimated_date\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"estimated_time\", \"title\": 'APPT.TIME', \"sortable\": \"estimated_time\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"actual_date\", \"title\": 'ACTUAL DATE', \"sortable\": \"actual_date\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"actual_time\", \"title\": 'ACTUAL TIME', \"sortable\": \"actual_time\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"action\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false} \r\n ]; \r\n \r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n {id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n vm.exceptionFilter = ExceptionsCfsExistService.getExceptionFilterPersist();\r\n vm.counts = {all: {all: 0, live: 0, expired: 0, ended: 0, rejected: 0}}; \r\n vm.icon=\"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false; \r\n vm.getMatch = getMatch; \r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = ExceptionsCfsExistService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField; \r\n vm.getClass = getClass; \r\n vm.checkAll = checkAll; \r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions; \r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete; \r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose; \r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.possibleContacts = []; \r\n vm.setFilter = setFilter;\r\n vm.isLoading = {account: false, role: false, contact: false, table: true};\r\n $rootScope.isLoadingExist = true;\r\n vm.link = {field: \"id\", column: \"name\", url: \"cfs-exceptions\"};\r\n vm.gotoSelectUser = gotoSelectUser; \r\n\r\n //vm.clearAll = clearAll; \r\n\r\n if($state.current.name =='cfsExceptions'){\r\n vm.viewExceptionText = true;\r\n } \r\n \r\n switch ($state.current.name){\r\n\r\n case 'vieCFSExceptions':\r\n vm.isCreate = false;\r\n vm.isLoading.account = true;\r\n vm.saveBtnShowNew = true;\r\n \r\n break; \r\n\r\n case 'cfsExceptions':\r\n $rootScope.isLoadingExist = true;\r\n vm.exceptionFilter.value = 'all';\r\n $rootScope.all = 0;\r\n $rootScope.expired = 0;\r\n $rootScope.live = 0;\r\n $rootScope.ended = 0;\r\n $rootScope.rejected = 0;\r\n var search = $location.search();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n ExceptionsCfsExistService.setQuery(search);\r\n $scope.$on(\"cfsExceptionsTableExist:stateChanged\", function(event, loading){\r\n $rootScope.isLoadingExist = loading;\r\n \r\n });\r\n $scope.$on(\"cfsExceptionsTableExist:loaded\", function(event, data){\r\n try{\r\n $rootScope.all = data.all_count;\r\n $rootScope.expired = data.expired_count;\r\n $rootScope.live = data.live_count;\r\n $rootScope.ended = data.ended_count;\r\n $rootScope.rejected = data.rejected_count; \r\n }catch(e){\r\n \r\n }\r\n });\r\n $scope.$on\r\n ExceptionsCfsExistService.getExceptions('all');\r\n vm.exceptionTable = ExceptionsCfsExistService.getExceptionTable();\r\n break;\r\n \r\n } \r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n ExceptionsCfsExistService.getExceptions('all'); \r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false; \r\n\r\n vm.addAllClientRow = addAllClientRow; \r\n \r\n function subscribeToTable(tableParams){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n angular.forEach(p2,function(v,k){\r\n if(v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.aprrover_level ==\"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n $scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = ExceptionsCfsExistService.getExceptions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n } \r\n\r\n\r\n function setFilter(filter, mode) {\r\n vm.exceptionFilter.value = filter;\r\n $rootScope.filterValue = filter;\r\n ExceptionsCfsExistService.setAllFilter(filter);\r\n $rootScope.isLoadingExist = true;\r\n ExceptionsCfsExistService.getExceptions(filter);\r\n }\r\n\r\n function gotoSelectUser(ev,data){\r\n var lensGroupId = data; \r\n $location.url(\"/cfs-exceptions/\"+data.id); \r\n }\r\n \r\n\r\n function getSelectedCount() { \r\n return vm.listSelectedCount;\r\n } \r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n\r\n function bulkDelete(){\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel(); \r\n\r\n var params = {};\r\n params.exception_ids = ExceptionsCfsExistService.getSelectedException().map(function(exception){return exception.id;});\r\n\r\n ExceptionsCfsExistService.bulkDeleteExceptions(params).then(function(res){\r\n if (!res.errors){\r\n vm.closeModal(); \r\n showToastWithFile('cfs-delete-exception.success.html', ''); \r\n } else {\r\n vm.closeModal(); \r\n }\r\n }); \r\n\r\n } \r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/cfs-'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function addExceptions(ev){\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/cfs_exceptions/add-exception.html',\r\n parent: angular.element(document.body),\r\n\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n } \r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n \r\n function search_exceptions(isClear){\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n ExceptionsCfsExistService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query){ \r\n //return CfsExceptionService.autoComplete({field: key, value: query},vm.company);\r\n return ExceptionsCfsExistService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function getMatchs(key, query){ \r\n return ExceptionsCfsExistService.autoCompletes({field: key, value: query},vm.company); \r\n }\r\n\r\n \r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n } \r\n\r\n function getTable(){ \r\n vm.exceptionTable = ExceptionsCfsExistService.getExceptionTable(); \r\n return ExceptionsCfsExistService.getExceptionTable(); \r\n }\r\n\r\n function addAllClientRow(exceptionTable,state){\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException= [];\r\n vm.showAllClientExceptionOrg =[];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){ \r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]); \r\n // }\r\n // });\r\n\r\n for(var i=0; i<vm.exceptionTable.data.length; i++){ \r\n if(vm.exceptionTable.data[i].aprrover_level == 'All Clients'){\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n } \r\n }\r\n\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n \r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"status\":\r\n if(item[field].charAt(0) != null || item[field].charAt(0) != undefined){\r\n return item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n }\r\n case \"company_name\":\r\n return item[field] ? item[field].toUpperCase() : \"\";\r\n case \"estimated_date\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"\"; \r\n case \"created_at\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"\"; \r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"status\":\r\n if(item[field] == 'pending'){ return \"exception-pending\"; }\r\n if(item[field] == 'expired'){ return \"exception-expired\"; }\r\n if(item[field] == 'ended'){ return \"exception-ended\"; }\r\n if(item[field] == 'rejected'){ return \"exception-rejected\"; }\r\n if(item[field] == 'live'){ return \"exception-live\"; } \r\n case \"actual_date\":\r\n if(item[field]){ return \"exception-date\"; }\r\n case \"actual_time\":\r\n if(item[field]){ return \"exception-date\"; }\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index){ \r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length){\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].aprrover_level==\"All Clients\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected){\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if(($state.current.name=='lensgroup') || ($state.current.name == 'showUser')||($state.current.name == 'showCompany')){\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.aprrover_level=='All Clients'){\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers(){\r\n }\r\n }\r\n})(); \n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('addApproverCfsPopUpService', addApproverCfsPopUpService);\r\n\r\n /** @ngInject */\r\n addApproverCfsPopUpService.$inject = ['$http', '$state', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams','$filter', 'api', 'PermissionsService', 'UserService', 'AJAX', 'DownloadService', 'Upload'];\r\n function addApproverCfsPopUpService($http, $state, $rootScope, $q, $timeout, $location, $stateParams, NgTableParams,$filter, api, PermissionsService, UserService, AJAX, DownloadService, Upload) {\r\n\r\n var query,\r\n timeoutTid = false,\r\n loading = false,\r\n isEmpty = true,\r\n readOnly = false,\r\n AllClients = \"\",\r\n addUserCheck = true,\r\n companyDetails = [],\r\n deferred = $q.defer(),\r\n bulkUrl = api.url_v2 + '/lens_groups/destroy_multiple/',\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3/*,\r\n sorting: {name: \"asc\"}*/\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n\r\n return{\r\n\r\n getExceptionTable: function(){return exceptionTable;},\r\n getExceptions: getExceptions,\r\n setQuery : setQuery,\r\n getSelectedException : getSelectedException,\r\n setReadOnly : function(data){readOnly = data;},\r\n getReadOnly : function(){return readOnly;},\r\n setNameData : function(data){ AllClients = data;},\r\n getNameData : function(){return AllClients;},\r\n setUserAddCheck : setUserAddCheck\r\n };\r\n\r\n\r\n function setQuery(q){\r\n\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function setNameData(lensgroupName){\r\n return lensgroupName;\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n\r\n\r\n function getExceptions(id){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n var url = api.url_v2+'/cfs/exceptions/'+$stateParams.id;\r\n\r\n\r\n // $rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: response.data.users});\r\n exceptionTable.data = response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", response.data);\r\n exceptionTable.data = $filter('orderBy')(exceptionTable.data, 'first_name');\r\n\r\n response.data.users = exceptionTable.data;\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"lensGroupTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"lensGroupTable:loaded\", data);\r\n }\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('addApproverCfsPopUpController', addApproverCfsPopUpController);\r\n addApproverCfsPopUpController.$inject = ['$scope','$filter','$location', '$mdDialog', '$mdMedia', '$mdToast', '$q', '$http', '$state', 'api', 'addApproverCfsPopUpService', 'LensviewCompanyPopUpService',\r\n 'userLensGroupService','CompanyManagementService','UserManagementService','$stateParams','$rootScope','ngTableEventsChannel','NgTableParams','CfsExceptionService','ExceptionsCfsService'];\r\n function addApproverCfsPopUpController($scope, $filter, $location, $mdDialog, $mdMedia, $mdToast, $q, $http,\r\n \t$state, api, addApproverCfsPopUpService, LensviewCompanyPopUpService,\r\n \tuserLensGroupService, CompanyManagementService, UserManagementService,$stateParams,$rootScope,ngTableEventsChannel,NgTableParam, CfsExceptionService,ExceptionsCfsService){\r\n\t var vm = this;\r\n\r\n\t vm.columns = [\r\n\t {\"field\": \"selected\", \"title\": \"Select\", \"sortable\": \"selected\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"first_name\", \"title\": 'FIRST NAME', \"sortable\": \"first_name\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n\t {\"field\": \"last_name\", \"title\": 'LAST NAME', \"sortable\": \"last_name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n\t {\"field\": \"email\", \"title\": 'EMAIL', \"sortable\": \"email\", \"filter\": {}, \"show\":\"true\", isDate:false} \r\n\t ];\r\n\r\n\r\n\t vm.buttons = [\r\n\t // {id: 0, action: add_companieslens, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n\t {id: 0, action: search_companieslens, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n\t ];\r\n\r\n\t vm.icon=\"\";\r\n\t vm.lensviewtitle = \"Users\";\r\n\t vm.lensviewAddTitle = \"Select which users are informed about this approved exception via email.\"; \r\n\t vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false; \r\n\t vm.getClass = getClass;\r\n\t vm.addSectedLensGroup = addSectedLensGroup;\r\n\t vm.checkAll = checkAll; \r\n\t vm.getSelectedCount = getSelectedCount;\r\n\t vm.searchListData = search_users;\r\n \tvm.selectUser = selectUser;\r\n\t vm.clearAll = clearAll;\r\n\t vm.cancel = cancel;\r\n\t vm.selected = selected;\r\n\t vm.shiftSelect = shiftSelect;\r\n \tvm.resetSelected = resetSelected;\r\n \tvm.dontSendEmailException = dontSendEmailException;\r\n \tvm.showToastWithFile = showToastWithFile;\r\n \tvm.exception = ExceptionsCfsService.getExceptionObject();\r\n\t // vm.getLink = getLink;\r\n\t // vm.isLink = isLink;\r\n vm.companiesList = [];\r\n vm.getList = [];\r\n vm.link = {field: \"id\", column: \"name\", url: \"companies\"};\r\n\r\n if($state.current.name == 'vieCFSExceptions'){\r\n\t \tvm.showPouptext = true;\r\n\r\n\t \ttry{\r\n\t\t \t$scope.$on(\"exceptionsTable:endChanged\", function(event, loading){\r\n\t\t $rootScope.isLoading = loading;\r\n\t\t }); \t \r\n\t\t ExceptionsCfsService.changeStatusException(); \r\n\t\t}catch(e){\r\n\r\n }\r\n\r\n\t \ttry{ vm.exception = ExceptionsCfsService.getExceptionObject();\r\n \tExceptionsCfsService.getException($stateParams.id).then(function(){\r\n vm.exception = ExceptionsCfsService.getExceptionDetails(); \r\n if(vm.exception.status == 'ended'){\r\n\t\t\t vm.lensviewAddTitle = \"Select which users are informed about this ended exception via email.\"; \r\n\t\t\t}\r\n\t\t\tif($rootScope.isLoading == true){\r\n\t\t\t vm.lensviewAddTitle = \"Select which users are informed about this reopened exception via email.\"; \r\n\t\t\t}\r\n\t\t\t// if(vm.exception.status == 'live'){\r\n\t\t\t// vm.lensviewAddTitle = \"Select which users are informed about this reopened exception via email.\"; \r\n\t\t\t// }\r\n });\r\n }catch(e){\r\n\r\n }\r\n\t}\r\n\r\n\r\n $scope.$on(\"exceptionsTable:loaded\", function(event, data){\r\n try{\r\n vm.noResults = data.users.length == 0;\r\n }catch(e){\r\n \r\n }\r\n });\r\n\r\n addApproverCfsPopUpService.getExceptions();\r\n\r\n \r\n\t function search_companieslens(){\r\n\t \tvm.searchflag = !vm.searchflag;\r\n\t }\r\n\r\n\t function search_users(isClear){\r\n\r\n\t \t//vm.searchflag = !vm.searchflag;\r\n\r\n\t \tvar search = {};\r\n\t for (var key in vm.searchData){\r\n\t if (isClear){\r\n\t delete vm.searchData[key];\r\n\t }\r\n\t else if (vm.searchData[key]){\r\n\t search[key] = vm.searchData[key];\r\n\t }\r\n\r\n\t }\r\n\t $location.search(search); \r\n\t addApproverCfsPopUpService.setQuery(search); \r\n\t } \r\n \r\n\r\n\tif($state.current.name == 'vieCFSExceptions'){\r\n\t $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n\t}\r\n function subscribeToTable(tableParams){\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n var tmp = 0;\r\n angular.forEach(vm.companyTable.data, function(v,k){\r\n if(v.selected)\r\n tmp++\r\n });\r\n vm.selectAll = (vm.companyTable.data.length == tmp && tmp > 0)\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n\t\tfunction getTable(){ \r\n\r\n\t\tif($state.current.name == 'vieCFSExceptions'){\t\t\r\n\t var companyList = addApproverCfsPopUpService.getExceptionTable();\r\n\t vm.companyTable = companyList; \r\n\t\t\treturn companyList;\r\n\t\t} \r\n\r\n\t\t}\r\n\r\n\t\t//toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n\t\tfunction getSelectedCount() { \r\n return vm.listSelectedCount;\r\n } \r\n\r\n function selected(index){ \r\n vm.lastSelected = index;\r\n if (vm.companyTable.data.length){\r\n vm.lastSelectedValue = vm.companyTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.companyTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.companyTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.companyTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id)\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.companyTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.companyTable != undefined){\r\n vm.listSelectedCount = count; \r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n function checkAll(selected){\r\n vm.companyTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.companyTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id)\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.companyTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.companyTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n \r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\t\tfunction getField(item, field){\r\n\t switch (field){\r\n\t case \"is_active\":\r\n\t return item[field] ? \"Active\" : \"Inactive\";\r\n\t case \"approver_level\":\r\n\t return (item[field] == 'all_clients_approver') ? \"All Clients\" : \"\";\r\n\t default:\r\n\t return item[field];\r\n\t }\r\n\t }\r\n\t\tfunction getLink(data){\r\n\t return vm.link.url+\"/\"+data[vm.link.field];\r\n\t }\r\n\t function isLink(field){\r\n\t return field == vm.link.column;\r\n\t }\r\n\r\n\t function getClass(item, field){\r\n\t if(!item.is_active && item.user_status == 'issue(non-ad)' && item[field] == 'issue(non-ad)') {\r\n\t return 'inactive-user';\r\n\t }\r\n\t switch (field){\r\n\t case \"user_status\":\r\n\t if(item[field] == 'active'){ return \"active-user\"; }\r\n\t if(item[field] == 'inactive'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'unverified'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'issue(ad)'){ return \"issue-ad-user\"; }\r\n\t if(item[field] == 'issue(non-ad)'){ return \"issue-nonad-user\"; }\r\n\t if(item[field] == 'no-security'){ return \"no-security-user\"; }\r\n\t if(item[field] == 'bad state'){ return \"inactive-user\"; }\r\n\t if(item[field] == 'reset'){ return \"inactive-user\"; }\r\n\t // case \"is_active\":\r\n\t // return item[field] ? (item.confirmed ? \"active-user\" : \"inactive-user\") : \"inactive-user\";\r\n\t default:\r\n\t return '';\r\n\t }\r\n\t }\r\n\r\n\t \r\n\t \r\n function addSectedLensGroup(status){ \r\n\r\n if($state.current.name == 'vieCFSExceptions'){\r\n var companyTable = addApproverCfsPopUpService.getExceptionTable();\r\n \r\n vm.selectedLensGroup = addApproverCfsPopUpService.getSelectedException().map(function(lensGroup){\r\n //var companyExists = $filter('filter')(companyTable.data, {id: lensGroup.id });\r\n var companyExists = companyTable.data.map(function(data){ return data[\"id\"]; }).includes(lensGroup.id);\r\n var tempCompany = angular.copy(lensGroup);\r\n tempCompany.selected = false;\r\n if(companyExists == false) {\r\n tempCompany.new = true; \r\n }\r\n return lensGroup.id;\r\n\r\n });\r\n\r\n if(vm.selectedLensGroup.length > 0){\r\n\r\n\r\n \tvar params = {};\r\n\t params.user_ids = vm.selectedLensGroup; \r\n params.old_status = status;\r\n\r\n\t ExceptionsCfsService.sendEmailException(params,$state.params.id).then(function(res){\r\n\t if (!res.errors){\r\n\t $mdDialog.cancel();\r\n\t $location.url(\"/cfs-exceptions\"); \r\n\t setTimeout(function(){\r\n\t showToastWithFile('posted-email-exception.success.html', ''); \r\n\t },1500);\r\n\r\n\r\n\t } else {\r\n\t vm.closeModal(); \r\n\t }\r\n\t }); \r\n\r\n }\r\n \r\n //// console.log(vm.selectedLensGroup) ;\r\n //cancel();\r\n } \r\n\r\n }\r\n\r\n function dontSendEmailException(id,status){\r\n \t$mdDialog.cancel();\r\n $location.url(\"/cfs-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },1500); \r\n \t}\r\n\r\n\t function clearAll(){\r\n\t LensviewCompanyPopUpService.getCompanies('lens_group');\r\n\t }\r\n\t function cancel() {\r\n\t $mdDialog.cancel();\r\n\t $location.url(\"/cfs-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },1500); \r\n\t }\r\n\r\n\r\n\r\n\r\n\r\n\t}\r\n})();\r\n\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('equipmentTypeService', equipmentTypeService);\r\n\r\n /** @ngInject */\r\n equipmentTypeService.$inject = ['$http', '$rootScope', '$q','$timeout', '$location', '$stateParams', 'NgTableParams', 'api', 'PermissionsService',\r\n 'AJAX','$state'];\r\n function equipmentTypeService($http, $rootScope, $q, $timeout,$location,$stateParams, NgTableParams, api, PermissionsService, AJAX, $state) {\r\n\r\n var vm = this;\r\n\r\n var loading = false,\r\n timeoutTid = false,\r\n allFilter = 'CSL',\r\n isEmpty = true,\r\n deferred = $q.defer(),\r\n equipmentTable = new NgTableParams({\r\n page: 1,\r\n count: 10,\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n\r\n dataset: []\r\n }),\r\n equipmentTypeGroup = [],\r\n exceptionFilterPersist = {};\r\n\r\n exceptionFilterPersist.value = 'CSL';\r\n\r\n function getEquipment(params){\r\n\r\n prepare_bulk_communications();\r\n\r\n var users_url = api.url_v2+\"/equipment_types\";\r\n\r\n var promise = $http({url: users_url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n\r\n //// console.log(response);\r\n $rootScope.$broadcast(\"equipmentTable:all:loaded\", response.data);\r\n\r\n return unpackageUsers(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n\r\n }\r\n\r\n\r\n function prepare_bulk_communications(){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n $rootScope.$broadcast(\"equipmentTable:stateChanged\", loading);\r\n }\r\n\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n // if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response,filter){\r\n\r\n if(allFilter == 'CSL'){\r\n var res = response.data.equipment_types['CSL'];\r\n }else{\r\n var res = response.data.equipment_types['CFS'];\r\n }\r\n\r\n //var res = response.data.equipment_types;\r\n\r\n var data_settings = res.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n //user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n equipmentTable.total(response.headers().total);\r\n equipmentTable.settings({data: data_settings });\r\n equipmentTable.data = data_settings; //response.data.users;\r\n isEmpty = equipmentTable.data.length === 0;\r\n\r\n exitLoadState();\r\n\r\n return equipmentTable.data;\r\n }\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"equipmentTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"equipmentTable:loaded\", data);\r\n }\r\n\r\n function setQuery(q){\r\n equipmentTable.filter({});\r\n equipmentTable.filter(q);\r\n equipmentTable.page(1);\r\n equipmentTable.reload();\r\n }\r\n\r\n function updateEquipmentType(equipment_type_data){\r\n\r\n var users_url = api.url_v2+\"/equipment_types/\"+equipment_type_data.id;\r\n\r\n var promise = $q.defer();\r\n $http.put(users_url, {timeout: deferred.promise,description:(equipment_type_data.description?equipment_type_data.description:''),group:(equipment_type_data.group?equipment_type_data.group:'')})\r\n .then(function onSuccess(response){\r\n\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n\r\n }\r\n\r\n\r\n return {\r\n\r\n getEquipmentTable: function() {\r\n\r\n //equipmentTable.settings().data =[];\r\n\r\n return equipmentTable;\r\n },\r\n getEquipment: getEquipment,\r\n setQuery: setQuery,\r\n unpackageUsers:unpackageUsers,\r\n updateEquipmentType:updateEquipmentType,\r\n FetchEquipmentTypeGroup:function(){\r\n\r\n var users_url = api.url_v2+\"/equipment_type_groups\";\r\n\r\n $http.get(users_url).then(function(res){\r\n equipmentTypeGroup = res;\r\n });\r\n\r\n },\r\n getEquipmentTypeGroup:function(){\r\n\r\n if(equipmentTypeGroup.data){\r\n return equipmentTypeGroup.data.equipment_type_groups;\r\n }else{\r\n return '';\r\n }\r\n\r\n },\r\n setAllFilter: function(filter){\r\n allFilter = filter;\r\n },\r\n getExceptionFilterPersist: function() {\r\n return exceptionFilterPersist;\r\n },\r\n\r\n }\r\n\r\n\r\n }\r\n})();\r\n\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('equipmentTypeController', equipmentTypeController);\r\n\r\n equipmentTypeController.$inject = [\"$scope\", \"$rootScope\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', '$mdMedia', '$mdDialog', '$http', 'mdSelectHelper', '$timeout','ngTableEventsChannel', 'equipmentTypeService'];\r\n function equipmentTypeController( $scope, $rootScope, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, $mdMedia, $mdDialog, $http, mdSelectHelper, $timeout,ngTableEventsChannel, equipmentTypeService) {\r\n\r\n var vm = this;\r\n\r\n vm.getField = getField;\r\n vm.isLink = isLink;\r\n vm.getClass = getClass;\r\n vm.getLink = getLink;\r\n vm.getTable = getTable;\r\n vm.editEquipment = editEquipment;\r\n vm.closeModal = closeModal;\r\n vm.setFilter = setFilter;\r\n vm.customFullscreen = $mdMedia('xs') || $mdMedia('sm');\r\n vm.updateEquipmentType = updateEquipmentType;\r\n\r\n vm.exceptionFilter = equipmentTypeService.getExceptionFilterPersist();\r\n equipmentTypeService.FetchEquipmentTypeGroup();\r\n \r\n\r\n vm.counts = {all: {CFS: 0, CSL: 0}};\r\n\r\n vm.link = [\r\n {field: \"id\", column: \"email\", url: \"users\"},\r\n {field: \"id\", column: \"edit\", url: \"users\"},\r\n {field: \"company.id\", column: \"company.name\", url: \"companies\"}\r\n ];\r\n vm.icon = \"supervisor_account\";\r\n vm.columns = [ \r\n {\"field\": \"code\", \"title\": 'CODE', \"sortable\": \"code\", \"filter\": {}, \"show\": \"true\", isDate: false,'page':'equipment'},\r\n //{\"field\": \"is_active\", \"title\": 'USER.STATUS', \"sortable\": \"status\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"description\", \"title\": 'DESCRIPTION', \"sortable\": \"description\", \"filter\": {}, \"show\":\"true\", isDate:false,'page':'equipment'},\r\n {\"field\": \"group\", \"title\": 'GROUP', \"sortable\": \"group\", \"filter\": {}, \"show\":\"true\", isDate:false,'page':'equipment'},\r\n {\"field\":\"company\", \"title\": 'COMPANY', \"sortable\": \"company\", \"filter\": {}, \"show\":\"true\", isDate:false,'page':'equipment'},\r\n {\"field\":\"edit\", \"title\": 'Actions', \"sortable\": \"\", \"filter\": {}, \"show\":\"true\", isDate:false,'page':'equipment'}\r\n ];\r\n vm.buttons = [];\r\n // Collapisible widgit\r\n vm.lookup = {};\r\n vm.user_states = [\"\", \"Active\", \"Inactive\"];\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n\r\n /*vm.buttons = [\r\n {id: 0, action: '', display: 'USER.ADD_USER', icon: 'add'},\r\n {id: 1, action: '', display: 'USER.BULK.IMPORT_USERS', icon: 'assignment_ind'}\r\n ];*/\r\n\r\n vm.isLoading = {};\r\n vm.isLoading.table = true;\r\n\r\n equipmentTypeService.setQuery();\r\n\r\n equipmentTypeService.getEquipment(); \r\n vm.equipmentTable = equipmentTypeService.getEquipmentTable();\r\n\r\n $scope.$on(\"equipmentTable:stateChanged\", function(event, loading){\r\n vm.isLoading.table = loading;\r\n });\r\n\r\n $scope.$on(\"equipmentTable:all:loaded\", function(event, data){ \r\n \r\n $rootScope.cslUsers = (data.equipment_types.CSL != undefined)?data.equipment_types.CSL.length:0;\r\n $rootScope.csfUsers = (data.equipment_types.CFS != undefined)?data.equipment_types.CFS.length:0;\r\n\r\n vm.counts = {all: {CFS: $rootScope.csfUsers, CSL: $rootScope.cslUsers}};\r\n \r\n var value = vm.exceptionFilter.value;\r\n vm.equipmentTypeGroup = equipmentTypeService.getEquipmentTypeGroup();\r\n vm.equipmentTypeGroupData = vm.equipmentTypeGroup[value];\r\n\r\n }); \r\n\r\n function getTable(){\r\n //// console.log(UserManagementService.getUserTable()); \r\n return equipmentTypeService.getEquipmentTable();\r\n }\r\n\r\n function getLink(data, field){\r\n if (!field){\r\n field = \"edit\"\r\n }\r\n for (var i in vm.link){\r\n if (field == vm.link[i].column){\r\n return vm.link[i].url + \"/\" + eval(\"data.\"+vm.link[i].field);\r\n }\r\n }\r\n }\r\n\r\n function updateEquipmentType(){\r\n vm.equipmentTypeUpdating = true;\r\n\r\n equipmentTypeService.updateEquipmentType(vm.equipment_data).then(function(response){\r\n \r\n vm.equipmentTypeUpdating = false;\r\n vm.closeModal();\r\n showToastWithFile('toast.html', 'Equipment Type is updated','success');\r\n\r\n }).catch(function(error) {\r\n \r\n if(error.data.error){\r\n showToastWithFile('toast.html', error.data.error,'error');\r\n }\r\n \r\n else if(error.error){\r\n showToastWithFile('toast.html', [error.error],'error');\r\n }\r\n \r\n else {\r\n showToastWithFile('toast.html', 'Error','error');\r\n }\r\n \r\n });\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, messages, statuss) {\r\n var message = {};\r\n message.message = messages;\r\n message.status = statuss;\r\n\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/equipment-type/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n }\r\n\r\n function getClass(item, field){\r\n if(!item.is_active && item.user_status == 'issue(non-ad)' && item[field] == 'issue(non-ad)') {\r\n return 'inactive-user';\r\n }\r\n switch (field){\r\n case \"user_status\":\r\n if(item[field] == 'active'){ return \"active-user\"; }\r\n if(item[field] == 'inactive'){ return \"inactive-user\"; }\r\n if(item[field] == 'unverified'){ return \"inactive-user\"; }\r\n if(item[field] == 'issue(ad)'){ return \"issue-ad-user\"; }\r\n if(item[field] == 'issue(non-ad)'){ return \"issue-nonad-user\"; }\r\n if(item[field] == 'no-security'){ return \"no-security-user\"; }\r\n if(item[field] == 'bad state'){ return \"inactive-user\"; }\r\n if(item[field] == 'reset'){ return \"inactive-user\"; }\r\n // case \"is_active\":\r\n // return item[field] ? (item.confirmed ? \"active-user\" : \"inactive-user\") : \"inactive-user\";\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function isLink(field){\r\n for (var i in vm.link){\r\n if (field == vm.link[i].column){\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){\r\n case \"company.name\":\r\n return item.company ? item.company.name : '';\r\n case \"user_status\":\r\n if(item[field].charAt(0) != null || item[field].charAt(0) != undefined){\r\n return item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n }\r\n // case \"is_active\":\r\n // return item[field] ? (item.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n case \"edit\":\r\n return 'Edit';\r\n case \"selected\":\r\n return '';\r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function editEquipment(row_data){\r\n\r\n vm.equipment_data = row_data;\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/equipment-type/modals/'+'edit-equipmentModal.html',\r\n parent: angular.element(document.body),\r\n \r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true,\r\n controller: function () {\r\n return vm;\r\n }, \r\n controllerAs: 'vm'\r\n });\r\n\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n\r\n function setFilter(filter, mode) {\r\n vm.exceptionFilter.value = filter;\r\n equipmentTypeService.setAllFilter(filter);\r\n equipmentTypeService.unpackageUsers(equipmentTypeService.getEquipment(), filter);\r\n }\r\n\r\n \r\n }\r\n\r\n})();\r\n\n/**\r\n * @ngdoc directive\r\n * @name adminEditAccount\r\n * @description directive that includes the admin edit account partial\r\n * @restrict E\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .directive('adminEditAccount', editAccount);\r\n\r\n /** @ngInject */\r\n function editAccount() {\r\n var directive = {\r\n restrict: 'E',\r\n templateUrl: '/app/admin/admin-edit-account.html'\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('DiscussionShipmentsCslService', DiscussionShipmentsCslService);\r\n\r\n /** @ngInject */\r\n DiscussionShipmentsCslService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function DiscussionShipmentsCslService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var isEmpty = true,\r\n exception = getExceptionObject(),\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n changeStatusException: changeStatusException,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n getExceptionObject : getExceptionObject,\r\n sendEmailException : sendEmailException,\r\n getException : getException,\r\n getExceptionDetails: function() { return exception; },\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getShipmentDiscussions : getShipmentDiscussions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a exception\r\n // // ------------------\r\n function getException(id){\r\n try{\r\n exception = getExceptionObject();\r\n return $http.get(api.url_v2 + '/csl/exceptions/'+ id/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n //// console.log(response);\r\n unpackageException(response.data);\r\n //// console.log(user);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Do something else;\r\n }\r\n exception = null;\r\n });\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function unpackageException(exception_data){\r\n for (var field in exception_data){\r\n exception[field] = exception_data[field];\r\n }\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getShipmentDiscussions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function changeStatusException(params,id,type){\r\n try{\r\n var query = params;\r\n var url = api.url_v2 +'/csl/exceptions/'+ id;\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n if(type == 'end-live'){\r\n loading = true;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }else{\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }catch(e){\r\n\r\n }\r\n\r\n }\r\n\r\n function sendEmailException(params,id){\r\n var query = params;\r\n var url = api.url_v2 +'/csl/exceptions/'+id+'/send_exception_emails';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n data :query\r\n }).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", is_active: true};\r\n }\r\n\r\n function getShipmentDiscussions(){\r\n loading = true;\r\n timeoutTid = false;\r\n var url=api.url_v2+\"/user_shipment_discussions?shipment_type=csl\";\r\n //var url=api.url+\"/shipment_discussions_unread\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.length);\r\n exceptionTable.settings({data: response.data});\r\n exceptionTable.data = response.data;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", exceptionTable.data);\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response){\r\n var data_settings = response.data.exceptions.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }\r\n\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout') \r\n .controller('DiscussionShipmentsCslController', DiscussionShipmentsCslController);\r\n DiscussionShipmentsCslController.$inject = ['$scope', '$window', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'DiscussionShipmentsCslService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper','UserService','ShippingDetailsService'];\r\n function DiscussionShipmentsCslController($scope, $window, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, DiscussionShipmentsCslService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService,ShippingDetailsService){\r\n var vm = this; \r\n \r\n vm.columns = [ \r\n {\"field\": \"unseen_discussion_count_csl\", \"title\": 'DISCUSSIONS', \"sortable\": \"unseen_discussion_count\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pro\", \"title\": 'PRO #', \"sortable\": \"pro\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"bol\", \"title\": 'BOOKING', \"sortable\": \"bol\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"origincity\", \"title\": 'ORIG. <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> DEST.', \"sortable\": \"origincity\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pickupdate\", \"title\": 'START DATE', \"sortable\": \"pickupdate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"duedate\", \"title\": 'DUE DATE', \"sortable\": \"duedate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"consigneeapptdate\", \"title\": 'EST. DELIVERY', \"sortable\": \"consigneeapptdate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"cslflags\", \"title\": 'EXC.', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"status_csl\", \"title\": 'STATUS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false} \r\n ]; \r\n \r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n //{id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n \r\n\r\n vm.icon=\"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false; \r\n vm.getMatch = getMatch; \r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = DiscussionShipmentsCslService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField; \r\n vm.getClass = getClass; \r\n vm.checkAll = checkAll; \r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.cancelException = cancelException;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions; \r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.showRejectModal = showRejectModal;\r\n vm.showEndModal = showEndModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete; \r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose; \r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.possibleContacts = []; \r\n vm.link = {field: \"id\", column: \"name\", url: \"csl-exceptions\"};\r\n vm.gotoSelectUser = gotoSelectUser;\r\n $rootScope.isLoading = true;\r\n vm.user = UserService.getUserData();\r\n vm.rejectSubmit = rejectSubmit;\r\n vm.endExceptionSubmit = endExceptionSubmit;\r\n vm.approveException = approveException;\r\n vm.textCustType = false;\r\n vm.textEndedType = false;\r\n vm.endException = endException;\r\n vm.reOpenException = reOpenException;\r\n vm.cancelEndException = cancelEndException;\r\n vm.cancelOpenException = cancelOpenException;\r\n vm.changeEndExceptionStatus = changeEndExceptionStatus;\r\n vm.changeOpenExceptionStatus = changeOpenExceptionStatus;\r\n vm.viewShipment = viewShipment;\r\n vm.logsVisible = logsVisible;\r\n //vm.clearAll = clearAll; \r\n vm.user = UserService.getUserData();\r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n vm.gotoShipment = gotoShipment;\r\n\r\n\r\n vm.logsVisible(); \r\n\r\n vm.userName = '';\r\n if(vm.user){\r\n if (vm.user.first_name || vm.user.last_name){\r\n vm.userName = (vm.user.first_name?vm.user.first_name:\"\")+\" \"+(vm.user.last_name?vm.user.last_name:\"\");\r\n } else {\r\n vm.userName = vm.user.email;\r\n }\r\n }\r\n vm.getUser = function(){ \r\n if (vm.user.first_name || vm.user.last_name){\r\n return (vm.user.first_name?vm.user.first_name:\"\")+\" \"+(vm.user.last_name?vm.user.last_name:\"\");\r\n } else {\r\n return vm.user.email;\r\n }\r\n };\r\n\r\n if($state.current.name =='cslExceptions'){\r\n vm.viewExceptionText = true;\r\n } \r\n\r\n switch ($state.current.name){ \r\n\r\n case 'vieCSLExceptions':\r\n vm.isCreate = false; \r\n vm.saveBtnShowNew = true;\r\n //Get the exception from the service \r\n try{\r\n vm.exception = DiscussionShipmentsCslService.getExceptionObject();\r\n DiscussionShipmentsCslService.getException($stateParams.id).then(function(){\r\n vm.exception = DiscussionShipmentsCslService.getExceptionDetails();\r\n vm.exception.estimated = vm.exception.estimated_date +\" \"+vm.exception.estimated_time;\r\n vm.exception.actual = vm.exception.actual_date +\" \"+vm.exception.actual_time;\r\n\r\n try{\r\n //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if(JSON.parse(localStorage.getItem(\"user\")).permissions.csl.CslException.includes('all_clients_approver')){\r\n vm.readAccess = false;\r\n }else if(JSON.parse(localStorage.getItem(\"user\")).permissions.csl.CslException.includes('read') \r\n && !JSON.parse(localStorage.getItem(\"user\")).permissions.csl.CslException.includes('approver')){\r\n vm.readAccess = true;\r\n }else\r\n {\r\n if(vm.user.approver_level_company_ids.includes(vm.exception.company_id)){\r\n vm.readAccess = false;\r\n }else{\r\n vm.readAccess = true;\r\n }\r\n \r\n }\r\n }\r\n catch(e){\r\n vm.readAccess = false;\r\n }\r\n\r\n\r\n });\r\n }catch(e){\r\n\r\n }\r\n\r\n \r\n break; \r\n\r\n case 'shipmentDiscussionsCsl':\r\n $rootScope.isLoading = true;\r\n var search = $location.search();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n DiscussionShipmentsCslService.setQuery(search); \r\n\r\n $scope.$on(\"exceptionsTable:stateChanged\", function(event, loading){\r\n $rootScope.isLoading = loading;\r\n }); \r\n $scope.$on\r\n DiscussionShipmentsCslService.getShipmentDiscussions(); \r\n break;\r\n \r\n } \r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n DiscussionShipmentsCslService.getShipmentDiscussions(); \r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false; \r\n\r\n vm.addAllClientRow = addAllClientRow; \r\n \r\n function subscribeToTable(tableParams){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n angular.forEach(p2,function(v,k){\r\n if(v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.aprrover_level ==\"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n $scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = DiscussionShipmentsCslService.getShipmentDiscussions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n } \r\n\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n \r\n $timeout(function () {\r\n vm.tooltipIsLoading = false;\r\n }, 1000); \r\n\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n function gotoShipment(data, field){ \r\n return \"shipping-details-csl/\"+data['pro'];\r\n }\r\n \r\n\r\n function getSelectedCount() { \r\n return vm.listSelectedCount;\r\n } \r\n\r\n function logsVisible(){\r\n vm.logs_visible = false;\r\n if(vm.exception.log != null)\r\n var logs_empty = typeof vm.exception.log == 'undefined' ? true : !vm.exception.log.length > 0;\r\n \r\n vm.logs_visible = true;\r\n \r\n return !logs_empty; \r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function gotoSelectUser(ev,data){\r\n var lensGroupId = data; \r\n $location.url(\"/csl-exceptions/\"+data.id); \r\n }\r\n\r\n function viewShipment(number){ \r\n $window.open(\"/shipping-details-csl/\"+number, '_blank');\r\n }\r\n\r\n\r\n function endException(){\r\n vm.textCustType = true;\r\n }\r\n\r\n function reOpenException(){\r\n vm.textEndedType = true;\r\n }\r\n\r\n function cancelEndException(){\r\n vm.textCustType = false;\r\n }\r\n\r\n function cancelOpenException(){\r\n vm.textEndedType = false;\r\n }\r\n\r\n function rejectSubmit(val,id,status){ \r\n if(val == undefined || val.length == 0){\r\n $scope.reject_reason_check = true;\r\n }else if(val.length > 0){\r\n $scope.reject_reason_check = false;\r\n var params = {};\r\n params.status = status;\r\n params.rejection_reason = val;\r\n\r\n DiscussionShipmentsCslService.changeStatusException(params,id).then(function(res){\r\n if (!res.errors){\r\n $rootScope.$broadcast('exception_updated',res.log);\r\n vm.closeModal(); \r\n $location.url(\"/csl-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('rejected-exception.success.html', ''); \r\n },2500);\r\n\r\n\r\n } else {\r\n vm.closeModal(); \r\n }\r\n }).catch(function (error) {\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n });\r\n } \r\n\r\n }\r\n\r\n function changeEndExceptionStatus(id,status){\r\n var params = {};\r\n\r\n params.status = status; \r\n\r\n DiscussionShipmentsCslService.changeStatusException(params,id).then(function(res){\r\n if (!res.errors){ \r\n $rootScope.$broadcast('exception_updated',res.log);\r\n $location.url(\"/csl-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },2500); \r\n } else { \r\n }\r\n }).catch(function (error) {\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n }); \r\n }\r\n\r\n function changeOpenExceptionStatus(id,status){\r\n var params = {};\r\n\r\n params.status = status; \r\n\r\n DiscussionShipmentsCslService.changeStatusException(params,id).then(function(res){\r\n if (!res.errors){ \r\n $rootScope.$broadcast('exception_updated',res.log);\r\n $location.url(\"/csl-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },2500); \r\n } else { \r\n }\r\n }).catch(function (error) {\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n });\r\n }\r\n\r\n function endExceptionSubmit(val,id,status){ \r\n \r\n var params = {};\r\n\r\n params.status = status;\r\n params.rejection_reason = val;\r\n\r\n DiscussionShipmentsCslService.changeStatusException(params,id).then(function(res){\r\n if (!res.errors){\r\n $rootScope.$broadcast('exception_updated',res.log);\r\n vm.closeModal(); \r\n $location.url(\"/csl-exceptions\"); \r\n } else {\r\n vm.closeModal(); \r\n }\r\n }).catch(function (error) {\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n }); \r\n }\r\n\r\n function approveException(id,status){\r\n var params = {};\r\n\r\n params.status = status; \r\n\r\n DiscussionShipmentsCslService.changeStatusException(params,id).then(function(res){\r\n if (!res.errors){ \r\n $rootScope.$broadcast('exception_updated',res.log);\r\n $location.url(\"/csl-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },2500); \r\n } else { \r\n }\r\n });\r\n }\r\n\r\n function bulkDelete(){\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel(); \r\n\r\n var params = {};\r\n params.exception_ids = DiscussionShipmentsCslService.getSelectedException().map(function(exception){return exception.id;});\r\n\r\n DiscussionShipmentsCslService.bulkDeleteExceptions(params).then(function(res){\r\n if (!res.errors){\r\n vm.closeModal(); \r\n showToastWithFile('delete-exception.success.html', ''); \r\n } else {\r\n vm.closeModal(); \r\n }\r\n }); \r\n\r\n } \r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function showRejectModal(ev, modal){\r\n /* Show the modal */\r\n $scope.reject_reason_check = false;\r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-csl/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function showEndModal(ev, modal){\r\n /* Show the modal */ \r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-csl/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function addExceptions(ev,id,status,type){\r\n\r\n if(type == 'end-live'){\r\n $scope.exceptionStatus = 'reopen';\r\n }else if(type == 'reject'){\r\n $scope.exceptionStatus = 'rejected';\r\n }\r\n else{\r\n $scope.exceptionStatus = status;\r\n }\r\n\r\n if(status == 'approve'){\r\n var params = {};\r\n params.status = status; \r\n DiscussionShipmentsCslService.changeStatusException(params,id,type).then(function(res){\r\n if (!res.errors){ \r\n $rootScope.$broadcast('exception_updated',res.log);\r\n } else { \r\n }\r\n });\r\n }\r\n if(status == 'end'){\r\n var params = {};\r\n params.status = status; \r\n DiscussionShipmentsCslService.changeStatusException(params,id,type).then(function(res){\r\n if (!res.errors){ \r\n $rootScope.$broadcast('exception_updated',res.log);\r\n } else { \r\n }\r\n });\r\n }\r\n \r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-csl/add-exception-approvers.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:false,\r\n scope: $scope,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n } \r\n\r\n function cancelException() {\r\n $location.url(\"/csl-exceptions\"); \r\n }\r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n \r\n function search_exceptions(isClear){\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n DiscussionShipmentsCslService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query){ \r\n //return CslExceptionService.autoComplete({field: key, value: query},vm.company);\r\n return DiscussionShipmentsCslService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function getMatchs(key, query){ \r\n return DiscussionShipmentsCslService.autoCompletes({field: key, value: query},vm.company); \r\n }\r\n\r\n \r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n } \r\n\r\n function getTable(){ \r\n vm.exceptionTable = DiscussionShipmentsCslService.getExceptionTable(); \r\n return DiscussionShipmentsCslService.getExceptionTable(); \r\n }\r\n\r\n function addAllClientRow(exceptionTable,state){\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException= [];\r\n vm.showAllClientExceptionOrg =[];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){ \r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]); \r\n // }\r\n // });\r\n\r\n for(var i=0; i<vm.exceptionTable.data.length; i++){ \r\n if(vm.exceptionTable.data[i].aprrover_level == 'All Clients'){\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n } \r\n }\r\n\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n \r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){ \r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"origincity\":\r\n /*return item['origin'] ? \r\n item['origincountrycode']+' '+item['origincitycode']+' <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> '+item['destinationcountrycode']+' '+item['destinationcitycode']\r\n : '';*/\r\n return item['origincity'] ? \r\n item['origincity']+' <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> '+' '+item['destinationcity']\r\n : '---';\r\n case \"bol\":\r\n return item[field] ? item[field] : '---';\r\n case \"unseen_discussion_count_csl\": \r\n if(item['unseen_discussion_count'] != null && item['unseen_discussion_count'] != 0){\r\n if(item['unseen_discussion_count'] <= 9){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count-less\">'+item['unseen_discussion_count']+'</span>'\r\n }else if(item['unseen_discussion_count'] >= 10){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count\">'+'9+'+'</span>'\r\n }\r\n }else{\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count discussion-visibility\">00</span>'\r\n }\r\n case \"status_csl\":\r\n if(item['status'].charAt(0) != null || item['status'].charAt(0) != undefined){\r\n return item['status'].charAt(0).toUpperCase() + item['status'].substr(1).toLowerCase(); \r\n } \r\n case \"pickupdate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"actual_date\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"duedate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"consigneeapptdate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"status_csl\":\r\n if(item['status'].toLowerCase() == 'undelivered'){ return \"discussion_undelivered\"; }\r\n if(item['status'].toLowerCase() == 'planned'){ return \"discussion_booked\"; }\r\n if(item['status'].toLowerCase() == 'delivered'){ return \"discussion_delivered\"; }\r\n case \"pro\":\r\n if(field == 'pro'){ return \"awb-bol-number\"; } \r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index){ \r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length){\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].aprrover_level==\"All Clients\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected){\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if(($state.current.name=='lensgroup') || ($state.current.name == 'showUser')||($state.current.name == 'showCompany')){\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.aprrover_level=='All Clients'){\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers(){\r\n }\r\n }\r\n})(); \n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('DiscussionShipmentsCslExistService', DiscussionShipmentsCslExistService);\r\n\r\n /** @ngInject */\r\n DiscussionShipmentsCslExistService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function DiscussionShipmentsCslExistService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var exceptionFilterPersist = {}; //used to persist the search\r\n var awaitFilterPersist = {};\r\n exceptionFilterPersist.value = 'all';\r\n awaitFilterPersist.value = 'mine';\r\n\r\n var isEmpty = true,\r\n allFilter = 'all',\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n unpackageExceptions: unpackageExceptions,\r\n getExceptionObject : getExceptionObject,\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n getExceptionFilterPersist: function() {\r\n return exceptionFilterPersist;\r\n },\r\n getAllFilter: function(){\r\n return allFilter;\r\n },\r\n setAllFilter: function(filter){\r\n allFilter = filter;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getShipmentDiscussions : getShipmentDiscussions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function unpackageExceptions(response,filter){\r\n try{\r\n if(allFilter == 'all'){\r\n var res = response.data.exceptions.all;\r\n }\r\n if(allFilter == 'expired'){\r\n var res = response.data.exceptions.expired;\r\n }\r\n if(allFilter == 'ended'){\r\n var res = response.data.exceptions.ended;\r\n }\r\n if(allFilter == 'live'){\r\n var res = response.data.exceptions.live;\r\n }\r\n if(allFilter == 'rejected'){\r\n var res = response.data.exceptions.rejected;\r\n }\r\n var data_settings = res.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n //user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTableExist:loaded\", data);\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getShipmentDiscussions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true};\r\n }\r\n\r\n function getShipmentDiscussions(){\r\n loading = true;\r\n timeoutTid = false;\r\n var url;\r\n\r\n url=api.url+\"/load_discussion_index?customer_type=csl\";\r\n //url=api.url+\"/shipment_discussions_bookmarked\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.length);\r\n exceptionTable.settings({data: response.data});\r\n exceptionTable.data = response.data;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTableExist:loaded\", response.data);\r\n\r\n return unpackageExceptions(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout') \r\n .controller('DiscussionShipmentsCslExistController', DiscussionShipmentsCslExistController);\r\n DiscussionShipmentsCslExistController.$inject = ['$scope', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'DiscussionShipmentsCslExistService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper','UserService','ShippingDetailsService'];\r\n function DiscussionShipmentsCslExistController($scope, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, DiscussionShipmentsCslExistService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService,ShippingDetailsService){\r\n var vm = this; \r\n \r\n vm.columns = [ \r\n {\"field\": \"unseen_discussion_count_csl\", \"title\": 'DISCUSSIONS', \"sortable\": \"unseen_discussion_count\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pro\", \"title\": 'PRO #', \"sortable\": \"pro\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"bol\", \"title\": 'BOOKING', \"sortable\": \"bol\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"origincity\", \"title\": 'ORIG. <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> DEST.', \"sortable\": \"origincity\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pickupdate\", \"title\": 'START DATE', \"sortable\": \"pickupdate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"duedate\", \"title\": 'DUE DATE', \"sortable\": \"duedate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"consigneeapptdate\", \"title\": 'EST. DELIVERY', \"sortable\": \"consigneeapptdate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"cslflags\", \"title\": 'EXC.', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"status_csl\", \"title\": 'STATUS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false} \r\n ]; \r\n \r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n //{id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n vm.exceptionFilter = DiscussionShipmentsCslExistService.getExceptionFilterPersist();\r\n vm.counts = {all: {all: 0, live: 0, expired: 0, ended: 0, rejected: 0}}; \r\n vm.icon=\"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false; \r\n vm.getMatch = getMatch; \r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = DiscussionShipmentsCslExistService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField; \r\n vm.getClass = getClass; \r\n vm.checkAll = checkAll; \r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions; \r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete; \r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose; \r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.possibleContacts = []; \r\n vm.setFilter = setFilter;\r\n vm.isLoading = {account: false, role: false, contact: false, table: true};\r\n $rootScope.isLoadingExist = true;\r\n vm.link = {field: \"id\", column: \"name\", url: \"csl-exceptions\"}; \r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n vm.gotoShipment = gotoShipment;\r\n\r\n //vm.clearAll = clearAll; \r\n\r\n if($state.current.name =='shipmentDiscussions'){\r\n vm.viewExceptionText = true;\r\n } \r\n \r\n switch ($state.current.name){\r\n\r\n case 'vieCSLExceptions':\r\n vm.isCreate = false;\r\n vm.isLoading.account = true;\r\n vm.saveBtnShowNew = true; \r\n break; \r\n\r\n case 'shipmentDiscussionsCsl':\r\n $rootScope.isLoadingExist = true;\r\n vm.exceptionFilter.value = 'all';\r\n var search = $location.search();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n DiscussionShipmentsCslExistService.setQuery(search);\r\n $scope.$on(\"exceptionsTableExist:stateChanged\", function(event, loading){\r\n $rootScope.isLoadingExist = loading;\r\n });\r\n $scope.$on(\"exceptionsTableExist:loaded\", function(event, data){\r\n try{\r\n $rootScope.all = data.all_count;\r\n $rootScope.expired = data.expired_count;\r\n $rootScope.live = data.live_count;\r\n $rootScope.ended = data.ended_count;\r\n $rootScope.rejected = data.rejected_count; \r\n }catch(e){\r\n \r\n }\r\n });\r\n $scope.$on\r\n DiscussionShipmentsCslExistService.getShipmentDiscussions();\r\n vm.exceptionTable = DiscussionShipmentsCslExistService.getExceptionTable();\r\n break;\r\n \r\n } \r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n DiscussionShipmentsCslExistService.getShipmentDiscussions(); \r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false; \r\n\r\n vm.addAllClientRow = addAllClientRow; \r\n \r\n function subscribeToTable(tableParams){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n angular.forEach(p2,function(v,k){\r\n if(v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.aprrover_level ==\"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n $scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = DiscussionShipmentsCslExistService.getShipmentDiscussions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n } \r\n\r\n\r\n function setFilter(filter, mode) {\r\n vm.exceptionFilter.value = filter;\r\n $rootScope.filterValue = filter;\r\n DiscussionShipmentsCslExistService.setAllFilter(filter);\r\n $rootScope.isLoadingExist = true;\r\n DiscussionShipmentsCslExistService.getShipmentDiscussions(filter);\r\n }\r\n\r\n function gotoShipment(data, field){ \r\n return \"shipping-details-csl/\"+data['pro'];\r\n }\r\n \r\n\r\n function getSelectedCount() { \r\n return vm.listSelectedCount;\r\n } \r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n \r\n $timeout(function () {\r\n vm.tooltipIsLoading = false;\r\n }, 1000); \r\n\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n\r\n function bulkDelete(){\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel(); \r\n\r\n var params = {};\r\n params.exception_ids = DiscussionShipmentsCslExistService.getSelectedException().map(function(exception){return exception.id;});\r\n\r\n DiscussionShipmentsCslExistService.bulkDeleteExceptions(params).then(function(res){\r\n if (!res.errors){\r\n vm.closeModal(); \r\n showToastWithFile('delete-exception.success.html', ''); \r\n } else {\r\n vm.closeModal(); \r\n }\r\n }); \r\n\r\n } \r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function addExceptions(ev){\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/csl_exceptions/add-exception.html',\r\n parent: angular.element(document.body),\r\n\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n } \r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n \r\n function search_exceptions(isClear){\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n DiscussionShipmentsCslExistService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query){ \r\n //return CslExceptionService.autoComplete({field: key, value: query},vm.company);\r\n return DiscussionShipmentsCslExistService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function getMatchs(key, query){ \r\n return DiscussionShipmentsCslExistService.autoCompletes({field: key, value: query},vm.company); \r\n }\r\n\r\n \r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n } \r\n\r\n function getTable(){ \r\n vm.exceptionTable = DiscussionShipmentsCslExistService.getExceptionTable(); \r\n return DiscussionShipmentsCslExistService.getExceptionTable(); \r\n }\r\n\r\n function addAllClientRow(exceptionTable,state){\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException= [];\r\n vm.showAllClientExceptionOrg =[];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){ \r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]); \r\n // }\r\n // });\r\n\r\n for(var i=0; i<vm.exceptionTable.data.length; i++){ \r\n if(vm.exceptionTable.data[i].aprrover_level == 'All Clients'){\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n } \r\n }\r\n\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n \r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){ \r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"origincity\": \r\n return item['origincity'] ? \r\n item['origincity']+' <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> '+' '+item['destinationcity']\r\n : '---';\r\n case \"bol\":\r\n return item[field] ? item[field] : '---';\r\n case \"unseen_discussion_count_csl\": \r\n\r\n if(item['unseen_discussion_count'] != null && item['unseen_discussion_count'] != 0){\r\n if(item['unseen_discussion_count'] <= 9){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count-less\">'+item['unseen_discussion_count']+'</span>'\r\n }else if(item['unseen_discussion_count'] >= 10){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count\">'+'9+'+'</span>'\r\n }\r\n }else{\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count discussion-visibility\">00</span>'\r\n }\r\n\r\n case \"status_csl\":\r\n if(item['status'].charAt(0) != null || item['status'].charAt(0) != undefined){\r\n return item['status'].charAt(0).toUpperCase() + item['status'].substr(1).toLowerCase(); \r\n }\r\n \r\n case \"pickupdate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"actual_date\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"duedate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"consigneeapptdate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"status_csl\":\r\n if(item['status'].toLowerCase() == 'undelivered'){ return \"discussion_undelivered\"; }\r\n if(item['status'].toLowerCase() == 'planned'){ return \"discussion_booked\"; }\r\n if(item['status'].toLowerCase() == 'delivered'){ return \"discussion_delivered\"; }\r\n case \"pro\":\r\n if(field == 'pro'){ return \"awb-bol-number\"; } \r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index){ \r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length){\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].aprrover_level==\"All Clients\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected){\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if(($state.current.name=='lensgroup') || ($state.current.name == 'showUser')||($state.current.name == 'showCompany')){\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.aprrover_level=='All Clients'){\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers(){\r\n }\r\n }\r\n})(); \n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('DiscussionShipmentsCfsService', DiscussionShipmentsCfsService);\r\n\r\n /** @ngInject */\r\n DiscussionShipmentsCfsService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function DiscussionShipmentsCfsService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var isEmpty = true,\r\n exception = getExceptionObject(),\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n changeStatusException: changeStatusException,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n getExceptionObject : getExceptionObject,\r\n sendEmailException : sendEmailException,\r\n getException : getException,\r\n getExceptionDetails: function() { return exception; },\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getShipmentDiscussions : getShipmentDiscussions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a exception\r\n // // ------------------\r\n function getException(id){\r\n try{\r\n exception = getExceptionObject();\r\n return $http.get(api.url_v2 + '/cfs/exceptions/'+ id/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n //console.log(response);\r\n unpackageException(response.data);\r\n //console.log(user);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Do something else;\r\n }\r\n exception = null;\r\n });\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function unpackageException(exception_data){\r\n for (var field in exception_data){\r\n exception[field] = exception_data[field];\r\n }\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getShipmentDiscussions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function changeStatusException(params,id,type){\r\n try{\r\n var query = params;\r\n var url = api.url_v2 +'/cfs/exceptions/'+ id;\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n if(type == 'end-live'){\r\n loading = true;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }else{\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }catch(e){\r\n\r\n }\r\n\r\n }\r\n\r\n function sendEmailException(params,id){\r\n var query = params;\r\n var url = api.url_v2 +'/cfs/exceptions/'+id+'/send_exception_emails';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n data :query\r\n }).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", is_active: true};\r\n }\r\n\r\n function getShipmentDiscussions(){\r\n loading = true;\r\n timeoutTid = false;\r\n var url=api.url_v2+\"/user_shipment_discussions?shipment_type=cfs\";\r\n //var url=api.url+\"/shipment_discussions_unread\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.length);\r\n exceptionTable.settings({data: response.data});\r\n exceptionTable.data = response.data;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", exceptionTable.data);\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response){\r\n var data_settings = response.data.exceptions.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }\r\n }\r\n\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout') \r\n .controller('DiscussionShipmentsCfsController', DiscussionShipmentsCfsController);\r\n DiscussionShipmentsCfsController.$inject = ['$scope', '$window', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'DiscussionShipmentsCfsService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper','UserService','ShippingDetailsService'];\r\n function DiscussionShipmentsCfsController($scope, $window, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, DiscussionShipmentsCfsService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService,ShippingDetailsService){\r\n var vm = this; \r\n \r\n vm.columns = [ \r\n {\"field\": \"unseen_discussion_count_cfs\", \"title\": 'DISCUSSIONS', \"sortable\": \"unseen_discussion_count\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pro\", \"title\": 'PRO #', \"sortable\": \"pro\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"bol\", \"title\": 'BOOKING', \"sortable\": \"bol\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"origincity\", \"title\": 'ORIG. <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> DEST.', \"sortable\": \"origincity\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pickupdate\", \"title\": 'START DATE', \"sortable\": \"pickupdate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"duedate\", \"title\": 'DUE DATE', \"sortable\": \"duedate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"consigneeapptdate\", \"title\": 'EST. DELIVERY', \"sortable\": \"consigneeapptdate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"cfsflags\", \"title\": 'EXC.', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"status_cfs\", \"title\": 'STATUS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false} \r\n ]; \r\n \r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n //{id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n \r\n\r\n vm.icon=\"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false; \r\n vm.getMatch = getMatch; \r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = DiscussionShipmentsCfsService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField; \r\n vm.getClass = getClass; \r\n vm.checkAll = checkAll; \r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.cancelException = cancelException;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions; \r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.showRejectModal = showRejectModal;\r\n vm.showEndModal = showEndModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete; \r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose; \r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.possibleContacts = []; \r\n vm.link = {field: \"id\", column: \"name\", url: \"cfs-exceptions\"};\r\n vm.gotoSelectUser = gotoSelectUser;\r\n $rootScope.isLoading = true;\r\n vm.user = UserService.getUserData();\r\n vm.rejectSubmit = rejectSubmit;\r\n vm.endExceptionSubmit = endExceptionSubmit;\r\n vm.approveException = approveException;\r\n vm.textCustType = false;\r\n vm.textEndedType = false;\r\n vm.endException = endException;\r\n vm.reOpenException = reOpenException;\r\n vm.cancelEndException = cancelEndException;\r\n vm.cancelOpenException = cancelOpenException;\r\n vm.changeEndExceptionStatus = changeEndExceptionStatus;\r\n vm.changeOpenExceptionStatus = changeOpenExceptionStatus;\r\n vm.viewShipment = viewShipment;\r\n vm.logsVisible = logsVisible;\r\n //vm.clearAll = clearAll; \r\n vm.user = UserService.getUserData();\r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n vm.gotoShipment = gotoShipment;\r\n\r\n\r\n vm.logsVisible(); \r\n\r\n vm.getUser = function(){\r\n if (vm.user.first_name || vm.user.last_name){\r\n return (vm.user.first_name?vm.user.first_name:\"\")+\" \"+(vm.user.last_name?vm.user.last_name:\"\");\r\n } else {\r\n return vm.user.email;\r\n }\r\n };\r\n\r\n if($state.current.name =='cfsExceptions'){\r\n vm.viewExceptionText = true;\r\n } \r\n\r\n switch ($state.current.name){ \r\n\r\n case 'vieCFSExceptions':\r\n vm.isCreate = false; \r\n vm.saveBtnShowNew = true;\r\n //Get the exception from the service \r\n try{\r\n vm.exception = DiscussionShipmentsCfsService.getExceptionObject();\r\n DiscussionShipmentsCfsService.getException($stateParams.id).then(function(){\r\n vm.exception = DiscussionShipmentsCfsService.getExceptionDetails();\r\n vm.exception.estimated = vm.exception.estimated_date +\" \"+vm.exception.estimated_time;\r\n vm.exception.actual = vm.exception.actual_date +\" \"+vm.exception.actual_time;\r\n\r\n try{\r\n //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if(JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.CfsException.includes('all_clients_approver')){\r\n vm.readAccess = false;\r\n }else if(JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.CfsException.includes('read') \r\n && !JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.CfsException.includes('approver')){\r\n vm.readAccess = true;\r\n }else\r\n {\r\n if(vm.user.approver_level_company_ids.includes(vm.exception.company_id)){\r\n vm.readAccess = false;\r\n }else{\r\n vm.readAccess = true;\r\n }\r\n \r\n }\r\n }\r\n catch(e){\r\n vm.readAccess = false;\r\n }\r\n\r\n\r\n });\r\n }catch(e){\r\n\r\n }\r\n\r\n \r\n break; \r\n\r\n case 'shipmentDiscussionsCfs':\r\n $rootScope.isLoading = true;\r\n var search = $location.search();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n DiscussionShipmentsCfsService.setQuery(search); \r\n\r\n $scope.$on(\"exceptionsTable:stateChanged\", function(event, loading){\r\n $rootScope.isLoading = loading;\r\n }); \r\n $scope.$on\r\n DiscussionShipmentsCfsService.getShipmentDiscussions(); \r\n break;\r\n \r\n } \r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n DiscussionShipmentsCfsService.getShipmentDiscussions(); \r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false; \r\n\r\n vm.addAllClientRow = addAllClientRow; \r\n \r\n function subscribeToTable(tableParams){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n angular.forEach(p2,function(v,k){\r\n if(v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.aprrover_level ==\"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n $scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = DiscussionShipmentsCfsService.getShipmentDiscussions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n } \r\n\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n \r\n $timeout(function () {\r\n vm.tooltipIsLoading = false;\r\n }, 1000); \r\n\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n function gotoShipment(data, field){ \r\n return \"shipping-details-cfs/\"+data['pro'];\r\n }\r\n \r\n\r\n function getSelectedCount() { \r\n return vm.listSelectedCount;\r\n } \r\n\r\n function logsVisible(){\r\n vm.logs_visible = false;\r\n if(vm.exception.log != null)\r\n var logs_empty = typeof vm.exception.log == 'undefined' ? true : !vm.exception.log.length > 0;\r\n \r\n vm.logs_visible = true;\r\n \r\n return !logs_empty; \r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function gotoSelectUser(ev,data){\r\n var lensGroupId = data; \r\n $location.url(\"/cfs-exceptions/\"+data.id); \r\n }\r\n\r\n function viewShipment(number){ \r\n $window.open(\"/shipping-details-cfs/\"+number, '_blank');\r\n }\r\n\r\n\r\n function endException(){\r\n vm.textCustType = true;\r\n }\r\n\r\n function reOpenException(){\r\n vm.textEndedType = true;\r\n }\r\n\r\n function cancelEndException(){\r\n vm.textCustType = false;\r\n }\r\n\r\n function cancelOpenException(){\r\n vm.textEndedType = false;\r\n }\r\n\r\n function rejectSubmit(val,id,status){ \r\n if(val == undefined || val.length == 0){\r\n $scope.reject_reason_check = true;\r\n }else if(val.length > 0){\r\n $scope.reject_reason_check = false;\r\n var params = {};\r\n params.status = status;\r\n params.rejection_reason = val;\r\n\r\n DiscussionShipmentsCfsService.changeStatusException(params,id).then(function(res){\r\n if (!res.errors){\r\n $rootScope.$broadcast('exception_updated',res.log);\r\n vm.closeModal(); \r\n $location.url(\"/cfs-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('rejected-exception.success.html', ''); \r\n },2500);\r\n\r\n\r\n } else {\r\n vm.closeModal(); \r\n }\r\n }).catch(function (error) {\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n }); \r\n } \r\n\r\n }\r\n\r\n function changeEndExceptionStatus(id,status){\r\n var params = {};\r\n\r\n params.status = status; \r\n\r\n DiscussionShipmentsCfsService.changeStatusException(params,id).then(function(res){\r\n if (!res.errors){ \r\n $rootScope.$broadcast('exception_updated',res.log);\r\n $location.url(\"/cfs-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },2500); \r\n } else { \r\n }\r\n }).catch(function (error) {\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n }); \r\n }\r\n\r\n function changeOpenExceptionStatus(id,status){\r\n var params = {};\r\n\r\n params.status = status; \r\n\r\n DiscussionShipmentsCfsService.changeStatusException(params,id).then(function(res){\r\n if (!res.errors){ \r\n $rootScope.$broadcast('exception_updated',res.log);\r\n $location.url(\"/cfs-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },2500); \r\n } else { \r\n }\r\n }).catch(function (error) {\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n });\r\n }\r\n\r\n function endExceptionSubmit(val,id,status){ \r\n \r\n var params = {};\r\n\r\n params.status = status;\r\n params.rejection_reason = val;\r\n\r\n DiscussionShipmentsCfsService.changeStatusException(params,id).then(function(res){\r\n if (!res.errors){\r\n $rootScope.$broadcast('exception_updated',res.log);\r\n vm.closeModal(); \r\n $location.url(\"/cfs-exceptions\"); \r\n } else {\r\n vm.closeModal(); \r\n }\r\n }).catch(function (error) {\r\n showToastWithFile('generic-exception.error.modal.html', error);\r\n });\r\n }\r\n\r\n function approveException(id,status){\r\n var params = {};\r\n\r\n params.status = status; \r\n\r\n DiscussionShipmentsCfsService.changeStatusException(params,id).then(function(res){\r\n if (!res.errors){ \r\n $rootScope.$broadcast('exception_updated',res.log);\r\n $location.url(\"/cfs-exceptions\"); \r\n setTimeout(function(){\r\n showToastWithFile('posted-exception.success.html', ''); \r\n },2500); \r\n } else { \r\n }\r\n });\r\n }\r\n\r\n function bulkDelete(){\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel(); \r\n\r\n var params = {};\r\n params.exception_ids = DiscussionShipmentsCfsService.getSelectedException().map(function(exception){return exception.id;});\r\n\r\n DiscussionShipmentsCfsService.bulkDeleteExceptions(params).then(function(res){\r\n if (!res.errors){\r\n vm.closeModal(); \r\n showToastWithFile('cfs-delete-exception.success.html', ''); \r\n } else {\r\n vm.closeModal(); \r\n }\r\n }); \r\n\r\n } \r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/cfs-'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function showRejectModal(ev, modal){\r\n /* Show the modal */\r\n $scope.reject_reason_check = false;\r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-cfs/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function showEndModal(ev, modal){\r\n /* Show the modal */ \r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-cfs/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function addExceptions(ev,id,status,type){\r\n\r\n if(type == 'end-live'){\r\n $scope.exceptionStatus = 'reopen';\r\n }else if(type == 'reject'){\r\n $scope.exceptionStatus = 'rejected';\r\n }\r\n else{\r\n $scope.exceptionStatus = status;\r\n }\r\n\r\n if(status == 'approve'){\r\n var params = {};\r\n params.status = status; \r\n DiscussionShipmentsCfsService.changeStatusException(params,id,type).then(function(res){\r\n if (!res.errors){ \r\n $rootScope.$broadcast('exception_updated',res.log);\r\n } else { \r\n }\r\n });\r\n }\r\n if(status == 'end'){\r\n var params = {};\r\n params.status = status; \r\n DiscussionShipmentsCfsService.changeStatusException(params,id,type).then(function(res){\r\n if (!res.errors){ \r\n $rootScope.$broadcast('exception_updated',res.log);\r\n } else { \r\n }\r\n });\r\n }\r\n \r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-cfs/add-exception-approvers.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:false,\r\n scope: $scope,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n } \r\n\r\n function cancelException() {\r\n $location.url(\"/cfs-exceptions\"); \r\n }\r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n \r\n function search_exceptions(isClear){\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n DiscussionShipmentsCfsService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query){ \r\n //return CfsExceptionService.autoComplete({field: key, value: query},vm.company);\r\n return DiscussionShipmentsCfsService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function getMatchs(key, query){ \r\n return DiscussionShipmentsCfsService.autoCompletes({field: key, value: query},vm.company); \r\n }\r\n\r\n \r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n } \r\n\r\n function getTable(){ \r\n vm.exceptionTable = DiscussionShipmentsCfsService.getExceptionTable(); \r\n return DiscussionShipmentsCfsService.getExceptionTable(); \r\n }\r\n\r\n function addAllClientRow(exceptionTable,state){\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException= [];\r\n vm.showAllClientExceptionOrg =[];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){ \r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]); \r\n // }\r\n // });\r\n\r\n for(var i=0; i<vm.exceptionTable.data.length; i++){ \r\n if(vm.exceptionTable.data[i].aprrover_level == 'All Clients'){\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n } \r\n }\r\n\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n \r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){ \r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"origincity\":\r\n /*return item['origin'] ? \r\n item['origincountrycode']+' '+item['origincitycode']+' <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> '+item['destinationcountrycode']+' '+item['destinationcitycode']\r\n : '';*/\r\n return item['origincity'] ? \r\n item['origincity']+' <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> '+' '+item['destinationcity']\r\n : '---';\r\n case \"bol\":\r\n return item[field] ? item[field] : '---';\r\n case \"unseen_discussion_count_cfs\":\r\n if(item['unseen_discussion_count'] != null && item['unseen_discussion_count'] != 0){\r\n if(item['unseen_discussion_count'] <= 9){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count-less\">'+item['unseen_discussion_count']+'</span>'\r\n }else if(item['unseen_discussion_count'] >= 10){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count\">'+item['unseen_discussion_count']+'</span>'\r\n }\r\n }else{\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count discussion-visibility\">00</span>'\r\n }\r\n case \"status_cfs\":\r\n return item['status'].charAt(0).toUpperCase() + item['status'].substr(1).toLowerCase(); \r\n case \"pickupdate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"actual_date\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"duedate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"consigneeapptdate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"status_cfs\":\r\n if(item['status'].toLowerCase() == 'undelivered'){ return \"discussion_undelivered\"; }\r\n if(item['status'].toLowerCase() == 'planned'){ return \"discussion_booked\"; }\r\n if(item['status'].toLowerCase() == 'delivered'){ return \"discussion_delivered\"; }\r\n case \"pro\":\r\n if(field == 'pro'){ return \"awb-bol-number\"; } \r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index){ \r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length){\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = exception.selected\r\n //console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].aprrover_level==\"All Clients\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected){\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = selected\r\n //console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if(($state.current.name=='lensgroup') || ($state.current.name == 'showUser')||($state.current.name == 'showCompany')){\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.aprrover_level=='All Clients'){\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers(){\r\n }\r\n }\r\n})(); \n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('DiscussionShipmentsCfsExistService', DiscussionShipmentsCfsExistService);\r\n\r\n /** @ngInject */\r\n DiscussionShipmentsCfsExistService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function DiscussionShipmentsCfsExistService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var exceptionFilterPersist = {}; //used to persist the search\r\n var awaitFilterPersist = {};\r\n exceptionFilterPersist.value = 'all';\r\n awaitFilterPersist.value = 'mine';\r\n\r\n var isEmpty = true,\r\n allFilter = 'all',\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n unpackageExceptions: unpackageExceptions,\r\n getExceptionObject : getExceptionObject,\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n getExceptionFilterPersist: function() {\r\n return exceptionFilterPersist;\r\n },\r\n getAllFilter: function(){\r\n return allFilter;\r\n },\r\n setAllFilter: function(filter){\r\n allFilter = filter;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getShipmentDiscussions : getShipmentDiscussions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function unpackageExceptions(response,filter){\r\n try{\r\n if(allFilter == 'all'){\r\n var res = response.data.exceptions.all;\r\n }\r\n if(allFilter == 'expired'){\r\n var res = response.data.exceptions.expired;\r\n }\r\n if(allFilter == 'ended'){\r\n var res = response.data.exceptions.ended;\r\n }\r\n if(allFilter == 'live'){\r\n var res = response.data.exceptions.live;\r\n }\r\n if(allFilter == 'rejected'){\r\n var res = response.data.exceptions.rejected;\r\n }\r\n var data_settings = res.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n //user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTableExist:loaded\", data);\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getShipmentDiscussions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true};\r\n }\r\n\r\n function getShipmentDiscussions(){\r\n loading = true;\r\n timeoutTid = false;\r\n var url;\r\n\r\n url=api.url+\"/load_discussion_index?customer_type=cfs\";\r\n //url=api.url+\"/shipment_discussions_bookmarked\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.length);\r\n exceptionTable.settings({data: response.data});\r\n exceptionTable.data = response.data;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTableExist:loaded\", response.data);\r\n\r\n return unpackageExceptions(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout') \r\n .controller('DiscussionShipmentsCfsExistController', DiscussionShipmentsCfsExistController);\r\n DiscussionShipmentsCfsExistController.$inject = ['$scope', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'DiscussionShipmentsCfsExistService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper','UserService','ShippingDetailsService'];\r\n function DiscussionShipmentsCfsExistController($scope, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, DiscussionShipmentsCfsExistService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService,ShippingDetailsService){\r\n var vm = this; \r\n \r\n vm.columns = [ \r\n {\"field\": \"unseen_discussion_count_cfs\", \"title\": 'DISCUSSIONS', \"sortable\": \"unseen_discussion_count\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pro\", \"title\": 'PRO #', \"sortable\": \"pro\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"bol\", \"title\": 'BOOKING', \"sortable\": \"bol\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"origincity\", \"title\": 'ORIG. <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> DEST.', \"sortable\": \"origincity\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"pickupdate\", \"title\": 'START DATE', \"sortable\": \"pickupdate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"duedate\", \"title\": 'DUE DATE', \"sortable\": \"duedate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"consigneeapptdate\", \"title\": 'EST. DELIVERY', \"sortable\": \"consigneeapptdate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"cfsflags\", \"title\": 'EXC.', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"status_cfs\", \"title\": 'STATUS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false} \r\n ]; \r\n \r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n //{id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n vm.exceptionFilter = DiscussionShipmentsCfsExistService.getExceptionFilterPersist();\r\n vm.counts = {all: {all: 0, live: 0, expired: 0, ended: 0, rejected: 0}}; \r\n vm.icon=\"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false; \r\n vm.getMatch = getMatch; \r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = DiscussionShipmentsCfsExistService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField; \r\n vm.getClass = getClass; \r\n vm.checkAll = checkAll; \r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions; \r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete; \r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose; \r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.possibleContacts = []; \r\n vm.setFilter = setFilter;\r\n vm.isLoading = {account: false, role: false, contact: false, table: true};\r\n $rootScope.isLoadingExist = true;\r\n vm.link = {field: \"id\", column: \"name\", url: \"cfs-exceptions\"}; \r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n vm.gotoShipment = gotoShipment;\r\n\r\n //vm.clearAll = clearAll; \r\n\r\n if($state.current.name =='shipmentDiscussions'){\r\n vm.viewExceptionText = true;\r\n } \r\n \r\n switch ($state.current.name){\r\n\r\n case 'vieCFSExceptions':\r\n vm.isCreate = false;\r\n vm.isLoading.account = true;\r\n vm.saveBtnShowNew = true; \r\n break; \r\n\r\n case 'shipmentDiscussionsCfs':\r\n $rootScope.isLoadingExist = true;\r\n vm.exceptionFilter.value = 'all';\r\n var search = $location.search();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n DiscussionShipmentsCfsExistService.setQuery(search);\r\n $scope.$on(\"exceptionsTableExist:stateChanged\", function(event, loading){\r\n $rootScope.isLoadingExist = loading;\r\n });\r\n $scope.$on(\"exceptionsTableExist:loaded\", function(event, data){\r\n try{\r\n $rootScope.all = data.all_count;\r\n $rootScope.expired = data.expired_count;\r\n $rootScope.live = data.live_count;\r\n $rootScope.ended = data.ended_count;\r\n $rootScope.rejected = data.rejected_count; \r\n }catch(e){\r\n \r\n }\r\n });\r\n $scope.$on\r\n DiscussionShipmentsCfsExistService.getShipmentDiscussions();\r\n vm.exceptionTable = DiscussionShipmentsCfsExistService.getExceptionTable();\r\n break;\r\n \r\n } \r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n DiscussionShipmentsCfsExistService.getShipmentDiscussions(); \r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false; \r\n\r\n vm.addAllClientRow = addAllClientRow; \r\n \r\n function subscribeToTable(tableParams){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n angular.forEach(p2,function(v,k){\r\n if(v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.aprrover_level ==\"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n $scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = DiscussionShipmentsCfsExistService.getShipmentDiscussions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n } \r\n\r\n\r\n function setFilter(filter, mode) {\r\n vm.exceptionFilter.value = filter;\r\n $rootScope.filterValue = filter;\r\n DiscussionShipmentsCfsExistService.setAllFilter(filter);\r\n $rootScope.isLoadingExist = true;\r\n DiscussionShipmentsCfsExistService.getShipmentDiscussions(filter);\r\n }\r\n\r\n function gotoShipment(data, field){ \r\n return \"shipping-details-cfs/\"+data['pro'];\r\n }\r\n \r\n\r\n function getSelectedCount() { \r\n return vm.listSelectedCount;\r\n } \r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n \r\n $timeout(function () {\r\n vm.tooltipIsLoading = false;\r\n }, 1000); \r\n\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n\r\n function bulkDelete(){\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel(); \r\n\r\n var params = {};\r\n params.exception_ids = DiscussionShipmentsCfsExistService.getSelectedException().map(function(exception){return exception.id;});\r\n\r\n DiscussionShipmentsCfsExistService.bulkDeleteExceptions(params).then(function(res){\r\n if (!res.errors){\r\n vm.closeModal(); \r\n showToastWithFile('cfs-delete-exception.success.html', ''); \r\n } else {\r\n vm.closeModal(); \r\n }\r\n }); \r\n\r\n } \r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/cfs-'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n } \r\n\r\n function addExceptions(ev){\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/cfs_exceptions/add-exception.html',\r\n parent: angular.element(document.body),\r\n\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n } \r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n \r\n function search_exceptions(isClear){\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n DiscussionShipmentsCfsExistService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query){ \r\n //return CfsExceptionService.autoComplete({field: key, value: query},vm.company);\r\n return DiscussionShipmentsCfsExistService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function getMatchs(key, query){ \r\n return DiscussionShipmentsCfsExistService.autoCompletes({field: key, value: query},vm.company); \r\n }\r\n\r\n \r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n } \r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n } \r\n\r\n function getTable(){ \r\n vm.exceptionTable = DiscussionShipmentsCfsExistService.getExceptionTable(); \r\n return DiscussionShipmentsCfsExistService.getExceptionTable(); \r\n }\r\n\r\n function addAllClientRow(exceptionTable,state){\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException= [];\r\n vm.showAllClientExceptionOrg =[];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){ \r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]); \r\n // }\r\n // });\r\n\r\n for(var i=0; i<vm.exceptionTable.data.length; i++){ \r\n if(vm.exceptionTable.data[i].aprrover_level == 'All Clients'){\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n } \r\n }\r\n\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException); \r\n }\r\n else{\r\n vm.showAllClientException= []; \r\n }\r\n \r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){ \r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"origincity\": \r\n return item['origincity'] ? \r\n item['origincity']+' <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> '+' '+item['destinationcity']\r\n : '---';\r\n case \"bol\":\r\n return item[field] ? item[field] : '---';\r\n case \"unseen_discussion_count_cfs\":\r\n\r\n if(item['unseen_discussion_count'] != null && item['unseen_discussion_count'] != 0){\r\n if(item['unseen_discussion_count'] <= 9){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count-less\">'+item['unseen_discussion_count']+'</span>'\r\n }else if(item['unseen_discussion_count'] >= 10){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count\">'+item['unseen_discussion_count']+'</span>'\r\n }\r\n }else{\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count discussion-visibility\">00</span>'\r\n }\r\n case \"status_cfs\":\r\n return item['status'].charAt(0).toUpperCase() + item['status'].substr(1).toLowerCase(); \r\n case \"pickupdate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"actual_date\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"duedate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n case \"consigneeapptdate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\"; \r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"status_cfs\":\r\n if(item['status'].toLowerCase() == 'undelivered'){ return \"discussion_undelivered\"; }\r\n if(item['status'].toLowerCase() == 'planned'){ return \"discussion_booked\"; }\r\n if(item['status'].toLowerCase() == 'delivered'){ return \"discussion_delivered\"; }\r\n case \"pro\":\r\n if(field == 'pro'){ return \"awb-bol-number\"; } \r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index){ \r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length){\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = exception.selected\r\n //console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].aprrover_level==\"All Clients\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected){\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = selected\r\n //console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if(($state.current.name=='lensgroup') || ($state.current.name == 'showUser')||($state.current.name == 'showCompany')){\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.aprrover_level=='All Clients'){\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers(){\r\n }\r\n }\r\n})(); \n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('DiscussionShipmentsService', DiscussionShipmentsService);\r\n\r\n /** @ngInject */\r\n DiscussionShipmentsService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function DiscussionShipmentsService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var isEmpty = true,\r\n exception = getExceptionObject(),\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n changeStatusException: changeStatusException,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n getExceptionObject : getExceptionObject,\r\n sendEmailException : sendEmailException,\r\n getException : getException,\r\n getExceptionDetails: function() { return exception; },\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getShipmentDiscussions : getShipmentDiscussions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a exception\r\n // // ------------------\r\n function getException(id){\r\n try{\r\n exception = getExceptionObject();\r\n return $http.get(api.url_v2 + '/csl/exceptions/'+ id/*, {timeout: deferred.promise}*/)\r\n .then(function onSuccess(response){\r\n //// console.log(response);\r\n unpackageException(response.data);\r\n //// console.log(user);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Do something else;\r\n }\r\n exception = null;\r\n });\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function unpackageException(exception_data){\r\n for (var field in exception_data){\r\n exception[field] = exception_data[field];\r\n }\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getShipmentDiscussions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function changeStatusException(params,id,type){\r\n try{\r\n var query = params;\r\n var url = api.url_v2 +'/csl/exceptions/'+ id;\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n if(type == 'end-live'){\r\n loading = true;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }else{\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTable:endChanged\", loading);\r\n }\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }catch(e){\r\n\r\n }\r\n\r\n }\r\n\r\n function sendEmailException(params,id){\r\n var query = params;\r\n var url = api.url_v2 +'/csl/exceptions/'+id+'/send_exception_emails';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'PUT',\r\n url:url,\r\n data :query\r\n }).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", is_active: true};\r\n }\r\n\r\n function getShipmentDiscussions(){\r\n loading = true;\r\n timeoutTid = false;\r\n var url;\r\n\r\n url=api.url_v2+\"/user_shipment_discussions?shipment_type=cww\";\r\n //var url=api.url+\"/shipment_discussions_unread\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.length);\r\n exceptionTable.settings({data: response.data});\r\n exceptionTable.data = response.data;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTable:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTable:loaded\", exceptionTable.data);\r\n return exceptionTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n function unpackageUsers(response){\r\n var data_settings = response.data.exceptions.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }\r\n\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('DiscussionShipmentsController', DiscussionShipmentsController);\r\n DiscussionShipmentsController.$inject = ['$scope', '$window', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'DiscussionShipmentsService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper','UserService','ShippingDetailsService'];\r\n function DiscussionShipmentsController($scope, $window, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, DiscussionShipmentsService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService,ShippingDetailsService){\r\n var vm = this;\r\n\r\n vm.columns = [\r\n {\"field\": \"unseen_discussion_count_cww\", \"title\": 'DISCUSSIONS', \"sortable\": \"unseen_discussion_count\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"awb\", \"title\": 'AWB/BOL #', \"sortable\": \"awb\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"bookingnumber_cww\", \"title\": 'BOOKING', \"sortable\": \"bookingnumber\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"origin\", \"title\": 'ORIG. <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> DEST.', \"sortable\": \"origin\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"shipdate\", \"title\": 'START DATE', \"sortable\": \"shipdate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"duedate\", \"title\": 'DUE DATE', \"sortable\": \"duedate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"estimateddate\", \"title\": 'EST. DELIVERY', \"sortable\": \"estimateddate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"flags\", \"title\": 'EXC.', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"status_cww\", \"title\": 'STATUS', \"sortable\": \"status\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n ];\r\n\r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n //{id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n\r\n\r\n vm.icon=\"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n vm.getMatch = getMatch;\r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = DiscussionShipmentsService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.getClass = getClass;\r\n vm.checkAll = checkAll;\r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.showRejectModal = showRejectModal;\r\n vm.showEndModal = showEndModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.possibleContacts = [];\r\n vm.link = {field: \"id\", column: \"name\", url: \"csl-exceptions\"};\r\n vm.gotoSelectUser = gotoSelectUser;\r\n $rootScope.isLoading = true;\r\n vm.user = UserService.getUserData();\r\n vm.textCustType = false;\r\n vm.textEndedType = false;\r\n vm.endException = endException;\r\n vm.reOpenException = reOpenException;\r\n vm.cancelEndException = cancelEndException;\r\n vm.cancelOpenException = cancelOpenException;\r\n vm.viewShipment = viewShipment;\r\n vm.logsVisible = logsVisible;\r\n //vm.clearAll = clearAll;\r\n vm.user = UserService.getUserData();\r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n vm.gotoShipment = gotoShipment;\r\n\r\n\r\n\r\n vm.logsVisible();\r\n\r\n vm.userName = '';\r\n if(vm.user){\r\n if (vm.user.first_name || vm.user.last_name){\r\n vm.userName = (vm.user.first_name?vm.user.first_name:\"\")+\" \"+(vm.user.last_name?vm.user.last_name:\"\");\r\n } else {\r\n vm.userName = vm.user.email;\r\n }\r\n }\r\n\r\n\r\n vm.getUser = function(){\r\n if (vm.user.first_name || vm.user.last_name){\r\n return (vm.user.first_name?vm.user.first_name:\"\")+\" \"+(vm.user.last_name?vm.user.last_name:\"\");\r\n } else {\r\n return vm.user.email;\r\n }\r\n };\r\n\r\n if($state.current.name =='cslExceptions'){\r\n vm.viewExceptionText = true;\r\n }\r\n\r\n switch ($state.current.name){\r\n\r\n case 'vieCSLExceptions':\r\n vm.isCreate = false;\r\n vm.saveBtnShowNew = true;\r\n //Get the exception from the service\r\n try{\r\n vm.exception = DiscussionShipmentsService.getExceptionObject();\r\n DiscussionShipmentsService.getException($stateParams.id).then(function(){\r\n vm.exception = DiscussionShipmentsService.getExceptionDetails();\r\n vm.exception.estimated = vm.exception.estimated_date +\" \"+vm.exception.estimated_time;\r\n vm.exception.actual = vm.exception.actual_date +\" \"+vm.exception.actual_time;\r\n\r\n try{\r\n //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if(JSON.parse(localStorage.getItem(\"user\")).permissions.csl.CslException.includes('all_clients_approver')){\r\n vm.readAccess = false;\r\n }else if(JSON.parse(localStorage.getItem(\"user\")).permissions.csl.CslException.includes('read')\r\n && !JSON.parse(localStorage.getItem(\"user\")).permissions.csl.CslException.includes('approver')){\r\n vm.readAccess = true;\r\n }else\r\n {\r\n if(vm.user.approver_level_company_ids.includes(vm.exception.company_id)){\r\n vm.readAccess = false;\r\n }else{\r\n vm.readAccess = true;\r\n }\r\n\r\n }\r\n }\r\n catch(e){\r\n vm.readAccess = false;\r\n }\r\n\r\n\r\n });\r\n }catch(e){\r\n\r\n }\r\n\r\n\r\n break;\r\n\r\n case 'shipmentDiscussions':\r\n $rootScope.isLoading = true;\r\n var search = $location.search();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n DiscussionShipmentsService.setQuery(search);\r\n\r\n $scope.$on(\"exceptionsTable:stateChanged\", function(event, loading){\r\n $rootScope.isLoading = loading;\r\n });\r\n $scope.$on\r\n DiscussionShipmentsService.getShipmentDiscussions();\r\n break;\r\n\r\n }\r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n DiscussionShipmentsService.getShipmentDiscussions();\r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n vm.addAllClientRow = addAllClientRow;\r\n\r\n function subscribeToTable(tableParams){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n angular.forEach(p2,function(v,k){\r\n if(v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException);\r\n }\r\n else{\r\n vm.showAllClientException= [];\r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.aprrover_level ==\"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n $scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = DiscussionShipmentsService.getShipmentDiscussions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n }\r\n\r\n\r\n function gotoShipment(data, field){\r\n return \"shipping-details/\"+data['gshpid'];\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n var codeArray = [];\r\n var descArray = [];\r\n resp.exceptions.forEach(function(item, index, array){\r\n if(!codeArray.includes(item.code)){\r\n codeArray.push(item.code);\r\n }\r\n if(!descArray.includes(item.description)){\r\n descArray.push(item.description);\r\n }\r\n });\r\n vm.response = {\"code\": codeArray.join(\", \"), \"description\": descArray.join(\", \")};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n\r\n function getSelectedCount() {\r\n return vm.listSelectedCount;\r\n }\r\n\r\n function logsVisible(){\r\n vm.logs_visible = false;\r\n if(vm.exception.log != null)\r\n var logs_empty = typeof vm.exception.log == 'undefined' ? true : !vm.exception.log.length > 0;\r\n\r\n vm.logs_visible = true;\r\n\r\n return !logs_empty;\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function gotoSelectUser(ev,data){\r\n var lensGroupId = data;\r\n $location.url(\"/csl-exceptions/\"+data.id);\r\n }\r\n\r\n function viewShipment(number){\r\n $window.open(\"/shipping-details-csl/\"+number, '_blank');\r\n }\r\n\r\n\r\n function endException(){\r\n vm.textCustType = true;\r\n }\r\n\r\n function reOpenException(){\r\n vm.textEndedType = true;\r\n }\r\n\r\n function cancelEndException(){\r\n vm.textCustType = false;\r\n }\r\n\r\n function cancelOpenException(){\r\n vm.textEndedType = false;\r\n }\r\n\r\n function bulkDelete(){\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel();\r\n\r\n var params = {};\r\n params.exception_ids = DiscussionShipmentsService.getSelectedException().map(function(exception){return exception.id;});\r\n\r\n DiscussionShipmentsService.bulkDeleteExceptions(params).then(function(res){\r\n if (!res.errors){\r\n vm.closeModal();\r\n showToastWithFile('delete-exception.success.html', '');\r\n } else {\r\n vm.closeModal();\r\n }\r\n });\r\n\r\n }\r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showRejectModal(ev, modal){\r\n /* Show the modal */\r\n $scope.reject_reason_check = false;\r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-csl/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function showEndModal(ev, modal){\r\n /* Show the modal */\r\n $scope.exception_id = $stateParams.id;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/exceptions-csl/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function search_exceptions(isClear){\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n DiscussionShipmentsService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query){\r\n //return CslExceptionService.autoComplete({field: key, value: query},vm.company);\r\n return DiscussionShipmentsService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function getMatchs(key, query){\r\n return DiscussionShipmentsService.autoCompletes({field: key, value: query},vm.company);\r\n }\r\n\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n }\r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function getTable(){\r\n vm.exceptionTable = DiscussionShipmentsService.getExceptionTable();\r\n return DiscussionShipmentsService.getExceptionTable();\r\n }\r\n\r\n function addAllClientRow(exceptionTable,state){\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException= [];\r\n vm.showAllClientExceptionOrg =[];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){\r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]);\r\n // }\r\n // });\r\n\r\n for(var i=0; i<vm.exceptionTable.data.length; i++){\r\n if(vm.exceptionTable.data[i].aprrover_level == 'All Clients'){\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n }\r\n }\r\n\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException);\r\n }\r\n else{\r\n vm.showAllClientException= [];\r\n }\r\n\r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"origin\":\r\n /*return item['origin'] ?\r\n item['origincountrycode']+' '+item['origincitycode']+' <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> '+item['destinationcountrycode']+' '+item['destinationcitycode']\r\n : '';*/\r\n return item['origin'] ?\r\n item['origincitycode']+' <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> '+' '+item['destinationcitycode']\r\n : '---';\r\n case \"bookingnumber_cww\":\r\n return item['bookingnumber'] ? item['bookingnumber'] : '---';\r\n case \"unseen_discussion_count_cww\":\r\n if(item['unseen_discussion_count'] != null && item['unseen_discussion_count'] != 0){\r\n if(item['unseen_discussion_count'] <= 9){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count-less\">'+item['unseen_discussion_count']+'</span>'\r\n }else if(item['unseen_discussion_count'] >= 10){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count\">'+'9+'+'</span>'\r\n }\r\n }else{\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count discussion-visibility\">00</span>'\r\n }\r\n case \"status_cww\":\r\n if(item['status'].charAt(0) != null || item['status'].charAt(0) != undefined){\r\n return item['status'].charAt(0).toUpperCase() + item['status'].substr(1).toLowerCase();\r\n }\r\n case \"shipdate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\";\r\n case \"actual_date\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\";\r\n case \"duedate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\";\r\n case \"estimateddate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\";\r\n default:\r\n return item[field];\r\n }\r\n }\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"status_cww\":\r\n if(item['status'].toLowerCase() == 'undelivered'){ return \"discussion_undelivered\"; }\r\n if(item['status'].toLowerCase() == 'booked'){ return \"discussion_booked\"; }\r\n if(item['status'].toLowerCase() == 'delivered'){ return \"discussion_delivered\"; }\r\n case \"awb\":\r\n if(field == 'awb'){ return \"awb-bol-number\"; }\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index){\r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length){\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].aprrover_level==\"All Clients\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected){\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if(($state.current.name=='lensgroup') || ($state.current.name == 'showUser')||($state.current.name == 'showCompany')){\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.aprrover_level=='All Clients'){\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers(){\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('DiscussionShipmentsExistService', DiscussionShipmentsExistService);\r\n\r\n /** @ngInject */\r\n DiscussionShipmentsExistService.$inject = ['$state', '$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX', 'DownloadService', 'UserService', '$filter'];\r\n function DiscussionShipmentsExistService($state, $http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api, AJAX, DownloadService, UserService, $filter) {\r\n var exceptionFilterPersist = {}; //used to persist the search\r\n var awaitFilterPersist = {};\r\n exceptionFilterPersist.value = 'all';\r\n awaitFilterPersist.value = 'mine';\r\n\r\n var isEmpty = true,\r\n allFilter = 'all',\r\n loading = false,\r\n exceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n deferred = $q.defer(),\r\n timeoutTid = false;\r\n return {\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n bulkDeleteExceptions : bulkDeleteExceptions,\r\n getSelectedException : getSelectedException,\r\n find : find,\r\n autoComplete : autoComplete,\r\n autoCompletes : autoCompletes,\r\n unpackageExceptions: unpackageExceptions,\r\n getExceptionObject : getExceptionObject,\r\n getExceptionTable: function() {\r\n if($state.current.name.includes('new')){\r\n exceptionTable.settings().data =[];\r\n }\r\n return exceptionTable;\r\n },\r\n getExceptionFilterPersist: function() {\r\n return exceptionFilterPersist;\r\n },\r\n getAllFilter: function(){\r\n return allFilter;\r\n },\r\n setAllFilter: function(filter){\r\n allFilter = filter;\r\n },\r\n addExceptionstable : function(data,count){\r\n\r\n exceptionTable.data.push(data);\r\n if(count >0){\r\n exceptionTable.total(count);\r\n }else{\r\n exceptionTable.total(exceptionTable.data.length);\r\n }\r\n },\r\n setUserAddCheck : setUserAddCheck,\r\n getShipmentDiscussions : getShipmentDiscussions\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function find(key, array) {\r\n // The variable results needs var in this case (without 'var' a global variable is created)\r\n\r\n var results = [];\r\n for (var i = 0; i < array.length; i++) {\r\n if (array[i].toUpperCase().indexOf(key.toUpperCase()) !== -1) {\r\n results.push(array[i]);\r\n }\r\n }\r\n return results;\r\n }\r\n\r\n function unpackageExceptions(response,filter){\r\n try{\r\n if(allFilter == 'all'){\r\n var res = response.data.exceptions.all;\r\n }\r\n if(allFilter == 'expired'){\r\n var res = response.data.exceptions.expired;\r\n }\r\n if(allFilter == 'ended'){\r\n var res = response.data.exceptions.ended;\r\n }\r\n if(allFilter == 'live'){\r\n var res = response.data.exceptions.live;\r\n }\r\n if(allFilter == 'rejected'){\r\n var res = response.data.exceptions.rejected;\r\n }\r\n var data_settings = res.map(function(u, i){\r\n\r\n var user = angular.copy(u);\r\n //user.status = user.is_active ? (user.confirmed ? \"Active\" : \"Unverified\") : \"Inactive\";\r\n return user;\r\n });\r\n exceptionTable.total(response.headers().total);\r\n exceptionTable.settings({data: data_settings });\r\n exceptionTable.data = data_settings; //response.data.users;\r\n isEmpty = exceptionTable.data.length === 0;\r\n exitLoadState();\r\n\r\n return exceptionTable.data;\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n function exitLoadState(data){\r\n loading = false;\r\n $rootScope.$broadcast(\"exceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTableExist:loaded\", data);\r\n }\r\n\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function autoCompletes(query,company){\r\n\r\n if(company.related_party_id_names.length > 0){\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n else{\r\n var dfd = $q.defer();\r\n var autocompletes = company.related_party_id_names.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n var filterVals = find(query.value,company.related_party_id_names);\r\n dfd.resolve(filterVals);\r\n return dfd.promise;\r\n }\r\n }\r\n\r\n function bulkDeleteExceptions(params){\r\n var query = params;\r\n var url = api.url_v2 +'/companies/'+ $stateParams.id + '/exceptions/bulk_delete';\r\n var dfd = $q.defer();\r\n $http({\r\n method:'DELETE',\r\n url:url,\r\n headers :{\r\n \"Content-Type\" : \"application/json\"\r\n },\r\n data :query\r\n }).then(function(response){\r\n getShipmentDiscussions();\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n\r\n }\r\n\r\n\r\n function getSelectedException(){\r\n if(exceptionTable.settings().data){\r\n return exceptionTable.settings().data\r\n .filter(function(exception){\r\n\r\n return exception.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n function setQuery(q){\r\n exceptionTable.filter({});\r\n exceptionTable.filter(q)\r\n exceptionTable.page(1)\r\n exceptionTable.reload();\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n\r\n\r\n function getExceptionObject() {\r\n return {name: \"\", exception_id: \"\", company_id:\"\", default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true};\r\n }\r\n\r\n function getShipmentDiscussions(){\r\n loading = true;\r\n timeoutTid = false;\r\n var url;\r\n\r\n url=api.url_v2+\"/discussion_index\";\r\n //url=api.url+\"/shipment_discussions_bookmarked\";\r\n var promise = $http({url: url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n exceptionTable.total(response.data.length);\r\n exceptionTable.settings({data: response.data});\r\n exceptionTable.data = response.data;\r\n isEmpty = exceptionTable.data.length === 0;\r\n loading = false;\r\n\r\n $rootScope.$broadcast(\"exceptionsTableExist:stateChanged\", loading);\r\n $rootScope.$broadcast(\"exceptionsTableExist:loaded\", response.data);\r\n\r\n return unpackageExceptions(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n run_timeout();\r\n return promise;\r\n }\r\n\r\n // This function times out waiting for a response\r\n function run_timeout(){\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n }\r\n\r\n }\r\n\r\n})();\r\n\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('DiscussionShipmentsExistController', DiscussionShipmentsExistController);\r\n DiscussionShipmentsExistController.$inject = ['$scope', '$rootScope', '$location', '$state', '$stateParams', '$mdDialog', '$mdMedia', '$mdToast', '$mdConstant', '$q', '$http', 'api', 'DiscussionShipmentsExistService', 'ngTableEventsChannel', 'NgTableParams', '$filter', 'mdSelectHelper','UserService','ShippingDetailsService'];\r\n function DiscussionShipmentsExistController($scope, $rootScope, $location, $state, $stateParams, $mdDialog, $mdMedia, $mdToast, $mdConstant, $q, $http, api, DiscussionShipmentsExistService, ngTableEventsChannel, NgTableParam, $filter, mdSelectHelper, UserService,ShippingDetailsService){\r\n var vm = this;\r\n\r\n vm.columns = [\r\n {\"field\": \"unseen_discussion_count_cww\", \"title\": 'DISCUSSIONS', \"sortable\": \"unseen_discussion_count\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"awb\", \"title\": 'AWB/BOL #', \"sortable\": \"awb\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\": \"bookingnumber_cww\", \"title\": 'BOOKING', \"sortable\": \"bookingnumber\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"origin\", \"title\": 'ORIG. <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> DEST.', \"sortable\": \"origin\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"shipdate\", \"title\": 'START DATE', \"sortable\": \"shipdate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"duedate\", \"title\": 'DUE DATE', \"sortable\": \"duedate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"estimateddate\", \"title\": 'EST. DELIVERY', \"sortable\": \"estimateddate\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"flags\", \"title\": 'EXC.', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\": \"status_cww\", \"title\": 'STATUS', \"sortable\": \"status\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n ];\r\n\r\n vm.buttons = [\r\n // {id: 0, action: addExceptions, display: 'USER.ADD_USER', icon: '',lensviewIcon : true},\r\n //{id: 0, action: search_exceptions, display: 'USER.BULK.IMPORT_USERS', icon: '',lensviewIcon : true}\r\n ];\r\n vm.exceptionFilter = DiscussionShipmentsExistService.getExceptionFilterPersist();\r\n vm.counts = {all: {all: 0, live: 0, expired: 0, ended: 0, rejected: 0}};\r\n vm.icon=\"\"\r\n vm.lensviewtable = true;\r\n vm.searchflag = false;\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n vm.getMatch = getMatch;\r\n vm.getMatchs = getMatchs;\r\n vm.formIsValid = formIsValid;\r\n vm.exception = DiscussionShipmentsExistService.getExceptionObject();\r\n vm.getTable = getTable;\r\n vm.getField = getField;\r\n vm.getClass = getClass;\r\n vm.checkAll = checkAll;\r\n vm.selectUser = selectUser;\r\n vm.cancel = cancel;\r\n vm.selected = selected;\r\n vm.shiftSelect = shiftSelect;\r\n vm.resetSelected = resetSelected;\r\n vm.addExceptions = addExceptions;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.searchListData = search_exceptions;\r\n vm.getSelectedCount = getSelectedCount;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.bulkDelete = bulkDelete;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.possibleContacts = [];\r\n vm.setFilter = setFilter;\r\n vm.isLoading = {account: false, role: false, contact: false, table: true};\r\n $rootScope.isLoadingExist = true;\r\n vm.link = {field: \"id\", column: \"name\", url: \"csl-exceptions\"};\r\n vm.getException = getException;\r\n vm.getPotentialException = getPotentialException;\r\n vm.gotoShipment = gotoShipment;\r\n\r\n //vm.clearAll = clearAll;\r\n\r\n if($state.current.name =='shipmentDiscussions'){\r\n vm.viewExceptionText = true;\r\n }\r\n\r\n switch ($state.current.name){\r\n\r\n case 'vieCSLExceptions':\r\n vm.isCreate = false;\r\n vm.isLoading.account = true;\r\n vm.saveBtnShowNew = true;\r\n break;\r\n\r\n case 'shipmentDiscussions':\r\n $rootScope.isLoadingExist = true;\r\n vm.exceptionFilter.value = 'all';\r\n var search = $location.search();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n DiscussionShipmentsExistService.setQuery(search);\r\n $scope.$on(\"exceptionsTableExist:stateChanged\", function(event, loading){\r\n $rootScope.isLoadingExist = loading;\r\n });\r\n $scope.$on(\"exceptionsTableExist:loaded\", function(event, data){\r\n try{\r\n $rootScope.all = data.all_count;\r\n $rootScope.expired = data.expired_count;\r\n $rootScope.live = data.live_count;\r\n $rootScope.ended = data.ended_count;\r\n $rootScope.rejected = data.rejected_count;\r\n }catch(e){\r\n\r\n }\r\n });\r\n $scope.$on\r\n DiscussionShipmentsExistService.getShipmentDiscussions();\r\n vm.exceptionTable = DiscussionShipmentsExistService.getExceptionTable();\r\n break;\r\n\r\n }\r\n\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n\r\n DiscussionShipmentsExistService.getShipmentDiscussions();\r\n\r\n\r\n $scope.$watch(\"globals.tableParams1\", subscribeToTable);\r\n vm.showAllClientException = [];\r\n vm.showAllClientExceptionOrg = [];\r\n vm.currentPage = 0;\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n vm.addAllClientRow = addAllClientRow;\r\n\r\n function subscribeToTable(tableParams){\r\n if($state.current.name=='lensgroup' || $state.current.name =='showCompany' || $state.current.name =='showUser')\r\n vm.showAllClientExceptionFlag = false;\r\n\r\n if (!tableParams) return;\r\n\r\n ngTableEventsChannel.onPagesChanged(function(p1,p2,p3){\r\n angular.forEach(p2,function(v,k){\r\n if(v.current)\r\n vm.currentPage = v.number;\r\n });\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException);\r\n }\r\n else{\r\n vm.showAllClientException= [];\r\n }\r\n var tmp = 0;\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.selected || v.aprrover_level ==\"All Clients\")\r\n tmp++\r\n });\r\n vm.selectAll = (vm.exceptionTable.data.length == tmp && tmp > 0);\r\n }, $scope, tableParams);\r\n }\r\n\r\n\r\n if($state.current.name == 'showCompany'){\r\n\r\n $scope.$watch(function(){ return $location.path() }, function(params1 , params2){\r\n var res = DiscussionShipmentsExistService.getShipmentDiscussions();\r\n res.then(function(dd){\r\n vm.getList = dd;\r\n });\r\n });\r\n }\r\n\r\n\r\n function setFilter(filter, mode) {\r\n vm.exceptionFilter.value = filter;\r\n $rootScope.filterValue = filter;\r\n DiscussionShipmentsExistService.setAllFilter(filter);\r\n $rootScope.isLoadingExist = true;\r\n DiscussionShipmentsExistService.getShipmentDiscussions(filter);\r\n }\r\n\r\n function gotoShipment(data, field){\r\n return \"shipping-details/\"+data['gshpid'];\r\n }\r\n\r\n\r\n function getSelectedCount() {\r\n return vm.listSelectedCount;\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n /* Function for Tooltip exceptions */\r\n function getException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n var codeArray = [];\r\n var descArray = [];\r\n resp.exceptions.forEach(function(item, index, array){\r\n if(!codeArray.includes(item.code)){\r\n codeArray.push(item.code);\r\n }\r\n if(!descArray.includes(item.description)){\r\n descArray.push(item.description);\r\n }\r\n });\r\n vm.response = {\"code\": codeArray.join(\", \"), \"description\": descArray.join(\", \")};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n /* Function for Tooltip potential exceptions */\r\n function getPotentialException(number) {\r\n vm.tooltipIsLoading = true;\r\n ShippingDetailsService.getShipment(number).then(function(resp){\r\n vm.response = {\"title\": resp.potential_exceptions[0].title, \"description\": resp.potential_exceptions[0].description};\r\n vm.tooltipIsLoading = false;\r\n });\r\n }\r\n\r\n\r\n function bulkDelete(){\r\n vm.listSelectedCount = 0;\r\n vm.selectAll = false;\r\n $mdDialog.cancel();\r\n\r\n var params = {};\r\n params.exception_ids = DiscussionShipmentsExistService.getSelectedException().map(function(exception){return exception.id;});\r\n\r\n DiscussionShipmentsExistService.bulkDeleteExceptions(params).then(function(res){\r\n if (!res.errors){\r\n vm.closeModal();\r\n showToastWithFile('delete-exception.success.html', '');\r\n } else {\r\n vm.closeModal();\r\n }\r\n });\r\n\r\n }\r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/modals/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function addExceptions(ev){\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/lensview/csl_exceptions/add-exception.html',\r\n parent: angular.element(document.body),\r\n\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n\r\n });\r\n\r\n }\r\n\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function search_exceptions(isClear){\r\n vm.searchflag = !vm.searchflag;\r\n var search = {};\r\n for (var key in vm.searchData){\r\n if (isClear){\r\n delete vm.searchData[key];\r\n }\r\n else if (vm.searchData[key]){\r\n search[key] = vm.searchData[key];\r\n }\r\n\r\n }\r\n $location.search(search);\r\n DiscussionShipmentsExistService.setQuery(search);\r\n }\r\n\r\n\r\n function getMatch(key, query){\r\n //return CslExceptionService.autoComplete({field: key, value: query},vm.company);\r\n return DiscussionShipmentsExistService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function getMatchs(key, query){\r\n return DiscussionShipmentsExistService.autoCompletes({field: key, value: query},vm.company);\r\n }\r\n\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/lensview/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n }\r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function getTable(){\r\n vm.exceptionTable = DiscussionShipmentsExistService.getExceptionTable();\r\n return DiscussionShipmentsExistService.getExceptionTable();\r\n }\r\n\r\n function addAllClientRow(exceptionTable,state){\r\n vm.exceptionTable.data = exceptionTable;\r\n vm.showAllClientException= [];\r\n vm.showAllClientExceptionOrg =[];\r\n //vm.exceptionTable.data = $filter('orderBy')(vm.exceptionTable.data, 'name');\r\n // angular.forEach(vm.exceptionTable.data, function(v,k){\r\n // if(vm.exceptionTable.data[k].aprrover_level==='All Clients'){\r\n // vm.showAllClientException.push(vm.exceptionTable.data[k]);\r\n // vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[k]);\r\n // }\r\n // });\r\n\r\n for(var i=0; i<vm.exceptionTable.data.length; i++){\r\n if(vm.exceptionTable.data[i].aprrover_level == 'All Clients'){\r\n vm.showAllClientException.push(vm.exceptionTable.data[i]);\r\n vm.showAllClientExceptionOrg.push(vm.exceptionTable.data[i]);\r\n }\r\n }\r\n\r\n if(vm.currentPage<=1){\r\n angular.copy(vm.showAllClientExceptionOrg,vm.showAllClientException);\r\n }\r\n else{\r\n vm.showAllClientException= [];\r\n }\r\n\r\n return vm.exceptionTable.data;\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"origin\":\r\n /*return item['origin'] ?\r\n item['origincountrycode']+' '+item['origincitycode']+' <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> '+item['destinationcountrycode']+' '+item['destinationcitycode']\r\n : '';*/\r\n return item['origin'] ?\r\n item['origincitycode']+' <i class=\"material-icons\" style=\"position: relative;top: 3px;font-size:15px;\">arrow_right_alt</i> '+' '+item['destinationcitycode']\r\n : '---';\r\n case \"bookingnumber_cww\":\r\n return item['bookingnumber'] ? item['bookingnumber'] : '---';\r\n case \"unseen_discussion_count_cww\":\r\n\r\n if(item['unseen_discussion_count'] != null && item['unseen_discussion_count'] != 0){\r\n if(item['unseen_discussion_count'] <= 9){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count-less\">'+item['unseen_discussion_count']+'</span>'\r\n }else if(item['unseen_discussion_count'] >= 10){\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count\">'+'9+'+'</span>'\r\n }\r\n }else{\r\n return '<i style=\"color:#bcbcbc;\" class=\"material-icons\">chat</i><span class=\"discussion-count discussion-visibility\">00</span>'\r\n }\r\n\r\n case \"status_cww\":\r\n if(item['status'].charAt(0) != null || item['status'].charAt(0) != undefined){\r\n return item['status'].charAt(0).toUpperCase() + item['status'].substr(1).toLowerCase();\r\n }\r\n case \"shipdate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\";\r\n case \"actual_date\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\";\r\n case \"duedate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\";\r\n case \"estimateddate\":\r\n return item[field] ? $filter('date')(item[field], \"dd-MMM-yyyy\") : \"---\";\r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"status_cww\":\r\n if(item['status'].toLowerCase() == 'undelivered'){ return \"discussion_undelivered\"; }\r\n if(item['status'].toLowerCase() == 'booked'){ return \"discussion_booked\"; }\r\n if(item['status'].toLowerCase() == 'delivered'){ return \"discussion_delivered\"; }\r\n case \"awb\":\r\n if(field == 'awb'){ return \"awb-bol-number\"; }\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function selected(index){\r\n vm.lastSelected = index;\r\n if (vm.exceptionTable.data.length){\r\n vm.lastSelectedValue = vm.exceptionTable.data[index].selected;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.exceptionTable.data[i].selected = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function resetSelected(){\r\n vm.selected(0);\r\n vm.lastSelectedValue = true;\r\n vm.exceptionTable.settings().data.map(function(depart){\r\n depart.selected = false;\r\n });\r\n }\r\n\r\n function selectUser($event, index){\r\n\r\n vm.selectAll = false;\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = exception.selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = $filter('filter')(vm.exceptionTable.data, {selected: true}).length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n if(vm.exceptionTable != undefined){\r\n vm.listSelectedCount = count;\r\n\r\n\r\n for (var i = 0; i < vm.exceptionTable.data.length; i++) {\r\n if(vm.exceptionTable.data[i].aprrover_level==\"All Clients\"){\r\n vm.listSelectedCount = count;\r\n //vm.listSelectedCount=vm.listSelectedCount-1;\r\n }\r\n }\r\n }\r\n\r\n else vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function checkAll(selected){\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n });\r\n\r\n\r\n var countLens =[]\r\n vm.exceptionTable.data.map(function(exception){\r\n exception.selected = selected;\r\n vm.getList.map(function(obj){\r\n if(obj.id == exception.id && exception.aprrover_level!=\"All Clients\")\r\n obj.selected = selected\r\n //// console.log(lensGroup.name , lensGroup.id)\r\n })\r\n });\r\n\r\n if(vm.getList.length >0)\r\n countLens = vm.getList;\r\n\r\n var LensCount = countLens.filter(function(allException){\r\n return allException.selected\r\n }).length;\r\n\r\n\r\n var count;\r\n var count1 = LensCount;\r\n var count2 = vm.exceptionTable.data.length;\r\n if(count1 >0){\r\n count = count1;\r\n }\r\n if(count2 > count1){\r\n count = count2;\r\n }\r\n else\r\n {\r\n count = count1;\r\n }\r\n\r\n\r\n\r\n if(selected){\r\n //vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n vm.listSelectedCount = count;\r\n if(($state.current.name=='lensgroup') || ($state.current.name == 'showUser')||($state.current.name == 'showCompany')){\r\n angular.forEach(vm.exceptionTable.data, function(v,k){\r\n if(v.aprrover_level=='All Clients'){\r\n vm.listSelectedCount = vm.listSelectedCount - 1;\r\n v.selected=false;\r\n }\r\n\r\n });\r\n }/*\r\n if(($state.current.name!=='lensgroup') || ($state.current.name !== 'showUser')){\r\n vm.listSelectedCount = vm.exceptionTable.data.length-1;\r\n\r\n }*/\r\n\r\n\r\n\r\n }\r\n else\r\n vm.listSelectedCount = 0;\r\n }\r\n\r\n\r\n function addSectedusers(){\r\n }\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.add\r\n * @description method adds a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.remove\r\n * @description method removes a column to availableColumns\r\n * @param {Object} - column of availableColumns\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.dragListener\r\n * @description method that is the listener for drag events\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.saveToDefault\r\n * @description method saves the layout to default\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.submit\r\n * @description method submits the custom search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.activeSearchChange\r\n * @description method called when the active search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.availableSearchChange\r\n * @description method called when the available search field changes\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.clickedActiveSearchX\r\n * @description method called the X by the activeSearchField is clicked and deletes the value in activeSearchField\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomizeResultsController.clickedAvailableSearchX\r\n * @description method called the X by the availableSearchField is clicked and deletes the value in availableSearchField\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('CustomizePotentialExceptionResultsController', CustomizeResultsController);\r\n\r\n /** @ngInject */\r\n CustomizeResultsController.$inject = ['CustomPotentialResultsService', '$log', '$mdDialog', '$window'];\r\n function CustomizeResultsController(CustomPotentialResultsService, $log, $mdDialog, $window) {\r\n \r\n /* variables */\r\n var vm = this;\r\n vm.activeColumns = CustomPotentialResultsService.getActiveColumns();\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.availableColumns = CustomPotentialResultsService.getAvailableColumns();\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns); //used for search of availableColumns\r\n vm.availableSearchField = \"\";\r\n //vm.activeSearchField = \"\";\r\n //need copies of the orignal lists for setting the service back if canceled\r\n vm.activeColumnsCopy = angular.copy(vm.activeColumns);\r\n\r\n vm.colHeight = colHeight();\r\n \r\n /* functions */\r\n vm.cancel = cancel;\r\n vm.add = add;\r\n vm.remove = remove;\r\n vm.dragListener = dragListener;\r\n vm.saveToDefault = saveToDefault;\r\n vm.submit = submit;\r\n //vm.activeSearchChange = activeSearchChange;\r\n vm.availableSearchChange = availableSearchChange;\r\n //vm.clickedActiveSearchX = clickedActiveSearchX;\r\n vm.clickedAvailableSearchX = clickedAvailableSearchX;\r\n\r\n function cancel() {\r\n CustomPotentialResultsService.setActiveColumns(vm.activeColumnsCopy);\r\n $mdDialog.cancel();\r\n }\r\n\r\n colHeight();\r\n function colHeight() {\r\n // console.log($window.innerHeight);\r\n return ($window.innerHeight * 0.5);\r\n }\r\n \r\n //add to the active column\r\n function add(column) {\r\n vm.activeColumns.push(column);\r\n var index = vm.availableColumns.indexOf(column);\r\n vm.availableColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n }\r\n \r\n //remove from the active column\r\n function remove(column) {\r\n //$log.debug(column);\r\n if(column.field != 'workflow_state' && column.field != 'id' && column.field !='title'){\r\n\r\n $log.debug(\"column name: \" + column.name + \" column width: \" + column.width);\r\n vm.availableColumns.push(column);\r\n var index = vm.activeColumns.indexOf(column);\r\n vm.activeColumns.splice(index, 1);\r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns);\r\n\r\n }\r\n \r\n }\r\n \r\n //function for the event when the active column is dragged\r\n function dragListener() {\r\n return {\r\n accept: function (sourceItemHandleScope, destSortableScope) {return true}, //override to determine drag is allowed or not. default is true.\r\n itemMoved: function () { \r\n vm.tempAvailableColumns = angular.copy(vm.availableColumns); \r\n vm.tempActiveColumns = angular.copy(vm.activeColumns);\r\n },\r\n orderChanged: function() {},\r\n allowDuplicates: false //optional param allows duplicates to be dropped.\r\n }\r\n }\r\n \r\n //saves the current custimization to default\r\n function saveToDefault() {\r\n $log.debug(\"save to default: \" + vm.activeColumns);\r\n }\r\n \r\n //the submit button\r\n function submit() {\r\n $log.debug(\"submited \" + vm.activeColumns);\r\n //vm.availableColumns = vm.tempAvailableColumns;\r\n CustomPotentialResultsService.setActiveColumns(vm.activeColumns);\r\n CustomPotentialResultsService.setColumnHeaders(vm.activeColumns); //sends the object\r\n $mdDialog.hide();\r\n }\r\n \r\n //changes the activeColumns to be shown based on what the search field is\r\n // function activeSearchChange() {\r\n // var results = [];\r\n // var lcs = vm.activeSearchField.toLowerCase();\r\n // for (var index = 0; index < vm.tempActiveColumns.length; index++) {\r\n // var name = vm.tempActiveColumns[index].title.toLowerCase();\r\n // if (name.indexOf(lcs) > -1) { //if the string contains the name\r\n // results.push(vm.tempActiveColumns[index]);\r\n // }\r\n // }\r\n // vm.activeColumns = results;\r\n // }\r\n \r\n //changes the availableColumns to be shown based on what the search field is\r\n function availableSearchChange() {\r\n var results = [];\r\n var lcs = vm.availableSearchField.toLowerCase();\r\n for (var index = 0; index < vm.tempAvailableColumns.length; index++) {\r\n var name = vm.tempAvailableColumns[index].title.toLowerCase();\r\n if (name.indexOf(lcs) > -1) { //if the string contains the name\r\n results.push(vm.tempAvailableColumns[index]);\r\n }\r\n }\r\n vm.availableColumns = results;\r\n }\r\n \r\n //clears the active search field\r\n // function clickedActiveSearchX() {\r\n // vm.activeSearchField = '';\r\n // vm.activeSearchChange();\r\n // }\r\n \r\n //clears the available search field\r\n function clickedAvailableSearchX() {\r\n vm.availableSearchField = '';\r\n vm.availableSearchChange();\r\n }\r\n \r\n }\r\n})();\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.setColumnHeaders\r\n * @description sets the headers of the shipments table in track and trace\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name CustomResultsService.getColumnHeaders\r\n * @description gets the column headers variable\r\n */\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.setActiveColumns\r\n* @description setActiveColumns() set the activeColumns variable\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getActiveColumns\r\n* @description getActiveColumns() returns the active columns\r\n*/\r\n\r\n/**\r\n* @ngdoc method\r\n* @name CustomResultsService.getAvailableColumns\r\n* @description getAvailableColumns returns the availableColumns\r\n*/\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('CustomPotentialResultsService', customResultsService);\r\n\r\n /** @ngInject */\r\n customResultsService.$inject = ['$log', '$http'];\r\n function customResultsService($log, $http) {\r\n /* fake data */\r\n //var $translate = $filter('translate');\r\n // function loadColumns(){\r\n // return $http.get('./app/track-trace/customize-results/columns.json').then(function(res){return res.data;});\r\n // //promise = deferred.promise;\r\n // }\r\n\r\n\r\n var columns = [\r\n\r\n {\"field\": \"workflow_state\", \"title\": 'ADMIN.POTENTIAL.STATUS', \"sortable\": \"workflow_state\", \"filter\": {status: '/app/components/crane-table/filterDefault.html'}, \"show\":\"true\", isDate:false ,notstatic:false},\r\n {\"field\":\"id\", \"title\": 'ADMIN.POTENTIAL.ID', \"sortable\": \"id\", \"filter\": {}, \"show\":\"false\", isDate:false ,notstatic:false},\r\n {\"field\":\"title\", \"title\": 'ADMIN.POTENTIAL.TITLE', \"sortable\": \"title\", \"filter\": {}, \"show\":\"false\", isDate:false ,notstatic:true},\r\n {\"field\":\"start_date\", \"title\": 'ADMIN.POTENTIAL.START_TIME', \"sortable\": \"start_date\", \"filter\": {}, \"show\":\"false\", isDate:true ,notstatic:false},\r\n {\"field\":\"end_date\", \"title\": 'ADMIN.POTENTIAL.END_TIME', \"sortable\": \"end_date\", \"filter\": {}, \"show\":\"false\", isDate:true ,notstatic:false},\r\n {\"field\":\"mode\", \"title\": 'ADMIN.POTENTIAL.MODE', \"sortable\": \"mode\", \"filter\": {}, \"show\":\"false\", isDate:false ,notstatic:false},\r\n {\"field\":\"note\", \"title\": 'ADMIN.POTENTIAL.NOTE', \"sortable\": \"note\", \"filter\": {}, \"show\":\"false\", isDate:false,notstatic:true},\r\n {\"field\":\"description\", \"title\": 'ADMIN.POTENTIAL.DESCRIPTION', \"sortable\": \"description\", \"filter\": {}, \"show\":\"false\", isDate:false,notstatic:true},\r\n {\"field\":\"author\", \"title\": 'ADMIN.POTENTIAL.AUTHOR', \"filter\": {}, \"show\":\"false\", isDate:false,notstatic:true},\r\n {\"field\":\"city_code_count\", \"title\": 'ADMIN.POTENTIAL.LOCATIONS', \"filter\": {}, \"show\":\"false\", isDate:false,notstatic:false},\r\n {\"field\":\"source\", \"title\": 'ADMIN.POTENTIAL.SOURCE', \"sortable\": \"source\", \"filter\": {}, \"show\":\"false\", isDate:false,notstatic:true},\r\n {\"field\":\"reviewer_name\", \"title\": 'ADMIN.POTENTIAL.APPROVER', \"filter\": {}, \"show\":\"false\", isDate:false,notstatic:true}\r\n\r\n // {field:\"servicetype\", title: \"SHIPMENT.SERVICETYPE\", sortable: \"servicetype\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"shipdate\", title: 'SHIPMENT.SHIPDATE', sortable: \"shipdate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", isDate: true},\r\n // {field:\"consigneeaddress4\", title: \"SHIPMENT.CONSIGNEEADDRESS4\", sortable: \"consigneeaddress4\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"shipperaddress1\", title: \"SHIPMENT.SHIPPERADDRESS1\", sortable: \"shipperaddress1\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"shipperaddress2\", title: \"SHIPMENT.SHIPPERADDRESS2\", sortable: \"shipperaddress2\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"shipperaddress3\", title: \"SHIPMENT.SHIPPERADDRESS3\", sortable: \"shipperaddress3\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"shipperaddress4\", title: \"SHIPMENT.SHIPPERADDRESS4\", sortable: \"shipperaddress4\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"consigneeaddress1\", title: \"SHIPMENT.CONSIGNEEADDRESS1\", sortable: \"consigneeaddress1\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"consigneeaddress2\", title: \"SHIPMENT.CONSIGNEEADDRESS2\", sortable: \"consigneeaddress2\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"consigneeaddress3\", title: \"SHIPMENT.CONSIGNEEADDRESS3\", sortable: \"consigneeaddress3\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"jobunid\", title: \"SHIPMENT.JOBUNID\", sortable: \"jobunid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true},\r\n // {field:\"isdelivered\", title: \"SHIPMENT.ISDELIVERED\", sortable: \"isdelivered\", filter: {}, show:false, disabled:true, tdClass: \"td-15\", class: \"td-15\"},\r\n // {field:\"departuredate\", title: \"SHIPMENT.DEPARTUREDATE\", sortable: \"departuredate\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", isDate: true},\r\n // {field:\"shipperzipcode\", title: \"SHIPMENT.SHIPPERZIPCODE\", sortable: \"shipperzipcode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"shippername\", title: \"SHIPMENT.SHIPPERNAME\", sortable: \"shippername\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"customername\", title: \"SHIPMENT.CUSTOMERNAME\", sortable: \"customername\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"bookingnumber\", title: \"SHIPMENT.BOOKINGNUMBER\", sortable: \"bookingnumber\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true},\r\n // {field:\"consigneezipcode\", title: \"SHIPMENT.CONSIGNEEZIPCODE\", sortable: \"consigneezipcode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"consigneename\", title: \"SHIPMENT.CONSIGNEENAME\", sortable: \"consigneename\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"servicetypecode\", title: \"SHIPMENT.SERVICETYPECODE\", sortable: \"servicetypecode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true},\r\n // {field:\"gshpid\", title: \"SHIPMENT.GSHPID\", sortable: \"gshpid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true},\r\n // {field:\"shipperpartyid\", title: \"SHIPMENT.SHIPPERPARTYID\", sortable: \"shipperpartyid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true},\r\n // {field:\"awb\", title: \"SHIPMENT.AWB\", sortable: \"awb\", filter: {}, show:true, tdClass: \"td-15\", class: \"td-15\", link_class: \"text-strong\", truncate: true},\r\n // {field:\"origin\", title: \"SHIPMENT.ORIGIN\", sortable: \"origin\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"destination\", title: \"SHIPMENT.DESTINATION\", sortable: \"destination\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"totalchargeableweight\", title: \"SHIPMENT.TOTALCHARGEABLEWEIGHT\", sortable: \"totalchargeableweight\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"consigneepartyid\", title: \"SHIPMENT.CONSIGNEEPARTYID\", sortable: \"consigneepartyid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true},\r\n // {field:\"businesstype\", title: \"SHIPMENT.BUSINESSTYPE\", sortable: \"businesstype\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"consigneecity\", title: \"SHIPMENT.CONSIGNEECITY\", sortable: \"consigneecity\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"totalgrossweight\", title: \"SHIPMENT.TOTALGROSSWEIGHT\", sortable: \"totalgrossweight\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"consigneecountry\", title: \"SHIPMENT.CONSIGNEECOUNTRY\", sortable: \"consigneecountry\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"customergroup\", title: \"SHIPMENT.CUSTOMERGROUP\", sortable: \"customergroup\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"totalpieces\", title: \"SHIPMENT.TOTALPIECES\", sortable: \"totalpieces\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"duedate\", title: \"SHIPMENT.DUEDATE\", sortable: \"duedate\", filter: {}, show:false, tdClass: \"td-15\", class: \"td-15\", isDate: true},\r\n // {field:\"shippercity\", title: \"SHIPMENT.SHIPPERCITY\", sortable: \"shippercity\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"servicelevelcode\", title: \"SHIPMENT.SERVICELEVELCODE\", sortable: \"servicelevelcode\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\", truncate: true},\r\n // {field:\"customerpartyid\", title: \"SHIPMENT.CUSTOMERPARTYID\", sortable: \"customerpartyid\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"},\r\n // {field:\"servicelevel\", title: \"SHIPMENT.SERVICELEVEL\", sortable: \"servicelevel\", filter: {}, show:false, tdClass: \"td-20\", class: \"td-20\"}\r\n ];\r\n\r\n columns.map(function(d){\r\n if (d.field.indexOf('date') !== -1) {\r\n d.filter[d.field] = '/app/track-trace/server-table/filterDate.html';\r\n } else if (d.disabled) {\r\n d.filter[d.field] = '/app/track-trace/server-table/filterStatus.html';\r\n } else {\r\n d.filter[d.field] = '/app/track-trace/server-table/filterDefault.html';\r\n }\r\n })\r\n\r\n var columnHeaders = [];\r\n\r\n var activeColumns = [\r\n // {field:\"isdelivered\", title: \"SHIPMENT.ISDELIVERED\"},\r\n // {field:\"shippername\", title: \"SHIPMENT.SHIPPERNAME\"},\r\n // {field:\"awb\", title: \"SHIPMENT.AWB\"},\r\n // {field:\"shipdate\", title: \"SHIPMENT.SHIPDATE\"},\r\n // {field:\"consigneename\", title: \"SHIPMENT.CONSIGNEENAME\"},\r\n // {field:\"duedate\", title: \"SHIPMENT.DUEDATE\"},\r\n // {field:\"origin\", title: \"SHIPMENT.ORIGIN\"}\r\n {\"field\": \"workflow_state\", \"title\": 'ADMIN.POTENTIAL.STATUS',notstatic:false },\r\n {\"field\":\"id\", \"title\": 'ADMIN.POTENTIAL.ID', \"sortable\": \"id\", notstatic:false},\r\n {\"field\":\"title\", \"title\": 'ADMIN.POTENTIAL.TITLE', \"sortable\": \"title\" ,notstatic:true},\r\n {\"field\":\"start_date\", \"title\": 'ADMIN.POTENTIAL.START_TIME', \"sortable\": \"start_date\",notstatic:false},\r\n {\"field\":\"end_date\", \"title\": 'ADMIN.POTENTIAL.END_TIME', \"sortable\": \"end_date\",notstatic:false},\r\n {\"field\":\"mode\", \"title\": 'ADMIN.POTENTIAL.MODE', \"sortable\": \"mode\",notstatic:false},\r\n {\"field\":\"note\", \"title\": 'ADMIN.POTENTIAL.NOTE', \"sortable\": \"note\",notstatic:true}\r\n ];\r\n\r\n /* functions */\r\n function setColumnHeaders(activeCol) {\r\n columnHeaders.length = 0;\r\n columns.map(function(d){d.show = false});\r\n for (var j in activeColumns){\r\n for (var i in columns) {\r\n if (activeColumns[j].field === columns[i].field){\r\n columns[i].show = true;\r\n columnHeaders.push(columns[i]);\r\n }\r\n }\r\n }\r\n // columnHeaders.unshift({field:\"flag\", title: \"TRACKTRACE.EXCEPTION_HEADER\", show:true, tdClass: \"td-5\", class: \"td-5\"});\r\n }\r\n\r\n function setActiveColumns(activeCol){\r\n activeColumns = activeCol;\r\n }\r\n\r\n setColumnHeaders(activeColumns);\r\n\r\n return {\r\n setColumnHeaders: setColumnHeaders,\r\n getColumnHeaders: function() {\r\n return columnHeaders;\r\n },\r\n setActiveColumns: setActiveColumns,\r\n getActiveColumns: function() {\r\n return activeColumns;\r\n },\r\n getAvailableColumns: function() {\r\n return columns.filter(function(d){\r\n if (!d.show){\r\n return {\r\n field: d.field,\r\n title: d.title\r\n };\r\n }\r\n }).sort(function(a, b) {\r\n return a.title > b.title ? 1 : (a.title < b.title ? -1 : 0);\r\n });\r\n }\r\n };\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .component('logRecord', {\r\n templateUrl: \"/app/admin/create-potential-exceptions/log.html\",\r\n controller: LogDetailController,\r\n bindings: {\r\n data: '<'\r\n }\r\n });\r\n\r\n function LogDetailController(){\r\n var ctrl = this;\r\n\r\n ctrl.processActions = function(actions){\r\n return Object.keys(actions).map(function(key){\r\n return \"<strong>\" + key + \"</strong>\" + \": \" + actions[key]+\"\\n\";\r\n }).join(', ');\r\n }\r\n }\r\n\r\n}) ();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .directive('exceptionForm', exceptionForm)\r\n .controller('ExceptionFormController', ExceptionFormController);\r\n\r\n /** @ngInject */\r\n function exceptionForm() {\r\n var directive = {\r\n restrict: 'E',\r\n templateUrl: '/app/admin/create-potential-exceptions/exception-form.html',\r\n controller: \"ExceptionFormController\",\r\n controllerAs: \"vm\",\r\n scope: {\r\n potential: '=',\r\n editable: '=',\r\n updates: '='\r\n },\r\n link: function(scope){\r\n\r\n }\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n ExceptionFormController.$inject = ['CreatePotentialExceptionsService', 'UserService', \"$rootScope\", '$scope', \"permissions\"];\r\n function ExceptionFormController(CreatePotentialExceptionsService, UserService, $rootScope, $scope, permissions){\r\n\r\n var vm = this;\r\n vm.isAll = false;\r\n vm.isValidator = UserService.canAccess(permissions.potentialExceptions.publish);\r\n vm.isEditable = CreatePotentialExceptionsService.isEditable;\r\n vm.valid = true;\r\n vm.dateNow = new Date();\r\n vm.minDate = \"'\" + (moment().subtract(13, 'months').format('YYYY-MM-DD')) + \"'\"\r\n vm.checkAllModes = checkAllModes;\r\n vm.validateForm = validateForm;\r\n vm.isSubmittedExpire = isSubmittedExpire;\r\n\r\n /* And so his watch begins, because the night is dark and full of terrors */\r\n vm.watch = ['start_date', 'end_date', 'title', 'air', 'sea', 'arrivals', 'departures'];\r\n vm.watch.map(function(field){$scope.$watch('potential.'+field, vm.validateForm);});\r\n\r\n vm.validateForm();\r\n\r\n function validateForm() {\r\n var isValid = true;\r\n if (!$scope.potential){return;}\r\n if (!!$scope.potential.end_date && !!$scope.potential.start_date){\r\n isValid = isValid && /*$scope.potential.end_date > new Date() &&*/ $scope.potential.end_date >= $scope.potential.start_date;\r\n } else {\r\n isValid = false;\r\n }\r\n isValid = isValid && !!$scope.potential.title &&\r\n (!!$scope.potential.air || !!$scope.potential.sea) &&\r\n (!!$scope.potential.arrivals || !!$scope.potential.departures);\r\n $rootScope.$broadcast(\"exceptionForm:formIsValid\", isValid);\r\n }\r\n\r\n function checkAllModes(check){\r\n if (!check){\r\n $scope.potential.sea = $scope.potential.air = true;\r\n } else {\r\n $scope.potential.sea = $scope.potential.air = false;\r\n }\r\n }\r\n\r\n function isSubmittedExpire() {\r\n return $scope.potential ? $scope.potential.workflow_state === 'submitted_expire' : false;\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('CreatePotentialExceptionsService', CreatePotentialExceptionsService);\r\n\r\n /** @ngInject */\r\n CreatePotentialExceptionsService.$inject = ['$http', 'api', '$rootScope', '$q', '$filter', 'permissions', 'UserService']\r\n function CreatePotentialExceptionsService($http, api, $rootScope, $q, $filter, permissions, UserService) {\r\n var isValidator = true, //flag for the permissions of an admin\r\n isStaticMode = false,\r\n ports = [], //the ports that are pulled back from the map\r\n portChips =[], //holds the paginated ports for chips\r\n geocodes = [], // holds the defined shapes for map polygons\r\n selected = {},\r\n portCodeCache = [], // sppeds up dupe checking\r\n mannualPorts = []; /*Edited by Abheesh for storing mannual locations*/\r\n\r\n\r\n var newExceptionDetails = {\r\n status: \"draft\",\r\n title: \"\",\r\n description: \"\",\r\n note: \"\",\r\n source: \"\",\r\n start_date: \"\",\r\n end_date: \"\",\r\n air: false,\r\n sea: false,\r\n land: false,\r\n arrivals: false,\r\n departures: false,\r\n exceptionAuthor: \"\",\r\n shapes: [],\r\n city_codes: []\r\n };\r\n\r\n var exceptionDetails = angular.copy(newExceptionDetails);\r\n\r\n var originalExceptionDetails = angular.copy(exceptionDetails);\r\n var updates = {};\r\n\r\n //--------------------------------\r\n // Reset Service for new exception\r\n // -------------------------------\r\n function resetService(){\r\n ports.length = 0;\r\n portChips.length = 0;\r\n geocodes.length = 0;\r\n selected = {};\r\n portCodeCache.length = 0;\r\n }\r\n\r\n //------------------------------------\r\n // Copies exception A to exception B\r\n //------------------------------------\r\n function copyException(exc_A, exc_B){\r\n if (exc_A && exc_B){\r\n for (var key in exc_A){\r\n exc_B[key] = exc_A[key];\r\n }\r\n }\r\n }\r\n\r\n //-----------------------------------\r\n // Convert server data to local copy\r\n //-----------------------------------\r\n function processData(data){\r\n copyException(data, exceptionDetails);\r\n isStaticMode = exceptionDetails.workflow_state !== 'draft'; //set is static based on the updated data\r\n /* Check for updated fields */\r\n for (var key in newExceptionDetails){\r\n updates[key] = exceptionDetails[key] !== (exceptionDetails.parent ? exceptionDetails.parent[key] : exceptionDetails[key]);\r\n }\r\n\r\n $rootScope.$broadcast(\"potentialException:loaded\", \"\");\r\n\r\n /* Set Dates */\r\n if (data.start_date) {\r\n exceptionDetails.start_date = new Date(data.start_date);\r\n }\r\n if (data.end_date) {\r\n exceptionDetails.end_date = new Date(data.end_date);\r\n }\r\n if (exceptionDetails.parent){\r\n exceptionDetails.parent.start_date = new Date(exceptionDetails.parent.start_date);\r\n exceptionDetails.parent.end_date = new Date(exceptionDetails.parent.end_date);\r\n }\r\n\r\n /* Set selected cities */\r\n selected = {};\r\n if (exceptionDetails.city_codes){\r\n exceptionDetails.city_codes.map(function(d){\r\n selected[d] = true;\r\n });\r\n }\r\n /* Create the fallback copy */\r\n originalExceptionDetails = angular.copy(exceptionDetails);\r\n return exceptionDetails;\r\n }\r\n\r\n //--------------------------------------------------------\r\n // Package exceptionDetails for submission to the server\r\n //--------------------------------------------------------\r\n function exceptionPackage(){\r\n var data = angular.copy(exceptionDetails);\r\n\r\n if (exceptionDetails.start_date){\r\n data.start_date = typeof exceptionDetails.start_date == 'object' ? exceptionDetails.start_date.toJSON() : exceptionDetails.start_date;\r\n }\r\n else {\r\n data.start_date = '';\r\n }\r\n if (exceptionDetails.end_date){\r\n data.end_date = typeof exceptionDetails.end_date == 'object' ? exceptionDetails.end_date.toJSON() : exceptionDetails.end_date;\r\n }\r\n if (data.start_date === null) data.start_date = '';\r\n if (data.end_date === null) data.end_date = '';\r\n\r\n if (data.parent_id === '') data.parent_id = null;\r\n data.shapes = JSON.stringify(geocodes);\r\n data.city_codes = ports.filter(function(d){return d.checkbox;})\r\n .map(function(d){return d.country_city_code;});\r\n data.known_updated_at = data.updated_at;\r\n data.row_version = exceptionDetails.row_version;\r\n return data;\r\n }\r\n\r\n //-----------------------------------------------------------------------------------------------\r\n //sets portChips which the chip are created from given pageNum and perPage and the search filter\r\n //-----------------------------------------------------------------------------------------------\r\n function paginateChips(pageNum, perPage, searchField) {\r\n var lcs, countryCityCode, description;\r\n var tempPorts = [], filteredPorts = [];\r\n portChips.length = 0;\r\n\r\n if (searchField.length > 0) { //if their is a search filter\r\n lcs = searchField.toLowerCase();\r\n for (var index in ports) {\r\n countryCityCode = ports[index].country_city_code.toLowerCase();\r\n description = ports[index].description.toLowerCase();\r\n if (countryCityCode.indexOf(lcs) > -1 || description.indexOf(lcs) > -1) { //if the string contains the searchField\r\n filteredPorts.push(ports[index]);\r\n }\r\n }\r\n tempPorts = filteredPorts;\r\n } else {\r\n tempPorts = ports;\r\n }\r\n\r\n var startPage = perPage * pageNum - perPage;\r\n for(var k = startPage; k < startPage + perPage && k < tempPorts.length; k++) {\r\n portChips.push(tempPorts[k]);\r\n }\r\n var lastPage = Math.ceil(tempPorts.length / perPage);\r\n $rootScope.$broadcast(\"lastPage\", lastPage); //brodcast the lastPage to the controller\r\n }\r\n\r\n return {\r\n\r\n // exportPotentialException: function(){\r\n // // var pe = {};\r\n // // if (fields && fields.length !== 0){\r\n // // pe.columns = fields.map(function(d){return d.field;});\r\n // // }\r\n // // pe.columns = pe.columns || [];\r\n // // if (params){\r\n // // if (params.filter){pe.filter = params.filter;}\r\n // // if (params.sorting){pe.sorting = params.sorting;}\r\n // // }\r\n // var id = exceptionDetails.id\r\n // var csv_date = new Date();\r\n // var promise = $http.get(api.url + '/potential_exceptions/' + id +'/export').then(function(res){\r\n // var anchor = angular.element('<a/>');\r\n // anchor.attr({\r\n // href: 'data:attachment/csv;charset=utf-8,'+ encodeURI(res.data),\r\n // target: '_blank',\r\n // download: moment().format('YYYY-MM-DD') + '-PotentialException'+ id + '.csv'\r\n // })[0].click();\r\n // return res.data;\r\n // });\r\n // return promise;\r\n // },\r\n getException: function(id) {\r\n var promise = $http.get(api.url_v2+'/potential_exceptions/'+id).then(function(res){\r\n return processData(res.data);\r\n });\r\n return promise;\r\n },\r\n postException: function(){\r\n var promise = $http.post(api.url_v2+'/potential_exceptions', exceptionPackage()).then(function(res){\r\n return processData(res.data);\r\n });\r\n return promise;\r\n },\r\n updateException: function(){\r\n ports.filter(function(d){\r\n if (d.checkbox){\r\n return d.id;\r\n }\r\n });\r\n var promise = $http.put(api.url_v2+'/potential_exceptions/'+exceptionDetails.id, exceptionPackage()).then(function(res){\r\n return processData(res.data);\r\n });\r\n return promise;\r\n },\r\n publishException: function(){\r\n var promise = $http.put(api.url_v2+'/potential_exceptions/'+exceptionDetails.id+'/publish', exceptionPackage())\r\n .then(function successCallback(response){\r\n return processData(response.data);\r\n });\r\n return promise;\r\n },\r\n deleteException: function(){\r\n var promise = $http.delete(api.url_v2+'/potential_exceptions/'+exceptionDetails.id).then(function(res){\r\n return res;\r\n });\r\n return promise;\r\n },\r\n getPotentialExceptionShipments: function() { //gets the affected shipments and gshipids\r\n var promise = $http.get(api.url_v2+'/potential_exceptions/' + exceptionDetails.id+'/shipments').then(function(res){\r\n return res.data;\r\n });\r\n return promise;\r\n },\r\n getExceptionDetails: function (isNew) {\r\n if (isNew){\r\n resetService();\r\n exceptionDetails = angular.copy(newExceptionDetails);\r\n isStaticMode = false; //never static on creating new exception\r\n }\r\n return exceptionDetails;\r\n },\r\n getOriginalExceptionDetails: function () {\r\n exceptionDetails = angular.copy(originalExceptionDetails);\r\n return exceptionDetails;\r\n },\r\n getPorts: function () {\r\n return ports;\r\n },\r\n getIsValidator: function () {\r\n return isValidator;\r\n },\r\n getUpdates: function() {\r\n return updates;\r\n },\r\n isChange: function() {\r\n for (var key in exceptionDetails){\r\n if (exceptionDetails[key] !== originalExceptionDetails[key]) { return true;}\r\n }\r\n return false;\r\n },\r\n isEditable: function () {\r\n return !isStaticMode || exceptionDetails.workflow_state === 'draft';\r\n },\r\n toggleIsEditable: function(){\r\n isStaticMode = !isStaticMode;\r\n },\r\n setIsEditable: function(value){\r\n isStaticMode = !value;\r\n },\r\n getTime: function () {\r\n var nums = [];\r\n for (var k = 0; k < 24; k++) {\r\n nums.push(k + \":00\");\r\n }\r\n return nums;\r\n },\r\n checkChips: function(){\r\n ports.map(function(p){\r\n p.checkbox = p.country_city_code in selected;\r\n });\r\n },\r\n unCheckAllChips: function(pageNum, perPage, searchField) {\r\n ports.map(function(p){\r\n p.checkbox = false;\r\n });\r\n //Added by Abheesh\r\n mannualPorts.map(function(p){\r\n p.checkbox = false;\r\n });\r\n paginateChips(pageNum, perPage, searchField);\r\n },\r\n checkAllChips: function(pageNum, perPage, searchField) {\r\n ports.map(function(p){\r\n p.checkbox = true;\r\n });\r\n //Added by Abheesh\r\n mannualPorts.map(function(p){\r\n p.checkbox = true;\r\n });\r\n paginateChips(pageNum, perPage, searchField);\r\n },\r\n getPortChips: function() {\r\n return portChips;\r\n },\r\n resetPorts: function() { //resets the ports so that the service doesn't persist\r\n ports.length = 0;\r\n portChips.length = 0;\r\n },\r\n postShape: function(shapes){\r\n geocodes = shapes;\r\n $rootScope.$broadcast(\"chipsLoading\", true);\r\n var promise = $http.post(api.url_v2+\"/geocodes\", {filters:{shapes_json:JSON.stringify(shapes)}}).then(function(res){\r\n\r\n ports.length = 0;\r\n portCodeCache = [];\r\n // res.data.map(function(d){\r\n // d['checkbox'] = true;\r\n // ports.push(d);\r\n // portCodeCache.push(d.country_city_code);\r\n // });\r\n\r\n if(geocodes.length > 0){\r\n res.data.map(function(d){\r\n d['checkbox'] = true;\r\n ports.push(d);\r\n portCodeCache.push(d.country_city_code);\r\n });\r\n }\r\n\r\n /*Edited by Abheesh*/\r\n angular.forEach(mannualPorts, function(p) {\r\n if (portCodeCache.indexOf(p.country_city_code) === -1) {\r\n ports.push(p);\r\n portCodeCache.push(p.country_city_code);\r\n\r\n\r\n }\r\n });\r\n\r\n\r\n\r\n\r\n paginateChips(1, 30, '');\r\n $rootScope.$broadcast(\"emptySearchField\"); //brodcast to empty searchField\r\n $rootScope.$broadcast(\"resetChips\"); //brodcast reset the chips\r\n $rootScope.$broadcast(\"chipsLoading\", false);\r\n return ports;\r\n });\r\n return promise;\r\n },\r\n /**\r\n * Takes country/city codes and returns geocoded results for them\r\n * @param {array} codes Country/city coddes\r\n * @return {Promise}\r\n */\r\n postCountryCityCodes: function(codes) {\r\n return $http.post(api.url_v2+'/geocodes', {filters:{country_city_codes:codes}}).then(function(res) {\r\n return res.data;\r\n });\r\n },\r\n addPorts: function(_ports_) {\r\n // duplicat prevention\r\n\r\n angular.forEach(_ports_, function(p) {\r\n if (portCodeCache.indexOf(p.country_city_code) === -1) {\r\n ports.push(p);\r\n portCodeCache.push(p.country_city_code);\r\n /*Edited by Abheesh*/\r\n mannualPorts.push(p);\r\n // mannualPortCodeCache.push(p.country_city_code);\r\n\r\n\r\n }\r\n });\r\n paginateChips(1, 30, '');\r\n $rootScope.$broadcast(\"emptySearchField\"); //brodcast to empty searchField\r\n $rootScope.$broadcast(\"resetChips\"); //brodcast reset the chips\r\n },\r\n paginateChips: paginateChips\r\n };\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.getStatus\r\n * @description sets the variables for exceptionStatus and exceptionStatusIcon for front end use\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('CreatePotentialExceptionsController', CreatePotentialExceptionsController)\r\n .constant(\"POTENTIAL\", {\r\n \"DRAFT\": \"draft\",\r\n \"SUBMITTED\": \"submitted\",\r\n \"SUBMITTED_EXPIRE\": \"submitted_expire\",\r\n \"PUBLISHED\": \"published\",\r\n \"ACTION\":{\r\n \"SAVEDRAFT\": \"saveDraft\",\r\n \"SUBMIT\": \"submit\",\r\n \"SAVE\": \"save\",\r\n \"NONE\": \"none\"\r\n }\r\n });\r\n\r\n /** @ngInject */\r\n CreatePotentialExceptionsController.$inject = ['CreatePotentialExceptionsService', '$scope', '$log', '$translate', '$translatePartialLoader', '$location', '$timeout', '$mdDialog', '$mdMedia', '$mdToast', \"$stateParams\", \"$mdpTimePicker\", \"$mdpDatePicker\", '$filter', 'UserService', 'permissions', '$state', '$http', 'POTENTIAL', 'api'];\r\n function CreatePotentialExceptionsController(CreatePotentialExceptionsService, $scope, $log, $translate, $translatePartialLoader, $location, $timeout, $mdDialog, $mdMedia, $mdToast, $stateParams, $mdpTimePicker, $mdpDatePicker, $filter, UserService, permissions, $state, $http, POTENTIAL, api) {\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('admin');\r\n //variables\r\n var vm = this;\r\n vm.isLoading = false;\r\n vm.formIsValid = true;\r\n vm.switchEmail = '';\r\n vm.time = CreatePotentialExceptionsService.getTime();\r\n vm.searchField = '';\r\n vm.locationsSearchField;\r\n vm.ports = CreatePotentialExceptionsService.getPorts();\r\n vm.portChips = CreatePotentialExceptionsService.getPortChips();\r\n vm.pageNum = 1;\r\n vm.perPage = 30;\r\n vm.lastPage = 0;\r\n vm.pageRange = [2, 3, 4]; //values for the pagination buttons\r\n vm.isValidator = UserService.canAccess(permissions.potentialExceptions.publish); //sets whether the form is being used for a validator or not\r\n vm.isEditable = CreatePotentialExceptionsService.isEditable;\r\n vm.isPublished = false; //temporary flag for if the potential exception is already published\r\n vm.isSubmitted = false;\r\n vm.isSubmittedExpire = false;\r\n vm.isDraft = false;\r\n vm.isNew = true;\r\n vm.modes = [{key:'ADMIN.POTENTIAL.AIR',value:false}, {key:'ADMIN.POTENTIAL.SEA',value:false}, {key:'ADMIN.POTENTIAL.LAND',value:false}];\r\n vm.peID = $stateParams.id;\r\n vm.status = {\r\n state: '',\r\n icon: '',\r\n cssClass: ''\r\n };\r\n vm.isAll = false;\r\n vm.chipsLoading = false;\r\n vm.isDraftSaving = false;\r\n vm.isDeleting = false;\r\n vm.mapActive = false;\r\n vm.isActionLoading = {saveDraft: false, submit: false, save: false, confirmDelete: false, confirmReject: false, confirmSubmit: false, confirmPublish: false, confirmEnd: false,};\r\n vm.actionType = {\r\n saveDraft: POTENTIAL.ACTION.SAVEDRAFT,\r\n submit: POTENTIAL.ACTION.SUBMIT,\r\n save: POTENTIAL.ACTION.SAVE,\r\n confirmDelete: POTENTIAL.ACTION.CONFIRM_DELETE,\r\n confirmReject: POTENTIAL.ACTION.CONFIRM_REJECT,\r\n confirmSubmit: POTENTIAL.ACTION.CONFIRM_SUBMIT,\r\n confirmPublish: POTENTIAL.ACTION.CONFIRM_PUBLISH,\r\n confirmEnd: POTENTIAL.ACTION.CONFIRM_END,\r\n none: POTENTIAL.ACTION.NONE\r\n };\r\n vm.isActionDisabled = false;\r\n vm.isLoadingAffectedShipments = false;\r\n vm.updates = CreatePotentialExceptionsService.getUpdates();\r\n var addLocationsScope;\r\n\r\n //functions\r\n vm.editPotentialException = editPotentialException;\r\n vm.saveAsDraft = saveAsDraft;\r\n vm.confirmCancel = confirmCancel;\r\n vm.confirmSubmit = confirmSubmit;\r\n vm.confirmEnd = confirmEnd;\r\n vm.confirmDelete = confirmDelete;\r\n vm.confirmReject = confirmReject;\r\n vm.confirmPublish = confirmPublish;\r\n vm.isEditable = CreatePotentialExceptionsService.isEditable;\r\n vm.isPublishEdit = isPublishEdit;\r\n vm.isButtonDisabled = isButtonDisabled;\r\n vm.setUrlPath = setUrlPath;\r\n vm.saveEdits = saveEdits;\r\n vm.cancelEdits = cancelEdits;\r\n vm.closeModal = closeModal;\r\n vm.showModal = showModal;\r\n // vm.showExportCSV = showExportCSV;\r\n vm.showTimePicker = showTimePicker;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.addLocation = addLocation;\r\n vm.checkAllChips = checkAllChips;\r\n vm.uncheckAllChips = uncheckAllChips;\r\n // vm.filterChips = filterChips;\r\n vm.changePage = changePage;\r\n vm.changePerPage = changePerPage;\r\n vm.showAddLocations = showAddLocations;\r\n vm.checkChip = checkChip;\r\n vm.searchChips = searchChips;\r\n vm.searchChange = searchChange;\r\n vm.submitButton = submitButton;\r\n vm.getStatus = getStatus;\r\n vm.setStatus = setStatus;\r\n vm.errorMsgLensMode = errorMsgLensMode;\r\n vm.closeMdToastErr = closeMdToastErr;\r\n\r\n /* Listen for whether the form is valid */\r\n $scope.$on(\"exceptionForm:formIsValid\", function(event, isValid){\r\n vm.formIsValid = isValid;\r\n });\r\n\r\n //empty the search field when a new polygon is drawn\r\n $scope.$on(\"emptySearchField\", function(event) {\r\n vm.searchField = '';\r\n });\r\n //sets the lastPage from the service when a new query is made\r\n $scope.$on(\"lastPage\", function(event, lastPage) {\r\n vm.lastPage = lastPage;\r\n });\r\n //reset the page number on map change\r\n $scope.$on(\"resetChips\", function(event) {\r\n vm.pageNum = 1;\r\n vm.perPage = 30;\r\n vm.pageRange = [2, 3, 4];\r\n });\r\n //set if the chips are loading\r\n $scope.$on(\"chipsLoading\", function(event, value) {\r\n vm.chipsLoading = value;\r\n });\r\n\r\n if ($stateParams.id){\r\n vm.isNew = false;\r\n vm.isLoading = true;\r\n CreatePotentialExceptionsService.getException($stateParams.id).then(function(){\r\n vm.isLoading = false;\r\n vm.exceptionDetails = CreatePotentialExceptionsService.getExceptionDetails();\r\n vm.isPublished = vm.exceptionDetails.workflow_state === POTENTIAL.PUBLISHED;\r\n vm.isSubmitted = vm.exceptionDetails.workflow_state === POTENTIAL.SUBMITTED || vm.exceptionDetails.workflow_state === POTENTIAL.SUBMITTED_EXPIRE;\r\n vm.isSubmittedExpire = vm.exceptionDetails.workflow_state === POTENTIAL.SUBMITTED_EXPIRE;\r\n vm.isDraft = vm.exceptionDetails.workflow_state === POTENTIAL.DRAFT;\r\n vm.getStatus();\r\n setUrlPath($stateParams.id);\r\n //vm.isValidator = false;\r\n if (localStorage.getItem('load_potential_exceptions_shipments_count')) {\r\n localStorage.removeItem('load_potential_exceptions_shipments_count');\r\n showConfirmationDialog({}, 'submit');\r\n }\r\n }).catch(function(resp){\r\n vm.showToastWithFile({toast: 'toast-get.error.html'});\r\n $location.path(\"/potential-exceptions\");\r\n });\r\n } else {\r\n vm.isNew = true;\r\n vm.isValidator = false;\r\n vm.exceptionDetails = CreatePotentialExceptionsService.getExceptionDetails(vm.isNew);\r\n vm.getStatus();\r\n vm.setUrlPath();\r\n CreatePotentialExceptionsService.resetPorts();\r\n }\r\n\r\n function errorMsgLensMode(){\r\n vm.closeModal();\r\n var myToast = $mdToast.show({\r\n position: 'top right',\r\n hideDelay : 0,\r\n templateUrl: '/app/admin/create-potential-exceptions/toast/toast-lensmodeon.error.html'\r\n });\r\n closeMdToastErr(myToast);\r\n }\r\n\r\n function closeMdToastErr(myToast){\r\n\r\n $mdToast.hide(myToast);\r\n }\r\n\r\n function setUrlPath(id) {\r\n vm.urlPath = {};\r\n if(id) {\r\n vm.urlPath.path = id;\r\n vm.urlPath.display = vm.isValidator? 'ADMIN.POTENTIAL.REVIEW_EXCEPTION' : 'ADMIN.POTENTIAL.VIEW_EXCEPTION';\r\n } else {\r\n vm.urlPath.path = 'new';\r\n vm.urlPath.display = 'ADMIN.POTENTIAL.CREATE_EXCEPTION';\r\n }\r\n }\r\n\r\n //make the potential exception editable\r\n function editPotentialException() {\r\n $log.debug('edit the potential exception');\r\n CreatePotentialExceptionsService.toggleIsEditable();\r\n vm.getStatus();\r\n vm.setStatus(POTENTIAL.DRAFT, \"\", null);\r\n }\r\n\r\n function isPublishEdit(){\r\n if (vm.exceptionDetails){\r\n return vm.exceptionDetails.parent_id && !!vm.exceptionDetails.parent_id && vm.exceptionDetails.workflow_state !== POTENTIAL.PUBLISHED;\r\n }else {\r\n return false;\r\n }\r\n }\r\n\r\n function postputException(mode, isSaveDraftForSubmit){\r\n vm.exceptionDetails = CreatePotentialExceptionsService.getExceptionDetails();\r\n var curr_state = vm.exceptionDetails.workflow_state;\r\n isSaveDraftForSubmit = isSaveDraftForSubmit === undefined? false : isSaveDraftForSubmit;\r\n // make sure null fields are empty strings\r\n vm.exceptionDetails.city_codes = vm.exceptionDetails.city_codes || [];\r\n angular.forEach(Object.keys(vm.exceptionDetails), function(k) {\r\n if (vm.exceptionDetails[k] === null){ vm.exceptionDetails[k] = '';}\r\n });\r\n\r\n /* Switch Workflow state depending on optional arg */\r\n switch (mode){\r\n case POTENTIAL.DRAFT:\r\n vm.exceptionDetails.workflow_state = POTENTIAL.DRAFT; break;\r\n case POTENTIAL.SUBMITTED:\r\n vm.exceptionDetails.workflow_state = POTENTIAL.SUBMITTED; break;\r\n case POTENTIAL.SUBMITTED_EXPIRE:\r\n vm.exceptionDetails.workflow_state = POTENTIAL.SUBMITTED_EXPIRE; break;\r\n default:\r\n break;\r\n }\r\n if (vm.isNew || curr_state === POTENTIAL.PUBLISHED){\r\n\r\n /* Remove id key if it exists */\r\n if (vm.exceptionDetails.id){\r\n vm.exceptionDetails.parent_id = vm.exceptionDetails.id;\r\n delete vm.exceptionDetails.id;\r\n delete vm.exceptionDetails.reviewer;\r\n delete vm.exceptionDetails.rejection_note;\r\n }\r\n\r\n $log.debug(\"Creating Exception\");\r\n return CreatePotentialExceptionsService.postException().then(function(res){\r\n vm.exceptionDetails.id = res.id;\r\n vm.isNew = false;\r\n vm.isDraft = true;\r\n if(!isSaveDraftForSubmit) { //if not saving the draft to get shipments affected\r\n $timeout(function() {\r\n // TODO: this forces a view reload. it would be better if it just replaced the URL and nothing happened\r\n $location.replace().path('/potential-exceptions/' + res.id);\r\n $scope.$apply();\r\n }, 100);\r\n }\r\n });\r\n } else {\r\n $log.debug(\"Updating exception\");\r\n return CreatePotentialExceptionsService.updateException().then(function(data) {\r\n vm.isNew = false;\r\n vm.exceptionDetails = data;\r\n });\r\n }\r\n }\r\n\r\n //------------------------------------------------------------------------\r\n // Show toast, set loading state, and close dialogs based on action taken\r\n //------------------------------------------------------------------------\r\n function handleAction(toast, action_type, close_modal){\r\n if (close_modal){\r\n $mdDialog.hide();\r\n }\r\n vm.showToastWithFile(toast.toast, toast.messages);\r\n setActionLoadingAndDisabledWithType(action_type);\r\n }\r\n\r\n function potentialExceptionHasTitle() {\r\n if (!vm.exceptionDetails.title.trim()) {\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .title($translate.instant('ADMIN.POTENTIAL.MISSING_FIELDS'))\r\n .htmlContent('<ul><li>' + $translate.instant('ADMIN.POTENTIAL.EXCEPTION_TITLE') + '</li></ul>')\r\n .ariaLabel($translate.instant('ADMIN.POTENTIAL.MISSING_FIELDS'))\r\n .ok('Ok')\r\n );\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n //save the exception as a draft\r\n function saveAsDraft() {\r\n if (!potentialExceptionHasTitle()) { return; }\r\n setActionLoadingAndDisabledWithType(vm.actionType.saveDraft);\r\n $log.debug(\"Saving as Draft\");\r\n vm.isDraftSaving = true;\r\n return postputException(POTENTIAL.DRAFT).then(function(res){\r\n handleAction({toast: 'toast-save-draft.success.html'}, vm.actionType.none);\r\n }).catch(function(res){\r\n handleAction({toast: 'toast-save-draft.error.html'}, vm.actionType.none);\r\n }).finally(function() {\r\n vm.isDraftSaving = false;\r\n });\r\n }\r\n\r\n function confirmCancel() {\r\n $log.debug('confirm cancel');\r\n $mdDialog.hide();\r\n }\r\n\r\n function isButtonDisabled() {\r\n return vm.isLoadingAffectedShipments || vm.isActionDisabled || UserService.canAccess(permissions.potentialExceptions.reader);\r\n }\r\n\r\n //called when user clicks confirm on submitting potential exception\r\n function confirmSubmit() {\r\n $log.debug('confirm submit');\r\n setActionLoadingAndDisabledWithType(vm.actionType.confirmSubmit);\r\n return postputException(POTENTIAL.SUBMITTED).then(function(res){\r\n handleAction({toast: 'toast-submit.success.html'}, vm.actionType.none, true);\r\n $location.url('/potential-exceptions'); //redirect to /potential-exceptions\r\n }).catch(function(error) {\r\n handleAction({toast: 'toast-submit.error.html'}, vm.actionType.none, true);\r\n });\r\n }\r\n\r\n //called when user clicks confirm on ending potential exception\r\n function confirmEnd() {\r\n $log.debug('Setting the End of Potential Exception');\r\n // vm.exceptionDetails.end_date = new Date();\r\n setActionLoadingAndDisabledWithType(vm.actionType.confirmEnd);\r\n return postputException(POTENTIAL.SUBMITTED_EXPIRE).then(function(res){\r\n vm.isNew = false;\r\n handleAction({toast: 'toast-end.success.html'}, vm.actionType.none, true);\r\n }).catch(function(error) {\r\n handleAction({toast: 'toast-end.error.html'}, vm.actionType.none, true);\r\n });\r\n }\r\n\r\n function confirmDelete() {\r\n $log.debug('confirm delete');\r\n vm.isDeleting = true;\r\n setActionLoadingAndDisabledWithType(vm.actionType.confirmDelete);\r\n CreatePotentialExceptionsService.deleteException().then(function() {\r\n vm.isDeleting = false;\r\n handleAction({toast: 'toast-delete.success.html'}, vm.actionType.none, true);\r\n $location.path('/potential-exceptions');\r\n }).catch(function(error) {\r\n vm.isDeleting = false;\r\n handleAction({toast: 'toast-delete.error.html'}, vm.actionType.none, true);\r\n });\r\n }\r\n\r\n function confirmReject(reject_reason) {\r\n $log.debug('confirm reject');\r\n vm.exceptionDetails.workflow_state = \"review\";\r\n vm.exceptionDetails.rejection_note = reject_reason;\r\n setActionLoadingAndDisabledWithType(vm.actionType.confirmReject);\r\n postputException(POTENTIAL.DRAFT).then(function(resp) {\r\n handleAction({toast: 'toast-reject.success.html'}, vm.actionType.none, true);\r\n $location.path('/potential-exceptions');\r\n $state.go($state.current, {}, {reload: true});\r\n }).catch(function(error) {\r\n handleAction({toast: 'toast-reject.error.html'}, vm.actionType.none, true);\r\n });\r\n }\r\n\r\n function confirmPublish() {\r\n $log.debug('confirm publish');\r\n setActionLoadingAndDisabledWithType(vm.actionType.confirmPublish);\r\n CreatePotentialExceptionsService.publishException().then(function(resp){\r\n handleAction({toast: 'toast-publish.success.html'}, vm.actionType.none, true);\r\n vm.isPublished = true;\r\n $location.url('/potential-exceptions'); //redirect to /potential-exceptions\r\n }).catch(function(error) {\r\n handleAction({toast:'toast-publish.error.html', messages: error.data.errors}, vm.actionType.none, true);\r\n });\r\n }\r\n\r\n function saveEdits() {\r\n $log.debug('save the edits');\r\n setActionLoadingAndDisabledWithType(vm.actionType.saveDraft);\r\n vm.isDraftSaving = true;\r\n postputException(POTENTIAL.DRAFT).then(function() {\r\n handleAction({toast:'toast-save-draft.success.html'}, vm.actionType.none, false);\r\n vm.getStatus();\r\n }).catch(function(res){\r\n handleAction({toast:'toast-save-draft.error.html'}, vm.actionType.none, false);\r\n });\r\n }\r\n\r\n var requiredSubmitFields = [\r\n {label: 'ADMIN.POTENTIAL.EXCEPTION_TITLE', field: 'title'},\r\n {label: 'ADMIN.POTENTIAL.DESCRIPTION', field: 'description'},\r\n {label: 'ADMIN.POTENTIAL.SOURCE', field: 'source'},\r\n {label: 'ADMIN.POTENTIAL.START_TIME', field: 'start_date'},\r\n {label: 'ADMIN.POTENTIAL.END_TIME', field: 'end_date'},\r\n {label: 'ADMIN.POTENTIAL.SHIPPING_MODE', field: ['air', 'sea']},\r\n {label: 'ADMIN.POTENTIAL.EXCEPTION_ARRIVAL', field: ['arrivals', 'departures']}\r\n ];\r\n function submitButton(ev){\r\n // check for missing fields\r\n var missingFields = [];\r\n angular.forEach(requiredSubmitFields, function(field) {\r\n var fields = field.field;\r\n if (!angular.isArray(fields)) fields = [fields];\r\n var hasEntry = false;\r\n angular.forEach(fields, function(f) {\r\n if (vm.exceptionDetails[f]) hasEntry = true;\r\n });\r\n if (!hasEntry) {\r\n missingFields.push(field.label);\r\n }\r\n });\r\n if (CreatePotentialExceptionsService.getPorts().length === 0) missingFields.push('ADMIN.POTENTIAL.EXCEPTION_LOCATION');\r\n if (missingFields.length > 0) {\r\n missingFields.unshift('ADMIN.POTENTIAL.MISSING_FIELDS');\r\n $translate(missingFields).then(function(translations) {\r\n var title = translations['ADMIN.POTENTIAL.MISSING_FIELDS'];\r\n delete translations['ADMIN.POTENTIAL.MISSING_FIELDS'];\r\n var fields = Object.keys(translations).map(function(t) { return translations[t];});\r\n fields.sort();\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .title(title)\r\n .htmlContent('<ul><li>' + fields.join('</li><li>') + '</li></ul>')\r\n .ariaLabel('Missing Fields')\r\n .ok('Ok')\r\n .targetEvent(ev)\r\n );\r\n });\r\n }\r\n // good to go!\r\n else {\r\n if(vm.isNew || vm.isDraft) { //if it is new save as a draft first so we can get num shipments affected\r\n setActionLoadingAndDisabledWithType(vm.actionType.submit);\r\n postputException(POTENTIAL.DRAFT, true).then(function(res) {\r\n setActionLoadingAndDisabledWithType(vm.actionType.none);\r\n vm.showModal(ev, \"submit\");\r\n });\r\n } else { //just show the modal for submitting\r\n vm.showModal(ev, \"submit\");\r\n }\r\n }\r\n }\r\n\r\n function cancelEdits() {\r\n $log.debug('cancel the edits');\r\n CreatePotentialExceptionsService.toggleIsEditable();\r\n vm.exceptionDetails = CreatePotentialExceptionsService.getOriginalExceptionDetails();\r\n vm.getStatus();\r\n }\r\n\r\n //closes a modal\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n function showTimePicker(ev) {\r\n $mdpTimePicker(vm.exceptionDetails.end_date, {\r\n targetEvent: ev\r\n }).then(function(selectedDate) {\r\n vm.exceptionDetails.end_date = selectedDate;\r\n });\r\n }\r\n\r\n function showDatePicker(ev) {\r\n $mdpDatePicker($scope.currentDate, {\r\n targetEvent: ev\r\n }).then(function(selectedDate) {\r\n $scope.currentDate = selectedDate;\r\n });\r\n }\r\n\r\n // function showExportCSV(){\r\n // $scope.exportCsvLoaded = false;\r\n // CreatePotentialExceptionsService.exportPotentialException().then(function() {\r\n // $scope.exportCsvLoaded = true;\r\n // $mdDialog.hide();\r\n // }).catch(function() {\r\n // $mdDialog.show(\r\n // $mdDialog.alert()\r\n // .parent(angular.element(document.body))\r\n // .clickOutsideToClose(true)\r\n // .htmlContent($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n // .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n // .ok('Ok')\r\n // );\r\n // });\r\n // }\r\n\r\n //shows the modal based on the string you pass in\r\n function showModal(ev, modal) {\r\n //! combine save as draft and submit when \"Submit Update For Approval\" is clicked...\r\n if (modal === 'draft_and_submit') {\r\n if (!potentialExceptionHasTitle()) { return; }\r\n localStorage.setItem('load_potential_exceptions_shipments_count', true);\r\n saveAsDraft();\r\n } else {\r\n showConfirmationDialog(ev, modal);\r\n }\r\n }\r\n\r\n function showConfirmationDialog(ev, modal) {\r\n if(modal != 'delete' && modal != 'reject') {\r\n vm.isLoadingAffectedShipments = true;\r\n /* Get the number of potential shipments affected */\r\n CreatePotentialExceptionsService.getPotentialExceptionShipments().then(function(res) {\r\n vm.numShipmentsAffected = res.affected_shipments_count;\r\n vm.isLoadingAffectedShipments = false;\r\n }).catch(function(res) {\r\n vm.isLoadingAffectedShipments = false;\r\n vm.closeModal();\r\n vm.showToastWithFile('server', res.data.errors);\r\n //debugger;\r\n });\r\n }\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/create-potential-exceptions/modals/potential-exceptions.'+ modal + '.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n })\r\n .then(function(answer) {\r\n //on submit\r\n }, function() {\r\n //on close out or cancel\r\n });\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, messages) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/create-potential-exceptions/toast/' + file,\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n //adds the location to the list of locations\r\n function addLocation() {\r\n $log.debug('add a location with ' + vm.locationsSearchField);\r\n }\r\n\r\n function checkAllChips() {\r\n $log.debug('check all chips');\r\n CreatePotentialExceptionsService.checkAllChips(vm.pageNum, vm.perPage, vm.searchField);\r\n }\r\n\r\n function uncheckAllChips() {\r\n $log.debug('uncheck all chips');\r\n CreatePotentialExceptionsService.unCheckAllChips(vm.pageNum, vm.perPage, vm.searchField);\r\n }\r\n\r\n function changePage(num) {\r\n if(num > 0 && num <= vm.lastPage) {\r\n vm.pageNum = num;\r\n CreatePotentialExceptionsService.paginateChips(vm.pageNum, vm.perPage, vm.searchField);\r\n setPageNumbers();\r\n }\r\n }\r\n\r\n function changePerPage(num) {\r\n vm.perPage = num;\r\n changePage(1);\r\n }\r\n\r\n function setPageNumbers() {\r\n //change the buttons and the page they go to\r\n if(vm.pageNum < 3) {\r\n for(var k = 0; k < vm.pageRange.length; k ++) {\r\n vm.pageRange[k] = k + 2;\r\n }\r\n } else if(vm.pageNum > vm.lastPage - 2) {\r\n for(var k = 0; k < vm.pageRange.length; k ++) {\r\n vm.pageRange[k] = vm.lastPage + k - 3;\r\n }\r\n } else {\r\n for(var k = 0; k < vm.pageRange.length; k ++) {\r\n vm.pageRange[k] = vm.pageNum + k - 2;\r\n }\r\n }\r\n }\r\n\r\n //-------------------------\r\n // Manual Add Locations\r\n //-------------------------\r\n function setAddLocationsScope() {\r\n addLocationsScope = $scope.$new();\r\n addLocationsScope.chipManualLocations = [];\r\n addLocationsScope.manualLocationSearchText = '';\r\n\r\n addLocationsScope.selectedManualLocationChange = selectedManualLocationChange;\r\n addLocationsScope.autocomplete = autocomplete;\r\n addLocationsScope.addManualLocations = addManualLocations;\r\n }\r\n //show the add locations modal\r\n function showAddLocations(ev) {\r\n setAddLocationsScope();\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/create-locations/add-locations-modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: addLocationsScope\r\n })\r\n .then(function(answer) {\r\n //on submit\r\n }, function() {\r\n //on close out or cancel\r\n });\r\n }\r\n\r\n /**\r\n * Handles when the an autocomplete item is clicked\r\n */\r\n function selectedManualLocationChange(item) {\r\n if (!item) return;\r\n addLocationsScope.chipManualLocations.push(item);\r\n addLocationsScope.manualLocationSearchText = '';\r\n }\r\n /**\r\n * Provides the data for the manual location autocomplete\r\n */\r\n function autocomplete(field, searchText) {\r\n return $http.post(api.url_v2 + '/autocomplete', {field: 'geocode_all', value: searchText}).then(function(res) {\r\n return res.data.map(function(l) {\r\n return {\r\n display: (l.description + ( l.stateprov ? ', ' + l.stateprov : '')) + ' (' + l.country_city_code + ')',\r\n chipDisplay: l.description + ( l.stateprov ? ', ' + l.stateprov : ''),\r\n value: l.country_city_code,\r\n data: l\r\n };\r\n }).sort(function(a, b) {\r\n return a.display < b.display ? -1 : 1;\r\n });\r\n });\r\n }\r\n /**\r\n * Handler for clicking the \"Add Locations\" button\r\n */\r\n function addManualLocations() {\r\n\r\n var manualPorts = addLocationsScope.chipManualLocations.map(function(chip) {\r\n chip.data.checkbox = true;\r\n return chip.data;\r\n });\r\n CreatePotentialExceptionsService.addPorts(manualPorts);\r\n\r\n // $scope.manualLocationSearchText = '';\r\n // $scope.chipManualLocations.splice(0, $scope.chipManualLocations.length);\r\n // $scope.chipManualLocations = [];\r\n $mdDialog.hide();\r\n }\r\n\r\n //----------------------------------\r\n\r\n function checkChip(chip){\r\n if (vm.isEditable()){\r\n chip.checkbox = !chip.checkbox;\r\n }\r\n }\r\n\r\n function searchChips() {\r\n $log.debug('');\r\n vm.searchChange();\r\n }\r\n\r\n //changes the availableColumns to be shown based on what the search field is\r\n function searchChange() {\r\n vm.pageNum = 1;\r\n CreatePotentialExceptionsService.paginateChips(vm.pageNum, vm.perPage, vm.searchField);\r\n setPageNumbers();\r\n }\r\n\r\n\r\n //----------------------------\r\n // Adjust the state of the PE\r\n //----------------------------\r\n function setStatus(state, icon, cssClass){\r\n vm.status.state = state;\r\n vm.status.icon = icon;\r\n vm.status.cssClass = cssClass;\r\n }\r\n\r\n //--------------------------------------------------\r\n // Get state from data to set form UI\r\n //--------------------------------------------------\r\n function getStatus() {\r\n switch(vm.exceptionDetails.workflow_state){\r\n case POTENTIAL.DRAFT:\r\n vm.isDraft = true;\r\n vm.isSubmitted = false;\r\n vm.isSubmittedExpire = false;\r\n if (vm.exceptionDetails.rejection_note) {\r\n // submitted for review: submitted\r\n vm.setStatus('rejected', \"\", 'md-danger');\r\n } else if ($stateParams.id) {\r\n // not published but saved already: draft\r\n vm.setStatus(POTENTIAL.DRAFT, \"\", null);\r\n } else {\r\n // not published and not saved: new\r\n vm.setStatus('new', \"\", 'md-accent');\r\n }\r\n break;\r\n\r\n // submitted for review: submitted, submitted_expire\r\n case POTENTIAL.SUBMITTED_EXPIRE:\r\n vm.isSubmittedExpire = true; //fallthrough on purpose\r\n case POTENTIAL.SUBMITTED:\r\n vm.isDraft = false;\r\n vm.isSubmitted = true;\r\n vm.setStatus(POTENTIAL.SUBMITTED, \"\", 'md-warning');\r\n break;\r\n\r\n case POTENTIAL.PUBLISHED:\r\n if (vm.isEditable()){\r\n // published and editing: editing\r\n vm.setStatus('edit', \"\", 'md-success-3');\r\n } else {\r\n // published and static: published\r\n vm.setStatus(POTENTIAL.PUBLISHED, \"\", 'md-success-3');\r\n }\r\n }\r\n }\r\n\r\n function setActionLoadingAndDisabledWithType(actionType) {\r\n vm.isActionLoading.saveDraft = actionType == POTENTIAL.ACTION.SAVEDRAFT;\r\n vm.isActionLoading.submit = actionType == POTENTIAL.ACTION.SUBMIT;\r\n vm.isActionLoading.save = actionType == POTENTIAL.ACTION.SAVE;\r\n vm.isActionLoading.confirmDelete = actionType == POTENTIAL.ACTION.CONFIRM_DELETE;\r\n vm.isActionLoading.confirmReject = actionType == POTENTIAL.ACTION.CONFIRM_REJECT;\r\n vm.isActionLoading.confirmSubmit = actionType == POTENTIAL.ACTION.CONFIRM_SUBMIT;\r\n vm.isActionLoading.confirmPublish = actionType == POTENTIAL.ACTION.CONFIRM_PUBLISH;\r\n vm.isActionLoading.confirmEnd = actionType == POTENTIAL.ACTION.CONFIRM_END;\r\n\r\n vm.isActionDisabled = vm.isActionLoading.saveDraft || vm.isActionLoading.submit || vm.isActionLoading.save ||\r\n vm.isActionLoading.confirmDelete || vm.isActionLoading.confirmReject || vm.isActionLoading.confirmSubmit ||\r\n vm.isActionLoading.confirmPublish || vm.isActionLoading.confirmEnd;\r\n }\r\n\r\n\r\n if(localStorage.switchEmailCwwType){\r\n vm.switchEmail = localStorage.switchEmailCwwType;\r\n }else if(localStorage.userCompanyCww){\r\n vm.switchEmail = localStorage.userCompanyCww;\r\n }else if(localStorage.userDepartmentCww){\r\n vm.switchEmail = localStorage.userDepartmentCww;\r\n }else{\r\n vm.switchEmail = '';\r\n }\r\n\r\n }\r\n})();\r\n\n// /* TODO MAKE THIS WORK */\r\n\r\n// (function() {\r\n// 'use strict';\r\n\r\n// angular\r\n// .module('app.admin')\r\n// .directive('googleMap', function($rootScope, lazyLoadApi){\r\n\r\n// return {\r\n// restrict: 'CA',\r\n// transclude: true,\r\n// scope: {\r\n// map: '@id',\r\n// lat: '@',\r\n// long: '@'\r\n// },\r\n// link: function(scope, element, attrs) {\r\n// var location = null;\r\n// var map = null;\r\n// var mapOptions = null;\r\n\r\n// if (angular.isDefined(scope.lat) && angular.isDefined(scope.long)){\r\n// lazyLoadApi.then(initializeMap);\r\n// }\r\n\r\n// function initializeMap(){\r\n// location = new google.maps.LatLng(scope.lat, scope.long);\r\n\r\n// mapOptions = {\r\n// zoom: 12,\r\n// center: location\r\n// };\r\n\r\n// map = new google.maps.Map(document.getElementById('googleMap'), mapOptions);\r\n// }\r\n// }\r\n// };\r\n// })\r\n// .service('lazyLoadApi', function lazyLoadApi($window, $q){\r\n\r\n// function loadScript(){\r\n// // console.log(\"loading google maps\");\r\n// var s = document.createElement('script');\r\n// s.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=visualization,drawing,geometry,places';\r\n// document.body.appendChild(s);\r\n// }\r\n// var deferred = $q.defer();\r\n\r\n// $window.initMap = function() {\r\n// deferred.resolve();\r\n// };\r\n\r\n// if ($window.attachEvent) {\r\n// $window.attachEvent('onload', loadScript);\r\n// } else {\r\n// $window.addEventListener('load', loadScript, false);\r\n// }\r\n// return deferred.promise;\r\n// });\r\n// })();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('CreateMapController', CreateMapController);\r\n\r\n\r\n CreateMapController.$inject = [\"$scope\", \"CreatePotentialExceptionsService\", \"$log\", \"google_api_url\"];\r\n function CreateMapController($scope, CreatePotentialExceptionsService, $log, google_api_url) {\r\n var vm = this;\r\n vm.shapes = [];\r\n vm.count = 0;\r\n vm.isLoad = false;\r\n\r\n $scope.googleMapsUrl = google_api_url;\r\n\r\n /* Functions */\r\n vm.getShapes = getShapes;\r\n vm.initialize = initialize;\r\n vm.getCities = getCities;\r\n vm.getLatLong = getLatLong;\r\n vm.removeShape = removeShape;\r\n vm.drawShape = drawShape;\r\n vm.rightClickShape = rightClickShape;\r\n vm.addModifyShapeListener = addModifyShapeListener;\r\n\r\n $scope.$on(\"potentialException:loaded\", function(event){\r\n vm.shapes.map(function(shape){\r\n shape.setMap(null);\r\n });\r\n vm.shapes.length = 0;\r\n vm.count = 0;\r\n vm.getShapes().map(function(d){\r\n if (d){\r\n vm.drawShape(d);\r\n }\r\n });\r\n vm.getCities().then(function(ports) {\r\n // figure out which ports aren't included in our selected ports because of manual entry\r\n var selectedCityCodes = CreatePotentialExceptionsService.getExceptionDetails().city_codes,\r\n missingCityCodes = [],\r\n shapeCityCodes = ports.map(function(p) {\r\n return p.county_city_code;\r\n });\r\n\r\n angular.forEach(selectedCityCodes, function(p) {\r\n if (shapeCityCodes.indexOf(p) === -1) {\r\n missingCityCodes.push(p);\r\n }\r\n });\r\n CreatePotentialExceptionsService.postCountryCityCodes(missingCityCodes).then(function(missingPorts) {\r\n angular.forEach(missingPorts, function(p) {\r\n p.checkbox = true;\r\n });\r\n CreatePotentialExceptionsService.addPorts(missingPorts);\r\n CreatePotentialExceptionsService.checkChips();\r\n });\r\n\r\n return ports;\r\n });\r\n });\r\n\r\n /* Initialize once the map div is loaded */\r\n function initialize(){\r\n if (!vm.isLoad){\r\n vm.isLoad = true;\r\n vm.mapOptions = {\r\n zoom: 4,\r\n center: new google.maps.LatLng(40.0000, -98.0000),\r\n mapTypeId: google.maps.MapTypeId.TERRAIN\r\n };\r\n\r\n $scope.map = new google.maps.Map(document.getElementById('googleMap'), vm.mapOptions);\r\n\r\n vm.drawingManager = new google.maps.drawing.DrawingManager({\r\n drawingControl: true,\r\n drawingControlOptions: {\r\n position: google.maps.ControlPosition.TOP_CENTER,\r\n drawingModes: [\r\n google.maps.drawing.OverlayType.CIRCLE,\r\n google.maps.drawing.OverlayType.POLYGON,\r\n google.maps.drawing.OverlayType.RECTANGLE\r\n ]\r\n },\r\n polygonOptions: {\r\n fillColor: 'red',\r\n editable: true,\r\n clickable: true\r\n },\r\n circleOptions: {\r\n fillColor: 'red',\r\n editable: true,\r\n clickable: true\r\n },\r\n rectangleOptions: {\r\n fillColor: 'red',\r\n editable: true,\r\n clickable: true\r\n }\r\n });\r\n vm.drawingManager.setMap($scope.map);\r\n $scope.markers = [];\r\n\r\n //vm.infoWindow = new google.maps.InfoWindow();\r\n\r\n /* Add a listener for when an overlay complete action si taken */\r\n google.maps.event.addListener(vm.drawingManager, 'overlaycomplete', function(e){\r\n var newShape = e.overlay;\r\n newShape.type = e.type;\r\n newShape.id = vm.count++;\r\n vm.shapes.push(newShape);\r\n\r\n /* When a user has drawn a shape, turn off draw mode */\r\n vm.drawingManager.setDrawingMode(null);\r\n\r\n /* Update the shape when it gets moved */\r\n vm.addModifyShapeListener(newShape);\r\n\r\n /* Add a listener to delete shapes */\r\n google.maps.event.addListener(newShape, 'rightclick', function(e){\r\n vm.rightClickShape(newShape, e);}\r\n );\r\n vm.getCities();\r\n });\r\n }\r\n }\r\n\r\n function addModifyShapeListener(shape){\r\n switch (shape.type){\r\n case google.maps.drawing.OverlayType.POLYGON:\r\n google.maps.event.addListener(shape, 'mouseup', function(g){vm.getCities();});\r\n break;\r\n case google.maps.drawing.OverlayType.RECTANGLE:\r\n google.maps.event.addListener(shape, 'bounds_changed', function(g){vm.getCities();});\r\n break;\r\n case google.maps.drawing.OverlayType.CIRCLE:\r\n google.maps.event.addListener(shape, 'center_changed', function(g){vm.getCities();});\r\n google.maps.event.addListener(shape, 'radius_changed', function(g){vm.getCities();});\r\n break;\r\n }\r\n }\r\n\r\n function rightClickShape(shape, event){\r\n switch (shape.type){\r\n case google.maps.drawing.OverlayType.POLYGON:\r\n if (event.vertex !== undefined) {\r\n var path = shape.getPaths().getAt(event.path);\r\n path.removeAt(event.vertex);\r\n if (path.length < 3) {\r\n vm.removeShape(shape);\r\n }\r\n } else {\r\n vm.removeShape(shape);\r\n }\r\n break;\r\n default:\r\n vm.removeShape(shape);\r\n }\r\n vm.getCities();\r\n }\r\n\r\n function drawShape(drawableShape){\r\n var shape, latlngbounds = new google.maps.LatLngBounds();\r\n if (drawableShape.type == null){drawableShape.type = 'circle'}\r\n switch (drawableShape.type){\r\n case \"rectangle\":\r\n shape = new google.maps.Rectangle({\r\n bounds: {\r\n north: drawableShape.northeast.lat,\r\n east: drawableShape.northeast.lng,\r\n south: drawableShape.southwest.lat,\r\n west: drawableShape.southwest.lng\r\n },\r\n fillColor: 'red',\r\n editable: true,\r\n draggable: true\r\n });\r\n latlngbounds.extend(new google.maps.LatLng (drawableShape.northeast.lat,drawableShape.northeast.lng));\r\n latlngbounds.extend(new google.maps.LatLng (drawableShape.southwest.lat,drawableShape.southwest.lng));\r\n break;\r\n case \"circle\":\r\n shape = new google.maps.Circle({\r\n center: drawableShape.center,\r\n radius: drawableShape.radius,\r\n fillColor: 'red',\r\n editable: true,\r\n draggable: true\r\n });\r\n latlngbounds.extend(drawableShape.center);\r\n break;\r\n case \"polygon\":\r\n shape = new google.maps.Polygon({\r\n paths: drawableShape.bounds,\r\n fillColor: 'red',\r\n editable: true,\r\n draggable: true\r\n });\r\n drawableShape.bounds.forEach(function(latLng){\r\n latlngbounds.extend(latLng);\r\n });\r\n break;\r\n }\r\n shape.type = drawableShape.type;\r\n shape.id = vm.count++;\r\n /* Update the shape when it gets moved */\r\n vm.addModifyShapeListener(shape);\r\n /* Add a listener to delete shapes */\r\n google.maps.event.addListener(shape, 'rightclick', function(e){\r\n vm.rightClickShape(shape, e);}\r\n );\r\n vm.shapes.push(shape);\r\n try{\r\n shape.setMap($scope.map);\r\n $scope.map.setCenter(latlngbounds.getCenter());\r\n }\r\n catch(e){}\r\n }\r\n\r\n function removeShape(shape){\r\n vm.shapes = vm.shapes.filter(function(d){return d.id != shape.id;});\r\n shape.setMap(null);\r\n }\r\n\r\n /* Generate a query for the given shapes */\r\n function getCities(){\r\n var query = [];\r\n vm.shapes.map(function(d){\r\n query.push(vm.getLatLong(d));\r\n });\r\n return CreatePotentialExceptionsService.postShape(query);\r\n }\r\n\r\n /* Get's the LatLong coordiantes for a given shape */\r\n function getLatLong(e){\r\n var shape;\r\n switch(e.type){\r\n case \"polygon\":\r\n var bounds = [];\r\n var polys = e.getPath();\r\n for (var i = 0 ; i < polys.length ; i++) {\r\n bounds.push({\r\n lat: polys.getAt(i).lat(),\r\n lng: polys.getAt(i).lng()\r\n });\r\n }\r\n shape = {type: e.type, bounds: bounds};\r\n break;\r\n case \"circle\":\r\n var radius = e.radius;\r\n var center = {lat: e.center.lat(),\r\n lng: e.center.lng()};\r\n shape = {type: e.type, radius: radius, center: center};\r\n break;\r\n case \"rectangle\":\r\n shape = {type: e.type,\r\n northeast: {lat: e.bounds.getNorthEast().lat(),\r\n lng: e.bounds.getNorthEast().lng()},\r\n southwest: {lat: e.bounds.getSouthWest().lat(),\r\n lng: e.bounds.getSouthWest().lng()}\r\n };\r\n break;\r\n default:\r\n }\r\n return shape;\r\n }\r\n\r\n function getShapes(){\r\n var shapes = CreatePotentialExceptionsService.getExceptionDetails().shapes;\r\n return shapes ? shapes : [];\r\n }\r\n }\r\n}) ();\r\n\n/**\r\n * @ngdoc directive\r\n * @name createAccount\r\n * @description directive that includes the create account partial\r\n * @restrict E\r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name resetDirective\r\n * @description directive that resets the form to being empty\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .directive('createAccount', createAccount)\r\n .directive('resetDirective', resetDirective);\r\n\r\n /** @ngInject */\r\n function createAccount() {\r\n var directive = {\r\n restrict: 'E',\r\n templateUrl: '/app/admin/create-account/create-user.html'\r\n };\r\n return directive;\r\n }\r\n\r\n //directive for clearing out the form\r\n resetDirective.$inject = ['$parse'];\r\n function resetDirective($parse) {\r\n return function( scope, element, attr ) {\r\n var fn = $parse( attr.resetDirective );\r\n var masterModel = angular.copy( fn( scope ) );\r\n\r\n // Error check to see if expression returned a model\r\n if ( !fn.assign ) {\r\n throw Error( 'Expression is required to be a model: ' + attr.resetDirective );\r\n }\r\n\r\n element.bind( 'reset', function ( event ) {\r\n scope.$apply( function () {\r\n fn.assign( scope, angular.copy( masterModel ) );\r\n scope.form.$setPristine();\r\n });\r\n\r\n if ( event.preventDefault ) {\r\n return event.preventDefault();\r\n }\r\n else {\r\n return false;\r\n }\r\n });\r\n };\r\n }\r\n\r\n})();\r\n\n(function(){\r\n 'use strict';\r\n\r\n angular.module('app.admin')\r\n .directive('numbersOnly', numbersOnly);\r\n \r\n numbersOnly.$inject = [];\r\n\r\n function numbersOnly(){\r\n return {\r\n require: 'ngModel',\r\n link: function (scope, element, attr, ngModelCtrl) {\r\n function fromUser(text) {\r\n if (text) {\r\n var transformedInput = text.replace(/[^0-9]/g, '');\r\n \r\n if (transformedInput !== text) {\r\n ngModelCtrl.$setViewValue(transformedInput);\r\n ngModelCtrl.$render();\r\n }\r\n return transformedInput;\r\n }\r\n return undefined;\r\n } \r\n ngModelCtrl.$parsers.push(fromUser);\r\n }\r\n };\r\n }\r\n})();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .component('logCompanyRecord', {\r\n templateUrl: \"/app/admin/companies/log.html\",\r\n controller: CompanyLogDetailController,\r\n bindings: {\r\n data: '<'\r\n }\r\n });\r\n\r\n CompanyLogDetailController.inject = [\"$rootScope\", \"$scope\", \"CompanyManagementService\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', 'UserManagementService', 'mdSelectHelper', '$mdMedia', '$mdDialog', 'UserService']\r\n \r\n function CompanyLogDetailController($rootScope, $scope, CompanyManagementService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, UserManagementService, mdSelectHelper, $mdMedia, $mdDialog, UserService){\r\n var ctrl = this;\r\n\r\n $rootScope.$on('company_updated', function(ev, logs){\r\n ctrl.data.log = logs;\r\n });\r\n\r\n ctrl.processActions = function(actions){\r\n return Object.keys(actions).map(function(key){\r\n var action = actions[key] === Object(actions[key]) ? JSON.stringify(actions[key]) : actions[key];\r\n return \"<strong>\" + key + \"</strong>\" + \": \" + action +\"\\n\";\r\n }).join(', ');\r\n }\r\n\r\n ctrl.logExportShowCSV = function(){\r\n $scope.exportCsvLoaded = false;\r\n CompanyManagementService.exportCompanyLogs(ctrl.data).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function(e) {\r\n \r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant(e.data.errors))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n }\r\n\r\n}) ();\n/**\r\n * @ngdoc module\r\n * @name CompanyManagementService\r\n *\r\n * @description\r\n * The CompanyManagementService does stuff\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('CompanyManagementService', CompanyManagementService);\r\n\r\n /** @ngInject */\r\n CompanyManagementService.$inject = ['$http', '$rootScope', '$q','$timeout', '$location','$stateParams', 'NgTableParams', 'api', 'AJAX',\r\n 'DownloadService', 'UserService', '$state','Upload'];\r\n function CompanyManagementService($http, $rootScope, $q, $timeout, $location,$stateParams, NgTableParams, api,\r\n AJAX, DownloadService, UserService, $state,Upload) {\r\n var user = {\r\n contact:{\r\n bccs:[],\r\n ccs:[]\r\n }\r\n },\r\n lensGroupData =[],\r\n routeStatus = false,\r\n addUserCheck = true,\r\n company = getCompanyObject(),\r\n query,\r\n selectedLensCompanies,\r\n timeoutTid = false,\r\n loading = false,\r\n isEmpty = true,\r\n deferred = $q.defer(),\r\n bulk_companies = [],\r\n selectedUsers,\r\n allCompanyCount=0,\r\n companyTableData=[],\r\n companyTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: companyTableData,\r\n total: allCompanyCount,\r\n getData: function ($defer, params) {\r\n params.total(allCompanyCount);\r\n var filterData=companyTableData;\r\n\r\n if(params.count()<companyTableData.length)\r\n filterData = companyTableData.slice((params.page() - 1) * params.count(), params.page() * params.count());\r\n\r\n $defer.resolve(filterData);\r\n }\r\n }),\r\n companyExceptionTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n }),\r\n companyLensTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n\r\n // $timeout(function() {\r\n // deferred.resolve();\r\n // }, 60000);\r\n\r\n /* CRANE TABLE PARAMS */\r\n\r\n // function sortFields(orderBy, sorting){\r\n // var result = [];\r\n // for (var i in orderBy){\r\n // if (!isNaN(+i)){\r\n // var x = orderBy[i].replace(/[+-]/g,\"\");\r\n // var p = {};\r\n // p[x] = sorting[x];\r\n // result.push(p);\r\n // }\r\n // }\r\n // return result;\r\n // }\r\n\r\n return {\r\n autoComplete: autoComplete,\r\n autocompleteCww: autocompleteCww,\r\n autocompleteCsl: autocompleteCsl,\r\n autocompleteCfs: autocompleteCfs,\r\n autocompleteCmts: autocompleteCmts,\r\n getCompany: getCompany,\r\n getCompanies: getCompanies,\r\n getCompaniesFilter: getCompaniesFilter,\r\n getCompanyObject: getCompanyObject,\r\n //getGroups: getGroups,\r\n getCompanyDetails: getCompanyDetails,\r\n uploadFile: uploadFile,\r\n postBulkCompanies:postBulkCompanies,\r\n getCompanyTable: function(){\r\n if($state.current.name.includes('new')){\r\n companyTable.settings().data =[];\r\n }\r\n return companyTable;\r\n },\r\n getAllCompaniesCount : function(){\r\n return allCompanyCount;\r\n },\r\n getCompanyTableData : function(){\r\n return companyTableData;\r\n },\r\n getCompanyLensTable: function(){\r\n if($state.current.name.includes('new')){\r\n companyLensTable.settings().data =[];\r\n }\r\n return companyLensTable;\r\n },\r\n addCompanytable : function(data,count){\r\n\r\n companyTable.data.push(data);\r\n if(count >0){\r\n companyTable.total(count);\r\n }else{\r\n companyTable.total(companyTable.data.length);\r\n }\r\n },\r\n addCompanyLenstable : function(data,count){\r\n\r\n companyLensTable.data.push(data);\r\n if(count >0){\r\n companyLensTable.total(count);\r\n }else{\r\n companyLensTable.total(companyLensTable.data.length);\r\n }\r\n },\r\n DeleteLensGroupTable : function(data){\r\n\r\n companyTable.total(companyTable.data.length);\r\n },\r\n\r\n DeleteLensCompanyTable : function(data){\r\n\r\n companyTable.total(companyTable.data.length);\r\n },\r\n DeleteCompanyLensTable : function(data){\r\n\r\n companyLensTable.total(companyLensTable.data.length);\r\n },\r\n setQuery: setQuery,\r\n buildQuery: buildQuery,\r\n createNewCompany: createNewCompany,\r\n updateCompany: updateCompany,\r\n deleteCompany: deleteCompany,\r\n deleteConfirmCompany : deleteConfirmCompany,\r\n exportCompanyLogs: exportCompanyLogs,\r\n getSelectedCompanies : getSelectedCompanies,\r\n setSelectedLensCompanies : setSelectedLensCompanies,\r\n getSelectedLensCompanies : getSelectedLensCompanies,\r\n companyRouteChanged : companyRouteChanged,\r\n getCompanyRouteStatus : getCompanyRouteStatus,\r\n clearCompanyTable : clearCompanyTable,\r\n setUserAddCheck : setUserAddCheck,\r\n sendErrorsToEmails:sendErrorsToEmails,\r\n getBulkCompanies: getBulkCompanies,\r\n addToLensGroupTable : function(data){companyTable.data.push(data)}\r\n\r\n\r\n };\r\n\r\n function companyRouteChanged(data){\r\n routeStatus = data;\r\n }\r\n function getCompanyRouteStatus(){\r\n return routeStatus ;\r\n }\r\n\r\n function setUserAddCheck(addUserCheck){\r\n $rootScope.$broadcast(\"saveBtnChecking\", addUserCheck);\r\n return addUserCheck;\r\n }\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCww(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCsl(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCfs(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autocompleteCmts(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function setQuery(q){\r\n // query = q;\r\n // companyTable.page(1);\r\n // companyTable.reload();\r\n // Added by Abheesh\r\n companyTable.filter({});\r\n companyTable.filter(q)\r\n companyTable.page(1)\r\n companyTable.reload();\r\n }\r\n\r\n /**\r\n * Returns a blank company object\r\n * @return {object}\r\n */\r\n function getCompanyObject() {\r\n return {name: \"\", company_id: \"\", is_demo:false, is_cww:false, is_csl:false, is_cfs:false, is_cmts:false, show_booking_shipment:false,\r\n show_discussion_module:false, show_discussion_module_csl:false, show_discussion_module_cfs:false, show_discussion_module_cmts:false,\r\n cww_default_bccs: [], cww_party_id_names: [], cww_related_party_id_names: [], is_threshold_default:true, is_send_exception_email:false, is_show_class:false,\r\n csl_default_bccs: [], csl_customer_ids: [], csl_exception_hours:\"00\", csl_exception_minutes:\"00\",\r\n cfs_default_bccs: [], cfs_customer_ids: [], cfs_exception_hours:\"00\", cfs_exception_minutes:\"00\",\r\n is_cfs_threshold_default: true, is_cfs_send_exception_email : false, is_cfs_show_class : false,\r\n cmts_default_bccs: [], cmts_customer_ids: [], cmts_exception_hours:\"00\", cmts_exception_minutes:\"00\",\r\n is_cmts_threshold_default: true, is_cmts_send_exception_email : false,\r\n default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true, is_reskin: false,\r\n accessTypeStandard: false, accessTypeClassic: false,companyEnableCheck: false,portalType: \"\"};\r\n }\r\n\r\n // ---------------------\r\n // Retrieve a list of groups\r\n // // ------------------\r\n //function getGroups(){\r\n // return $http.get(api.url + '/groups', {timeout: deferred.promise})\r\n // .then(function onSuccess(response){\r\n // return response.data.groups;\r\n // }, function onError(response){\r\n // if (response.status === 0){\r\n // // Handle timeout or network error\r\n // } else {\r\n // // Handle error from server\r\n // }\r\n // });\r\n //}\r\n // ---------------------\r\n // Retrieve a list of companies\r\n // // ------------------\r\n function getCompanies(param,searchParam){\r\n var params = param;\r\n timeoutTid = false;\r\n allCompanyCount=0;\r\n companyTableData=companyLensTable.data=[];\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n var company_url = api.url_v2+\"/companies\";\r\n if(param == 'lens_group'){\r\n company_url = api.url_v2+\"/companies/\"+\"?lens_group=true\";\r\n }else if(param == 'lens_group_companies'){\r\n // company_url = company_url+'/lens_groups/'+$stateParams.id+'/edit';\r\n if($stateParams.id)\r\n company_url = api.url_v2+\"/companies/\"+$stateParams.id;\r\n\r\n }else if(param == 'company_exceptions'){\r\n // company_url = company_url+'/lens_groups/'+$stateParams.id+'/edit';\r\n if($stateParams.id)\r\n company_url = api.url_v2+\"/companies/\"+$stateParams.id;\r\n\r\n }else if(param == 'lens_group_companies_view'){\r\n company_url = api.url_v2+'/lens_groups/'+$stateParams.id+'/edit';\r\n }\r\n else if(params == true){\r\n company_url = api.url_v2+\"/companies?active=true\";\r\n }\r\n\r\n if(param != 'lens_group_companies') {\r\n $rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n }\r\n\r\n if(searchParam){\r\n var queryBuildStr='';\r\n if(searchParam.name !== undefined)\r\n queryBuildStr+=\"&name=\"+searchParam.name;\r\n\r\n if(searchParam.page !== undefined)\r\n queryBuildStr+=\"&page=\"+searchParam.page;\r\n\r\n if(searchParam.per_page !== undefined)\r\n queryBuildStr+=\"&per_page=\"+searchParam.per_page;\r\n\r\n if(searchParam.key !== undefined){\r\n queryBuildStr+=\"&key=\"+searchParam.key;\r\n queryBuildStr+=\"&criteria=\"+ searchParam.criteria;\r\n }\r\n else\r\n {\r\n queryBuildStr+=\"&key=name&criteria=asc\";\r\n }\r\n\r\n if(param !==undefined && param !== '' && param !== false && queryBuildStr != undefined && queryBuildStr!=''){\r\n company_url = company_url+\"&\"+queryBuildStr;\r\n company_url = company_url.replace('&&','&');\r\n }\r\n else if(queryBuildStr != undefined && queryBuildStr!=''){\r\n company_url = company_url+\"?\"+queryBuildStr;\r\n company_url = company_url.replace('?&','?');\r\n }\r\n }\r\n\r\n var promise = $http({url: company_url, method: \"GET\", timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n\r\n if(params == 'lens_group_companies'){\r\n lensGroupData = response.data.lens_groups;\r\n companyLensTable.total(response.data.lens_groups.length);\r\n companyLensTable.settings({data: response.data.lens_groups});\r\n companyLensTable.data = response.data.lens_groups;\r\n isEmpty = companyLensTable.data.length === 0;\r\n loading = false;\r\n return companyLensTable.data;\r\n }else if(params == 'company_exceptions'){\r\n lensGroupData = response.data.csl_exception_approvers;\r\n companyExceptionTable.total(response.data.csl_exception_approvers.length);\r\n companyExceptionTable.settings({data: response.data.csl_exception_approvers});\r\n companyExceptionTable.data = response.data.csl_exception_approvers;\r\n isEmpty = companyExceptionTable.data.length === 0;\r\n loading = false;\r\n return companyExceptionTable.data;\r\n }\r\n else if(params == 'lens_group_companies_view'){\r\n lensGroupData = [];\r\n companyTable.settings({data: response.data.companies});\r\n companyTable.data = response.data.companies;\r\n isEmpty = response.data.company_count === 0;\r\n allCompanyCount=response.data.company_count;\r\n companyTable.page(1);\r\n companyTable.total(response.data.company_count);\r\n companyTableData=response.data.companies;\r\n loading = false;\r\n $rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n // $rootScope.$broadcast(\"companiesTable:loaded\", companyTable.data);\r\n return companyTable.data;\r\n }\r\n else{\r\n //changeCompanyTable('companyTable');\r\n lensGroupData = [];\r\n companyTable.settings({data: response.data.companies});\r\n companyTable.data = response.data.companies;\r\n isEmpty = response.data.all_company_count === 0;\r\n allCompanyCount=response.data.all_company_count;\r\n companyTable.page(searchParam.page);\r\n companyTable.total(response.data.all_company_count);\r\n companyTableData=response.data.companies;\r\n loading = false;\r\n $rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n // $rootScope.$broadcast(\"companiesTable:loaded\", companyTable.data);\r\n return companyTable.data;\r\n }\r\n\r\n //loading = false;\r\n // if(param != 'lens_group_companies') {\r\n //$rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n //$rootScope.$broadcast(\"companiesTable:loaded\", companyTable.data);\r\n //}\r\n //return companyTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n }\r\n\r\n\r\n function getCompaniesFilter(query,filter,status){\r\n timeoutTid = false;\r\n deferred = deferred || $q.defer();\r\n loading = true;\r\n allCompanyCount=0;\r\n companyTableData=companyLensTable.data=[];\r\n var company_url = api.url_v2+\"/companies\";\r\n\r\n if(query.search){\r\n var queryBuildStr='';\r\n if(query.search.name !== undefined)\r\n queryBuildStr+=\"&name=\"+query.search.name;\r\n\r\n if(query.search.page !== undefined)\r\n queryBuildStr+=\"&page=\"+query.search.page;\r\n\r\n if(query.search.per_page !== undefined)\r\n queryBuildStr+=\"&per_page=\"+query.search.per_page;\r\n\r\n if(query.search.key !== undefined){\r\n queryBuildStr+=\"&key=\"+query.search.key;\r\n queryBuildStr+=\"&criteria=\"+ query.search.criteria;\r\n }\r\n else\r\n {\r\n queryBuildStr+=\"&key=name&criteria=asc\";\r\n }\r\n\r\n if(queryBuildStr != undefined && queryBuildStr!=''){\r\n company_url = company_url+\"?\"+queryBuildStr;\r\n company_url = company_url.replace('?&','?');\r\n }\r\n }\r\n\r\n var company_params = {};\r\n if(status == false)\r\n company_params = {customer_types:JSON.stringify(query.customer_types), filter_only: filter};\r\n else\r\n company_params = {customer_types:JSON.stringify(query.customer_types), filter_only: filter, active: status};\r\n\r\n var promise =\r\n $http({\r\n url: company_url,\r\n method: \"GET\",\r\n params: company_params\r\n }).then(function onSuccess(response){\r\n lensGroupData = [];\r\n //companyTable.page(searchParam.page);\r\n companyTable.total(response.data.all_company_count);\r\n companyTable.settings({data: response.data.companies});\r\n companyTable.data = response.data.companies;\r\n companyTableData=response.data.companies;\r\n isEmpty = response.data.all_company_count === 0;\r\n allCompanyCount=response.data.all_company_count;\r\n companyTable.page(query.search.page);\r\n loading = false;\r\n $rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n // $rootScope.$broadcast(\"companiesTable:loaded\", companyTable.data);\r\n return companyTable.data;\r\n\r\n //loading = false;\r\n // if(param != 'lens_group_companies') {\r\n //$rootScope.$broadcast(\"companiesTable:stateChanged\", loading);\r\n //$rootScope.$broadcast(\"companiesTable:loaded\", companyTable.data);\r\n //}\r\n //return companyTable.data;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n }).finally(function(){\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n deferred = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (deferred) deferred.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n }\r\n\r\n\r\n // ---------------------\r\n // Retrieve a company\r\n // // ------------------\r\n function getCompany(id){\r\n company = getCompanyObject();\r\n return $http.get(api.url_v2 + '/companies/' + id, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n company = unpackageCompanyNew(response.data);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n company = null;\r\n });\r\n }\r\n\r\n function getCompanyDetails() {\r\n return company;\r\n }\r\n\r\n function buildQuery(){\r\n var search = [];\r\n for (var key in query){\r\n if (query[key]){\r\n search.push(key + '=' + query[key]);\r\n }\r\n }\r\n return search ? '?' + search.join('&') : \"\";\r\n }\r\n\r\n // --------------------------------------\r\n // Create a new company\r\n // --------------------------------------\r\n function createNewCompany(company) {\r\n return $http.post(api.url_v2 + '/companies/',company, {timeout: deferred.promise});\r\n }\r\n\r\n // --------------------------------------\r\n // Update company\r\n // --------------------------------------\r\n function updateCompany(_company_, id) {\r\n var params = {name: company.name, default_contact_id: +company.default_contact_id, default_bccs: company.default_bccs, is_active: company.is_active};\r\n return $http.put(api.url_v2 + '/companies/' + id, _company_, {timeout: deferred.promise});\r\n }\r\n\r\n // --------------------------------------\r\n // Delete company\r\n // --------------------------------------\r\n function deleteCompany(id){\r\n $timeout.cancel(deferred.promise);\r\n var promise = $q.defer();\r\n $http.delete(api.url_v2 + '/companies/' + id, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n function deleteConfirmCompany(id){\r\n $timeout.cancel(deferred.promise);\r\n var promise = $q.defer();\r\n $http.get(api.url_v2 + '/companies/' + id + '/destroy_confirm', {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n // --------------------------------------\r\n // Package the company for create and update\r\n // --------------------------------------\r\n function packageCompany(_company_){\r\n var keys = ['name', 'default_contact_id', 'default_bccs', 'is_active', 'party_id_names', 'related_party_id_names','lens_group_ids','user_ids','is_demo','is_reskin','reskin_type'];\r\n var params = {};\r\n for(var k in keys) {\r\n if((_company_[keys[k]] || (keys[k] === 'is_active') || (keys[k] === 'is_demo') || (keys[k] === 'is_reskin')) && _company_[keys[k]] !== '') {\r\n params[keys[k]] = _company_[keys[k]];\r\n }\r\n }\r\n // debugger;\r\n return params;\r\n }\r\n\r\n function packageCompanyNew(_company_){\r\n var keys = ['name', 'customer_type', 'customer_type_setup', 'is_active','lens_group_ids','user_ids','is_demo'];\r\n var params = {};\r\n for(var k in keys) {\r\n if((_company_[keys[k]] || (keys[k] === 'is_active') || (keys[k] === 'is_demo')) && _company_[keys[k]] !== '') {\r\n params[keys[k]] = _company_[keys[k]];\r\n }\r\n }\r\n // debugger;\r\n return params;\r\n }\r\n\r\n function unpackageCompany(company_data){\r\n var company = {};\r\n for (var field in company_data){\r\n company[field] = company_data[field];\r\n }\r\n return company;\r\n }\r\n\r\n function unpackageCompanyNew(company_data){\r\n\r\n var company = {};\r\n for (var field in company_data){\r\n company[field] = company_data[field];\r\n if(field == 'customer_types'){\r\n if(company_data[field].includes('cww')){ company['is_cww'] = true; }else{ company['is_cww'] = false; }\r\n if(company_data[field].includes('csl')){ company['is_csl'] = true; }else{ company['is_csl'] = false; }\r\n if(company_data[field].includes('cfs')){ company['is_cfs'] = true; }else{ company['is_cfs'] = false; }\r\n if(company_data[field].includes('cmts')){ company['is_cmts'] = true; }else{ company['is_cmts'] = false; }\r\n }\r\n\r\n if(field == 'customer_type_setup'){\r\n if(company_data['customer_types'].includes('cww')){\r\n company['is_reskin'] = company_data[field].cww.is_reskin;\r\n company['show_booking_shipment'] = company_data[field].cww.show_booking_shipment;\r\n company['show_discussion_module'] = company_data[field].cww.discussion_enabled;\r\n company['cww_default_contact_id'] = company_data[field].cww.default_contact_id;\r\n company['cww_default_bccs'] = company_data[field].cww.default_bccs;\r\n company['cww_party_id_names'] = company_data[field].cww.party_id_names;\r\n company['cww_related_party_id_names'] = company_data[field].cww.related_party_id_names;\r\n }\r\n if(company_data['customer_types'].includes('csl')){\r\n company['csl_default_contact_id'] = company_data[field].csl.default_contact_id;\r\n company['csl_default_bccs'] = company_data[field].csl.default_bccs;\r\n company['csl_customer_ids'] = company_data[field].csl.party_id_names;\r\n company['is_send_exception_email'] = company_data[field].csl.do_not_send_exception_mails;\r\n company['is_show_class'] = company_data[field].csl.show_shipment_class;\r\n //company['show_discussion_module_csl'] = company_data[field].csl.discussion_enabled;\r\n company['csl_exception_hours'] = (company_data[field].csl.exception_threshold_hours == 0)? '00' : company_data[field].csl.exception_threshold_hours;\r\n company['csl_exception_minutes'] = (company_data[field].csl.exception_threshold_minutes == 0)? '00' : company_data[field].csl.exception_threshold_minutes;\r\n company['csl_exception_hours_exist'] = (company_data[field].csl.exception_threshold_hours == 0)? '00' : company_data[field].csl.exception_threshold_hours;\r\n company['csl_exception_minutes_exist'] = (company_data[field].csl.exception_threshold_minutes == 0)? '00' : company_data[field].csl.exception_threshold_minutes;\r\n\r\n }\r\n if(company_data['customer_types'].includes('cfs')){\r\n company['cfs_default_contact_id'] = company_data[field].cfs.default_contact_id;\r\n company['cfs_default_bccs'] = company_data[field].cfs.default_bccs;\r\n company['cfs_customer_ids'] = company_data[field].cfs.party_id_names;\r\n company['is_cfs_send_exception_email'] = company_data[field].cfs.do_not_send_exception_mails;\r\n company['is_cfs_show_class'] = company_data[field].cfs.show_shipment_class;\r\n\r\n //company['show_discussion_module_cfs'] = company_data[field].cfs.discussion_enabled;\r\n\r\n company['cfs_exception_hours'] = (company_data[field].cfs.exception_threshold_hours == 0)? '00' : company_data[field].cfs.exception_threshold_hours;\r\n company['cfs_exception_minutes'] = (company_data[field].cfs.exception_threshold_minutes == 0)? '00' : company_data[field].cfs.exception_threshold_minutes;\r\n company['cfs_exception_hours_exist'] = (company_data[field].cfs.exception_threshold_hours == 0)? '00' : company_data[field].cfs.exception_threshold_hours;\r\n company['cfs_exception_minutes_exist'] = (company_data[field].cfs.exception_threshold_minutes == 0)? '00' : company_data[field].cfs.exception_threshold_minutes;\r\n\r\n\r\n }\r\n if(company_data['customer_types'].includes('cmts')){\r\n company['cmts_default_contact_id'] = company_data[field].cmts.default_contact_id;\r\n company['cmts_default_bccs'] = company_data[field].cmts.default_bccs;\r\n company['cmts_customer_ids'] = company_data[field].cmts.party_id_names;\r\n company['is_cmts_send_exception_email'] = company_data[field].cmts.do_not_send_exception_mails;\r\n company['is_cmts_show_class'] = company_data[field].cmts.show_shipment_class;\r\n\r\n //company['show_discussion_module_cfs'] = company_data[field].cfs.discussion_enabled;\r\n\r\n company['cmts_exception_hours'] = (company_data[field].cmts.exception_threshold_hours == 0)? '00' : company_data[field].cmts.exception_threshold_hours;\r\n company['cmts_exception_minutes'] = (company_data[field].cmts.exception_threshold_minutes == 0)? '00' : company_data[field].cmts.exception_threshold_minutes;\r\n company['cmts_exception_hours_exist'] = (company_data[field].cmts.exception_threshold_hours == 0)? '00' : company_data[field].cmts.exception_threshold_hours;\r\n company['cmts_exception_minutes_exist'] = (company_data[field].cmts.exception_threshold_minutes == 0)? '00' : company_data[field].cmts.exception_threshold_minutes;\r\n\r\n\r\n }\r\n }\r\n }\r\n return company;\r\n\r\n\r\n return {name: \"\", company_id: \"\", is_demo:false, is_cww:false, is_csl:false, is_cfs:false, is_cmts:false,\r\n cww_default_bccs: [],cww_party_id_names: [],cww_related_party_id_names: [],\r\n csl_default_bccs: [],csl_customer_ids: [],cfs_default_bccs: [],cfs_customer_ids: [],cmts_default_bccs: [],cmts_customer_ids: [],\r\n default_bccs: [], party_id_names: [], related_party_id_names: [], is_active: true, is_reskin: false};\r\n }\r\n\r\n // --------------------------------------\r\n // Package the user for create and update\r\n // --------------------------------------\r\n function packageUser(){\r\n var keys = ['first_name', 'last_name', 'email', 'phone', 'title', 'password', 'company_id', 'group_ids', 'party_id_names', 'related_party_id_names'];\r\n var updatedUser = {};\r\n for(var k in keys) {\r\n if(user[keys[k]] && user[keys[k]] !== '') {\r\n updatedUser[keys[k]] = user[keys[k]];\r\n }\r\n }\r\n return updatedUser;\r\n }\r\n\r\n function unpackageUser(user_data){\r\n for (var field in user_data){\r\n user[field] = user_data[field];\r\n }\r\n if (!user.contact.ccs) user.contact.ccs = [];\r\n //debugger\r\n user.company_id = user.company.id;\r\n }\r\n\r\n function exportCompanyLogs(company) {\r\n\r\n var url = api.url_v2 + \"/companies/\"+ company.id + \"/export_logs\";\r\n\r\n\r\n var req_params = {};\r\n\r\n var csv_date = new Date();\r\n var filename = (moment().format('YYYY-MM-DD') + '-Company'+ company.id+ 'Logs.csv');\r\n return DownloadService.getDownloadFile(url, req_params, filename);\r\n // var promise = $http({url: url, method: \"GET\", params: req_params}).then(function(res){\r\n // var anchor = angular.element('<a/>');\r\n // anchor.attr({\r\n // href: 'data:attachment/csv;charset=utf-8,'+ encodeURI(res.data),\r\n // target: '_blank',\r\n // download: moment().format('YYYY-MM-DD') + '-PotentialExceptions.csv'\r\n // })[0].click();\r\n\r\n // return res.data;\r\n // });\r\n // return promise;\r\n }\r\n\r\n function getSelectedCompanies(){\r\n if(companyTable.settings().data){\r\n return companyTable.settings().data\r\n .filter(function(company){\r\n return company.selected;\r\n })\r\n } else {\r\n return [];\r\n }\r\n }\r\n\r\n // ----------------------------\r\n // POST to upload a file\r\n // ----------------------------\r\n function uploadFile(file, errFiles) {\r\n return Upload.upload({\r\n url: api.url_v2 + '/bulk_companies/import',\r\n method: 'POST',\r\n data: {company_csv: file}\r\n }).then(function (response) {\r\n bulk_companies.length = 0;\r\n response.data.map(function(f){ bulk_companies.push(f); });\r\n });\r\n }\r\n\r\n // ----------------------------\r\n // Create Users in bulk\r\n // ----------------------------\r\n function postBulkCompanies(companies){\r\n companies = companies.map(function(company){\r\n var c= {};\r\n [\"name\", \"access_type\", \"portal_type\", \"customer_types\",\"cww_default_contact\", \"cww_default_bccs\", \"cww_party_ids\",\"cww_group_ids\",\"cww_enable_discussion\",\"cww_enable_show_bookings\"\r\n ,\"cww_enable_magno_skin\",\"cww_enable_action_board\",\"cww_refresh_time\",\"csl_default_contact\",\"csl_default_bccs\",\"csl_customer_ids\",\"csl_show_class\",\"csl_send_exception_email\",\"csl_exception_threshold\"\r\n ,\"cfs_default_contact\",\"cfs_default_bccs\",\"cfs_customer_ids\",\"cfs_show_class\",\"cfs_send_exception_email\",\"cfs_exception_threshold\",\"cmts_default_contact\",\"cmts_default_bccs\"\r\n ,\"cmts_trading_partner_ids\",\"cmts_send_exception_email\",\"cmts_exception_threshold\",\"enable_demo\"].map(function(key){\r\n c[key] = company[key];\r\n });\r\n return c;\r\n })\r\n\r\n\r\n return $http.post(api.url_v2 + '/bulk_companies', {\"companies\" : companies}, {timeout: deferred.promise})\r\n .then(function(response){\r\n return response;\r\n }, function(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n return response;\r\n });\r\n // return $http.post(url, packageUser(user), {timeout: deferred.promise})\r\n //\r\n }\r\n\r\n // ----------------------------\r\n // Post errors to mail users\r\n // ----------------------------\r\n function sendErrorsToEmails(emailList, companies){\r\n return $http.post(api.url_v2 + '/bulk_companies/error_export', {\"emailList\" : emailList,\"companies\" :companies }, {timeout: deferred.promise})\r\n .then(function(response){\r\n return response;\r\n }, function(response){\r\n return response;\r\n });\r\n }\r\n\r\n function getBulkCompanies(){\r\n return bulk_companies;\r\n }\r\n\r\n function changeCompanyTable(companyTableType){\r\n if(companyTableType=='lens_group_companies_view'){\r\n companyTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n })\r\n }\r\n else{\r\n companyTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: companyTableData,\r\n total: allCompanyCount,\r\n getData: function ($defer, params) {\r\n params.total(allCompanyCount);\r\n $defer.resolve(companyTableData);\r\n }\r\n });\r\n }\r\n }\r\n\r\n function setSelectedLensCompanies(data){\r\n selectedLensCompanies = data;\r\n }\r\n function getSelectedLensCompanies(){\r\n return selectedLensCompanies ;\r\n }\r\n\r\n function clearCompanyTable(){\r\n lensGroupData = [];\r\n companyTable = new NgTableParams({\r\n page: 1,\r\n count: UserService.getUserTableSettings(),\r\n paginationMaxBlocks: 3,\r\n sorting: {name: \"asc\"}\r\n }, {\r\n counts: [10,25,50,100],\r\n dataset: []\r\n });\r\n }\r\n\r\n }\r\n})();\r\n\nangular.module('app.admin').directive('iframeOnload', [function(){\r\n return {\r\n link: function( scope , element , attrs ){\r\n element.on(\"load\", function(){ iframeReady(scope) });\r\n }\r\n}}])\r\n\r\nangular.module('app.admin').directive('cstockIframeOnload', [function(){\r\n return {\r\n link: function( scope , element , attrs ){\r\n element.ready( function(){ iframeReady(scope) } );\r\n }\r\n}}])\r\n\r\n\r\nfunction iframeReady(scope){\r\n scope.showLoaderImage = false;\r\n}\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('CompanyManagementController', CompanyManagementController);\r\n\r\n CompanyManagementController.$inject = [\"$rootScope\", \"$scope\", \"CompanyManagementService\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', 'UserManagementService', 'mdSelectHelper', '$mdMedia', '$mdDialog', 'UserService','userLensGroupService','CslExceptionService','CfsExceptionService','CmtsExceptionService','company_edit_emails','$timeout'];\r\n function CompanyManagementController($rootScope, $scope, CompanyManagementService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, UserManagementService, mdSelectHelper, $mdMedia, $mdDialog, UserService, userLensGroupService,CslExceptionService,CfsExceptionService,CmtsExceptionService,company_edit_emails,$timeout) {\r\n\r\n var vm = this;\r\n // ----------------------------------------------------\r\n // Company Table Variables\r\n // ----------------------------------------------------\r\n vm.link = {field: \"id\", column: \"name\", url: \"companies\"};\r\n vm.icon = \"business\";\r\n vm.columns = [\r\n {\"field\": \"is_active\", \"title\": 'USER.STATUS', \"sortable\": \"is_active\", \"filter\": {}, \"show\": \"true\", isDate: false},\r\n {\"field\":\"name\", \"title\": 'COMPANY.COMPANY', \"sortable\": \"name\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"customer_types\", \"title\": 'Customer Type', \"sortable\": \"customer_types\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"is_demo\", \"title\": 'Demo', \"sortable\": \"is_demo\", \"filter\": {}, \"show\":\"true\", isDate:false},\r\n {\"field\":\"reskin_type\", \"title\": 'Reskin', \"sortable\": \"reskin_type\", \"filter\": {}, \"show\":\"true\", isDate:false}\r\n ];\r\n\r\n /*if(!userLensGroupService.getReadOnly()){\r\n vm.columns.push({\"field\":\"actionremove\", \"title\": 'ADMIN.LENS.ACTIONS', \"sortable\": null, \"filter\": {}, \"show\":\"true\", isDate:false});\r\n }*/\r\n\r\n vm.buttons = [\r\n {id: 0, action: add_company, display: 'COMPANY.ADD_COMPANY', icon: 'create'},\r\n {id: 0, action: import_company, display: 'COMPANY.IMPORT_COMPANY', icon: 'create'}\r\n ];\r\n\r\n // Collapsible Widget\r\n vm.lookup = {name: \"\"};\r\n vm.companyEditEmails = company_edit_emails.email;\r\n // ----------------------------------------------------\r\n // Company Edit Variables\r\n // ----------------------------------------------------\r\n vm.company = CompanyManagementService.getCompanyObject();\r\n vm.isSave = false;\r\n vm.saveBtnShow = false;\r\n vm.party_check = false;\r\n vm.cww_party_check = false;\r\n vm.csl_party_check = false;\r\n vm.cfs_party_check = false;\r\n vm.cmts_party_check = false;\r\n vm.customer_type_cehck = false;\r\n vm.portaEditCheck = false;\r\n vm.consignee_check = (vm.company.portal_type == 'consignee') ? true : false;\r\n vm.companySearchNotEnable=true;\r\n vm.file = null;\r\n $scope.stateName = $state.current.name;\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n vm.isLoading = {save: false, createNew: false, account: false};\r\n vm.status = {cssClass: \"md-primary\"};\r\n vm.possibleContacts = [];\r\n\r\n vm.currentUser = UserService.getUserData();\r\n vm.userEmailActiveCheck = false;\r\n\r\n try{\r\n //vm.readAccessLens = JSON.parse(localStorage.getItem(\"user\")).permissions.Company.includes('read');\r\n if(JSON.parse(localStorage.getItem(\"user\")).permissions.cww.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.csl.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.cfs.Company.includes('read') || JSON.parse(localStorage.getItem(\"user\")).permissions.cmts.Company.includes('read')){\r\n vm.readAccess = true;\r\n }else\r\n {\r\n vm.readAccess = false;\r\n }\r\n }\r\n catch(e){\r\n vm.readAccess = false;\r\n }\r\n vm.cww_filter = false;\r\n vm.csl_filter = false;\r\n vm.cfs_filter = false;\r\n vm.cmts_filter = false;\r\n vm.filter_only = false;\r\n vm.primaryContactCheckCww = false;\r\n vm.primaryContactCheckCsl = false;\r\n vm.primaryContactCheckCfs = false;\r\n vm.primaryContactCheckCmts = false;\r\n vm.approversCheck = false;\r\n vm.defaultDisabled = true;\r\n vm.downloadXLSXTemplate = downloadXLSXTemplate;\r\n vm.uploadFile = uploadFile;\r\n\r\n var searchInitial = {};\r\n if($location.search() && !($location.search().per_page>0))\r\n searchInitial['per_page']= 10;\r\n\r\n if( $location.search() && !($location.search().page>0))\r\n searchInitial['page']= 1;\r\n\r\n $location.search(searchInitial);\r\n\r\n if(vm.companyTable){\r\n vm.companyTable.data=[];\r\n }\r\n // vm.companyDefaultBccs = ''; // need a \"flattened\" version of the BCCs\r\n\r\n // ----------------------------------------\r\n // Page Initialization\r\n // ----------------------------------------\r\n // Take action depending on state\r\n // ----------------------------------------\r\n\r\n vm.lensviewtitle=\"This company is added to the following Lens Groups:\";\r\n vm.departmenttitle=\"This company contains the following Departments:\";\r\n vm.exceptiontitle = \"Users Currently Assigned to Manage Exceptions\";\r\n switch ($state.current.name){\r\n\r\n case 'supportRequestViewCompany':\r\n vm.readAccess = true;\r\n $location.search('');\r\n\r\n case 'showCompany':\r\n vm.isCreate = false;\r\n vm.isLoading.account = true;\r\n $location.search('');\r\n\r\n CompanyManagementService.getCompany($stateParams.id).then(function(res){\r\n vm.isLoading.account = false;\r\n vm.company = CompanyManagementService.getCompanyDetails();\r\n\r\n $rootScope.exceptionCount = vm.company.live_exceptions_count;\r\n\r\n if(vm.company.name){\r\n vm.portaEditCheck = true;\r\n }\r\n\r\n if(vm.company.access_type.includes('portal')){\r\n vm.company.accessTypeStandard = true;\r\n vm.accessTypeEnableCheck = true;\r\n }\r\n if(vm.company.access_type.includes('classic')){\r\n vm.company.accessTypeClassic = true;\r\n vm.accessTypeEnableCheck = true;\r\n }\r\n if(vm.company.portal_type){\r\n vm.company.portalType = vm.company.portal_type;\r\n vm.portalChangeEdit(vm.company.portal_type);\r\n vm.customerTypeEnableCheck = false;\r\n }\r\n\r\n if(!vm.company.customer_types.includes('cww')){\r\n vm.company.cww_party_id_names = [];\r\n vm.company.cww_related_party_id_names = [];\r\n vm.company.cww_default_bccs = [];\r\n }\r\n if(vm.company.customer_type_setup && vm.company.customer_types.includes('cww')){\r\n vm.company.view_action_board = vm.company.customer_type_setup.cww.view_action_board;\r\n vm.company.refresh_time = vm.company.customer_type_setup.cww.refresh_time;\r\n }\r\n if(!vm.company.customer_types.includes('csl')){\r\n //$rootScope.hoursCheck = (vm.company.customer_type_setup.csl.exception_threshold_hours ? vm.company.customer_type_setup.csl.exception_threshold_hours : 0);\r\n //$rootScope.minutesCheck = (vm.company.customer_type_setup.csl.exception_threshold_minutes ? vm.company.customer_type_setup.csl.exception_threshold_minutes : 0);\r\n vm.company.csl_customer_ids = [];\r\n vm.company.csl_default_bccs = [];\r\n\r\n vm.company.is_threshold_default = true;\r\n vm.company.csl_exception_hours = '00';\r\n vm.company.csl_exception_minutes = '00';\r\n\r\n }\r\n\r\n if(vm.company.customer_types.includes('csl')){\r\n vm.approversCheck = true;\r\n $rootScope.hoursCheck = (vm.company.customer_type_setup.csl.exception_threshold_hours ? vm.company.customer_type_setup.csl.exception_threshold_hours : 0);\r\n $rootScope.minutesCheck = (vm.company.customer_type_setup.csl.exception_threshold_minutes ? vm.company.customer_type_setup.csl.exception_threshold_minutes : 0);\r\n if($rootScope.hoursCheck == 0 && $rootScope.minutesCheck == 0){\r\n vm.company.is_threshold_default = true;\r\n }else{\r\n vm.company.is_threshold_default = false;\r\n }\r\n }\r\n\r\n if(!vm.company.customer_types.includes('cfs')){\r\n vm.company.cfs_customer_ids = [];\r\n vm.company.cfs_default_bccs = [];\r\n\r\n vm.company.is_cfs_threshold_default = true;\r\n vm.company.cfs_exception_hours = '00';\r\n vm.company.cfs_exception_minutes = '00';\r\n }\r\n\r\n if(vm.company.customer_types.includes('cfs')){\r\n\r\n $rootScope.cfs_hoursCheck = (vm.company.customer_type_setup.cfs.exception_threshold_hours ? vm.company.customer_type_setup.cfs.exception_threshold_hours : 0);\r\n $rootScope.cfs_minutesCheck = (vm.company.customer_type_setup.cfs.exception_threshold_minutes ? vm.company.customer_type_setup.cfs.exception_threshold_minutes : 0);\r\n if($rootScope.cfs_hoursCheck == 0 && $rootScope.cfs_minutesCheck == 0){\r\n vm.company.is_cfs_threshold_default = true;\r\n }else{\r\n vm.company.is_cfs_threshold_default = false;\r\n }\r\n }\r\n if(!vm.company.customer_types.includes('cmts')){\r\n vm.company.cmts_customer_ids = [];\r\n vm.company.cmts_default_bccs = [];\r\n\r\n vm.company.is_cmts_threshold_default = true;\r\n vm.company.cmts_exception_hours = '00';\r\n vm.company.cmts_exception_minutes = '00';\r\n }\r\n\r\n if(vm.company.customer_types.includes('cmts')){\r\n\r\n $rootScope.cmts_hoursCheck = (vm.company.customer_type_setup.cmts.exception_threshold_hours ? vm.company.customer_type_setup.cmts.exception_threshold_hours : 0);\r\n $rootScope.cmts_minutesCheck = (vm.company.customer_type_setup.cmts.exception_threshold_minutes ? vm.company.customer_type_setup.cmts.exception_threshold_minutes : 0);\r\n if($rootScope.cmts_hoursCheck == 0 && $rootScope.cmts_minutesCheck == 0){\r\n vm.company.is_cmts_threshold_default = true;\r\n }else{\r\n vm.company.is_cmts_threshold_default = false;\r\n }\r\n }\r\n angular.forEach(vm.companyEditEmails,function(key,val){\r\n if(key === vm.currentUser.email){\r\n vm.company.companyEnableCheck = true;\r\n vm.accessTypeEnableCheck = true;\r\n vm.portaEditCheck = false;\r\n vm.userEmailActiveCheck = true;\r\n vm.defaultDisabled = false;\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = false;\r\n vm.checkboxCustType1 = false;\r\n }\r\n });\r\n if (!vm.company){\r\n $location.url(\"/companies\");\r\n }\r\n if (!vm.company.is_active){\r\n vm.status.cssClass = \"md-danger\";\r\n }\r\n // vm.companyDefaultBccs = (angular.isArray(vm.company.default_bccs) ? vm.company.default_bccs : []).join(', ');\r\n $log.debug(vm.company);\r\n });\r\n break;\r\n\r\n case 'createCompany':\r\n vm.isCreate = true;\r\n $location.search('');\r\n\r\n case 'manageCompanies':\r\n var search = $location.search();\r\n vm.allCompaniesCount=CompanyManagementService.getAllCompaniesCount();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n\r\n if(search.per_page ==undefined)\r\n search.per_page=10;\r\n\r\n if(search.page ==undefined)\r\n search.page=1;\r\n\r\n //CompanyManagementService.setQuery(search);\r\n $scope.$on('companiesTable:stateChanged', function(evt, loading){\r\n vm.isLoading.table = loading;\r\n });\r\n\r\n $scope.$watch('vm.companyTable.parameters().sorting', function(evt,data) {\r\n var searchValChanges=$location.search();\r\n var searchEanble=false;\r\n if(vm.companyTable.parameters().sorting.name){\r\n searchValChanges.key='name';\r\n searchValChanges.criteria=vm.companyTable.parameters().sorting.name;\r\n searchEanble=true;\r\n }\r\n\r\n if(vm.companyTable.parameters().sorting.is_active){\r\n searchValChanges.key='is_active';\r\n searchValChanges.criteria=vm.companyTable.parameters().sorting.is_active;\r\n searchEanble=true;\r\n }\r\n\r\n if(vm.companyTable.parameters().sorting.customer_types){\r\n searchValChanges.key='customer_types';\r\n searchValChanges.criteria=vm.companyTable.parameters().sorting.customer_types;\r\n searchEanble=true;\r\n }\r\n\r\n if(vm.companyTable.parameters().sorting.is_demo){\r\n searchValChanges.key='is_demo';\r\n searchValChanges.criteria=vm.companyTable.parameters().sorting.is_demo;\r\n searchEanble=true;\r\n }\r\n\r\n //if(vm.companyTable.parameters().sorting.reskin_type){\r\n // searchValChanges.key='reskin_type';\r\n // searchValChanges.criteria=vm.companyTable.parameters().sorting.reskin_type;\r\n //}\r\n\r\n if(searchEanble){\r\n $location.search(searchValChanges);\r\n companySearchFilter();\r\n }\r\n });\r\n\r\n $scope.$watch('vm.companyTable.parameters().count', function() {\r\n if( vm.companyTable.parameters().count != undefined && $location.search().per_page != vm.companyTable.parameters().count){\r\n var searchValChanges=$location.search();\r\n searchValChanges.per_page=vm.companyTable.parameters().count;\r\n searchValChanges.page=1;\r\n $location.search(searchValChanges);\r\n companySearchFilter();\r\n vm.companyTable=CompanyManagementService.getCompanyTable();\r\n }\r\n });\r\n\r\n $scope.$watch('vm.companyTable.parameters().page', function() {\r\n if(vm.companyTable.parameters().page != undefined && $location.search().page != vm.companyTable.parameters().page){\r\n var searchValChanges=$location.search();\r\n searchValChanges.per_page=vm.companyTable.parameters().count;\r\n searchValChanges.page=vm.companyTable.parameters().page;\r\n $location.search(searchValChanges);\r\n companySearchFilter();\r\n vm.companyTable=CompanyManagementService.getCompanyTable();\r\n }\r\n });\r\n\r\n CompanyManagementService.getCompanies('',search);\r\n vm.companyTable=CompanyManagementService.getCompanyTable();\r\n break;\r\n case 'viewCompanies':\r\n var search = $location.search();\r\n for (var key in search){\r\n vm.lookup[key] = search[key];\r\n }\r\n\r\n if(search.per_page ==undefined)\r\n search.per_page=10;\r\n\r\n if(search.page ==undefined)\r\n search.page=1;\r\n\r\n //CompanyManagementService.setQuery(search);\r\n $scope.$on('companiesTable:stateChanged', function(evt, loading){\r\n vm.isLoading.table = loading;\r\n });\r\n\r\n $scope.$watch('vm.companyTable.parameters().sorting', function(evt,data) {\r\n var searchValChanges=$location.search();\r\n var searchEanble=false;\r\n if(vm.companyTable.parameters().sorting.name){\r\n searchValChanges.key='name';\r\n searchValChanges.criteria=vm.companyTable.parameters().sorting.name;\r\n searchEanble=true;\r\n }\r\n\r\n if(vm.companyTable.parameters().sorting.is_active){\r\n searchValChanges.key='is_active';\r\n searchValChanges.criteria=vm.companyTable.parameters().sorting.is_active;\r\n searchEanble=true;\r\n }\r\n\r\n if(vm.companyTable.parameters().sorting.customer_types){\r\n searchValChanges.key='customer_types';\r\n searchValChanges.criteria=vm.companyTable.parameters().sorting.customer_types;\r\n searchEanble=true;\r\n }\r\n\r\n if(vm.companyTable.parameters().sorting.is_demo){\r\n searchValChanges.key='is_demo';\r\n searchValChanges.criteria=vm.companyTable.parameters().sorting.is_demo;\r\n searchEanble=true;\r\n }\r\n\r\n //if(vm.companyTable.parameters().sorting.reskin_type){\r\n // searchValChanges.key='reskin_type';\r\n // searchValChanges.criteria=vm.companyTable.parameters().sorting.reskin_type;\r\n //}\r\n\r\n if(searchEanble){\r\n $location.search(searchValChanges);\r\n companySearchFilter();\r\n }\r\n });\r\n\r\n $scope.$watch('vm.companyTable.parameters().count', function() {\r\n if( vm.companyTable.parameters().count != undefined && $location.search().per_page != vm.companyTable.parameters().count){\r\n var searchValChanges=$location.search();\r\n searchValChanges.per_page=vm.companyTable.parameters().count;\r\n searchValChanges.page=1;\r\n $location.search(searchValChanges);\r\n companySearchFilter();\r\n //vm.companyTable=CompanyManagementService.getCompanyTable();\r\n }\r\n });\r\n\r\n $scope.$watch('vm.companyTable.parameters().page', function() {\r\n if(vm.companyTable.parameters().page != undefined && $location.search().page != vm.companyTable.parameters().page){\r\n var searchValChanges=$location.search();\r\n searchValChanges.per_page=vm.companyTable.parameters().count;\r\n searchValChanges.page=vm.companyTable.parameters().page;\r\n $location.search(searchValChanges);\r\n companySearchFilter();\r\n //vm.companyTable=CompanyManagementService.getCompanyTable();\r\n }\r\n });\r\n\r\n CompanyManagementService.getCompanies('',search);\r\n vm.companyTable=CompanyManagementService.getCompanyTable();\r\n break;\r\n case 'importCompanies':\r\n $location.search('');\r\n $scope.$watch(\"vm.file\", function(newValue, oldValue){\r\n if (newValue != oldValue){\r\n vm.uploadFile(vm.file);\r\n }\r\n });\r\n break;\r\n } // end switch\r\n\r\n // load the Crane Contacts\r\n UserManagementService.getContacts().then(function(data){\r\n data.sort(function(a, b) {\r\n return a.email > b.email ? 1 : -1;\r\n });\r\n vm.possibleContacts = data;\r\n });\r\n\r\n\r\n //-----------\r\n // Functions\r\n //-----------\r\n vm.activateCompany = activateCompany;\r\n vm.deactivateCompany = deactivateCompany;\r\n vm.deleteCompany = deleteCompany;\r\n vm.getField = getField;\r\n vm.isLink = isLink;\r\n vm.getClass = getClass;\r\n vm.getLink = getLink;\r\n vm.getMatch = getMatch;\r\n vm.getMatchCww = getMatchCww;\r\n vm.getMatchCsl = getMatchCsl;\r\n vm.getMatchCfs = getMatchCfs;\r\n vm.getMatchCmts = getMatchCmts;\r\n vm.getTable = getTable;\r\n vm.resetAll = resetAll;\r\n vm.resetBCCS = resetBCCS;\r\n vm.resetPrimary = resetPrimary;\r\n vm.saveCompany = saveCompany;\r\n vm.createNewCompany = createNewCompany;\r\n vm.formIsValid = formIsValid;\r\n vm.checkError = checkError;\r\n vm.companySearch = companySearch;\r\n vm.companySearchFilter = companySearchFilter;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.getCompanyUserCount = getCompanyUserCount;\r\n vm.logExportShowCSV = logExportShowCSV;\r\n vm.logsVisible = logsVisible;\r\n vm.addPartyIds = addPartyIds;\r\n vm.addPartyIdsCww = addPartyIdsCww;\r\n vm.addPartyIdsCsl = addPartyIdsCsl;\r\n vm.addPartyIdsCfs = addPartyIdsCfs;\r\n vm.addPartyIdsCmts = addPartyIdsCmts;\r\n vm.listCompany = listCompany;\r\n vm.cww_setup = cww_setup;\r\n vm.csl_setup = csl_setup;\r\n vm.cfs_setup = cfs_setup;\r\n vm.cmts_setup = cmts_setup;\r\n vm.CustomerFilter = CustomerFilter;\r\n vm.is_active_cehck = false;\r\n vm.changeActiveStatus = changeActiveStatus;\r\n vm.filterCheck = true;\r\n vm.csl_threshold_default = csl_threshold_default;\r\n vm.cfs_threshold_default = cfs_threshold_default;\r\n vm.cmts_threshold_default = cmts_threshold_default;\r\n $rootScope.thresholdCheck = false;\r\n $rootScope.cfs_thresholdCheck = false;\r\n $rootScope.cmts_thresholdCheck = false;\r\n vm.thresholdChange = thresholdChange;\r\n vm.threshold_cfs_Change = threshold_cfs_Change;\r\n vm.threshold_cmts_Change = threshold_cmts_Change;\r\n vm.accessType = accessType;\r\n vm.portalChange = portalChange;\r\n vm.portalChangeEdit = portalChangeEdit;\r\n\r\n $scope.$on('saveBtnChecking', function(evt, loading){\r\n if(loading == undefined){\r\n vm.saveBtnShow = false;\r\n }else{\r\n vm.saveBtnShow = loading;\r\n }\r\n\r\n });\r\n CompanyManagementService.setUserAddCheck();\r\n vm.logsVisible();\r\n\r\n\r\n function CustomerFilter(val){\r\n if(vm.cww_filter == true || vm.csl_filter == true || vm.cfs_filter == true || vm.cmts_filter == true ){\r\n vm.filterCheck = false;\r\n }else{\r\n vm.filterCheck = true;\r\n vm.filter_only = false;\r\n }\r\n }\r\n\r\n function thresholdChange(val,type){\r\n\r\n var hrs = (vm.company.csl_exception_hours != null) ? parseInt(vm.company.csl_exception_hours): 0;\r\n\r\n var mins = (vm.company.csl_exception_minutes != null) ? parseInt(vm.company.csl_exception_minutes): 0;\r\n\r\n if(val == undefined){\r\n $rootScope.thresholdCheck = false;\r\n }\r\n else if($rootScope.hoursCheck == hrs &&\r\n $rootScope.minutesCheck == mins){\r\n $rootScope.thresholdCheck = false;\r\n }else{\r\n $rootScope.thresholdCheck = true;\r\n }\r\n }\r\n\r\n function threshold_cfs_Change(val,type){\r\n\r\n var hrs = (vm.company.cfs_exception_hours != null) ? parseInt(vm.company.cfs_exception_hours): 0;\r\n\r\n var mins = (vm.company.cfs_exception_minutes != null) ? parseInt(vm.company.cfs_exception_minutes): 0;\r\n\r\n if(val == undefined){\r\n $rootScope.cfs_thresholdCheck = false;\r\n }\r\n else if($rootScope.cfs_hoursCheck == hrs &&\r\n $rootScope.cfs_minutesCheck == mins){\r\n $rootScope.cfs_thresholdCheck = false;\r\n }else{\r\n $rootScope.cfs_thresholdCheck = true;\r\n }\r\n }\r\n\r\n function threshold_cmts_Change(val,type){\r\n\r\n var hrs = (vm.company.cmts_exception_hours != null) ? parseInt(vm.company.cmts_exception_hours): 0;\r\n\r\n var mins = (vm.company.cmts_exception_minutes != null) ? parseInt(vm.company.cmts_exception_minutes): 0;\r\n\r\n if(val == undefined){\r\n $rootScope.cmts_thresholdCheck = false;\r\n }\r\n else if($rootScope.cmts_hoursCheck == hrs &&\r\n $rootScope.cmts_minutesCheck == mins){\r\n $rootScope.cmts_thresholdCheck = false;\r\n }else{\r\n $rootScope.cmts_thresholdCheck = true;\r\n }\r\n }\r\n\r\n $rootScope.checkNameField = function(val){\r\n if(val == \"\" || val == undefined){\r\n vm.nameCheck = true;\r\n vm.company.accessTypeStandard = false;\r\n vm.company.accessTypeClassic = false;\r\n vm.company.companyEnableCheck = false;\r\n vm.company.portalType = \"\";\r\n vm.accessTypeEnableCheck = false;\r\n vm.company.is_cww = false;\r\n vm.company.is_csl = false;\r\n vm.company.is_cfs = false;\r\n vm.company.is_cmts = false;\r\n }else{\r\n vm.nameCheck = false;\r\n vm.company.companyEnableCheck = true;\r\n }\r\n }\r\n\r\n $rootScope.checkRefreshTimeField = function(val){\r\n if(val!== undefined){\r\n val=val.trim();\r\n if(val == \"\" || vm.company.refresh_time<1){\r\n vm.formDetails.refresh_time.$setDirty();\r\n vm.formDetails.refresh_time.$setValidity('refresh_time', false);\r\n }else{\r\n vm.formDetails.refresh_time.$setTouched();\r\n vm.formDetails.refresh_time.$setValidity('refresh_time', true);\r\n }\r\n }else{\r\n vm.formDetails.refresh_time.$setDirty();\r\n vm.formDetails.refresh_time.$setValidity('refresh_time', false);\r\n }\r\n }\r\n\r\n function portalChangeEdit(val){\r\n if((val == 'consignee' || val == 'shipper') && (vm.company.accessTypeStandard == true)){\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n }\r\n if((val == 'customer') && (vm.company.accessTypeStandard == true)){\r\n vm.checkboxCustType = false;\r\n vm.checkboxCustType1 = false;\r\n vm.customerTypeEnableCheck = true;\r\n }\r\n if((val == 'consignee' || val == 'shipper' || val == 'customer')\r\n && (vm.company.accessTypeClassic == true)){\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n }\r\n if((val == 'consignee' || val == 'shipper')\r\n && (vm.company.accessTypeStandard == true)\r\n && (vm.company.accessTypeClassic == true)){\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n }\r\n if((val == 'customer')\r\n && (vm.company.accessTypeStandard == true)\r\n && (vm.company.accessTypeClassic == true)){\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = false;\r\n vm.checkboxCustType1 = true;\r\n }\r\n }\r\n\r\n function portalChange(val){\r\n if((val == 'consignee' || val == 'shipper') && (vm.company.accessTypeStandard == true)){\r\n vm.company.is_cww = true;\r\n vm.company.is_csl = false;\r\n vm.company.is_cfs = false;\r\n vm.company.is_cmts = false;\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n\r\n vm.company.cww_party_id_names = [];\r\n vm.company.cww_related_party_id_names = [];\r\n vm.company.csl_customer_ids = [];\r\n vm.company.cfs_customer_ids = [];\r\n vm.company.cmts_customer_ids = [];\r\n\r\n }\r\n if((val == 'customer') && (vm.company.accessTypeStandard == true)){\r\n vm.company.is_cww = false;\r\n vm.company.is_csl = false;\r\n vm.company.is_cfs = false;\r\n vm.company.is_cmts = false;\r\n vm.checkboxCustType = false;\r\n vm.checkboxCustType1 = false;\r\n vm.customerTypeEnableCheck = true;\r\n\r\n vm.company.cww_party_id_names = [];\r\n vm.company.cww_related_party_id_names = [];\r\n vm.company.csl_customer_ids = [];\r\n vm.company.cfs_customer_ids = [];\r\n vm.company.cmts_customer_ids = [];\r\n }\r\n if((val == 'consignee' || val == 'shipper' || val == 'customer')\r\n && (vm.company.accessTypeClassic == true)){\r\n vm.company.is_cww = true;\r\n vm.company.is_csl = false;\r\n vm.company.is_cfs = false;\r\n vm.company.is_cmts = false;\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n\r\n vm.company.cww_party_id_names = [];\r\n vm.company.cww_related_party_id_names = [];\r\n vm.company.csl_customer_ids = [];\r\n vm.company.cfs_customer_ids = [];\r\n vm.company.cmts_customer_ids = [];\r\n }\r\n if((val == 'consignee' || val == 'shipper')\r\n && (vm.company.accessTypeStandard == true)\r\n && (vm.company.accessTypeClassic == true)){\r\n vm.company.is_cww = true;\r\n vm.company.is_csl = false;\r\n vm.company.is_cfs = false;\r\n vm.company.is_cmts = false;\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = true;\r\n vm.checkboxCustType1 = false;\r\n\r\n vm.company.cww_party_id_names = [];\r\n vm.company.cww_related_party_id_names = [];\r\n vm.company.csl_customer_ids = [];\r\n vm.company.cfs_customer_ids = [];\r\n vm.company.cmts_customer_ids = [];\r\n }\r\n if((val == 'customer')\r\n && (vm.company.accessTypeStandard == true)\r\n && (vm.company.accessTypeClassic == true)){\r\n vm.company.is_cww = true;\r\n vm.company.is_csl = false;\r\n vm.company.is_cfs = false;\r\n vm.company.is_cmts = false;\r\n vm.customerTypeEnableCheck = true;\r\n vm.checkboxCustType = false;\r\n vm.checkboxCustType1 = true;\r\n\r\n vm.company.cww_party_id_names = [];\r\n vm.company.cww_related_party_id_names = [];\r\n vm.company.csl_customer_ids = [];\r\n vm.company.cfs_customer_ids = [];\r\n vm.company.cmts_customer_ids = [];\r\n }\r\n }\r\n\r\n function accessType(type,val){\r\n if(type == 'standard' && val == false){\r\n vm.company.portalType = \"\";\r\n vm.company.is_cww = false;\r\n vm.company.is_csl = false;\r\n vm.company.is_cfs = false;\r\n vm.company.is_cmts = false;\r\n vm.accessTypeEnableCheck = false;\r\n if(vm.company.accessTypeClassic == true){\r\n vm.accessTypeEnableCheck = true;\r\n }else{ vm.accessTypeEnableCheck = false; }\r\n\r\n }\r\n if(type == 'standard' && val == true){\r\n vm.company.portalType = \"\";\r\n vm.company.is_cww = false;\r\n vm.company.is_csl = false;\r\n vm.company.is_cfs = false;\r\n vm.company.is_cmts = false;\r\n vm.accessTypeEnableCheck = true;\r\n vm.customerTypeEnableCheck = false;\r\n vm.checkboxCustType = true;\r\n }\r\n if(type == 'classic' && val == true){\r\n vm.company.portalType = \"\";\r\n vm.company.is_cww = false;\r\n vm.company.is_csl = false;\r\n vm.company.is_cfs = false;\r\n vm.company.is_cmts = false;\r\n vm.accessTypeEnableCheck = true;\r\n vm.customerTypeEnableCheck = false;\r\n vm.checkboxCustType = true;\r\n }\r\n if(type == 'classic' && val == false){\r\n vm.company.portalType = \"\";\r\n vm.company.is_cww = false;\r\n vm.company.is_csl = false;\r\n vm.company.is_cfs = false;\r\n vm.company.is_cmts = false;\r\n vm.accessTypeEnableCheck = false;\r\n if(vm.company.accessTypeStandard == true){\r\n vm.accessTypeEnableCheck = true;\r\n }else{ vm.accessTypeEnableCheck = false; }\r\n }\r\n }\r\n\r\n\r\n function changeActiveStatus(val){\r\n var check;\r\n var query = {};\r\n var customer_type = [];\r\n var search = $location.search();\r\n\r\n if(search.page == undefined)\r\n search.page=1;\r\n else\r\n vm.companyTable.parameters().page=search.page;\r\n\r\n if(search.per_page == undefined)\r\n search.per_page=10;\r\n else\r\n vm.companyTable.parameters().count=search.per_page;\r\n\r\n if(vm.cww_filter == true){\r\n customer_type.push('cww');\r\n }\r\n if(vm.csl_filter == true){\r\n customer_type.push('csl');\r\n }\r\n if(vm.cfs_filter == true){\r\n customer_type.push('cfs');\r\n }\r\n if(vm.cmts_filter == true){\r\n customer_type.push('cmts');\r\n }\r\n\r\n if(val == false && customer_type.length == 0) {\r\n check = true;\r\n CompanyManagementService.getCompanies(check,search);\r\n }\r\n if(val == true && customer_type.length == 0){\r\n check = false;\r\n CompanyManagementService.getCompanies('',search);\r\n }\r\n\r\n if(val == false && customer_type.length > 0) {\r\n check = true;\r\n if(vm.cww_filter == true || vm.csl_filter == true || vm.cfs_filter == true || vm.cmts_filter == true){\r\n vm.isLoading.table = true;\r\n query.customer_types = customer_type;\r\n query.search=search;\r\n CompanyManagementService.getCompaniesFilter(query,vm.filter_only,check);\r\n }\r\n }\r\n\r\n if(val == true && customer_type.length > 0) {\r\n check = false;\r\n if(vm.cww_filter == true || vm.csl_filter == true || vm.cfs_filter == true || vm.cmts_filter == true){\r\n vm.isLoading.table = true;\r\n query.customer_types = customer_type;\r\n query.search=search;\r\n CompanyManagementService.getCompaniesFilter(query,vm.filter_only,check);\r\n }\r\n }\r\n\r\n }\r\n\r\n function listCompany(){\r\n $location.path('/companies');\r\n }\r\n\r\n function addPartyIds(val){\r\n vm.party_check = false;\r\n }\r\n\r\n function addPartyIdsCww(val){\r\n vm.cww_party_check = false;\r\n }\r\n\r\n function addPartyIdsCsl(val){\r\n vm.csl_party_check = false;\r\n }\r\n\r\n function addPartyIdsCfs(val){\r\n vm.cfs_party_check = false;\r\n }\r\n\r\n function addPartyIdsCmts(val){\r\n vm.cmts_party_check = false;\r\n }\r\n\r\n function csl_threshold_default(val,hrs,mins){\r\n if(hrs == undefined){\r\n hrs = '00';\r\n }\r\n if(mins == undefined){\r\n mins = '00';\r\n }\r\n if(val == true){\r\n vm.company.csl_exception_hours = '00';\r\n vm.company.csl_exception_minutes = '00';\r\n }\r\n if(val == false){\r\n vm.company.csl_exception_hours = (hrs !== '00') ? hrs : '00';\r\n vm.company.csl_exception_minutes = (mins !== '00') ? mins : '00';\r\n $rootScope.thresholdCheck = false;\r\n }\r\n }\r\n\r\n function cfs_threshold_default(val,hrs,mins){\r\n if(hrs == undefined){\r\n hrs = '00';\r\n }\r\n if(mins == undefined){\r\n mins = '00';\r\n }\r\n if(val == true){\r\n vm.company.cfs_exception_hours = '00';\r\n vm.company.cfs_exception_minutes = '00';\r\n }\r\n if(val == false){\r\n vm.company.cfs_exception_hours = (hrs !== '00') ? hrs : '00';\r\n vm.company.cfs_exception_minutes = (mins !== '00') ? mins : '00';\r\n $rootScope.cfs_thresholdCheck = false;\r\n }\r\n }\r\n\r\n function cmts_threshold_default(val,hrs,mins){\r\n if(hrs == undefined){\r\n hrs = '00';\r\n }\r\n if(mins == undefined){\r\n mins = '00';\r\n }\r\n if(val == true){\r\n vm.company.cmts_exception_hours = '00';\r\n vm.company.cmts_exception_minutes = '00';\r\n }\r\n if(val == false){\r\n vm.company.cmts_exception_hours = (hrs !== '00') ? hrs : '00';\r\n vm.company.cmts_exception_minutes = (mins !== '00') ? mins : '00';\r\n $rootScope.cmts_thresholdCheck = false;\r\n }\r\n }\r\n\r\n function cww_setup(val){\r\n if(val == false || val == true){\r\n\r\n }\r\n if(vm.company.is_cww == true || vm.company.is_csl == true || vm.company.is_cfs == true || vm.company.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function csl_setup(val){\r\n if(val == false || val == true){\r\n\r\n }\r\n if(vm.company.is_cww == true || vm.company.is_csl == true || vm.company.is_cfs == true || vm.company.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function cfs_setup(val){\r\n if(val == false || val == true){\r\n\r\n }\r\n if(vm.company.is_cww == true || vm.company.is_csl == true || vm.company.is_cfs == true || vm.company.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function cmts_setup(val){\r\n if(val == false || val == true){\r\n\r\n }\r\n if(vm.company.is_cww == true || vm.company.is_csl == true || vm.company.is_cfs == true || vm.company.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n }\r\n\r\n function getMatch(key, query){\r\n return CompanyManagementService.autoComplete({field: key, value: query});\r\n }\r\n\r\n function getMatchCww(key, query,type){\r\n return CompanyManagementService.autocompleteCww({field: key, portal_type:type, customer_type: 'cww', value: query});\r\n }\r\n\r\n function getMatchCsl(key, query){\r\n return CompanyManagementService.autocompleteCww({field: key, customer_type: 'csl', value: query});\r\n }\r\n\r\n function getMatchCfs(key, query){\r\n return CompanyManagementService.autocompleteCww({field: key, customer_type: 'cfs', value: query});\r\n }\r\n\r\n function getMatchCmts(key, query){\r\n return CompanyManagementService.autocompleteCww({field: key, customer_type: 'cmts', value: query});\r\n }\r\n\r\n function checkError(form, field){\r\n return form.$invalid && form[field].$invalid && (vm.isSave || form[field].$touched);\r\n }\r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function add_company(){\r\n $location.path('/companies/new');\r\n }\r\n\r\n function import_company(){\r\n $location.url('/companies/import-companies');\r\n }\r\n\r\n function getLink(data){\r\n return vm.link.url+\"/\"+data[vm.link.field];\r\n }\r\n function isLink(field){\r\n return field == vm.link.column;\r\n }\r\n\r\n function getClass(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"active-user\" : \"inactive-user\";\r\n case \"is_demo\":\r\n return item[field] ? \"active-user\" : \"inactive-user\";\r\n default:\r\n return '';\r\n }\r\n }\r\n\r\n function companySearch(isClear){\r\n var search = {};\r\n if (isClear){\r\n search.page=1;\r\n vm.companySearchNotEnable=true;\r\n\r\n if(search.per_page ==undefined)\r\n search.per_page=10;\r\n else\r\n vm.companyTable.parameters().count=search.per_page;\r\n\r\n //if(vm.cww_filter == true || vm.csl_filter == true || vm.cfs_filter == true || vm.cmts_filter == true){\r\n vm.filterCheck = false;\r\n CompanyManagementService.getCompanies(vm.is_active_cehck,search);\r\n //}\r\n vm.cww_filter = false;\r\n vm.csl_filter = false;\r\n vm.cfs_filter = false;\r\n vm.cmts_filter = false;\r\n vm.filter_only = false;\r\n vm.filterCheck = true;\r\n }\r\n else\r\n vm.companySearchNotEnable=false;\r\n\r\n for (var key in vm.lookup){\r\n if (isClear){\r\n delete vm.lookup[key];\r\n }\r\n else if (vm.lookup[key]){\r\n search[key] = vm.lookup[key];\r\n }\r\n\r\n }\r\n\r\n search['per_page']= vm.companyTable.parameters().count;\r\n search['page']= 1;\r\n\r\n $location.search(search);\r\n //CompanyManagementService.setQuery(search);\r\n }\r\n\r\n function companySearchFilter(){\r\n\r\n var query = {};\r\n var customer_type = [];\r\n var search = $location.search();\r\n\r\n if(vm.cww_filter == true){\r\n customer_type.push('cww');\r\n }\r\n if(vm.csl_filter == true){\r\n customer_type.push('csl');\r\n }\r\n if(vm.cfs_filter == true){\r\n customer_type.push('cfs');\r\n }\r\n if(vm.cmts_filter == true){\r\n customer_type.push('cmts');\r\n }\r\n\r\n if(customer_type.length == 0){\r\n CompanyManagementService.getCompanies(vm.is_active_cehck,search);\r\n }\r\n\r\n if(vm.cww_filter == true || vm.csl_filter == true || vm.cfs_filter == true || vm.cmts_filter == true){\r\n vm.isLoading.table = true;\r\n query.customer_types = customer_type;\r\n query.search=search;\r\n CompanyManagementService.getCompaniesFilter(query,vm.filter_only,vm.is_active_cehck);\r\n }\r\n\r\n }\r\n\r\n function getField(item, field){\r\n switch (field){\r\n case \"is_active\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"is_demo\":\r\n return item[field] ? \"Active\" : \"Inactive\";\r\n case \"customer_types\":\r\n if(item[field].length > 0){\r\n return item[field].join(',').toUpperCase();\r\n }\r\n case \"reskin_type\":\r\n if(item[field]){\r\n if(item[field].charAt(0) != null || item[field].charAt(0) != undefined){\r\n return item[field].charAt(0).toUpperCase() + item[field].substr(1).toLowerCase();\r\n }\r\n }\r\n\r\n default:\r\n return item[field];\r\n }\r\n }\r\n\r\n function getTable(){\r\n return CompanyManagementService.getCompanyTable();\r\n }\r\n\r\n\r\n\r\n function resetAll() {\r\n resetPrimary();\r\n resetBCCS();\r\n }\r\n\r\n function getCompany(id){\r\n for (var i in vm.companies){\r\n if (id == vm.companies[i].id){\r\n return vm.companies[i];\r\n }\r\n }\r\n }\r\n\r\n function logsVisible(){\r\n vm.logs_visible = false;\r\n if(vm.company.log != null)\r\n var logs_empty = typeof vm.company.log == 'undefined' ? true : !vm.company.log.length > 0;\r\n var user = vm.currentUser;\r\n\r\n vm.logs_visible = true;\r\n\r\n return user.super_admin && !logs_empty;\r\n }\r\n\r\n\r\n function resetBCCS() {\r\n var company = getCompany(vm.user.company_id);\r\n vm.user.contact.bccs.length = 0;\r\n company.default_bccs.map(function(d){vm.user.contact.bccs.push(d);});\r\n // parseContacts();\r\n }\r\n\r\n function resetPrimary() {\r\n CompanyManagementService.resetDefaultUserContact();\r\n // var company = getCompany(vm.user.company_id);\r\n // setPrimaryContact(company.default_contact_id);\r\n }\r\n\r\n function saveCompany(ev) {\r\n vm.isSave = true;\r\n //vm.formDetails.default_contact_id.$setTouched(); // have to do this because of a MD bug\r\n var lensGroup = CompanyManagementService.getCompanyLensTable();\r\n var exception = CslExceptionService.getExceptionTable();\r\n var cfs_exception = CfsExceptionService.getExceptionTable();\r\n var cmts_exception = CmtsExceptionService.getExceptionTable();\r\n //var lensGroup = userLensGroupService.getLensGroupTable();\r\n var users = UserManagementService.getUserTable();\r\n var lens_group_ids = [];\r\n var user_ids = [];\r\n var approver_ids = [];\r\n var cfs_approver_ids = [];\r\n var cmts_approver_ids = [];\r\n angular.forEach(lensGroup.data,function(lens){\r\n lens_group_ids.push(lens.id);\r\n });\r\n angular.forEach(exception.data,function(lens){\r\n approver_ids.push(lens.id);\r\n });\r\n angular.forEach(cfs_exception.data,function(lens){\r\n cfs_approver_ids.push(lens.id);\r\n });\r\n angular.forEach(cmts_exception.data,function(lens){\r\n cmts_approver_ids.push(lens.id);\r\n });\r\n angular.forEach(users.data,function(lens){\r\n user_ids.push(lens.id);\r\n });\r\n vm.company.lens_group_ids = lens_group_ids;\r\n vm.company.user_ids = user_ids;\r\n vm.company.approver_ids = approver_ids;\r\n vm.company.cfs_approver_ids = cfs_approver_ids;\r\n vm.company.cmts_approver_ids = cmts_approver_ids;\r\n\r\n vm.company.customer_type = [];\r\n vm.company.customer_type_setup = {};\r\n\r\n if(vm.company.is_cww == true){\r\n vm.company.customer_type.push('cww');\r\n vm.company.customer_type_setup.cww = {};\r\n if(vm.company.is_reskin == true){\r\n vm.company.customer_type_setup.cww.reskin_type = 'magno';\r\n vm.company.customer_type_setup.cww.is_reskin = true;\r\n }\r\n if(vm.company.is_reskin == false){\r\n vm.company.customer_type_setup.cww.reskin_type = 'default';\r\n vm.company.customer_type_setup.cww.is_reskin = false;\r\n }\r\n if(vm.company.cww_default_contact_id){\r\n vm.company.customer_type_setup.cww.default_contact_id = vm.company.cww_default_contact_id;\r\n }\r\n if(vm.company.cww_default_bccs.length > 0){\r\n vm.company.customer_type_setup.cww.default_bccs = vm.company.cww_default_bccs;\r\n }\r\n if(vm.company.cww_party_id_names.length > 0){\r\n vm.company.customer_type_setup.cww.party_id_names = vm.company.cww_party_id_names;\r\n }\r\n if(vm.company.cww_related_party_id_names.length > 0){\r\n vm.company.customer_type_setup.cww.related_party_id_names = vm.company.cww_related_party_id_names;\r\n }\r\n\r\n vm.company.customer_type_setup.cww.show_booking_shipment = vm.company.show_booking_shipment;\r\n vm.company.customer_type_setup.cww.discussion_enabled = vm.company.show_discussion_module;\r\n\r\n var party_ids_check = (vm.company.cww_party_id_names.length > 0) ? true : false;\r\n var related_party_ids_check = (vm.company.cww_related_party_id_names.length > 0) ? true : false;\r\n\r\n if(party_ids_check == false && related_party_ids_check == false){\r\n vm.cww_party_check = true;\r\n var party_check_new1 = false;\r\n }else{\r\n vm.cww_party_check = false;\r\n var party_check_new1 = true;\r\n }\r\n\r\n vm.company.customer_type_setup.cww.view_action_board = vm.company.view_action_board;\r\n if(vm.company.customer_type_setup.cww.view_action_board == true){\r\n vm.company.customer_type_setup.cww.refresh_time = vm.company.refresh_time;\r\n }\r\n }\r\n if(vm.company.is_csl == true){\r\n vm.company.customer_type.push('csl');\r\n vm.company.customer_type_setup.csl = {};\r\n\r\n //vm.company.customer_type_setup.csl.discussion_enabled = vm.company.show_discussion_module_csl;\r\n\r\n vm.company.customer_type_setup.csl.exception_threshold_hours = (vm.company.csl_exception_hours != null) ? parseInt(vm.company.csl_exception_hours): 0;\r\n vm.company.customer_type_setup.csl.exception_threshold_minutes = (vm.company.csl_exception_minutes != null) ? parseInt(vm.company.csl_exception_minutes): 0;\r\n\r\n if(vm.company.is_send_exception_email == true){\r\n vm.company.customer_type_setup.csl.do_not_send_exception_mails = true;\r\n }\r\n if(vm.company.is_send_exception_email == false){\r\n vm.company.customer_type_setup.csl.do_not_send_exception_mails = false;\r\n }\r\n if(vm.company.is_show_class == true){\r\n vm.company.customer_type_setup.csl.show_shipment_class = true;\r\n }\r\n if(vm.company.is_show_class == false){\r\n vm.company.customer_type_setup.csl.show_shipment_class = false;\r\n }\r\n if(vm.company.csl_default_contact_id){\r\n vm.company.customer_type_setup.csl.default_contact_id = vm.company.csl_default_contact_id;\r\n }\r\n if(vm.company.csl_default_bccs.length > 0){\r\n vm.company.customer_type_setup.csl.default_bccs = vm.company.csl_default_bccs;\r\n }\r\n if(vm.company.csl_customer_ids.length > 0){\r\n vm.company.customer_type_setup.csl.party_id_names = vm.company.csl_customer_ids;\r\n }\r\n\r\n var party_ids_check = (vm.company.csl_customer_ids.length > 0) ? true : false;\r\n if(party_ids_check == false){\r\n vm.csl_party_check = true;\r\n var party_check_new2 = false;\r\n }else{\r\n vm.csl_party_check = false;\r\n var party_check_new2 = true;\r\n }\r\n\r\n }\r\n if(vm.company.is_cfs == true){\r\n vm.company.customer_type.push('cfs');\r\n vm.company.customer_type_setup.cfs = {};\r\n\r\n vm.company.customer_type_setup.cfs.exception_threshold_hours = (vm.company.cfs_exception_hours != null) ? parseInt(vm.company.cfs_exception_hours): 0;\r\n vm.company.customer_type_setup.cfs.exception_threshold_minutes = (vm.company.cfs_exception_minutes != null) ? parseInt(vm.company.cfs_exception_minutes): 0;\r\n if(vm.company.cfs_default_contact_id){\r\n vm.company.customer_type_setup.cfs.default_contact_id = vm.company.cfs_default_contact_id;\r\n }\r\n if(vm.company.cfs_default_bccs.length > 0){\r\n vm.company.customer_type_setup.cfs.default_bccs = vm.company.cfs_default_bccs;\r\n }\r\n if(vm.company.cfs_customer_ids.length > 0){\r\n vm.company.customer_type_setup.cfs.party_id_names = vm.company.cfs_customer_ids;\r\n }\r\n\r\n var party_ids_check = (vm.company.cfs_customer_ids.length > 0) ? true : false;\r\n if(party_ids_check == false){\r\n vm.cfs_party_check = true;\r\n var party_check_new3 = false;\r\n }else{\r\n vm.cfs_party_check = false;\r\n var party_check_new3 = true;\r\n }\r\n }\r\n\r\n if(vm.company.is_cmts == true){\r\n vm.company.customer_type.push('cmts');\r\n vm.company.customer_type_setup.cmts = {};\r\n\r\n vm.company.customer_type_setup.cmts.exception_threshold_hours = (vm.company.cmts_exception_hours != null) ? parseInt(vm.company.cmts_exception_hours): 0;\r\n vm.company.customer_type_setup.cmts.exception_threshold_minutes = (vm.company.cmts_exception_minutes != null) ? parseInt(vm.company.cmts_exception_minutes): 0;\r\n if(vm.company.cmts_default_contact_id){\r\n vm.company.customer_type_setup.cmts.default_contact_id = vm.company.cmts_default_contact_id;\r\n }\r\n if(vm.company.cmts_default_bccs.length > 0){\r\n vm.company.customer_type_setup.cmts.default_bccs = vm.company.cmts_default_bccs;\r\n }\r\n if(vm.company.cmts_customer_ids.length > 0){\r\n vm.company.customer_type_setup.cmts.party_id_names = vm.company.cmts_customer_ids;\r\n }\r\n\r\n var party_ids_check = (vm.company.cmts_customer_ids.length > 0) ? true : false;\r\n if(party_ids_check == false){\r\n vm.cmts_party_check = true;\r\n var party_check_new4 = false;\r\n }else{\r\n vm.cmts_party_check = false;\r\n var party_check_new4 = true;\r\n }\r\n }\r\n\r\n if(vm.company.is_cww == true || vm.company.is_csl == true || vm.company.is_cfs == true || vm.company.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n\r\n if((party_check_new1 == true || party_check_new1 == undefined) && (party_check_new2 == true || party_check_new2 == undefined) && (party_check_new3 == true || party_check_new3 == undefined) && (party_check_new4 == true || party_check_new4 == undefined)){\r\n var party_check_new = true;\r\n }else\r\n {\r\n var party_check_new = false;\r\n }\r\n\r\n\r\n var resObject = {};\r\n\r\n resObject.access_type = [];\r\n\r\n if(vm.company.accessTypeStandard){\r\n resObject.access_type.push('portal');\r\n }\r\n if(vm.company.accessTypeClassic){\r\n resObject.access_type.push('classic');\r\n }\r\n resObject.portal_type = vm.company.portalType;\r\n\r\n resObject.name = vm.company.name;\r\n resObject.customer_types = vm.company.customer_type;\r\n resObject.customer_type_setup = vm.company.customer_type_setup;\r\n resObject.is_demo = vm.company.is_demo;\r\n resObject.user_ids = vm.company.user_ids;\r\n resObject.lens_group_ids = vm.company.lens_group_ids;\r\n resObject.user_ids = vm.company.user_ids;\r\n resObject.approver_ids = vm.company.approver_ids;\r\n resObject.cfs_approver_ids = vm.company.cfs_approver_ids;\r\n resObject.cmts_approver_ids = vm.company.cmts_approver_ids;\r\n resObject.is_active = vm.company.is_active;\r\n\r\n\r\n // var party_ids_check = (vm.company.party_id_names.length > 0) ? true : false;\r\n // var related_party_ids_check = (vm.company.related_party_id_names.length > 0) ? true : false;\r\n\r\n // if(party_ids_check == false && related_party_ids_check == false){\r\n // vm.party_check = true;\r\n // var party_check_new = false;\r\n // }else{\r\n // vm.party_check = false;\r\n // var party_check_new = true;\r\n // }\r\n if (party_check_new){\r\n // updateDefaultBccs();\r\n vm.isLoading.save = true;\r\n CompanyManagementService.updateCompany(resObject, $stateParams.id).then(function(response){\r\n vm.formDetails.$setPristine();\r\n vm.formDetails.$setUntouched();\r\n if(!response.data.customer_types.includes('cww')){\r\n vm.company.is_reskin = false;\r\n vm.company.cww_default_contact_id = \"\";\r\n vm.company.cww_default_bccs = [];\r\n vm.company.cww_party_id_names = [];\r\n vm.company.cww_related_party_id_names = [];\r\n }\r\n else if(!response.data.customer_types.includes('csl')){\r\n vm.company.csl_default_contact_id = \"\";\r\n vm.company.csl_default_bccs = [];\r\n vm.company.csl_customer_ids = [];\r\n }\r\n else if(!response.data.customer_types.includes('cfs')){\r\n vm.company.cfs_default_contact_id = \"\";\r\n vm.company.cfs_default_bccs = [];\r\n vm.company.cfs_customer_ids = [];\r\n }\r\n else if(!response.data.customer_types.includes('cmts')){\r\n vm.company.cmts_default_contact_id = \"\";\r\n vm.company.cmts_default_bccs = [];\r\n vm.company.cmts_customer_ids = [];\r\n }\r\n vm.status.cssClass = vm.company.is_active ? \"md-primary\" : \"md-danger\";\r\n showToastWithFile('save-company.success.html', '');\r\n vm.isLoading.save = false;\r\n vm.saveBtnShow = false;\r\n vm.logsVisible();\r\n $rootScope.$broadcast('company_updated',response.data.log);\r\n }).catch(function(error) {\r\n if(error.data.errors.base)\r\n showToastWithFile('save-company.error.html', error.data.errors.base);\r\n else if(error.error)\r\n showToastWithFile('save-company.error.html', [error.error]);\r\n else\r\n showToastWithFile('save-company.error.html', [error.data.errors]);\r\n vm.isLoading.save = false;\r\n });\r\n }\r\n }\r\n\r\n function createNewCompany() {\r\n //vm.formDetails.default_contact_id.$setTouched(); // have to do this because of a MD bug\r\n vm.company.customer_type = [];\r\n vm.company.customer_type_setup = {};\r\n\r\n if(vm.company.is_cww == true){\r\n vm.company.customer_type.push('cww');\r\n vm.company.customer_type_setup.cww = {};\r\n if(vm.company.is_reskin == true){\r\n vm.company.customer_type_setup.cww.reskin_type = 'magno';\r\n vm.company.customer_type_setup.cww.is_reskin = true;\r\n }\r\n if(vm.company.is_reskin == false){\r\n vm.company.customer_type_setup.cww.reskin_type = 'default';\r\n vm.company.customer_type_setup.cww.is_reskin = false;\r\n }\r\n if(vm.company.cww_default_contact_id){\r\n vm.company.customer_type_setup.cww.default_contact_id = vm.company.cww_default_contact_id;\r\n vm.primaryContactCheckCww = false;\r\n }else{\r\n vm.primaryContactCheckCww = true;\r\n }\r\n if(vm.company.cww_default_bccs.length > 0){\r\n vm.company.customer_type_setup.cww.default_bccs = vm.company.cww_default_bccs;\r\n }\r\n if(vm.company.cww_party_id_names.length > 0){\r\n vm.company.customer_type_setup.cww.party_id_names = vm.company.cww_party_id_names;\r\n }\r\n if(vm.company.cww_related_party_id_names.length > 0){\r\n vm.company.customer_type_setup.cww.related_party_id_names = vm.company.cww_related_party_id_names;\r\n }\r\n\r\n vm.company.customer_type_setup.cww.show_booking_shipment = vm.company.show_booking_shipment;\r\n vm.company.customer_type_setup.cww.discussion_enabled = vm.company.show_discussion_module;\r\n var party_ids_check = (vm.company.cww_party_id_names.length > 0) ? true : false;\r\n var related_party_ids_check = (vm.company.cww_related_party_id_names.length > 0) ? true : false;\r\n\r\n if(party_ids_check == false && related_party_ids_check == false){\r\n vm.cww_party_check = true;\r\n var party_check_new1 = false;\r\n }else{\r\n vm.cww_party_check = false;\r\n var party_check_new1 = true;\r\n }\r\n\r\n vm.company.customer_type_setup.cww.view_action_board = vm.company.view_action_board;\r\n if(vm.company.customer_type_setup.cww.view_action_board == true){\r\n vm.company.customer_type_setup.cww.refresh_time = vm.company.refresh_time;\r\n }\r\n }\r\n\r\n if(vm.company.is_csl == true){\r\n vm.company.customer_type.push('csl');\r\n vm.company.customer_type_setup.csl = {};\r\n //vm.company.customer_type_setup.csl.discussion_enabled = vm.company.show_discussion_module_csl;\r\n vm.company.customer_type_setup.csl.exception_threshold_hours = parseInt(vm.company.csl_exception_hours);\r\n vm.company.customer_type_setup.csl.exception_threshold_minutes = parseInt(vm.company.csl_exception_minutes);\r\n if(vm.company.is_send_exception_email == true){\r\n vm.company.customer_type_setup.csl.do_not_send_exception_mails = true;\r\n }\r\n if(vm.company.is_send_exception_email == false){\r\n vm.company.customer_type_setup.csl.do_not_send_exception_mails = false;\r\n }\r\n if(vm.company.is_show_class == true){\r\n vm.company.customer_type_setup.csl.show_shipment_class = true;\r\n }\r\n if(vm.company.is_show_class == false){\r\n vm.company.customer_type_setup.csl.show_shipment_class = false;\r\n }\r\n if(vm.company.csl_default_contact_id){\r\n vm.company.customer_type_setup.csl.default_contact_id = vm.company.csl_default_contact_id;\r\n vm.primaryContactCheckCsl = false;\r\n }else{\r\n vm.primaryContactCheckCsl = true;\r\n }\r\n if(vm.company.csl_default_bccs.length > 0){\r\n vm.company.customer_type_setup.csl.default_bccs = vm.company.csl_default_bccs;\r\n }\r\n if(vm.company.csl_customer_ids.length > 0){\r\n vm.company.customer_type_setup.csl.party_id_names = vm.company.csl_customer_ids;\r\n }\r\n\r\n var party_ids_check = (vm.company.csl_customer_ids.length > 0) ? true : false;\r\n if(party_ids_check == false){\r\n vm.csl_party_check = true;\r\n var party_check_new2 = false;\r\n }else{\r\n vm.csl_party_check = false;\r\n var party_check_new2 = true;\r\n }\r\n\r\n }\r\n if(vm.company.is_cfs == true){\r\n vm.company.customer_type.push('cfs');\r\n vm.company.customer_type_setup.cfs = {};\r\n if(vm.company.cfs_default_contact_id){\r\n vm.company.customer_type_setup.cfs.default_contact_id = vm.company.cfs_default_contact_id;\r\n vm.primaryContactCheckCfs = false;\r\n }else{\r\n vm.primaryContactCheckCfs = true;\r\n }\r\n\r\n vm.company.customer_type_setup.cfs.exception_threshold_hours = parseInt(vm.company.cfs_exception_hours);\r\n vm.company.customer_type_setup.cfs.exception_threshold_minutes = parseInt(vm.company.cfs_exception_minutes);\r\n if(vm.company.cfs_default_bccs.length > 0){\r\n vm.company.customer_type_setup.cfs.default_bccs = vm.company.cfs_default_bccs;\r\n }\r\n if(vm.company.cfs_customer_ids.length > 0){\r\n vm.company.customer_type_setup.cfs.party_id_names = vm.company.cfs_customer_ids;\r\n }\r\n\r\n\r\n if(vm.company.is_cfs_send_exception_email == true){\r\n vm.company.customer_type_setup.cfs.do_not_send_exception_mails = true;\r\n }\r\n if(vm.company.is_cfs_send_exception_email == false){\r\n vm.company.customer_type_setup.cfs.do_not_send_exception_mails = false;\r\n }\r\n\r\n if(vm.company.is_cfs_show_class == true){\r\n vm.company.customer_type_setup.cfs.show_shipment_class = true;\r\n }\r\n if(vm.company.is_cfs_show_class == false){\r\n vm.company.customer_type_setup.cfs.show_shipment_class = false;\r\n }\r\n\r\n var party_ids_check = (vm.company.cfs_customer_ids.length > 0) ? true : false;\r\n if(party_ids_check == false){\r\n vm.cfs_party_check = true;\r\n var party_check_new3 = false;\r\n }else{\r\n vm.cfs_party_check = false;\r\n var party_check_new3 = true;\r\n }\r\n }\r\n\r\n if(vm.company.is_cmts == true){\r\n vm.company.customer_type.push('cmts');\r\n vm.company.customer_type_setup.cmts = {};\r\n if(vm.company.cmts_default_contact_id){\r\n vm.company.customer_type_setup.cmts.default_contact_id = vm.company.cmts_default_contact_id;\r\n vm.primaryContactCheckCmts = false;\r\n }else{\r\n vm.primaryContactCheckCmts = true;\r\n }\r\n\r\n vm.company.customer_type_setup.cmts.exception_threshold_hours = parseInt(vm.company.cmts_exception_hours);\r\n vm.company.customer_type_setup.cmts.exception_threshold_minutes = parseInt(vm.company.cmts_exception_minutes);\r\n if(vm.company.cmts_default_bccs.length > 0){\r\n vm.company.customer_type_setup.cmts.default_bccs = vm.company.cmts_default_bccs;\r\n }\r\n if(vm.company.cmts_customer_ids.length > 0){\r\n vm.company.customer_type_setup.cmts.party_id_names = vm.company.cmts_customer_ids;\r\n }\r\n\r\n\r\n if(vm.company.is_cmts_send_exception_email == true){\r\n vm.company.customer_type_setup.cmts.do_not_send_exception_mails = true;\r\n }\r\n if(vm.company.is_cmts_send_exception_email == false){\r\n vm.company.customer_type_setup.cmts.do_not_send_exception_mails = false;\r\n }\r\n\r\n if(vm.company.is_cmts_show_class == true){\r\n vm.company.customer_type_setup.cmts.show_shipment_class = true;\r\n }\r\n if(vm.company.is_cmts_show_class == false){\r\n vm.company.customer_type_setup.cmts.show_shipment_class = false;\r\n }\r\n\r\n var party_ids_check = (vm.company.cmts_customer_ids.length > 0) ? true : false;\r\n if(party_ids_check == false){\r\n vm.cmts_party_check = true;\r\n var party_check_new4 = false;\r\n }else{\r\n vm.cmts_party_check = false;\r\n var party_check_new4 = true;\r\n }\r\n }\r\n\r\n if(vm.company.is_cww == true || vm.company.is_csl == true || vm.company.is_cfs == true || vm.company.is_cmts == true){\r\n vm.customer_type_cehck = false;\r\n }else\r\n {\r\n vm.customer_type_cehck = true;\r\n }\r\n\r\n if((party_check_new1 == true || party_check_new1 == undefined) && (party_check_new2 == true || party_check_new2 == undefined) && (party_check_new3 == true || party_check_new3 == undefined) && (party_check_new4 == true || party_check_new4 == undefined)){\r\n var party_check_new = true;\r\n }else\r\n {\r\n var party_check_new = false;\r\n }\r\n\r\n var isValidCwwDefaultContact = true;\r\n var isValidCfsDefaultContact = true;\r\n var isValidCslDefaultContact = true;\r\n var isValidCmtsDefaultContact = true;\r\n\r\n if (vm.company.is_cww) {\r\n isValidCwwDefaultContact = vm.company.cww_default_contact_id && vm.company.cww_default_contact_id > 0;\r\n }\r\n if (vm.company.is_cfs) {\r\n isValidCfsDefaultContact = vm.company.cfs_default_contact_id && vm.company.cfs_default_contact_id > 0;\r\n }\r\n if (vm.company.is_csl) {\r\n isValidCslDefaultContact = vm.company.csl_default_contact_id && vm.company.csl_default_contact_id > 0;\r\n }\r\n if (vm.company.is_cmts) {\r\n isValidCmtsDefaultContact = vm.company.cmts_default_contact_id && vm.company.cmts_default_contact_id > 0;\r\n }\r\n\r\n var lensGroup = userLensGroupService.getLensGroupTable();\r\n var users = UserManagementService.getUserTable();\r\n var lens_group_ids = [];\r\n var user_ids = [];\r\n angular.forEach(lensGroup.data,function(lens){\r\n lens_group_ids.push(lens.id);\r\n });\r\n angular.forEach(users.data,function(lens){\r\n user_ids.push(lens.id);\r\n });\r\n vm.company.lens_group_ids = lens_group_ids;\r\n vm.company.user_ids = user_ids;\r\n\r\n\r\n var resObject = {};\r\n\r\n resObject.access_type = [];\r\n\r\n if(vm.company.accessTypeStandard){\r\n resObject.access_type.push('portal');\r\n }\r\n if(vm.company.accessTypeClassic){\r\n resObject.access_type.push('classic');\r\n }\r\n resObject.portal_type = vm.company.portalType;\r\n\r\n resObject.name = vm.company.name;\r\n resObject.customer_types = vm.company.customer_type;\r\n resObject.customer_type_setup = vm.company.customer_type_setup;\r\n resObject.is_demo = vm.company.is_demo;\r\n resObject.lens_group_ids = vm.company.lens_group_ids;\r\n resObject.user_ids = vm.company.user_ids;\r\n resObject.lens_group_ids = vm.company.lens_group_ids;\r\n resObject.is_active = vm.company.is_active;\r\n\r\n // var party_ids_check = (vm.company.party_id_names.length > 0) ? true : false;\r\n // var related_party_ids_check = (vm.company.related_party_id_names.length > 0) ? true : false;\r\n\r\n // if(party_ids_check == false && related_party_ids_check == false){\r\n // vm.party_check = true;\r\n // var party_check_new = false;\r\n // }else{\r\n // vm.party_check = false;\r\n // var party_check_new = true;\r\n // }\r\n //if (vm.formIsValid() && party_check_new) {\r\n if (party_check_new && isValidCwwDefaultContact && isValidCfsDefaultContact && isValidCslDefaultContact && isValidCmtsDefaultContact) {\r\n // updateDefaultBccs();\r\n vm.isLoading.createNew = true;\r\n console.log(JSON.stringify(resObject));\r\n CompanyManagementService.createNewCompany(resObject).then(function(resp) {\r\n showToastWithFile('create-company.success.html', '');\r\n vm.isLoading.createNew = false;\r\n $location.path('/companies');\r\n }).catch(function(error) {\r\n if(error.data.errors)\r\n showToastWithFile('create-company.error.html', [error.data.errors]);\r\n else if(error.data.error)\r\n showToastWithFile('create-company.error.html', [error.data.error]);\r\n else if(error.error)\r\n showToastWithFile('create-company.error.html', error.error);\r\n else\r\n showToastWithFile('create-company.error.html', '');\r\n vm.isLoading.createNew = false;\r\n });\r\n }\r\n }\r\n\r\n function activateCompany() {\r\n vm.company.is_active = true;\r\n CompanyManagementService.updateCompany(vm.company.id).then(\r\n function(res){\r\n vm.status.cssClass=\"md-primary\";\r\n vm.closeModal();\r\n vm.showToastWithFile('activate-company.success.html', [name]);\r\n }, function(error){\r\n vm.closeModal();\r\n vm.showToastWithFile('deactivate-company.error.html', [''+error.status+': '+error.statusText]);\r\n });\r\n }\r\n\r\n function deactivateCompany() {\r\n vm.company.is_active = false;\r\n CompanyManagementService.updateCompany(vm.company.id).then(\r\n function(res){\r\n vm.status.cssClass=\"md-danger\";\r\n vm.closeModal();\r\n vm.showToastWithFile('deactivate-company.success.html', [name]);\r\n }, function(error){\r\n vm.closeModal();\r\n vm.showToastWithFile('deactivate-company.error.html', [''+error.status+': '+error.statusText]);\r\n });\r\n }\r\n\r\n function deleteCompany() {\r\n CompanyManagementService.deleteCompany(vm.company.id).then(\r\n function(res){\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-company.success.html', name);\r\n $location.path(\"/companies\");\r\n }, function errorCallback(error){\r\n vm.closeModal();\r\n vm.showToastWithFile('delete-company.error.html', [''+error.status+': '+error.statusText]);\r\n });\r\n }\r\n\r\n $rootScope.processActions = function(actions){\r\n return Object.keys(actions).map(function(key){\r\n var action = actions[key] === Object(actions[key]) ? JSON.stringify(actions[key]) : actions[key];\r\n return \"<strong>\" + key + \"</strong>\" + \": \" + action +\"\\n\";\r\n }).join(', ');\r\n }\r\n\r\n function logExportShowCSV(company){\r\n $scope.exportCsvLoaded = false;\r\n CompanyManagementService.exportCompanyLogs(company).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n $mdDialog.hide();\r\n }).catch(function(e) {\r\n\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant(e.data.errors))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n\r\n /**\r\n * Converts the vm.companyDefaultBccs to the array that the company object exptects\r\n */\r\n // function updateDefaultBccs() {\r\n // var bccs = vm.companyDefaultBccs.trim();\r\n // // clean up the data first\r\n // bccs = bccs.replace(/[,;]/g, ' ');\r\n // bccs = bccs.replace(/\\s+/g, ' ');\r\n // vm.company.default_bccs = bccs ? bccs.split(' ') : [];\r\n // }\r\n\r\n // function updateAccount(newUser) {\r\n // vm.isSave = true;\r\n // if (vm.formIsValid()){\r\n // vm.isLoading.account = true;\r\n // // debugger;\r\n // CompanyManagementService.updateUser($stateParams.id).then(function(){\r\n // updateRole();\r\n // updateContact();\r\n // vm.isLoading.account = false;\r\n // showToastWithFile('update-account.success.html');\r\n // if(newUser){\r\n\r\n // }\r\n // }).catch(function(error) {\r\n // vm.isLoading.account = false;\r\n // showToastWithFile('update-account.error.html');\r\n // });\r\n // } else {\r\n // var errors = \"\"\r\n // showToastWithFile('update-account-invalid.error.html', errors);\r\n // }\r\n // }\r\n\r\n // function updateRole() {\r\n // //endpoint not around yet\r\n // vm.isLoading.role = true;\r\n // //on then do\r\n // // showToastWithFile('update-role.success.html');\r\n // // vm.isLoading.role = true;\r\n // //on catch do\r\n // // vm.isLoading.role = false;\r\n // // showToastWithFile('update-role.success.html');\r\n // }\r\n\r\n // function updateContact() {\r\n // vm.isLoading.contact = true;\r\n\r\n // // // Recombine the additional bcc's into the model\r\n // // vm.additional_bccs.split(',').filter(function(d){\r\n // // d = d.trim();\r\n // // if (d !== \"\"){\r\n // // vm.user.contact.bccs.push(d)\r\n // // }\r\n // // });\r\n\r\n // if (vm.user.contact.primary_contact) { //update the user contact\r\n // CompanyManagementService.updateUserContact($stateParams.id).then(function(){\r\n // // parseContacts();\r\n // vm.isLoading.contact = false;\r\n // showToastWithFile('update-contact.success.html');\r\n // }).catch(function(error) {\r\n // vm.isLoading.contact = false;\r\n // showToastWithFile('update-contact.error.html');\r\n // });\r\n // } else { //create a user contact\r\n // CompanyManagementService.postUserContact($stateParams.id).then(function(){\r\n // // parseContacts();\r\n // vm.isLoading.contact = false;\r\n // showToastWithFile('update-contact.success.html');\r\n // }).catch(function(error) {\r\n // vm.isLoading.contact = false;\r\n // showToastWithFile('update-contact.error.html');\r\n // });\r\n // }\r\n // }\r\n function getCompanyUserCount() {\r\n // CompanyManagementService.deleteConfirmCompany(vm.company.id).then(function(resp){\r\n // vm.companyUserCount = resp.data;\r\n // }\r\n var num = vm.companyUserCount;\r\n return \"You are about to delete this company and \" + num + \" of its users.\"\r\n }\r\n\r\n function showModal(ev, modal){\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n CompanyManagementService.deleteConfirmCompany(vm.company.id).then(function(resp){\r\n vm.companyUserCount = resp.data;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/companies/modals/'+ modal + '.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n });\r\n }\r\n\r\n function showApiError(messages) {\r\n $scope.apiErrorMessages = [];\r\n angular.forEach(messages, function(m) {\r\n // filter out some of the meaningless messages\r\n if (m.toLowerCase().indexOf('user contact') === 0) return;\r\n $scope.apiErrorMessages.push(m);\r\n });\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/companies/modals/api-error.modal.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/admin/companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.messages = message;\r\n }\r\n });\r\n }\r\n\r\n function downloadXLSXTemplate(){\r\n var filename = 'Form_C-View_NewClientSetup.xlsx',headerIndex=1,instructionIndex=0,ws_name = \"Sheet1\", ws2_name = \"Instructions\";\r\n\r\n var headers = [['Instructions: Enter the new C-View company info in row 4. Use the info in row 3 as an example (and then delete row 3). Go to the Instructions tab for detailed instructions.']\r\n ,[\"Name*\",\"AccessType*\",\"PortalType*\",\"CustomerTypes*\",\"CwwDefaultContact\",\"CwwDefaultBccs\",\"CwwPartyIds\",\"CwwGroupIds\",\"CwwEnableDiscussion\",\"CwwEnableShowBookings\",\"CwwEnableMagnoSkin\",\"CwwEnableActionBoard\",\"CwwRefreshTime\",\"CslDefaultContact\",\"CslDefaultBccs\",\"CslCustomerIds\",\"CslShowClass\",\"CslSendExceptionEmail\",\"CslExceptionThreshold\",\"CfsDefaultContact\",\"CfsDefaultBccs\",\"CfsCustomerIds\",\"CfsShowClass\",\"CfsSendExceptionEmail\",\"CfsExceptionThreshold\",\"CmtsDefaultContact\",\"CmtsDefaultBccs\",\"CmtsTradingPartnerIds\",\"CmtsSendExceptionEmail\",\"CmtsExceptionThreshold\",\"EnableDemo*\"]\r\n ,[\"Test Company\",\"C-View, Pathway\",\"Customer\",\"CWW, CSL, CFS, CMTS\",\"test_contact_cww@crane.com\",\"test_bcc_cww@crane.com\",\"TestCwwParty1,TestCwwParty2\",\"TestCwwGrp1,TestCwwGrp2\",\"No\",\"No\",\"No\",\"No\",\"0\",\"test_contact_csl@example.com\",\"test_contact_csl@example.com\",\"TestCslCustomer1,TestCslCustomer2\",\"No\",\"No\",\"00:00\",\"test_contact_cfs@example.com\",\"test_bcc_cfs@example.com\",\"TestCfsCustomer1, TestCfsCustomer2\",\"No\",\"No\",\"00:00\",\"test_contact_cmts@example.com\",\"test_bcc_cmts@example.com\",\"TestCmtsTradingPartner1, TestCmtsTradingPartner2\",\"No\",\"00:00\",\"Yes\"\r\n ]];\r\n\r\n var ws2_headers = [\r\n ['These are the detailed instructions to complete the Form_C-View_NewClientSetup.xlsx.'],\r\n ['Columns A, B, C, and D are required. Column G or H is required.'],\r\n ['(column A) Name* - Company name as it will be displayed in C-View.'],\r\n ['(column B) Access Type* - The default Is \"C-View\". Enter \"C-View, Pathway\" to allow the client to login to Pathway through the link in C-View.'],\r\n ['(column C) Portal Type* - There are three options: Customer, Consignee, or Shipper. Each has different shipment visibility. The default is Customer.'],\r\n ['(column D) Customer Type* - There are four customer types: CWW, CSL, CFS, CMTS. Some companies have more than one customer type. The default is CWW.'],\r\n ['(column E) CwwDefaultContact - Email address of the Crane employee that will be notified when the client sends an email from C-View.'],\r\n ['(column F) CwwDefaultBccs - Additional email addresses that are blind copied when the client sends an email from C-View.'],\r\n ['(column G) CwwPartyIds - Party ID from TMF that contains the shipments visible for this company.'],\r\n ['(column H) CwwGroupIds - Group ID from TMF that contains the shipments visible for this company.'],\r\n ['(column I) CwwEnableDiscussion - Adds \"Discussion\" to the bar on the left. Enter Yes or No. The default is No.'],\r\n ['(column J) CwwEnableShowBookings - Adds \"Booking\" to the bar on the left. Enter Yes or No. The default is No.'],\r\n ['(column K) CwwEnableMagnoSkin - Magno clients have the option to have C-View \"reskin\" to show the Magno logo. The default is No.'],\r\n ['(column L) CwwEnableActionBoard - Adds \"Action Board\" to the bar on the left. Enter Yes or No. The default is No.'],\r\n ['(column M) CwwRefreshTime - How often (in minutes) the data is copied from TMF to C-View. Must be > 0. Have to enter \"Yes\" in column L (CWWEnableActionBoard) for this to be enabled.'],\r\n [''],\r\n ['The following 6 columns are only needed if CSL was included in column D/Customer Type*. Otherwise, leave these 6 columns blank.'],\r\n ['(column N) CslDefaultContact - Email address of the Crane employee that will be notified when the client sends an email from C-View.'],\r\n ['(column O) CslDefaultBccs - Additional email addresses that are blind copied when the client sends an email from C-View.'],\r\n ['(column P) CslCustomerIds - Customer ID from Aljex that contains the shipments visible for this company.'],\r\n ['(column Q) CslShowClass - Specific Classes that the company needs to reflect from Aljex into C-View.'],\r\n ['(column R) CslSendExceptionEmail - Email addresses that are sent exception updates – this is both internal and external email addresses.'],\r\n ['(column S) CslExceptionThreshold - Company’s specifics on what clarifies as a true exception – to help build the logic around the emails that are sent from C-View.'],\r\n [''],\r\n ['The following 6 columns are only needed if CFS was included in column D/Customer Type*. Otherwise, leave these 6 columns blank.'],\r\n ['(column T) CfsDefaultContact - Email address of the Crane employee that will be notified when the client sends an email from C-View. '],\r\n ['(column U) CfsDefaultBccs - Additional email addresses that are blind copied when the client sends an email from C-View.'],\r\n ['(column V) CfsCustomerIds - Customer ID from Aljex that contains the shipments visible for this company. '],\r\n ['(column W) CfsShowClass - Specific Classes that the company needs to reflect from Aljex into C-View.'],\r\n ['(column X) CfsSendExceptionEmail - Email addresses that are sent exception updates – this is both internal and external email addresses.'],\r\n ['(column Y) CfsExceptionThreshold - Company’s specifics on what clarifies as a true exception – to help build the logic around the emails that are sent from C-View.'],\r\n [''],\r\n ['The following 5 columns are only needed if CMTS was included in column D/ Customer Type*. Otherwise, leave these 5 columns blank.'],\r\n ['(column Z) CmtsDefaultContact - Email address of the Crane employee that will be notified when the client sends an email from C-View.'],\r\n ['(column AA) CmtsDefaultBccs - Additional email addresses that are blind copied when the client sends an email from C-View.'],\r\n ['(column AB) CmtsTradingPartnerIds - Trading Partner IDs that the company needs from 3GTMS to show the shipments.'],\r\n ['(column AC) CmtsSendExceptionEmail - Email addresses that are sent exception updates – this is both internal and external email addresses.'],\r\n ['(column AD) CmtsExceptionThreshold - Company’s specifics on what clarifies as a true exception – to help build the logic around the emails that are sent from C-View.'],\r\n [''],\r\n ['(column AE) EnableDemo – Does the company need a demonstration feature to utilize without a Crane employee’s account? Default is Yes.'],\r\n [''],\r\n ['If you are not sure what goes in a column/field, leave it blank.'],\r\n ['There is no place for additional notes in this form. Please add additional notes in the Description field in the ticket.']\r\n ];\r\n\r\n var wb = new Workbook(), ws = sheet_from_array_of_arrays(headers,headerIndex,instructionIndex);\r\n //Added Sheet 2\r\n var ws2 = sheet_from_array_of_arrays(ws2_headers, headerIndex, instructionIndex);\r\n\r\n /* add worksheet to workbook */\r\n wb.SheetNames.push(ws_name);\r\n wb.SheetNames.push(ws2_name); //Added Sheet 2 to workbook\r\n wb.Sheets[ws_name] = ws;\r\n wb.Sheets[ws2_name] = ws2; //Added Sheet 2 to workbook\r\n var wbout = XLSX.write(wb, {bookType:'xlsx', bookSST:true, type: 'binary'});\r\n saveAs(new Blob([s2ab(wbout)],{type:\"application/octet-stream\"}), filename);\r\n }\r\n\r\n // ----------------------------------\r\n // Uploads files to the backend\r\n // ----------------------------------\r\n function uploadFile(file, errFiles) {\r\n var selectedFile=file;\r\n var dublicateRecordExists = false;\r\n var headers = [\"Name*\",\"AccessType*\",\"PortalType*\",\"CustomerTypes*\",\"CwwDefaultContact\",\"CwwDefaultBccs\",\"CwwPartyIds\",\"CwwGroupIds\",\"CwwEnableDiscussion\"\r\n ,\"CwwEnableShowBookings\",\"CwwEnableMagnoSkin\",\"CwwEnableActionBoard\",\"CwwRefreshTime\",\"CslDefaultContact\",\"CslDefaultBccs\",\"CslCustomerIds\",\"CslShowClass\"\r\n ,\"CslSendExceptionEmail\",\"CslExceptionThreshold\",\"CfsDefaultContact\",\"CfsDefaultBccs\",\"CfsCustomerIds\",\"CfsShowClass\",\"CfsSendExceptionEmail\"\r\n ,\"CfsExceptionThreshold\",\"CmtsDefaultContact\",\"CmtsDefaultBccs\",\"CmtsTradingPartnerIds\",\"CmtsSendExceptionEmail\",\"CmtsExceptionThreshold\",\"EnableDemo*\"];\r\n var file_headers = [], count = 0;\r\n\r\n if (!file) {return;}\r\n var reader = new FileReader();\r\n reader.readAsBinaryString(selectedFile);\r\n reader.onload = function(event){\r\n var data = event.target.result; //reader.result.split(/\\r?\\n/),\r\n var workbook=XLSX.read(data,{type:\"binary\"});\r\n workbook.SheetNames.forEach(function(sheet){\r\n if (sheet == 'Sheet1') {\r\n var rowObject = XLSX.utils.sheet_to_row_object_array(workbook.Sheets[sheet], {\r\n header: 1,\r\n defval: '',\r\n blankrows: true\r\n });\r\n if (rowObject.length > 0)\r\n rowObject = rowObject.slice(1);\r\n count = rowObject.length;\r\n angular.forEach(rowObject, function (value, key) {\r\n angular.forEach(rowObject, function (val2, key2) {\r\n if (key2 != 0 && key != 0 && key2 > key && angular.equals(value[0], val2[0])) {\r\n dublicateRecordExists = true;\r\n return;\r\n }\r\n ;\r\n });\r\n if (dublicateRecordExists === true) {\r\n return;\r\n }\r\n });\r\n rowObject[0].forEach(function (strHeader, index) {\r\n if (index < headers.length)\r\n file_headers.push(strHeader);\r\n if (index >= headers.length)\r\n return false;\r\n });\r\n }\r\n });\r\n\r\n //var file_headers = data[0].split(',').map(function(d){return d.toLowerCase();}), count = data.length - 1;\r\n //file_headers = file_headers;\r\n if (!dublicateRecordExists && headers.length ===file_headers.length && count <= 500 && headers.every(function(n,i){return n.toLowerCase() === file_headers[i].toLowerCase()})){\r\n upload();\r\n } else if (dublicateRecordExists) {\r\n $scope.errorMsg = 'Duplicate records';\r\n showToastWithFile('attach-doc.error.html', [\"Duplicate company names found in xlsx file.\"], 7000);\r\n }\r\n else if (count > 500) {\r\n $scope.errorMsg = 'Too many records';\r\n showToastWithFile('attach-doc.error.html', [\"Max Exceeded: Upload User Limit is 500\"], 7000);\r\n } else {\r\n $scope.errorMsg = 'Invalid headers';\r\n showToastWithFile('attach-doc.invalid.error.html', [\"'Name*','AccessType*','PortalType*','CustomerTypes*','CwwDefaultContact','CwwDefaultBccs','CwwPartyIds','CwwGroupIds','CwwEnableDiscussion','CwwEnableShowBookings','CwwEnableMagnoSkin','CwwEnableActionBoard','CwwRefreshTime','CslDefaultContact','CslDefaultBccs','CslCustomerIds','CslShowClass' ,'CslSendExceptionEmail','CslExceptionThreshold','CfsDefaultContact','CfsDefaultBccs','CfsCustomerIds','CfsShowClass','CfsSendExceptionEmail' ,'CfsExceptionThreshold','CmtsDefaultContact','CmtsDefaultBccs','CmtsTradingPartnerIds','CmtsSendExceptionEmail','CmtsExceptionThreshold','EnableDemo*'\"], 7000);\r\n }\r\n }\r\n //reader.readAsText(file);\r\n vm.errFile = errFiles && errFiles[0];\r\n function upload(){\r\n vm.file.isUploading = true;\r\n CompanyManagementService.uploadFile(file, errFiles).then(function (response) {\r\n $timeout(function () {\r\n $location.path(\"/companies/verify-companies\");\r\n });\r\n }).catch(function (response) {\r\n if(response.status > 0) {\r\n $scope.errorMsg = \"Error in company bulk upload Service.\";\r\n showToastWithFile('attach-doc.error.html', [$scope.errorMsg]);\r\n }\r\n }).finally(function(){\r\n vm.file.isUploading = false;\r\n });\r\n }\r\n }\r\n\r\n $scope.actionTimeOut = false;\r\n $scope.ViewActionBoard = function(action){\r\n vm.company.refresh_time='';\r\n if(action){\r\n $scope.actionTimeOut = true;\r\n }else{\r\n $scope.actionTimeOut = false;\r\n }\r\n }\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('BulkUsersController', BulkUsersController);\r\n\r\n BulkUsersController.$inject = [\"$scope\", \"$rootScope\", \"api\", \"$q\", \"UserManagementService\", 'UserService', \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', '$mdMedia', '$mdDialog', '$http', 'mdSelectHelper', '$timeout', \"$window\",\"CompanyManagementService\",\"ngTableEventsChannel\"];\r\n function BulkUsersController($scope, $rootScope, api, $q, UserManagementService, UserService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, $mdMedia, $mdDialog, $http, mdSelectHelper, $timeout, $window,CompanyManagementService,ngTableEventsChannel) {\r\n\r\n var vm = this;\r\n // ----------------------------------------------------\r\n // User Table Variables\r\n vm.taken_emails = {};\r\n vm.users = UserManagementService.getBulkUsers();\r\n vm.postBulkUsers = postBulkUsers;\r\n vm.isLoading = true;\r\n vm.lastSelected = 0;\r\n vm.lastSelectedValue = true;\r\n //vm.initialLoad = true;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.setFilter = setFilter;\r\n vm.bulkFilter = 'all';\r\n vm.counts = {\"all\": 0, \"errors\": 0}\r\n vm.rowHasErrors = rowHasErrors;\r\n vm.updateErrorCount = updateErrorCount;\r\n vm.cancel = cancel;\r\n vm.asyncErrors = asyncErrors;\r\n vm.showApiError = showApiError;\r\n vm.closeModal = closeModal;\r\n vm.add_company = add_company;\r\n vm.refreshCompanies = refreshCompanies;\r\n vm.refreshEmails = refreshEmails;\r\n vm.selectedRowsValid = selectedRowsValid;\r\n vm.selectedUsers = selectedUsers;\r\n vm.selectAll = selectAll;\r\n vm.selectAllChecked = true;\r\n vm.selectUser = selectUser;\r\n vm.shiftSelect = shiftSelect;\r\n vm.selected = selected;\r\n vm.companyIdExist = \"\";\r\n vm.emailList=[]; \r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n vm.getMatch = getMatch;\r\n vm.sendErrorsToEmails=sendErrorsToEmails;\r\n vm.isSendEmailLoading = false;\r\n vm.readAccess = false;\r\n // ----------------------------------------\r\n // Page Initialization\r\n // ----------------------------------------\r\n\r\n switch ($state.current.name){\r\n case 'verifyUsers':\r\n if (!vm.users.length > 0){\r\n $location.path('/users/import-users');\r\n }\r\n $scope.$watch('vm.bulkUsersForm', function(bulkUsersForm) {\r\n if(!bulkUsersForm) {\r\n // console.log('No form yet');\r\n } else {\r\n vm.updateErrorCount();\r\n }\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n // Take action depending on state\r\n // ----------------------------------------\r\n angular.element(vm.bulkUsersForm).ready(function(){\r\n initializeErrors();\r\n });\r\n\r\n // ----------------------------------\r\n // Uploads files to the backend\r\n // ----------------------------------\r\n\r\n\r\n // -------------------------------\r\n // User Edit Form validation\r\n // -------------------------------\r\n // function checkError(form, field){\r\n // return form.$invalid && form[field] && form[field].$invalid && (vm.isSave || form[field].$touched);\r\n // }\r\n\r\n // function formIsValid(){\r\n // // Ensure all subforms are valid\r\n // if (canSetIsCraneContact() && vm.formDetails && vm.formRole && vm.formSettings){\r\n // return vm.formDetails.$valid && vm.formRole.$valid && vm.formSettings.$valid;\r\n // } else if (!canSetIsCraneContact() && vm.formDetails && vm.formRole) {\r\n // return vm.formDetails.$valid && vm.formRole.$valid\r\n // } else {\r\n // return false;\r\n // }\r\n // }\r\n //=================================\r\n\r\n function selected(index){\r\n vm.lastSelected = index;\r\n if (vm.users.length){\r\n vm.lastSelectedValue = vm.users[index].row;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else if (vm.lastSelected == index){\r\n vm.lastSelectedValue = !vm.lastSelectedValue;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.users[i].row = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function selectUser($event, index){\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n }\r\n\r\n // -----------------------------------\r\n // User Table functions\r\n // -----------------------------------\r\n function setFieldErrors(fieldErrors, element_index){\r\n for (var key in fieldErrors){\r\n //fieldErrors[key].map(function(message, index){\r\n if (typeof(vm.bulkUsersForm[key+'-'+element_index]) !== 'undefined' ){\r\n var message_key = \"\";\r\n var viewValueStr =(vm.bulkUsersForm[key+'-'+element_index].$viewValue !== null && vm.bulkUsersForm[key+'-'+element_index].$viewValue !== undefined) ? vm.bulkUsersForm[key+'-'+element_index].$viewValue.trim() : \"\";\r\n vm.bulkUsersForm[key+'-'+element_index].$setViewValue(viewValueStr);\r\n\r\n switch (key){\r\n case 'email':\r\n message_key = \"email\";\r\n break;\r\n case 'company':\r\n message_key = \"company\";\r\n break;\r\n case 'customer_types':\r\n message_key = \"customer_types\";\r\n break;\r\n case 'first_name':\r\n message_key = \"first_name\";\r\n break;\r\n case 'last_name':\r\n message_key = \"last_name\";\r\n break;\r\n case 'roles':\r\n message_key = \"roles\";\r\n break;\r\n }\r\n\r\n vm.bulkUsersForm[key+'-'+element_index].$setDirty();\r\n vm.bulkUsersForm[key+'-'+element_index].$setValidity(key, false);\r\n }\r\n //});\r\n }\r\n vm.setFilter('all');\r\n }\r\n\r\n function initializeErrors(){\r\n var new_users = vm.users;\r\n vm.counts.all = new_users.length;\r\n vm.counts.errors =0;\r\n var emails = {};\r\n new_users.map(function(user, index) {\r\n if(user.company_id){ vm.companyIdExist = user.company_id; }else{ vm.companyIdExist = \"\"; }\r\n user.row = true;\r\n if (emails[user.email] === undefined){\r\n emails[user.email] = index;\r\n } else if (emails[user.email] != index){\r\n vm.bulkUsersForm['email-'+index].$setDirty();\r\n vm.bulkUsersForm['email-'+index].$setValidity('email', false);\r\n }\r\n\r\n var user_errors = user.errors;\r\n\r\n if (user.errors.email){\r\n vm.taken_emails[user.email] = true;\r\n }\r\n\r\n if (user_errors.company !== undefined || user_errors.email !== undefined || user_errors.customer_types !== undefined \r\n || user_errors.first_name !== undefined || user_errors.last_name !== undefined || user_errors.roles !== undefined \r\n || user_errors.pathway_role !== undefined || user_errors.party_id_overrides !== undefined \r\n || user_errors.bccs_overrides !== undefined || user_errors.primary_contact_overrides !== undefined ){\r\n vm.counts.errors += 1;\r\n }\r\n setFieldErrors(user_errors, index);\r\n });\r\n vm.isLoading = false;\r\n }\r\n\r\n\r\n\r\n\r\n function postBulkUsers(){\r\n vm.isLoading = true;\r\n UserManagementService.postBulkUsers(selectedUsers(vm.users)).then(function(response){\r\n vm.isLoading = false;\r\n \r\n if (response.status != 200) {\r\n var errors = typeof response.data.errors == 'string' ? [response.data.errors] : response.data.errors;\r\n showApiError(errors);\r\n }\r\n else {\r\n var createdUserEmails = response.data.users.map(function(d, i){ return d.email});\r\n var createdUserIDs = response.data.users.map(function(d, i){ return d.id}); \r\n vm.users = vm.users.filter(function(d, i){\r\n return !d.row || createdUserEmails.indexOf(d.email.toLowerCase()) === -1;\r\n });\r\n \r\n var importUserIds = \"\";\r\n for (var i = 0; i < createdUserIDs.length; i++) { \r\n importUserIds += \"user_ids=\"+createdUserIDs[i]+\"&\";\r\n \r\n }\r\n\r\n vm.showToastWithFile('bulk-import-success.html', \"Successfully created \" +\r\n response.data.users.length + \" account(s)\");\r\n\r\n setTimeout(function(){\r\n //$location.url(\"/users/bulk-edit?\" + importUserIds);\r\n $location.url(\"/users\");\r\n },2500);\r\n \r\n // vm.updateErrorsCount();\r\n vm.counts.all = vm.users.length;\r\n /*vm.showToastWithFile('bulk-import-success.html', \"Successfully created \" +\r\n response.data.users.length + \" account(s)\", vm.users.length);*/\r\n }\r\n });\r\n }\r\n\r\n function selectedUsers(users){\r\n var selected_users = users.filter(function(d, i){\r\n return d.row;\r\n\r\n });\r\n\r\n return selected_users;\r\n }\r\n\r\n function selectedRowsValid(){\r\n var rows_valid = true;\r\n vm.users.map(function(d,i){\r\n if (rowHasErrors(i) && d.row){\r\n\r\n rows_valid =false;\r\n\r\n }\r\n });\r\n return rows_valid;\r\n }\r\n\r\n function selectAll(){\r\n vm.users.map(function(d, i){\r\n\r\n if (vm.selectAllChecked){\r\n\r\n d.row = true\r\n }\r\n else {\r\n d.row = false\r\n }\r\n\r\n });\r\n }\r\n\r\n\r\n\r\n function cancel(){\r\n $location.path(\"/users\");\r\n }\r\n\r\n function setFilter(value){\r\n vm.bulkFilter = value;\r\n }\r\n\r\n function rowHasErrors(index){\r\n if( vm.users[index].errors && (vm.users[index].errors.company !== undefined ||\r\n vm.users[index].errors.email !== undefined || vm.users[index].errors.customer_types !== undefined ||\r\n vm.users[index].errors.first_name !== undefined || vm.users[index].errors.last_name !== undefined ||\r\n vm.users[index].errors.roles !== undefined || vm.users[index].errors.pathway_role !== undefined ||\r\n vm.users[index].errors.party_id_overrides !== undefined || vm.users[index].errors.bccs_overrides !== undefined ||\r\n vm.users[index].errors.primary_contact_overrides !== undefined))\r\n return true;\r\n else\r\n {\r\n if(vm.bulkUsersForm['company-'+index] !== undefined &&\r\n vm.bulkUsersForm['email-'+index] !== undefined &&\r\n vm.bulkUsersForm['customer_types-'+index] !== undefined &&\r\n vm.bulkUsersForm['first_name-'+index] !== undefined &&\r\n vm.bulkUsersForm['last_name-'+index] !== undefined &&\r\n vm.bulkUsersForm['roles-'+index] !== undefined ){\r\n return !(vm.bulkUsersForm['company-'+index].$invalid===false &&\r\n vm.bulkUsersForm['email-'+index].$invalid===false && \r\n vm.bulkUsersForm['customer_types-'+index].$invalid ===false &&\r\n vm.bulkUsersForm['first_name-'+index].$invalid ===false &&\r\n vm.bulkUsersForm['last_name-'+index].$invalid ===false && \r\n vm.bulkUsersForm['roles-'+index].$invalid ===false);\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n function add_company(){\r\n $window.open(\"/companies/new\", \"_blank\");\r\n }\r\n\r\n function refreshCompanies(){\r\n Object.keys(vm.bulkUsersForm)\r\n .filter(function(attribute){\r\n return attribute.match(/company-[0-9]*/);\r\n })\r\n .map(function(company){\r\n if ( vm.bulkUsersForm[company].$invalid ){\r\n vm.bulkUsersForm[company].$validate();\r\n }\r\n });\r\n }\r\n\r\n function refreshEmails(){\r\n Object.keys(vm.bulkUsersForm)\r\n .filter(function(attribute){\r\n return attribute.match(/email-[0-9]*/);\r\n })\r\n .map(function(email){\r\n vm.bulkUsersForm[email].$validate();\r\n });\r\n }\r\n\r\n function asyncErrors(ngModel) {\r\n var field = ngModel.$name.replace(/-\\d+/,\"\");\r\n var index = ngModel.$name.replace(/\\D+/g,\"\");\r\n\r\n ngModel.$asyncValidators[field] = function(modelValue, viewValue) {\r\n if (vm.isLoading === false){\r\n var fields;\r\n if(field == 'customer_types'){\r\n fields = {field: field, company_id: vm.companyIdExist, value: viewValue}\r\n }else{\r\n fields = {field: field, value: viewValue}\r\n }\r\n\r\n return $http({\r\n url: api.url + \"/bulk_users/validate_field\",\r\n method: \"GET\",\r\n params: fields\r\n } ).then(\r\n function(response) {\r\n if (!response.data[field].valid) {\r\n if(field == 'company'){ vm.companyIdExist = \"\"; }\r\n vm.taken_emails[viewValue] = true;\r\n }\r\n if (field === 'company'){\r\n var company_id = response.data[field].id;\r\n if(company_id){ vm.companyIdExist = company_id; }\r\n else{ vm.companyIdExist = \"\"; }\r\n //ngModel.$modelValue = company_id;\r\n ngModel.$$parentForm['company_id-'+index].$setViewValue(company_id);\r\n ngModel.$$parentForm['company_id-'+index].$render();\r\n //ngModel.$$parentForm['company_id-'+index].\r\n }\r\n return true;\r\n });\r\n }\r\n return $q.resolve();\r\n };\r\n }\r\n\r\n function updateErrorCount(){\r\n vm.counts.errors = 0; \r\n var emails = {};\r\n var userEmailForm;\r\n vm.users.map(function(user, index){\r\n userEmailForm = vm.bulkUsersForm['email-'+index];\r\n if (userEmailForm && !vm.taken_emails[userEmailForm.$viewValue]){\r\n userEmailForm.$setValidity('email', true);\r\n }\r\n if (emails[user.email] === undefined){\r\n emails[user.email] = index;\r\n } else if (userEmailForm && emails[user.email] != index){\r\n userEmailForm.$setDirty();\r\n userEmailForm.$setValidity('email', false); \r\n }\r\n\r\n if (rowHasErrors(index)){\r\n vm.counts.errors += 1\r\n }\r\n });\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n\r\n function sendErrorsToEmails() {\r\n vm.isSendEmailLoading = true; \r\n UserManagementService.sendErrorsToEmails(vm.emailList.join(), vm.users).then(function(response){\r\n vm.isSendEmailLoading = false;\r\n \r\n if (response.status != 200) {\r\n var errors = typeof response.data == 'string' ? [response.data] : response.data;\r\n vm.showToastWithFile('bulk-import-success.html', \"Isuues in Server : \" + errors);\r\n }\r\n else {\r\n vm.showToastWithFile('bulk-import-success.html', \"Emails have been sent successfully : \" + vm.emailList);\r\n vm.emailList=[];\r\n }\r\n });\r\n }\r\n\r\n function getMatch(key, query){\r\n return CompanyManagementService.autoComplete({field: key, value: query});\r\n }\r\n\r\n\r\n function showApiError(messages) {\r\n $scope.apiErrorMessages = [];\r\n angular.forEach(messages, function(m) {\r\n // filter out some of the meaningless messages\r\n\r\n $scope.apiErrorMessages.push(m);\r\n });\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/users/modals/api-error.modal.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n function showToastWithFile(file, message) { \r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/bulk-users/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.message = message;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent')) \r\n });\r\n\r\n\r\n }\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('BulkCompaniesController', BulkCompaniesController);\r\n\r\n BulkCompaniesController.$inject = [\"$scope\", \"$rootScope\", \"api\", \"$q\", \"UserManagementService\", 'UserService', \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', '$mdMedia', '$mdDialog', '$http', 'mdSelectHelper', '$timeout', \"$window\",\"CompanyManagementService\",\"ngTableEventsChannel\"];\r\n function BulkCompaniesController($scope, $rootScope, api, $q, UserManagementService, UserService, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, $mdMedia, $mdDialog, $http, mdSelectHelper, $timeout, $window,CompanyManagementService,ngTableEventsChannel) {\r\n\r\n var vm = this;\r\n // ----------------------------------------------------\r\n // Company Table Variables\r\n vm.taken_emails = {};\r\n vm.companies = CompanyManagementService.getBulkCompanies();\r\n vm.postBulkCompanies = postBulkCompanies;\r\n vm.isLoading = true;\r\n vm.lastSelected = 0;\r\n vm.lastSelectedValue = true;\r\n //vm.initialLoad = true;\r\n vm.showToastWithFile = showToastWithFile;\r\n vm.setFilter = setFilter;\r\n vm.bulkFilter = 'all';\r\n vm.counts = {\"all\": 0, \"errors\": 0}\r\n vm.rowHasErrors = rowHasErrors;\r\n vm.updateErrorCount = updateErrorCount;\r\n vm.cancel = cancel;\r\n //vm.asyncErrors = asyncErrors;\r\n vm.showApiError = showApiError;\r\n vm.closeModal = closeModal;\r\n vm.add_company = add_company;\r\n vm.refreshCompanies = refreshCompanies;\r\n vm.refreshEmails = refreshEmails;\r\n vm.selectedRowsValid = selectedRowsValid;\r\n vm.selectedCompanies = selectedCompanies;\r\n vm.selectAll = selectAll;\r\n vm.selectAllChecked = true;\r\n vm.selectCompany = selectCompany;\r\n vm.shiftSelect = shiftSelect;\r\n vm.selected = selected;\r\n vm.companyIdExist = \"\";\r\n vm.emailList=[];\r\n vm.keys = [$mdConstant.KEY_CODE.ENTER, $mdConstant.KEY_CODE.COMMA, $mdConstant.KEY_CODE.TAB];\r\n vm.getMatch = getMatch;\r\n vm.sendErrorsToEmails=sendErrorsToEmails;\r\n vm.isSendEmailLoading = false;\r\n vm.readAccess = false;\r\n // ----------------------------------------\r\n // Page Initialization\r\n // ----------------------------------------\r\n\r\n switch ($state.current.name){\r\n case 'verifyCompanies':\r\n if (!vm.companies.length > 0){\r\n $location.path('/companies/import-companies');\r\n }\r\n $scope.$watch('vm.bulkCompaniesForm', function(bulkCompaniesForm) {\r\n if(!bulkCompaniesForm) {\r\n // console.log('No form yet');\r\n }\r\n });\r\n break;\r\n default:\r\n break;\r\n }\r\n // Take action depending on state\r\n // ----------------------------------------\r\n angular.element(vm.bulkCompaniesForm).ready(function(){\r\n initializeErrors();\r\n });\r\n\r\n\r\n function selected(index){\r\n vm.lastSelected = index;\r\n if (vm.companies.length){\r\n vm.lastSelectedValue = vm.companies[index].row;\r\n }\r\n }\r\n\r\n function shiftSelect(index){\r\n var first, last;\r\n if (vm.lastSelected > index){\r\n first = index; last = vm.lastSelected;\r\n } else if (vm.lastSelected == index){\r\n vm.lastSelectedValue = !vm.lastSelectedValue;\r\n } else {\r\n first = vm.lastSelected; last = index;\r\n }\r\n for (var i = first; i <= last; i++){\r\n vm.companies[i].row = vm.lastSelectedValue;\r\n }\r\n vm.selected(index);\r\n }\r\n\r\n function selectCompany($event, index){\r\n if ($event.shiftKey){\r\n vm.shiftSelect(index);\r\n } else {\r\n selected(index);\r\n }\r\n }\r\n\r\n // -----------------------------------\r\n // Company Table functions\r\n // -----------------------------------\r\n function setFieldErrors(fieldErrors, element_index){\r\n for (var key in fieldErrors){\r\n //fieldErrors[key].map(function(message, index){\r\n if (typeof(vm.bulkCompaniesForm[key+'-'+element_index]) !== 'undefined' ){\r\n //var message_key = key;\r\n var viewValueStr =(vm.bulkCompaniesForm[key+'-'+element_index].$viewValue !== null && vm.bulkCompaniesForm[key+'-'+element_index].$viewValue !== undefined) ? vm.bulkCompaniesForm[key+'-'+element_index].$viewValue.trim() : \"\";\r\n vm.bulkCompaniesForm[key+'-'+element_index].$setViewValue(viewValueStr);\r\n\r\n vm.bulkCompaniesForm[key+'-'+element_index].$setDirty();\r\n vm.bulkCompaniesForm[key+'-'+element_index].$setValidity(key, false);\r\n }\r\n //});\r\n }\r\n vm.setFilter('all');\r\n }\r\n\r\n function initializeErrors(){\r\n var new_companies = vm.companies;\r\n vm.counts.all = new_companies.length;\r\n vm.counts.errors =0;\r\n var emails = {};\r\n new_companies.map(function(company, index) {\r\n if(company.company_id){ vm.companyIdExist = company.company_id; }else{ vm.companyIdExist = \"\"; }\r\n company.row = true;\r\n\r\n if(company.cww_enable_show_bookings){\r\n if(!['yes','no'].includes(company.cww_enable_show_bookings.toString().trim().toLowerCase()))\r\n company.errors.cww_enable_show_bookings=\"Invalid cww enable show bookings\";\r\n }\r\n\r\n if(company.cww_enable_discussion){\r\n if(!['yes','no'].includes(company.cww_enable_discussion.toString().trim().toLowerCase()))\r\n company.errors.cww_enable_discussion=\"Invalid cww enable discussion\";\r\n }\r\n //change to all\r\n\r\n if(company.cww_enable_magno_skin){\r\n if(!['yes','no'].includes(company.cww_enable_magno_skin.toString().trim().toLowerCase()))\r\n company.errors.cww_enable_magno_skin=\"Invalid cww enable magno skin\";\r\n }\r\n\r\n if(company.cww_enable_action_board){\r\n if(!['yes','no'].includes(company.cww_enable_action_board.toString().trim().toLowerCase()))\r\n company.errors.cww_enable_action_board=\"Invalid cww enable action board\";\r\n }\r\n\r\n if(company.csl_show_class){\r\n if(!['yes','no'].includes(company.csl_show_class.toString().trim().toLowerCase()))\r\n company.errors.csl_show_class=\"Invalid csl show class\";\r\n }\r\n\r\n if(company.csl_send_exception_email){\r\n if(!['yes','no'].includes(company.csl_send_exception_email.toString().trim().toLowerCase()))\r\n company.errors.csl_send_exception_email=\"Invalid csl send exception email\";\r\n }\r\n\r\n if(company.cfs_show_class){\r\n if(!['yes','no'].includes(company.cfs_show_class.toString().trim().toLowerCase()))\r\n company.errors.cfs_show_class=\"Invalid cfs show class\";\r\n }\r\n\r\n if(company.cfs_send_exception_email){\r\n if(!['yes','no'].includes(company.cfs_send_exception_email.toString().trim().toLowerCase()))\r\n company.errors.cfs_send_exception_email=\"Invalid cfs send exception email\";\r\n }\r\n\r\n if(company.cmts_send_exception_email){\r\n if(!['yes','no'].includes(company.cmts_send_exception_email.toString().trim().toLowerCase()))\r\n company.errors.cmts_send_exception_email=\"Invalid cmts send exception email\";\r\n }\r\n\r\n if(company.enable_demo){\r\n if(!['yes','no'].includes(company.enable_demo.toString().trim().toLowerCase()))\r\n company.errors.enable_demo=\"Invalid enable demo\";\r\n }\r\n\r\n if(company.cww_refresh_time !== null && company.cww_refresh_time !== undefined && company.cww_refresh_time.toString()!==''){\r\n var refreshRes=parseInt(company.cww_refresh_time);\r\n var isNumVal=Number.isInteger(company.cww_refresh_time);\r\n if(refreshRes.toString() === 'NaN' || refreshRes < 0 || !isNumVal || refreshRes > 9999)\r\n company.errors.cww_refresh_time=\"Invalid cww refresh time\";\r\n }\r\n\r\n var company_errors = company.errors;\r\n\r\n //if (company.errors.email){\r\n // vm.taken_emails[company.email] = true;\r\n //}\r\n\r\n if (company_errors.name !== undefined || company_errors.access_type !== undefined || company_errors.portal_type !== undefined\r\n || company_errors.customer_types !== undefined || company_errors.cww_default_contact !== undefined || company_errors.cww_default_bccs !== undefined\r\n || company_errors.cww_party_ids !== undefined || company_errors.cww_group_ids !== undefined || company_errors.cww_enable_discussion !== undefined\r\n || company_errors.cww_enable_show_bookings !== undefined || company_errors.cww_enable_magno_skin !== undefined || company_errors.csl_default_contact !== undefined\r\n || company_errors.cww_enable_action_board !== undefined || company_errors.csl_default_bccs !== undefined || company_errors.csl_customer_ids !== undefined\r\n || company_errors.csl_show_class !== undefined || company_errors.csl_exception_email !== undefined || company_errors.csl_exception_threshold !== undefined\r\n || company_errors.cfs_default_contact !== undefined || company_errors.cfs_default_bccs !== undefined || company_errors.cfs_customer_ids !== undefined\r\n || company_errors.cfs_show_class !== undefined || company_errors.cfs_exception_email !== undefined || company_errors.cfs_exception_threshold !== undefined\r\n || company_errors.cmts_default_contact !== undefined || company_errors.cmts_default_bccs !== undefined || company_errors.cmts_trading_partner_ids !== undefined\r\n || company_errors.cmts_exception_email !== undefined || company_errors.cmts_exception_threshold !== undefined || company_errors.enable_demo !== undefined\r\n || company_errors.cww_refresh_time !== undefined){\r\n vm.counts.errors += 1;\r\n }\r\n setFieldErrors(company_errors, index);\r\n });\r\n vm.isLoading = false;\r\n }\r\n\r\n function postBulkCompanies(){\r\n vm.isLoading = true;\r\n CompanyManagementService.postBulkCompanies(canonicalizeCompanies(selectedCompanies(vm.companies))).then(function(response){\r\n vm.isLoading = false;\r\n\r\n if (response.status != 200) {\r\n var errors = typeof response.data.errors == 'string' ? [response.data.errors] : response.data.errors;\r\n showApiError(errors);\r\n }\r\n else {\r\n var createdComapanies = response.data.companies.map(function(d, i){ return d.name});\r\n vm.companies = vm.companies.filter(function(d, i){\r\n return !d.row || createdComapanies.indexOf(d.name.toLowerCase()) === -1;\r\n });\r\n\r\n vm.showToastWithFile('bulk-import-success.html', \"Successfully created \" + response.data.companies.length + \" companies\");\r\n setTimeout(function(){\r\n $location.url(\"/companies\");\r\n },2500);\r\n\r\n vm.counts.all = vm.companies.length;\r\n }\r\n });\r\n }\r\n\r\n function canonicalizeCompanies(companies) {\r\n return companies.map(function (company) {\r\n if (company.cww_refresh_time === \"\") {\r\n company.cww_refresh_time = null;\r\n }\r\n if (company.csl_exception_threshold === \"\") {\r\n company.csl_exception_threshold = null;\r\n }\r\n if (company.cfs_exception_threshold === \"\") {\r\n company.cfs_exception_threshold = null;\r\n }\r\n if (company.cmts_exception_threshold === \"\") {\r\n company.cmts_exception_threshold = null;\r\n }\r\n return company;\r\n });\r\n }\r\n\r\n function selectedCompanies(companies){\r\n var selected_companies = companies.filter(function(d, i){\r\n return d.row;\r\n\r\n });\r\n\r\n return selected_companies;\r\n }\r\n\r\n function selectedRowsValid(){\r\n var rows_valid = true;\r\n vm.companies.map(function(d,i){\r\n if (rowHasErrors(i) && d.row){\r\n rows_valid =false;\r\n }\r\n });\r\n return rows_valid;\r\n }\r\n\r\n function selectAll(){\r\n vm.companies.map(function(d, i){\r\n\r\n if (vm.selectAllChecked){\r\n\r\n d.row = true\r\n }\r\n else {\r\n d.row = false\r\n }\r\n\r\n });\r\n }\r\n\r\n\r\n\r\n function cancel(){\r\n $location.path(\"/companies\");\r\n }\r\n\r\n function setFilter(value){\r\n vm.bulkFilter = value;\r\n }\r\n\r\n function rowHasErrors(index){\r\n if( vm.companies[index].errors && (vm.companies[index].errors.name !== undefined ||\r\n vm.companies[index].errors.access_type !== undefined || vm.companies[index].errors.portal_type !== undefined ||\r\n vm.companies[index].errors.customer_types !== undefined || vm.companies[index].errors.cww_default_contact !== undefined ||\r\n vm.companies[index].errors.cww_default_bccs !== undefined || vm.companies[index].errors.cww_party_ids !== undefined ||\r\n vm.companies[index].errors.cww_enable_discussion !== undefined || vm.companies[index].errors.cww_enable_show_bookings !== undefined ||\r\n vm.companies[index].errors.cww_enable_magno_skin !== undefined || vm.companies[index].errors.cww_enable_action_board !== undefined ||\r\n vm.companies[index].errors.cww_refresh_time !== undefined || vm.companies[index].errors.csl_show_class !== undefined ||\r\n vm.companies[index].errors.csl_show_class !== undefined || vm.companies[index].errors.csl_send_exception_email !== undefined ||\r\n vm.companies[index].errors.csl_exception_threshold !== undefined || vm.companies[index].errors.cfs_show_class !== undefined ||\r\n vm.companies[index].errors.cfs_send_exception_email !== undefined || vm.companies[index].errors.cfs_exception_threshold !== undefined ||\r\n vm.companies[index].errors.cmts_send_exception_email !== undefined || vm.companies[index].errors.cmts_exception_threshold !== undefined ||\r\n vm.companies[index].errors.cww_group_ids !== undefined || vm.companies[index].errors.csl_default_contact !== undefined ||\r\n vm.companies[index].errors.csl_default_bccs !== undefined || vm.companies[index].errors.csl_customer_ids !== undefined ||\r\n vm.companies[index].errors.cfs_default_contact !== undefined || vm.companies[index].errors.cfs_default_bccs !== undefined ||\r\n vm.companies[index].errors.cfs_customer_ids !== undefined || vm.companies[index].errors.cmts_default_contact !== undefined ||\r\n vm.companies[index].errors.cmts_default_bccs !== undefined || vm.companies[index].errors.cmts_trading_partner_ids !== undefined ||\r\n vm.companies[index].errors.enable_demo !== undefined))\r\n return true;\r\n else\r\n {\r\n if(vm.bulkCompaniesForm['name-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['access_type-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['portal_type-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['customer_types-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cww_default_contact-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cww_default_bccs-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cww_party_ids-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cww_group_ids-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cww_enable_discussion-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cww_enable_show_bookings-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cww_enable_magno_skin-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cww_enable_action_board-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cww_refresh_time-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['csl_default_contact-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['csl_default_bccs-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['csl_customer_ids-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['csl_show_class-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['csl_send_exception_email-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['csl_exception_threshold-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cfs_default_contact-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cfs_default_bccs-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cfs_customer_ids-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cfs_show_class-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cfs_send_exception_email-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cfs_exception_threshold-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cmts_default_contact-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cmts_default_bccs-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cmts_send_exception_email-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cmts_exception_threshold-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['enable_demo-'+index] !== undefined &&\r\n vm.bulkCompaniesForm['cmts_trading_partner_ids-'+index] !== undefined){\r\n return !(vm.bulkCompaniesForm['name-'+index].$invalid===false &&\r\n vm.bulkCompaniesForm['access_type-'+index].$invalid===false &&\r\n vm.bulkCompaniesForm['portal_type-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['customer_types-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cww_default_contact-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cww_default_bccs-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cww_party_ids-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cww_group_ids-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cww_enable_discussion-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cww_enable_show_bookings-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cww_enable_magno_skin-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cww_enable_action_board-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cww_refresh_time-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['csl_default_contact-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['csl_customer_ids-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['csl_default_bccs-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['csl_show_class-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['csl_send_exception_email-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['csl_exception_threshold-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cfs_default_contact-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cfs_default_bccs-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cfs_customer_ids-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cfs_show_class-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cfs_send_exception_email-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cfs_exception_threshold-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cmts_default_contact-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cmts_default_bccs-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cmts_send_exception_email-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cmts_exception_threshold-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['enable_demo-'+index].$invalid ===false &&\r\n vm.bulkCompaniesForm['cmts_trading_partner_ids-'+index].$invalid ===false);\r\n } else {\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n function add_company(){\r\n $window.open(\"/companies/new\", \"_blank\");\r\n }\r\n\r\n function refreshCompanies(){\r\n Object.keys(vm.bulkCompaniesForm)\r\n .filter(function(attribute){\r\n return attribute.match(/company-[0-9]*/);\r\n })\r\n .map(function(company){\r\n if ( vm.bulkCompaniesForm[company].$invalid ){\r\n vm.bulkCompaniesForm[company].$validate();\r\n }\r\n });\r\n }\r\n\r\n function refreshEmails(){\r\n Object.keys(vm.bulkCompaniesForm)\r\n .filter(function(attribute){\r\n return attribute.match(/email-[0-9]*/);\r\n })\r\n .map(function(email){\r\n vm.bulkCompaniesForm[email].$validate();\r\n });\r\n }\r\n\r\n /*function asyncErrors(ngModel) {\r\n var field = ngModel.$name.replace(/-\\d+/,\"\");\r\n var index = ngModel.$name.replace(/\\D+/g,\"\");\r\n\r\n ngModel.$asyncValidators[field] = function(modelValue, viewValue) {\r\n if (vm.isLoading === false){\r\n var fields;\r\n if(field == 'customer_types'){\r\n fields = {field: field, company_id: vm.companyIdExist, value: viewValue}\r\n }else{\r\n fields = {field: field, value: viewValue}\r\n }\r\n\r\n return $http({\r\n url: api.url + \"/bulk_companies/validate_field\",\r\n method: \"GET\",\r\n params: fields\r\n } ).then(\r\n function(response) {\r\n if (!response.data[field].valid) {\r\n if(field == 'company'){ vm.companyIdExist = \"\"; }\r\n vm.taken_emails[viewValue] = true;\r\n }\r\n if (field === 'company'){\r\n var company_id = response.data[field].id;\r\n if(company_id){ vm.companyIdExist = company_id; }\r\n else{ vm.companyIdExist = \"\"; }\r\n //ngModel.$modelValue = company_id;\r\n ngModel.$$parentForm['company_id-'+index].$setViewValue(company_id);\r\n ngModel.$$parentForm['company_id-'+index].$render();\r\n //ngModel.$$parentForm['company_id-'+index].\r\n }\r\n return true;\r\n });\r\n }\r\n return $q.resolve();\r\n };\r\n }*/\r\n\r\n function updateErrorCount(){\r\n vm.counts.errors = 0;\r\n //var emails = {};\r\n //var companyEmailForm;\r\n vm.companies.map(function(company, index){\r\n //companyNameForm = vm.bulkCompaniesForm['name-'+index];\r\n //if (companyNameForm){\r\n // companyNameForm.$setValidity('name', true);\r\n //}\r\n\r\n if (rowHasErrors(index)){\r\n vm.counts.errors += 1\r\n }\r\n });\r\n }\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n\r\n function sendErrorsToEmails() {\r\n vm.isSendEmailLoading = true;\r\n CompanyManagementService.sendErrorsToEmails(vm.emailList.join(), canonicalizeCompanies(vm.companies)).then(function(response){\r\n vm.isSendEmailLoading = false;\r\n\r\n if (response.status != 200) {\r\n var errors = typeof response.data == 'string' ? [response.data] : response.data;\r\n vm.showToastWithFile('bulk-import-success.html', \"Isuues in Server : \" + errors);\r\n }\r\n else {\r\n vm.showToastWithFile('bulk-import-success.html', \"Emails have been sent successfully : \" + vm.emailList);\r\n vm.emailList=[];\r\n }\r\n });\r\n }\r\n\r\n function getMatch(key, query){\r\n return CompanyManagementService.autoComplete({field: key, value: query});\r\n }\r\n\r\n\r\n function showApiError(messages) {\r\n $scope.apiErrorMessages = [];\r\n angular.forEach(messages, function(m) {\r\n // filter out some of the meaningless messages\r\n\r\n $scope.apiErrorMessages.push(m);\r\n });\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/companies/modals/api-error.modal.html',\r\n parent: angular.element(document.body),\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n function showToastWithFile(file, message) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n preserveScope: true,\r\n templateUrl: '/app/admin/bulk-companies/toast/' + file,\r\n locals: {message: message},\r\n controller: function($scope, message){\r\n $scope.message = message;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n\r\n\r\n }\r\n }\r\n}) ();\r\n\n(function() {\r\n 'use strict';\r\n\r\n /**\r\n * @ngdoc overview\r\n * @name CraneViewAngular\r\n * @description\r\n * # This module loads auxiliary modules for the application\r\n *\r\n * Core module of the application.\r\n */\r\n angular\r\n .module('app.core', [\r\n 'LocalStorageModule',\r\n 'ngAnimate',\r\n 'ngCookies',\r\n 'ipCookie',\r\n 'ngConstants',\r\n 'ngTouch',\r\n 'ngSanitize',\r\n 'ngMessages',\r\n 'ngAria',\r\n 'sticky',\r\n 'obDateRangePicker',\r\n 'ngMaterial',\r\n 'ngResource',\r\n 'ng-token-auth',\r\n 'pascalprecht.translate',\r\n 'as.sortable',\r\n 'toastr',\r\n 'ui.router',\r\n 'util.logger',\r\n 'util.router',\r\n 'ngFileUpload',\r\n 'angularResizable',\r\n 'slug'\r\n // 'blocks.exception', 'blocks.logger', 'blocks.router', 'ngplus'\r\n ]);\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .factory('mdSelectHelper', MdSelectHelper);\r\n\r\n MdSelectHelper.$inject = ['$q', '$mdSelect', '$timeout'];\r\n\r\n /* @ngInject */\r\n function MdSelectHelper($q, $mdSelect, $timeout) {\r\n var service = {\r\n onSelectOpen: onSelectOpen,\r\n onSelectClose: onSelectClose,\r\n info: onSelectClose\r\n };\r\n\r\n return service;\r\n /////////////////////\r\n var scrollMask;\r\n function onSelectOpen() { \r\n document.getElementById(\"bodyClass\").style.overflow = \"hidden\";\r\n //// console.log('open test');\r\n var defer = $q.defer();\r\n $timeout(function() {\r\n scrollMask = angular.element(document.body.getElementsByClassName('md-scroll-mask'));\r\n scrollMask.css('position', 'fixed')\r\n scrollMask.bind('click', onScrollMaskClick);\r\n scrollMask[0].style.zIndex = 9000;\r\n }, 500);\r\n defer.resolve();\r\n return defer.promise;\r\n }\r\n\r\n function onSelectClose() { \r\n document.getElementById(\"bodyClass\").style.overflow = \"auto\";\r\n scrollMask.unbind('click', onScrollMaskClick);\r\n }\r\n\r\n function onScrollMaskClick() {\r\n $mdSelect.cancel();\r\n }\r\n }\r\n} ());\r\n\n/**\r\n * @ngdoc module\r\n * @name user\r\n *\r\n * @description The module that handles a user\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular.module('app.user', [\r\n 'app.core',\r\n 'app.admin',\r\n ]);\r\n\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name UserService\r\n *\r\n *\r\n * @description\r\n * The UserService module provides a user by communicating with the Rails API\r\n *\r\n */\r\n\r\n/**\r\n*\r\n* @ngdoc method\r\n* @name getUserData()\r\n* @description getUserData() calls the API and returns the current user\r\n*/\r\n\r\n/**\r\n * * @ngdoc method\r\n * @name canAccess(feature, action)\r\n * @description Returns whether or not the user can perform a certain action within a feature\r\n * @param {string} feature The permission needed for access\r\n * @return {boolean} Whether or not the user has been granted this permission\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.user')\r\n .service('UserService', UserService);\r\n\r\n /** @ngInject */\r\n function UserService($resource, $auth, $http, $q, api, Idle, $rootScope,$window,$mdDialog, $mdToast) {\r\n var user = null;\r\n var ScrollHight = \"\";\r\n var SelectedsubmenuLink=\"\";\r\n var shippingDetailsExpanded = false,\r\n refNumbersExpanded = false,\r\n invoicesExpanded = false,\r\n tempAuth = {},\r\n shippingDetailsSettings = {},\r\n url = api.url + '/users/',\r\n fiveDayForecastDefault = false,\r\n fiveDayForecastAljexDefault = false,\r\n routeStatus = false,\r\n selectedRoute = null;\r\n\r\n //submenuLink = \"\";\r\n var AllActivetabs = [\r\n { index:'0',openFlag: false},\r\n { index:'1',openFlag: false},\r\n { index:'2',openFlag: false},\r\n { index:'3',openFlag: false},\r\n { index:'4',openFlag: false},\r\n { index:'5',openFlag: false},\r\n { index:'6',openFlag: false}\r\n ];\r\n\r\n loadUserData();\r\n loadShippingDetailsSettings();\r\n\r\n $rootScope.$on('IdleTimeout', function() {\r\n \t // the user has timed out (meaning idleDuration + timeout has passed without any activity)\r\n // this is where you'd log them\r\n // if (isLoggedIn()) {\r\n // $mdDialog.hide();\r\n // $mdDialog.cancel();\r\n // $mdToast.hide();\r\n // $mdToast.cancel();\r\n // logoutUser();\r\n // localStorage.removeItem('auth_headers');\r\n // localStorage.removeItem('user');\r\n // }\r\n });\r\n\r\n return {\r\n getUserData: getUserData,\r\n getUnseenCount: getUnseenCount,\r\n setUser: setUser,\r\n updateUser: updateUser,\r\n isLoggedIn: isLoggedIn,\r\n invoicesIsExpanded: invoicesIsExpanded,\r\n setInvoicesExpanded: setInvoicesExpanded,\r\n setContainerExpanded : setContainerExpanded,\r\n shippingDetailsIsExpanded: shippingDetailsIsExpanded,\r\n setShippingDetailsExpanded: setShippingDetailsExpanded,\r\n refNumbersIsExpanded: refNumbersIsExpanded,\r\n setRefNumbersExpanded: setRefNumbersExpanded,\r\n aljexSavedForecastIsExpanded: aljexSavedForecastIsExpanded,\r\n setAljexSavedForecastExpanded: setAljexSavedForecastExpanded,\r\n canAccess: canAccess,\r\n canAccessOperations: canAccessOperations,\r\n storeResetAuth: storeResetAuth,\r\n getResetAuth: getResetAuth,\r\n findValueForKeyInGroups: findValueForKeyInGroups,\r\n logoutUser: logoutUser,\r\n getUserTableSettings: getUserTableSettings,\r\n get5DFDefault: get5DFDefault,\r\n set5DFDefault: set5DFDefault,\r\n set5DFDefaultAljex: set5DFDefaultAljex,\r\n get5DFDefaultAljex: get5DFDefaultAljex,\r\n companyRouteChanged : companyRouteChanged,\r\n getCompanyRouteStatus : getCompanyRouteStatus,\r\n postDownloadFile : postDownloadFile,\r\n getResetQuestions:getResetQuestions,\r\n getResetQuestion:getResetQuestion,\r\n setSelectedRoute : setSelectedRoute,\r\n getSelectedRoute :getSelectedRoute,\r\n setsubmenuLink :setsubmenuLink,\r\n getsubmenuLink :getsubmenuLink,\r\n getScrollHight :getScrollHight,\r\n setScrollHight :setScrollHight,\r\n getActiveSpotlights: getActiveSpotlights,\r\n setSeenSpotlight: setSeenSpotlight,\r\n getUnseenSpotlights: getUnseenSpotlights,\r\n loadUserData: loadUserData,\r\n loadShippingDetailsSettings: loadShippingDetailsSettings,\r\n check_consignee_user: check_consignee_user,\r\n autoComplete: autoComplete,\r\n autoCompleteUsers: autoCompleteUsers,\r\n postDownloadFileAudit: postDownloadFileAudit,\r\n bulkUserExport : bulkUserExport,\r\n getAction_board_autoRefereshed : getAction_board_autoRefereshed\r\n };\r\n\r\n\r\n function autoComplete(query){\r\n\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function autoCompleteUsers(query){\r\n\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n\r\n function setScrollHight(getScrollHight) {\r\n ScrollHight=getScrollHight;\r\n return ScrollHight;\r\n }\r\n\r\n function getScrollHight() {\r\n return ScrollHight;\r\n }\r\n\r\n\r\n function get5DFDefault() {\r\n return fiveDayForecastDefault;\r\n }\r\n\r\n function set5DFDefault(data) {\r\n fiveDayForecastDefault = data;\r\n }\r\n\r\n function set5DFDefaultAljex(data) {\r\n fiveDayForecastAljexDefault = data;\r\n }\r\n\r\n function get5DFDefaultAljex() {\r\n return fiveDayForecastAljexDefault;\r\n }\r\n\r\n\r\n\r\n function getUserData() {\r\n if (user){\r\n return user; // $resource('/api/user/:id');\r\n } else {\r\n loadUserData();\r\n }\r\n return user;\r\n }\r\n\r\n function getUnseenCount(id){\r\n var url = '/users/'+id+'/unseen_discussion_count';\r\n var promise = $http.get(api.url_v2+url).then(function(res){\r\n return res;\r\n });\r\n return promise;\r\n\r\n }\r\n\r\n function getUserTableSettings(){\r\n var currentUser = getUserData();\r\n if (currentUser)\r\n return currentUser.settings.table_settings || 10;\r\n else\r\n return 10;\r\n }\r\n\r\n /**\r\n * Loads the user data from localStorage and sets the service's user variable\r\n */\r\n function loadUserData() {\r\n var val;\r\n var localUser = localStorage.getItem(\"user\");\r\n if (localUser) {\r\n try {\r\n user = JSON.parse(localUser);\r\n if(localStorage.getItem(\"dummyUser\") == null){\r\n val = \"\"\r\n }else\r\n {\r\n val = encodeURIComponent(localStorage.getItem(\"dummyUser\"));\r\n }\r\n $http.get(api.url_v2 + '/auth/validate_token?dummyUserEmail='+val).then(function(response) {\r\n if (response.status == 200) {\r\n setUser(response.data.data);\r\n }\r\n });\r\n }\r\n catch(e) {\r\n setUser(false);\r\n }\r\n }\r\n }\r\n\r\n function setUser(_user_){\r\n // start watching when the app runs. also starts the Keepalive service by default.\r\n //Idle.watch();\r\n user = _user_;\r\n if (user){\r\n localStorage.setItem(\"user\", JSON.stringify(_user_));\r\n localStorage.setItem(\"user_id\", parseInt(_user_.id));\r\n localStorage.setItem(\"user_emailId\",_user_.email);\r\n localStorage.setItem(\"azureuserid\",_user_.azure_user_id);\r\n localStorage.setItem(\"type\",_user_.type);\r\n localStorage.setItem('subindexval',JSON.stringify(AllActivetabs));\r\n localStorage.setItem(\"supportrequestAdmin\",_user_.support_request_admin);\r\n localStorage.setItem(\"supportrequestUser\",_user_.support_request_user);\r\n localStorage.setItem(\"supportrequestValidator\",_user_.support_request_validator);\r\n localStorage.setItem(\"show_shipment_class\",_user_.show_shipment_class);\r\n localStorage.setItem(\"show_cfs_class\",_user_.show_cfs_class);\r\n localStorage.setItem('cww_discussion_count',_user_.all_cww_unseen_discussion_count);\r\n localStorage.setItem('csl_discussion_count',_user_.all_csl_unseen_discussion_count);\r\n localStorage.setItem('cfs_discussion_count',_user_.all_cfs_unseen_discussion_count);\r\n localStorage.setItem('cmts_discussion_count',_user_.all_cmts_unseen_discussion_count);\r\n\r\n // Hardcoded for consignee portal [CV-1078]\r\n var isConsigneeShipper = false;\r\n\r\n if(_user_.portal_user_type == 'consignee' || _user_.portal_user_type == 'shipper'){\r\n isConsigneeShipper = true;\r\n }\r\n\r\n localStorage.setItem(\"is_consignee_user\",isConsigneeShipper);\r\n\r\n // Hardcoded for c-view-class admin [CV-1187]\r\n localStorage.setItem(\"cview_classic_admin\",_user_.cview_classic_admin);\r\n\r\n localStorage.setItem(\"supportRequestTabDefault\",'company_tickets');\r\n\r\n localStorage.setItem('adv_search_Action_cols', null);\r\n localStorage.setItem('clearadvancedsearch', null);\r\n\r\n if(_user_.action_board_adv_search_column != null) {\r\n localStorage.setItem('adv_search_Action_cols', JSON.stringify(_user_.action_board_adv_search_column.default_columns));\r\n }\r\n // find the dimension\r\n var value = findValueForKeyInGroups('user_segment');\r\n if (value) {\r\n ga('set', 'dimension1', value);\r\n }\r\n\r\n } else {\r\n localStorage.removeItem(\"user\");\r\n }\r\n }\r\n\r\n function check_consignee_user(){\r\n\r\n if(localStorage.getItem('consigneePortal')){\r\n return localStorage.getItem('consigneePortal');\r\n }else{\r\n return localStorage.getItem(\"is_consignee_user\");\r\n }\r\n }\r\n\r\n function updateUser(_user_){\r\n var k;\r\n for (k in _user_){\r\n user[k] = _user_[k];\r\n }\r\n var data = {\r\n first_name: user.first_name ? user.first_name : \"\",\r\n last_name: user.last_name ? user.last_name : \"\",\r\n email: user.email ? user.email : \"\",\r\n title: user.title ? user.title : \"\",\r\n phone: user.phone ? user.phone : \"\",\r\n notification_setting: user.notification_setting ? user.notification_setting : {potential_exceptions:false, exceptions:false, milestone_delivered:false},\r\n milestone_setting: user.milestone_setting ? user.milestone_setting : {booked:false, pick_up:false, confirmed_on_board:false},\r\n settings: user.settings.table_settings ? {table_settings: parseInt(user.settings.table_settings)} : {table_settings:10}\r\n };\r\n return $http.put(api.url_v2 + '/users/' + user.id, data)\r\n .then(function(response){\r\n setUser(response.data);\r\n });\r\n }\r\n\r\n function logoutUser(){\r\n var dummyUserParam = \"\";\r\n\r\n if(localStorage.getItem(\"dummyUser\") != null || localStorage.getItem(\"dummyUser\") != undefined){\r\n dummyUserParam = '?dummyUserEmail='+ encodeURIComponent(localStorage.getItem(\"dummyUser\"))\r\n }\r\n\r\n if(localStorage.getItem(\"auth_headers\")!= undefined && localStorage.getItem(\"auth_headers\")!= null){\r\n var authHeadersData=JSON.parse(localStorage.getItem(\"auth_headers\"));\r\n if(authHeadersData.client && authHeadersData.uid){\r\n if(dummyUserParam!=\"\")\r\n dummyUserParam+=\"&client=\"+authHeadersData.client+\"&uid=\"+authHeadersData.uid;\r\n else\r\n dummyUserParam=\"?client=\"+authHeadersData.client+\"&uid=\"+authHeadersData.uid;\r\n }\r\n }\r\n\r\n if(dummyUserParam!='' && dummyUserParam.length>0){\r\n $http.delete(api.url_v2 + '/auth/sign_out'+ dummyUserParam).then(function(res){\r\n $log.debug(res);\r\n }).finally(function(resp){\r\n $mdDialog.hide();\r\n $mdDialog.cancel();\r\n $mdToast.hide();\r\n $mdToast.cancel();\r\n //// console.log(\"Logging user out\");\r\n });\r\n }\r\n\r\n /*$auth.signOut().finally(function(resp){\r\n $mdDialog.hide();\r\n $mdDialog.cancel();\r\n $mdToast.hide();\r\n $mdToast.cancel();\r\n\t\t\t\t//// console.log(\"Logging user out\");\r\n });*/\r\n }\r\n\r\n /*\r\n * Check whether the user has authenticaiton in local storage\r\n * If so, turn on validateOnPageLoad (It had to be disabled on init)\r\n */\r\n function isLoggedIn(){\r\n var auth = localStorage.getItem(\"auth_headers\");\r\n if (auth){\r\n $auth.getConfig().validateOnPageLoad = true;\r\n }\r\n return auth !== undefined && auth !== \"{}\"&& auth != null;//$resource('/api/user/:id');\r\n }\r\n\r\n function invoicesIsExpanded(){\r\n try {\r\n return shippingDetailsSettings.invoicesExpanded;\r\n } catch (e) {\r\n loadShippingDetailsSettings();\r\n return shippingDetailsSettings.invoicesExpanded;\r\n }\r\n }\r\n\r\n function setInvoicesExpanded(expanded){\r\n shippingDetailsSettings.invoicesExpanded = expanded;\r\n storeShippingDetailsSettings();\r\n }\r\n\r\n function shippingDetailsIsExpanded(){\r\n return shippingDetailsSettings.shippingDetailsExpanded;\r\n }\r\n\r\n function setShippingDetailsExpanded(expanded){\r\n shippingDetailsSettings.shippingDetailsExpanded = expanded;\r\n storeShippingDetailsSettings();\r\n }\r\n\r\n function refNumbersIsExpanded(){\r\n return shippingDetailsSettings.refNumbersExpanded;\r\n }\r\n\r\n function setRefNumbersExpanded(expanded){\r\n shippingDetailsSettings.refNumbersExpanded = expanded;\r\n storeShippingDetailsSettings();\r\n }\r\n\r\n function aljexSavedForecastIsExpanded(){\r\n return shippingDetailsSettings.aljexSavedForecastExpanded;\r\n }\r\n\r\n function setAljexSavedForecastExpanded(expanded){\r\n shippingDetailsSettings.aljexSavedForecastExpanded = expanded;\r\n storeShippingDetailsSettings();\r\n }\r\n\r\n function storeShippingDetailsSettings () {\r\n localStorage.setItem(\"shipping_details_settings\", JSON.stringify(shippingDetailsSettings));\r\n }\r\n\r\n function loadShippingDetailsSettings(){\r\n try{\r\n var checkSettings = localStorage.getItem(\"shipping_details_settings\");\r\n if (checkSettings){\r\n shippingDetailsSettings = JSON.parse(checkSettings);\r\n }\r\n }catch(e){\r\n shippingDetailsSettings = {\r\n shippingDetailsExpanded: false,\r\n refNumbersExpanded: false,\r\n invoicesExpanded: false,\r\n aljexSavedForecastExpanded:false\r\n };\r\n }\r\n\r\n }\r\n\r\n function storeResetAuth(resetAuth){\r\n tempAuth = resetAuth;\r\n }\r\n\r\n function getResetAuth(){\r\n var auth = tempAuth;\r\n tempAuth = {};\r\n return auth;\r\n }\r\n /**\r\n * Returns whether or not the user can perform a certain action within a feature\r\n * @param {string} feature The permission needed for access\r\n * @return {boolean} Whether or not the user has been granted this permission\r\n */\r\n function canAccess(permission) {\r\n var Check1;\r\n var Check2;\r\n var Check3;\r\n var Check4;\r\n var Check5;\r\n try{\r\n if(permission && permission != undefined)\r\n var bits = permission.split('.'),\r\n feature = bits[0],\r\n action = bits[1];\r\n //if(action == 'operations' && user.permissions.hasOwnProperty(feature)){\r\n // return user.permissions.User.indexOf(\"operation_kpi\") != -1 || user.permissions.User.indexOf(\"operation_kpi\") != -1\r\n //}\r\n //return user && user.permissions && user.permissions.hasOwnProperty(feature) && user.permissions[feature].indexOf(action) !== -1;\r\n\r\n if(user.permissions.cww){\r\n if (action == \"operations\" && user.permissions.cww.hasOwnProperty(feature)){\r\n\r\n Check1 = ((user.permissions.cww.User.indexOf(\"operations_kpi\")!==-1) || (user.permissions.cww.User.indexOf(\"operations_dashboard\")!== -1))\r\n }else{\r\n Check1 = user && user.permissions.cww && user.permissions.cww.hasOwnProperty(feature) && user.permissions.cww[feature].indexOf(action) !== -1;\r\n }\r\n }\r\n\r\n if(user.permissions.csl){\r\n if (action == \"operations\" && user.permissions.csl.hasOwnProperty(feature)){\r\n\r\n Check2 = ((user.permissions.csl.User.indexOf(\"operations_kpi\")!==-1) || (user.permissions.csl.User.indexOf(\"operations_dashboard\")!== -1))\r\n }else{\r\n Check2 = user && user.permissions.csl && user.permissions.csl.hasOwnProperty(feature) && user.permissions.csl[feature].indexOf(action) !== -1;\r\n }\r\n }\r\n\r\n if(user.permissions.cfs){\r\n if (action == \"operations\" && user.permissions.cfs.hasOwnProperty(feature)){\r\n\r\n Check3 = ((user.permissions.cfs.User.indexOf(\"operations_kpi\")!==-1) || (user.permissions.cfs.User.indexOf(\"operations_dashboard\")!== -1))\r\n }else{\r\n Check3 = user && user.permissions.cfs && user.permissions.cfs.hasOwnProperty(feature) && user.permissions.cfs[feature].indexOf(action) !== -1;\r\n }\r\n }\r\n\r\n if(user.permissions.cmts){\r\n if (action == \"operations\" && user.permissions.cmts.hasOwnProperty(feature)){\r\n\r\n Check5 = ((user.permissions.cmts.User.indexOf(\"operations_kpi\")!==-1) || (user.permissions.cmts.User.indexOf(\"operations_dashboard\")!== -1))\r\n }else{\r\n Check5 = user && user.permissions.cmts && user.permissions.cmts.hasOwnProperty(feature) && user.permissions.cmts[feature].indexOf(action) !== -1;\r\n }\r\n }\r\n\r\n if(Check1 || Check2 || Check3 || Check5){\r\n Check4 = true;\r\n }else{\r\n Check4 = false;\r\n }\r\n\r\n return Check4;\r\n }catch(e){\r\n\r\n }\r\n\r\n}\r\n\r\n\r\n /* Added by Kavita Submenu Operation SubMenu Access*/\r\n\r\n\r\n function canAccessOperations(permission) {\r\n var Check1;\r\n var Check2;\r\n var Check3;\r\n var Check4;\r\n var Check5;\r\n try{\r\n if(permission != undefined)\r\n // // console.log(permission)\r\n var bits = permission.split('.'),\r\n feature = bits[0],\r\n action = bits[1];\r\n if(user.permissions.cww){\r\n if(user.permissions.cww.hasOwnProperty(feature)){\r\n Check1 = ((user.permissions.cww.User.indexOf(action)!==-1))\r\n }else{\r\n Check1 = false\r\n }\r\n }\r\n\r\n if(user.permissions.csl){\r\n if(user.permissions.csl.hasOwnProperty(feature)){\r\n Check2 = ((user.permissions.csl.User.indexOf(action)!==-1))\r\n }else{\r\n Check2 = false\r\n }\r\n }\r\n\r\n if(user.permissions.cfs){\r\n if(user.permissions.cfs.hasOwnProperty(feature)){\r\n Check3 = ((user.permissions.cfs.User.indexOf(action)!==-1))\r\n }else{\r\n Check3 = false\r\n }\r\n }\r\n\r\n if(user.permissions.cmts){\r\n if(user.permissions.cmts.hasOwnProperty(feature)){\r\n Check5 = ((user.permissions.cmts.User.indexOf(action)!==-1))\r\n }else{\r\n Check5 = false\r\n }\r\n }\r\n\r\n if(Check1 || Check2 || Check3 || Check5){\r\n Check4 = true;\r\n }else{\r\n Check4 = false;\r\n }\r\n\r\n return Check4;\r\n }catch(e){\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n\r\n /**\r\n * Searches through the user's groups to see if they have a group with a specific key in it\r\n * and returns the value. If there are multiple instances, this returns the first it finds\r\n * @param {String} key Key to search for\r\n * @return {String} The value (if found)\r\n */\r\n function findValueForKeyInGroups(key) {\r\n var value;\r\n angular.forEach(user.groups, function(g) {\r\n angular.forEach(Object.keys(g.data || {}), function(k) {\r\n if (k == key) {\r\n value = g.data[key];\r\n return false;\r\n }\r\n });\r\n });\r\n return value;\r\n }\r\n\r\n function companyRouteChanged(data){\r\n routeStatus = data;\r\n }\r\n\r\n function getCompanyRouteStatus(){\r\n return routeStatus;\r\n }\r\n\r\n function postDownloadFile(userid){\r\n return api.url_v2 + \"/users/\"+ userid + \"/export_user_session_logs\";\r\n }\r\n\r\n function postDownloadFileAudit(userid){\r\n return api.url_v2 + \"/users/\"+ userid + \"/export_user_login_logs\";\r\n }\r\n function bulkUserExport(){\r\n return api.url_v2 + '/bulk_users/export';\r\n }\r\n\r\n function setSeenSpotlight(params){\r\n var urls = api.url+\"/published_spotlights\"\r\n var responseData = [];\r\n var promise = $http({\r\n url: api.url_v2 + '/user_spotlights/' + params.id,\r\n method: 'PUT',\r\n data: {id: params.id, seen: true}\r\n }).then(function onSuccess(response){\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n function getActiveSpotlights() {\r\n var urls = api.url_v2+\"/user_spotlights\"\r\n var responseData = [];\r\n var promise = $http({\r\n method: 'GET',\r\n url: urls\r\n }).then(function onSuccess(response) {\r\n // // console.log('Service resp', response.data.spotlights);\r\n var cr_url = api.url.replace(\"/api/v1\", \"\")\r\n if (response.data != null && response.data.spotlights.length > 0 ) {\r\n for (var i = 0; i < response.data.spotlights.length; i++) {\r\n //if (response.data.spotlights[i].active) {\r\n response.data.spotlights[i].slide_status = response.data.spotlights[i].slide_status[0]\r\n response.data.spotlights[i].slide_image.url = cr_url + response.data.spotlights[i].slide_image.url;\r\n\r\n responseData.push(response.data.spotlights[i]);\r\n //}\r\n }\r\n }\r\n return responseData;\r\n }, function errorCallback(response) {\r\n // // console.log('no response', response);\r\n });\r\n return promise;\r\n }\r\n\r\n function getUnseenSpotlights(){\r\n var urls = api.url_v2+\"/user_spotlights/published_spotlights\"\r\n var responseData = [];\r\n var promise = $http({\r\n method: 'GET',\r\n url: urls\r\n }).then(function onSuccess(response) {\r\n // // console.log('Service resp', response.data.spotlights);\r\n var cr_url = api.url.replace(\"/api/v1\", \"\")\r\n if (response.data != null && response.data.spotlights.length > 0 ) {\r\n for (var i = 0; i < response.data.spotlights.length; i++) {\r\n //if (response.data.spotlights[i].active) {\r\n response.data.spotlights[i].slide_status = response.data.spotlights[i].slide_status[0]\r\n response.data.spotlights[i].slide_image.url = cr_url + response.data.spotlights[i].slide_image.url;\r\n\r\n responseData.push(response.data.spotlights[i]);\r\n //}\r\n }\r\n }\r\n return responseData;\r\n }, function errorCallback(response) {\r\n // // console.log('no response', response);\r\n });\r\n return promise;\r\n }\r\n\r\n function getResetQuestions(okta_user_id){\r\n var domain = location.hostname;\r\n $http.get(api.url + '/saml/list_of_security_questions?okta_user_id='+okta_user_id+'&domain='+domain).then(function(response) {\r\n if (response.status == 200) {\r\n $rootScope.$broadcast('loadQuestions', response.data.questions);\r\n return response.data.questions;\r\n }\r\n });\r\n }\r\n\r\n function getResetQuestion(oktaid){\r\n var domain = location.hostname;\r\n var data = {\r\n okta_user_id: oktaid,\r\n domain : domain\r\n };\r\n\r\n $http({\r\n method: 'POST',\r\n url: api.url + '/saml/user_recovery_question',\r\n data: data\r\n }).then(function(response){\r\n $rootScope.$broadcast('loadQuestion', response.data.question);\r\n return response.data.question;\r\n\r\n }, function errorCallback(response){\r\n return false;\r\n }).finally(function() {\r\n\r\n });\r\n\r\n }\r\n\r\n function setSelectedRoute(routeIndex){\r\n selectedRoute = routeIndex;\r\n }\r\n\r\n function getSelectedRoute(routeIndex){\r\n return selectedRoute;\r\n }\r\n\r\n\r\n function setsubmenuLink(submenuLink){\r\n SelectedsubmenuLink = submenuLink;\r\n }\r\n\r\n function getsubmenuLink(submenuLink){\r\n return SelectedsubmenuLink;\r\n }\r\n\r\n function getAction_board_autoRefereshed(){\r\n var deferred = deferred || $q.defer();\r\n return $http.post(api.url_v2 + '/sessions/refresh', {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return response;\r\n\r\n }, function onError(response){\r\n\r\n });\r\n }\r\n\r\n function setContainerExpanded(userID,custType,isContainer){\r\n console.log(\"api.url\",api.url);\r\n console.log(\"api.userID\",userID);\r\n var path = '/users/'+userID+'/show_container_display?customer_type='+custType+'&is_container_display='+isContainer\r\n return $http.get(api.url_v2 + path);\r\n }\r\n\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.user')\r\n .config(routerConfig);\r\n\r\n /* @ngInject */\r\n function routerConfig($urlRouterProvider, $stateProvider, permissions) {\r\n $urlRouterProvider.otherwise(\"/login\");\r\n\r\n $stateProvider\r\n .state('user', {\r\n url: '/user',\r\n templateUrl: '/app/user/user-show.html',\r\n controller: 'UserController',\r\n controllerAs: 'userCtrl',\r\n title: 'User',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n .state('dashboard-custom', {\r\n url: '/dashboard-custom',\r\n templateUrl: '/app/user/dashboard-custom.html',\r\n controller: 'DashboardController',\r\n controllerAs: 'vm',\r\n title: 'Dashboard',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n .state('login', {\r\n url: '/login',\r\n templateUrl: '/app/user/log-in.html',\r\n // templateUrl: '/app/user/saml.html',\r\n controller: 'UserController',\r\n controllerAs: 'userCtrl',\r\n title: 'Login',\r\n data: {\r\n requireLogin: false\r\n }\r\n })\r\n .state('samldata', {\r\n url: '/samldata',\r\n templateUrl: '/app/user/samldata.html',\r\n controller: 'UserController',\r\n controllerAs: 'userCtrl',\r\n title: 'Login',\r\n data: {\r\n requireLogin: false\r\n }\r\n })\r\n .state('resetPassword', {\r\n url: '/reset-password?azure_user_id',\r\n templateUrl: '/app/user/reset-password.html',\r\n controller: 'UserController',\r\n controllerAs: 'userCtrl',\r\n title: 'Reset Password',\r\n data: {\r\n requireLogin: false\r\n }\r\n })\r\n .state('confirmAccount', {\r\n url: '/confirm-account?token&uid',\r\n templateUrl: '/app/user/confirm-account.html',\r\n controller: 'UserController',\r\n controllerAs: 'userCtrl',\r\n title: 'Set Password',\r\n data: {\r\n requireLogin: false\r\n }\r\n })\r\n .state('requestPasswordReset', {\r\n url: '/request-password-reset?user_status&user_email',\r\n templateUrl: '/app/user/request-password-reset.html',\r\n controller: 'UserController',\r\n controllerAs: 'userCtrl',\r\n title: 'Request Password Reset',\r\n data: {\r\n requireLogin: false\r\n }\r\n })\r\n .state('auditLog', {\r\n url: '/auditlog',\r\n templateUrl: '/app/user/audit-log.html',\r\n controller: 'UserController',\r\n controllerAs: 'vm',\r\n title: 'Audit Log',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: \"auditLog\"\r\n }\r\n });\r\n // .state('reports', {\r\n // url: '/reports',\r\n // templateUrl: '/app/user/reports.html',\r\n // controller: 'UserController',\r\n // controllerAs: 'vm',\r\n // title: 'Reports',\r\n // data: {\r\n // requireLogin: true,\r\n // requiredPermission: permissions.user.manage,\r\n // menuGroup: \"reports\"\r\n // }\r\n // })\r\n\r\n\r\n // .state('logout', {\r\n // url: '/logout',\r\n // templateUrl: 'app/user/log-in.html',\r\n // controller: 'UserController',\r\n // controllerAs: 'userCtrl',\r\n // title: 'Login',\r\n // onEnter: function(){\r\n // userCtrl.logout();\r\n // },\r\n // data: {\r\n // requireLogin: false\r\n // }\r\n // });\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name login\r\n * @description method that logs in using the rails api\r\n * @param {string} - username\r\n * @param {string} - password\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name logout\r\n * @description method that logs out using the rails api\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name updateNameEmail\r\n * @description method that updates the users name and email\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name updatePassword\r\n * @description method that logs in using the rails api\r\n * @param {string} - current password\r\n * @param {string} - new password\r\n * @param {string} - confirm the new password\r\n */\r\n\r\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.user')\r\n .directive('focusMe', function($timeout, $parse) {\r\n return {\r\n link: function(scope, element, attrs) {\r\n var model = $parse(attrs.focusMe);\r\n scope.$watch(model, function(value) {\r\n if(value === true) {\r\n $timeout(function() {\r\n element[0].focus();\r\n });\r\n }\r\n });\r\n element.bind('blur', function() {\r\n // // console.log('blur')\r\n // scope.$apply(model.assign(scope, false));\r\n })\r\n }\r\n };\r\n })\r\n .filter('usernameautocomplete', function () {\r\n return function (input) {\r\n if(input != undefined)\r\n return input.first_name +\" \"+input.last_name;\r\n else if(input.first_name == \"\" && input.last_name == \"\" )\r\n return input.email;\r\n };\r\n })\r\n .controller('UserController', UserController);\r\n\r\n /** @ngInject */\r\n UserController.$inject = ['UserService', 'api', '$state', '$http', '$log', '$window', '$translatePartialLoader', '$auth', '$location', '$stateParams', '$mdToast', '$mdDialog', '$translate', '$scope', 'ContactsService', '$rootScope',\"$mdpTimePicker\", \"$mdpDatePicker\", \"$mdMedia\", '$mdSelect'];\r\n function UserController(UserService, api, $state, $http, $log, $window, $translatePartialLoader, $auth, $location, $stateParams, $mdToast, $mdDialog, $translate, $scope, ContactsService, $rootScope,$mdpTimePicker, $mdpDatePicker, $mdMedia, $mdSelect) {\r\n\r\n /* Variables */\r\n var vm = this;\r\n vm.user = UserService.getUserData();\r\n vm.errors = [];\r\n vm.isUpdatePasswordLoading = false;\r\n vm.isUpdateAccountLoading = false;\r\n vm.isResetPasswordRequestLoading = false; // when requesting to reset your password\r\n vm.isResetPasswordLoading = false; // when actually resetting your password\r\n vm.isResetQuestionLoading = false;\r\n vm.isConfirmPasswordRequestLoading = false;\r\n vm.isConfirmPasswordLoading = false;\r\n vm.isEditable = true;\r\n vm.isLoggingIn = false;\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('user');\r\n vm.start_date = '';\r\n vm.end_date = '';\r\n vm.from_date = '';\r\n vm.to_date = '';\r\n\r\n /* Functions */\r\n vm.sendMail = sendMail;\r\n vm.login = login;\r\n vm.logout = logout;\r\n vm.requestPasswordReset = requestPasswordReset;\r\n vm.updateAccount = updateAccount;\r\n vm.updatePassword = updatePassword;\r\n vm.resetPassword = resetPassword;\r\n vm.confirmPassword = confirmPassword;\r\n vm.expandedMoreShipping = true;\r\n\r\n //added by chaitanya\r\n vm.formIsValid = formIsValid;\r\n vm.exportAuditlog = exportAuditlog;\r\n vm.exportAuditReports = exportAuditReports;\r\n vm.redirectToSaml = redirectToSaml;\r\n vm.showSamlData = showSamlData;\r\n vm.triggerSamlData = true;\r\n vm.resetPasswordSaml = resetPasswordSaml;\r\n vm.changePasswordSaml = changePasswordSaml;\r\n vm.changeQuestionSaml = changeQuestionSaml;\r\n vm.checkPassWithEmail = checkPassWithEmail;\r\n vm.checkSecurityAnswer = checkSecurityAnswer;\r\n vm.checkOktaAnswer = checkOktaAnswer;\r\n vm.consecutiveCobinations = consecutiveCobinations;\r\n vm.passInValid = \"\";\r\n vm.answerValid = \"\";\r\n vm.azureuserid = localStorage.getItem(\"azureuserid\");\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.previousSlide = previousSlide;\r\n vm.nextSlide = nextSlide;\r\n vm.getActiveSpotlights = getActiveSpotlights;\r\n vm.getUnseenSpotlights = getUnseenSpotlights;\r\n vm.showNext = false;\r\n vm.showPrev = false;\r\n vm.showNextPrev = false;\r\n vm.showPrevPrev = false;\r\n vm.securityAnswerInvalid = false;\r\n vm.getMatchesCompanies = getMatchesCompanies;\r\n vm.getMatchesUsers = getMatchesUsers;\r\n vm.selectedCompanyChange = selectedCompanyChange;\r\n vm.selectedUserChange = selectedUserChange;\r\n vm.displayReportFields = true;\r\n vm.isReportLoading = false;\r\n vm.checkAll_milestones = checkAll_milestones;\r\n vm.makeAllMilestoneActive = makeAllMilestoneActive;\r\n // vm.onSelectCompanyClose = onSelectCompanyClose;\r\n /*\r\n $mdDialog.hide();\r\n $mdDialog.cancel();\r\n $mdToast.hide();\r\n $mdToast.cancel();\r\n */\r\n\r\n $scope.isCompanyRequired = false;\r\n $scope.isUserCompanyRequired = false;\r\n $scope.isUserRequired = false;\r\n $scope.isFromDateRequired = false;\r\n $scope.isToDateRequired = false;\r\n\r\n // Report User Roles added\r\n\r\n vm.roles = [\r\n {\r\n key: \"crane_admin\", display: \"Crane - Admin\", permissions: ['Shipment.View', 'Shipment.View', 'PotentialException.Edit Potential Exceptions', 'PotentialException.Approve Potential Exceptions', 'User.Manage Users',\r\n 'User.C-View Lens Mode', 'Company.Access Company Lens Data', 'Company.Admin', 'Group.Admin', 'LensGroup.Manage Lens Groups', 'Admin.Super Admin', 'Shipment.T&T Export', 'Shipment.Financial', 'Spotlight.Manage Spotlight', 'User.Demo']\r\n },\r\n { key: \"crane_user\", display: \"Crane - User\", permissions: ['Shipment.View', 'Shipment.View', 'User.C-View Lens Mode', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n { key: \"customer\", display: \"Customer - Standard\", permissions: ['Shipment.View', 'Shipment.View', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n { key: \"customer_no_tt_export\", display: \"Customer - No T&T Export\", permissions: ['Shipment.View', 'Shipment.View', 'Shipment.Financial'] },\r\n { key: \"customer_no_financial\", display: \"Customer - No Financial\", permissions: ['Shipment.View', 'Shipment.View', 'Shipment.T&T Export'] },\r\n { key: \"customer_lens\", display: \"Customer-Lens\", permissions: ['Shipment.View', 'Shipment.View', 'User.C-View Lens Mode', 'Company.Access Company Lens Data', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n { key: \"editor\", display: \"Crane - PE Editor\", permissions: ['Shipment.View', 'Shipment.View', 'PotentialException.Edit Potential Exceptions', 'User.C-View Lens Mode', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n { key: \"approver\", display: \"Crane - PE Approver\", permissions: ['Shipment.View', 'Shipment.View', 'PotentialException.Edit Potential Exceptions', 'PotentialException.Approve Potential Exceptions', 'User.C-View Lens Mode', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n {\r\n key: 'custom', display: 'Custom', permissions: ['Shipment.NONE', 'Shipment.NONE', 'PotentialException.NONE', 'PotentialException.NONE', 'User.NONE',\r\n 'User.NONE', 'Company.NONE', 'Company.NONE', 'Group.NONE', 'LensGroup.NONE', 'Shipment.T&T Export', 'Shipment.Financial']\r\n }\r\n ],\r\n vm.roles_classic = [\r\n { key: \"customer_classic\", display: \"Customer - Pathway Customer\", permissions: ['User.Transportation', 'User.Warehouse', 'User.Accounts Receivables', 'User.Book Shipment', 'User.Reporting', 'User.Operations-KPI', 'User.Operations-Dashboard', 'User.Customs'] },\r\n { key: \"classic_customer_ops\", display: \"Customer - Pathway Ops\", permissions: ['User.Transportation', 'User.Warehouse', 'User.Operations-KPI', 'User.Book Shipment'] },\r\n { key: \"classic_customer_shipper\", display: \"Customer - Pathway Shipper\", permissions: ['User.Transportation', 'User.Operations-KPI', 'User.Book Shipment'] },\r\n { key: \"classic_customer_consignee\", display: \"Customer - Pathway Consignee\", permissions: ['User.Transportation', 'User.Operations-KPI'] }\r\n ],\r\n vm.roles_csl = [\r\n {\r\n key: \"crane_admin\", display: \"CSL - Admin\", permissions: ['Load.View', 'Load.View', 'User.Manage Users',\r\n 'User.C-View Lens Mode', 'Company.Access Company Lens Data', 'Company.Admin', 'Group.Admin', 'LensGroup.Manage Lens Groups', 'Admin.Super Admin', 'Shipment.T&T Export', 'Shipment.Financial', 'Spotlight.Manage Spotlight', 'User.Demo']\r\n },\r\n { key: \"crane_user\", display: \"CSL - User\", permissions: ['Load.View', 'Load.View', 'User.C-View Lens Mode', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n { key: \"customer\", display: \"Customer - Standard\", permissions: ['Load.View', 'Load.View', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n { key: \"customer_no_tt_export\", display: \"Customer - No T&T Export\", permissions: ['Load.View', 'Load.View', 'Shipment.Financial'] },\r\n { key: \"customer_no_financial\", display: \"Customer - No Financial\", permissions: ['Load.View', 'Load.View', 'Shipment.T&T Export'] },\r\n {\r\n key: 'custom', display: 'Custom', permissions: ['Shipment.NONE', 'Load.NONE', 'User.NONE',\r\n 'User.NONE', 'Company.NONE', 'Company.NONE', 'Group.NONE', 'LensGroup.NONE', 'Shipment.T&T Export', 'Shipment.Financial']\r\n }\r\n ],\r\n vm.roles_cfs = [\r\n {\r\n key: \"crane_admin\", display: \"CFS - Admin\", permissions: ['Load.View', 'Load.View', 'Load.View', 'User.Manage Users',\r\n 'User.C-View Lens Mode', 'Company.Access Company Lens Data', 'Company.Admin', 'Group.Admin', 'LensGroup.Manage Lens Groups', 'Admin.Super Admin', 'Shipment.T&T Export', 'Shipment.Financial', 'Spotlight.Manage Spotlight', 'User.Demo']\r\n },\r\n { key: \"crane_user\", display: \"CFS - User\", permissions: ['Load.View', 'Load.View', 'User.C-View Lens Mode', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n { key: \"customer\", display: \"Customer - Standard\", permissions: ['Load.View', 'Load.View', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n { key: \"customer_no_tt_export\", display: \"Customer - No T&T Export\", permissions: ['Load.View', 'Load.View', 'Shipment.Financial'] },\r\n { key: \"customer_no_financial\", display: \"Customer - No Financial\", permissions: ['Load.View', 'Load.View', 'Shipment.T&T Export'] },\r\n {\r\n key: 'custom', display: 'Custom', permissions: ['Shipment.NONE', 'Load.NONE', 'User.NONE',\r\n 'User.NONE', 'Company.NONE', 'Company.NONE', 'Group.NONE', 'LensGroup.NONE', 'Shipment.T&T Export', 'Shipment.Financial']\r\n }\r\n ],\r\n vm.roles_cmts = [\r\n {\r\n key: \"crane_admin\", display: \"CMTS - Admin\", permissions: ['Load.View', 'Load.View', 'Load.View', 'User.Manage Users',\r\n 'User.C-View Lens Mode', 'Company.Access Company Lens Data', 'Company.Admin', 'Group.Admin', 'LensGroup.Manage Lens Groups', 'Admin.Super Admin', 'Shipment.T&T Export', 'Shipment.Financial', 'Spotlight.Manage Spotlight', 'User.Demo']\r\n },\r\n { key: \"crane_user\", display: \"CMTS - User\", permissions: ['Load.View', 'Load.View', 'User.C-View Lens Mode', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n { key: \"customer\", display: \"Customer - Standard\", permissions: ['Load.View', 'Load.View', 'Shipment.T&T Export', 'Shipment.Financial'] },\r\n { key: \"customer_no_tt_export\", display: \"Customer - No T&T Export\", permissions: ['Load.View', 'Load.View', 'Shipment.Financial'] },\r\n { key: \"customer_no_financial\", display: \"Customer - No Financial\", permissions: ['Load.View', 'Load.View', 'Shipment.T&T Export'] },\r\n {\r\n key: 'custom', display: 'Custom', permissions: ['Shipment.NONE', 'Load.NONE', 'User.NONE',\r\n 'User.NONE', 'Company.NONE', 'Company.NONE', 'Group.NONE', 'LensGroup.NONE', 'Shipment.T&T Export', 'Shipment.Financial']\r\n }\r\n ];\r\n\r\n vm.selectedCompanyRecord = selectedCompanyRecord;\r\n // end of report user roles\r\n\r\n $scope.azureid = $stateParams.azure_user_id? true :false;\r\n $scope.userstatus = $stateParams.user_status == 'unverified' ? true : false;\r\n $scope.email = $stateParams.user_email ? $stateParams.user_email : '';\r\n\r\n if($state.current.name == 'resetPassword' && ($scope.azureid == true)){\r\n\r\n //$scope.$on('loadQuestions', function(event, data) {\r\n // $scope.questions = data;\r\n //});\r\n //\r\n //UserService.getResetQuestions($stateParams.okta_user_id);\r\n }\r\n\r\n\r\n\r\n if(($state.current.name == 'user')){\r\n\r\n //$scope.$on('loadQuestions', function(event, data) {\r\n // $scope.octaQuestions = data;\r\n //});\r\n //\r\n //UserService.getResetQuestions(vm.oktauserid);\r\n }\r\n\r\n\r\n if(($state.current.name == 'user')){\r\n\r\n //$scope.$on('loadQuestion', function(event, data) {\r\n // $scope.questionokta = data;\r\n //});\r\n //\r\n //UserService.getResetQuestion(vm.oktauserid);\r\n }\r\n\r\n\r\n $scope.passwordPattern = /^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9]).{8,}$/;\r\n\r\n function checkSecurityAnswer(question, answer){\r\n var secQuestionArray = question.split(\" \")\r\n var secAnsArray = answer.split(\" \")\r\n var res = secAnsArray.filter(function(v) { // iterate over the array\r\n return secQuestionArray.includes(v);\r\n })\r\n vm.securityAnswerInvalid = (res.length > 0) && answer.length >3;\r\n }\r\n\r\n function checkPassWithEmail(passwrd){\r\n\r\n //alert(passwrd);\r\n //alert(vm.sankEmail);\r\n //var userEmail = vm.user.email.substr(0, vm.user.email.indexOf('@')).replace(/\\./g, \" \");\r\n //var userEmail =vm.sankEmail.substr(0, vm.sankEmail.indexOf('@')).replace(/\\./g, \" \");\r\n //var emailComb = consecutiveCobinations(userEmail);\r\n //var userEmailStr = ($stateParams.usr).replace(/\\./g, \"\");\r\n var stored_emailId = localStorage.getItem(\"user_emailId\");\r\n var userEmailStr = $stateParams.usr ? ($stateParams.usr) : stored_emailId;\r\n var userName = userEmailStr ? userEmailStr.substr(0, userEmailStr.indexOf('@')) : null;\r\n var userDomain = userEmailStr.split('@')[1].split('.')[0]\r\n var splitUsername = userName.split('.')\r\n\r\n var emailComb = consecutiveCobinations(userName);\r\n emailComb.push(userDomain); emailComb.concat(splitUsername)\r\n var uniqueEmailComb = emailComb.filter(function(v, i, a){a.indexOf(v) === i});\r\n\r\n var passComb = consecutiveCobinations(passwrd);\r\n //alert(passwrd.$$rawModelValue);\r\n var res = uniqueEmailComb.filter(function(v) { // iterate over the array\r\n return passComb.includes(v)\r\n })\r\n var properNameAndDomain = splitUsername; properNameAndDomain.push(userDomain)\r\n res = res.concat(properNameAndDomain.filter(function(item){return passwrd.includes(item)}))\r\n vm.passInValid= (res.length > 0) ;\r\n\r\n }\r\n\r\n function checkOktaAnswer(oktaQuestion, oktaAnswer){\r\n if(oktaAnswer == undefined){\r\n vm.answerValid = true;\r\n } else {vm.answerValid= (oktaAnswer.length < 4);}\r\n\r\n if(!vm.answerValid){\r\n checkSecurityAnswer(oktaQuestion, oktaAnswer)\r\n }\r\n }\r\n\r\n function consecutiveCobinations(name) {\r\n var k = name.length - 4\r\n var result = []\r\n for (var i = 0; i < k; i++) {\r\n result.push(name.substring(i, i + 5).toLowerCase())\r\n }\r\n return result\r\n }\r\n\r\n /* Get authentication token if on reset-password */\r\n if ($location.path() === '/reset-password') {\r\n var isParams = true;\r\n for (var p in $stateParams) {\r\n if (!$stateParams[p]) {\r\n isParams = false;\r\n break;\r\n }\r\n }\r\n if ($stateParams && isParams) {\r\n // Apply correct formatting\r\n var resetAuth = {\r\n uid: $stateParams.uid,\r\n client: $stateParams.client_id,\r\n 'access-token': $stateParams.token,\r\n expiry: \"\"\r\n };\r\n UserService.storeResetAuth(resetAuth);\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n /* Get authentication token if on reset-password */\r\n // if ($location.path() === '/reset-password'){\r\n // var isParams = true;\r\n // for (var p in $stateParams){\r\n // if (!$stateParams[p]){\r\n // isParams = false;\r\n // break;\r\n // }\r\n // }\r\n // if ($stateParams && isParams){\r\n // // Apply correct formatting\r\n // var resetAuth = {\r\n // //uid: $stateParams.uid,\r\n // //client: $stateParams.client_id,\r\n // //'access-token': $stateParams.token,\r\n // 'access-token': $stateParams.activation_token,\r\n // expiry: \"\"\r\n // };\r\n // UserService.storeResetAuth(resetAuth);\r\n // }\r\n // // Remove the auth params\r\n // $location.search('');\r\n // } else\r\n if ($location.path() === '/confirm-account'){\r\n var isParams = true;\r\n for (var p in $stateParams){\r\n if (!$stateParams[p]){\r\n isParams = false;\r\n break;\r\n }\r\n }\r\n if ($stateParams && isParams){\r\n // Apply correct formatting\r\n var resetAuth = {\r\n uid: $stateParams.uid,\r\n 'confirmation_token': $stateParams.token,\r\n expiry: \"\"\r\n };\r\n UserService.storeResetAuth(resetAuth);\r\n }\r\n // Remove the auth params\r\n $location.search('');\r\n }\r\n else {\r\n ContactsService.setSubjectStatuses({account: {account: true, notifications: true}});\r\n }\r\n\r\n function sendMail(emailId, subject){\r\n $window.open(\"mailto:\"+ emailId + \"?subject=\" + subject);\r\n }\r\n\r\n ///////////////////////////////////////////////////////////////////////////////\r\n\r\n function changeQuestionSaml(resetQuestionForm) {\r\n vm.isResetQuestionLoading = true;\r\n var domain = location.hostname;\r\n var data = {\r\n password: resetQuestionForm.password,\r\n answer: resetQuestionForm.answer,\r\n question: resetQuestionForm.question,\r\n okta_user_id: localStorage.getItem('oktauserid'),\r\n domain : domain\r\n };\r\n $http({\r\n method: 'POST',\r\n url: api.url + '/saml/reset_security_question',\r\n data: data\r\n }).then(function(response){\r\n\r\n if (response.status == 200) {\r\n $state.reload();\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 6000,\r\n templateUrl: '/app/user/toast/question-change.success.html'\r\n });\r\n return;\r\n }\r\n\r\n }, function errorCallback(response){\r\n\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent(response.data.messages)\r\n .ok('Ok')\r\n );\r\n }).finally(function() {\r\n vm.isResetQuestionLoading = false;\r\n });\r\n }\r\n ///////////////////////////////////////////////////////////////////////////////\r\n\r\n function changePasswordSaml(resetPasswordForm) {\r\n vm.isResetPasswordLoading = true;\r\n //var domain = location.hostname;\r\n var encryptedPassword=window.btoa(resetPasswordForm.password);\r\n var data = {\r\n password: encryptedPassword,\r\n azure_user_id: localStorage.getItem('azureuserid')\r\n //domain : domain\r\n };\r\n\r\n $http({\r\n method: 'POST',\r\n url: api.url_v2 + '/saml/change_password',\r\n data: data\r\n }).then(function(response){\r\n\r\n if (response.status == 200) {\r\n $state.reload();\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 6000,\r\n templateUrl: '/app/user/toast/password-change.success.html'\r\n });\r\n return;\r\n }\r\n\r\n }, function errorCallback(response){\r\n //$location.path('/request-password-reset');\r\n //return;\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent(response.data.messages)\r\n .ok('Ok')\r\n );\r\n }).finally(function() {\r\n vm.isResetPasswordLoading = false;\r\n });\r\n }\r\n\r\n\r\n function resetPasswordSaml(resetPasswordForm){\r\n vm.isResetPasswordLoading = true;\r\n /* Generate headers for request */\r\n\r\n var azureid = $stateParams.azure_user_id;\r\n var domain = location.hostname;\r\n if($scope.azureid){\r\n vm.isResetPasswordLoading = true;\r\n var encryptedPassword=window.btoa(resetPasswordForm.password);\r\n var data = {\r\n password: encryptedPassword,\r\n azure_user_id: azureid,\r\n domain : domain\r\n };\r\n\r\n $http({\r\n method: 'POST',\r\n url: api.url_v2 + '/saml/reset_password',\r\n data: data\r\n }).then(function(response){\r\n $window.localStorage.clear();\r\n sessionStorage.clear();\r\n $location.path('/login').search({});\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('USER.RESET_PASSWORD_SUCCESS_RESPONSE'))\r\n .ok('Ok')\r\n );\r\n /*$http({\r\n method: 'POST',\r\n url: api.url_v2 + '/saml/login',\r\n data: {\r\n email: response.data.email,\r\n password: window.btoa(response.data.password),\r\n domain : domain\r\n }\r\n }).success(function(response){\r\n $window.location.href = response.redirect_url;\r\n }).error(function(response){\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent(response.messages)\r\n .ok('Ok')\r\n );\r\n });*/\r\n\r\n }, function errorCallback(response){\r\n //$location.path('/request-password-reset');\r\n //return;\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('USER.RESET_PASSWORD_FAILURE_RESPONSE'))\r\n .ok('Ok')\r\n );\r\n\r\n }).finally(function() {\r\n vm.isResetPasswordLoading = false;\r\n });\r\n\r\n }\r\n\r\n if(!$scope.tokenid && $scope.oktaid){\r\n vm.isResetPasswordLoading = true;\r\n var domain = location.hostname;\r\n var encryptedPassword=window.btoa(resetPasswordForm.password);\r\n var data = {\r\n password: encryptedPassword,\r\n answer: resetPasswordForm.answer,\r\n okta_user_id: oktaid,\r\n domain : domain\r\n };\r\n $http({\r\n method: 'POST',\r\n url: api.url + '/saml/okta_user_forget_password',\r\n data: data\r\n }).then(function(response){\r\n $window.localStorage.clear();\r\n sessionStorage.clear();\r\n $location.path('/login');\r\n /*$http({\r\n method: 'POST',\r\n url: api.url_v2 + '/saml/login',\r\n data: {\r\n email: response.data.email,\r\n password: window.btoa(response.data.password),\r\n domain : domain\r\n\r\n }\r\n }).success(function(response){\r\n $window.location.href = response.redirect_url;\r\n }).error(function(response){\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent(response.messages)\r\n .ok('Ok')\r\n );\r\n });*/\r\n\r\n }, function errorCallback(response){\r\n //$location.path('/request-password-reset');\r\n //return;\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent(response.data.messages)\r\n .ok('Ok')\r\n );\r\n }).finally(function() {\r\n vm.isResetPasswordLoading = false;\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n function resetPassword(resetPasswordForm){\r\n vm.isResetPasswordLoading = true;\r\n var encryptedPassword=window.btoa(resetPasswordForm.password);\r\n var encryptedPasswordConfirmation=window.btoa(resetPasswordForm.password_confirmation);\r\n /* Generate headers for request */\r\n var reset_headers = $http.defaults.headers.put;\r\n angular.forEach(UserService.getResetAuth(), function(value, key){\r\n reset_headers[key] = value;\r\n });\r\n UserService.storeResetAuth({});\r\n $http({\r\n method: 'PUT',\r\n url: api.url + '/auth/password',\r\n headers: reset_headers,\r\n data: {\r\n password: encryptedPassword,\r\n password_confirmation: encryptedPasswordConfirmation\r\n }\r\n }).then(function successCallback(response){\r\n UserService.logoutUser();\r\n setTimeout(function(){\r\n localStorage.removeItem('auth_headers');\r\n localStorage.removeItem('user');\r\n localStorage.removeItem('dummyUser');\r\n //sessionStorage.clear();\r\n UserService.setUser(false);\r\n $location.path('/login');\r\n return;\r\n },2500);\r\n }, function errorCallback(response){\r\n $location.path('/request-password-reset');\r\n return;\r\n }).finally(function() {\r\n vm.isResetPasswordLoading = false;\r\n });\r\n }\r\n\r\n function confirmPassword(confirmPasswordForm){\r\n vm.isConfirmPasswordLoading = true;\r\n /* Generate headers for request */\r\n var reset_headers = $http.defaults.headers.put;\r\n angular.forEach(UserService.getResetAuth(), function(value, key){\r\n reset_headers[key] = value;\r\n });\r\n UserService.storeResetAuth({});\r\n $http({\r\n method: 'PATCH',\r\n url: api.url + '/auth/confirmation',\r\n headers: reset_headers,\r\n data: {\r\n confirmation_token: reset_headers['confirmation_token'],\r\n user: {\r\n password: confirmPasswordForm.password,\r\n password_confirmation: confirmPasswordForm.password_confirmation\r\n }\r\n }\r\n }).then(function successCallback(response){\r\n UserService.logoutUser();\r\n setTimeout(function(){\r\n localStorage.removeItem('auth_headers');\r\n localStorage.removeItem('user');\r\n localStorage.removeItem('dummyUser');\r\n //sessionStorage.clear();\r\n UserService.setUser(false);\r\n $location.path('/login');\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 6000,\r\n templateUrl: '/app/user/toast/confirm-account.success.html'\r\n });\r\n return;\r\n },2500);\r\n }, function errorCallback(response){\r\n UserService.logoutUser();\r\n setTimeout(function(){\r\n localStorage.removeItem('auth_headers');\r\n localStorage.removeItem('user');\r\n localStorage.removeItem('dummyUser');\r\n //sessionStorage.clear();\r\n $location.path('/login');\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 10000,\r\n templateUrl: 'app/user/toast/confirm-account.error.html'\r\n });\r\n return;\r\n },2500);\r\n\r\n }).finally(function() {\r\n vm.isConfirmPasswordLoading = false;\r\n });\r\n }\r\n\r\n\r\n function previousSlide(currentSlide) {\r\n var pos = vm.splotlightSlideArr.indexOf(currentSlide)\r\n if (pos != 0)\r\n {\r\n vm.showPrev = true;\r\n vm.newSlide = vm.splotlightSlideArr[pos-1];\r\n UserService.setSeenSpotlight(vm.newSlide);\r\n vm.showNext = true;\r\n if (pos-1 == 0)\r\n {\r\n vm.showPrev = false;\r\n }\r\n }\r\n }\r\n\r\n function nextSlide(currentSlide) {\r\n var pos = vm.splotlightSlideArr.indexOf(currentSlide)\r\n if (pos != vm.splotlightSlideArr.length-1)\r\n {\r\n vm.showNext = true;\r\n vm.newSlide = vm.splotlightSlideArr[pos+1];\r\n //UserService.setSeenSpotlight(vm.newSlide)\r\n vm.showPrev = true;\r\n if (pos+1 == vm.splotlightSlideArr.length-1)\r\n {\r\n vm.showNext = false;\r\n }\r\n }\r\n }\r\n\r\n function showModal(modal) {\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/user/modals/' + modal + '.modal.html',\r\n clickOutsideToClose: true,\r\n parent: angular.element(document.body),\r\n fullscreen: useFullScreen,\r\n preserveScope: true,\r\n controller: function DialogController($scope, $mdDialog){\r\n $scope.newSlide = vm.newSlide\r\n $scope.closeModal = vm.closeModal\r\n $scope.splotlightSlideArr = vm.splotlightSlideArr\r\n $scope.previousSlide = function previousSlide(currentSlide) {\r\n var pos = vm.splotlightSlideArr.indexOf(currentSlide)\r\n if (pos != 0)\r\n {\r\n $scope.showPrev = true;\r\n $scope.newSlide = vm.splotlightSlideArr[pos-1];\r\n UserService.setSeenSpotlight($scope.newSlide);\r\n $scope.showNext = true;\r\n if (pos-1 == 0)\r\n {\r\n $scope.showPrev = false;\r\n }\r\n }\r\n }\r\n $scope.nextSlide = function nextSlide(currentSlide) {\r\n var pos = vm.splotlightSlideArr.indexOf(currentSlide)\r\n if (pos != vm.splotlightSlideArr.length-1)\r\n {\r\n $scope.showNext = true;\r\n $scope.newSlide = vm.splotlightSlideArr[pos+1];\r\n UserService.setSeenSpotlight($scope.newSlide)\r\n $scope.showPrev = true;\r\n if (pos+1 == vm.splotlightSlideArr.length-1)\r\n {\r\n $scope.showNext = false;\r\n }\r\n }\r\n }\r\n $scope.showNext = vm.showNext\r\n $scope.showPrev = vm.showPrev\r\n }\r\n });\r\n }\r\n\r\n\r\n function closeModal(){\r\n $mdDialog.hide();\r\n }\r\n vm.AllStatus = false;\r\n $scope.greyout = false;\r\n if(vm.user){\r\n if(vm.user.milestone_setting == null || vm.user.milestone_setting == undefined){\r\n vm.user.milestone_setting = {\r\n booked : false,\r\n pick_up : false,\r\n confirmed_on_board : false\r\n }\r\n }\r\n if(vm.user.milestone_setting.booked && vm.user.milestone_setting.pick_up &&\r\n vm.user.milestone_setting.confirmed_on_board){\r\n vm.AllStatus = true;\r\n $scope.greyout = true;\r\n }\r\n }\r\n\r\n\r\n\r\n function makeAllMilestoneActive(type){\r\n if(vm.user.milestone_setting.booked == true && vm.user.milestone_setting.pick_up == true && vm.user.milestone_setting.confirmed_on_board == true ){\r\n vm.AllStatus = true;\r\n $scope.greyout = true;\r\n }\r\n if(!vm.user.milestone_setting.booked || !vm.user.milestone_setting.pick_up ||\r\n !vm.user.milestone_setting.confirmed_on_board){\r\n vm.AllStatus = false;\r\n $scope.greyout = false;\r\n }\r\n }\r\n function checkAll_milestones(status){\r\n if(status == true){\r\n vm.user.milestone_setting.booked = status;\r\n vm.user.milestone_setting.pick_up = status;\r\n vm.user.milestone_setting.confirmed_on_board = status;\r\n $scope.greyout = status;\r\n }else{\r\n vm.user.milestone_setting.booked = status;\r\n vm.user.milestone_setting.pick_up = status;\r\n vm.user.milestone_setting.confirmed_on_board = status;\r\n $scope.greyout = status;\r\n }\r\n }\r\n function getActiveSpotlights(){\r\n UserService.getActiveSpotlights().then(function(resp){\r\n if(resp && resp.length > 0) {\r\n vm.newSlide = resp[0];\r\n vm.splotlightSlideArr = resp\r\n if (resp.length > 1)\r\n vm.showNext = true\r\n vm.showModal('preview-slide');\r\n UserService.setSeenSpotlight(vm.newSlide)\r\n }\r\n else if(resp && resp.length == 0)\r\n {\r\n showToastWithFile('spotlight-slide.error.html');\r\n }\r\n\r\n })\r\n .catch(function(resp){\r\n $log.debug('Could not get active spotlights');\r\n })\r\n }\r\n\r\n $scope.onEnterKeyPress = function (ev,username, password) {\r\n if (ev.keyCode == 13)\r\n vm.login(username, password);\r\n }\r\n\r\n function getUnseenSpotlights(){\r\n UserService.getUnseenSpotlights().then(function(resp){\r\n if(resp && resp.length > 0) {\r\n vm.newSlide = resp[0];\r\n vm.splotlightSlideArr = resp;\r\n if (resp.length > 1)\r\n vm.showNext = true\r\n vm.showModal('preview-slide');\r\n UserService.setSeenSpotlight(vm.newSlide)\r\n }\r\n })\r\n .catch(function(resp){\r\n $log.debug('Could not get unseen spotlights');\r\n })\r\n }\r\n\r\n function login(username, password) {\r\n var demoUserExist = /%+[0-9]+@/.test(username);\r\n var magno = localStorage.getItem('magno');\r\n localStorage.clear();\r\n if(demoUserExist == true)\r\n localStorage.setItem('dummyUser',username);\r\n vm.isLoggingIn = true;\r\n vm.errors = [];\r\n var domain = location.hostname;\r\n var encryptedPassword=window.btoa(password);\r\n $http({\r\n method: 'POST',\r\n url: api.url_v2 + '/saml/login',\r\n data: {\r\n email: username,\r\n password: encryptedPassword,\r\n domain : domain,\r\n magno : magno\r\n }\r\n }).success(function(response){\r\n $window.location.href = response.redirect_url;\r\n }).error(function(response){\r\n if(response.error !== undefined) {\r\n vm.errors.length = 0;\r\n vm.errors.push(response.error);\r\n }\r\n\r\n if(response.messages !== undefined) {\r\n vm.errors.length = 0;\r\n vm.errors.push(response.messages);\r\n }\r\n\r\n vm.isLoggingIn = false;\r\n });\r\n }\r\n\r\n function logout(){\r\n UserService.logoutUser();\r\n setTimeout(function(){\r\n Object.keys(localStorage)\r\n .forEach(function(key){\r\n if (!(/auth_headers/.test(key) || /dummyUser/.test(key))){\r\n localStorage.removeItem(key);\r\n }\r\n });\r\n localStorage.clear();\r\n sessionStorage.clear();\r\n location.href = '/login';\r\n },2500);\r\n }\r\n\r\n function requestPasswordReset(requestPasswordResetForm){\r\n vm.isResetPasswordRequestLoading = true;\r\n $auth.requestPasswordReset(requestPasswordResetForm)\r\n .then(function(resp){\r\n if(!resp.data.success){\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent(resp.data.message)\r\n .ok('Ok')\r\n );\r\n }else{\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('USER.RESET_PASSWORD_MESSAGE_RESPONSE'))\r\n .ok('Ok')\r\n ).finally(function() {\r\n UserService.logoutUser();\r\n setTimeout(function(){\r\n localStorage.removeItem('auth_headers');\r\n localStorage.removeItem('user');\r\n localStorage.removeItem('dummyUser');\r\n //sessionStorage.clear();\r\n location.href = '/login';\r\n },2500);\r\n });\r\n $log.debug('success sent reset password email');\r\n }\r\n })\r\n .catch(function(resp){\r\n $log.debug(\"Reset Password Fail.\");\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('USER.RESET_PASSWORD_MESSAGE_RESPONSE'))\r\n .ariaLabel($translate.instant('USER.RESET_PASSWORD_MESSAGE_RESPONSE'))\r\n .ok('Ok')\r\n );\r\n })\r\n .finally(function() {\r\n vm.isResetPasswordRequestLoading = false;\r\n });\r\n }\r\n\r\n function updateAccount(user_form) {\r\n vm.isUpdateAccountLoading = true;\r\n UserService.updateUser(vm.user).then(function() {\r\n vm.isUpdateAccountLoading = false;\r\n showToastWithFile('update-account.success.html');\r\n }, function() {\r\n vm.isUpdateAccountLoading = false;\r\n showToastWithFile('update-account.error.html');\r\n });\r\n }\r\n\r\n function updatePassword(changePasswordForm, formCtrl) {\r\n $log.debug(\"updatePasswordCalled\");\r\n vm.isUpdatePasswordLoading = true;\r\n $auth.updateAccount(changePasswordForm)\r\n .then(function(resp){\r\n // handle success\r\n $log.debug(\"Password Updated\");\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: 'password-change.success.html',\r\n parent: angular.element(document.getElementById('user_show'))\r\n });\r\n changePasswordForm.current_password = '';\r\n changePasswordForm.password = '';\r\n changePasswordForm.password_confirmation = '';\r\n\r\n formCtrl.$setPristine();\r\n formCtrl.$setValidity();\r\n formCtrl.$setUntouched();\r\n })\r\n .catch(function(resp){\r\n $log.debug(\"Password Update Failed\");\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('USER.CURRENT_PASSWORD_INVALID'))\r\n .ariaLabel($translate.instant('USER.CURRENT_PASSWORD_INVALID'))\r\n .ok('Ok')\r\n );\r\n })\r\n .finally(function(){\r\n vm.isUpdatePasswordLoading = false;\r\n $location.path('/user');\r\n });\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: 3000,\r\n templateUrl: '/app/user/toast/' + file\r\n });\r\n }\r\n\r\n //added chaitanya\r\n\r\n function formIsValid(){\r\n if (vm.formDetails){\r\n return vm.formDetails.$valid;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function redirectToSaml(){\r\n var domain = location.hostname;\r\n var dummyUserEmail = encodeURIComponent(localStorage.getItem(\"dummyUser\"));\r\n $window.location.href = api.url+\"/saml/init?dummyUserEmail=\"+dummyUserEmail+\"&domain=\"+domain;\r\n }\r\n\r\n function getPermissionsValue(responsePermissionsData, type){\r\n return responsePermissionsData[type] || {}\r\n }\r\n\r\n function showSamlData(){\r\n var paramsObject = {};\r\n var domain = location.hostname;\r\n window.location.search.replace(/\\?/,'').split('&').map(function(o){ paramsObject[o.split('=')[0]]= o.split('=')[1]});\r\n var uid = paramsObject[\"name_id\"];\r\n if (vm.triggerSamlData){\r\n vm.triggerSamlData = false;\r\n $http({\r\n method: 'POST',\r\n url: api.url_v2 + '/auth/sign_in',\r\n data: {\r\n name_id: uid,\r\n domain : domain\r\n }\r\n }).then(function(response){\r\n UserService.setUser(response.data.data);\r\n var redirect_path;\r\n if (UserService.isLoggedIn()){\r\n redirect_path = sessionStorage.fromPath;\r\n vm.getUnseenSpotlights();\r\n if((getPermissionsValue(response.data.data.permissions, 'cww').hasOwnProperty('Shipment') ? (response.data.data.permissions.cww.Shipment.includes('read')) : false) ||\r\n (getPermissionsValue(response.data.data.permissions, 'csl').hasOwnProperty('Load') ? (response.data.data.permissions.csl.Load.includes('read')) : false) ||\r\n (getPermissionsValue(response.data.data.permissions, 'cfs').hasOwnProperty('Load') ? (response.data.data.permissions.cfs.Load.includes('read')) : false) ||\r\n (getPermissionsValue(response.data.data.permissions, 'cmts').hasOwnProperty('Load') ? (response.data.data.permissions.cmts.Load.includes('read')) : false)){\r\n if (redirect_path == null || redirect_path == undefined || redirect_path == '/' || response.data.data.type == \"DummyUser\") {\r\n if(response.data.data.permissions.hasOwnProperty('cww')){\r\n if((getPermissionsValue(response.data.data.permissions, 'cww').hasOwnProperty('Shipment') ? (response.data.data.permissions.cww.Shipment.includes('read')) : false)){\r\n $location.path('/');\r\n $location.search({});\r\n }else{\r\n $location.path('/dashboard-custom');\r\n $location.search({});\r\n }\r\n }\r\n if(response.data.data.permissions.hasOwnProperty('csl') && !response.data.data.permissions.hasOwnProperty('cww')){\r\n if((getPermissionsValue(response.data.data.permissions, 'csl').hasOwnProperty('Load') ? (response.data.data.permissions.csl.Load.includes('read')) : false)){\r\n $location.path('/csl');\r\n $location.search({});\r\n }else{\r\n $location.path('/dashboard-custom');\r\n $location.search({});\r\n }\r\n\r\n }\r\n if(response.data.data.permissions.hasOwnProperty('cfs') && !response.data.data.permissions.hasOwnProperty('cww') && !response.data.data.permissions.hasOwnProperty('csl') && !response.data.data.permissions.hasOwnProperty('cmts')){\r\n if((getPermissionsValue(response.data.data.permissions, 'cfs').hasOwnProperty('Load') ? (response.data.data.permissions.cfs.Load.includes('read')) : false)){\r\n $location.path('/cfs');\r\n $location.search({});\r\n }else{\r\n $location.path('/dashboard-custom');\r\n $location.search({});\r\n }\r\n }\r\n }\r\n if(response.data.data.permissions.hasOwnProperty('cmts') && !response.data.data.permissions.hasOwnProperty('cww') && !response.data.data.permissions.hasOwnProperty('csl') && !response.data.data.permissions.hasOwnProperty('cfs')){\r\n if((getPermissionsValue(response.data.data.permissions, 'cmts').hasOwnProperty('Load') ? (response.data.data.permissions.cmts.Load.includes('read')) : false)){\r\n $location.path('/cmts');\r\n $location.search({});\r\n }else{\r\n $location.path('/dashboard-custom');\r\n $location.search({});\r\n }\r\n }\r\n }\r\n else if (redirect_path == null && response.data.data.type == null) {\r\n\r\n if(response.data.data.permissions.hasOwnProperty('cww')){\r\n if((getPermissionsValue(response.data.data.permissions, 'cww').hasOwnProperty('Shipment') ? (response.data.data.permissions.cww.Shipment.includes('read')) : false)){\r\n $location.path('/');\r\n $location.search({});\r\n }else{\r\n $location.path('/dashboard-custom');\r\n $location.search({});\r\n }\r\n }\r\n if(response.data.data.permissions.hasOwnProperty('csl') && !response.data.data.permissions.hasOwnProperty('cww')){\r\n if((getPermissionsValue(response.data.data.permissions, 'csl').hasOwnProperty('Load') ? (response.data.data.permissions.csl.Load.includes('read')) : false)){\r\n $location.path('/csl');\r\n $location.search({});\r\n }else{\r\n $location.path('/dashboard-custom');\r\n $location.search({});\r\n }\r\n }\r\n if(response.data.data.permissions.hasOwnProperty('cfs') && !response.data.data.permissions.hasOwnProperty('cww') && !response.data.data.permissions.hasOwnProperty('csl') && !response.data.data.permissions.hasOwnProperty('cmts')){\r\n if((getPermissionsValue(response.data.data.permissions, 'cfs').hasOwnProperty('Load') ? (response.data.data.permissions.cfs.Load.includes('read')) : false)){\r\n $location.path('/cfs');\r\n $location.search({});\r\n }else{\r\n $location.path('/dashboard-custom');\r\n $location.search({});\r\n }\r\n }\r\n if(response.data.data.permissions.hasOwnProperty('cmts') && !response.data.data.permissions.hasOwnProperty('cww') && !response.data.data.permissions.hasOwnProperty('csl') && !response.data.data.permissions.hasOwnProperty('cfs')){\r\n if((getPermissionsValue(response.data.data.permissions, 'cmts').hasOwnProperty('Load') ? (response.data.data.permissions.cmts.Load.includes('read')) : false)){\r\n $location.path('/cmts');\r\n $location.search({});\r\n }else{\r\n $location.path('/dashboard-custom');\r\n $location.search({});\r\n }\r\n }\r\n\r\n }\r\n else\r\n $location.url(redirect_path);\r\n }\r\n else{\r\n if (redirect_path == null || redirect_path == undefined)\r\n $location.path('/dashboard-custom');\r\n else\r\n $location.url(redirect_path);\r\n }\r\n });\r\n //vm.triggerSamlData = true;\r\n }\r\n }\r\n\r\n function getMatchesCompanies(key, searchText,activityType){\r\n if(searchText.length!=0){\r\n\r\n return UserService.autoComplete({field: key, value: searchText,user_activity : (activityType === 'userActivity')?true:false});\r\n }\r\n\r\n }\r\n\r\n function getMatchesUsers(key, searchTextval){\r\n if(searchTextval.length!=0){\r\n return UserService.autoCompleteUsers({field: key, value: searchTextval, company_id: vm.company_id});\r\n }\r\n }\r\n vm.userDisabled = true;\r\n function selectedCompanyChange(items) {\r\n if(items != undefined){\r\n if(items.display === \"ALL\"){\r\n vm.userDisabled = true;\r\n $scope.isUserRequired = false;\r\n vm.displayReportFields = false;\r\n vm.searchText2 = \"\";\r\n vm.user_id = \"\";\r\n vm.company_id = items.value;\r\n vm.company_name = items.display.replace(/ /g,\"_\");\r\n $scope.isCompanyRequired = false;\r\n }else{\r\n vm.userDisabled = false;\r\n vm.displayReportFields = false;\r\n vm.searchText2 = \"\";\r\n vm.company_id = items.value;\r\n vm.company_name = items.display.replace(/ /g,\"_\");\r\n $scope.isCompanyRequired = false;\r\n }\r\n\r\n }else{\r\n vm.userDisabled = true;\r\n vm.searchText2 = \"\";\r\n }\r\n\r\n }\r\n\r\n // function onSelectCompanyClose(){\r\n\r\n // vm.user_name = '';\r\n // vm.userDisabled = true;vm.userDisabled\r\n // }\r\n function selectedUserChange(item){\r\n if(item != undefined){\r\n vm.displayReportFields = false;\r\n vm.user_id = item.id;\r\n $scope.isUserRequired = false;\r\n\r\n\r\n }else{\r\n vm.searchText2 = \"\";\r\n }\r\n }\r\n\r\n function exportAuditlog() {\r\n vm.isSave = true;\r\n if (vm.formIsValid()){\r\n var url = UserService.postDownloadFile(vm.user.id);\r\n var request = {'start_date':vm.start_date,'end_date':vm.end_date};\r\n var filename = (moment().format('YYYY-MM-DD') + '-Audit-Log-Export.csv');\r\n return $http({\r\n url: url,\r\n method: 'GET',\r\n params: request,\r\n responseType: 'blob'\r\n }).success(function(data, status, headers, config){\r\n $window.saveAs(data, filename);\r\n vm.start_date = \"\";\r\n vm.end_date = \"\";\r\n }).error(function(data, status, headers, config){\r\n showToastWithFile('audit-log.error.html');\r\n vm.start_date = \"\";\r\n vm.end_date = \"\";\r\n });\r\n }\r\n }\r\n\r\n\r\n\r\n\r\n function exportAuditReports(){\r\n vm.isReportLoading = true;\r\n //vm.isSave = true;\r\n if (vm.formIsValid()){\r\n var url = UserService.postDownloadFileAudit(vm.user.id);\r\n var request = {'company_id':vm.company_id,'user_id':vm.user_id,'start_date':vm.from_date,'end_date':vm.to_date};\r\n var filename = (moment().format('YYYY-MM-DD') + '-Audit-Log-Report.csv');\r\n if(vm.company_id != undefined && vm.user_id != undefined){\r\n return $http({\r\n url: url,\r\n method: 'GET',\r\n params: request,\r\n responseType: 'blob'\r\n }).success(function(data, status, headers, config){\r\n $window.saveAs(data, filename);\r\n vm.from_date = \"\";\r\n vm.to_date = \"\";\r\n vm.searchText2 = \"\";\r\n vm.searchText1 = \"\";\r\n vm.isReportLoading = false;\r\n $scope.isToDateRequired = false;\r\n $scope.isFromDateRequired = false;\r\n vm.company_id = undefined;\r\n vm.user_id = undefined;\r\n }).error(function(data, status, headers, config){\r\n vm.isReportLoading = false;\r\n showToastWithFile('audit-log.error.html');\r\n vm.searchText2 = \"\";\r\n vm.searchText1 = \"\";\r\n vm.from_date = \"\";\r\n vm.to_date = \"\";\r\n });\r\n }else{\r\n vm.isReportLoading = false;\r\n if(vm.company_id == undefined){\r\n vm.searchText1== ''\r\n $scope.isCompanyRequired = true;\r\n }\r\n if(vm.user_id == undefined){\r\n vm.searchText2== ''\r\n $scope.isUserRequired = true;\r\n }\r\n }\r\n\r\n }\r\n else {\r\n vm.isReportLoading = false;\r\n if(vm.searchText1== '' || vm.searchText1 == undefined || vm.searchText1 == null )\r\n $scope.isCompanyRequired = true;\r\n if(vm.searchText2== '' || vm.searchText2 == undefined || vm.searchText2 == null ){\r\n if(vm.searchText1== 'ALL' && vm.searchText2== ''){\r\n $scope.isUserRequired = false;\r\n }else{\r\n $scope.isUserRequired = true;\r\n }\r\n }\r\n\r\n if(!vm.from_date)\r\n $scope.isFromDateRequired = true;\r\n if(!vm.to_date)\r\n $scope.isToDateRequired = true;\r\n }\r\n\r\n }\r\n\r\n $scope.userActivityTab = function() {\r\n vm.from_date = \"\";\r\n vm.to_date = \"\";\r\n vm.searchText2 = \"\";\r\n vm.searchText1 = \"\";\r\n }\r\n\r\n$scope.ShowFromDate = function(vmDate){\r\n\r\n $scope.isFromDateRequired = false;\r\n}\r\n\r\n$scope.ShowToDate = function(vmDate){\r\n\r\n // if(!vmDate.from_date || vmDate.from_date == undefined){\r\n // vmDate.to_date = '';\r\n // $mdDialog.show(\r\n // $mdDialog.alert()\r\n // .parent(angular.element(document.body))\r\n // .clickOutsideToClose(true)\r\n // .htmlContent('Please select From Date first')\r\n // .ok('Ok')\r\n // );\r\n // }\r\n $scope.isToDateRequired = false;\r\n}\r\n\r\n if(localStorage.switchEmail){\r\n vm.switchEmail = localStorage.switchEmail;\r\n }else if(localStorage.userCompany){\r\n vm.switchEmail = localStorage.userCompany;\r\n }else if(localStorage.userDepartment){\r\n vm.switchEmail = localStorage.userDepartment;\r\n }\r\n\r\n\r\n\r\n\r\n function selectedCompanyRecord(item) {\r\n if(item != undefined){\r\n vm.displayReportFields = false;\r\n vm.searchText2 = \"\";\r\n vm.company_id = item.value;\r\n vm.company_name = item.display.replace(/ /g,\"_\");\r\n $scope.isCompanyRequired = false;\r\n $scope.isUserCompanyRequired = false;\r\n }\r\n }\r\n\r\n\r\n $scope.userExport = function(formData){\r\n if(vm.searchText3 != \"\" && vm.searchText3 != null){\r\n var userExportData = {};\r\n var custType = [];\r\n if(formData.is_cww){\r\n custType.push('cww');\r\n }\r\n if(formData.is_csl){\r\n custType.push('csl');\r\n }\r\n if(formData.is_cfs){\r\n custType.push('cfs');\r\n }\r\n if(formData.is_cmts){\r\n custType.push('cmts');\r\n }\r\n userExportData.company_id = vm.company_id;\r\n userExportData.customer_types = custType;\r\n userExportData.cww_roles = formData.cww_roles;\r\n userExportData.csl_roles = formData.csl_roles;\r\n userExportData.cfs_roles = formData.cfs_roles;\r\n userExportData.cmts_roles = formData.cmts_roles;\r\n userExportData.cww_classic = formData.Classic_roles;\r\n userExportData.ad_users = formData.adUser?formData.adUser : false;\r\n userExportData.non_ad_users = formData.nonAduser?formData.nonAduser : false;\r\n userExportData.active = formData.active?formData.active:false;\r\n userExportData.filter_only = formData.filter_only?formData.filter_only : false;\r\n vm.isReportLoading = true;\r\n var url = UserService.bulkUserExport();\r\n $http({\r\n method: 'POST',\r\n url: url,\r\n data: userExportData,\r\n responseType: 'blob'\r\n }).success(function(data, status, headers, config){\r\n\r\n var filename = (moment().format('YYYY-MM-DD') + '-User-Export.csv');\r\n $window.saveAs(data, filename);\r\n vm.isReportLoading = false;\r\n vm.searchText3 = \"\";\r\n formData.cww_roles = \"\";\r\n formData.csl_roles = \"\";\r\n formData.cfs_roles = \"\";\r\n formData.cmts_roles = \"\";\r\n formData.Classic_roles = \"\";\r\n formData.adUser = false;\r\n formData.nonAduser = false;\r\n formData.active = false;\r\n formData.filter_only = false;\r\n formData.is_cww = false;\r\n formData.is_csl = false;\r\n formData.is_cfs = false;\r\n formData.is_cmts = false;\r\n }).error(function(data, status, headers, config){\r\n showToastWithFile('audit-log.error.html');\r\n vm.isReportLoading = false;\r\n vm.searchText3 = \"\";\r\n formData.cww_roles = \"\";\r\n formData.csl_roles = \"\";\r\n formData.cfs_roles = \"\";\r\n formData.cmts_roles = \"\";\r\n formData.Classic_roles = \"\";\r\n formData.adUser = false;\r\n formData.nonAduser = false;\r\n formData.active = false;\r\n formData.filter_only = false;\r\n formData.is_cww = false;\r\n formData.is_csl = false;\r\n formData.is_cfs = false;\r\n formData.is_cmts = false;\r\n });\r\n }else{\r\n vm.isReportLoading = false;\r\n $scope.isUserCompanyRequired = true;\r\n }\r\n }\r\n\r\n $scope.userReportTab = function(formData) {\r\n vm.searchText3 = \"\";\r\n formData.cww_roles = \"\";\r\n formData.csl_roles = \"\";\r\n formData.cfs_roles = \"\";\r\n formData.cmts_roles = \"\";\r\n formData.Classic_roles = \"\";\r\n formData.adUser = false;\r\n formData.nonAduser = false;\r\n formData.active = false;\r\n formData.filter_only = false;\r\n formData.is_cww = false;\r\n formData.is_csl = false;\r\n formData.is_cfs = false;\r\n formData.is_cmts = false;\r\n }\r\n\r\n $scope.onCwwChecked = function(frmData){\r\n if(frmData.is_cww == true){\r\n frmData.cww_roles = \"\";\r\n frmData.Classic_roles = '';\r\n }\r\n }\r\n $scope.onCslChecked = function(frmData){\r\n if(frmData.is_csl == true){\r\n frmData.csl_roles = \"\";\r\n\r\n }\r\n }\r\n $scope.onCfsChecked = function(frmData){\r\n if(frmData.is_cfs == true){\r\n frmData.cfs_roles = \"\";\r\n }\r\n }\r\n $scope.onCmtsChecked = function(frmData){\r\n if(frmData.is_cmts == true){\r\n frmData.cmts_roles = \"\";\r\n }\r\n }\r\n\r\n $window.addEventListener('click',function(e){\r\n $mdSelect.hide();\r\n })\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .service('PermissionsService', PermissionsService);\r\n\r\n /** @ngInject */\r\n function PermissionsService($resource, $auth) {\r\n var permission_ = {\r\n Company: [\"manage\", \"read\",\"cmplensdata\"],\r\n Geocode: [\"manage\", \"read\"],\r\n Group: [\"manage\"],\r\n PotentialException: [\"read\",'reader', \"update\", \"create\", \"destroy\", \"publish\"],\r\n Shipment: [\"read\", \"manage\", \"active\"],\r\n ShipmentBookmark: [\"manage\"],\r\n BookShipment: [],\r\n User: [\"read\", \"create\", \"update\",\"manage\", \"lensmode\",\"track_and_trace\", \"warehouse\", \"accounts_receivables\", \"book_shipment\", \"reporting\", \"operations_kpi\", \"operations_dashboard\", \"customs\", \"demo\"],\r\n UserContact: [\"read\"],\r\n UserNotification: [\"manage\"],\r\n LensGroup: [\"manage\"],\r\n Admin: [\"manage\"],\r\n Spotlight: [\"manege\"],\r\n CslException: [\"approver\", \"read\", \"create\", \"all_clients_approver\"],\r\n SupportRequestUser: [\"read\", \"update\", \"create\"],\r\n SupportRequestAdmin:[\"manage\"]\r\n };\r\n\r\n var blank_permissions = {\r\n Company: {\r\n name: \"USER.COMPANY\",\r\n options: [\r\n {name: \"Admin\", group: ['manage'], value: false, display: false},\r\n {name: \"Access Company Lens Data\", group: ['cmplensdata'], value: false, display: false},\r\n {name: \"Read Only Access\", group: ['read'], value: false, display: false}\r\n ],\r\n options_csl: [\r\n {name: \"Admin\", group: ['manage'], value: false, display: false},\r\n {name: \"Access Company Lens Data\", group: ['cmplensdata'], value: false, display: false},\r\n {name: \"Read Only Access\", group: ['read'], value: false, display: false}\r\n ],\r\n options_cfs: [\r\n {name: \"Admin\", group: ['manage'], value: false, display: false},\r\n {name: \"Access Company Lens Data\", group: ['cmplensdata'], value: false, display: false},\r\n {name: \"Read Only Access\", group: ['read'], value: false, display: false}\r\n ],\r\n options_cmts: [\r\n {name: \"Admin\", group: ['manage'], value: false, display: false},\r\n {name: \"Access Company Lens Data\", group: ['cmplensdata'], value: false, display: false},\r\n {name: \"Read Only Access\", group: ['read'], value: false, display: false}\r\n ]\r\n },\r\n LensGroup: {\r\n name: \"Admin Settings\",\r\n options: [\r\n {name: \"Manage Lens Groups\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_csl: [\r\n {name: \"Manage Lens Groups\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_cfs: [\r\n {name: \"Manage Lens Groups\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_cmts: [\r\n {name: \"Manage Lens Groups\", group: ['manage'], value: false, display: false}\r\n ]\r\n },\r\n Group: {\r\n name: \"ADMIN.GROUPS.GROUP\",\r\n options: [\r\n {name: \"Admin\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_csl: [\r\n {name: \"Admin\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_cfs: [\r\n {name: \"Admin\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_cmts: [\r\n {name: \"Admin\", group: ['manage'], value: false, display: false}\r\n ]\r\n },\r\n PotentialException: {\r\n name: \"ADMIN.POTENTIAL.POTENTIAL_EXCEPTION\",\r\n options: [\r\n {name: \"Edit Potential Exceptions\", group: ['read', 'update', 'create', 'destroy'], value: false, display: false},\r\n {name: \"Approve Potential Exceptions\", group: ['publish'], value: false, display: false},\r\n {name: \"Read Potential Exception\", group: ['reader'], value: false, display: false}\r\n ]\r\n },\r\n Shipment: {\r\n name: \"SHIPMENT.SHIPMENT\",\r\n options: [\r\n {name: \"View\", group: ['read'], value: false, display: false},\r\n {name: \"T&T Export\", group: ['export'], value: false, display: false},\r\n {name: \"Financial\", group: ['financial'], value: false, display: false}\r\n ],\r\n options_csl: [\r\n {name: \"View\", group: ['read'], value: false, display: false},\r\n {name: \"T&T Export\", group: ['export'], value: false, display: false},\r\n {name: \"Financial\", group: ['financial'], value: false, display: false}\r\n ],\r\n options_cfs: [\r\n {name: \"View\", group: ['read'], value: false, display: false},\r\n {name: \"T&T Export\", group: ['export'], value: false, display: false},\r\n {name: \"Financial\", group: ['financial'], value: false, display: false}\r\n ],\r\n options_cmts: [\r\n {name: \"View\", group: ['read'], value: false, display: false},\r\n {name: \"T&T Export\", group: ['export'], value: false, display: false},\r\n {name: \"Financial\", group: ['financial'], value: false, display: false}\r\n ]\r\n },\r\n Load: {\r\n name: \"Load\",\r\n options: [\r\n {name: \"View\", group: ['read'], value: false, display: false},\r\n {name: \"T&T Export\", group: ['export'], value: false, display: false},\r\n {name: \"Financial\", group: ['financial'], value: false, display: false}\r\n ],\r\n options_csl: [\r\n {name: \"View\", group: ['read'], value: false, display: false},\r\n {name: \"T&T Export\", group: ['export'], value: false, display: false},\r\n {name: \"Financial\", group: ['financial'], value: false, display: false}\r\n ],\r\n options_cfs: [\r\n {name: \"View\", group: ['read'], value: false, display: false},\r\n {name: \"T&T Export\", group: ['export'], value: false, display: false},\r\n {name: \"Financial\", group: ['financial'], value: false, display: false}\r\n ],\r\n options_cmts: [\r\n {name: \"View\", group: ['read'], value: false, display: false},\r\n {name: \"T&T Export\", group: ['export'], value: false, display: false},\r\n {name: \"Financial\", group: ['financial'], value: false, display: false}\r\n ]\r\n },\r\n CslException: {\r\n name: \"CslException\",\r\n options: [\r\n {name: \"Approver\", group: ['approver'], value: false, display: false},\r\n {name: \"All Clients\", group: ['all_clients_approver'], value: false, display: false},\r\n {name: \"Read Only\", group: ['read'], value: false, display: false},\r\n {name: \"Create Only\", group: ['create'], value: false, display: false}\r\n ],\r\n options_csl: [\r\n {name: \"Approver\", group: ['approver'], value: false, display: false},\r\n {name: \"All Clients\", group: ['all_clients_approver'], value: false, display: false},\r\n {name: \"Read Only\", group: ['read'], value: false, display: false},\r\n {name: \"Create Only\", group: ['create'], value: false, display: false}\r\n ],\r\n options_cfs: [\r\n {name: \"Approver\", group: ['approver'], value: false, display: false},\r\n {name: \"All Clients\", group: ['all_clients_approver'], value: false, display: false},\r\n {name: \"Read Only\", group: ['read'], value: false, display: false},\r\n {name: \"Create Only\", group: ['create'], value: false, display: false}\r\n ],\r\n options_cmts: [\r\n {name: \"Approver\", group: ['approver'], value: false, display: false},\r\n {name: \"All Clients\", group: ['all_clients_approver'], value: false, display: false},\r\n {name: \"Read Only\", group: ['read'], value: false, display: false},\r\n {name: \"Create Only\", group: ['create'], value: false, display: false}\r\n ]\r\n },\r\n User: {\r\n name: \"USER.USER\",\r\n options: [\r\n {name: \"Manage Users\", group: ['manage'], value: false, display: false},\r\n {name: \"C-View Lens Mode\", group: ['lensmode'], value: false, display: false}, \r\n {name: \"Demo\", group: ['demo'], value: false, display: false}\r\n ],\r\n options_classic: [\r\n {name: \"Transportation\", group: ['track_and_trace'], value: false, display: false},\r\n {name: \"Warehouse\", group: ['warehouse'], value: false, display: false},\r\n {name: \"Accounts Receivables\", group: ['accounts_receivables'], value: false, display: false},\r\n {name: \"Book Shipment\", group: ['book_shipment'], value: false, display: false},\r\n {name: \"Reporting\", group: ['reporting'], value: false, display: false},\r\n {name: \"Operations-KPI\", group: ['operations_kpi'], value: false, display: false},\r\n {name: \"Operations-Dashboard\", group: ['operations_dashboard'], value: false, display: false},\r\n {name: \"Customs\", group: ['customs'], value: false, display: false}\r\n ],\r\n options_csl: [\r\n {name: \"Manage Users\", group: ['manage'], value: false, display: false},\r\n {name: \"C-View Lens Mode\", group: ['lensmode'], value: false, display: false},\r\n {name: \"Demo\", group: ['demo'], value: false, display: false}\r\n ],\r\n options_cfs: [\r\n {name: \"Manage Users\", group: ['manage'], value: false, display: false},\r\n {name: \"C-View Lens Mode\", group: ['lensmode'], value: false, display: false},\r\n {name: \"Demo\", group: ['demo'], value: false, display: false}\r\n ],\r\n options_cmts: [\r\n {name: \"Manage Users\", group: ['manage'], value: false, display: false},\r\n {name: \"C-View Lens Mode\", group: ['lensmode'], value: false, display: false},\r\n {name: \"Demo\", group: ['demo'], value: false, display: false}\r\n ]\r\n },\r\n BookShipment: {\r\n name: \"BOOKSHIPMENT.BOOK_SHIPMENT\",\r\n options: [\r\n {name: \"Create\", group: ['create'], value: false, display: false}\r\n ]\r\n },\r\n Admin: {\r\n name: \"Super Admin\",\r\n options: [\r\n {name: \"Super Admin\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_csl: [\r\n {name: \"Super Admin\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_cfs: [\r\n {name: \"Super Admin\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_cmts: [\r\n {name: \"Super Admin\", group: ['manage'], value: false, display: false}\r\n ]\r\n },\r\n SupportRequestUser: {\r\n name: \"Support Request User\",\r\n options: [\r\n {name: \"Support Request User\", group: ['read', 'update', 'create'], value: false, display: false}\r\n ]\r\n },\r\n SupportRequestAdmin:{\r\n name: \"Support Request Admin\",\r\n options: [\r\n {name: \"Support Request Admin\", group: ['manage'], value: false, display: false}\r\n ]\r\n },\r\n SupportRequestValidator: {\r\n name: \"Support Request Validator\",\r\n options: [\r\n {name: \"Data Validator\", group: ['read', 'update'], value: false, display: false}\r\n ]\r\n },\r\n CviewClassicAdmin:{\r\n name: \"Pathway Admin\",\r\n options: [\r\n {name: \"Pathway Admin\", group: ['read', 'update'], value: false, display: false}\r\n ]\r\n }, \r\n Spotlight: {\r\n name: \"Manage Spotlight\",\r\n options: [\r\n {name: \"Manage Spotlight\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_csl: [\r\n {name: \"Manage Spotlight\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_cfs: [\r\n {name: \"Manage Spotlight\", group: ['manage'], value: false, display: false}\r\n ],\r\n options_cmts: [\r\n {name: \"Manage Spotlight\", group: ['manage'], value: false, display: false}\r\n ]\r\n }\r\n };\r\n\r\n\r\n function doesBincludeA(A, B){\r\n try {\r\n if (A && B){\r\n return A.every(function(d){ return B.includes(d);});\r\n } else\r\n return false;\r\n } catch (exception){\r\n return false;\r\n }\r\n }\r\n\r\n return {\r\n hasPermissions: function(permissions, user_permissions){\r\n\r\n if(user_permissions.cww){\r\n for (var key in permissions){\r\n for (var i in permissions[key].options){\r\n permissions[key].options[i].value = doesBincludeA( permissions[key].options[i].group,user_permissions.cww[key]);\r\n }\r\n for (var i in permissions[key].options_classic){\r\n permissions[key].options_classic[i].value = doesBincludeA( permissions[key].options_classic[i].group,user_permissions.cww[key]);\r\n }\r\n }\r\n }\r\n\r\n if(user_permissions.csl){\r\n for (var key in permissions){\r\n for (var i in permissions[key].options_csl){\r\n permissions[key].options_csl[i].value = doesBincludeA( permissions[key].options_csl[i].group,user_permissions.csl[key]);\r\n }\r\n }\r\n }\r\n\r\n if(user_permissions.cfs){\r\n for (var key in permissions){\r\n for (var i in permissions[key].options_cfs){\r\n permissions[key].options_cfs[i].value = doesBincludeA( permissions[key].options_cfs[i].group,user_permissions.cfs[key]);\r\n }\r\n }\r\n }\r\n\r\n if(user_permissions.cmts){\r\n for (var key in permissions){\r\n for (var i in permissions[key].options_cmts){\r\n permissions[key].options_cmts[i].value = doesBincludeA( permissions[key].options_cmts[i].group,user_permissions.cmts[key]);\r\n }\r\n }\r\n }\r\n\r\n return permissions;\r\n },\r\n generatePotentialPermissions: function(_permissions){\r\n var permissions = angular.copy(blank_permissions);\r\n for (var key in permissions){\r\n for (var i in permissions[key].options){\r\n // Does the user have all the permissions in the option?\r\n permissions[key].options[i].display = doesBincludeA( permissions[key].options[i].group, _permissions[key]);\r\n }\r\n for (var i in permissions[key].options_classic){\r\n // Does the user have all the permissions in the option?\r\n permissions[key].options_classic[i].display = doesBincludeA( permissions[key].options_classic[i].group, _permissions[key]);\r\n }\r\n for (var i in permissions[key].options_csl){\r\n // Does the user have all the permissions in the option?\r\n permissions[key].options_csl[i].display = doesBincludeA( permissions[key].options_csl[i].group, _permissions[key]);\r\n }\r\n for (var i in permissions[key].options_cfs){\r\n // Does the user have all the permissions in the option?\r\n permissions[key].options_cfs[i].display = doesBincludeA( permissions[key].options_cfs[i].group, _permissions[key]);\r\n }\r\n for (var i in permissions[key].options_cmts){\r\n // Does the user have all the permissions in the option?\r\n permissions[key].options_cmts[i].display = doesBincludeA( permissions[key].options_cmts[i].group, _permissions[key]);\r\n }\r\n }\r\n return permissions;\r\n }\r\n };\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc directive\r\n * @name login\r\n * @description directive that includes the login partial\r\n * @restrict E\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.user')\r\n .directive('logIn', logIn);\r\n\r\n /** @ngInject */\r\n function logIn() {\r\n var directive = {\r\n restrict: 'E',\r\n templateUrl: '/app/user/log-in.html'\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n})();\r\n\n/**\r\n * @ngdoc directive\r\n * @name editAccount\r\n * @description directive that includes the edit account partial\r\n * @restrict E\r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name passwordVerify\r\n * @description directive that verifies a password and the confirm password are the same\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.user')\r\n .directive('editAccount', editAccount)\r\n\r\n /** @ngInject */\r\n function editAccount() {\r\n var directive = {\r\n restrict: 'E',\r\n templateUrl: '/app/user/edit-account.html'\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.user')\r\n .directive('changeQuestion', changeQuestion);\r\n\r\n /** @ngInject */\r\n function changeQuestion() {\r\n var directive = {\r\n restrict: 'E',\r\n templateUrl: '/app/user/change-question.html'\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.user')\r\n .directive('changePassword', changePassword)\r\n .directive(\"passwordVerify\", passwordVerify);\r\n\r\n /** @ngInject */\r\n function changePassword() {\r\n var directive = {\r\n restrict: 'E',\r\n templateUrl: '/app/user/change-password.html'\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n //verifies that the first password field and the second are the same\r\n function passwordVerify() {\r\n return {\r\n require: \"ngModel\",\r\n scope: {\r\n passwordVerify: '='\r\n },\r\n link: function(scope, element, attrs, ctrl) {\r\n scope.$watch(function() {\r\n var combined;\r\n\r\n if (scope.passwordVerify || ctrl.$viewValue) {\r\n combined = scope.passwordVerify + '_' + ctrl.$viewValue;\r\n }\r\n return combined;\r\n }, function(value) {\r\n if (value) {\r\n ctrl.$parsers.unshift(function(viewValue) {\r\n var origin = scope.passwordVerify;\r\n if (origin !== viewValue) {\r\n ctrl.$setValidity(\"passwordVerify\", false);\r\n return undefined;\r\n } else {\r\n ctrl.$setValidity(\"passwordVerify\", true);\r\n return viewValue;\r\n }\r\n });\r\n }\r\n });\r\n }\r\n };\r\n }\r\n\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name TrackTraceService\r\n *\r\n * @description The TrackTraceService module communciates with the Rails API to\r\n * procure search data on shipments to the user.\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceService.isCollapsed\r\n * @description method that queries whether collapisble exceptions component is\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceService.setCollapsed\r\n * @description method that sets the collapsibility of the above component\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceService.getShipments\r\n * @description method that returns the last query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceService.getPotentialExceptions\r\n * @description method that returns a list of potential exceptions\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceService.queryShipments\r\n * @params {query}\r\n * @description method that returns a complicated json object containing shipments\r\n * and pagination information\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceService.isNoResults\r\n * @decription returns true or false depending on if the shipment query has results\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceService.getShipTotal\r\n * @decription returns total number of shipments returned from the query\r\n */\r\n\r\n (function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('TrackTraceService', TrackTraceService);\r\n\r\n\r\n\r\n /** @ngInject */\r\n TrackTraceService.$inject = ['$http', '$log', 'api', '$rootScope', '$q', '$timeout', 'AJAX'];\r\n function TrackTraceService($http, $log, api, $rootScope, $q, $timeout, AJAX) {\r\n var shipments = [{'shippercountry': 'United States', 'servicetype': '', 'shipdate': '11-AUG-08', 'consigneeaddress4': '', 'shipperaddress1': '1234 MAIN', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': '1234 MAIN', 'consigneeaddress2': '', 'consigneeaddress3': '', 'jobunid': '100', 'departuredate': '', 'shipperzipcode': '30033', 'shippername': 'TEST customer', 'customername': 'TEST customer', 'bookingnumber': '', 'consigneezipcode': '30033', 'consigneename': 'TEST customer', 'servicetypecode': '', 'gshpid': 'G0000000000000000094', 'shipperpartyid': 'TESTCUSTOM', 'awb': 'H00030', 'origin': 'Dallas Ft. Worth', 'destination': '', 'totalchargeableweight': '', 'consigneepartyid': 'TESTCUSTOM', 'businesstype': 'Air Export', 'consigneecity': 'Atlanta', 'totalgrossweight': '', 'consigneecountry': 'United States', 'customergroup': '', 'totalpieces': '', 'duedate': '', 'shippercity': 'Atlanta', 'servicelevelcode': '', 'customerpartyid': 'TESTCUSTOM', 'servicelevel': ''}, {'shippercountry': 'United States', 'servicetype': 'Door To Door', 'shipdate': '22-AUG-08', 'consigneeaddress4': '', 'shipperaddress1': '5401 S 39th Street, #1', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': 'for onforwarding with DHX', 'consigneeaddress2': 'to Cameula, Hawaii 96743', 'consigneeaddress3': '', 'jobunid': '388', 'departuredate': '21-AUG-08', 'shipperzipcode': '85040', 'shippername': 'Ozone Water Systems', 'customername': 'DCI Logistics, Inc.', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': '', 'servicetypeCODE': 'DTD', 'gshpid': 'G0000000000000000352', 'shipperpartyid': 'OZON540ATL', 'awb': 'AATL0808000001', 'origin': 'Phoenix', 'destination': 'Honolulu', 'totalchargeableweight': '263', 'consigneepartyid': '', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '260', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '1', 'duedate': '05-SEP-08', 'shippercity': 'Phoenix', 'servicelevelCODE': 'DEFR', 'customerpartyid': 'DCIL608ATL', 'servicelevel': 'Deferred Service'}, {'shipperCOUNTRY': '', 'servicetype': 'Door To Door', 'shipdate': '15-AUG-08', 'consigneeaddress4': '', 'shipperaddress1': '', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': '', 'consigneeaddress2': '', 'consigneeaddress3': '', 'jobunid': '353', 'departuredate': '15-AUG-08', 'shipperzipcode': '', 'shippername': 'Dell Dallas DC', 'customername': 'Dell Dallas DC', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': 'Test One', 'servicetypeCODE': 'DTD', 'gshpid': 'G0000000000000000320', 'shipperpartyid': 'DELL321DFW', 'awb': 'H00055', 'origin': 'Dallas Ft. Worth', 'destination': 'Phoenix', 'totalchargeableweight': '55', 'consigneepartyid': 'TEST123PHX', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '55', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '10', 'duedate': '21-AUG-08', 'shippercity': '', 'servicelevelCODE': 'ECO', 'customerpartyid': 'DELL321DFW', 'servicelevel': 'Economy Service'}, {'shipperCOUNTRY': 'United States', 'servicetype': 'Door To Port', 'shipdate': '04-SEP-08', 'consigneeaddress4': 'United Kingdom', 'shipperaddress1': '10805 Painter Avenue', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': 'PTF No. 7 Gate', 'consigneeaddress2': 'Wilmore Road', 'consigneeaddress3': 'Derby, England DE248BJ', 'jobunid': '383', 'departuredate': '10-SEP-08', 'shipperzipcode': '90670', 'shippername': 'Advanced Ground Systems Engineering', 'customername': 'MCH Transportation LLC', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': '', 'servicetypeCODE': 'DTP', 'gshpid': 'G0000000000000000347', 'shipperpartyid': 'ADVA108ATL', 'awb': '172 70503016', 'origin': 'Atlanta', 'destination': 'East Midlands', 'totalchargeableweight': '2858', 'consigneepartyid': '', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '2858', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '1', 'duedate': '13-SEP-08', 'shippercity': 'Santa Fe Springs', 'servicelevelCODE': 'IECO', 'customerpartyid': 'MCHT577ATL', 'servicelevel': 'International Economy Service'}, {'shipperCOUNTRY': 'United States', 'servicetype': '', 'shipdate': '05-SEP-08', 'consigneeaddress4': 'United Kingdom', 'shipperaddress1': '10805 Painter Avenue', 'shipperaddress2': '', 'shipperaddress3': '', 'shipperaddress4': '', 'consigneeaddress1': 'PTF No. 7 Gate', 'consigneeaddress2': 'Wilmore Road', 'consigneeaddress3': 'Derby, England DE248BJ', 'jobunid': '386', 'departuredate': '10-SEP-08', 'shipperzipcode': '90670', 'shippername': 'Advanced Ground Systems Engineering', 'customername': 'MCH Transportation LLC', 'bookingnumber': '', 'consigneezipcode': '', 'consigneename': '', 'servicetypeCODE': '', 'gshpid': 'G0000000000000000350', 'shipperpartyid': 'ADVA108ATL', 'awb': '172 70503020', 'origin': 'Houston', 'destination': 'East Midlands', 'totalchargeableweight': '2858', 'consigneepartyid': '', 'businesstype': 'Air Export', 'consigneecity': '', 'totalgrossweight': '2858', 'consigneeCOUNTRY': '', 'customerGROUP': '', 'totalpieces': '1', 'duedate': '12-SEP-08', 'shippercity': 'Santa Fe Springs', 'servicelevelCODE': '', 'customerpartyid': 'MCHT577ATL', 'servicelevel': ''}];\r\n var globalSearchData = [];\r\n\r\n var blankData = {\r\n shipments: [],\r\n total: 0,\r\n service_level_codes: [],\r\n reason_codes: [],\r\n search_params: [],\r\n business_type_codes: [],\r\n active: [],\r\n exceptions: [],\r\n potential: [],\r\n active_count: 0,\r\n results_count: 0,\r\n results_filtered: false,\r\n exception_count: 0,\r\n potential_exception_count: 0\r\n };\r\n\r\n var queryState = {\r\n displayNoResults: true,\r\n isFilterLoading: {\r\n active: false,\r\n exception: false,\r\n potential: false\r\n }\r\n };\r\n\r\n var data = angular.copy(blankData),\r\n activeTimeoutPromise = false;\r\n var pins = [];\r\n var collapsed = true, noResults = false;\r\n\r\n var totalShipments = 0;\r\n\r\n var page = 1;\r\n\r\n var potentialExceptions = [\r\n {\r\n name: \"Tidal Wave\",\r\n lat: 30.194444,\r\n long: -97.67,\r\n },\r\n {\r\n name: \"Hurricane\",\r\n lat: 40.639722,\r\n long: -122.375,\r\n },\r\n {\r\n name: \"Godzilla\",\r\n lat: 39.861667,\r\n long: -80.290556,\r\n }\r\n ];\r\n\r\n function processPins(pinData){\r\n pins.length = 0;\r\n pinData.map(function(d){\r\n d.geocodes.map(function(datum){\r\n datum.type = d.geotype;\r\n pins.push(datum);\r\n });\r\n });\r\n }\r\n\r\n function autoComplete(query){\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n function queryShipments(query, timeoutPromise, sort_params){\r\n var timeoutTid = false;\r\n // TODO: come up with something that will make it not fire multiple requests, but also not trigger the timeout messages\r\n // if (activeTimeoutPromise) activeTimeoutPromise.resolve('newSearch');\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n activeTimeoutPromise = timeoutPromise;\r\n // $log.debug(query);\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompany);\r\n // }else if(localStorage.userDepartment){\r\n // params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartment)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompany;\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser);\r\n // }\r\n\r\n if(localStorage.customerType == 'cww'){\r\n\r\n if(localStorage.switchEmailCwwType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCwwType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCww){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCww)+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userDepartmentCww){\r\n params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCww)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCww+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.dummyUser){\r\n params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n\r\n }\r\n else{\r\n params +=\"?customer_type=cww\";\r\n }\r\n\r\n var new_parameters = \"\";\r\n var new_query = \"\";\r\n\r\n for (var key in query) {\r\n if (query.hasOwnProperty(key)) {\r\n //new_query = new_query+'&'+key=query[key];\r\n if(key != ''){\r\n new_query = new_query+'&'+key+'='+encodeURIComponent(query[key]);\r\n }\r\n\r\n }\r\n }\r\n\r\n /*for (var key in sort_params) {\r\n //new_query = new_query+'&'+key=query[key];\r\n if(key != ''){\r\n new_query = new_query+'&'+key+'='+encodeURIComponent(sort_params[key]);\r\n }\r\n }*/\r\n\r\n //$location.search(query);\r\n // Base64 encode - btoa();\r\n if(params){\r\n params = params+new_query;\r\n } else{\r\n new_query = new_query.substring(1);\r\n params = '?'+new_query;\r\n }\r\n\r\n var promise = $http.post(api.url_v2 + '/search'+params, query, {timeout:timeoutPromise.promise}).then(function(res){\r\n page = query.page ? query.page : 1;\r\n data.total = res.headers().total;\r\n noResults = data.total == 0;\r\n queryState.displayNoResults = noResults;\r\n data.error = null;\r\n data.isTimeout = false;\r\n data.shipments.length = 0;\r\n data.potential_exception_count = res.data.potential_exception_count;\r\n data.exception_count = res.data.exception_count;\r\n data.active_count = res.data.active_count;\r\n data.unfiltered_counts = res.data.unfiltered_counts;\r\n data.total = res.data.total;\r\n data.per_page = res.data.per_page;\r\n data.page = res.data.page;\r\n\r\n data.shipments = res.data.shipments.map(function(d){\r\n var s = d;\r\n\r\n if (s.flags) {\r\n if (s.flags.indexOf('current_exception') !== -1) s.flag = 'current_exception';\r\n else if (s.flags.indexOf('potential_exception') !== -1) s.flag = 'potential_exception';\r\n }\r\n if (!s.jobno){\r\n\r\n s.isdelivered = 'booking';\r\n }\r\n return s;\r\n });\r\n $log.debug(data);\r\n\r\n\r\n if(res.data.active_geocodes || res.data.potential_exception_geocodes || res.data.exception_geocodes){\r\n\r\n var pinData = [\r\n {geotype: \"active\", geocodes: res.data.active_geocodes},\r\n {geotype: \"potential\", geocodes: res.data.potential_exception_geocodes},\r\n {geotype: \"exception\", geocodes: res.data.exception_geocodes}\r\n ];\r\n ['active','potential','exception'].map(function(d){queryState.isFilterLoading[d] = false;});\r\n processPins(pinData);\r\n\r\n }\r\n\r\n\r\n\r\n\r\n return data;\r\n }, function(e){\r\n\r\n\r\n return $q.reject(e);\r\n\r\n }\r\n ).catch(function(res){\r\n if(res.config.timeout.$$state.value != 'newSearch') {\r\n data = angular.copy(blankData);\r\n pins.length = 0;\r\n data.error = res.data ? (res.data.error ? res.data.error : null ): \"TRACKTRACE.TIMEOUT\";\r\n data.total = 0;\r\n page = 1;\r\n noResults = true;\r\n }\r\n\r\n if ([422, 500, 503].includes(res.status)){\r\n return res\r\n }\r\n else {\r\n return new Error(\"Boom\");\r\n }\r\n }).finally(function() {\r\n if (timeoutTid) $timeout.cancel(timeoutTid);\r\n timeoutPromise = false;\r\n activeTimeoutPromise = false;\r\n });\r\n timeoutTid = $timeout(function() {\r\n if (timeoutPromise) timeoutPromise.resolve();\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n\r\n }\r\n\r\n return {\r\n isNoResults: function(){\r\n return noResults;\r\n },\r\n isCollapsed: function(){\r\n return collapsed;\r\n },\r\n setCollapsed: function(collapse){\r\n collapsed = collapse;\r\n },\r\n getShipments: function(){\r\n return data;\r\n },\r\n getPotentialExceptions: function(){\r\n return potentialExceptions;\r\n },\r\n setGlobalSearchData: function(data) {/*Added by Abheesh*/\r\n globalSearchData = data;\r\n },\r\n getGlobalSearchData: function() {/*Added by Abheesh*/\r\n return globalSearchData;\r\n },\r\n getShipTotal: function(){\r\n return totalShipments;\r\n },\r\n setResultsCount: function(num) {\r\n data.results_count = num;\r\n },\r\n setResultsFiltered: function(bool) {\r\n data.results_filtered = bool;\r\n },\r\n getQueryState: function() { return queryState;},\r\n queryShipments: queryShipments,\r\n getPins: function(){\r\n return pins;\r\n },\r\n\r\n getAction_board_Data : getAction_board_Data,\r\n autoComplete: autoComplete\r\n\r\n };\r\n\r\n function getAction_board_Data(deliverDate){\r\n var deferred = deferred || $q.defer();\r\n return $http.get(api.url_v2 + '/action_board?delivery_date='+deliverDate, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n return response.data;\r\n }, function onError(response){\r\n return response.status;\r\n });\r\n }\r\n\r\n\r\n\r\n }\r\n\r\n\r\n\r\n\r\n})();\r\n\r\n\r\n// 'servicetype': '',\r\n// 'shipdate': '11-AUG-08',\r\n// 'consigneeaddress4': '',\r\n// 'shipperaddress1': '1234 MAIN',\r\n// 'shipperaddress2': '',\r\n// 'shipperaddress3': '',\r\n// 'shipperaddress4': '',\r\n// 'consigneeaddress1': '1234 MAIN',\r\n// 'consigneeaddress2': '',\r\n// 'consigneeaddress3': '',\r\n// 'jobunid': '100',\r\n// 'departuredate': '',\r\n// 'shipperzipcode': '30033',\r\n// 'shippername': 'test customer',\r\n// 'customername': 'test customer',\r\n// 'bookingnumber': '',\r\n// 'consigneezipcode': '30033',\r\n// 'consigneename': 'test customer',\r\n// 'servicetypecode': '',\r\n// 'gshpid': 'g0000000000000000094',\r\n// 'shipperpartyid': 'testcustom',\r\n// 'awb': 'h00030',\r\n// 'origin': 'dallas ft. worth',\r\n// 'destination': '',\r\n// 'totalchargeableweight': '',\r\n// 'consigneepartyid': 'testcustom',\r\n// 'businesstype': 'air export',\r\n// 'consigneecity': 'atlanta',\r\n// 'totalgrossweight': '',\r\n// 'consigneecountry': 'united states',\r\n// 'customergroup': '',\r\n// 'totalpieces': '',\r\n// 'duedate': '',\r\n// 'shippercity': 'atlanta',\r\n// 'servicelevelcode': '',\r\n// 'customerpartyid': 'testcustom',\r\n// 'servicelevel': ''\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .config(routerConfig);\r\n\r\n /* @ngInject */\r\n function routerConfig($stateProvider, menuGroups) {\r\n $stateProvider\r\n \r\n .state('track-trace', {\r\n url: '/track-trace?potential',\r\n templateUrl: '/app/track-trace/track-trace.html',\r\n controller: 'TrackTraceController',\r\n controllerAs: 'trackTraceCtrl',\r\n title: 'Track & Trace',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTrace\r\n }\r\n })\r\n\r\n .state('track-trace-booking', {\r\n url: '/track-trace-booking?potential',\r\n templateUrl: '/app/track-trace/track-trace.html',\r\n controller: 'TrackTraceController',\r\n controllerAs: 'trackTraceCtrl',\r\n title: 'Booking',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceBooking\r\n }\r\n })\r\n .state('track-trace-action-board', {\r\n url: '/track-trace-action-board',\r\n // templateUrl: '/app/track-trace/action-board/action-board.html',\r\n templateUrl: '/app/track-trace/action-board/action-board-new.html',\r\n controller: 'ActionBoardController',\r\n controllerAs: 'actionBoardCtrl',\r\n title: 'ActionBoard',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceActionBoard\r\n }\r\n }) \r\n\t .state('track-trace-transit', {\r\n url: '/track-trace-transit?potential',\r\n templateUrl: '/app/track-trace/track-trace.html',\r\n controller: 'TrackTraceController',\r\n controllerAs: 'trackTraceCtrl',\r\n title: 'In-Transit',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceInTransit\r\n }\r\n }) \r\n\r\n .state('track-trace-cfs', {\r\n url: '/track-trace-cfs?potential',\r\n templateUrl: '/app/track-trace/track-trace-cfs/track-trace-cfs.html',\r\n controller: 'TrackTraceCfsController',\r\n controllerAs: 'trackTraceCfsCtrl',\r\n title: 'Track & Trace',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceCfs\r\n }\r\n })\r\n .state('track-trace-cmts', {\r\n url: '/track-trace-cmts?potential',\r\n templateUrl: '/app/track-trace/track-trace-cmts/track-trace-cmts.html',\r\n controller: 'TrackTraceCmtsController',\r\n controllerAs: 'trackTraceCmtsCtrl',\r\n title: 'Track & Trace',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceCmts\r\n }\r\n })\r\n .state('track-trace-csl', {\r\n url: '/track-trace-csl?potential',\r\n templateUrl: '/app/track-trace/track-trace-csl/track-trace-csl.html',\r\n controller: 'TrackTraceCslController',\r\n controllerAs: 'trackTraceCslCtrl',\r\n title: 'Track & Trace',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceCsl\r\n }\r\n });\r\n\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.showAdvSearch\r\n * @description to display the advanced search md-dialog\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.showCustomizeResults\r\n * @description to display the customize results md-dialog\r\n * @param {$event} - md-button triggered event\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name TrackTraceController.selectRange\r\n * @description sets quick search fields to a preselected range of dates\r\n * @param {$event} - md-select ng-change triggered event\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.getActiveShipments\r\n * @description queries the database for shipments that are UNDELIVERED and active now\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.getShipments\r\n * @description gets the shipments from TrackTraceService\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.hideLoadAnimation\r\n * @description hides the load animation\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.quickSearch\r\n * @description makes the query for a quick search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.search\r\n * @description runs the search from AdvSearchService\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.showAdvSearch\r\n * @description shows the advance search modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.showCustomizeResults\r\n * @description shows the customize results modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.showLoadAnimation\r\n * @description shows the load animation\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.showNoShippmentsAlert\r\n * @description shows an alert when there is no shippents back from the query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.toggleLimitOptions\r\n * @description toggles how many shipments are shown\r\n */\r\n\r\n (function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .controller('TrackTraceController', TrackTraceController);\r\n\r\n /** @ngInject */\r\n TrackTraceController.$inject = ['$scope','mdSelectHelper', 'TrackTraceService','UserService', 'CustomResultsService', 'AdvSearchService', \"ServerTableService\", '$log', '$filter', '$translatePartialLoader', '$mdDialog', '$mdMedia', '$location', '$http', \"$stateParams\", \"$state\", '$q', '$translate', 'ContactsService', 'permissions','TrackTracePaginationService'];\r\n function TrackTraceController($scope,mdSelectHelper, TrackTraceService, UserService, CustomResultsService, AdvSearchService, ServerTableService, $log, $filter ,$translatePartialLoader, $mdDialog, $mdMedia, $location, $http, $stateParams, $state, $q, $translate, ContactsService, permissions, TrackTracePaginationService) {\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('tracktrace');\r\n\r\n //variables\r\n var vm = this;\r\n vm.data;\r\n vm.loading = false; //flag to activate the loading screen\r\n vm.loadingState = ServerTableService.getState(); //flag to activate the module loading screen\r\n vm.due_start_date = null;\r\n vm.due_end_date = null;\r\n vm.eta_start_date = null;\r\n vm.eta_end_date = null;\r\n vm.etd_start_date = null;\r\n vm.etd_end_date = null;\r\n vm.ship_start_date = null;\r\n vm.ship_end_date = null;\r\n vm.estimated_start_date = null;\r\n vm.estimated_end_date = null;\r\n vm.isAwbBolQuickSearch = false;\r\n vm.quickFilters = [];\r\n vm.isFilteredOut = {active: false, potential: false, exception: false};\r\n vm.isFilterActive = {active: false, potential: false, exception: false}; // fricken angular..no why would I want to || something in a view?!\r\n //vm.isFilterLoading = {active: false, potential: false, exception: false};\r\n\r\n vm.queryState = TrackTraceService.getQueryState();//.isFilterLoading = TrackTraceService.getFilterLoading();\r\n\r\n // Set initial search type to reference number\r\n vm.searchType = 'reference_number';\r\n vm.dueDateRangeSelect = null;\r\n vm.shipDateRangeSelect = null;\r\n vm.estimatedDateRangeSelect = null;\r\n vm.selectedStatus = null;\r\n vm.selectedOrigin = null;\r\n vm.searchOriginText = null;\r\n vm.selectedDestination = null;\r\n vm.searchDestinationText = null;\r\n vm.hasExportPermissions = UserService.canAccess(permissions.shipment.export);\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n\r\n vm.minDate = \"'\" + (moment().subtract(13, 'months').format('YYYY-MM-DD')) + \"'\";\r\n vm.filterLabels = {\r\n active: 'TRACKTRACE.FILTER',\r\n exception: 'TRACKTRACE.FILTER',\r\n potential: 'TRACKTRACE.FILTER',\r\n }\r\n\r\n // Quarter math\r\n var quarterAdjustment= (moment().month() % 3) + 1;\r\n var lastQuarterEndDate = moment().subtract({ months: quarterAdjustment }).endOf('month');\r\n var lastQuarterStartDate = lastQuarterEndDate.clone().subtract({ months: 2 }).startOf('month');\r\n\r\n // Set up predetermined ranges for user to select from\r\n vm.ranges = [\r\n {\r\n name: 'Last Year',\r\n start: moment().subtract(1, 'y'),\r\n end: moment()\r\n },\r\n {\r\n name: 'Last Quarter',\r\n start: lastQuarterStartDate,\r\n end: lastQuarterEndDate\r\n },\r\n {\r\n name: 'Last Month',\r\n start: moment().subtract({ months: 1 }).startOf('month'),\r\n end: moment().subtract({ months: 1 }).endOf('month'),\r\n }\r\n ];\r\n\r\n vm.statusList = [\r\n { id: 0, value: 'UNDELIVERED' },\r\n { id: 1, value: 'DELIVERED' }\r\n ];\r\n\r\n // Functions\r\n vm.filter = filter;\r\n // vm.isFiltered = isFiltered;\r\n vm.getActiveShipments = getActiveShipments;\r\n vm.getShipment = getShipment;\r\n vm.getShipments = getShipments;\r\n vm.hideLoadAnimation = hideLoadAnimation;\r\n vm.quickSearch = quickSearch;\r\n // vm.search = search;\r\n vm.showCustomizeResults = showCustomizeResults;\r\n vm.showLoadAnimation = showLoadAnimation;\r\n vm.showNoShippmentsAlert = showNoShippmentsAlert;\r\n vm.toggleLimitOptions = toggleLimitOptions;\r\n vm.showExportCSV = showExportCSV;\r\n vm.selectRange = selectRange;\r\n vm.dateChanged = dateChanged;\r\n vm.visualize = visualize;\r\n vm.refresh = function(){ServerTableService.reloadTable()};\r\n vm.hardRefresh = hardRefresh;\r\n\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.onSelectClose = mdSelectHelper.onSelectClose;\r\n vm.getMatch = getMatch;\r\n\r\n vm.searchChange = searchChange;\r\n vm.bookingMode = false;\r\n vm.transitMode = false;\r\n vm.booking_number_quick_search = false;\r\n vm.link = '/track-trace';\r\n\r\n /* Run Setup services */\r\n vm.getShipments();\r\n vm.queryVal = '';\r\n AdvSearchService.getSearch();\r\n ContactsService.setSubjectStatuses({trackTrace: {exceptions: false, results: true}});\r\n\r\n /** Customize Results Call **/\r\n vm.customFullscreen = $mdMedia('xs') || $mdMedia('sm');\r\n\r\n $scope.$on('$locationChangeStart',function(evt, absNewUrl, absOldUrl) {\r\n\r\n if((absNewUrl.search('/shipping-details/') == -1) && (absNewUrl.search('track-trace') == -1)){\r\n localStorage.removeItem('shipment_page_from');\r\n }\r\n\r\n });\r\n\r\n switch ($state.current.name){\r\n\r\n case 'track-trace-booking' :\r\n\r\n vm.bookingMode = true;\r\n vm.transitMode = false;\r\n vm.heading_text = \"Booking\";\r\n vm.booking_number_quick_search = true;\r\n vm.searchType = 'booking_number';\r\n vm.link = '/track-trace-booking';\r\n localStorage.setItem('shipment_page_from', 'Booking');\r\n\r\n break;\r\n\r\n case 'track-trace-transit' :\r\n\r\n vm.bookingMode = false;\r\n vm.transitMode = true;\r\n vm.heading_text = \"In-Transit\";\r\n vm.link = '/track-trace-transit';\r\n localStorage.setItem('shipment_page_from', 'In-Transit');\r\n\r\n vm.statusList = [\r\n { id: 0, value: 'UNDELIVERED' }\r\n ];\r\n\r\n break;\r\n\r\n default:\r\n vm.bookingMode = false;\r\n vm.transitMode = false;\r\n vm.heading_text = \"Track & Trace\";\r\n vm.link = '/track-trace';\r\n localStorage.setItem('shipment_page_from', 'Track & Trace');\r\n }\r\n\r\n //For Booking and In-Transit page.\r\n var queries = $location.search();\r\n\r\n var page_number = 1;\r\n\r\n if(UserService.getUserTableSettings()){\r\n var per_page = UserService.getUserTableSettings();\r\n }else{\r\n var per_page = 10;\r\n }\r\n\r\n TrackTracePaginationService.save_page_number(page_number);\r\n TrackTracePaginationService.save_per_page(per_page);\r\n\r\n if($state.current.name == 'track-trace-booking'){\r\n\r\n queries.status = '3';\r\n queries.page = page_number;\r\n queries.per_page = per_page;\r\n\r\n $location.search(queries);\r\n\r\n }\r\n\r\n if($state.current.name == 'track-trace-transit'){\r\n\r\n queries.status = '0';\r\n queries.page = page_number;\r\n queries.per_page = per_page;\r\n\r\n $location.search(queries);\r\n\r\n }\r\n\r\n if($state.current.name == 'track-trace'){\r\n\r\n var searchParamsCount = 0;\r\n\r\n for(var test in queries){\r\n\r\n if(test){\r\n searchParamsCount += 1;\r\n }\r\n\r\n }\r\n\r\n queries.page = page_number;\r\n queries.per_page = per_page;\r\n\r\n var newParams = {};\r\n\r\n angular.forEach(queries, function(obj, key) {\r\n\r\n if(obj){\r\n newParams[key] = obj;\r\n }\r\n\r\n });\r\n\r\n if(searchParamsCount <= 0 ){\r\n\r\n var currentSearchFields = JSON.parse(AdvSearchService.getLastSearchLocally());\r\n\r\n if(currentSearchFields){\r\n\r\n angular.forEach(Object.keys(currentSearchFields), function(k) {\r\n\r\n if (currentSearchFields[k].value) {\r\n newParams[k] = currentSearchFields[k].value;\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n $location.search(newParams);\r\n\r\n }\r\n\r\n\r\n\r\n // see if we have paramters in the toolbar\r\n var paramSearchFields = AdvSearchService.getEmptySearchFields(),\r\n foundParamSearch = false,\r\n disableUrlReplacement = false;\r\n angular.forEach(paramSearchFields, function(obj, key) {\r\n var v = $location.search()[key] || $location.search()[key + \"[]\"];\r\n //debugger;\r\n if (v !== undefined) {\r\n\r\n foundParamSearch = true;\r\n if(key.includes('date')){\r\n paramSearchFields[key].value = moment(v).format('MMM DD YYYY');\r\n } else {\r\n //For some reason when filtering by ?status=0 via the active shipments widgets\r\n // the param is not being set as part of the search params\r\n paramSearchFields[key].value = v === 0 ? v.toString() : v;\r\n }\r\n }\r\n\r\n });\r\n\r\n if ($stateParams.potential){\r\n var searchFields = AdvSearchService.getEmptySearchFields();\r\n searchFields.potential_exception_id.value = $stateParams.potential;\r\n AdvSearchService.setCurrentSearchFields(searchFields);\r\n }\r\n\r\n if (foundParamSearch || $stateParams.potential) {\r\n disableUrlReplacement = true;\r\n AdvSearchService.setCurrentSearchFields(paramSearchFields, true);\r\n if ($location.search()['current_exception']) {\r\n filter('exception', true);\r\n }\r\n else if ($location.search()['potential_exception']){\r\n filter('potential', true);\r\n }\r\n // else {\r\n // vm.search({});\r\n // }\r\n disableUrlReplacement = false;\r\n }\r\n // no URLsearch parameters\r\n else {\r\n //load the default search if there is one\r\n AdvSearchService.listSavedSearches().then(function(res){\r\n var isSavedSearch = res['data'].length > 0;\r\n // var searchFields = JSON.parse(localStorage.getItem(\"query\"));\r\n // AdvSearchService.setCurrentSearchFields(searchFields);\r\n var savedSearch = localStorage.getItem('clearadvancedsearch');\r\n if( AdvSearchService.getIsFirstSearch() && isSavedSearch && savedSearch!= \"null\") { //if there is a default search\r\n AdvSearchService.loadSearch((res['data'])['0'].id).then(function(res) {\r\n var searchFields = AdvSearchService.getCurrentSearchFields();\r\n var data = res['data'];\r\n for (var field in searchFields) {\r\n if(data[field] != null) searchFields[field].value = data[field];\r\n }\r\n AdvSearchService.setCurrentSearchFields(searchFields);\r\n // vm.search({});\r\n AdvSearchService.setIsFirstSearch(false); //Not the first search anymore\r\n });\r\n } else if(AdvSearchService.getLastSearchLocally() && savedSearch!= \"null\") { //run the last saved search\r\n // debugger;\r\n AdvSearchService.setCurrentSearchFields(JSON.parse(AdvSearchService.getLastSearchLocally()));\r\n setFilterButtons(); //sets the top filter buttons if there is one in the searchFields\r\n } else { //else run the normal search\r\n // vm.search({});\r\n setFilterButtons(); //sets the top filter buttons if there is one in the searchFields\r\n }\r\n });\r\n }\r\n\r\n function getMatch(key,query){\r\n if(query != undefined && query != null) {\r\n return TrackTraceService.autoComplete({field:key , value: query});\r\n }\r\n }\r\n\r\n function searchChange(searchType){\r\n\r\n vm.searchDestinationText = '';\r\n vm.searchOriginText = '';\r\n vm.queryVal = '';\r\n vm.selectedStatus = null;\r\n\r\n //due date\r\n vm.dueRangeIsSelected = false;\r\n vm.dueDateRangeSelect = null;\r\n vm.due_start_date = null;\r\n vm.due_end_date = null;\r\n vm.due_start_date_new = null;\r\n vm.due_end_date_new = null;\r\n\r\n //eta date\r\n vm.etaRangeIsSelected = false;\r\n vm.etaDateRangeSelect = null;\r\n vm.eta_start_date = null;\r\n vm.eta_end_date = null;\r\n vm.eta_start_date_new = null;\r\n vm.eta_end_date_new = null;\r\n\r\n //etd date\r\n vm.etdRangeIsSelected = false;\r\n vm.etdDateRangeSelect = null;\r\n vm.etd_start_date = null;\r\n vm.etd_end_date = null;\r\n vm.etd_start_date_new = null;\r\n vm.etd_end_date_new = null;\r\n\r\n //ship date\r\n vm.shipRangeIsSelected = false;\r\n vm.shipDateRangeSelect = null;\r\n vm.ship_start_date = null;\r\n vm.ship_end_date = null;\r\n vm.ship_start_date_new = null;\r\n vm.ship_end_date_new = null;\r\n\r\n //estimated date\r\n vm.estimatedRangeIsSelected = false;\r\n vm.estimatedDateRangeSelect = null;\r\n vm.estimated_start_date = null;\r\n vm.estimated_end_date = null;\r\n vm.estimated_start_date_new = null;\r\n vm.estimated_end_date_new = null;\r\n\r\n angular.element(document.querySelectorAll('.clear-fields')).val('');\r\n\r\n vm.searchType = searchType;\r\n }\r\n\r\n function visualize() {\r\n $location.url($location.url().replace('track-trace', 'track-trace/viz'));\r\n }\r\n\r\n function hardRefresh(keyCodeString){\r\n var hardRefreshCodes = ['116-shiftKey', '82-metaKey-shiftKey', '116-ctrlKey'];\r\n\r\n // hard_refresh_codes.forEach(function(val){\r\n // var key_arr = val.split('-');\r\n // var key = key_arr.shift();\r\n // var modifiers_pressed = eval(key_arr.map(\r\n // function(val){return event[val]}).join(' & '));\r\n\r\n if (hardRefreshCodes.includes(keyCodeString)) {\r\n event.preventDefault();\r\n localStorage.setItem('invalidateCache', true);\r\n location.reload(true);\r\n\r\n }\r\n\r\n }\r\n\r\n function selectRange() {\r\n if (vm.searchType == 'due_date') {\r\n vm.dueRangeIsSelected = true;\r\n // Reset other search values\r\n vm.shipDateRangeSelect = null;\r\n vm.ship_start_date = null;\r\n vm.ship_end_date = null;\r\n vm.ship_start_date_new = null;\r\n vm.ship_end_date_new = null;\r\n\r\n vm.estimatedDateRangeSelect = null;\r\n vm.estimated_start_date = null;\r\n vm.estimated_end_date = null;\r\n vm.estimated_start_date_new = null;\r\n vm.estimated_end_date_new = null;\r\n\r\n\r\n vm.etaDateRangeSelect = null;\r\n vm.eta_start_date = null;\r\n vm.eta_end_date = null;\r\n vm.eta_start_date_new = null;\r\n vm.eta_end_date_new = null;\r\n\r\n vm.etdDateRangeSelect = null;\r\n vm.etd_start_date = null;\r\n vm.etd_end_date = null;\r\n vm.etd_start_date_new = null;\r\n vm.etd_end_date_new = null;\r\n\r\n var range = JSON.parse(vm.dueDateRangeSelect);\r\n\r\n vm.due_start_date = new Date(range.start);\r\n vm.due_end_date = new Date(range.end);\r\n\r\n vm.due_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.due_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n }\r\n else if (vm.searchType == 'pod_eta_date') {\r\n vm.etaRangeIsSelected = true;\r\n // Reset other search values\r\n vm.shipDateRangeSelect = null;\r\n vm.ship_start_date = null;\r\n vm.ship_end_date = null;\r\n vm.ship_start_date_new = null;\r\n vm.ship_end_date_new = null;\r\n\r\n vm.estimatedDateRangeSelect = null;\r\n vm.estimated_start_date = null;\r\n vm.estimated_end_date = null;\r\n vm.estimated_start_date_new = null;\r\n vm.estimated_end_date_new = null;\r\n\r\n\r\n vm.dueDateRangeSelect = null;\r\n vm.due_start_date = null;\r\n vm.due_end_date = null;\r\n vm.due_start_date_new = null;\r\n vm.due_end_date_new = null;\r\n\r\n vm.etdDateRangeSelect = null;\r\n vm.etd_start_date = null;\r\n vm.etd_end_date = null;\r\n vm.etd_start_date_new = null;\r\n vm.etd_end_date_new = null;\r\n\r\n var range = JSON.parse(vm.etaDateRangeSelect);\r\n\r\n vm.eta_start_date = new Date(range.start);\r\n vm.eta_end_date = new Date(range.end);\r\n\r\n vm.eta_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.eta_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n }else if (vm.searchType == 'pol_etd_date') {\r\n vm.etaRangeIsSelected = true;\r\n // Reset other search values\r\n vm.shipDateRangeSelect = null;\r\n vm.ship_start_date = null;\r\n vm.ship_end_date = null;\r\n vm.ship_start_date_new = null;\r\n vm.ship_end_date_new = null;\r\n\r\n vm.estimatedDateRangeSelect = null;\r\n vm.estimated_start_date = null;\r\n vm.estimated_end_date = null;\r\n vm.estimated_start_date_new = null;\r\n vm.estimated_end_date_new = null;\r\n\r\n\r\n vm.dueDateRangeSelect = null;\r\n vm.due_start_date = null;\r\n vm.due_end_date = null;\r\n vm.due_start_date_new = null;\r\n vm.due_end_date_new = null;\r\n\r\n\r\n\r\n var range = JSON.parse(vm.etdDateRangeSelect);\r\n\r\n vm.etd_start_date = new Date(range.start);\r\n vm.etd_end_date = new Date(range.end);\r\n\r\n vm.etd_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.etd_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n }\r\n\r\n else if (vm.searchType == 'ship_date') {\r\n vm.shipRangeIsSelected = true;\r\n // Reset other search values\r\n vm.dueDateRangeSelect = null;\r\n vm.due_start_date = null;\r\n vm.due_end_date = null;\r\n vm.due_start_date_new = null;\r\n vm.due_end_date_new = null;\r\n\r\n vm.estimatedDateRangeSelect = null;\r\n vm.estimated_start_date = null;\r\n vm.estimated_end_date = null;\r\n vm.estimated_start_date_new = null;\r\n vm.estimated_end_date_new = null;\r\n\r\n vm.etaDateRangeSelect = null;\r\n vm.eta_start_date = null;\r\n vm.eta_end_date = null;\r\n vm.eta_start_date_new = null;\r\n vm.eta_end_date_new = null;\r\n\r\n vm.etdDateRangeSelect = null;\r\n vm.etd_start_date = null;\r\n vm.etd_end_date = null;\r\n vm.etd_start_date_new = null;\r\n vm.etd_end_date_new = null;\r\n\r\n var range = JSON.parse(vm.shipDateRangeSelect);\r\n\r\n vm.ship_start_date = new Date(range.start);\r\n vm.ship_end_date = new Date(range.end);\r\n\r\n vm.ship_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.ship_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n }\r\n\r\n else {\r\n vm.estimatedRangeIsSelected = true;\r\n // Reset other search values\r\n vm.dueDateRangeSelect = null;\r\n vm.due_start_date = null;\r\n vm.due_end_date = null;\r\n vm.due_start_date_new = null;\r\n vm.due_end_date_new = null;\r\n\r\n vm.shipDateRangeSelect = null;\r\n vm.ship_start_date = null;\r\n vm.ship_end_date = null;\r\n vm.ship_start_date_new = null;\r\n vm.ship_end_date_new = null;\r\n\r\n // vm.etaDateRangeSelect = null;\r\n // vm.eta_start_date = null;\r\n // vm.eta_end_date = null;\r\n // vm.eta_start_date_new = null;\r\n // vm.eta_end_date_new = null;\r\n\r\n var range = JSON.parse(vm.estimatedDateRangeSelect);\r\n\r\n vm.estimated_start_date = new Date(range.start);\r\n vm.estimated_end_date = new Date(range.end);\r\n\r\n vm.estimated_start_date_new = moment(range.start).format('YYYY-MM-DD');\r\n vm.estimated_end_date_new = moment(range.end).format('YYYY-MM-DD');\r\n\r\n }\r\n }\r\n\r\n function dateChanged() {\r\n if(vm.shipRangeIsSelected) {\r\n vm.shipDateRangeSelect = '';\r\n vm.shipRangeIsSelected = false;\r\n vm.estimatedDateRangeSelect = '';\r\n vm.estimatedRangeIsSelected = false;\r\n }\r\n if(vm.dueRangeIsSelected) {\r\n vm.dueDateRangeSelect = '';\r\n vm.dueRangeIsSelected = false;\r\n vm.estimatedDateRangeSelect = '';\r\n vm.estimatedRangeIsSelected = false;\r\n }\r\n\r\n\r\n if(vm.etaRangeIsSelected) {\r\n vm.etaDateRangeSelect = '';\r\n vm.etaRangeIsSelected = false;\r\n vm.estimatedDateRangeSelect = '';\r\n vm.estimatedRangeIsSelected = false;\r\n }\r\n if(vm.etdRangeIsSelected) {\r\n vm.etdDateRangeSelect = '';\r\n vm.etdRangeIsSelected = false;\r\n vm.estimatedDateRangeSelect = '';\r\n vm.estimatedRangeIsSelected = false;\r\n }\r\n\r\n if (vm.estimatedRangeIsSelected){\r\n vm.shipDateRangeSelect = '';\r\n vm.shipRangeIsSelected = false;\r\n vm.dueDateRangeSelect = '';\r\n vm.dueRangeIsSelected = false;\r\n }\r\n }\r\n\r\n function toggleLimitOptions() {\r\n vm.limitOptions = vm.limitOptions ? undefined : [10, 25, 50];\r\n }\r\n\r\n //function to display alert if there are now shipments form the search\r\n function showNoShippmentsAlert() {\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.querySelector('#popupContainer')))\r\n .clickOutsideToClose(true)\r\n .title('No shipment Results!')\r\n .textContent('Try a different search to get more results.')\r\n .ariaLabel('Alert Dialog Demo')\r\n .ok('Got it!')\r\n );\r\n }\r\n\r\n // function isFiltered(type) {\r\n // if (vm.quickFilters.length > 0) {\r\n // if (vm.quickFilters.indexOf(type) !== -1) {\r\n // return true;\r\n // } else {\r\n // return false;\r\n // }\r\n // } else {\r\n // return true;\r\n // }\r\n // }\r\n\r\n function filter(type, disableUrlReplacement){\r\n vm.quickFilters = [];\r\n var searchFields = angular.copy(AdvSearchService.getCurrentSearchFields());\r\n\r\n // only allow one filter at a time\r\n searchFields.quick_filter.value.length = 0;\r\n\r\n switch (type){\r\n case \"exception\":\r\n if (vm.filterLabels.exception == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('exception');\r\n searchFields.quick_filter.value.push(\"exception\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n // var index = searchFields.quick_filter.value.indexOf('exception');\r\n // if(index > -1) {\r\n // searchFields.quick_filter.value.splice(index, 1);\r\n // }\r\n }\r\n break;\r\n case \"potential\":\r\n if (vm.filterLabels.potential == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('potential');\r\n searchFields.quick_filter.value.push(\"potential\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n // var index = searchFields.quick_filter.value.indexOf('potential');\r\n // if(index > -1) {\r\n // searchFields.quick_filter.value.splice(index, 1);\r\n // }\r\n }\r\n break;\r\n case \"active\":\r\n if (vm.filterLabels.active == 'TRACKTRACE.FILTER') {\r\n setFilterDisplayWithActiveFilter('active');\r\n searchFields.quick_filter.value.push(\"active\");\r\n } else {\r\n setFilterDisplayWithActiveFilter(false);\r\n // var index = searchFields.quick_filter.value.indexOf('active');\r\n // if(index > -1) {\r\n // searchFields.quick_filter.value.splice(index, 1);\r\n // }\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n vm.quickFilters = searchFields.quick_filter.value;\r\n AdvSearchService.setCurrentSearchFields(searchFields, disableUrlReplacement);\r\n vm.queryState.isFilterLoading[type] = true;\r\n }\r\n\r\n //sets the attributes of a filtered search\r\n function setFilterDisplayWithActiveFilter(filteredType) {\r\n var isActive = filteredType == 'active',\r\n isException = filteredType == 'exception',\r\n isPotentialException = filteredType == 'potential';\r\n\r\n vm.filterLabels.active = isActive ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n vm.filterLabels.exception = isException ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n vm.filterLabels.potential = isPotentialException ? 'TRACKTRACE.UNFILTER': 'TRACKTRACE.FILTER';\r\n\r\n vm.isFilteredOut.active = !isActive && filteredType;\r\n vm.isFilteredOut.exception = !isException && filteredType;\r\n vm.isFilteredOut.potential = !isPotentialException && filteredType;\r\n\r\n vm.isFilterActive.active = isActive;\r\n vm.isFilterActive.exception = isException;\r\n vm.isFilterActive.potential = isPotentialException;\r\n }\r\n\r\n //sets the filter buttons on first time track and trace came in\r\n function setFilterButtons() {\r\n var searchFields = AdvSearchService.getCurrentSearchFields();\r\n\r\n if(searchFields != undefined){\r\n searchFields.quick_filter.value.forEach(function(filterType) {\r\n setFilterDisplayWithActiveFilter(filterType);\r\n }, this);\r\n }\r\n\r\n }\r\n\r\n function getActiveColumns(){\r\n return CustomResultsService.getActiveColumns();\r\n }\r\n\r\n function getShipments(){\r\n vm.data = TrackTraceService.getShipments();\r\n }\r\n\r\n function getActiveShipments(){\r\n var searchFields = angular.copy(AdvSearchService.getCurrentSearchFields());\r\n for (var field in searchFields) {\r\n searchFields[field].value = \"\"; //reset the fields\r\n }\r\n searchFields.status.value = \"1\"; //set the status for active shipments\r\n AdvSearchService.setCurrentSearchFields(searchFields);\r\n }\r\n\r\n function getShipment(shipment, event){\r\n if (event.button == 1) return; // ignore middle clicks\r\n if (event.target && event.target.tagName && event.target.tagName.toLowerCase() === 'a') return; // ignore clicks on the links\r\n window.open(\"/shipping-details/\"+shipment.gshpid);\r\n }\r\n\r\n var searchTimeoutPromise = false;\r\n\r\n // function search(query){\r\n // // vm.queryState.showLoading = true;\r\n // // AdvSearchService.search(query, searchTimeoutPromise);\r\n\r\n // // if(vm.isAwbBolQuickSearch && result.length == 1) { //if only one shipment and searched with AWB/BOL redirect them to the details\r\n // // $location.url('/shipping-details/' + result[0].gshpid);\r\n // // vm.isAwbBolQuickSearch = false;\r\n // // }\r\n // }\r\n\r\n function quickSearch(query){\r\n var searchFields = angular.copy(AdvSearchService.getEmptySearchFields());\r\n console.log('searchFields',query);\r\n\r\n if(vm.due_start_date){\r\n vm.due_start_date_new = moment(vm.due_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.due_end_date){\r\n vm.due_end_date_new = moment(vm.due_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.eta_start_date){\r\n vm.eta_start_date_new = moment(vm.eta_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.eta_end_date){\r\n vm.eta_end_date_new = moment(vm.eta_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.etd_start_date){\r\n vm.etd_start_date_new = moment(vm.etd_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.etd_end_date){\r\n vm.etd_end_date_new = moment(vm.etd_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.ship_start_date){\r\n vm.ship_start_date_new = moment(vm.ship_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.ship_end_date){\r\n vm.ship_end_date_new = moment(vm.ship_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.estimated_start_date){\r\n vm.estimated_start_date_new = moment(vm.estimated_start_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.estimated_end_date){\r\n vm.estimated_end_date_new = moment(vm.estimated_end_date).format('YYYY-MM-DD');\r\n }\r\n\r\n if(vm.searchType == 'due_date') { //if its a due date add the inputs filtered to dates\r\n if (vm.due_start_date_new) {\r\n searchFields['due_date_from'].value = vm.due_start_date_new;\r\n }\r\n if (vm.due_end_date_new) {\r\n searchFields['due_date_to'].value = vm.due_end_date_new;\r\n }\r\n }\r\n\r\n else if(vm.searchType == 'pod_eta_date') {\r\n //if its a eta date add the inputs filtered to dates\r\n if (vm.eta_start_date_new) {\r\n searchFields['pod_eta_date_from'].value = vm.eta_start_date_new;\r\n }\r\n if (vm.eta_end_date_new) {\r\n searchFields['pod_eta_date_to'].value = vm.eta_end_date_new;\r\n }\r\n }\r\n else if(vm.searchType == 'pol_etd_date') {\r\n //if its a etd date add the inputs filtered to dates\r\n if (vm.etd_start_date_new) {\r\n searchFields['pol_etd_date_from'].value = vm.etd_start_date_new;\r\n }\r\n if (vm.etd_end_date_new) {\r\n searchFields['pol_etd_date_to'].value = vm.etd_end_date_new;\r\n }\r\n }\r\n else if(vm.searchType == 'ship_date') {\r\n if (vm.ship_start_date_new) {\r\n searchFields['ship_date_from'].value = vm.ship_start_date_new;\r\n }\r\n if (vm.ship_end_date_new) {\r\n searchFields['ship_date_to'].value = vm.ship_end_date_new;\r\n }\r\n }\r\n\r\n else if(vm.searchType == 'estimated_date') {\r\n if (vm.estimated_start_date_new) {\r\n searchFields['estimated_date_from'].value = vm.estimated_start_date_new;\r\n }\r\n if (vm.estimated_end_date_new) {\r\n searchFields['estimated_date_to'].value = vm.estimated_end_date_new;\r\n }\r\n }\r\n else { //otherwise it is one of the other quick searches\r\n searchFields[vm.searchType].value = query;\r\n if(vm.searchType == 'bol_number') {\r\n vm.isAwbBolQuickSearch = true;\r\n }\r\n }\r\n\r\n if(vm.bookingMode){\r\n searchFields['status'].value = 3;\r\n }\r\n\r\n if(vm.transitMode){\r\n searchFields['status'].value = 0;\r\n }\r\n\r\n if (vm.searchType == 'status') {\r\n switch (vm.selectedStatus) {\r\n case 'UNDELIVERED':\r\n searchFields['status'].value = 0;\r\n break;\r\n case 'DELIVERED':\r\n searchFields['status'].value = 1;\r\n break;\r\n }\r\n }\r\n\r\n if(vm.searchType == 'origin_code'){\r\n searchFields['origin_code'].value = vm.selectedOrigin.value;\r\n }\r\n\r\n if(vm.searchType == 'destination_code'){\r\n searchFields['destination_code'].value = vm.selectedDestination.value;\r\n }\r\n\r\n TrackTracePaginationService.save_page_number(1);\r\n TrackTracePaginationService.save_per_page(10);\r\n\r\n AdvSearchService.setCurrentSearchFields(searchFields);\r\n }\r\n\r\n function showExportCSV(ev){\r\n if (vm.queryState.displayNoResults) { return; }\r\n\r\n var params = ServerTableService.getParams();\r\n $scope.exportCsvLoaded = false;\r\n AdvSearchService.exportSearchFields([], params).then(function() {\r\n $scope.exportCsvLoaded = true;\r\n }).catch(function() {\r\n $mdDialog.hide();\r\n $mdDialog.show(\r\n $mdDialog.alert()\r\n .parent(angular.element(document.body))\r\n .clickOutsideToClose(true)\r\n .htmlContent($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ariaLabel($translate.instant('TRACKTRACE.ERROR_EXPORTING'))\r\n .ok('Ok')\r\n );\r\n });\r\n }\r\n\r\n // Show the advanced search md-dialog\r\n function showCustomizeResults(ev) {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/track-trace/customize-results/customize-results.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n vm.status = 'You said the information was \"' + answer + '\".';\r\n }, function() {\r\n vm.status = 'You cancelled the dialog.';\r\n });\r\n }\r\n\r\n // shows the loading animation\r\n function showLoadAnimation() {\r\n vm.loading = true;\r\n }\r\n\r\n //hides the loading animation\r\n function hideLoadAnimation(ev) {\r\n vm.loading = false;\r\n }\r\n }\r\n})();\r\n\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('TrackTracePaginationService', TrackTracePaginationService);\r\n\r\n /** @ngInject */\r\n TrackTracePaginationService.$inject = ['$http', '$log', 'api', '$q', '$timeout', 'AJAX','UserService' ];\r\n function TrackTracePaginationService($http, $log, api, $q, $timeout , AJAX, UserService) { \t\r\n \t\r\n \tvar vm = this;\r\n\r\n \tvm.page_number = 1;\r\n \tif(UserService.getUserTableSettings()){\r\n vm.per_page = UserService.getUserTableSettings();\r\n }else{\r\n vm.per_page = 10;\r\n }\r\n\t\tvm.sort_param = '';\r\n\tfunction get_page_number(){\r\n\t\treturn parseInt(vm.page_number);\r\n\t}\r\n\r\n\tfunction get_per_page(){\r\n\t\treturn parseInt(vm.per_page);\r\n\t}\r\n\tfunction get_sort_params(){\r\n\t\treturn vm.sort_param;\r\n\t}\r\n\tfunction save_sort_params(sortParam){\t\t\r\n\t\tvm.sort_param = sortParam;\r\n\t\treturn true;\t\t\r\n\t}\r\n\tfunction save_page_number(paginate){\t\t\r\n\t\tvm.page_number = paginate;\r\n\t\treturn true;\t\t\r\n\t}\r\n\r\n\tfunction save_per_page(paginate){\r\n\t\tvm.per_page = paginate;\r\n\t\tvm.page_number = 1;\r\n\t\treturn true;\r\n\t\t//$rootScope.page_number = $rootScope.page_number + 1;\r\n\t}\r\n\r\n\treturn{\r\n \t\tget_page_number: get_page_number,\r\n \t\tget_per_page: get_per_page,\r\n \t\tsave_page_number: save_page_number,\r\n\t\t\tsave_per_page: save_per_page,\r\n\t\t\tsave_sort_params : save_sort_params,\r\n\t\t\tget_sort_params : get_sort_params\r\n \t}\r\n \r\n \r\n }\r\n\r\n})();\r\n\r\n// 'servicetype': '',\r\n// 'shipdate': '11-AUG-08',\r\n// 'consigneeaddress4': '',\r\n// 'shipperaddress1': '1234 MAIN',\r\n// 'shipperaddress2': '',\r\n// 'shipperaddress3': '',\r\n// 'shipperaddress4': '',\r\n// 'consigneeaddress1': '1234 MAIN',\r\n// 'consigneeaddress2': '',\r\n// 'consigneeaddress3': '',\r\n// 'jobunid': '100',\r\n// 'departuredate': '',\r\n// 'shipperzipcode': '30033',\r\n// 'shippername': 'test customer',\r\n// 'customername': 'test customer',\r\n// 'bookingnumber': '',\r\n// 'consigneezipcode': '30033',\r\n// 'consigneename': 'test customer',\r\n// 'servicetypecode': '',\r\n// 'gshpid': 'g0000000000000000094',\r\n// 'shipperpartyid': 'testcustom',\r\n// 'awb': 'h00030',\r\n// 'origin': 'dallas ft. worth',\r\n// 'destination': '',\r\n// 'totalchargeableweight': '',\r\n// 'consigneepartyid': 'testcustom',\r\n// 'businesstype': 'air export',\r\n// 'consigneecity': 'atlanta',\r\n// 'totalgrossweight': '',\r\n// 'consigneecountry': 'united states',\r\n// 'customergroup': '',\r\n// 'totalpieces': '',\r\n// 'duedate': '',\r\n// 'shippercity': 'atlanta',\r\n// 'servicelevelcode': '',\r\n// 'customerpartyid': 'testcustom',\r\n// 'servicelevel': ''\r\n\n/**\r\n * @ngdoc directive\r\n * @name TrackTrace.loadAnimation\r\n * @description directive that is used for a full screen load animation\r\n * @restrict E\r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name TrackTrace.moduleLoadAnimation\r\n * @description directive that is used for a module load animation\r\n * @restrict E\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .directive('loadAnimation', loadAnimation)\r\n .directive('moduleLoadAnimation', moduleLoadAnimation)\r\n .directive('gbOverlay', gbOverlay);\r\n \r\n function loadAnimation() {\r\n var directive = {\r\n restrict: 'E',\r\n template: \"<md-dialog-content layout='column' layout-align='center center' class='load-background'>\" +\r\n \"<md-progress-circular ng-disabled='vm.yada' class='/*md-accent md-hue-3*/' md-diameter='100'></md-progress-circular>\" +\r\n \"</md-dialog-content>\"\r\n };\r\n\r\n return directive;\r\n }\r\n \r\n function moduleLoadAnimation() {\r\n var directive = {\r\n restrict: 'E',\r\n template: \"<md-dialog-content layout='column' layout-align='center center' class='load-background'>\" +\r\n \"<md-progress-circular ng-disabled='vm.yada' class='/*md-accent md-hue-3*/' md-diameter='65'></md-progress-circular>\" +\r\n \"</md-dialog-content>\"\r\n };\r\n\r\n return directive;\r\n }\r\n \r\n var DEFAULT_BACKDROP_COLOR = '#000',\r\n DEFAULT_BACKDROP_OPACITY = 0.1,\r\n DEFAULT_Z_INDEX = 10;\r\n\r\n function gbOverlay() { // Element directive\r\n return {\r\n restrict: 'E',\r\n transclude: true,\r\n scope: {\r\n condition:'&',\r\n backdrop:'&',\r\n zIndex:'&'\r\n },\r\n link: function(scope,element,attrs,controller,transcludeFn) {\r\n var overlayTarget = element.parent();\r\n var overlayWrapper = makeOverlayWrapper();\r\n var overlayContent = makeOverlayContent();\r\n var overlayBackground = makeOverlayBackground();\r\n overlayTarget.append(overlayWrapper);\r\n overlayWrapper.append(overlayBackground);\r\n overlayWrapper.append(overlayContent);\r\n \r\n transcludeFn(function(clone){\r\n overlayContent.append(clone);\r\n },overlayContent);\r\n \r\n scope.$watch('condition()',function(val) {\r\n if (val)\r\n overlayWrapper.css('display','block');\r\n else\r\n overlayWrapper.css('display','none');\r\n });\r\n scope.$watch('backdrop().opacity',function(val) {\r\n val = val || DEFAULT_BACKDROP_OPACITY;\r\n overlayBackground.css('opacity',val);\r\n });\r\n scope.$watch('backdrop().color',function(val) {\r\n val = val || DEFAULT_BACKDROP_COLOR;\r\n overlayBackground.css('background-color',val);\r\n });\r\n scope.$watch('zIndex()',function(val) {\r\n val = val || DEFAULT_Z_INDEX;\r\n overlayWrapper.css('z-index',val);\r\n });\r\n }\r\n };\r\n }\r\n\r\n var makeOverlayWrapper = function makeOverlayWrapper() {\r\n var overlayWrapper = angular.element('<div></div>');\r\n overlayWrapper.css('position','absolute');\r\n overlayWrapper.css('display','none');\r\n overlayWrapper.css('top','0');\r\n overlayWrapper.css('left','0');\r\n overlayWrapper.css('width','100%');\r\n overlayWrapper.css('height','100%');\r\n overlayWrapper.addClass('overlay-wrapper');\r\n overlayWrapper.css('text-align','center');\r\n return overlayWrapper;\r\n }\r\n var makeOverlayBackground = function makeOverlayBackground() {\r\n var overlayBackground = angular.element('<div></div>');\r\n overlayBackground.css('position','absolute');\r\n overlayBackground.css('display','block');\r\n overlayBackground.css('top','0');\r\n overlayBackground.css('left','0');\r\n overlayBackground.css('width','100%');\r\n overlayBackground.css('height','100%');\r\n return overlayBackground;\r\n }\r\n var makeOverlayContent = function makeOverlayContent() {\r\n var overlayContent = angular.element('<div></div>');\r\n overlayContent.css('display','inline-block');\r\n overlayContent.css('position','relative');\r\n overlayContent.css('top','50%');\r\n overlayContent.css('margin-left','auto');\r\n overlayContent.css('margin-right','auto');\r\n overlayContent.css('transform','translateY(-50%)');\r\n overlayContent.addClass('overlay-content');\r\n return overlayContent;\r\n }\r\n \r\n})();\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.calcArc\r\n * @description calculates the longitude and latitude from the addresses\r\n * @param {source_addr} - the source address\r\n * @param {destination_addr} - the destination address\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getLatLong\r\n * @description gets the longitude and latitude from the google api\r\n * @param {address} - the address to get the longitude and latitude for\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.bookmarkShipment\r\n * @description gets the bookmarked shipments from the database\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getNumBookedShipments\r\n * @description returns the number of bookmarked shipments\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getShipment\r\n * @description returns a shipments details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsService.getArc\r\n * @description returns the arc variable\r\n */\r\n\r\n (function () {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .service('ShippingDetailsService', ShippingDetailsService);\r\n\r\n /** @ngInject */\r\n ShippingDetailsService.$inject = ['$http', '$log', 'api', '$q'];\r\n function ShippingDetailsService($http, $log, api, $q) {\r\n var shipment,\r\n shipment_summary,\r\n arc = [], pins = [],\r\n cachedBookmarks = false;\r\n\r\n function calcArc(source_addr, destination_addr) {\r\n getLatLong(source_addr).then(function (source) {\r\n getLatLong(destination_addr).then(function (destination) {\r\n arc.push([{ origin: source, destination: destination }]);\r\n });\r\n });\r\n }\r\n\r\n function getLatLong(address) {\r\n var url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' + address;\r\n var promise = $http.get(url).then(function (res) {\r\n $log.debug(res);\r\n return res.data.results[0].geometry.location;\r\n });\r\n return promise;\r\n }\r\n\r\n\r\n return {\r\n getBookmarks: function (type) {\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompany);\r\n // }else if(localStorage.userDepartment){\r\n // params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartment)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompany;\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser);\r\n // }\r\n\r\n if (localStorage.customerType == 'cww') {\r\n\r\n if (localStorage.switchEmailCwwType) {\r\n params += \"?userEmail=\" + localStorage.switchEmailCwwType + \"&customer_type=\" + localStorage.customerType + \"&bookmark_type=\" + type;\r\n } else if (localStorage.userCompanyCww) {\r\n params += \"?userCompany=\" + encodeURIComponent(localStorage.userCompanyCww) + \"&customer_type=\" + localStorage.customerType + \"&bookmark_type=\" + type;\r\n } else if (localStorage.userDepartmentCww) {\r\n params += \"?userDepartment=\" + encodeURIComponent(localStorage.userDepartmentCww) + \"&departmentCompanyId=\" + localStorage.userDepartmentCompanyCww + \"&customer_type=\" + localStorage.customerType + \"&bookmark_type=\" + type;\r\n } else if (localStorage.dummyUser) {\r\n params += \"?dummyUserEmail=\" + encodeURIComponent(localStorage.dummyUser) + \"&customer_type=\" + localStorage.customerType + \"&bookmark_type=\" + type;\r\n }\r\n\r\n } else {\r\n params += \"?customer_type=cww&bookmark_type=\" + type;\r\n }\r\n\r\n\r\n var url = '/bookmarks' + params;\r\n var promise = $http.get(api.url_v2 + url).then(function (res) {\r\n\r\n cachedBookmarks = res.data;\r\n return res.data;\r\n });\r\n return promise;\r\n },\r\n hasCachedBookmarks: function () {\r\n return !!cachedBookmarks;\r\n },\r\n getCachedBookmarks: function () {\r\n return cachedBookmarks;\r\n },\r\n bookmarkShipment: function (type) {\r\n var url = '/bookmarks';\r\n var promise = $http.post(api.url_v2 + url, { gshpid: shipment.gshpid, bookmark_type: type }).then(function (res) {\r\n shipment.bookmark_id = res.data.bookmark_id;\r\n shipment.discussion_bookmark_id = res.data.discussion_bookmark_id;\r\n // $log.debug(res);\r\n // debugger;\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n bookmarkNotification: function (uid) {\r\n var type = 'cww';\r\n var url = '/shipments/' + shipment.gshpid + '/user_shipment_discussions/create_discussion';\r\n var promise = $http.put(api.url_v2 + url, { user_id: uid, active: true, shipment_type: type }).then(function (res) {\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n unBookmarkNotification: function (uid) {\r\n var type = 'cww';\r\n var url = '/shipments/' + shipment.gshpid + '/user_shipment_discussions/create_discussion';\r\n var promise = $http.put(api.url_v2 + url, { user_id: uid, active: false, shipment_type: type }).then(function (res) {\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n markAsRead: function () {\r\n var type = 'cww';\r\n var url = '/shipments/' + shipment.gshpid + '/shipment_comments/mark_as_read';\r\n var promise = $http.put(api.url_v2 + url, { shipment_type: type }).then(function (res) {\r\n return res;\r\n });\r\n return promise;\r\n },\r\n unBookmarkShipment: function (type) {\r\n var url = '/bookmarks/' + shipment.bookmark_id;\r\n var promise = $http.delete(api.url_v2 + url).then(function (res) {\r\n if (res.data.bookmark.id == shipment.bookmark_id &&\r\n res.data.bookmark.gshpid == shipment.gshpid) {\r\n shipment.bookmark_id = 0;\r\n }\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n unBookmarkShipmentDiscussion: function (type) {\r\n var url = '/bookmarks/' + shipment.discussion_bookmark_id;\r\n var promise = $http.delete(api.url_v2 + url).then(function (res) {\r\n if (res.data.bookmark.id == shipment.discussion_bookmark_id &&\r\n res.data.bookmark.gshpid == shipment.gshpid) {\r\n shipment.discussion_bookmark_id = 0;\r\n }\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n unBookmarkId: function (id) {\r\n var url = '/bookmarks/' + id;\r\n var promise = $http.delete(api.url_v2 + url).then(function (res) {\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n getShipment: function (ref_num) {\r\n var params = \"\";\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompany);\r\n // }else if(localStorage.userDepartment){\r\n // params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartment)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompany;\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser);\r\n // }\r\n\r\n if (localStorage.customerType == 'cww') {\r\n\r\n if (localStorage.switchEmailCwwType) {\r\n params += \"?userEmail=\" + localStorage.switchEmailCwwType + \"&customer_type=\" + localStorage.customerType;\r\n } else if (localStorage.userCompanyCww) {\r\n params += \"?userCompany=\" + encodeURIComponent(localStorage.userCompanyCww) + \"&customer_type=\" + localStorage.customerType;\r\n } else if (localStorage.userDepartmentCww) {\r\n params += \"?userDepartment=\" + encodeURIComponent(localStorage.userDepartmentCww) + \"&departmentCompanyId=\" + localStorage.userDepartmentCompanyCww + \"&customer_type=\" + localStorage.customerType;\r\n } else if (localStorage.dummyUser) {\r\n params += \"?dummyUserEmail=\" + encodeURIComponent(localStorage.dummyUser) + \"&customer_type=\" + localStorage.customerType;\r\n }\r\n\r\n } else {\r\n params += \"?customer_type=cww\";\r\n }\r\n\r\n //var promise = $http.get('shipmentDetails.json').then(function (res) {\r\n var promise = $http.get(api.url_v2 + '/shipments/' + ref_num + params).then(function (res) {\r\n shipment = res.data;\r\n $log.debug(shipment);\r\n //calcArc(shipment.shippercity, shipment.destination);\r\n // debugger;\r\n arc.length = 0;\r\n arc.push({\r\n origin: {\r\n name: (shipment.origincity != undefined) ? shipment.origincity : '',\r\n latitude: (shipment.geocodes != undefined) ? shipment.geocodes.origin_lat : '',\r\n longitude: (shipment.geocodes != undefined) ? shipment.geocodes.origin_lng : '',\r\n },\r\n destination: {\r\n name: (shipment.destinationcity != undefined) ? shipment.destinationcity : '',\r\n latitude: (shipment.geocodes != undefined) ? shipment.geocodes.dest_lat : '',\r\n longitude: (shipment.geocodes != undefined) ? shipment.geocodes.dest_lng : '',\r\n },\r\n options: {\r\n strokeWidth: 3,\r\n strokeColor: 'rgba(133, 217, 164, 1)',\r\n greatArc: false,\r\n arcSharpness: 0.25\r\n }\r\n });\r\n arc.map(function (d) {\r\n var origin = d.origin;\r\n origin.radius = 5;\r\n origin.fillKey = 'bubble';\r\n var dest = d.destination;\r\n dest.radius = 5;\r\n dest.fillKey = 'bubble';\r\n pins.push(origin);\r\n pins.push(dest);\r\n });\r\n\r\n shipment_summary = [ //summary used in contact message\r\n { display: 'SHIPPINGDETAILS.CUSTOMER_NAME', text: 'Customer Name', value: shipment.customername },\r\n { display: 'SHIPPINGDETAILS.SHIP_DATE', text: 'Ship Date', value: shipment.shipdate },\r\n { display: 'SHIPPINGDETAILS.DUE_DATE', text: 'Due Date', value: shipment.duedate },\r\n { display: 'SHIPPINGDETAILS.ORIGIN', text: 'Origin', value: shipment.origin },\r\n { display: 'SHIPPINGDETAILS.DESTINATION', text: 'Destination', value: shipment.destination },\r\n { display: 'SHIPPINGDETAILS.AWB', text: 'AWB', value: shipment.awb }\r\n //{display: 'SHIPPINGDETAILS.INVOICE_NUM', value: shipment.shipment_invoices_without_credit_note_without_credit_note[0].invoicenumber}\r\n ];\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n\r\n getShipmentException: function (ref_num) {\r\n var params = \"\";\r\n\r\n if (localStorage.customerType == 'cww') {\r\n\r\n if (localStorage.switchEmailCwwType) {\r\n params += \"?userEmail=\" + localStorage.switchEmailCwwType + \"&customer_type=\" + localStorage.customerType;\r\n } else if (localStorage.userCompanyCww) {\r\n params += \"?userCompany=\" + encodeURIComponent(localStorage.userCompanyCww) + \"&customer_type=\" + localStorage.customerType;\r\n } else if (localStorage.userDepartmentCww) {\r\n params += \"?userDepartment=\" + encodeURIComponent(localStorage.userDepartmentCww) + \"&departmentCompanyId=\" + localStorage.userDepartmentCompanyCww + \"&customer_type=\" + localStorage.customerType;\r\n } else if (localStorage.dummyUser) {\r\n params += \"?dummyUserEmail=\" + encodeURIComponent(localStorage.dummyUser) + \"&customer_type=\" + localStorage.customerType;\r\n }\r\n\r\n } else {\r\n params += \"?customer_type=cww\";\r\n }\r\n\r\n var promise = $http.get(api.url + '/shipments/get_exceptions/' + ref_num + params).then(function (res) {\r\n shipment = res.data;\r\n $log.debug(shipment);\r\n\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n\r\n getShipmentSummary: function () { //summary used for contact message\r\n return shipment_summary;\r\n },\r\n getShipmentVariable: function () { //used for contact message\r\n return shipment;\r\n },\r\n getArc: function () {\r\n return arc;\r\n },\r\n resetArc: function () {\r\n arc.length = 0;\r\n },\r\n getPins: function () {\r\n return pins;\r\n },\r\n resetPins: function () {\r\n pins.length = 0;\r\n },\r\n\r\n\r\n\r\n\r\n\r\n\r\n getLoad: function (ref_num) {\r\n var params = \"\";\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+localStorage.userCompany;\r\n // }\r\n\r\n if (localStorage.customerType == 'cww') {\r\n\r\n if (localStorage.switchEmailCwwType) {\r\n params += \"?userEmail=\" + localStorage.switchEmailCwwType + \"&customer_type=\" + localStorage.customerType;\r\n } else if (localStorage.userCompanyCww) {\r\n params += \"?userCompany=\" + encodeURIComponent(localStorage.userCompanyCww) + \"&customer_type=\" + localStorage.customerType;\r\n }\r\n } else {\r\n params += \"?customer_type=cww\";\r\n }\r\n\r\n var promise = $http.get(api.url + '/loads/' + ref_num + params).then(function (res) {\r\n shipment = res.data;\r\n $log.debug(shipment);\r\n arc.length = 0;\r\n\r\n arc.push({\r\n origin: {\r\n name: shipment.origincity,\r\n latitude: shipment.geocodes.origin_lat,\r\n longitude: shipment.geocodes.origin_lng,\r\n },\r\n destination: {\r\n name: shipment.destinationcity,\r\n latitude: shipment.geocodes.dest_lat,\r\n longitude: shipment.geocodes.dest_lng,\r\n },\r\n options: {\r\n strokeWidth: 3,\r\n strokeColor: 'rgba(133, 217, 164, 1)',\r\n greatArc: false,\r\n arcSharpness: 0.25\r\n }\r\n });\r\n\r\n arc.map(function (d) {\r\n var origin = d.origin;\r\n origin.radius = 5;\r\n origin.fillKey = 'bubble';\r\n var dest = d.destination;\r\n dest.radius = 5;\r\n dest.fillKey = 'bubble';\r\n pins.push(origin);\r\n pins.push(dest);\r\n });\r\n shipment_summary = [ //summary used in contact message\r\n { display: 'SHIPPINGDETAILS.CUSTOMER_NAME', text: 'Customer Name', value: shipment.customername },\r\n { display: 'SHIPPINGDETAILS.SHIP_DATE', text: 'Ship Date', value: shipment.shipdate },\r\n { display: 'SHIPPINGDETAILS.DUE_DATE', text: 'Due Date', value: shipment.duedate },\r\n { display: 'SHIPPINGDETAILS.ORIGIN', text: 'Origin', value: shipment.origincity },\r\n { display: 'SHIPPINGDETAILS.DESTINATION', text: 'Destination', value: shipment.destinationcity },\r\n { display: 'SHIPPINGDETAILS.AWB', text: 'AWB', value: shipment.bol }\r\n //{display: 'SHIPPINGDETAILS.INVOICE_NUM', value: shipment.shipment_invoices[0].invoicenumber}\r\n ];\r\n return shipment;\r\n });\r\n return promise;\r\n },\r\n\r\n saveDiscussionText: function (id, query, url) {\r\n\r\n var dfd = $q.defer();\r\n //var dfd = $q.defer();\r\n $http.post(url, query).then(function (response) {\r\n\r\n dfd.resolve(response.data);\r\n\r\n }, function errorCallback(error) {\r\n\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n },\r\n\r\n downloadDocument: function(documentPath, documentName){\r\n var url = \"/documents?documentPath=\"+documentPath;\r\n return $http.get(api.url_v2+url,{responseType: 'blob'}).then(function(res){\r\n var a = document.createElement(\"a\");\r\n document.body.appendChild(a);\r\n a.style = \"display: none\";\r\n var blob = new Blob([res.data], {type: \"application/pdf\"}),\r\n url = window.URL.createObjectURL(blob);\r\n a.href = url;\r\n a.download = documentName;\r\n a.click();\r\n });\r\n },\r\n\r\n getDiscussionData: function (url) {\r\n\r\n var dfd = $q.defer();\r\n\r\n $http.get(url).then(function (response) {\r\n dfd.resolve(response.data);\r\n\r\n }, function errorCallback(error) {\r\n\r\n return dfd.reject(error);\r\n\r\n });\r\n\r\n return dfd.promise;\r\n\r\n },\r\n\r\n getSuffixDate: function (number) {\r\n\r\n if (isNaN(number) || number < 1) {\r\n return '';\r\n } else if (number % 100 == 11 || number % 100 == 12) {\r\n return 'th';\r\n } else {\r\n var lastDigit = number % 10;\r\n if (lastDigit === 1) {\r\n return 'st';\r\n } else if (lastDigit === 2) {\r\n return 'nd';\r\n } else if (lastDigit === 3) {\r\n return 'rd';\r\n } else if (lastDigit > 3) {\r\n return 'th';\r\n }\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n\r\n };\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .config(routerConfig);\r\n\r\n /* @ngInject */\r\n function routerConfig($stateProvider, menuGroups) {\r\n\r\n var menuGroupCww = '';\r\n\r\n switch (localStorage.getItem('shipment_page_from')){\r\n\r\n case 'Booking' : \r\n menuGroupCww = menuGroups.trackAndTraceBooking; \r\n break;\r\n\r\n case 'In-Transit' :\r\n menuGroupCww = menuGroups.trackAndTraceInTransit;\r\n break;\r\n\r\n default:\r\n menuGroupCww = menuGroups.trackAndTrace;\r\n\r\n }\r\n\r\n $stateProvider\r\n .state('shipping-details', {\r\n url: '/shipping-details/:ref_num',\r\n templateUrl: '/app/shipping-details/shipping-details.html',\r\n controller: 'ShippingDetailsController',\r\n controllerAs: 'vm',\r\n title: 'Shipment Details',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroupCww\r\n }\r\n })\r\n .state('shipping-details-cfs', {\r\n url: '/shipping-details-cfs/:ref_num',\r\n templateUrl: '/app/shipping-details/shipping-details-cfs/shipping-details-cfs.html',\r\n controller: 'ShippingDetailsCfsController',\r\n controllerAs: 'vm',\r\n title: 'Shipment Details CFS',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceCfs\r\n }\r\n })\r\n .state('shipping-details-cmts', {\r\n url: '/shipping-details-cmts/:ref_num',\r\n templateUrl: '/app/shipping-details/shipping-details-cmts/shipping-details-cmts.html',\r\n controller: 'ShippingDetailsCmtsController',\r\n controllerAs: 'vm',\r\n title: 'Shipment Details CMTS',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceCmts\r\n }\r\n })\r\n .state('shipping-details-csl', {\r\n url: '/shipping-details-csl/:ref_num',\r\n templateUrl: '/app/shipping-details/shipping-details-csl/shipping-details-csl.html',\r\n controller: 'ShippingDetailsCslController',\r\n controllerAs: 'vm',\r\n title: 'Shipment Details CSL',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceCsl\r\n }\r\n });\r\n }\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getShipment\r\n * @description calls the getShipment function from ShippingDetailsService and returns the shipping details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.docDate\r\n * @description returns the date of the document\r\n * @param {path} - the path to the document\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.bookmarkShipment\r\n * @description bookmarks the current shipment.\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.convertDate\r\n * @description converts dates to have dashes in it\r\n * @param {date} - the date that is being converted\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.convertTime\r\n * @description converts the time to have a colon in the middle\r\n * @param {time} - the time to be converted\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getReasonDescription\r\n * @description Gets a Reason Description for a milestone based on the milestone\r\n * itself, or an exception\r\n * @param {object} - the milestone\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.docName\r\n * @description returns the name of the document\r\n * @param {path} - the path of the document\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getInvoiceAddress\r\n * @description returns a list of the consignee address\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getToastPosition\r\n * @description returns the toast position (toast is a notification)\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.getBarPercentage\r\n * @description gets the perecentage of days since shipper date divided by the total shipping period. percentage is used for the bar visualization\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.setDaysRemaining\r\n * @description sets days reamining based on the duedate and current date\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.sanitizePosition\r\n * @description sets the last position\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showBookmarkToast\r\n * @description shows the toast for a bookmark (toast is a notification)\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showContainerDetails\r\n * @description shows the container details modal\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.showDocumentModal\r\n * @description shows the modal for document details\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name ShippingDetailsController.closeDocumentModal\r\n * @description closes the modal for document details\r\n */\r\n\r\n (function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.shippingDetails')\r\n .filter('unique', function() {\r\n return function(collection, keyname) {\r\n var output = [],\r\n keys = [];\r\n angular.forEach(collection, function(item) {\r\n var key = item[keyname];\r\n if(keys.indexOf(key) === -1) {\r\n keys.push(key);\r\n output.push(item);\r\n }\r\n });\r\n return output;\r\n };\r\n })\r\n .directive('scrollToBottom', function($timeout, $window) {\r\n return {\r\n scope: {\r\n scrollToBottom: \"=\"\r\n },\r\n restrict: 'A',\r\n link: function(scope, element, attr) {\r\n scope.$watchCollection('scrollToBottom', function(newVal) {\r\n if (newVal) {\r\n $timeout(function() {\r\n element[0].scrollTop = element[0].scrollHeight;\r\n }, 0);\r\n }\r\n\r\n });\r\n }\r\n };\r\n })\r\n .directive('shipmentDiscussionChatKeyPress', function() {\r\n return function( scope, elem ) {\r\n\r\n elem.bind('keydown', function( event ) {\r\n if(event.keyCode == 13 && !event.shiftKey && !event.altKey){\r\n scope.$broadcast('keydown', { code: event } );\r\n return false;\r\n }\r\n else if(event.keyCode == 38 || event.keyCode == 40 || event.keyCode == 27 || event.keyCode == 13 || event.keyCode == 8){\r\n scope.$broadcast('keydown', { code: event } );\r\n }\r\n\r\n });\r\n\r\n elem.bind('click', function(event){\r\n\r\n scope.focusIndex = 0;\r\n angular.element('.chatMainInput .userLists').addClass(\"hide\");\r\n angular.element('.chatSubInput .userLists').addClass(\"hide\");\r\n\r\n });\r\n\r\n };\r\n })\r\n /*.directive('contenteditable', function() {\r\n return {\r\n restrict: \"A\",\r\n scope: {\r\n onKeyUp: \"&\"\r\n },\r\n link: function(scope, element, attrs, ctrl) {\r\n\r\n element.ready(function(){\r\n\r\n element.bind('keyup', function(e) {\r\n\r\n if(attrs.id){\r\n scope.onKeyUp(e,attrs.id);\r\n }else{\r\n scope.onKeyUp(e);\r\n }\r\n\r\n });\r\n\r\n })\r\n\r\n }\r\n };\r\n })*/\r\n\r\n .filter('userTagHighlight', function() {\r\n return function(input,names) {\r\n\r\n angular.forEach(names, function(value, key){\r\n\r\n if((input.search('@'+value.full_name) > -1) && (input.search(\"<span class='user_name_highlight'>\"+'@'+value.full_name+\"</span>\") < 0) ){\r\n // to highlight tagged user names in chat comments\r\n input = input.replace('@'+value.full_name, \"<span class='user_name_highlight'>\"+'@'+value.full_name+\"</span>\");\r\n\r\n }\r\n\r\n });\r\n\r\n //Hypertext link creating\r\n\r\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\r\n\r\n // //URLs starting with http://, https://, or ftp://\r\n // replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\r\n // replacedText = input.replace(replacePattern1, '<a href=\"$1\" target=\"_blank\">$1</a>');\r\n\r\n // //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\r\n // replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\r\n // replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\r\n\r\n //Change email addresses to mailto:: links.\r\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\r\n replacedText = input.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\r\n\r\n return replacedText;\r\n };\r\n\r\n })\r\n .controller('ShippingDetailsController', ShippingDetailsController)\r\n .controller('ToastCtrl', function($scope, $mdToast){\r\n $scope.closeToast = function(){ $mdToast.hide();};\r\n });\r\n\r\n /** @ngInject */\r\n ShippingDetailsController.$inject = ['$stateParams', '$http', '$sce', '$location', '$anchorScroll', 'ShippingDetailsService', 'UserService', '$log', '$translatePartialLoader', '$mdDialog', '$mdMedia', '$scope', '$mdToast', '$timeout', 'NgTableParams' , '$filter', 'ContactsService', 'permissions', 'api', 'downloadLink'];\r\n function ShippingDetailsController($stateParams, $http, $sce, $location, $anchorScroll, ShippingDetailsService, UserService, $log, $translatePartialLoader, $mdDialog, $mdMedia, $scope, $mdToast, $timeout, NgTableParams, $filter, ContactsService, permissions, api, downloadLink) {\r\n\r\n /* Variables */\r\n var vm = this;\r\n vm.downloadlink = downloadLink.url;\r\n vm.downloadlinkv2 = downloadLink.url_v2;\r\n vm.data = {};\r\n vm.referenceNumberObject = {};\r\n vm.bookmarkType = 'normal';\r\n vm.doneBookmark = doneBookmark;\r\n vm.isReferenceNumbers = false;\r\n vm.containerHistory = {};\r\n vm.data.potential_exceptions = {};\r\n vm.ref_num = $stateParams.ref_num;\r\n vm.isBookmarked = false;\r\n vm.isBookmarkedDiscussion = false;\r\n vm.isBookmarking = false;\r\n vm.isBookmarkingDiscussion = false;\r\n vm.isBookmarkedNotification = false;\r\n vm.isAttachmentsNotification = false;\r\n vm.bookmarks = {};\r\n vm.bookmarksCount = 0;\r\n vm.bookmarksCount1 = 0;\r\n vm.bookmarkButtonText = '';\r\n vm.bookmarkButtonTextDiscussion = '';\r\n vm.barPercentage = 0;\r\n vm.daysRemaining = 0;\r\n vm.exceptionList = true;\r\n vm.isLoading = false;\r\n vm.displayContainer = false;\r\n vm.defaultContainer = false;\r\n $log.debug($stateParams);\r\n vm.last = {\r\n bottom: false,\r\n top: true,\r\n left: false,\r\n right: true\r\n };\r\n vm.toastPosition = angular.extend({}, vm.last);\r\n vm.getReferenceNumbers = getReferenceNumbers;\r\n vm.user = UserService.getUserData();\r\n vm.expandBtn = false;\r\n // TODO - Rig these up to store permanently to userservice\r\n vm.expandedInvoices = UserService.invoicesIsExpanded();\r\n vm.expandedShippingDetails = UserService.shippingDetailsIsExpanded();\r\n vm.expandedRefNumbers = UserService.refNumbersIsExpanded();\r\n //vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n if(vm.user.permissions.cww){\r\n vm.hasFinancialPermissions = (getPermissionsValue(vm.user.permissions, 'cww').hasOwnProperty('Shipment'))? vm.user.permissions.cww.Shipment.includes('financial') :false;\r\n }else{\r\n vm.hasFinancialPermissions = false;\r\n }\r\n vm.isFinancialPermission = isFinancialPermission;\r\n vm.getDocumentsCount = getDocumentsCount;\r\n vm.downloadDocument = downloadDocument;\r\n vm.tagged_users = [];\r\n vm.tagged_users_name = [];\r\n\r\n vm.setInvoicesExpanded = function() {\r\n UserService.setInvoicesExpanded(vm.expandedInvoices);\r\n };\r\n\r\n\r\n vm.setShippingDetailsExpanded = function() {\r\n UserService.setShippingDetailsExpanded(vm.expandedShippingDetails);\r\n };\r\n\r\n vm.setRefNumbersExpanded = function() {\r\n UserService.setRefNumbersExpanded(vm.expandedRefNumbers);\r\n };\r\n\r\n vm.is_consignee_user = UserService.check_consignee_user();\r\n\r\n /*\r\n * Redirect the user to track and trace if no id was provided\r\n * TODO - Should we vocally fail?\r\n **/\r\n if (!$stateParams.ref_num){\r\n $location.path('track-trace');\r\n }\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('shipment');\r\n $translatePartialLoader.addPart('shippingdetails');\r\n $translatePartialLoader.addPart('admin'); //used for potential exceptions\r\n\r\n /* Functions */\r\n vm.bookmarkShipment = bookmarkShipment;\r\n vm.bookmarkShipmentDiscussion = bookmarkShipmentDiscussion;\r\n vm.calcInvoiceTotal = calcInvoiceTotal;\r\n vm.closeModal = closeModal;\r\n vm.convertDate = convertDate;\r\n vm.convertTime = convertTime;\r\n vm.getReasonDescription = getReasonDescription;\r\n vm.docDate = docDate;\r\n vm.docName = docName;\r\n vm.getBarPercentage = getBarPercentage;\r\n vm.getBookmarks = getBookmarks('normal');\r\n vm.getConsigneeAddress = getConsigneeAddress;\r\n vm.getShipperAddress = getShipperAddress;\r\n vm.getShipment = getShipment;\r\n vm.getAllContainers = getAllContainers;\r\n vm.getToastPosition = getToastPosition;\r\n vm.sanitizePosition = sanitizePosition;\r\n vm.setBookmarkButton = setBookmarkButton;\r\n vm.setBookmarkButtonDiscussion = setBookmarkButtonDiscussion;\r\n vm.setBookmarkButtonNotification = setBookmarkButtonNotification;\r\n vm.setDaysRemaining = setDaysRemaining;\r\n vm.showBookmarkToastWithUrl = showBookmarkToastWithUrl;\r\n vm.showContainerDetails = showContainerDetails;\r\n vm.showAllConaintersData = showAllConaintersData;\r\n vm.showModal = showModal;\r\n vm.showExceptionsModal = showExceptionsModal;\r\n vm.showInvoice = showInvoice;\r\n vm.jumpToDashboard = jumpToDashboard;\r\n vm.isEmpty = isEmpty;\r\n vm.progressStatusText = \"\";\r\n vm.gotoMilestome = gotoMilestome;\r\n //vm.checkTagWord = checkTagWord;\r\n vm.userListOpen = false;\r\n vm.replyTagPopup = false;\r\n vm.commentTagPopup = false;\r\n vm.prev_page = 'Track & Trace';\r\n vm.link = '/track-trace';\r\n vm.searchDiscussionNew = false;\r\n vm.searchDiscussionOld = true;\r\n vm.findText = \"\";\r\n vm.findData = findData;\r\n vm.cancelFindData = cancelFindData;\r\n vm.sendNotification = sendNotification;\r\n vm.chat_text_submit = chat_text_submit;\r\n vm.discussion_chat = new Object();\r\n vm.original_discussion_chat = new Object();\r\n vm.file_discussion_chat = new Object();\r\n vm.chatSoket = chatSoket;\r\n vm.getSuffixDate = getSuffixDate;\r\n vm.showReplyTextBox = showReplyTextBox;\r\n vm.discussion_comment_text = '';\r\n vm.removeFile = removeFile;\r\n vm.attachments = [];\r\n vm.clearChatForm = clearChatForm;\r\n vm.user_id = localStorage.getItem(\"user_id\");\r\n vm.findAttachmentComments = findAttachmentComments;\r\n vm.company_contacts = [];\r\n $scope.files = [];\r\n vm.dataswitchEnable = false;\r\n vm.unseen_discussion_count = \"\";\r\n vm.reply_comment_display = reply_comment_display;\r\n vm.markRead = markRead;\r\n vm.markReadCheck = true;\r\n vm.file_size_array = new Object();\r\n vm.discussion_file_format = ['jpg', 'jpeg', 'gif', 'png', 'pdf', 'doc', 'docx', 'csv', 'xlsx', 'txt', 'xls'];\r\n vm.discussion_file_format1 = ['jpg', 'jpeg', 'gif', 'png', 'pdf', 'doc', 'docx', 'csv', 'xlsx', 'txt', 'xls',\r\n 'vnd.openxmlformats-officedocument.spreadsheetml.sheet','vnd.ms-excel','plain','msword',\r\n 'vnd.openxmlformats-officedocument.wordprocessingml.document'];\r\n vm.chatContactsAutocomplete = chatContactsAutocomplete;\r\n vm.submitBtn = true;\r\n vm.submitBtnReply = true;\r\n vm.discussion_text = \"\";\r\n vm.containerDetails = [];\r\n chatSoket();\r\n getComments();\r\n\r\n if(localStorage.getItem('shipment_page_from')){\r\n vm.prev_page = angular.copy(localStorage.getItem('shipment_page_from'));\r\n\r\n $scope.$on('$locationChangeStart', function() {\r\n localStorage.removeItem('shipment_page_from');\r\n });\r\n }\r\n\r\n\r\n if(localStorage.getItem('dataswitchEnable')){\r\n vm.dataswitchEnable = true;\r\n }else{\r\n vm.dataswitchEnable = false;\r\n }\r\n\r\n switch (vm.prev_page){\r\n\r\n case 'Booking' :\r\n\r\n vm.link = '/track-trace-booking';\r\n\r\n break;\r\n\r\n case 'In-Transit' :\r\n\r\n vm.link = '/track-trace-transit';\r\n\r\n break;\r\n\r\n default:\r\n vm.link = '/track-trace';\r\n\r\n }\r\n\r\n\r\n if(vm.user.customer_types.length > 0){\r\n if(vm.user.customer_types.includes('cww')){\r\n vm.discussion_visibility = vm.user.customer_type_setup.cww.discussion_enabled;\r\n }else{\r\n vm.discussion_visibility = false;\r\n }\r\n }\r\n\r\n /* Using Angular Material Table Data */\r\n vm.selected = [];\r\n ShippingDetailsService.resetArc();\r\n ShippingDetailsService.resetPins();\r\n vm.getShipment($stateParams.ref_num);\r\n\r\n ContactsService.setSubjectStatuses({shipmentDetails:{potentialException: false, currentException: false, shipmentDetails: true}});\r\n\r\n var currentShipment = false;\r\n\r\n d3.json('/assets/json/shipment-world-50m.json', function(err, world){\r\n if(err) throw err;\r\n $scope.$apply(function(){\r\n $scope.land = topojson.feature(world, world.objects.countries);\r\n $scope.boundary = topojson\r\n .mesh(world, world.objects.countries, function(a, b) { return a !== b; });\r\n });\r\n });\r\n\r\n\r\n $scope.fileNameChanged = function(messageData) {\r\n\r\n var id = messageData.attributes['msg_id'].value;\r\n\r\n var name = document.getElementById('fileOne');\r\n $scope.message_id = 'none';\r\n\r\n if(id){\r\n name = document.getElementById('file'+id);\r\n $scope.message_id = parseInt(id);\r\n if(name.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n }\r\n }else{\r\n if(name.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n }\r\n }\r\n var file_upload_error = false;\r\n\r\n if($scope.files){\r\n\r\n //jpg, jpeg, gif, png, pdf, docs, dox, csv, xlsx, txt, xls\r\n\r\n for(var i=0; i<name.files.length; i++){\r\n\r\n if((name.files[i].size/1024/1024) > 5 || (name.files[i].type == '') ||\r\n (vm.discussion_file_format1.indexOf((name.files[i].type.split('/'))[1]) == -1) ){\r\n\r\n file_upload_error = true\r\n\r\n } else{\r\n\r\n $scope.files.push(name.files[i]);\r\n\r\n var bytes = name.files[i].size;\r\n\r\n if(bytes < 1024) {\r\n bytes + \" Bytes\";\r\n }\r\n\r\n else if(bytes < 1048576) {\r\n bytes = (bytes / 1024).toFixed(0) + \" KB\";\r\n }\r\n\r\n else if(bytes < 1073741824) {\r\n bytes = (bytes / 1048576).toFixed(0) + \" MB\";\r\n }\r\n\r\n else {\r\n bytes = (bytes / 1073741824).toFixed(0) + \" GB\";\r\n }\r\n\r\n vm.file_size_array[name.files[i].name] = {'name':name.files[i].name,'size':bytes}\r\n\r\n }\r\n\r\n }\r\n\r\n if(file_upload_error){\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/discussion/file_size_error.html');\r\n }\r\n\r\n }else{\r\n $scope.files = name.files;\r\n }\r\n\r\n $scope.files = removeDuplicateFiles($scope.files);\r\n\r\n }\r\n\r\n function removeFile(filename,index,id){\r\n angular.forEach($scope.files, function(v,k){\r\n if(v.type == 'savedFile' && v.name===filename){\r\n vm.attachments.push(v.name);\r\n }\r\n if(v.name===filename){\r\n $scope.files.splice(k,1);\r\n }\r\n });\r\n // Removing element\r\n var myEl = angular.element( document.querySelector( '.savedFile'+index ) );\r\n myEl.remove();\r\n\r\n if(id){\r\n if($scope.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n }\r\n }else{\r\n if($scope.files.length > 0 || vm.discussion_text.trim() != \"\"){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n }\r\n }\r\n }\r\n\r\n function clearChatForm(){\r\n $scope.files = [];\r\n vm.submitBtn = true;\r\n }\r\n\r\n function removeDuplicateFiles(origArr) {\r\n var newArr = [],\r\n origLen = origArr.length,\r\n found, x, y;\r\n for (x = 0; x < origLen; x++) {\r\n found = undefined;\r\n for (y = 0; y < newArr.length; y++) {\r\n if (origArr[x].name === newArr[y].name) {\r\n found = true;\r\n break;\r\n }\r\n }\r\n if (!found) {\r\n newArr.push(origArr[x]);\r\n }\r\n }\r\n return newArr;\r\n }\r\n\r\n function findData(text){\r\n try{\r\n vm.searchDiscussionNew = true;\r\n vm.searchDiscussionOld = false;\r\n }catch(e){ }\r\n }\r\n\r\n function cancelFindData(){\r\n try{\r\n vm.searchDiscussionNew = false;\r\n vm.searchDiscussionOld = true;\r\n vm.findText = \"\";\r\n }catch(e){ }\r\n }\r\n\r\n function sendNotification(){\r\n // /shipment_id: nil, user_id: nil, active: true\r\n var userId = vm.user.id;\r\n\r\n if (!vm.isBookmarkedNotification){\r\n\r\n /* Notify the shipment */\r\n ShippingDetailsService.bookmarkNotification(userId).then(function(shipment){\r\n vm.setBookmarkButtonNotification(true);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-notification-toast.html');\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-toast.error.html');\r\n });\r\n\r\n /* Remove the bookmark */\r\n } else {\r\n ShippingDetailsService.unBookmarkNotification(userId).then(function(shipment){\r\n vm.setBookmarkButtonNotification(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/remove-bookmark-notification-toast.html');\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n\r\n }\r\n\r\n function findAttachmentComments(val){\r\n\r\n vm.isAttachmentsNotification = !vm.isAttachmentsNotification;\r\n\r\n if(vm.isAttachmentsNotification){\r\n\r\n var deleted_array2 = [];\r\n\r\n var prevMainIndex = null;\r\n\r\n for (var val1 in vm.discussion_chat) {\r\n\r\n if(vm.discussion_chat[val1].length > 0){\r\n\r\n var deleted_array1 = [];\r\n\r\n for(var j=0; j<vm.discussion_chat[val1].length; j++){\r\n\r\n var deleted_array = [];\r\n\r\n // looping replies array\r\n if(vm.discussion_chat[val1][j].replies.length > 0){\r\n\r\n var prevReplyIndex = null;\r\n\r\n for(var k=0; k<vm.discussion_chat[val1][j].replies.length; k++){\r\n\r\n if(vm.discussion_chat[val1][j].replies[k]){\r\n\r\n if(vm.discussion_chat[val1][j].replies[k].attachments.length == 0){\r\n // to delete replies array;\r\n //prevReplyIndex = k;\r\n vm.discussion_chat[val1][j].replies.splice(k,1);\r\n k--;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n // to delete replies parent array;\r\n if(vm.discussion_chat[val1][j].attachments.length == 0 && vm.discussion_chat[val1][j].replies.length == 0 ){\r\n\r\n vm.discussion_chat[val1].splice(j,1);\r\n //prevReplyParentIndex = j;\r\n j--;\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n // to delete main array;\r\n if(vm.discussion_chat[val1].length == 0 ){\r\n //deleted_array2.push(val1);\r\n delete vm.discussion_chat[val1];\r\n }\r\n\r\n }\r\n\r\n }else{\r\n\r\n //getComments();\r\n vm.discussion_chat = angular.copy(vm.original_discussion_chat);\r\n\r\n }\r\n\r\n }\r\n\r\n $scope.highlight = function(haystack) {\r\n if(!vm.findText) {\r\n return $sce.trustAsHtml(haystack);\r\n }\r\n return $sce.trustAsHtml(haystack.replace(new RegExp(vm.findText, \"gi\"), function(match) {\r\n return '<span class=\"highlightedText\">' + match + '</span>';\r\n }));\r\n };\r\n\r\n function getPermissionsValue(responsePermissionsData, type){\r\n return responsePermissionsData[type] || {}\r\n }\r\n\r\n function isCurrentShipment(obj) {\r\n if(obj.gshpid == $stateParams.ref_num) {\r\n currentShipment = true;\r\n }\r\n if (currentShipment) {\r\n vm.isBookmarked = true;\r\n } else {\r\n vm.isBookmarked = false;\r\n }\r\n }\r\n\r\n function isFinancialPermission(documenttype){\r\n var row_length = documenttype.split(\" \").length\r\n return vm.hasFinancialPermissions && documenttype.split(\" \")[row_length - 1] == 'Invoice' || documenttype.split(\" \")[row_length - 1] != 'Invoice'\r\n }\r\n\r\n function getDocumentsCount(data){\r\n var count = 0;\r\n if (data != undefined && data != 'undefined') {\r\n for(var i = 1; i <= data.length ; i++){\r\n if (!vm.hasFinancialPermissions && data[i - 1].documenttype.split(\" \")[data[i - 1].documenttype.split(\" \").length - 1] == 'Invoice'){\r\n count=count+1;\r\n }\r\n }\r\n return data.length - count\r\n }\r\n else {\r\n return count\r\n }\r\n }\r\n\r\n function downloadDocument(documentPath, documentName) {\r\n ShippingDetailsService.downloadDocument(documentPath, documentName).catch(function(error) {\r\n if (error.status === 422) {\r\n alert(\"The document does not exists\");\r\n } else {\r\n alert(\"Oh no! Something went wrong while fetching the document. Please contact the System Administrator.\");\r\n }\r\n });\r\n }\r\n\r\n // After the promise is completed, return the bookmarks from the service and determine how many there are\r\n function getBookmarks(type) {\r\n ShippingDetailsService.getBookmarks(type).then(function(successResponse){\r\n vm.bookmarksCount = 0;\r\n vm.bookmarks = successResponse;\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount += 1;\r\n });\r\n });\r\n }\r\n\r\n function showBookmarkToastWithUrl(url) {\r\n var pinTo = vm.getToastPosition();\r\n var toast = $mdToast.show({\r\n position: pinTo,\r\n hideDelay: 5000,\r\n templateUrl: url,\r\n parent: angular.element(document.getElementById('toast-parent')),\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n $mdToast.show(toast);\r\n }\r\n\r\n function setProgressStatus() {\r\n var now = new Date();\r\n if (moment(vm.data.departuredate).isAfter(now)) {\r\n vm.progressStatus = \"Upcoming\";\r\n } else if (vm.data.isdelivered == \"true\") {\r\n vm.progressStatus = \"Delivered\"\r\n } else if (vm.daysRemaining > 0) {\r\n vm.progressStatus = vm.daysRemaining + \" Days Remaining\";\r\n } else if (moment(vm.data.departuredate).isBefore(now)) {\r\n vm.progressStatus = \"In Progress\";\r\n } else if (moment(vm.data.duedate).isBefore(now)) {\r\n vm.progressStatus = \"Overdue\";\r\n } else {\r\n vm.progressStatus = \"\";\r\n }\r\n }\r\n\r\n // function showRemoveBookmarkToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/remove-bookmark-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n // function showBookmarkLimitToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/bookmark-limit-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n // function showBookmarkedAlreadyToast(){\r\n // var pinTo = vm.getToastPosition();\r\n // var toast = $mdToast.show({\r\n // position: pinTo,\r\n // hideDelay: 3000,\r\n // templateUrl: '/app/shipping-details/bookmark/bookmark-already-removed-toast.html',\r\n // parent: angular.element(document.getElementById('toast-parent'))\r\n // });\r\n // $mdToast.show(toast);\r\n // }\r\n\r\n function bookmarkShipment(type){\r\n // Update our current list of bookmarks before attempting to add a new one\r\n // So we can verify the bookmarks prior to trying to add / remove this one\r\n\r\n vm.bookmarksCount = 0;\r\n currentShipment = false;\r\n var startBookmarked = vm.isBookmarked;\r\n ShippingDetailsService.getBookmarks(type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse;\r\n vm.bookmarks.filter(isCurrentShipment);\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount += 1;\r\n });\r\n if (!vm.isBookmarked){\r\n // The bookmark has already been removed elsewhere, don't try it again\r\n if (startBookmarked) {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-already-removed-toast.html');\r\n vm.setBookmarkButton(false);\r\n } else if(vm.bookmarksCount < 5) {\r\n /* Bookmark the shipment */\r\n vm.bookmarkButtonText = \"SHIPPINGDETAILS.BOOKMARKING\";\r\n vm.isBookmarking = true; // Disable the button\r\n ShippingDetailsService.bookmarkShipment(type).then(function(shipment){\r\n vm.setBookmarkButton(true);\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-toast.html');\r\n }).catch(function(err) {\r\n vm.isBookmarking = false;\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-toast.error.html');\r\n });\r\n /* We've hit our limit, we need to remove bookmarks */\r\n } else {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-limit-toast.html');\r\n ShippingDetailsService.getBookmarks(type);\r\n }\r\n /* Remove the bookmark */\r\n } else {\r\n vm.isBookmarking = true; // Disable the button\r\n ShippingDetailsService.unBookmarkShipment(type).then(function(shipment){\r\n if (shipment.bookmark_id < 1){\r\n vm.setBookmarkButton(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/remove-bookmark-toast.html');\r\n }\r\n vm.isBookmarking = false;\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarking = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n function bookmarkShipmentDiscussion(type){\r\n // Update our current list of bookmarks before attempting to add a new one\r\n // So we can verify the bookmarks prior to trying to add / remove this one\r\n\r\n vm.bookmarksCount1 = 0;\r\n currentShipment = false;\r\n var startBookmarked = vm.isBookmarkedDiscussion;\r\n ShippingDetailsService.getBookmarks(type).then(function(successResponse){\r\n\r\n vm.bookmarks = successResponse;\r\n //vm.bookmarks.filter(isCurrentShipment);\r\n angular.forEach(vm.bookmarks, function(value, key) {\r\n vm.bookmarksCount1 += 1;\r\n });\r\n if (!vm.isBookmarkedDiscussion){\r\n // The bookmark has already been removed elsewhere, don't try it again\r\n if (startBookmarked) {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-already-removed-toast.html');\r\n vm.setBookmarkButtonDiscussion(false);\r\n }else if(vm.bookmarksCount1 || vm.bookmarksCount1 == 0) {\r\n /* Bookmark the shipment */\r\n //vm.bookmarkButtonText = \"SHIPPINGDETAILS.BOOKMARKING\";\r\n vm.isBookmarkingDiscussion = true; // Disable the button\r\n ShippingDetailsService.bookmarkShipment(type).then(function(shipment){\r\n vm.setBookmarkButtonDiscussion(true);\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-discussion-toast.html');\r\n }).catch(function(err) {\r\n vm.isBookmarkingDiscussion = false;\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-discussion-toast.error.html');\r\n });\r\n /* We've hit our limit, we need to remove bookmarks */\r\n }\r\n else {\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-limit-toast.html');\r\n ShippingDetailsService.getBookmarks(type);\r\n }\r\n /* Remove the bookmark */\r\n } else {\r\n vm.isBookmarkingDiscussion = true; // Disable the button\r\n ShippingDetailsService.unBookmarkShipmentDiscussion(type).then(function(shipment){\r\n if (shipment.discussion_bookmark_id < 1){\r\n vm.setBookmarkButtonDiscussion(false);\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/remove-bookmark-discussion-toast.html');\r\n }\r\n vm.isBookmarkingDiscussion = false;\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n }).catch(function(err) {\r\n if(err.data.errors[0]) vm.bookmarkShipmentError = err.data.errors[0];\r\n vm.isBookmarkingDiscussion = false;\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/bookmark-toast.error.html');\r\n });\r\n }\r\n\r\n function getConsigneeAddress(data){\r\n var address_labels = [\"consigneeaddress1\", \"consigneeaddress2\", \"consigneeaddress3\", \"consigneeaddress4\", \"consigneecity\", \"consigneecountry\"];\r\n return address_labels.map(function(d){return data[d];})\r\n .filter(function(d){return d && d !== null && d !== \"\";});\r\n }\r\n\r\n function getShipperAddress(data){\r\n var address_labels = [\"shipperaddress1\", \"shipperaddress2\", \"shipperaddress3\", \"shipperaddress4\", \"shippercity\", \"shippercountry\"];\r\n return address_labels.map(function(d){return data[d];})\r\n .filter(function(d){return d && d !== null && d !== \"\";});\r\n }\r\n\r\n function calcInvoiceTotal(){\r\n var inv = vm.data ? (vm.data.shipment_invoices_without_credit_note ? vm.data.shipment_invoices_without_credit_note : undefined) : undefined;\r\n var sum = 0;\r\n if (inv){\r\n inv.map(function(d){sum += +d.totalinvoiceamount;});\r\n return sum;\r\n } else {\r\n return sum;\r\n }\r\n }\r\n\r\n function setBookmarkButton(isMarked){\r\n if (isMarked){\r\n vm.isBookmarked = true;\r\n vm.bookmarkButtonText = 'SHIPPINGDETAILS.REMOVE_BOOKMARK';\r\n } else {\r\n vm.isBookmarked = false;\r\n vm.bookmarkButtonText ='SHIPPINGDETAILS.BOOKMARK_SHIPMENT';\r\n }\r\n }\r\n\r\n function setBookmarkButtonDiscussion(isMarked){\r\n if (isMarked){\r\n vm.isBookmarkedDiscussion = true;\r\n vm.bookmarkButtonTextDiscussion = 'SHIPPINGDETAILS.REMOVE_BOOKMARK_DISCUSSION';\r\n } else {\r\n vm.isBookmarkedDiscussion = false;\r\n vm.bookmarkButtonTextDiscussion ='SHIPPINGDETAILS.BOOKMARK_SHIPMENT_DISCUSSION';\r\n }\r\n }\r\n\r\n function setBookmarkButtonNotification(isMarked){\r\n if (isMarked){\r\n vm.isBookmarkedNotification = true;\r\n } else {\r\n vm.isBookmarkedNotification = false;\r\n }\r\n }\r\n\r\n\r\n\r\n function getShipment(ref_num){\r\n\r\n vm.isLoading = true;\r\n ShippingDetailsService.getShipment(ref_num).then(function(d){\r\n\r\n if(d.shipment_containers.length > 0){\r\n vm.defaultContainer = true;\r\n }else{\r\n vm.defaultContainer = false;\r\n }\r\n\r\n\r\n if ($location.path().indexOf('/shipping-details') === -1) return;\r\n\r\n var updatedData = {},\r\n arrival = d.destinationcountrycode + d.destinationcitycode,\r\n departure = d.origincountrycode + d.origincitycode;\r\n\r\n if (d.potential_exceptions) {\r\n // Loop through potential exceptions and set the city\r\n // and the arrival/departure\r\n angular.forEach(d.potential_exceptions, function(exc) {\r\n //// console.log(exc);\r\n if (exc.city_codes.indexOf(arrival) !== -1) {\r\n exc['city'] = d.destination;\r\n exc['port_usage'] = 'Arrival'\r\n } else if (exc.city_codes.indexOf(departure) !== -1) {\r\n exc['city'] = d.origin;\r\n exc['port_usage'] = 'Departure'\r\n }\r\n })\r\n updatedData = d;\r\n } else {\r\n updatedData = d;\r\n }\r\n\r\n /* Parse shipping dates by their concatenated nonformat */\r\n function parseDate(datetime){ return moment(datetime, 'YYYYMMDDHHmm').valueOf();}\r\n\r\n /* Retrieve Milestones sortable attribute by actual date + time, then by estimated date + time, and finally by sno */\r\n function sortMilestonesBy(milestone){\r\n return milestone.actualdate ?\r\n parseDate(milestone.actualdate + milestone.actualtime) :\r\n milestone.estimateddate ?\r\n parseDate(milestone.estimateddate + milestone.estimatedtime) :\r\n milestone.sno;\r\n }\r\n\r\n //if(updatedData.shipment_milestones != undefined){\r\n // updatedData.shipment_milestones.sort(function(a, b) {\r\n // var milestone_a = sortMilestonesBy(a), milestone_b = sortMilestonesBy(b);\r\n // if (milestone_a == milestone_b){\r\n // return a.sno < b.sno ? -1 : (a.sno > b.sno ? 1 : 0);\r\n // } else {\r\n // return milestone_a < milestone_b ? -1 : (milestone_a > milestone_b ? 1 : 0);\r\n // }\r\n // });\r\n //}\r\n vm.data = updatedData;\r\n\r\n\r\n addLastMilestone();\r\n vm.data.under_exception = (vm.data.potential_exceptions && vm.data.potential_exceptions.length > 0) || (vm.data.exceptions && vm.data.exceptions.length > 0);\r\n vm.referenceNumberObject = getReferenceNumberObject(vm.data.shipment_references);\r\n vm.isReferenceNumbers = !isEmpty(vm.referenceNumberObject);\r\n vm.isLoading = false;\r\n setDaysRemaining(); //sets the variable for days remaining\r\n setProgressStatus();\r\n //// console.log(d.potential_exceptions[0]);\r\n //vm.data.potential_exceptions = d.potential_exceptions[0];\r\n //call bar animation after we have data\r\n //vm.isBookmarked = shipment.bookmark_id > 0;\r\n setBookmarkButton(vm.data.bookmark_id > 0);\r\n setBookmarkButtonDiscussion(vm.data.discussion_bookmark_id > 0);\r\n setBookmarkButtonNotification(vm.data.discussion_notification_id > 0);\r\n vm.unseen_discussion_count = vm.data.unseen_discussion_count;\r\n if(vm.unseen_discussion_count > 0){\r\n vm.markReadCheck = false;\r\n }\r\n //set the bar percentage and give it animation\r\n vm.barPercentage = getBarPercentage();\r\n\r\n vm.chatContactsAutocomplete(vm.data.gshpid,'');\r\n\r\n ContactsService.setSubjectStatuses({shipmentDetails:{\r\n potentialException: vm.data.potential_exceptions && vm.data.potential_exceptions.length > 0,\r\n currentException: vm.data.exceptions && vm.data.exceptions.length > 0,\r\n shipmentDetails: true\r\n }});\r\n\r\n vm.pins = [{\r\n \"latitude\": (vm.data.geocodes != undefined)?vm.data.geocodes.origin_lat:'',\r\n \"longitude\": (vm.data.geocodes != undefined)?vm.data.geocodes.origin_lng:'',\r\n \"type\": \"origin\"\r\n }, {\r\n \"latitude\": (vm.data.geocodes != undefined)?vm.data.geocodes.dest_lat:'',\r\n \"longitude\": (vm.data.geocodes != undefined)?vm.data.geocodes.dest_lng:'',\r\n \"type\": \"destination\"\r\n }]\r\n\r\n vm.topLanePairs = [{\r\n \"origin\": {\r\n \"latitude\": (vm.data.geocodes != undefined)?vm.data.geocodes.origin_lat:'',\r\n \"longitude\": (vm.data.geocodes != undefined)?vm.data.geocodes.origin_lng:'',\r\n \"type\": \"origin\"\r\n },\r\n \"destination\": {\r\n \"latitude\": (vm.data.geocodes != undefined)?vm.data.geocodes.dest_lat:'',\r\n \"longitude\": (vm.data.geocodes != undefined)?vm.data.geocodes.dest_lng:'',\r\n \"type\": \"destination\"\r\n }\r\n }]\r\n\r\n vm.settings = {\r\n \"laneColor\": [\"#85D9A4\"]\r\n }\r\n vm.containerDetails = JSON.parse(JSON.stringify(getAllContainers()))\r\n if(vm.user.cww_is_container_display == true){\r\n //if(vm.user){\r\n vm.IsContainerVisible = true;\r\n angular.forEach(vm.containerDetails, function (value, key) {\r\n if(key<2){\r\n value[0].expandBtn = true;\r\n angular.forEach(value, function (val2, k2) {\r\n val2.show = true;\r\n\r\n });\r\n }\r\n });\r\n }else if (vm.user.cww_is_container_display == null || vm.user.cww_is_container_display == undefined){\r\n vm.IsContainerVisible = false;\r\n }\r\n else{\r\n vm.IsContainerVisible = false;\r\n }\r\n }).catch(function(err) {\r\n vm.isLoading = false;\r\n vm.failedToRetrieveData = err.data.error;\r\n });\r\n }\r\n\r\n function getReferenceNumbers(referencenumbers){\r\n return referencenumbers.filter(onlyUnique);\r\n\r\n }\r\n\r\n function onlyUnique(value, index, self) {\r\n return self.indexOf(value) === index;\r\n }\r\n\r\n function getReferenceNumberObject(data) {\r\n return data.reduce(function (group, reference) {\r\n if (!group[reference.referencecode]) {\r\n group[reference.referencecode] = [];\r\n }\r\n group[reference.referencecode].push(reference.referencenumber);\r\n return group;\r\n }, {});\r\n }\r\n\r\n //checks if the key is in the object\r\n function objectContainsKey(key, object) {\r\n\r\n for (var k in object) {\r\n for(var j in object[k]){\r\n if(object[k][j] == key) return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n function isEmpty(obj) {\r\n for(var prop in obj) {\r\n if(obj.hasOwnProperty(prop))\r\n return false;\r\n }\r\n return true;\r\n // return Object.keys(obj).length === 0;\r\n }\r\n\r\n function getToastPosition() {\r\n sanitizePosition();\r\n return Object.keys(vm.toastPosition)\r\n .filter(function(pos) { return vm.toastPosition[pos]; })\r\n .join(' ');\r\n }\r\n\r\n function getBarPercentage() {\r\n //get the percentage for the days reamining bar\r\n var percentage = 0;\r\n var today = new Date();\r\n var duedate = new Date(vm.data.duedate);\r\n var departdate = new Date(vm.data.departuredate);\r\n var denomDiff = duedate.getTime() - departdate.getTime();\r\n var numDiff = today.getTime() - departdate.getTime();\r\n if(numDiff > denomDiff) {\r\n percentage = 100;\r\n } else {\r\n percentage = (numDiff / denomDiff) * 100;\r\n }\r\n return percentage;\r\n }\r\n\r\n function setDaysRemaining() {\r\n var today = new Date();\r\n var duedate = new Date(vm.data.duedate);\r\n var timeDiff = duedate.getTime() - today.getTime();\r\n var diffDays = 0;\r\n if(timeDiff > 0) diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));\r\n vm.daysRemaining = diffDays;\r\n }\r\n\r\n function convertDate(date){\r\n if (date && date.length == 8 && !isNaN(date)){\r\n return date.substring(0,4)+'-'+ date.substring(4,6)+'-'+date.substring(6,8);\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n function convertTime(time){\r\n if (time && time.length == 4 && !isNaN(time)){\r\n return time.substring(0,2)+':'+time.substring(2,4);\r\n } else {\r\n return \"\";\r\n }\r\n }\r\n\r\n function getReasonDescription(milestone) {\r\n if (!milestone.reasoncode) return '';\r\n if (milestone.reasondescription) return milestone.reasondescription;\r\n // see if we can find it in the exceptions and give that description back\r\n var desc = '';\r\n angular.forEach(vm.data.exceptions, function(e) {\r\n if (e.milestonecode == milestone.milestonecode) {\r\n desc = e.description;\r\n }\r\n });\r\n return desc;\r\n }\r\n\r\n function docDate(path){\r\n var pad = \"00\";\r\n var content = path.split(\"/\");\r\n return convertDate(content[1]+\r\n pad.substring(0,pad.length-content[2].length)+content[2]+\r\n pad.substring(0,pad.length-content[3].length)+content[3]);\r\n }\r\n\r\n function docName(path){\r\n var content = path.split(\"/\");\r\n return content[content.length-1];\r\n }\r\n\r\n function sanitizePosition() {\r\n var current = vm.toastPosition;\r\n if ( current.bottom && vm.last.top ) current.top = false;\r\n if ( current.top && vm.last.bottom ) current.bottom = false;\r\n if ( current.right && vm.last.left ) current.left = false;\r\n if ( current.left && vm.last.right ) current.right = false;\r\n vm.last = angular.extend({},current);\r\n }\r\n\r\n function showInvoice(ev, _invoice_){\r\n $log.debug(_invoice_);\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/invoices/invoice.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n locals: {\r\n invoice: _invoice_,\r\n address: vm.getShipperAddress(_invoice_),\r\n invoice_date: vm.convertDate(_invoice_.invoicedate)\r\n },\r\n controller: function DialogController($scope, $mdDialog, invoice, address, invoice_date){\r\n $scope.invoice = invoice;\r\n $scope.address = address;\r\n $scope.invoice_date = invoice_date;\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n }\r\n\r\n // function getContainers(){\r\n // var containers = vm.data.shipment_containers;\r\n // var containerHistory = {};\r\n // /* Build a container history */\r\n // for (var i in containers){\r\n // if (containers[i].eventtime && containers[i].eventtime.length == 4){\r\n // containers[i].eventtime = vm.convertTime(containers[i].eventtime);\r\n // }\r\n // if (containerHistory[containers[i].contno]){\r\n // containerHistory[containers[i].contno].push(containers[i]);\r\n // } else {\r\n // containerHistory[containers[i].contno] = [containers[i]];\r\n // }\r\n // }\r\n // /* Reorder all the containers by descending order for their sno (serial number) value */\r\n // for (var container in containerHistory){\r\n // containerHistory[container] = $filter('orderBy')(containerHistory[container], '-sno');\r\n // }\r\n // /* Generate the list of containers */\r\n // var containers2 = [];\r\n // for (container in containerHistory){\r\n // containers2.push(containerHistory[container][0]);\r\n // }\r\n // containers2.sort(function(a,b){\r\n // return b.length - a.length;\r\n // });\r\n // containers2.reverse();\r\n // /* Keep the history for details access */\r\n // vm.containerHistory = containerHistory;\r\n // return containers2;\r\n // }\r\n\r\n\r\n\r\n function getAllContainers(){\r\n var containers = vm.data.shipment_containers;\r\n\r\n var containerHistory = {};\r\n /* Build a container history */\r\n for (var i in containers){\r\n if (containers[i].eventtime && containers[i].eventtime.length == 4){\r\n containers[i].eventtime = vm.convertTime(containers[i].eventtime);\r\n }\r\n if (containerHistory[containers[i].contno]){\r\n containerHistory[containers[i].contno].push(containers[i]);\r\n } else {\r\n containerHistory[containers[i].contno] = [containers[i]];\r\n }\r\n\r\n containers[i].show = false;\r\n }\r\n\r\n for (var container in containerHistory){\r\n containerHistory[container] = containerHistory[container];\r\n }\r\n /* Generate the list of containers */\r\n var containers2 = [];\r\n var containers3 = [];\r\n\r\n for (container in containerHistory){\r\n // containers2.push(containerHistory[container][0]);\r\n containerHistory[container][0].show = false;\r\n containers2.push(containerHistory[container][0]);\r\n containers3.push(containerHistory[container]);\r\n }\r\n\r\n containers2.sort(function(a,b){\r\n return b.length - a.length;\r\n });\r\n containers3.sort(function(a,b){\r\n return b.length - a.length;\r\n });\r\n containers2.reverse();\r\n containers3.reverse();\r\n\r\n /* Keep the history for details access */\r\n vm.containerHistory = containerHistory;\r\n\r\n return containers3;\r\n }\r\n\r\n\r\n function showContainerDetails(container,idx) {\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n\r\n vm.history = vm.containerHistory[container];\r\n\r\n\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/containers/container-details.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n fullscreen: useFullScreen,\r\n locals: {\r\n history: vm.containerHistory[container]\r\n },\r\n controller: function DialogController($scope, $mdDialog, history){\r\n\r\n $scope.history = history;\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n }\r\n\r\n\r\n function showAllConaintersData(id,val){\r\n if(vm.containerDetails[id][0].show == true){\r\n vm.containerDetails[id][0].show = false;\r\n val.expandBtn = false;\r\n\r\n }else{\r\n\r\n vm.containerDetails[id][0].show = true;\r\n val.expandBtn = true;\r\n }\r\n }\r\n\r\n function showModal(ev, modal) {\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/shipping-details/' + modal + '.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose: true,\r\n scope: $scope,\r\n preserveScope: true,\r\n fullscreen: useFullScreen\r\n });\r\n }\r\n\r\n function showExceptionsModal(ev, list) {\r\n vm.exceptionList = list;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n scope: $scope.$new(),\r\n templateUrl: '/app/shipping-details/potential-exceptions/potential-exceptions.modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n preserveScope: true,\r\n clickOutsideToClose: true,\r\n controller: 'ShipmentPotentialExceptionsController',\r\n controllerAs: 'sdpeCtrl',\r\n fullscreen: useFullScreen\r\n });\r\n }\r\n\r\n function doneBookmark(type){\r\n ShippingDetailsService.getBookmarks(type).then(function(bookmarks){\r\n vm.setBookmarkButton(false);\r\n angular.forEach(bookmarks,function(data){\r\n if(data.bookmark_id == vm.data.bookmark_id){\r\n vm.setBookmarkButton(true);\r\n }\r\n });\r\n\r\n }).catch(function(err){\r\n });\r\n }\r\n\r\n function closeModal(event) {\r\n if (event && event.button == 1) return; // ignore middle clicks\r\n doneBookmark('normal');\r\n $mdDialog.cancel();\r\n }\r\n\r\n //links to the dashboard\r\n function jumpToDashboard() {\r\n $location.url('/');\r\n $mdDialog.cancel();\r\n }\r\n\r\n function addLastMilestone(){\r\n\r\n var currentDate = new Date();\r\n vm.data.currentDate = currentDate;\r\n var dueDate = new Date(vm.data.shipment_display_date);\r\n vm.data.duedatenew = dueDate;\r\n\r\n vm.data.daysRemainingNew = Math.round((dueDate - currentDate)/(3600000*24));\r\n vm.data.daysLateNew = Math.round((currentDate - dueDate)/(3600000*24));\r\n\r\n\r\n if(vm.data.shipment_milestones_view){\r\n var counterFlag = false;\r\n\r\n\r\n angular.forEach(vm.data.shipment_milestones_view, function(data,key){\r\n if(!counterFlag){\r\n if(data.actualdate == \"\" || !data.actualdate){\r\n vm.data.nextmilestone = vm.data.shipment_milestones_view[key];\r\n if(key > 0){\r\n vm.data.lastmilestone = vm.data.shipment_milestones_view[key-1];\r\n }\r\n counterFlag = true;\r\n\r\n\r\n }\r\n }\r\n });\r\n if(counterFlag == false){\r\n vm.data.lastmilestone = vm.data.shipment_milestones_view[vm.data.shipment_milestones_view.length-1];\r\n }\r\n\r\n }\r\n }\r\n\r\n function gotoMilestome() {\r\n // set the location.hash to the id of\r\n // the element you wish to scroll to.\r\n $location.hash('milestones-area');\r\n\r\n // call $anchorScroll()\r\n $anchorScroll();\r\n }\r\n\r\n vm.switchUser = false;\r\n if(localStorage.switchEmailCwwType){\r\n vm.switchUser = true;\r\n }else if(localStorage.userCompanyCww){\r\n vm.switchUser = true;\r\n }else if(localStorage.userDepartmentCww){\r\n vm.switchUser = true;\r\n }\r\n\r\n function getComments(){\r\n\r\n var url = api.url_v2+'/shipments/'+vm.ref_num+'/shipment_comments?customer_type=cww';\r\n\r\n if(localStorage.customerType == 'cww'){\r\n if(localStorage.switchEmailCwwType){\r\n url +=\"&userEmail=\"+localStorage.switchEmailCwwType;\r\n }else if(localStorage.userCompanyCww){\r\n url +=\"&userCompany=\"+encodeURIComponent(localStorage.userCompanyCww);\r\n }else if(localStorage.userDepartmentCww){\r\n url +=\"&userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCww)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCww;\r\n }else if(localStorage.dummyUser){\r\n url +=\"&dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser);\r\n }\r\n }\r\n\r\n ShippingDetailsService.getDiscussionData(url).then(function(resp){\r\n\r\n vm.discussion_chat = angular.copy(resp);\r\n vm.original_discussion_chat = angular.copy(resp);\r\n\r\n }).catch(function(err) {\r\n\r\n\r\n });\r\n\r\n }\r\n\r\n vm.autocompletetimer = null\r\n function chatContactsAutocomplete(id, searchText){\r\n //if(searchText.length > 2){\r\n vm.autocompleteData=\"\";\r\n\r\n if(searchText == \"\"){\r\n var query = {field: 'shipment_contacts', shipment_id:id, value: searchText};\r\n chatContactsList(query);\r\n }\r\n if(searchText.length!=0){\r\n var query = {field: 'shipment_contacts', shipment_id:id, value: searchText};\r\n if(query.value != \"\"){\r\n if(vm.autocompletetimer)\r\n clearTimeout(vm.autocompletetimer)\r\n vm.autocompletetimer = setTimeout(function(){\r\n chatContactsList(query);\r\n },500);\r\n }\r\n }else{\r\n if(vm.autocompletetimer)\r\n clearTimeout(vm.autocompletetimer)\r\n }\r\n }\r\n\r\n function chatContactsList(query){\r\n\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n\r\n vm.company_contacts = response.data;\r\n\r\n }, function errorCallback(error){\r\n\r\n });\r\n\r\n }\r\n\r\n function chatSoket(){\r\n\r\n //shipment_commnets/#{self.shipment_id}/comments/new\r\n var url = '/shipment_comments/'+vm.ref_num+'/comments/new';\r\n\r\n try {\r\n\r\n var faye = new Faye.Client(downloadLink.url+'/faye/faye');\r\n\r\n faye.subscribe(url, function (data) {\r\n\r\n var dataComment = JSON.parse(data);\r\n\r\n var tempArray = angular.copy(vm.original_discussion_chat);\r\n\r\n /* appending */\r\n\r\n var current_date = moment().format(\"YYYY-MM-DD\");\r\n\r\n if(!dataComment.parent_id){\r\n\r\n dataComment.replies = dataComment.replies || [];\r\n\r\n if(vm.discussion_chat[current_date]){\r\n\r\n vm.discussion_chat[current_date].push(dataComment);\r\n tempArray[current_date].push(angular.copy(dataComment));\r\n\r\n }else{\r\n\r\n var new_object = new Object();\r\n\r\n //new_object[current_date] = [dataComment];\r\n vm.discussion_chat[current_date] = [dataComment];\r\n tempArray[current_date] = angular.copy([dataComment]);\r\n }\r\n\r\n }else{\r\n\r\n vm.discussion_chat = angular.forEach(vm.discussion_chat, function(chat_data,i) {\r\n\r\n angular.forEach(chat_data, function(chat_msgs,k) {\r\n\r\n if(chat_msgs.id == dataComment.parent_id){\r\n\r\n chat_msgs.replies = chat_msgs.replies || [];\r\n chat_msgs.replies.push(dataComment);\r\n\r\n tempArray[i][k].replies = tempArray[i][k].replies || [];\r\n tempArray[i][k].replies.push(angular.copy(data));\r\n\r\n }\r\n\r\n });\r\n\r\n });\r\n\r\n }\r\n\r\n vm.original_discussion_chat = angular.copy(tempArray);\r\n\r\n /*$timeout(function () {\r\n\r\n //scroll comment section.\r\n\r\n if(dataComment.parent_id){\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+dataComment.id));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_text'+dataComment.parent_id ) )[0].innerHTML=\"\";\r\n\r\n }else{\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.msg_section'+dataComment.id));\r\n\r\n container.scrollTo(scrollElement, 0, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML=\"\";\r\n\r\n }\r\n\r\n showReplyTextBox('', '');\r\n\r\n }, 200);*/\r\n\r\n\r\n });\r\n }\r\n\r\n catch(e) {\r\n }\r\n\r\n }\r\n\r\n $scope.userFilter = \"\";\r\n\r\n $scope.focusIndex = 0;\r\n\r\n $scope.keys = [];\r\n\r\n vm.comment_text_array = [];\r\n\r\n $scope.replyId = '';\r\n $scope.cursorPointerLocation = 0;\r\n\r\n //vm.sortUser = '';\r\n\r\n\r\n\r\n function showReplyTextBox(msg_id, usr_id){\r\n\r\n $scope.replyId = msg_id;\r\n\r\n $scope.focusIndex = 0;\r\n //vm.discussion_comment_text = '';\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML = \"\";\r\n vm.tagged_users = [];\r\n vm.tagged_users_name = [];\r\n $scope.cursorPointerLocation=0;\r\n\r\n $timeout(function () {\r\n\r\n angular.element('.chat_input_text'+msg_id)[0].innerHTML = '';\r\n angular.element( document.querySelector('.chatMainInput .userLists' )).addClass('hide');\r\n angular.element( document.querySelector('.chatSubInput .userLists' )).addClass('hide');\r\n\r\n angular.element('.replyTextBoxDiv').addClass(\"hide\");\r\n\r\n\r\n if(msg_id && usr_id){\r\n angular.element('.replyTextBoxDiv'+msg_id).removeClass(\"hide\");\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.replyTextBoxDiv'+msg_id));\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n }\r\n\r\n }, 100);\r\n\r\n }\r\n\r\n\r\n $scope.userSelect = function (event, index, name, parentId, email ) {\r\n\r\n //$scope.focusIndex = index;\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n var discussion_text = angular.element( document.querySelectorAll( '.chat_input_main_text' ) );\r\n\r\n if(parentId){\r\n\r\n element = document.querySelector('.chatSubInput'+parentId+' .userLists' );\r\n //var discussion_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n discussion_text = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) );\r\n vm.replyTagPopup = false;\r\n }\r\n\r\n vm.commentTagPopup = false;\r\n\r\n vm.tagged_users.push(email);\r\n vm.tagged_users_name.push(name);\r\n\r\n angular.element( element ).addClass('hide');\r\n vm.userListOpen = false;\r\n //angular.element( element ).blur();\r\n //event.preventDefault();\r\n //discussion_text.focus();\r\n set_cursor(discussion_text[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n //event.preventDefault();\r\n var test = getPrecedingChar(discussion_text[0]);\r\n\r\n var range = window.getSelection().getRangeAt(0),\r\n content = range.extractContents(),\r\n span = document.createElement('SPAN');\r\n\r\n span.appendChild(content);\r\n var htmlContent = span.innerHTML;\r\n\r\n range.insertNode(span);\r\n\r\n\r\n\r\n var currentCursorPoint = range.startOffset;\r\n\r\n var currentLineStringsAfterCursor = range.startContainer.textContent.slice(range.startOffset,range.startContainer.textContent.length);\r\n\r\n var currentLineStringsUptoCursor = range.startContainer.textContent.slice(0,range.startOffset);\r\n\r\n var textAfterAtSymbol = currentLineStringsUptoCursor.slice(currentLineStringsUptoCursor.lastIndexOf(\"@\")+1,range.startOffset);\r\n\r\n var removeStringAftreAtSymbol = textAfterAtSymbol.length;\r\n\r\n //adjusting cursor point\r\n\r\n $scope.cursorPointerLocation = $scope.cursorPointerLocation - removeStringAftreAtSymbol;\r\n\r\n var lastAtSymbolPosition = currentLineStringsUptoCursor.lastIndexOf(\"@\")+1;\r\n\r\n var beforeAtSymbol = currentLineStringsUptoCursor.slice(0,currentLineStringsUptoCursor.lastIndexOf(\"@\")+1);\r\n var afterAtSymbol = currentLineStringsUptoCursor.slice(lastAtSymbolPosition,currentCursorPoint);\r\n\r\n afterAtSymbol = name+' ';\r\n\r\n currentLineStringsUptoCursor = beforeAtSymbol+afterAtSymbol;\r\n\r\n range.startContainer.textContent = currentLineStringsUptoCursor+currentLineStringsAfterCursor;\r\n\r\n //adjusting cursor point\r\n $scope.cursorPointerLocation = $scope.cursorPointerLocation + name.length+1;\r\n\r\n //.lastIndexOf(\"@\")+1,range.startOffset = name;\r\n\r\n //$scope.pasteHtmlAtCaret(name+' ');\r\n\r\n set_cursor(discussion_text[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n\r\n };\r\n\r\n\r\n $scope.pasteHtmlAtCaret = function(html) {\r\n\r\n var sel, range;\r\n if (window.getSelection) {\r\n // IE9 and non-IE\r\n sel = window.getSelection();\r\n if (sel.getRangeAt && sel.rangeCount) {\r\n range = sel.getRangeAt(0);\r\n range.deleteContents();\r\n\r\n // Range.createContextualFragment() would be useful here but is\r\n // non-standard and not supported in all browsers (IE9, for one)\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = html;\r\n var frag = document.createDocumentFragment(), node, lastNode;\r\n while ( (node = el.firstChild) ) {\r\n lastNode = frag.appendChild(node);\r\n }\r\n range.insertNode(frag);\r\n\r\n // Preserve the selection\r\n if (lastNode) {\r\n range = range.cloneRange();\r\n range.setStartAfter(lastNode);\r\n\r\n range.collapse(true);\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n }\r\n }\r\n } else if (document.selection && document.selection.type != \"Control\") {\r\n // IE < 9\r\n document.selection.createRange().pasteHTML(html);\r\n }\r\n }\r\n\r\n\r\n $scope.openUserTagsDiv = function(ev, msgId){\r\n\r\n if(msgId){\r\n\r\n var element = angular.element('.chat_input_text'+msgId);\r\n\r\n }else{\r\n\r\n var element = angular.element('.chat_input_main_text');\r\n\r\n }\r\n\r\n //ev.preventDefault();\r\n\r\n //element.focus();\r\n\r\n set_cursor(element[0],$scope.cursorPointerLocation,$scope.cursorPointerLocation);\r\n\r\n //$scope.checkTagWord('',msgId,appendElement);*/\r\n\r\n $scope.pasteHtmlAtCaret('@');\r\n\r\n }\r\n\r\n\r\n $scope.checkTagWord = function(ev, parentId, node){\r\n\r\n var discussion_comment_html = angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML;\r\n var discussion_comment_text = angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerText;\r\n\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n\r\n vm.discussion_text = discussion_comment_text;\r\n\r\n if(discussion_comment_text.trim() != \"\" || $scope.files.length > 0){\r\n vm.submitBtn = false;\r\n }else{\r\n vm.submitBtn = true;\r\n vm.commentTagPopup = false;\r\n }\r\n\r\n if(parentId){\r\n //discussion_comment_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n discussion_comment_html = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerHTML;\r\n discussion_comment_text = angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerText;\r\n element = document.querySelector('.chatSubInput'+parentId+' .userLists' );\r\n\r\n vm.discussion_text = discussion_comment_text;\r\n\r\n if(discussion_comment_text.trim() != \"\" || $scope.files.length > 0){\r\n vm.submitBtnReply = false;\r\n }else{\r\n vm.submitBtnReply = true;\r\n vm.replyTagPopup = false;\r\n }\r\n }\r\n\r\n if(ev){\r\n //ev.stopPropagation;\r\n }\r\n\r\n\r\n if(discussion_comment_text){\r\n\r\n if(discussion_comment_text.length > 0){\r\n\r\n /*if((discussion_comment_text[discussion_comment_text.length - 1] == '@') ){\r\n vm.userListOpen = true;\r\n }*/\r\n\r\n vm.curserPointData = getPrecedingChar(ev.target);\r\n\r\n if((ev.key == '@')){\r\n\r\n if(vm.curserPointData[vm.curserPointData.length -1] == '@' ){\r\n vm.userListOpen = true;\r\n if(parentId){ vm.replyTagPopup = true; vm.commentTagPopup = false; }\r\n else{ vm.commentTagPopup = true; vm.replyTagPopup = false; }\r\n }\r\n\r\n }else{\r\n if(vm.curserPointData[vm.curserPointData.length - 1] == '@'){\r\n vm.userListOpen = true;\r\n if(parentId){ vm.replyTagPopup = true; vm.commentTagPopup = false; }\r\n else{ vm.commentTagPopup = true; vm.replyTagPopup = false; }\r\n }\r\n }\r\n\r\n if(vm.userListOpen && (vm.curserPointData.slice(0,vm.curserPointData.length).lastIndexOf('@') > -1) ){\r\n\r\n //if(discussion_comment_text[vm.curserPointData]){\r\n\r\n\r\n $scope.userFilter = vm.curserPointData.slice(vm.curserPointData.lastIndexOf('@') + 1, vm.curserPointData.length);\r\n if($scope.userFilter != \"\"){\r\n vm.chatContactsAutocomplete(vm.data.gshpid,$scope.userFilter);\r\n }\r\n if($scope.userFilter == \"\"){\r\n vm.chatContactsAutocomplete(vm.data.gshpid,$scope.userFilter);\r\n }\r\n\r\n //$scope.userFilter = a.slice((a.lastIndexOf('@') + 1),a.length);\r\n\r\n if($scope.userFilter.indexOf(' ') > -1){\r\n $scope.userFilter = $scope.userFilter.replace(' ',' ');\r\n }\r\n\r\n $timeout(function () {\r\n\r\n if($scope.focusIndex > (element.getElementsByTagName('article').length - 1)){\r\n $scope.focusIndex = 0;\r\n }\r\n\r\n }, 100);\r\n\r\n if((angular.element(element).hasClass('hide')) && vm.company_contacts.length){\r\n\r\n angular.element( element ).removeClass('hide');\r\n scrollContainer(10,500);\r\n if(!parentId){\r\n var container = document.querySelector(\".chatMainInput\");\r\n }else{\r\n var container = document.querySelector(\".chatSubInput\"+parentId);\r\n }\r\n\r\n if(node){\r\n ev.target = node;\r\n }\r\n\r\n var clientX,clientY;\r\n var cursor_point_length = getCursorCoOrdinates(ev.target,'','',element);\r\n\r\n clientX = cursor_point_length.x;\r\n clientY = cursor_point_length.y;\r\n\r\n if(angular.element('.sidebar').hasClass('md-locked-open')) {\r\n\r\n element.style.left = (clientX - 260) + \"px\";\r\n\r\n if((element.offsetWidth + (clientX -260)) > container.offsetWidth ) {\r\n element.style.right = \"0px\";\r\n element.style.left = null;\r\n }else{\r\n element.style.left = (clientX - 260) + \"px\";\r\n }\r\n\r\n } else{\r\n\r\n if((element.offsetWidth + (clientX -25)) > container.offsetWidth ) {\r\n\r\n element.style.right = \"0px\";\r\n element.style.left = null;\r\n\r\n }else{\r\n element.style.left = (clientX - 25) + \"px\";\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n //}\r\n\r\n }else{\r\n\r\n $scope.userFilter = '';\r\n //$scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n\r\n }\r\n\r\n }else{\r\n $scope.userFilter = '';\r\n $scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n //angular.element('body').css('position', 'relative');\r\n }\r\n\r\n }else{\r\n $scope.userFilter = '';\r\n $scope.focusIndex = 0;\r\n angular.element( element ).addClass('hide');\r\n //angular.element('body').css('position', 'relative');\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n function getPrecedingChar(element) {\r\n\r\n var precedingChar = \"\", sel, range, precedingRange;\r\n\r\n if (window.getSelection) {\r\n sel = window.getSelection();\r\n if (sel.rangeCount > 0) {\r\n range = sel.getRangeAt(0).cloneRange();\r\n range.collapse(true);\r\n range.setStart(element, 0);\r\n precedingChar = range.toString();\r\n }\r\n } else if ( (sel = document.selection) && sel.type != \"Control\") {\r\n range = sel.createRange();\r\n precedingRange = range.duplicate();\r\n precedingRange.moveToElementText(element);\r\n precedingRange.setEndPoint(\"EndToStart\", range);\r\n precedingChar = precedingRange.text;\r\n }\r\n\r\n //if(precedingChar.length > 0){\r\n\r\n $scope.cursorPointerLocation = precedingChar.length;\r\n\r\n //}\r\n\r\n return precedingChar;\r\n\r\n }\r\n\r\n $scope.setManualCrusorPoint = function(ev, className){\r\n\r\n //ev.preventDefault();\r\n var targetPt = getPrecedingChar(document.getElementsByClassName(className)[0]);\r\n vm.userListOpen = false;\r\n\r\n //set_cursor(document.getElementsByClassName(className)[0],targetPt.length,targetPt.length);\r\n //event.preventDefault();\r\n\r\n }\r\n\r\n function set_cursor(containerEl,start,end){\r\n\r\n var charIndex = 0, range = document.createRange();\r\n range.setStart(containerEl, 0);\r\n range.collapse(true);\r\n var nodeStack = [containerEl], node, foundStart = false, stop = false;\r\n\r\n while (!stop && (node = nodeStack.pop())) {\r\n if (node.nodeType == 3) {\r\n var nextCharIndex = charIndex + node.length;\r\n if (!foundStart && start >= charIndex && start <= nextCharIndex) {\r\n range.setStart(node, start - charIndex);\r\n foundStart = true;\r\n }\r\n if (foundStart && end >= charIndex && end <= nextCharIndex) {\r\n range.setEnd(node, end - charIndex);\r\n stop = true;\r\n }\r\n charIndex = nextCharIndex;\r\n } else {\r\n var i = node.childNodes.length;\r\n while (i--) {\r\n nodeStack.push(node.childNodes[i]);\r\n }\r\n }\r\n }\r\n\r\n var sel = window.getSelection();\r\n sel.removeAllRanges();\r\n sel.addRange(range);\r\n\r\n }\r\n\r\n function getCursorCoOrdinates(){\r\n\r\n var sel = document.selection, range, rect;\r\n var x = 0, y = 0;\r\n if (sel) {\r\n if (sel.type != \"Control\") {\r\n range = sel.createRange();\r\n range.collapse(true);\r\n x = range.boundingLeft;\r\n y = range.boundingTop;\r\n }\r\n } else if (window.getSelection) {\r\n sel = window.getSelection();\r\n if (sel.rangeCount) {\r\n range = sel.getRangeAt(0).cloneRange();\r\n if (range.getClientRects) {\r\n range.collapse(true);\r\n if (range.getClientRects().length>0){\r\n rect = range.getClientRects()[0];\r\n x = rect.left;\r\n y = rect.top;\r\n }\r\n }\r\n // Fall back to inserting a temporary element\r\n if (x == 0 && y == 0) {\r\n var span = document.createElement(\"span\");\r\n if (span.getClientRects) {\r\n // Ensure span has dimensions and position by\r\n // adding a zero-width space character\r\n span.appendChild( document.createTextNode(\"\\u200b\") );\r\n range.insertNode(span);\r\n rect = span.getClientRects()[0];\r\n x = rect.left;\r\n y = rect.top;\r\n var spanParent = span.parentNode;\r\n spanParent.removeChild(span);\r\n\r\n // Glue any broken text nodes back together\r\n spanParent.normalize();\r\n }\r\n }\r\n }\r\n }\r\n\r\n return {'x':x,'y':y};\r\n\r\n }\r\n\r\n\r\n $scope.$on('keydown', function( msg, obj ) {\r\n\r\n //https://next.plnkr.co/edit/C6KL3JdCkhgTMCH3trZb?p=preview&preview\r\n //https://www.cambiaresearch.com/articles/15/javascript-char-codes-key-codes\r\n\r\n var element = document.querySelector('.chatMainInput .userLists' );\r\n var replyMsg = false;\r\n\r\n if($scope.replyId){\r\n if(!(angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide'))){\r\n\r\n element = document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' );\r\n var replyMsg = true;\r\n\r\n }\r\n\r\n if((angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide')\r\n && obj.code.keyCode == 13 && !obj.code.shiftKey && !obj.code.altKey)){\r\n document.getElementById(\"replyBtn\").click();\r\n }\r\n }\r\n\r\n if(angular.element(element).hasClass('hide') && obj.code.keyCode == 8 ){\r\n vm.userListOpen = true;\r\n }\r\n else if(angular.element(element).hasClass('hide') && obj.code.keyCode == 13 && !obj.code.shiftKey && !obj.code.altKey){\r\n document.getElementById(\"commentBtn\").click();\r\n }\r\n else if(!angular.element(element).hasClass('hide')) {\r\n\r\n switch (obj.code.keyCode){\r\n\r\n case 8:\r\n\r\n // BACKSPACE\r\n vm.userListOpen = true;\r\n\r\n break;\r\n\r\n case 38 :\r\n\r\n //UP ARROW\r\n obj.code.preventDefault();\r\n\r\n if($scope.focusIndex == 0){\r\n\r\n $scope.focusIndex = 0;\r\n scrollContainer(10,500);\r\n }\r\n else{\r\n $scope.focusIndex--;\r\n scrollContainer(100,500);\r\n }\r\n\r\n break;\r\n\r\n case 40 :\r\n //debugger;\r\n //DOWN ARROW\r\n obj.code.preventDefault();\r\n\r\n if($scope.focusIndex == (element.getElementsByTagName('article').length - 1)){\r\n $scope.focusIndex = (element.getElementsByTagName('article').length - 1);\r\n }\r\n\r\n else{\r\n $scope.focusIndex++;\r\n }\r\n\r\n scrollContainer(10,500);\r\n\r\n break;\r\n\r\n case 27 :\r\n\r\n //ESCAPE\r\n //$scope.focusIndex = 0;\r\n //angular.element( element ).addClass('hide');\r\n //angular.element('.discussion_layout').triggerHandler('click');\r\n //vm.userListOpen = false;\r\n break;\r\n\r\n case 13 :\r\n\r\n //ENTER\r\n obj.code.preventDefault();\r\n\r\n //$scope.open( $scope.focusIndex , '');\r\n\r\n if(replyMsg){\r\n\r\n angular.element('.chatSubInput'+$scope.replyId+' .userLists .active-highlight').triggerHandler('click');\r\n angular.element( document.querySelector('.chatSubInput'+$scope.replyId+' .userLists')).addClass('hide');\r\n vm.replyTagPopup = false;\r\n\r\n }else{\r\n\r\n angular.element('.chatMainInput .userLists .active-highlight').triggerHandler('click');\r\n angular.element( document.querySelector('.chatMainInput .userLists' )).addClass('hide');\r\n vm.commentTagPopup = false;\r\n\r\n }\r\n\r\n vm.userListOpen = false;\r\n\r\n break;\r\n\r\n\r\n }\r\n\r\n\r\n $scope.$apply();\r\n\r\n }\r\n var val = window.document.querySelectorAll('.chat_input_main_text')[0].innerText\r\n if(val.trim() == \"\")\r\n window.document.querySelectorAll('.chat_input_main_text')[0].innerHTML = \"\"\r\n\r\n });\r\n\r\n\r\n function scrollContainer(fromPt, toPt){\r\n\r\n var container = angular.element(document.querySelector('.chatMainInput .userLists' ));\r\n\r\n var scrollElement = angular.element(document.querySelector('.chatMainInput .userLists .active-highlight'));\r\n\r\n if($scope.replyId){\r\n if(!(angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' )).hasClass('hide'))){\r\n\r\n container = angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists' ));\r\n scrollElement = angular.element(document.querySelector('.chatSubInput'+$scope.replyId+' .userLists .active-highlight'));\r\n\r\n }\r\n }\r\n\r\n container.scrollTo(scrollElement, fromPt, toPt);\r\n\r\n }\r\n\r\n\r\n function chat_text_submit(parentId){\r\n\r\n //var discussion_comment_text = vm.discussion_comment_text;\r\n\r\n var discussion_comment_text = window.document.querySelectorAll('.chat_input_main_text')[0].innerHTML;\r\n\r\n if(parentId){\r\n //discussion_comment_text = angular.element('.chat_input_text'+parentId)[0].value;\r\n\r\n discussion_comment_text = window.document.querySelector('.chat_input_text'+parentId).innerHTML;\r\n }\r\n\r\n if(discussion_comment_text.trim() != \"\" || ($scope.files.length > 0)){\r\n if(discussion_comment_text.length <= 2200){\r\n\r\n\r\n //Hypertext link creating\r\n\r\n var replacedText, replacePattern1, replacePattern2, replacePattern3;\r\n\r\n //Removing the existing anchor tags\r\n discussion_comment_text = discussion_comment_text.replace(/<(?!br\\s*\\/?)[^>]+>/g, '');\r\n\r\n //URLs starting with http://, https://, or ftp://\r\n replacePattern1 = /(\\b(https?|ftp):\\/\\/[-A-Z0-9+&@#\\/%?=~_|!:,.;]*[-A-Z0-9+&@#\\/%=~_|])/gim;\r\n replacedText = discussion_comment_text.replace(replacePattern1, '<a href=\"$1\" target=\"_blank\">$1</a>');\r\n\r\n //URLs starting with \"www.\" (without // before it, or it'd re-link the ones done above).\r\n replacePattern2 = /(^|[^\\/])(www\\.[\\S]+(\\b|$))/gim;\r\n replacedText = replacedText.replace(replacePattern2, '$1<a href=\"http://$2\" target=\"_blank\">$2</a>');\r\n\r\n //Change email addresses to mailto:: links.\r\n replacePattern3 = /(([a-zA-Z0-9\\-\\_\\.])+@[a-zA-Z\\_]+?(\\.[a-zA-Z]{2,6})+)/gim;\r\n replacedText = replacedText.replace(replacePattern3, '<a href=\"mailto:$1\">$1</a>');\r\n var user_name = ((vm.user.first_name)?vm.user.first_name:'')+' '+((vm.user.last_name)?vm.user.last_name:'');\r\n\r\n angular.forEach(vm.tagged_users_name,function(val,index){\r\n if(!replacedText.includes(val)){\r\n vm.tagged_users.splice(index, 1, '');\r\n }\r\n });\r\n\r\n var t_users = vm.tagged_users.filter(function (el) {\r\n return el != '';\r\n });\r\n\r\n\r\n $http({\r\n method: 'POST',\r\n url: api.url_v2 +'/shipments/'+vm.ref_num+'/shipment_comments',\r\n headers: { 'Content-Type': undefined },\r\n\r\n transformRequest: function (data) {\r\n var formData = new FormData();\r\n if(data.files && data.files.length > 0){\r\n for (var i = 0; i < data.files.length; i++) {\r\n if(data.files[i].type != \"savedFile\")\r\n formData.append(\"attachments[]\", data.files[i]);\r\n }\r\n }\r\n formData.append(\"comment_text\", replacedText);\r\n formData.append(\"user_id\", localStorage.getItem(\"user_id\"));\r\n formData.append(\"user_name\", user_name);\r\n formData.append(\"user_email\", localStorage.getItem(\"user_emailId\"));\r\n formData.append(\"parent_id\", (parentId?parentId:null));\r\n formData.append(\"tagged_users\", (t_users?t_users:[]));\r\n formData.append(\"shipment_type\", \"cww\");\r\n return formData;\r\n },\r\n data: { files: $scope.files }\r\n }).\r\n success(function (data, status, headers, config) {\r\n\r\n //var tempArray = angular.copy(vm.original_discussion_chat);\r\n\r\n vm.clearChatForm();\r\n vm.discussion_comment_text = '';\r\n discussion_comment_text = \"\";\r\n vm.tagged_users = [];\r\n\r\n window.document.querySelector('#chat_input_main_text').innerHTML = '';\r\n\r\n getComments();\r\n\r\n /*var current_date = moment().format(\"YYYY-MM-DD\");\r\n\r\n if(!data.comment.parent_id){\r\n\r\n data.comment.replies = data.comment.replies || [];\r\n\r\n if(vm.discussion_chat[current_date]){\r\n\r\n vm.discussion_chat[current_date].push(data.comment);\r\n tempArray[current_date].push(angular.copy(data.comment));\r\n //vm.original_discussion_chat[current_date].push(data.comment);\r\n\r\n }else{\r\n\r\n var new_object = new Object();\r\n\r\n //new_object[current_date] = [data.comment];\r\n vm.discussion_chat[current_date] = [data.comment];\r\n tempArray[current_date] = angular.copy([data.comment]);\r\n //vm.original_discussion_chat[current_date] = [data.comment];\r\n }\r\n\r\n }else{\r\n\r\n var index = 0;\r\n\r\n vm.discussion_chat = angular.forEach(vm.discussion_chat, function(chat_data,i) {\r\n\r\n angular.forEach(chat_data, function(chat_msgs,k) {\r\n\r\n if(chat_msgs.id == data.comment.parent_id){\r\n\r\n chat_msgs.replies = chat_msgs.replies || [];\r\n chat_msgs.replies.push(data.comment);\r\n\r\n tempArray[i][k].replies = tempArray[i][k].replies || [];\r\n tempArray[i][k].replies.push(angular.copy(data.comment));\r\n\r\n }\r\n\r\n });\r\n\r\n index++;\r\n\r\n });\r\n\r\n }\r\n\r\n vm.original_discussion_chat = angular.copy(tempArray);*/\r\n\r\n //scroll\r\n\r\n $timeout(function () {\r\n\r\n //scroll comment section.\r\n\r\n if(parentId){\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+data.comment.id));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_text'+parentId ) )[0].innerHTML=\"\";\r\n\r\n }else{\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.msg_section'+data.comment.id));\r\n\r\n container.scrollTo(scrollElement, 0, 500);\r\n\r\n angular.element( document.querySelectorAll( '.chat_input_main_text' ) )[0].innerHTML=\"\";\r\n\r\n }\r\n\r\n showReplyTextBox('', '');\r\n\r\n }, 300);\r\n\r\n //chatSoket();\r\n }).\r\n error(function (data, status, headers, config) {\r\n //vm.clearChatForm();\r\n if(data.messages[0]) vm.chatShipmentError = data.messages[0];\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/chat-toast.error.html');\r\n });\r\n }else{\r\n vm.chatShipmentError = \"Character string exceeds. Maximum character string allowed: 2200\"\r\n vm.showBookmarkToastWithUrl('/app/shipping-details/bookmark/chat-toast.error.html');\r\n }\r\n }\r\n }\r\n\r\n function getSuffixDate(number){\r\n\r\n number = $filter('date')(number, \"dd\");\r\n\r\n return ShippingDetailsService.getSuffixDate(number);\r\n }\r\n\r\n function reply_comment_display(msg_id,type,key,index_no){\r\n\r\n if(type == 'less'){\r\n\r\n angular.element('.expand_more'+msg_id).removeClass(\"hide\");\r\n angular.element('.expand_less'+msg_id).addClass(\"hide\");\r\n\r\n //expand_div1 sub_msg_details\r\n angular.element('.expand_div'+msg_id).addClass(\"hide\");\r\n angular.element('.sub_msg_details'+msg_id).removeClass(\"hide\");\r\n\r\n var replyCommentId = vm.discussion_chat[key][index_no].replies[vm.discussion_chat[key][index_no].replies.length-1].id;\r\n\r\n var container = angular.element(document.querySelector('.message_body' ));\r\n var scrollElement = angular.element(document.querySelector('.reply_msg_section'+replyCommentId));\r\n\r\n container.scrollTo(scrollElement, 100, 500);\r\n\r\n }\r\n\r\n if(type == 'more'){\r\n\r\n angular.element('.expand_more'+msg_id).addClass(\"hide\");\r\n angular.element('.expand_less'+msg_id).removeClass(\"hide\");\r\n\r\n //expand_div1 sub_msg_details\r\n angular.element('.expand_div'+msg_id).removeClass(\"hide\");\r\n angular.element('.sub_msg_details'+msg_id).addClass(\"hide\");\r\n }\r\n\r\n }\r\n\r\n function markRead(){\r\n if(!vm.markReadCheck){\r\n var cww_discussion_count = parseInt(localStorage.getItem('cww_discussion_count'));\r\n ShippingDetailsService.markAsRead().then(function(res){\r\n if(res.status == 200){\r\n var count = cww_discussion_count - vm.unseen_discussion_count;\r\n vm.markReadCheck = true;\r\n localStorage.setItem('cww_discussion_count',count);\r\n vm.unseen_discussion_count = 0;\r\n }\r\n }).catch(function(err) {\r\n });\r\n }\r\n }\r\n\r\n $(window).scroll(function() {\r\n var hT = $('#reference-area').offset().top,\r\n hH = $('#reference-area').outerHeight(),\r\n wH = $(window).height(),\r\n wS = $(this).scrollTop();\r\n if (wS > (hT+hH-wH)){\r\n if(!vm.markReadCheck){\r\n var cww_discussion_count = parseInt(localStorage.getItem('cww_discussion_count'));\r\n ShippingDetailsService.markAsRead().then(function(res){\r\n if(res.status == 200){\r\n var count = cww_discussion_count - vm.unseen_discussion_count;\r\n vm.markReadCheck = true;\r\n localStorage.setItem('cww_discussion_count',count);\r\n vm.unseen_discussion_count = 0;\r\n }\r\n }).catch(function(err) {\r\n });\r\n }\r\n }\r\n });\r\n\r\n\r\n\r\n\r\n vm.setContainerExpanded = function(displayContainer) {\r\n var custType = 'cww';\r\n UserService.setContainerExpanded(vm.user.id,custType,displayContainer).then(function(response){\r\n vm.IsContainerVisible = response.data.is_container_display;\r\n\r\n if(vm.IsContainerVisible){\r\n\r\n angular.forEach(vm.containerDetails, function (value, key) {\r\n if(key<2){\r\n value[0].expandBtn = true;\r\n angular.forEach(value, function (val2, k2) {\r\n val2.show = true;\r\n });\r\n }\r\n });\r\n\r\n }else{\r\n angular.forEach(vm.containerDetails, function (value, key) {\r\n\r\n // if(key<2){\r\n value[0].expandBtn = false;\r\n angular.forEach(value, function (val2, k2) {\r\n val2.show = false;\r\n });\r\n });\r\n\r\n }\r\n vm.user.cww_is_container_display = response.data.is_container_display;\r\n UserService.setUser(vm.user);\r\n });\r\n };\r\n\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .run(['$anchorScroll', function($anchorScroll) {\r\n $anchorScroll.yOffset = 90; // account for top nav when scrolling\r\n }])\r\n .controller('SidebarController', SidebarController);\r\n\r\n SidebarController.$inject = ['$rootScope', '$scope', '$state','$mdDialog','$mdMedia','UserService', '$mdSidenav', '$window', '$location', '$anchorScroll', '$timeout', 'menuGroups', 'permissions','user_audit_emails'];\r\n /* @ngInject */\r\n function SidebarController($rootScope, $scope, $state, $mdDialog, $mdMedia, UserService, $mdSidenav, $window, $location, $anchorScroll, $timeout, menuGroups, permissions,user_audit_emails) {\r\n var vm = this;\r\n vm.isKitchenSink = false;\r\n\r\n\r\n\r\n vm.isLoggedIn = UserService.isLoggedIn();\r\n vm.user = UserService.getUserData();\r\n\r\n vm.adminMenuItems = [];\r\n vm.user_emails = user_audit_emails.email;\r\n vm.valid_user_audit = valid_user_audit;\r\n vm.CviewMenuItems = [];\r\n // vm.CviewMenuItemsSubMenu = CviewMenuItemsSubMenu;\r\n vm.Transpotation = {};\r\n vm.Warehousing = [];\r\n vm.Account = [];\r\n vm.tracktrace = [];\r\n vm.Reports = [];\r\n vm.operations = [];\r\n vm.dataswitchEnable = false;\r\n vm.cww_discussion_count = parseInt(localStorage.getItem('cww_discussion_count'));\r\n vm.csl_discussion_count = parseInt(localStorage.getItem('csl_discussion_count'));\r\n vm.cfs_discussion_count = parseInt(localStorage.getItem('cfs_discussion_count'));\r\n vm.cmts_discussion_count = parseInt(localStorage.getItem('cmts_discussion_count'));\r\n\r\n vm.Customs = [];\r\n vm.cviewpopupmsg=\"Use below navigation to access Pathway Links\";\r\n vm.cviewSubMenupmsg=\"PATHWAY PAGES ARE CURRENTLY NOT SUPPORTED ON MOBILE.​​\"\r\n //vm.classicviewcheck = (vm.user.permissions.User.includes('classicview'))? true :false;\r\n if(JSON.stringify(vm.user.permissions.cww) == \"{}\"){\r\n vm.DashboardCww = false;\r\n }else{\r\n vm.DashboardCww = (vm.user.permissions.hasOwnProperty('cww'))? true :false;\r\n }\r\n\r\n if(JSON.stringify(vm.user.permissions.csl) == \"{}\"){\r\n vm.DashboardCsl = false;\r\n }else{\r\n vm.DashboardCsl = (vm.user.permissions.hasOwnProperty('csl'))? true :false;\r\n }\r\n\r\n if(JSON.stringify(vm.user.permissions.cfs) == \"{}\"){\r\n vm.DashboardCfs = false;\r\n }else{\r\n vm.DashboardCfs = (vm.user.permissions.hasOwnProperty('cfs'))? true :false;\r\n }\r\n\r\n if(JSON.stringify(vm.user.permissions.cmts) == \"{}\"){\r\n vm.DashboardCmts = false;\r\n }else{\r\n vm.DashboardCmts = (vm.user.permissions.hasOwnProperty('cmts'))? true :false;\r\n }\r\n\r\n // if(vm.user.support_request_admin || vm.user.support_request_user){\r\n // vm.supportRequestCheck = true;\r\n // }else{\r\n // vm.supportRequestCheck = false;\r\n // }\r\n\r\n if(vm.user.customer_types.length > 0){\r\n if(vm.user.customer_types.includes('cww')){\r\n vm.discussion_visibility = vm.user.customer_type_setup.cww.discussion_enabled;\r\n }else{\r\n vm.discussion_visibility = false;\r\n }\r\n\r\n if(vm.user.customer_types.includes('csl')){\r\n vm.discussion_visibility_csl = vm.user.customer_type_setup.csl.discussion_enabled;\r\n }else{\r\n vm.discussion_visibility_csl = false;\r\n }\r\n\r\n if(vm.user.customer_types.includes('cfs')){\r\n vm.discussion_visibility_cfs = vm.user.customer_type_setup.cfs.discussion_enabled;\r\n }else{\r\n vm.discussion_visibility_cfs = false;\r\n }\r\n\r\n if(vm.user.customer_types.includes('cmts')){\r\n vm.discussion_visibility_cmts = vm.user.customer_type_setup.cmts.discussion_enabled;\r\n }else{\r\n vm.discussion_visibility_cmts = false;\r\n }\r\n }\r\n\r\n if(localStorage.getItem('dataswitchEnable')){\r\n vm.dataswitchEnable = true;\r\n }else{\r\n vm.dataswitchEnable = false;\r\n }\r\n\r\n if(localStorage.getItem('bookingEnable') == 'true'){\r\n vm.booking_visibility = true;\r\n }else if(localStorage.getItem('bookingEnable') == 'false'){\r\n vm.booking_visibility = false;\r\n }else{\r\n if(vm.user.show_booking_shipment){\r\n vm.booking_visibility = true;\r\n }else{\r\n vm.booking_visibility = false;\r\n }\r\n }\r\n\r\n\r\n if(vm.user.ad_user == true && vm.user.company.is_crane == true){\r\n vm.shiplink_visibility = false;\r\n }else{\r\n vm.shiplink_visibility = true;\r\n }\r\n\r\n if(vm.user.roles.cww){\r\n if(vm.user.roles.cww.length > 0){\r\n if((vm.user.roles.cww.includes('crane_admin') && vm.user.roles.cww.includes('super_admin') && vm.user.type == null) || (vm.user.ad_user == true && vm.user.type == null)){\r\n vm.auditReportCheck = true;\r\n }else{\r\n vm.auditReportCheck = false;\r\n }\r\n }\r\n }\r\n\r\n if(vm.user.roles.cww){\r\n if(vm.user.roles.cww.length > 0){\r\n if(vm.user.roles.cww.includes('support_request_admin') || vm.user.roles.cww.includes('support_request_user')\r\n || vm.user.roles.cww.includes('support_request_validator') || vm.user.roles.cww.includes('cview_classic_admin')){\r\n vm.supportRequestCheck = true;\r\n }else{\r\n vm.supportRequestCheck = false;\r\n }\r\n }\r\n }\r\n\r\n // vm.DashboardCww = (vm.user.permissions.hasOwnProperty('cww'))? true :false;\r\n // vm.DashboardCsl = (vm.user.permissions.hasOwnProperty('csl'))? true :false;\r\n // vm.DashboardCfs = (vm.user.permissions.hasOwnProperty('cfs'))? true :false;\r\n\r\n vm.DashboardCwwShipment = false;\r\n vm.DashboardCslShipment = false;\r\n vm.DashboardCfsShipment = false;\r\n vm.DashboardCmtsShipment = false;\r\n\r\n vm.permission_length = 0;\r\n angular.forEach(vm.user.permissions, function(v,k){\r\n if(k){\r\n vm.permission_length++;\r\n }\r\n });\r\n\r\n\r\n\r\n if(vm.permission_length > 1){\r\n\r\n if(vm.user.permissions.cww){\r\n vm.DashboardCwwShipment = (getPermissionsValue(vm.user.permissions, 'cww').hasOwnProperty('Shipment'))? vm.user.permissions.cww.Shipment.includes('read') :false;\r\n }\r\n\r\n if(vm.user.permissions.csl){\r\n vm.DashboardCslShipment = (getPermissionsValue(vm.user.permissions, 'csl').hasOwnProperty('Load'))? vm.user.permissions.csl.Load.includes('read') :false;\r\n }\r\n\r\n if(vm.user.permissions.cfs){\r\n vm.DashboardCfsShipment = (getPermissionsValue(vm.user.permissions, 'cfs').hasOwnProperty('Load'))? vm.user.permissions.cfs.Load.includes('read') :false;\r\n }\r\n\r\n if(vm.user.permissions.cmts){\r\n vm.DashboardCmtsShipment = (getPermissionsValue(vm.user.permissions, 'cmts').hasOwnProperty('Load'))? vm.user.permissions.cmts.Load.includes('read') :false;\r\n }\r\n\r\n }\r\n\r\n\r\n vm.AllActivetabsArr = JSON.parse(localStorage.getItem('subindexval'));\r\n\r\n vm.Scrollheight=UserService.getScrollHight();\r\n if( document.getElementsByTagName(\"md-sidenav\")[0] != undefined){\r\n document.getElementsByTagName(\"md-sidenav\")[0].scrollTop=vm.Scrollheight;\r\n $(\".md-sidenav-left\").animate({ scrollTop: 0 });\r\n $(\".md-sidenav-left\").animate({ scrollTop: vm.Scrollheight });\r\n }\r\n\r\n setTimeout(function(){\r\n var m = 0;\r\n for( var j=0; j< vm.AllActivetabsArr.length; j++){\r\n //alert(\"in\");\r\n if(vm.AllActivetabsArr[j]['openFlag'] == true){\r\n document.querySelector('#iconDisplay'+j).innerHTML = 'expand_less';\r\n var index = vm.CviewMenuItems.findIndex(function(e) {\r\n return e.index == vm.AllActivetabsArr[j]['index'];\r\n });\r\n //if(vm.CviewMenuItems[index]['index'] == vm.AllActivetabsArr[j]['index']){\r\n // vm.CviewMenuItems[index]['itemflag'] = true;\r\n // }\r\n var x = document.getElementById('subMenuList'+j);\r\n x.style.display = 'block';\r\n m++;\r\n //item.itemflag=true;\r\n }\r\n }\r\n var item_url = $location.url();\r\n var index = vm.CviewMenuItems.findIndex(function(elem) {\r\n return elem.CviewMenuItemsSubMenu.map(function(elem) {return elem.url}).includes(item_url);\r\n });\r\n\r\n if(vm.CviewMenuItems[index]){\r\n vm.CviewMenuItems[index]['itemflag'] = true;\r\n }\r\n\r\n }, 100);\r\n\r\n vm.getUser = function(){\r\n if (vm.user.first_name || vm.user.last_name){\r\n return (vm.user.first_name?vm.user.first_name:\"\")+\" \"+(vm.user.last_name?vm.user.last_name:\"\");\r\n } else {\r\n return vm.user.email;\r\n }\r\n };\r\n\r\n vm.hovering=\"\";\r\n vm.showIt = function () {\r\n };\r\n\r\n\r\n\r\n vm.iconhover = function (item, value) {\r\n item.active = value\r\n if(value)\r\n $timeout(function () {\r\n vm.hovering = value;\r\n }, 2500);\r\n else\r\n vm.hovering = value;\r\n vm.showSubmenuLinkval=UserService.getsubmenuLink();\r\n };\r\n\r\n\r\n // vm.showSubmenuLinkval=$location.$$path;\r\n\r\n vm.showSubmenuLink = function (item) {\r\n for (var i=0;i<vm.CviewMenuItems.length;i++) {\r\n vm.CviewMenuItems[i]['itemflag'] = false;\r\n }\r\n vm.Scrollheight=document.getElementsByTagName(\"md-sidenav\")[0].scrollTop;\r\n UserService.setScrollHight(vm.Scrollheight);\r\n\r\n if(item.url==\"/c-clear\"){\r\n $window.open('https://www.netchb.com/app/');\r\n }\r\n if(item.url==\"/us_domestic_booking\"){\r\n $window.open('https://craneworldwide.efstms.com/');\r\n }\r\n if(item.url==\"/c-complience\"){\r\n $window.open('https://crane.integrationpoint.net/Logon.aspx');\r\n }\r\n if(item.url==\"/milestone\"){\r\n $window.open('https://cview.craneww.com/portal/classic/TrackTrace/Milestone');\r\n }\r\n if(item.url==\"/bol-sli-cmr\"){\r\n $window.open('https://cview.craneww.com/portal/classic/BookShipment/BOL');\r\n }\r\n if(item.url==\"/Cprints\"){\r\n $window.open('https://cview.craneww.com/portal/classic/TrackTrace/CPrint');\r\n }\r\n //if(item.url==\"/carbon-footprint\"){\r\n // $window.open('https://cview.craneww.com/portal/classic/TrackTrace/CarbonFootprint');\r\n //}\r\n //if(item.url==\"/carbon-cal\"){\r\n // $window.open('https://cview.craneww.com/portal/classic/TrackTrace/CarbonFootprintCalc');\r\n //}\r\n if(item.url==\"/CLabels\"){\r\n $window.open('https://cview.craneww.com/portal/classic/TrackTrace/CLabels');\r\n }\r\n if(item.url==\"/E_docs\"){\r\n $window.open('https://cview.craneww.com/portal/classic/TrackTrace/CImages');\r\n }\r\n if(item.url==\"/WHSEShipmentTracking\"){\r\n $window.open('https://cview.craneww.com/portal/classic/Warehouse/WHSEShipmentTracking');\r\n }\r\n if(item.url==\"/console\"){\r\n $window.open('https://cview.craneww.com/portal/classic/Warehouse/C2C');\r\n }\r\n //if(item.url==\"/c-stock\"){\r\n // $window.open('http://s1.web1.downstreamus.com/');\r\n //}\r\n if(item.url==\"/invoice\"){\r\n $window.open('https://cview.craneww.com/portal/classic/Accounts_Receivables/Invoices');\r\n }\r\n if(item.url==\"/accounts_receivables\"){\r\n $window.open('https://cview.craneww.com/portal/classic/Accounts_Receivables/AccountsReceivables');\r\n }\r\n if(item.url==\"/c-reports\"){\r\n $window.open('https://cview.craneww.com/portal/classic/Reporting/CReports');\r\n }\r\n if(item.url==\"/schedule-maintenance-report\"){\r\n $window.open('https://cview.craneww.com/portal/classic/Reporting/Schedule_Maintenance');\r\n }\r\n //if(item.url==\"/reporting-sharepoint\"){\r\n // $window.open('https://pathwaysso.craneww.com:8443/portal/classic/CReports/Sharepoint');\r\n //}\r\n if(item.url==\"/kpi-services\"){\r\n $window.open('https://cview.craneww.com/portal/classic/Operations/KPIService');\r\n }\r\n\r\n vm.showSubmenuLinkval=item.url;\r\n\r\n if(item==\"/user\"){\r\n vm.showSubmenuLinkval=item;\r\n }\r\n UserService.getsubmenuLink(vm.showSubmenuLinkval);\r\n vm.showSubmenuLinkval=UserService.setsubmenuLink(vm.showSubmenuLinkval);\r\n vm.showSubmenuLinkval=UserService.getsubmenuLink();\r\n };\r\n\r\n function valid_user_audit(){\r\n return vm.user_emails.includes(vm.user.email);\r\n }\r\n\r\n function getPermissionsValue(responsePermissionsData, type){\r\n return responsePermissionsData[type] || {}\r\n }\r\n\r\n /*vm.showDashboardTypes = function(item, index){\r\n\r\n var x = document.getElementById('subMenuDashboard'+index);\r\n\r\n angular.element( document.querySelectorAll( '.menuItems' ) ).removeClass('activeDashboardMenu');\r\n angular.element( document.querySelectorAll( '.menuItems' ) ).addClass('disableDashboardMenu');\r\n\r\n angular.element( document.querySelector( '.menuItems'+index ) ).addClass('activeDashboardMenu');\r\n angular.element( document.querySelector( '.menuItems'+index ) ).removeClass('disableDashboardMenu');\r\n\r\n if (x.style.display === 'none')\r\n {\r\n angular.element('.submenuDashboardList').css('display', 'none');\r\n\r\n item.itemflag=true;\r\n x.style.display = 'block';\r\n vm.AllActivetabsArr[index]['openFlag'] = true;\r\n\r\n $location.url(item.url);\r\n\r\n //var hiding_dashboard_submenu = document.querySelectorAll('md-chip');\r\n //hiding_dashboard_submenu.style.display = 'none';\r\n }\r\n else\r\n {\r\n item.itemflag=false;\r\n x.style.display = 'none';\r\n vm.AllActivetabsArr[index]['openFlag'] = false;\r\n item.activeflag=false;\r\n }\r\n }*/\r\n\r\n vm.sidemenuController = $state.current.controller;\r\n\r\n var defaultDashboard = false;\r\n var cslDashboard = false;\r\n var cfsDashboard = false;\r\n var cmtsDashboard = false;\r\n\r\n vm.permission_length = 0;\r\n angular.forEach(vm.user.permissions, function(v,k){\r\n if(k){\r\n vm.permission_length++;\r\n }\r\n });\r\n\r\n if(['DashboardController','TrackTraceController','ShippingDetailsController','DiscussionShipmentsController','ActionBoardController'].indexOf(vm.sidemenuController) > -1){\r\n defaultDashboard = true;\r\n }\r\n\r\n if(['DashboardCfsController','TrackTraceCfsController','ShippingDetailsCfsController','DiscussionShipmentsCfsController'].indexOf(vm.sidemenuController) > -1){\r\n cfsDashboard = true;\r\n }\r\n\r\n if(['DashboardCmtsController','TrackTraceCmtsController','ShippingDetailsCmtsController','DiscussionShipmentsCmtsController'].indexOf(vm.sidemenuController) > -1){\r\n cmtsDashboard = true;\r\n }\r\n\r\n if(['DashboardCslController','TrackTraceCslController','ShippingDetailsCslController','DiscussionShipmentsCslController'].indexOf(vm.sidemenuController) > -1){\r\n cslDashboard = true;\r\n }\r\n var craneWorldWide = [\r\n {url: '/', title: 'Dashboard', icon: '', controller:'DashboardController', menuGroup: menuGroups.dashboard, permission: vm.DashboardCwwShipment, active: false, paddingLeft:false},\r\n {url: '/track-trace', title: 'Track & Trace', icon: '', controller:'TrackTraceController', menuGroup: menuGroups.trackAndTrace, permission:true, active: false, paddingLeft:false},\r\n {url: '/track-trace-action-board', title: 'Action-Board', icon: '', controller:'ActionBoardController', menuGroup: menuGroups.trackAndTraceActionBoard, permission:vm.user.view_action_board, active: false, paddingLeft:true},\r\n {url: '/track-trace-booking', title: 'Booking', icon: '', controller:'TrackTraceController', menuGroup: menuGroups.trackAndTraceBooking, permission:vm.booking_visibility, active: false, paddingLeft:true},\r\n {url: '/track-trace-transit', title: 'In-Transit', icon: '', controller:'TrackTraceController', menuGroup: menuGroups.trackAndTraceInTransit, permission:vm.booking_visibility, active: false, paddingLeft:true},\r\n {url: '/shipment-discussions', title: 'Discussions', type: 'cww', icon: '', controller:'DiscussionShipmentsController', menuGroup: menuGroups.trackAndTraceDiscussion, permission:vm.discussion_visibility, active: false, paddingLeft:true}\r\n ]\r\n\r\n var craneSolutions = [\r\n {url: '/csl', title: 'Dashboard', icon: '', controller:'DashboardCslController', menuGroup: menuGroups.dashboardCsl, permission: vm.DashboardCslShipment, active: false, paddingLeft:false},\r\n {url: '/track-trace-csl', title: 'Track & Trace', icon: '', controller:'TrackTraceCslController', menuGroup: menuGroups.trackAndTraceCsl, permission:true, active: false, paddingLeft:false},\r\n {url: '/shipment-discussions-csl', title: 'Discussions', type: 'csl', icon: '', controller:'DiscussionShipmentsCslController', menuGroup: menuGroups.trackAndTraceDiscussionCsl, permission:vm.discussion_visibility_csl, active: false, paddingLeft:true}\r\n ]\r\n\r\n var craneFreight = [\r\n {url: '/cfs', title: 'Dashboard', icon: '', controller:'DashboardCfsController', menuGroup: menuGroups.dashboardCfs, permission: vm.DashboardCfsShipment, active: false, paddingLeft:false},\r\n {url: '/track-trace-cfs', title: 'Track & Trace', icon: '', controller:'TrackTraceCfsController', menuGroup: menuGroups.trackAndTraceCfs, permission:true, active: false, paddingLeft:false},\r\n {url: '/shipment-discussions-cfs', title: 'Discussions', type: 'cfs', icon: '', controller:'DiscussionShipmentsCfsController', menuGroup: menuGroups.trackAndTraceDiscussionCfs, permission:vm.discussion_visibility_cfs, active: false, paddingLeft:true}\r\n ]\r\n\r\n var craneMts = [\r\n {url: '/cmts', title: 'Dashboard', icon: '', controller:'DashboardCmtsController', menuGroup: menuGroups.dashboardCmts, permission: vm.DashboardCmtsShipment, active: false, paddingLeft:false},\r\n {url: '/track-trace-cmts', title: 'Track & Trace', icon: '', controller:'TrackTraceCmtsController', menuGroup: menuGroups.trackAndTraceCmts, permission:true, active: false, paddingLeft:false},\r\n {url: '/shipment-discussions-cmts', title: 'Discussions', type: 'cmts', icon: '', controller:'DiscussionShipmentsCmtsController', menuGroup: menuGroups.trackAndTraceDiscussionCmts, permission:vm.discussion_visibility_cmts, active: false, paddingLeft:true}\r\n ]\r\n\r\n vm.dashboardTypes = [\r\n { index:'0', url:'/', title: 'Crane Worldwide', isHighlight:defaultDashboard, dashboardTypesSubMenu:craneWorldWide, permission:vm.DashboardCwwShipment, active: false, itemflag:false},\r\n { index:'1', url:'/csl', title: 'Crane Solutions', isHighlight:cslDashboard, dashboardTypesSubMenu:craneSolutions, permission:vm.DashboardCslShipment, active: false, itemflag:false},\r\n { index:'2', url:'/cfs', title: 'Crane Freight', isHighlight:cfsDashboard, dashboardTypesSubMenu:craneFreight, permission: vm.DashboardCfsShipment, active: false,itemflag:false},\r\n { index:'3', url:'/cmts', title: 'Crane Mts', isHighlight:cmtsDashboard, dashboardTypesSubMenu:craneMts, permission: vm.DashboardCmtsShipment, active: false,itemflag:false}\r\n ];\r\n\r\n var menuItems = [];\r\n\r\n /* pushing dashboard and T&T when customer having only one permission */\r\n if(vm.permission_length == 1){\r\n\r\n if(vm.user.permissions.cww){\r\n vm.DashboardCwwShipment = (getPermissionsValue(vm.user.permissions, 'cww').hasOwnProperty('Shipment'))? vm.user.permissions.cww.Shipment.includes('read') :false;\r\n menuItems.push(\r\n {url: '/', title: 'Dashboard', icon: '', menuGroup: menuGroups.dashboard, permission: vm.DashboardCwwShipment, active: false, paddingLeft:false},\r\n {url: '/track-trace', title: 'Track & Trace', icon: '', menuGroup: menuGroups.trackAndTrace, permission:vm.DashboardCwwShipment, active: false, paddingLeft:false},\r\n {url: '/track-trace-action-board', title: 'Action-Board', type: 'cww' ,icon: '', menuGroup: menuGroups.trackAndTraceActionBoard, permission:vm.user.view_action_board, active: false, paddingLeft:true},\r\n {url: '/track-trace-booking', title: 'Booking', icon: '', menuGroup: menuGroups.trackAndTraceBooking, permission:vm.booking_visibility, active: false, paddingLeft:true},\r\n {url: '/track-trace-transit', title: 'In-Transit', icon: '', menuGroup: menuGroups.trackAndTraceInTransit, permission:vm.booking_visibility, active: false, paddingLeft:true},\r\n {url: '/shipment-discussions', title: 'Discussions', type: 'cww', icon: '', menuGroup: menuGroups.trackAndTraceDiscussion, permission:vm.discussion_visibility, active: false, paddingLeft:true}\r\n )\r\n }\r\n\r\n if(vm.user.permissions.csl){\r\n vm.DashboardCslShipment = (getPermissionsValue(vm.user.permissions, 'csl').hasOwnProperty('Load'))? vm.user.permissions.csl.Load.includes('read') :false;\r\n menuItems.push(\r\n {url: '/csl', title: 'Dashboard', icon: '', menuGroup: menuGroups.dashboardCsl, permission: vm.DashboardCslShipment, active: false, paddingLeft:false},\r\n {url: '/track-trace-csl', title: 'Track & Trace', icon: '', menuGroup: menuGroups.trackAndTraceCsl, permission:vm.DashboardCslShipment, active: false, paddingLeft:false},\r\n {url: '/shipment-discussions-csl', title: 'Discussions', type: 'csl', icon: '', menuGroup: menuGroups.trackAndTraceDiscussionCsl, permission:vm.discussion_visibility_csl, active: false, paddingLeft:true}\r\n )\r\n }\r\n\r\n if(vm.user.permissions.cfs){\r\n vm.DashboardCfsShipment = (getPermissionsValue(vm.user.permissions, 'cfs').hasOwnProperty('Load'))? vm.user.permissions.cfs.Load.includes('read') :false;\r\n menuItems.push(\r\n {url: '/cfs', title: 'Dashboard', icon: '', menuGroup: menuGroups.dashboardCfs, permission: vm.DashboardCfsShipment, active: false, paddingLeft:false},\r\n {url: '/track-trace-cfs', title: 'Track & Trace', icon: '', menuGroup: menuGroups.trackAndTraceCfs, permission:vm.DashboardCfsShipment, active: false, paddingLeft:false},\r\n {url: '/shipment-discussions-cfs', title: 'Discussions', type: 'cfs', icon: '', menuGroup: menuGroups.trackAndTraceDiscussionCfs, permission:vm.discussion_visibility_cfs, active: false, paddingLeft:true}\r\n )\r\n }\r\n\r\n if(vm.user.permissions.cmts){\r\n vm.DashboardCmtsShipment = (getPermissionsValue(vm.user.permissions, 'cmts').hasOwnProperty('Load'))? vm.user.permissions.cmts.Load.includes('read') :false;\r\n menuItems.push(\r\n {url: '/cmts', title: 'Dashboard', icon: '', menuGroup: menuGroups.dashboardCmts, permission: vm.DashboardCmtsShipment, active: false, paddingLeft:false},\r\n {url: '/track-trace-cmts', title: 'Track & Trace', icon: '', menuGroup: menuGroups.trackAndTraceCmts, permission:vm.DashboardCmtsShipment, active: false, paddingLeft:false},\r\n {url: '/shipment-discussions-cmts', title: 'Discussions', type: 'cmts', icon: '', menuGroup: menuGroups.trackAndTraceDiscussionCmts, permission:vm.discussion_visibility_cmts, active: false, paddingLeft:true}\r\n )\r\n }\r\n\r\n }\r\n\r\n menuItems.push(\r\n {url: '/book-shipment', title: 'Book Shipment', icon: '', menuGroup: menuGroups.bookShipment, permission: permissions.bookShipment.create, active: false}\r\n );\r\n\r\n if(vm.valid_user_audit()){\r\n var adminMenuItems = [\r\n {url: '/csl-exceptions', title: 'CSL Exceptions', icon: '', menuGroup: menuGroups.admin.cslException, permission: vm.user.csl_excptions_permission.is_csl_dashboard , active: false },\r\n // {url: '/cfs-exceptions', title: 'CFS Exceptions', icon: '', menuGroup: menuGroups.admin.cfsException, permission: permissions.cslException.approver+\",\"+permissions.cslException.all_clients_approver+\",\"+permissions.cslException.read+\",\"+permissions.cslException.create, active: false },\r\n {url: '/cfs-exceptions', title: 'CFS Exceptions', icon: '', menuGroup: menuGroups.admin.cfsException, permission: vm.user.cfs_excptions_permission.is_cfs_dashboard, active: false },\r\n // {url: '/cmts-exceptions', title: 'CMTS Exceptions', icon: '', menuGroup: menuGroups.admin.cmtsException, permission: vm.user.cmts_excptions_permission.is_cmts_dashboard, active: false },\r\n {url: '/potential-exceptions', title: 'Potential Exceptions', icon: '', menuGroup: menuGroups.admin.potentialExceptions, permission: permissions.potentialExceptions.read+\",\"+permissions.potentialExceptions.reader+\",\"+permissions.potentialExceptions.publish, active: false },\r\n {url: '/users', title: 'Users', icon: '', menuGroup: menuGroups.admin.user, permission: permissions.user.manage, active: false },\r\n {url: '/companies', title: 'Companies', icon: '', menuGroup: menuGroups.admin.company, permission: permissions.company.manage, active: false },\r\n {url: '/viewcompanies', title: 'Companies', icon: '', menuGroup: menuGroups.admin.company, permission: permissions.company.read, active: false },\r\n //{url: '/groups', title: 'Groups', icon: '', menuGroup: menuGroups.admin.groups, permission: permissions.groups.manage, active: false },\r\n {url: '/lensgroups', title: 'Lens Groups', icon: '', menuGroup: menuGroups.admin.lensgroup, permission: permissions.lensgroup.manage, active: false },\r\n {url: '/auditlog', title: 'Audit Log', icon: '', menuGroup: menuGroups.admin.auditlog,active: false},\r\n {url: '/featureSpotlight', title: 'Feature Spotlight', icon: '', menuGroup: menuGroups.admin.featureSpotlight, permission: permissions.featureSpotlight.manage,active: false},\r\n {url: '/demo', title: 'Demo', icon: '', menuGroup: menuGroups.admin.demo_account, permission: permissions.demo_account.demo, active:false},\r\n {url: '/shiplink', title: 'Shiplink', icon: '', menuGroup: menuGroups.admin.ship_link, permission:vm.shiplink_visibility, active:false},\r\n {url: '/shiplinktext', title: 'Shiplink Text', icon: '', menuGroup: menuGroups.admin.shiplinktext, active:false}\r\n ];\r\n }\r\n else\r\n {\r\n\r\n var adminMenuItems = [\r\n // {url: '/csl-exceptions', title: 'CSL Exceptions', icon: '', menuGroup: menuGroups.admin.cslException, permission: permissions.cslException.approver+\",\"+permissions.cslException.all_clients_approver+\",\"+permissions.cslException.read+\",\"+permissions.cslException.create, active: false },\r\n // {url: '/cfs-exceptions', title: 'CFS Exceptions', icon: '', menuGroup: menuGroups.admin.cfsException, permission: permissions.cslException.approver+\",\"+permissions.cslException.all_clients_approver+\",\"+permissions.cslException.read+\",\"+permissions.cslException.create, active: false },\r\n {url: '/csl-exceptions', title: 'CSL Exceptions', icon: '', menuGroup: menuGroups.admin.cslException, permission: vm.user.csl_excptions_permission.is_csl_dashboard , active: false },\r\n {url: '/cfs-exceptions', title: 'CFS Exceptions', icon: '', menuGroup: menuGroups.admin.cfsException, permission: vm.user.cfs_excptions_permission.is_cfs_dashboard , active: false },\r\n //{url: '/cmts-exceptions', title: 'CMTS Exceptions', icon: '', menuGroup: menuGroups.admin.cmtsException, permission: vm.user.cmts_excptions_permission.is_cmts_dashboard , active: false },\r\n {url: '/potential-exceptions', title: 'Potential Exceptions', icon: '', menuGroup: menuGroups.admin.potentialExceptions, permission: permissions.potentialExceptions.read+\",\"+permissions.potentialExceptions.reader+\",\"+permissions.potentialExceptions.publish, active: false },\r\n {url: '/users', title: 'Users', icon: '', menuGroup: menuGroups.admin.user, permission: permissions.user.manage, active: false },\r\n {url: '/companies', title: 'Companies', icon: '', menuGroup: menuGroups.admin.company, permission: permissions.company.manage, active: false },\r\n {url: '/viewcompanies', title: 'Companies', icon: '', menuGroup: menuGroups.admin.company, permission: permissions.company.read, active: false },\r\n // {url: '/groups', title: 'Groups', icon: '', menuGroup: menuGroups.admin.groups, permission: permissions.groups.manage, active: false },\r\n {url: '/lensgroups', title: 'Lens Groups', icon: '', menuGroup: menuGroups.admin.lensgroup, permission: permissions.lensgroup.manage, active: false },\r\n {url: '/featureSpotlight', title: 'Feature Spotlight', icon: '', menuGroup: menuGroups.admin.featureSpotlight, permission: permissions.featureSpotlight.manage, active:false},\r\n {url: '/demo', title: 'Demo', icon: '', menuGroup: menuGroups.admin.demo_account, permission: permissions.demo_account.demo, active:false},\r\n {url: '/shiplink', title: 'Shiplink', icon: '', menuGroup: menuGroups.admin.ship_link,permission:vm.shiplink_visibility, active:false}\r\n ];\r\n }\r\n\r\n //if((vm.user.super_admin) || (vm.user.roles.indexOf(\"crane_admin\") != -1)){\r\n if((vm.user.roles.cww ? (vm.user.roles.cww.includes('super_admin')) : false) ||\r\n (vm.user.roles.csl ? (vm.user.roles.csl.includes('super_admin')) : false) ||\r\n (vm.user.roles.cfs ? (vm.user.roles.cfs.includes('super_admin')) : false) ||\r\n (vm.user.roles.cmts ? (vm.user.roles.cmts.includes('super_admin')) : false)){\r\n adminMenuItems.push({url: '/equipment_type', title: 'Equipment Type', icon: '', menuGroup: menuGroups.admin.equipment_type, active:false});\r\n }\r\n\r\n // if(vm.supportRequestCheck){\r\n // adminMenuItems.push({url: '/supportRequests', title: 'Support Requests', icon: '', menuGroup: menuGroups.admin.supportRequests, active:false});\r\n // }\r\n\r\n // if(vm.auditReportCheck){\r\n // adminMenuItems.push({url: '/reports', title: 'Reports', icon: '', menuGroup: menuGroups.admin.reports, active: false});\r\n // }\r\n\r\n vm.Transportation = [\r\n {url: '/milestone', title: 'Milestone'},\r\n {url: '/Cprints', title: 'C - Print'},\r\n //{url: '/carbon-footprint', title: 'Carbon Footprint'},\r\n //{url: '/carbon-cal', title: 'Carbon Footprint Calculator'},\r\n {url: '/CLabels', title: 'C - Labels'},\r\n {url: '/E_docs', title: 'E-Docs'}\r\n ];\r\n\r\n\r\n vm.Warehousing = [\r\n {url: '/WHSEShipmentTracking', title: 'WHSE Shipment Tracking','index':1},\r\n {url: '/console', title: 'C - Console', 'index':1},\r\n //{url: '/c-stock', title: 'C - Stock','index':1}\r\n ];\r\n\r\n vm.Account = [\r\n {url: '/invoice', title: 'Invoice Report'},\r\n {url: '/accounts_receivables', title: 'Accounts Receivables'}\r\n ];\r\n\r\n vm.BookShipment = [\r\n {url: '/bol-sli-cmr', title: 'BOL-SLI-CMR'},\r\n {url: '/us_domestic_booking', title: 'US Domestic Booking'}\r\n ];\r\n\r\n\r\n vm.Reports = [\r\n {url: '/c-reports', title: 'C - Reports',permission:true},\r\n {url: '/schedule-maintenance-report', title: 'Schedule Maintenance',permission:true}\r\n //{url: '/reporting-sharepoint', title: 'Sharepoint',permission:true}\r\n ];\r\n\r\n vm.Customs = [\r\n {url: '/c-clear', title: 'C - Clear'},\r\n {url: '/c-complience', title: 'C - Compliance'}\r\n ];\r\n\r\n vm.operations = [\r\n //{url: '/opt-dashboard',title: 'Dashboard',permission: permissions.cview_operations_dashboard.Operations_Dashboard, active: false},\r\n {url: '/kpi-services',title: 'KPI Service',permission: permissions.cview_operationskpi.operationskpi, active: false}\r\n ];\r\n\r\n vm.CviewMenuItems = [\r\n { index:'0',title:'Transportation',CviewMenuItemsSubMenu:vm.Transportation, permission:permissions.cview_transportation.transportation, active: false, itemflag:false},\r\n { index:'1',title: 'Warehousing',CviewMenuItemsSubMenu:vm.Warehousing, permission:permissions.cview_warehouse.warehouse, active: false, itemflag:false},\r\n { index:'2',title: 'Accounts Receivables', CviewMenuItemsSubMenu:vm.Account, permission: permissions.cview_accounts_receivables.accounts_receivables, active: false,itemflag:false},\r\n { index:'3',title: 'Book Shipment',CviewMenuItemsSubMenu:vm.BookShipment, permission:permissions.cview_book_shipment.book_shipment, active: false,itemflag:false},\r\n { index:'4',title: 'Reporting',CviewMenuItemsSubMenu:vm.Reports, permission: permissions.cview_reporting.reporting, active: false,itemflag:false},\r\n { index:'5',title: 'Customs',CviewMenuItemsSubMenu:vm.Customs, permission: permissions.cview_customs.customs, active: false, itemflag:false},\r\n { index:'6',title: 'Operations',CviewMenuItemsSubMenu:vm.operations, permission: permissions.cview_operations.operations, active: false, itemflag:false}\r\n ];\r\n\r\n vm.AllShowActivetabs;\r\n\r\n vm.CviewSubmenuToggole = function(item,index){\r\n //for (var i=0;i<vm.CviewMenuItems.length;i++) {\r\n // vm.CviewMenuItems[i]['itemflag'] = false;\r\n //}\r\n var x = document.getElementById('subMenuList'+index);\r\n if (x.style.display === 'none')\r\n {\r\n //item.itemflag=true;\r\n x.style.display = 'block';\r\n document.querySelector('#iconDisplay'+index).innerHTML = 'expand_less';\r\n vm.AllActivetabsArr[index]['openFlag'] = true;\r\n localStorage.setItem('subindexval',JSON.stringify(vm.AllActivetabsArr));\r\n }\r\n else\r\n {\r\n item.itemflag=false;\r\n x.style.display = 'none';\r\n document.querySelector('#iconDisplay'+index).innerHTML = 'expand_more';\r\n vm.AllActivetabsArr[index]['openFlag'] = false;\r\n item.activeflag=false;\r\n localStorage.setItem('subindexval',JSON.stringify(vm.AllActivetabsArr));\r\n }\r\n };\r\n\r\n //vm.CviewMenuToggoleItems=false;\r\n\r\n vm.CviewMenuToggoleItems=localStorage.getItem('CviewMenuToggoleItems') == \"true\";\r\n vm.CviewMenuToggole = function(){\r\n //item.active=false;\r\n vm.CmenuHeader=true;\r\n vm.CviewMenuToggoleItems=!vm.CviewMenuToggoleItems;\r\n localStorage.setItem('CviewMenuToggoleItems',vm.CviewMenuToggoleItems)\r\n\r\n\r\n if(vm.CviewMenuToggoleItems==false){\r\n for (var i=0;i<vm.AllActivetabsArr.length;i++) {\r\n vm.AllActivetabsArr[i]['openFlag'] = false;\r\n }\r\n localStorage.setItem('subindexval',JSON.stringify(vm.AllActivetabsArr));\r\n }\r\n };\r\n\r\n\r\n\r\n /*start c-view menu and submenu mobile version*/\r\n vm.cviewpopup=cviewpopup;\r\n vm.cviewModal=true;\r\n function cviewpopup(ev){\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n if(vm.cviewModal){\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/cview_modal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n controller: function DialogController($scope, $mdDialog){\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n }else {\r\n $mdDialog.show({\r\n templateUrl: '/app/admin/cview_submenuModal.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n controller: function DialogController($scope, $mdDialog){\r\n $scope.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n }\r\n });\r\n }\r\n }\r\n\r\n vm.cviewSubmenuPageUrl=\"\";\r\n vm.submenuLink = function(state){\r\n vm.cviewModal==false;\r\n vm.cviewpopup(vm.cviewModal=false);\r\n vm.cviewSubmenuPageUrl=state;\r\n UserService.setsubmenuLink(vm.cviewSubmenuPageUrl);\r\n }\r\n\r\n vm.showSubmenuLinkval=UserService.getsubmenuLink();\r\n\r\n vm.cviewSubmenuPage=function(){\r\n vm.submenuUrl=\"\";\r\n vm.submenuUrl=UserService.getsubmenuLink(vm.submenuUrl);\r\n if(vm.submenuUrl==\"/c-clear\"){\r\n $window.open('https://www.netchb.com/app/');\r\n\r\n }\r\n if(vm.submenuUrl == \"/us_domestic_booking\"){\r\n $window.open('http://craneworldwide.efstms.com/');\r\n }\r\n if(vm.submenuUrl==\"/c-complience\"){\r\n $window.open(\"https://crane.integrationpoint.net/Logon.aspx\");\r\n }else{\r\n $location.path(vm.submenuUrl);\r\n }\r\n\r\n $mdDialog.hide();\r\n };\r\n\r\n vm.closeDialog = function() {\r\n $mdDialog.hide();\r\n };\r\n\r\n //setting dashboard active item\r\n\r\n var prunedMenuItems = [];\r\n for (var i=0; i<vm.dashboardTypes.length; i++) {\r\n\r\n var mi = vm.dashboardTypes[i];\r\n\r\n //mi.active = mi.menuGroup == $state.current.data.menuGroup;\r\n\r\n for(var j=0; j<mi.dashboardTypesSubMenu.length; j++){\r\n\r\n mi.dashboardTypesSubMenu[j].active = mi.dashboardTypesSubMenu[j].menuGroup === $state.current.data.menuGroup;\r\n\r\n if (!(mi.dashboardTypesSubMenu[j].permission === true || UserService.canAccess(mi.dashboardTypesSubMenu[j].permission))) {\r\n //delete mi.dashboardTypesSubMenu[j];\r\n mi.dashboardTypesSubMenu.splice(j, 1);\r\n j--;\r\n\r\n }\r\n\r\n }\r\n\r\n if (mi.permission === true || UserService.canAccess(mi.permission)) {\r\n prunedMenuItems.push(mi);\r\n }\r\n\r\n }\r\n\r\n vm.dashboardTypes = prunedMenuItems;\r\n\r\n\r\n // setting active item\r\n var prunedMenuItems = [];\r\n for (var i=0;i<menuItems.length;i++) {\r\n var mi = menuItems[i];\r\n mi.active = mi.menuGroup == $state.current.data.menuGroup;\r\n if (mi.permission === true || UserService.canAccess(mi.permission)) {\r\n\r\n prunedMenuItems.push(mi);\r\n }\r\n }\r\n menuItems = prunedMenuItems;\r\n\r\n var prunedAdminMenuItems = [];\r\n for (var i=0;i<adminMenuItems.length;i++) {\r\n var mi = adminMenuItems[i];\r\n mi.active = mi.menuGroup == $state.current.data.menuGroup;\r\n if(mi.menuGroup == \"potentialExceptions\"){\r\n var pe_permissions = mi.permission.split(\",\");\r\n if(!mi.permission || (UserService.canAccess(pe_permissions[0]) || UserService.canAccess(pe_permissions[1]) || UserService.canAccess(pe_permissions[2]))){\r\n prunedAdminMenuItems.push(mi);\r\n }\r\n }\r\n else if(mi.menuGroup == \"cslException\"){\r\n // var pe_permissions = mi.permission.split(\",\");\r\n var pe_permissions = mi.permission;\r\n // if(!mi.permission || (UserService.canAccess(pe_permissions[0]) || UserService.canAccess(pe_permissions[1]) || UserService.canAccess(pe_permissions[2]) || UserService.canAccess(pe_permissions[3]))){\r\n // prunedAdminMenuItems.push(mi);\r\n // }\r\n if(mi.permission){\r\n prunedAdminMenuItems.push(mi);\r\n }\r\n }\r\n else if(mi.menuGroup == \"cfsException\"){\r\n // var pe_permissions = mi.permission.split(\",\");\r\n // if(!mi.permission || (UserService.canAccess(pe_permissions[0]) || UserService.canAccess(pe_permissions[1]) || UserService.canAccess(pe_permissions[2]) || UserService.canAccess(pe_permissions[3]))){\r\n // prunedAdminMenuItems.push(mi);\r\n // }\r\n var pe_permissions = mi.permission;\r\n if(mi.permission){\r\n prunedAdminMenuItems.push(mi);\r\n }\r\n }\r\n // else if(mi.menuGroup == \"cmtsException\"){\r\n // var pe_permissions = mi.permission;\r\n // if(mi.permission){\r\n // prunedAdminMenuItems.push(mi);\r\n // }\r\n // }\r\n else{\r\n if (!mi.permission || UserService.canAccess(mi.permission)) {\r\n prunedAdminMenuItems.push(mi);\r\n }\r\n }\r\n }\r\n vm.adminMenuItems = prunedAdminMenuItems;\r\n\r\n\r\n //Add by kavita Cview report submenu list as per the permission\r\n\r\n var prunedReportMenuItems = [];\r\n for (var i=0;i<vm.operations.length;i++) {\r\n var mi = vm.operations[i];\r\n mi.active = mi.menuGroup == $state.current.data.menuGroup;\r\n if (!mi.permission || UserService.canAccessOperations(mi.permission)) {\r\n prunedReportMenuItems.push(mi);\r\n }\r\n }\r\n vm.operations = prunedReportMenuItems;\r\n\r\n //// console.log(\"vm.operations....\"+vm.operations);\r\n\r\n\r\n\r\n for (var i=0;i<vm.CviewMenuItems.length;i++) {\r\n if(vm.CviewMenuItems[i].title==\"Operations\"){\r\n\r\n //if(vm.AllActivetabsArr[6]['openFlag']==true) {\r\n\r\n vm.CviewMenuItems[i].CviewMenuItemsSubMenu=vm.operations;\r\n // }\r\n }\r\n }\r\n\r\n\r\n //Cview menu list as per the permission\r\n\r\n var prunedCviewMenuItems = [];\r\n for (var i=0;i<vm.CviewMenuItems.length;i++) {\r\n var mi = vm.CviewMenuItems[i];\r\n mi.active = mi.menuGroup == $state.current.data.menuGroup;\r\n if (!mi.permission || UserService.canAccess(mi.permission)) {\r\n prunedCviewMenuItems.push(mi);\r\n }\r\n }\r\n\r\n vm.CviewMenuItems = prunedCviewMenuItems;\r\n\r\n //start c-view menu group and subgroup\r\n vm.itemslist=[];\r\n vm.CviewSubmenuItemsflag=false;\r\n vm.CviewMenuItemsSubMenulist=[];\r\n vm.CviewSubMenulist=[];\r\n vm.subMenuTabs=[];\r\n if(UserService.getSelectedRoute() != null){\r\n //vm.Selecteditemindex=\"\";\r\n // UserService.setSelectedRoute(vm.Selecteditemindex);\r\n var index = UserService.getSelectedRoute() ;\r\n vm.Selecteditemindex=index;\r\n for (var i=0;i<vm.CviewMenuItems.length;i++){\r\n\r\n if(vm.CviewMenuItems[i].title==vm.CviewMenuItems[index].title){\r\n vm.CviewSubmenuItemsflag = !vm.CviewSubmenuItemsflag;\r\n vm.CviewMenuItemsSubMenulist=vm.CviewMenuItems[i].CviewMenuItemsSubMenu;\r\n }else{\r\n vm.CviewSubmenuItemsflag == vm.CviewSubmenuItemsflag;\r\n }\r\n }\r\n }\r\n\r\n\r\n var sinkItems = [\r\n {url: 'loading-animations', title: 'Loading Animations', icon: ''},\r\n {url: 'tables', title: 'Tables', icon: ''},\r\n {url: 'colors', title: 'Colors', icon: ''},\r\n {url: 'typography', title: 'Typography', icon: ''},\r\n {url: 'ui-widgets', title: 'UI Widgets', icon: ''},\r\n {url: 'charts', title: 'Charts', icon: ''},\r\n {url: 'icons', title: 'Icons', icon: ''},\r\n {url: 'forms', title: 'Forms', icon: ''},\r\n {url: 'miscellaneous', title: 'Miscellaneous', icon: ''}\r\n\r\n ];\r\n\r\n vm.gotoAnchor = function(x) {\r\n\r\n var newHash = 'anchor-' + x;\r\n $location.hash(newHash);\r\n $anchorScroll();\r\n };\r\n\r\n vm.toggleMenu = function(item,ind) {\r\n\r\n item.isHighlight=!item.isHighlight;\r\n vm.dashboardTypes[ind]=item;\r\n };\r\n\r\n if ($location.path() == '/kitchen-sink') {\r\n vm.isKitchenSink = true;\r\n vm.menuItems = sinkItems;\r\n } else {\r\n vm.menuItems = menuItems;\r\n }\r\n\r\n if(vm.discussion_visibility || vm.discussion_visibility_csl && vm.isLoggedIn) {\r\n if($location.path() != '/track-trace-action-board'){\r\n setInterval(function(){\r\n UserService.getUnseenCount(vm.user.id).then(function(res){\r\n if(res.status == 200){\r\n vm.cww_discussion_count = res.data.all_cww_unseen_discussion_count;\r\n vm.csl_discussion_count = res.data.all_csl_unseen_discussion_count;\r\n vm.cfs_discussion_count = res.data.all_cfs_unseen_discussion_count;\r\n vm.cmts_discussion_count = res.data.all_cmts_unseen_discussion_count;\r\n localStorage.setItem('cww_discussion_count',vm.cww_discussion_count);\r\n localStorage.setItem('csl_discussion_count',vm.csl_discussion_count);\r\n localStorage.setItem('cfs_discussion_count',vm.cfs_discussion_count);\r\n localStorage.setItem('cmts_discussion_count',vm.cmts_discussion_count);\r\n }\r\n }).catch(function(err) {\r\n });\r\n },60000);\r\n }\r\n\r\n }\r\n\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .directive('cvaShell', cvaShell);\r\n\r\n /* @ngInject */\r\n function cvaShell() {\r\n\r\n var directive = {\r\n restrict: 'E',\r\n transclude: true,\r\n templateUrl: '/app/layout/shell.html'\r\n };\r\n return directive;\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name ShellController\r\n * \r\n * @description The ShellController module wraps the contest sections of the app and interfaces with the statis sections of the front end\r\n * \r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .controller('ShellController', ShellController);\r\n\r\n /* @ngInject */\r\n ShellController.$inject = ['$rootScope', '$timeout', 'logger', '$mdSidenav', '$log'/*, 'config'*/];\r\n function ShellController($rootScope, $timeout, logger, $mdSidenav, $log/*, config*/) {\r\n var vm = this;\r\n vm.isBusy = true;\r\n vm.isSidenavOpen = false;\r\n\r\n vm.openLeftMenu = function() {\r\n $mdSidenav('left').toggle();\r\n }\r\n\r\n $rootScope.showSplash = true;\r\n vm.navline = {\r\n title: 'C-View',//config.appTitle,\r\n text: 'Created by Chepri'\r\n };\r\n\r\n activate();\r\n\r\n function activate() {\r\n //logger.success(config.appTitle + ' loaded!', null);\r\n hideSplash();\r\n }\r\n\r\n function hideSplash() {\r\n //Force a 1 second delay so we can see the splash.\r\n $timeout(function() {\r\n $rootScope.showSplash = false;\r\n }, 1000);\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .directive('htTopNav', htTopNav);\r\n\r\n /* @ngInject */\r\n function htTopNav() {\r\n var directive = {\r\n bindToController: true,\r\n controller: TopNavController,\r\n controllerAs: 'vm',\r\n restrict: 'EA',\r\n scope: {\r\n 'navline': '='\r\n },\r\n templateUrl: '/app/layout/navbar.html'\r\n };\r\n\r\n TopNavController.$inject = ['$scope', '$mdSidenav', '$mdComponentRegistry', 'UserService', '$timeout', '$window','$state'];\r\n\r\n /* @ngInject */\r\n function TopNavController($scope, $mdSidenav, $mdComponentRegistry, UserService, $timeout, $window,$state) {\r\n var vm = this;\r\n $scope.isCollapsed = true;\r\n\r\n vm.isSidenavOpen = false;\r\n\r\n $scope.showSearch = false; // deliberately on $scope and not vm\r\n vm.virtualRepeat = false;\r\n\r\n $scope.mobileExpanded = false;\r\n $scope.isExpanded = true;\r\n $scope.isMobile = isMobile;\r\n $scope.searchExpanded = searchExpanded;\r\n $scope.expandSearch = expandSearch;\r\n\r\n if(localStorage.switchEmail || localStorage.userCompany || localStorage.userDepartment){\r\n vm.menutogglebtn = true;\r\n }else\r\n {\r\n vm.menutogglebtn = false;\r\n }\r\n\r\n if(localStorage.getItem('type') == 'DummyUser'){\r\n vm.editaccountvisible = false;\r\n }else\r\n {\r\n vm.editaccountvisible = true;\r\n }\r\n\r\n vm.isLoggedIn = UserService.isLoggedIn();\r\n vm.user = UserService.getUserData();\r\n $scope.reskin_logo = false;\r\n $scope.csl = false;\r\n $scope.magnointl_Logo = false;\r\n $scope.cranewwLogo = false;\r\n $scope.cfs = false;\r\n $scope.cmts = false;\r\n if($state.current.url.includes(\"csl\"))\r\n $scope.csl=true;\r\n else\r\n $scope.csl=false;\r\n\r\n //if(location.hostname.includes(\"craneww\")){\r\n // $scope.cranewwLogo=true;\r\n //}else if(location.hostname.includes(\"magnointl\")){\r\n // $scope.magnointl_Logo=true;\r\n //}else if (!location.hostname.includes(\"craneww\") && !location.hostname.includes(\"magnointl\")){\r\n // $scope.cranewwLogo=true;\r\n //}\r\n\r\n if(location.search.includes(\"magnointl\")) {\r\n $scope.magnointl_Logo=true;\r\n localStorage.setItem('magno', 'True');\r\n }\r\n else if (!location.search.includes(\"magnointl\")){\r\n if(vm.isLoggedIn && vm.user.magno_login == true) {\r\n $scope.magnointl_Logo=true;\r\n localStorage.setItem('magno', 'True');\r\n } else {\r\n $scope.cranewwLogo=true;\r\n localStorage.setItem('magno', 'False');\r\n }\r\n }\r\n else {\r\n $scope.cranewwLogo=true;\r\n localStorage.setItem('magno', 'False');\r\n }\r\n\r\n\r\n //if(localStorage.getItem('magno') == 'True') {\r\n // $scope.magnointl_Logo=true;\r\n //} else {\r\n // if(location.search.includes(\"magnointl\")) {\r\n // $scope.magnointl_Logo=true;\r\n // localStorage.setItem('magno', 'True');\r\n // }\r\n // else if (!location.search.includes(\"magnointl\")){\r\n // localStorage.clear();\r\n // $scope.cranewwLogo=true;\r\n // localStorage.setItem('magno', 'False');\r\n // }\r\n // else {\r\n // if(vm.isLoggedIn && vm.user.magno_login == true) {\r\n // $scope.magnointl_Logo=true;\r\n // localStorage.setItem('magno', 'True');\r\n // } else {\r\n // $scope.cranewwLogo=true;\r\n // localStorage.setItem('magno', 'False');\r\n // }\r\n // }\r\n //}\r\n\r\n if($state.current.url.includes(\"cfs\"))\r\n $scope.cfs=true;\r\n else\r\n $scope.cfs=false;\r\n\r\n\r\n if($state.current.url.includes(\"cmts\"))\r\n $scope.cmts=true;\r\n else\r\n $scope.cmts=false;\r\n\r\n if (vm.user != null) {\r\n if (vm.user.reskin_logo == 'default') {\r\n $scope.reskin_logo = false;\r\n } else {\r\n $scope.reskin_logo = true;\r\n }\r\n\r\n }\r\n vm.getUser = function(){\r\n if (vm.user.first_name || vm.user.last_name){\r\n return (vm.user.first_name?vm.user.first_name:\"\")+\" \"+(vm.user.last_name?vm.user.last_name:\"\");\r\n } else {\r\n return vm.user.email;\r\n }\r\n };\r\n\r\n vm.openLeftMenu = function() {\r\n $mdSidenav('left').toggle();\r\n };\r\n\r\n $scope.searchExpanded();\r\n\r\n // Monitor the sidenav state to update top nav\r\n $mdComponentRegistry.when('left').then(function(it){\r\n $scope.$watch(function () {\r\n return $mdSidenav('left').isOpen();\r\n },\r\n function () {\r\n vm.isSidenavOpen = $mdSidenav('left').isOpen();\r\n });\r\n });\r\n\r\n function isMobile() {\r\n if ($window.innerWidth < 992) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }\r\n\r\n function searchExpanded() {\r\n if (isMobile()) {\r\n if ($scope.mobileExpanded) {\r\n $scope.isExpanded = true;\r\n } else {\r\n $scope.isExpanded = false;\r\n }\r\n } else {\r\n $scope.isExpanded = true;\r\n }\r\n }\r\n\r\n function expandSearch(bool) {\r\n $scope.mobileExpanded = bool;\r\n $scope.isExpanded = bool;\r\n }\r\n\r\n // deliberately on $scope and not vm\r\n $scope.toggleSearch = function() {\r\n $scope.showSearch = !$scope.showSearch;\r\n }\r\n }\r\n return directive;\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.layout')\r\n .directive('htSidebar', htSidebar);\r\n\r\n /* @ngInject */\r\n function htSidebar() {\r\n // Opens and closes the sidebar menu.\r\n // Usage:\r\n // <div ht-sidebar\">\r\n // <div ht-sidebar whenDoneAnimating=\"vm.sidebarReady()\">\r\n // Creates:\r\n // <div ht-sidebar class=\"sidebar\">\r\n var directive = {\r\n link: link,\r\n restrict: 'EA',\r\n scope: {\r\n whenDoneAnimating: '&?'\r\n }\r\n };\r\n return directive;\r\n\r\n function link(scope, element, attrs) {\r\n var $sidebarInner = element.find('.sidebar-inner');\r\n var $dropdownElement = element.find('.sidebar-dropdown a');\r\n element.addClass('sidebar');\r\n $dropdownElement.click(dropdown);\r\n\r\n function dropdown(e) {\r\n var dropClass = 'dropy';\r\n e.preventDefault();\r\n if (!$dropdownElement.hasClass(dropClass)) {\r\n $sidebarInner.slideDown(350, scope.whenDoneAnimating);\r\n $dropdownElement.addClass(dropClass);\r\n } else if ($dropdownElement.hasClass(dropClass)) {\r\n $dropdownElement.removeClass(dropClass);\r\n $sidebarInner.slideUp(350, scope.whenDoneAnimating);\r\n }\r\n }\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('app.kitchenSink', [\r\n 'app.core',\r\n 'cascade',\r\n 'cgBusy',\r\n 'countingNumber',\r\n 'loadmask'\r\n ]);\r\n\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.kitchenSink')\r\n .config(routerConfig);\r\n\r\n /* @ngInject */\r\n function routerConfig($stateProvider) {\r\n $stateProvider\r\n .state('kitchen-sink', {\r\n url: '/kitchen-sink',\r\n templateUrl: '/app/kitchen-sink/kitchen-sink.html',\r\n controller: 'KitchenSinkController',\r\n controllerAs: 'kitchenSinkCtrl',\r\n title: 'Kitchen Sink',\r\n data: {\r\n requireLogin: false\r\n }\r\n });\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.kitchenSink')\r\n .controller('KitchenSinkController', KitchenSinkController)\r\n .controller('ToastCtrl', function($scope, $mdToast){\r\n $scope.closeToast = function(){ $mdToast.hide();};\r\n });\r\n\r\n /** @ngInject */\r\n KitchenSinkController.$inject = ['$scope', '$element', '$q', '$timeout', '$translatePartialLoader', '$mdToast'];\r\n function KitchenSinkController($scope, $element, $q, $timeout, $translatePartialLoader, $mdToast) {\r\n $translatePartialLoader.addPart('widgets');\r\n var vm = this;\r\n\r\n //-----------------\r\n // Functions\r\n //-----------------\r\n vm.resetPageLoad = resetPageLoad;\r\n vm.resetTable1Load = resetTable1Load;\r\n vm.resetTable2Load = resetTable2Load;\r\n vm.resetWidget1Load = resetWidget1Load;\r\n vm.resetWidget2Load = resetWidget2Load;\r\n vm.resetWidget3Load = resetWidget3Load;\r\n\r\n vm.last = {\r\n bottom: false,\r\n top: true,\r\n left: false,\r\n right: true\r\n };\r\n vm.toastPosition = angular.extend({}, vm.last);\r\n vm.getToastPosition = getToastPosition;\r\n vm.sanitizePosition = sanitizePosition;\r\n vm.showBookmarkToast = showBookmarkToast;\r\n\r\n vm.range = {\r\n start: '27-08-2014',\r\n end: '30-08-2014'\r\n };\r\n\r\n vm.ranges = [\r\n {\r\n name: 'Last Year',\r\n start: moment().subtract(1, 'y'),\r\n end: moment()\r\n },\r\n // TODO\r\n // {\r\n // name: 'Last Quarter',\r\n // start: moment().quarter(),\r\n // end: moment()\r\n // },\r\n {\r\n name: 'Last Month',\r\n start: moment().subtract(1, 'm').startOf('month'),\r\n end: moment().subtract(1, 'm').endOf('month'),\r\n },\r\n {\r\n name: 'Yesterday',\r\n start: moment().subtract(1, 'd'),\r\n end: moment().subtract(1, 'd')\r\n }\r\n ];\r\n\r\n function showBookmarkToast() {\r\n var pinTo = vm.getToastPosition();\r\n var toast = $mdToast.show({\r\n position: pinTo,\r\n hideDelay: 3000,\r\n templateUrl: '/app/kitchen-sink/kitchen-sink-toast.html',\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n })\r\n $mdToast.show(toast);\r\n }\r\n\r\n function getToastPosition() {\r\n sanitizePosition();\r\n return Object.keys(vm.toastPosition)\r\n .filter(function(pos) { return vm.toastPosition[pos]; })\r\n .join(' ');\r\n }\r\n\r\n function sanitizePosition() {\r\n var current = vm.toastPosition;\r\n if ( current.bottom && vm.last.top ) current.top = false;\r\n if ( current.top && vm.last.bottom ) current.bottom = false;\r\n if ( current.right && vm.last.left ) current.left = false;\r\n if ( current.left && vm.last.right ) current.right = false;\r\n vm.last = angular.extend({},current);\r\n }\r\n\r\n vm.theme = 'primary';\r\n vm.resetTheme = resetTheme;\r\n\r\n //-----------------\r\n // Full Page Load\r\n //-----------------\r\n resetPageLoad();\r\n function resetPageLoad() {\r\n $scope.pageLoaded = false;\r\n\r\n $timeout(function() {\r\n $scope.pageLoaded = true;\r\n }, 1000);\r\n }\r\n\r\n //-----------------\r\n // Widgets\r\n //-----------------\r\n $scope.widget1Control = {};\r\n $scope.widget1SegmentClassMap = {air: false, sea: false, ground: false};\r\n resetWidget1Load();\r\n function resetWidget1Load() {\r\n $scope.widget1Loaded = false;\r\n $scope.widget1Data = [{'type': 'air', 'shipments': 0}, {'type': 'sea', 'shipments': 0}, {'type': 'ground', 'shipments': 0}];\r\n $timeout(function() {\r\n $scope.widget1Data = [{'type': 'air', 'shipments': 30}, {'type': 'sea', 'shipments': 90}, {'type': 'ground', 'shipments': 41}];\r\n $scope.widget1Loaded = true;\r\n }, 3000);\r\n }\r\n\r\n resetWidget2Load();\r\n $scope.widget2Data = [{'type': 'air', 'shipments': 5}, {'type': 'sea', 'shipments': 1}, {'type': 'ground', 'shipments': 3}];\r\n $scope.widget2Control = {};\r\n $scope.widget2SegmentClassMap = {air: false, sea: false, ground: false};\r\n function resetWidget2Load() {\r\n $scope.widget2Loaded = false;\r\n $timeout(function() {\r\n $scope.widget2Loaded = true;\r\n $scope.widget2Data = [{'type': 'air', 'shipments': rand(1, 500)}, {'type': 'sea', 'shipments': rand(100, 1000)}, {'type': 'ground', 'shipments': rand(1, 100)}];\r\n }, 2500);\r\n }\r\n\r\n var widget3Data = getWidget3Data();\r\n resetWidget3Load();\r\n function resetWidget3Load() {\r\n $scope.widget3Loaded = false;\r\n $scope.widget3DataTab1 = widget3Data.original.tab1;\r\n $scope.widget3DataTab2 = widget3Data.original.tab2;\r\n $scope.widget3DataTab3 = widget3Data.original.tab3;\r\n $scope.widget3DataTab4 = widget3Data.original.tab4;\r\n $timeout(function() {\r\n $scope.widget3DataTab1 = widget3Data.loaded.tab1;\r\n $scope.widget3DataTab2 = widget3Data.loaded.tab2;\r\n $scope.widget3DataTab3 = widget3Data.loaded.tab3;\r\n $scope.widget3DataTab4 = widget3Data.loaded.tab4;\r\n $scope.widget3Loaded = true;\r\n }, 2000);\r\n }\r\n\r\n resetTheme();\r\n $scope.themeData = [\r\n {'xVal': 'Q1', 'spent': 30000},\r\n {'xVal': 'Q2', 'spent': 21000},\r\n {'xVal': 'Q3', 'spent': 52000},\r\n {'xVal': 'Q4', 'spent': 30000}\r\n ];\r\n function resetTheme () {\r\n $scope.themeLoaded = false;\r\n $timeout(function() {\r\n $scope.themeLoaded = true;\r\n $scope.themeData = [\r\n {'xVal': 'Q1', 'spent': 30000},\r\n {'xVal': 'Q2', 'spent': rand(23000, 23500)},\r\n {'xVal': 'Q3', 'spent': rand(52000, 53000)},\r\n {'xVal': 'Q4', 'spent': 30000}\r\n ];\r\n }, 50);\r\n }\r\n\r\n //-----------------\r\n // Table\r\n //-----------------\r\n resetTable1Load();\r\n function resetTable1Load() {\r\n $scope.table1Loaded = false;\r\n $scope.promise = $q(function(resolve, reject) {\r\n $timeout(function() {\r\n resolve();\r\n $scope.table1Loaded = true;\r\n }, 2000);\r\n });\r\n }\r\n\r\n resetTable2Load();\r\n function resetTable2Load() {\r\n $scope.table2Loaded = false;\r\n $scope.promise = $q(function(resolve, reject) {\r\n $timeout(function() {\r\n resolve();\r\n $scope.table2Loaded = true;\r\n }, 2000);\r\n });\r\n }\r\n\r\n //-----------------\r\n // Icons\r\n //-----------------\r\n var craneIcons = [\r\n {name: 'icon-home', icon: ''},\r\n {name: 'icon-bookmark', icon: ''},\r\n {name: 'icon-call made', icon: ''},\r\n {name: 'icon-clear', icon: ''},\r\n {name: 'icon-contact phone', icon: ''},\r\n {name: 'icon-contact mail', icon: ''},\r\n {name: 'icon-date range', icon: ''},\r\n {name: 'icon-description', icon: ''},\r\n {name: 'icon-directions boat', icon: ''},\r\n {name: 'icon-error outline', icon: ''},\r\n {name: 'icon-event available', icon: ''},\r\n {name: 'icon-file download', icon: ''},\r\n {name: 'icon-flight', icon: ''},\r\n {name: 'icon-insert chart', icon: ''},\r\n {name: 'icon-insert invitation', icon: ''},\r\n {name: 'icon-keyboard arrow down', icon: ''},\r\n {name: 'icon-keyboard arrow up', icon: ''},\r\n {name: 'icon-language', icon: ''},\r\n {name: 'icon-local shipping', icon: ''},\r\n {name: 'icon-mail outline', icon: ''},\r\n {name: 'icon-more vert', icon: ''},\r\n {name: 'icon-pin drop', icon: ''},\r\n {name: 'icon-place', icon: ''},\r\n {name: 'icon-playlist add check', icon: ''},\r\n {name: 'icon-schedule', icon: ''},\r\n {name: 'icon-sync problem', icon: ''},\r\n {name: 'icon-timeline', icon: ''},\r\n {name: 'icon-today', icon: ''},\r\n {name: 'icon-trending up', icon: ''},\r\n {name: 'icon-turned in not', icon: ''},\r\n {name: 'icon-warning', icon: ''}\r\n ];\r\n\r\n vm.icons = craneIcons;\r\n\r\n vm.colorGroups = getColorGroups();\r\n\r\n function getWidget3Data() {\r\n return {\r\n original: {\r\n tab1: [\r\n {'xVal': 'Sun', 'spent': 0},\r\n {'xVal': 'Mon', 'spent': 0},\r\n {'xVal': 'Tue', 'spent': 0},\r\n {'xVal': 'Wed', 'spent': 0},\r\n {'xVal': 'Thu', 'spent': 0},\r\n {'xVal': 'Fri', 'spent': 0},\r\n {'xVal': 'Sat', 'spent': 0}\r\n ],\r\n tab2: [\r\n {'xVal': '1', 'spent': 0},\r\n {'xVal': '2', 'spent': 0},\r\n {'xVal': '3', 'spent': 0},\r\n {'xVal': '4', 'spent': 0},\r\n {'xVal': '5', 'spent': 0},\r\n {'xVal': '6', 'spent': 0},\r\n {'xVal': '8', 'spent': 0},\r\n {'xVal': '9', 'spent': 0},\r\n {'xVal': '10', 'spent': 0},\r\n {'xVal': '11', 'spent': 0},\r\n {'xVal': '12', 'spent': 0},\r\n {'xVal': '13', 'spent': 0},\r\n {'xVal': '14', 'spent': 0},\r\n {'xVal': '15', 'spent': 0},\r\n {'xVal': '16', 'spent': 0},\r\n {'xVal': '17', 'spent': 0},\r\n {'xVal': '18', 'spent': 0},\r\n {'xVal': '19', 'spent': 0},\r\n {'xVal': '20', 'spent': 0},\r\n {'xVal': '21', 'spent': 0},\r\n {'xVal': '22', 'spent': 0},\r\n {'xVal': '23', 'spent': 0},\r\n {'xVal': '24', 'spent': 0},\r\n {'xVal': '25', 'spent': 0},\r\n {'xVal': '26', 'spent': 0},\r\n {'xVal': '27', 'spent': 0},\r\n {'xVal': '28', 'spent': 0},\r\n {'xVal': '29', 'spent': 0},\r\n {'xVal': '30', 'spent': 0}\r\n ],\r\n tab3: [\r\n {'xVal': 'Q1', 'spent': 0},\r\n {'xVal': 'Q2', 'spent': 0},\r\n {'xVal': 'Q3', 'spent': 0},\r\n {'xVal': 'Q4', 'spent': 0}\r\n ],\r\n tab4: [\r\n {'xVal': 'Jan', 'spent': 0},\r\n {'xVal': 'Feb', 'spent': 0},\r\n {'xVal': 'Mar', 'spent': 0},\r\n {'xVal': 'Apr', 'spent': 0},\r\n {'xVal': 'May', 'spent': 0},\r\n {'xVal': 'Jun', 'spent': 0},\r\n {'xVal': 'Jul', 'spent': 0},\r\n {'xVal': 'Aug', 'spent': 0},\r\n {'xVal': 'Sept', 'spent': 0},\r\n {'xVal': 'Oct', 'spent': 0},\r\n {'xVal': 'Nov', 'spent': 0},\r\n {'xVal': 'Dec', 'spent': 0}\r\n ]\r\n },\r\n loaded: {\r\n tab1: [\r\n {'xVal': 'Sun', 'spent': 300000},\r\n {'xVal': 'Mon', 'spent': 213000},\r\n {'xVal': 'Tue', 'spent': 52000},\r\n {'xVal': 'Wed', 'spent': 300000},\r\n {'xVal': 'Thu', 'spent': 300000},\r\n {'xVal': 'Fri', 'spent': 200000},\r\n {'xVal': 'Sat', 'spent': 400000}\r\n ],\r\n tab2: [\r\n {'xVal': '1', 'spent': 900},\r\n {'xVal': '2', 'spent': 1000},\r\n {'xVal': '3', 'spent': 500},\r\n {'xVal': '4', 'spent': 30},\r\n {'xVal': '5', 'spent': 800},\r\n {'xVal': '6', 'spent': 300},\r\n {'xVal': '8', 'spent': 230},\r\n {'xVal': '9', 'spent': 2000},\r\n {'xVal': '10', 'spent': 3000},\r\n {'xVal': '11', 'spent': 200},\r\n {'xVal': '12', 'spent': 200},\r\n {'xVal': '13', 'spent': 3600},\r\n {'xVal': '14', 'spent': 500},\r\n {'xVal': '15', 'spent': 3000},\r\n {'xVal': '16', 'spent': 3000},\r\n {'xVal': '17', 'spent': 200},\r\n {'xVal': '18', 'spent': 213},\r\n {'xVal': '19', 'spent': 500},\r\n {'xVal': '20', 'spent': 300},\r\n {'xVal': '21', 'spent': 3000},\r\n {'xVal': '22', 'spent': 50},\r\n {'xVal': '23', 'spent': 580},\r\n {'xVal': '24', 'spent': 30},\r\n {'xVal': '25', 'spent': 300},\r\n {'xVal': '26', 'spent': 200},\r\n {'xVal': '27', 'spent': 200},\r\n {'xVal': '28', 'spent': 520},\r\n {'xVal': '29', 'spent': 300},\r\n {'xVal': '30', 'spent': 3000}\r\n ],\r\n tab3: [\r\n {'xVal': 'Q1', 'spent': 30000},\r\n {'xVal': 'Q2', 'spent': 21000},\r\n {'xVal': 'Q3', 'spent': 52000},\r\n {'xVal': 'Q4', 'spent': 30000}\r\n ],\r\n tab4: [\r\n {'xVal': 'Jan', 'spent': 300000},\r\n {'xVal': 'Feb', 'spent': 213000},\r\n {'xVal': 'Mar', 'spent': 52000},\r\n {'xVal': 'Apr', 'spent': 300000},\r\n {'xVal': 'May', 'spent': 300000},\r\n {'xVal': 'Jun', 'spent': 200000},\r\n {'xVal': 'Jul', 'spent': 213000},\r\n {'xVal': 'Aug', 'spent': 52000},\r\n {'xVal': 'Sept', 'spent': 300000},\r\n {'xVal': 'Oct', 'spent': 300000},\r\n {'xVal': 'Nov', 'spent': 200000},\r\n {'xVal': 'Dec', 'spent': 340000}\r\n ]\r\n }\r\n }\r\n }\r\n\r\n function getColorGroups() {\r\n return [\r\n {\r\n name: 'Blues',\r\n colors: [\r\n { name: 'blue1', hexColor: '#45afe3', rgbColor: 'rgba(69, 175, 227, 1)'},\r\n { name: 'blue2', hexColor: '#324c7f', rgbColor: 'rgba(50, 76, 127, 1)' },\r\n { name: 'blue3', hexColor: '#2a416d', rgbColor: 'rgba(42, 65, 109, 1)'},\r\n { name: 'blue4', hexColor: '#192e5a', rgbColor: 'rgba(25, 46, 90, 1)'},\r\n { name: 'blue5', hexColor: '#1e233a', rgbColor: 'rgba(30, 35, 58, 1)'},\r\n { name: 'blue6', hexColor: '#050b24', rgbColor: 'rgba(5, 11, 36, 1)'}\r\n ]\r\n },\r\n {\r\n name: 'Blacks/Grays',\r\n colors: [\r\n { name: 'gray1', hexColor: '#fcfcfc', rgbColor: 'rgba(252, 252, 252, 1)'},\r\n { name: 'gray2', hexColor: '#f6f6f6', rgbColor: 'rgba(246, 246, 246, 1)'},\r\n { name: 'gray3', hexColor: '#e6e6e6', rgbColor: 'rgba(230, 230, 230, 1)'},\r\n { name: 'gray4', hexColor: '#909192', rgbColor: 'rgba(144, 145, 146, 1)'},\r\n { name: 'gray5', hexColor: '#5e6163', rgbColor: 'rgba(94, 97, 99, 1)'},\r\n { name: 'gray6', hexColor: '#616161, 90% Opacity', rgbColor: 'rgba(97, 97, 97, .9)'},\r\n { name: 'gray7', hexColor: '#3f4c59', rgbColor: 'rgba(63, 76, 89, 1)'},\r\n { name: 'gray8', hexColor: '#21282f', rgbColor: 'rgba(33, 40, 47, 1)' }\r\n ]\r\n },\r\n {\r\n name: 'Greens',\r\n colors: [\r\n { name: 'green1', hexColor: '#85d9a4', rgbColor: 'rgba(133, 217, 164, 1)'},\r\n { name: 'green2', hexColor: '#30c268', rgbColor: 'rgba(48, 194, 104, 1)'},\r\n { name: 'green3', hexColor: '#1b7e41', rgbColor: 'rgba(27, 126, 65, 1)'},\r\n { name: 'green4', hexColor: '#1c6033', rgbColor: 'rgba(28, 96, 51, 1)'}\r\n ]\r\n },\r\n {\r\n name: 'Oranges',\r\n colors: [\r\n { name: 'orange1', hexColor: '#ffe39c', rgbColor: 'rgba(255, 227, 156, 1)'},\r\n { name: 'orange2', hexColor: '#ffd35b', rgbColor: 'rgba(255, 211, 91, 1)'},\r\n { name: 'orange3', hexColor: '#ef9e3d', rgbColor: 'rgba(239, 158, 61, 1)'},\r\n { name: 'orange4', hexColor: '#fd7600', rgbColor: 'rgba(253, 118, 0, 1)'},\r\n { name: 'orange5', hexColor: '#774e1e', rgbColor: 'rgba(119, 78, 30, 1)'}\r\n ]\r\n },\r\n {\r\n name: 'Purples',\r\n colors: [\r\n { name: 'purple1', hexColor: '#9575cd', rgbColor: 'rgba(149, 117, 205, 1)'}\r\n ]\r\n },\r\n {\r\n name: 'Reds',\r\n colors: [\r\n { name: 'red1', hexColor: '#f4978a', rgbColor: 'rgba(244, 155, 138, 1)'},\r\n { name: 'red2', hexColor: '#ef533d', rgbColor: 'rgba(239, 83, 61, 1)'},\r\n { name: 'red3', hexColor: '#76291e', rgbColor: 'rgba(118, 41, 30, 1)'}\r\n ]\r\n },\r\n {\r\n name: 'Crane',\r\n colors: [\r\n { name: 'crane-teal', hexColor: '#2d7d8f', rgbColor: 'rgba(45, 125, 143, 1)'},\r\n { name: 'crane-green', hexColor: '#1b7e41', rgbColor: 'rgba(27, 126, 65, 1)'},\r\n { name: 'crane-blue', hexColor: '#213d75', rgbColor: 'rgba(33, 61, 117, 1)'}\r\n ]\r\n }\r\n ];\r\n }\r\n\r\n function rand(min, max) {\r\n return Math.floor(Math.random() * (max - min)) + min;\r\n }\r\n }\r\n})();\r\n\n(function(){\r\n\r\nangular\r\n .module(\"app\")\r\n .directive('multipleEmails', multipleEmails);\r\n\r\n function multipleEmails() {\r\n return {\r\n require: 'ngModel',\r\n link: function(scope, element, attrs, ctrl) {\r\n ctrl.$parsers.unshift(function(viewValue) {\r\n\r\n var emails = viewValue.split(',');\r\n // loop that checks every email, returns undefined if one of them fails.\r\n var re = /\\S+@\\S+\\.\\S+/;\r\n\r\n // angular.foreach(emails, function() {\r\n var validityArr = emails.map(function(str){\r\n return re.test(str.trim());\r\n }); // sample return is [true, true, true, false, false, false]\r\n // console.log(emails, validityArr);\r\n var atLeastOneInvalid = false;\r\n angular.forEach(validityArr, function(value) {\r\n if(value === false)\r\n atLeastOneInvalid = true;\r\n });\r\n // deb//ugger;\r\n if (viewValue === \"\"){\r\n ctrl.$setPristine();\r\n return viewValue;\r\n } \r\n if(!atLeastOneInvalid) {\r\n //debugger;\r\n // ^ all I need is to call the angular email checker here, I think.\r\n ctrl.$setValidity(ctrl.$name, true);\r\n return viewValue;\r\n } else {\r\n ctrl.$setValidity(ctrl.$name, false);\r\n ctrl.$setTouched(true);\r\n return undefined;\r\n }\r\n // })\r\n });\r\n }\r\n };\r\n }\r\n\r\n}) (); // End directive\n/**\r\n * Created the <counting-number> directive. It will animate counting from a number to another\r\n * based on the value that has changed.\r\n */\r\n(function() {\r\n 'use strict';\r\n angular.module('countingNumber', []);\r\n angular\r\n .module('countingNumber')\r\n .directive('countingNumber', ['$interval', countingNumber]);\r\n\r\n function countingNumber($interval) {\r\n var directive = {\r\n restrict: 'EA',\r\n scope: {},\r\n link: function(scope, element, attrs) {\r\n var isCounting = false,\r\n tid = false;\r\n scope.$watch(\r\n function () {\r\n // will return the number as long as this is the only element\r\n return element[0].childNodes[0].textContent.trim();\r\n },\r\n function (newValue, oldValue) {\r\n if (!isCounting && newValue !== oldValue) {\r\n isCounting = true;\r\n\r\n // we want the animation to only take a second with a 10 milli interval, so figure\r\n // out incrementer/decrementer based on the distance\r\n var distance = newValue - oldValue,\r\n step = distance/100; // 1000 millis in 10 milli intervals\r\n\r\n // no decimals\r\n if (distance > 0) {\r\n step = Math.ceil(step);\r\n }\r\n else {\r\n step = Math.floor(step);\r\n }\r\n var currNum = (1*oldValue) + step;\r\n // make sure our first step didn't go too far\r\n if ((step > 0 && currNum > newValue) || (step <= 0 && currNum < newValue)) {\r\n currNum = newValue;\r\n }\r\n\r\n tid = $interval(function() {\r\n\r\n // see if we should stop\r\n if (currNum == newValue) {\r\n // set it to the currNum regardless because if the first step would have gone too\r\n // far this will make sure we update\r\n element[0].childNodes[0].textContent = currNum;\r\n isCounting = false;\r\n $interval.cancel(tid);\r\n return;\r\n }\r\n\r\n // step and update\r\n currNum += step;\r\n if ((step > 0 && currNum > newValue) || (step <= 0 && currNum < newValue)) {\r\n currNum = newValue;\r\n }\r\n element[0].childNodes[0].textContent = currNum;\r\n }, (distance < 100 ? 1000/distance : 10));\r\n }\r\n }\r\n );\r\n }\r\n };\r\n\r\n return directive;\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name DashboardService\r\n *\r\n * @description The DashboardService module communciates with the Rails API to\r\n * procure widget data\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadActiveShipments\r\n * @description queries the API for active shipment counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedActiveShipments\r\n * @description returns whether or not the DashboardService has cached active shipment data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedActiveShipments\r\n * @description returns the currently cached active shipment data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadCurrentExceptions\r\n * @description queries the API for current exceptions counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedCurrentlExceptions\r\n * @description returns whether or not the DashboardService has cached current exception data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedCurrentExceptions\r\n * @description returns the currently cached current exception data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.loadPotentialExceptions\r\n * @description queries the API for potential exceptions counts\r\n * @return object\r\n * <code>\r\n * {\r\n * total: int,\r\n * air: int,\r\n * sea: int,\r\n * ground: int\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedPotentialExceptions\r\n * @description returns whether or not the DashboardService has cached potential exception data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedPotentialExceptions\r\n * @description returns the currently cached potential exception data\r\n * @return object\r\n * visible\r\n */\r\n\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.loadSpendingOverTime(dateFrom, dateTo, group [, timeoutPromise])\r\n * @description queries the API for spending over time\r\n * @param dateFrom - the date to start from (beginning of day)\r\n * @param dateTo - the date to end with (end of day)\r\n * @param group - what to group by [week, month, quarter, year]\r\n * @param timeoutPromise - [optional] a promise that can be resolved to cancel the request\r\n * @return object\r\n * <code>\r\n * {\r\n * group_by: string,\r\n * groups: object\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedSpendingOverTime\r\n * @description returns whether or not the DashboardService has cached spending over time data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedSpendingOverTime\r\n * @description returns the currently cached spending over time data\r\n * @return object\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.loadOnTimePercentage(dateTo, group [, timeoutPromise])\r\n * @description queries the API for spending over time\r\n * @param dateTo - the date to end with (end of day). dateFrom is inferred by the server\r\n * @param group - what to group by [week, month, quarter, year]\r\n * @param timeoutPromise - [optional] a promise that can be resolved to cancel the request\r\n * @return object\r\n * <code>\r\n * {\r\n * group_by: string,\r\n * current: {\r\n * \ttotal: int,\r\n * \tontime: int,\r\n * \tdate_from: date,\r\n * \tdate_to: date\r\n * },\r\n * previous: {\r\n * \ttotal: int,\r\n * \tontime: int,\r\n * \tdate_from: date,\r\n * \tdate_to: date\r\n * },\r\n * }\r\n * </code>\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.hasCachedOnTimePercentage\r\n * @description returns whether or not the DashboardService has cached on time percentage data\r\n * @return boolean\r\n * visible\r\n */\r\n\r\n /**\r\n * @ngdoc method\r\n * @name DashboardService.getCachedOnTimePercntage\r\n * @description returns the currently cached on time percentage data. Note that this may not\r\n * have data for all periods\r\n * @return object\r\n * visible\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .service('DashboardService', DashboardService)\r\n .constant(\"DASHBOARD\", {\r\n \"TIMEOUT\": \"120000\",\r\n \"SERVER_ERROR\": \"An error occurred while loading the data\"\r\n });\r\n\r\n /** @ngInject */\r\n DashboardService.$inject = ['$http', 'api', '$q', '$filter', '$rootScope', '$timeout', \"DASHBOARD\", \"AJAX\"];\r\n function DashboardService($http, api, $q, $filter, $rootScope, $timeout, DASHBOARD, AJAX) {\r\n var cachedActiveShipments = false,\r\n cachedCurrentExceptions = false,\r\n cachedPotentialExceptions = false,\r\n loadingExistParam = false,\r\n cachedLanePairs = {week: false, month: false, quarter: false, year: false},\r\n cachedSpendingOverTime = {},\r\n cachedOnTimePercentage = {},\r\n searchParams = {},\r\n tlp = {all:[], sea:[], air:[], ground:[]};\r\n var topLanePairs = {\r\n week: angular.copy(tlp),\r\n month: angular.copy(tlp),\r\n quarter: angular.copy(tlp),\r\n year: angular.copy(tlp),\r\n weekLoaded: false,\r\n monthLoaded: false,\r\n quarterLoaded: false,\r\n yearLoaded: false\r\n };\r\n var pins = {\r\n week: angular.copy(tlp),\r\n month: angular.copy(tlp),\r\n quarter: angular.copy(tlp),\r\n year: angular.copy(tlp),\r\n };\r\n //['all', 'air', 'sea', 'ground'].map(function(d){topLanePairs[d] = angular.copy(lanePair);});\r\n\r\n function buildQuery(){\r\n var query = [];\r\n for (var key in searchParams){\r\n query.push(key+\"=\"+searchParams[key]);\r\n }\r\n var params=\"?\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"userEmail=\"+localStorage.switchEmail+\"&\";\r\n // }else if(localStorage.userCompany){\r\n // params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompany)+\"&\";\r\n // }else if(localStorage.userDepartment){\r\n // params +=\"userDepartment=\"+encodeURIComponent(localStorage.userDepartment)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompany+\"&\";\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&\";\r\n // }\r\n\r\n\r\n\r\n if(localStorage.customerType == 'cww'){\r\n\r\n if(localStorage.switchEmailCwwType){\r\n params +=\"userEmail=\"+localStorage.switchEmailCwwType+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userCompanyCww){\r\n params +=\"userCompany=\"+encodeURIComponent(localStorage.userCompanyCww)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.userDepartmentCww){\r\n params +=\"userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCww)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCww+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }else if(localStorage.dummyUser){\r\n params +=\"dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType+\"&\";\r\n }\r\n\r\n }else{\r\n params +=\"customer_type=cww&\";\r\n }\r\n\r\n if (query.length > 0){\r\n return params+query.join('&');\r\n } else {\r\n if(params == \"?\"){return \"\";}\r\n else{ return params; }\r\n\r\n }\r\n }\r\n\r\n function processLanePairs(data, group){\r\n var keys = {'all':'all_lane_pairs', 'air':'air_lane_pairs','sea':'sea_lane_pairs','ground':'ground_lane_pairs'};\r\n var pin_types = ['origin', 'destination'];\r\n for (var ship_type in keys){\r\n var lane_pairs = keys[ship_type];\r\n var top_3 = data[lane_pairs].top_3_by_count;\r\n\r\n // Create the total\r\n topLanePairs[group][ship_type].length = 0;\r\n topLanePairs[group][ship_type].push({\r\n label: 'TOTAL',\r\n count: +data[lane_pairs].total_by_count,\r\n volume: +data[lane_pairs].total_by_volume,\r\n overtime_breakdown: data[lane_pairs].overtime_breakdown\r\n });\r\n // Create the lane pairs\r\n for (var route_name in top_3){\r\n var lane_pair = top_3[route_name];\r\n lane_pair.label = route_name;\r\n lane_pair.count = +lane_pair.count;\r\n lane_pair.volume = +lane_pair.volume;\r\n topLanePairs[group][ship_type].push(lane_pair);\r\n } // End for (var route_name in top_3){\r\n // Create the necessary pins\r\n pins[group][ship_type].length = 0;\r\n\r\n topLanePairs[group][ship_type].map(function(d){\r\n if (d.label !== 'TOTAL'){\r\n var names = d.label.split(' to ');\r\n var pin = {};\r\n for (var i in pin_types){\r\n pin = d[pin_types[i]];\r\n pin.type = pin_types[i];\r\n pin.name = names[i];\r\n pins[group][ship_type].push(pin);\r\n } // End For\r\n } // End if (d.label !== 'TOTAL'){\r\n }); // End map\r\n } // End for (var ship_type in keys){\r\n } // End processLanePairs\r\n\r\n return {\r\n foo: function(){return \"bar\";},\r\n setSearchParams: function(params){ searchParams = params;},\r\n getLanePairs: function(period){\r\n return topLanePairs[period];},\r\n getLegend: function(){\r\n return legend;\r\n },\r\n getPins: function(group){\r\n return pins[group];\r\n },\r\n\r\n invalidateCache: function(){\r\n\r\n return $http.get(api.url_v2 + '/widgets/invalidate_cache', {timeout: AJAX.TIMEOUT});\r\n },\r\n\r\n\r\n //-------------------------\r\n // Active Shipments\r\n //-------------------------\r\n loadActiveShipments: function(){\r\n var promise = $http.get(api.url_v2 + '/widgets/active_shipments'+buildQuery()).then(\r\n function successCallback(response) {\r\n loadingExistParam = true;\r\n cachedActiveShipments = response.data;\r\n $rootScope.$broadcast(\"currentShipmentsLoading\", loadingExistParam);\r\n return response;\r\n }, function errorCallback(response){\r\n return {error: DASHBOARD.SERVER_ERROR};\r\n });\r\n return promise;\r\n },\r\n getCachedActiveShipments: function() {\r\n return cachedActiveShipments;\r\n },\r\n hasCachedActiveShipments: function() {\r\n return !!cachedActiveShipments;\r\n },\r\n\r\n //-------------------------\r\n // Current Exceptions\r\n //-------------------------\r\n loadCurrentExceptions: function(){\r\n var promise = $http.get(api.url_v2 + '/widgets/current_exceptions'+buildQuery()).then(function(response) {\r\n loadingExistParam = true;\r\n cachedCurrentExceptions = response.data;\r\n $rootScope.$broadcast(\"currentExceptionLoading\", loadingExistParam);\r\n return response;\r\n }, function errorCallback(response){\r\n return {error: DASHBOARD.SERVER_ERROR};\r\n });\r\n return promise;\r\n },\r\n getCachedCurrentExceptions: function() {\r\n return cachedCurrentExceptions;\r\n },\r\n hasCachedCurrentExceptions: function() {\r\n return !!cachedCurrentExceptions;\r\n },\r\n\r\n //-------------------------\r\n // Potential Exceptions\r\n //-------------------------\r\n loadPotentialExceptions: function(){\r\n var promise = $http.get(api.url_v2 + '/widgets/potential_exceptions'+buildQuery()).then(function(response) {\r\n loadingExistParam = true;\r\n cachedPotentialExceptions = response.data;\r\n $rootScope.$broadcast(\"currentPotentialExceptionsLoading\", loadingExistParam);\r\n return response;\r\n }, function errorCallback(response){\r\n return {error: DASHBOARD.SERVER_ERROR};\r\n });\r\n return promise;\r\n },\r\n getCachedPotentialExceptions: function() {\r\n return cachedPotentialExceptions;\r\n },\r\n hasCachedPotentialExceptions: function() {\r\n return !!cachedPotentialExceptions;\r\n },\r\n\r\n //-------------------------\r\n // Spend Over Time\r\n //-------------------------\r\n loadSpendingOverTime: function(dateFrom, dateTo, group, timeoutPromise) {\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n var timeoutId = false;\r\n var query = buildQuery();\r\n query = query ? (query + '&date_from='+dateFrom+'&date_to='+dateTo+'&group_by='+group) :\r\n ('?date_from='+dateFrom+'&date_to='+dateTo+'&group_by='+group);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n var promise = $http.get(api.url_v2 + '/widgets/spend_over_time' + query, {timeout: timeoutPromise.promise})\r\n .then(function(response) {\r\n cachedSpendingOverTime[group] = response.data;\r\n timeoutPromise = false;\r\n if (timeoutId) $timeout.cancel(timeoutId);\r\n return response.data;\r\n });\r\n timeoutId = $timeout(function() {\r\n //if (timeoutPromise) timeoutPromise.resolve();\r\n timeoutId = false;\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n },\r\n getCachedSpendingOverTime: function() {\r\n return cachedSpendingOverTime;\r\n },\r\n hasCachedSpendingOverTime: function() {\r\n return !!cachedSpendingOverTime;\r\n },\r\n\r\n //-------------------------\r\n // Ontime Percentage\r\n //-------------------------\r\n loadOnTimePercentage: function(date_from,dateTo, group, timeoutPromise) {\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n var timeoutId = false;\r\n var query = buildQuery();\r\n query = query ? (query + '&date_to='+dateTo+'&group_by='+group) :\r\n ('?date_to='+dateTo+'&group_by='+group);\r\n\r\n\r\n\r\n var promise = $http.get(api.url_v2 + '/widgets/ontime_percentage'+query, {timeout: timeoutPromise.promise})\r\n .then(function(response) {\r\n cachedOnTimePercentage[group] = response.data;\r\n return response.data;\r\n });\r\n timeoutId = $timeout(function() {\r\n //if (timeoutPromise) timeoutPromise.resolve();\r\n timeoutId = false;\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n },\r\n getCachedOnTimePercentage: function() {\r\n return cachedOnTimePercentage;\r\n },\r\n hasCachedOnTimePercentage: function() {\r\n return !!cachedOnTimePercentage;\r\n },\r\n\r\n //--------------------------\r\n // Lane Pairs\r\n //--------------------------\r\n loadLanePairs: function(dateFrom, dateTo, group, timeoutPromise){\r\n timeoutPromise = timeoutPromise || $q.defer();\r\n var query = buildQuery(),\r\n timeoutId = false;\r\n query = query ? (query + 'date_from='+dateFrom+'&date_to='+dateTo+'&group_by='+group) :\r\n ('?date_from='+dateFrom+'&date_to='+dateTo+'&group_by='+group);\r\n\r\n var promise = $http.get(api.url_v2 + '/widgets/lane_pairs' + query, {timeout: timeoutPromise.promise})\r\n .then(function(response){\r\n cachedLanePairs[group] = true;\r\n processLanePairs(response.data, group);\r\n topLanePairs[group+\"Loaded\"] = true;\r\n timeoutId = false;\r\n timeoutPromise = false;\r\n return;\r\n });\r\n timeoutId = $timeout(function() {\r\n //if (timeoutPromise) timeoutPromise.resolve();\r\n timeoutId = false;\r\n }, AJAX.TIMEOUT);\r\n return promise;\r\n\r\n },\r\n hasCachedLanePairs: function(group){\r\n return !!cachedLanePairs[group];\r\n }\r\n\r\n\r\n }; // End Service Return\r\n } // End Service\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .config(routerConfig);\r\n\r\n /* @ngInject */\r\n routerConfig.$inject = ['$stateProvider', 'menuGroups', 'searchParams'];\r\n function routerConfig($stateProvider, menuGroups, searchParams) {\r\n\r\n $stateProvider\r\n .state('dashboard', {\r\n url: '/',\r\n templateUrl: '/app/dashboard/dashboard.html',\r\n controller: 'DashboardController',\r\n controllerAs: 'vm',\r\n title: 'Dashboard',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.dashboard\r\n }\r\n })\r\n .state('dashboardCfs', {\r\n url: '/cfs',\r\n templateUrl: '/app/dashboard/cfs/dashboard.html',\r\n controller: 'DashboardCfsController',\r\n controllerAs: 'vm',\r\n title: 'Dashboard(CFS)',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.dashboardCfs\r\n }\r\n }) \r\n .state('dashboardCmts', {\r\n url: '/cmts',\r\n templateUrl: '/app/dashboard/cmts/dashboard.html',\r\n controller: 'DashboardCmtsController',\r\n controllerAs: 'vm',\r\n title: 'Dashboard(CMTS)',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.dashboardCmts\r\n }\r\n })\r\n .state('dashboardCsl', {\r\n url: '/csl',\r\n templateUrl: '/app/dashboard/csl/dashboard.html',\r\n controller: 'DashboardCslController',\r\n controllerAs: 'vm',\r\n title: 'Dashboard(CSL)',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.dashboardCsl\r\n }\r\n })\r\n .state('visualize', {\r\n url: '/track-trace/viz' + getParams(),\r\n templateUrl: '/app/dashboard/viz.html',\r\n controller: 'DashboardController',\r\n controllerAs: 'vm',\r\n title: 'Visualization',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.dashboard\r\n }\r\n });\r\n function getParams(){\r\n var params = [];\r\n searchParams;\r\n \r\n for (var param in searchParams){\r\n params.push(param);\r\n }\r\n return '?'+params.join('&');\r\n }\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name DashboardController\r\n *\r\n * @description The DashboardController module interfaces with the user dashboard\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.dashboard')\r\n .run(['$anchorScroll', function($anchorScroll) {\r\n $anchorScroll.yOffset = 90; // account for top nav when scrolling\r\n }])\r\n .animation('.progress-bar', ['$animateCss', function($animateCss){\r\n return {\r\n enter: function(element, doneFn){\r\n var ewidth = element[0].width;\r\n return $animateCss(element, {\r\n from: {width: '0px'},\r\n to: {width: ewidth},\r\n duration: 100\r\n });\r\n }\r\n }\r\n }])\r\n .controller('DashboardController', DashboardController)\r\n\r\n /** @ngInject */\r\n DashboardController.$inject = ['DashboardService', '$window', '$anchorScroll', 'UserService', 'AdvSearchService', '$log', '$scope', '$timeout', '$location', '$filter', '$q', '$state', '$mdDialog', '$mdMedia', '$rootScope', '$animateCss', 'permissions','$httpParamSerializer'];\r\n function DashboardController(DashboardService, $window, $anchorScroll, UserService, AdvSearchService, $log, $scope, $timeout, $location, $filter, $q, $state, $mdDialog, $mdMedia, $rootScope, $animateCss, permissions,$httpParamSerializer) {\r\n var vm = this;\r\n\r\n var scrollEvt = false\r\n $(window).on( 'scroll', function(event){\r\n if(!scrollEvt){\r\n $window.scrollTo(0, 0);\r\n }\r\n scrollEvt = true\r\n });\r\n\r\n vm.showLoading = false; //flag that shows the loading or not\r\n vm.params = {};\r\n vm.hardRefresh = hardRefresh;\r\n vm.backLink = \"\";\r\n vm.largeDonutNumbers = false;\r\n vm.configuration = 'a';\r\n vm.onTimePercentageSwap = onTimePercentageSwap;\r\n vm.user = UserService.getUserData();\r\n vm.getStartDate = getStartDate;\r\n // vm.getChartLabels = getChartLabels;\r\n vm.getstackedChartData = getstackedChartData;\r\n //vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n if(vm.user.permissions.cww){\r\n vm.hasFinancialPermissions = (getPermissionsValue(vm.user.permissions, 'cww').hasOwnProperty('Shipment'))? vm.user.permissions.cww.Shipment.includes('financial') :false;\r\n }else{\r\n vm.hasFinancialPermissions = false;\r\n }\r\n vm.widgetHasCustomRange = {\r\n onTimePercentage: false,\r\n spendOverTime: false,\r\n lanePairs: false,\r\n otpDate : {\r\n startDate : '',\r\n endDate : ''\r\n },\r\n sopDate : {\r\n startDate : '',\r\n endDate : ''\r\n },\r\n laneDate : {\r\n startDate : '',\r\n endDate : ''\r\n }\r\n };\r\n vm.lanePairsDateTo = false;\r\n vm.momentDateFormat = 'YYYY-MM-DD';\r\n vm.dateMax = new Date();\r\n if ($state.current.name === 'dashboard'){\r\n localStorage.setItem('demoTypeDefault','cww');\r\n }\r\n\r\n vm.donutNums = {\r\n 'potentialExceptionNum': false,\r\n 'currentExceptionNum': false,\r\n 'activeShipmentsNum': false\r\n };\r\n\r\n $rootScope.$on(\"currentShipmentsLoading\", function(event, value) {\r\n vm.currentShipmentsLoading = value;\r\n });\r\n\r\n $rootScope.$on(\"currentExceptionLoading\", function(event, value) {\r\n vm.currentExceptionLoading = value;\r\n });\r\n\r\n $rootScope.$on(\"currentPotentialExceptionsLoading\", function(event, value) {\r\n vm.currentPotentialExceptionsLoading = value;\r\n });\r\n\r\n // ================================\r\n // Handle Timeouts\r\n // ================================\r\n var spendingOverTimeTimeout = {},\r\n onTimePercentageTimeout = {},\r\n lanePairsTimeout = {}; // used lower, prevents an undefined error by putting it here; // used lower, prevents an undefined error by putting it here\r\n\r\n $rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams){\r\n cancelTimeouts(spendingOverTimeTimeout);\r\n cancelTimeouts(onTimePercentageTimeout);\r\n cancelTimeouts(lanePairsTimeout);\r\n });\r\n\r\n angular.element(function(){\r\n\r\n var otp = angular.element(document.querySelector('on-time-percentage'))[0]\r\n\r\n //Giving error in IE [offsetHeight]\r\n //otp.offsetHeight = otp.offsetWidth * 9 / 16;\r\n })\r\n function cancelTimeouts(timeoutHash){\r\n try{\r\n Object.keys(timeoutHash).map(function(timeoutkey){\r\n timeoutHash[timeoutkey].resolve(\"stateChanged\");\r\n })\r\n }catch(e){\r\n\r\n }\r\n }\r\n\r\n /* Custom Visualization Form */\r\n if ($state.current.name === 'visualize'){\r\n var searchFields = angular.copy(AdvSearchService.getCurrentSearchFields());\r\n for (var p in $state.params){\r\n if ($state.params[p] !== undefined){\r\n vm.params[p] = $state.params[p];\r\n searchFields[p].value = $state.params[p];\r\n }\r\n }\r\n vm.backLink = $location.url().replace('track-trace/viz', 'track-trace');\r\n DashboardService.setSearchParams(vm.params);\r\n AdvSearchService.setCurrentSearchFields(searchFields);\r\n vm.query = AdvSearchService.getCurrentSearch();\r\n $scope.$watch('vm.query', function(){\r\n DashboardService.setSearchParams(vm.query);\r\n }, true);\r\n }\r\n\r\n d3.json('/assets/json/world-50m.json', function(err, world){\r\n if(err) throw err;\r\n $scope.$apply(function(){\r\n $scope.land = topojson.feature(world, world.objects.countries);\r\n $scope.boundary = topojson\r\n .mesh(world, world.objects.countries, function(a, b) { return a !== b; });\r\n });\r\n });\r\n\r\n /* functions */\r\n vm.showLoading = showLoading;\r\n vm.hideLoading = hideLoading;\r\n vm.getDashboard = getDashboard;\r\n vm.setCustomRange = setCustomRange;\r\n vm.setEndDate = setEndDate;\r\n vm.closeModal = closeModal;\r\n vm.resetCustomRange = resetCustomRange;\r\n vm.displayDate = displayDate;\r\n vm.keyHandler = keyHandler;\r\n vm.showModal = showModal;\r\n vm.tabSelectedOne = tabSelectedOne;\r\n vm.is_consignee_user = UserService.check_consignee_user();\r\n vm.checkValidDate = checkValidDate;\r\n vm.loadTrackandTrace = loadTrackandTracePage;\r\n vm.onspentModeSelected = onspentModeSelected;\r\n vm.deselectSpendMode = deselectSpendMode;\r\n function tabSelectedOne(tab){\r\n var setData = JSON.parse(localStorage.getItem('spentTime'));\r\n var dateFrom, dateTo;\r\n if(setData){\r\n if(setData.dateFrom)\r\n dateFrom = setData.dateFrom;\r\n }else{\r\n // dateFrom = vm.params.due_date_from ? vm.params.due_date_from :\r\n // $location.search()['dateFrom'] ? $location.search()['dateFrom'] : $filter(\"date\")(new Date(), 'yyyy-MM-dd', \"UTC\");\r\n\r\n if (!dateFrom) {\r\n var toDate = $filter(\"date\")(new Date(), 'yyyy-MM-dd', \"UTC\");\r\n dateFrom = new Date(toDate);\r\n dateFrom = $filter(\"date\")(dateFrom.setFullYear(dateFrom.getFullYear() - 1), 'yyyy-MM-dd', \"UTC\");\r\n }\r\n }\r\n if(setData){\r\n if(setData.dateTo)\r\n dateTo = setData.dateTo;\r\n }else{\r\n dateTo = vm.params.due_date_to ? vm.params.due_date_to :\r\n $location.search()['dateTo'] ? $location.search()['dateTo'] : $filter(\"date\")(new Date(), 'yyyy-MM-dd', \"UTC\");\r\n }\r\n\r\n localStorage.setItem('tabType',tab.field);\r\n\r\n if(tab.field == 'week'){ doLoadSpendingOverTime(dateFrom, dateTo, 'week'); }\r\n if(tab.field == 'month'){ doLoadSpendingOverTime(dateFrom, dateTo, 'month'); }\r\n if(tab.field == 'quarter'){ doLoadSpendingOverTime(dateFrom, dateTo, 'quarter'); }\r\n if(tab.field == 'year'){ doLoadSpendingOverTime(dateFrom, dateTo, 'year'); }\r\n\r\n }\r\n\r\n function getPermissionsValue(responsePermissionsData, type){\r\n return responsePermissionsData[type] || {}\r\n }\r\n\r\n function showModal(modal) {\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/dashboard/modals/' + modal + '.modal.html',\r\n clickOutsideToClose: true,\r\n parent: angular.element(document.body),\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n function getDashboard(){\r\n var groups = UserService.getUserData().groups;\r\n if (groups){\r\n groups.map(function(group){\r\n if (group.data.dashboard_config){\r\n vm.configuration = group.data.dashboard_config;\r\n }\r\n });\r\n }\r\n return \"/app/dashboard/configurations/version-\" + vm.configuration + \".html\";\r\n }\r\n\r\n //------------------------------------------\r\n // Shipping Volume and Count Tabs\r\n // //---------------------------------------\r\n vm.periods = [\r\n {label: 'WIDGETS.WEEK', field:'week'},\r\n {label: 'WIDGETS.MONTH', field:'month'},\r\n {label: 'WIDGETS.QUARTER', field:'quarter'},\r\n {label: 'WIDGETS.YEAR', field:'year'}\r\n ];\r\n\r\n vm.metric_types = [\r\n {label: 'WIDGETS.ALL', field:'all'},\r\n {label: 'WIDGETS.VOLUME', field:'volume'},\r\n {label: 'WIDGETS.COUNT', field:'count'}\r\n ];\r\n\r\n vm.lane_type = [\r\n {label: 'WIDGETS.ALL', field:'all', icon: null},\r\n {label: '', field:'air', icon: ''},\r\n {label: '', field:'sea', icon: ''},\r\n {label: \"\", field:'ground', icon: ''}\r\n ];\r\n\r\n vm.spent_type = [\r\n {label: 'WIDGETS.ALL', field:'all', icon: null},\r\n {label: '', field:'air', icon: ''},\r\n {label: '', field:'sea', icon: ''},\r\n {label: '', field:'ground', icon: ''},\r\n {label: '', field:'urgent_air', icon: ''},\r\n {label: '', field:'warehouse', icon: ''},\r\n {label: '', field:'custom_brokerage', icon: ''}\r\n\r\n ];\r\n //==========================================\r\n\r\n vm.topLanePairs = [];\r\n vm.lanePairsPeriod = {\r\n week:{},\r\n month:{},\r\n quarter:{},\r\n year:{}\r\n };\r\n vm.pins = [];\r\n\r\n //------------------------------------------\r\n // Shipping Volume over Count Settings\r\n //------------------------------------------\r\n vm.shipmentVolVsCountSettings = {\r\n selectedPeriod: \"week\",\r\n selectedLaneType: \"all\",\r\n showTotal: true,\r\n isLanePairLoaded: vm.topLanePairs['weekLoaded'],\r\n isLanePairFirstLoad: true,\r\n isLanePairData: false,\r\n showCountVolume: {count: true, volume: true},\r\n firstLoad: {'week': true, 'quarter': true, 'month': true, 'year': true},\r\n isLoaded: {'week': false, 'quarter': false, 'month': false, 'year': false},\r\n metricColors: {count: \"#fd7600\", volume: \"#45afe3\"},\r\n laneColors: [\"#FD7600\", \"#85D9A4\", \"#FFD35B\"],\r\n period: {\r\n start: \"\",\r\n end: \"\"\r\n },\r\n selectedLane: \"TOTAL\"\r\n };\r\n vm.totalButton = \"Hide Total\";\r\n vm.toggleTotal = function(){\r\n vm.shipmentVolVsCountSettings.showTotal = !vm.shipmentVolVsCountSettings.showTotal;\r\n vm.totalButton = vm.shipmentVolVsCountSettings.showTotal ? \"Hide Total\" : \"Show Total\";\r\n selectLane();\r\n };\r\n //==========================================\r\n\r\n /* variables */\r\n // NOTE: donut widgets have their variables set dynamically\r\n\r\n vm.spendingOverTimeData = {\r\n week: [],\r\n weekHasData: false,\r\n month: [],\r\n monthHasData: false,\r\n quarter: [],\r\n quarterHasData: false,\r\n year: [],\r\n yearHasData: false\r\n };\r\n\r\n vm.isSpendingOverTimeLoaded = {\r\n week: false,\r\n month: false,\r\n quarter: false,\r\n year: false\r\n };\r\n\r\n vm.spendingOverTimePeriod = {\r\n week:{\r\n dateFrom: '',\r\n dateTo: ''\r\n },\r\n month:{\r\n dateFrom: '',\r\n dateTo: ''\r\n },\r\n quarter:{\r\n dateFrom: '',\r\n dateTo: ''\r\n },\r\n year:{\r\n dateFrom: '',\r\n dateTo: ''\r\n }\r\n };\r\n\r\n function keyHandler(keyCodeString){\r\n var hardRefreshCodes = ['116-shiftKey', '82-metaKey-shiftKey', '116-ctrlKey'];\r\n if (hardRefreshCodes.includes(keyCodeString)) {\r\n event.preventDefault();\r\n hardRefresh();\r\n }\r\n\r\n }\r\n\r\n function hardRefresh(){\r\n\r\n DashboardService.invalidateCache().finally(function(){\r\n location.reload(true);\r\n });\r\n }\r\n //-----------------------------------------------------------\r\n // Get the Lane Pairs group associated with a period\r\n // - Contains shipping type objects: air, sea, ground, all\r\n // - Each type object contains the total and the top 3 lanes\r\n // - The overtime_breakdown is packaged with each lane\r\n //-----------------------------------------------------------\r\n\r\n function getLanePair(period){\r\n var ship_type = vm.shipmentVolVsCountSettings.selectedLaneType;\r\n var lane_pairs = vm.topLanePairs;\r\n // Set Lane Pair\r\n lane_pairs.length = 0;\r\n DashboardService.getLanePairs(period)[ship_type].map(function(d){lane_pairs.push(d);});\r\n vm.pins = DashboardService.getPins(period)[ship_type];\r\n // Set MetaData\r\n vm.shipmentVolVsCountSettings.isLanePairData = lane_pairs.length > 0 && lane_pairs[0].count > 0;\r\n vm.shipmentVolVsCountSettings.isLanePairLoaded = vm.shipmentVolVsCountSettings.isLoaded[period];\r\n vm.shipmentVolVsCountSettings.isLanePairFirstLoad = vm.shipmentVolVsCountSettings.firstLoad[period];\r\n }\r\n\r\n //-----------------------------------------------------------------\r\n // Shipping Volume over Count Settings - Period Tab\r\n // - When a new tab is selected we must get a new lane pair object\r\n //-----------------------------------------------------------------\r\n vm.onSVOCPeriodTabSelected = onSVOCPeriodTabSelected;\r\n function onSVOCPeriodTabSelected(tab){\r\n vm.shipmentVolVsCountSettings.selectedPeriod = tab.field;\r\n getLanePair(tab.field);\r\n selectLane();\r\n vm.shipmentVolVsCountSettings.isLanePairFirstLoad = vm.shipmentVolVsCountSettings.firstLoad[vm.shipmentVolVsCountSettings.selectedPeriod];\r\n vm.shipmentVolVsCountSettings.isLanePairLoaded = vm.shipmentVolVsCountSettings.isLoaded[vm.shipmentVolVsCountSettings.selectedPeriod];\r\n var date = ''\r\n if(vm.shipmentVolVsCountSettings.period.end && (vm.shipmentVolVsCountSettings.period.start == undefined || vm.shipmentVolVsCountSettings.period.start == '')){\r\n\r\n vm.shipmentVolVsCountSettings.period.end = $filter(\"date\")(vm.shipmentVolVsCountSettings.period.end, \"yyyy-MM-dd\", \"UTC\");\r\n switch (tab.field){\r\n case 'week':\r\n vm.shipmentVolVsCountSettings.period.start = moment(vm.shipmentVolVsCountSettings.period.end).startOf('week').format('YYYY-MM-DD')\r\n break;\r\n case 'month':\r\n vm.shipmentVolVsCountSettings.period.start = moment(vm.shipmentVolVsCountSettings.period.end).startOf('month').format('YYYY-MM-DD');\r\n break;\r\n case 'quarter':\r\n vm.shipmentVolVsCountSettings.period.start = moment(vm.shipmentVolVsCountSettings.period.end).startOf('quarter').format('YYYY-MM-DD');\r\n break;\r\n case 'year':\r\n vm.shipmentVolVsCountSettings.period.start = moment(vm.shipmentVolVsCountSettings.period.end).startOf('year').format('YYYY-MM-DD');\r\n break;\r\n }\r\n } else if(vm.shipmentVolVsCountSettings.period.start && (vm.shipmentVolVsCountSettings.period.end == undefined || vm.shipmentVolVsCountSettings.period.end == '' )){\r\n\r\n vm.shipmentVolVsCountSettings.period.start = $filter(\"date\")(vm.shipmentVolVsCountSettings.period.start, \"yyyy-MM-dd\", \"UTC\");\r\n switch (tab.field){\r\n case 'week':\r\n vm.shipmentVolVsCountSettings.period.end = moment(vm.shipmentVolVsCountSettings.period.start).endOf('week').format('YYYY-MM-DD')\r\n break;\r\n case 'month':\r\n vm.shipmentVolVsCountSettings.period.end = moment(vm.shipmentVolVsCountSettings.period.start).endOf('month').format('YYYY-MM-DD');\r\n break;\r\n case 'quarter':\r\n vm.shipmentVolVsCountSettings.period.end = moment(vm.shipmentVolVsCountSettings.period.start).endOf('quarter').format('YYYY-MM-DD');\r\n break;\r\n case 'year':\r\n vm.shipmentVolVsCountSettings.period.end = moment(vm.shipmentVolVsCountSettings.period.start).endOf('year').format('YYYY-MM-DD');\r\n break;\r\n }\r\n }else{\r\n var dateConvert = '';\r\n if(vm.shipmentVolVsCountSettings.period.start == '' && vm.shipmentVolVsCountSettings.period.end == ''){\r\n var date = new Date();\r\n vm.shipmentVolVsCountSettings.period.end = $filter(\"date\")(date, \"yyyy-MM-dd\", \"UTC\");\r\n }else{\r\n if(vm.shipmentVolVsCountSettings.period.end)\r\n {\r\n vm.shipmentVolVsCountSettings.period.end = vm.shipmentVolVsCountSettings.period.end;\r\n }\r\n }\r\n\r\n switch (tab.field){\r\n case 'week':\r\n vm.shipmentVolVsCountSettings.period.start = moment(vm.shipmentVolVsCountSettings.period.end).startOf('week').format('YYYY-MM-DD')\r\n break;\r\n case 'month':\r\n vm.shipmentVolVsCountSettings.period.start = moment(vm.shipmentVolVsCountSettings.period.end).startOf('month').format('YYYY-MM-DD');\r\n break;\r\n case 'quarter':\r\n vm.shipmentVolVsCountSettings.period.start = moment(vm.shipmentVolVsCountSettings.period.end).startOf('quarter').format('YYYY-MM-DD');\r\n break;\r\n case 'year':\r\n vm.shipmentVolVsCountSettings.period.start = moment(vm.shipmentVolVsCountSettings.period.end).startOf('year').format('YYYY-MM-DD');\r\n break;\r\n }\r\n }\r\n\r\n }\r\n\r\n //-------------------------------------------------------------------\r\n // Shipping Volume over Count Settings - Metric Tab\r\n // - Controls which metrics are displayed in the line and bar charts\r\n //-------------------------------------------------------------------\r\n vm.onSVOCMetricTabSelected = onSVOCMetricTabSelected;\r\n function onSVOCMetricTabSelected(tab){\r\n switch (tab.field){\r\n case 'all':\r\n vm.shipmentVolVsCountSettings.showCountVolume.count = vm.shipmentVolVsCountSettings.showCountVolume.volume = true;\r\n break;\r\n case 'volume':\r\n vm.shipmentVolVsCountSettings.showCountVolume.volume = true;\r\n vm.shipmentVolVsCountSettings.showCountVolume.count = false;\r\n break;\r\n case 'count':\r\n vm.shipmentVolVsCountSettings.showCountVolume.count = true;\r\n vm.shipmentVolVsCountSettings.showCountVolume.volume = false;\r\n break;\r\n }\r\n }\r\n\r\n //-------------------------------------------\r\n // Shipping Volume over Count - Select Lane\r\n // - Checks whether the Total toggle is set\r\n // - Returns first lane or total lane\r\n //-------------------------------------------\r\n function selectLane(){\r\n if (vm.shipmentVolVsCountSettings.showTotal){\r\n vm.shipmentVolVsCountSettings.selectedLane = \"TOTAL\";\r\n } else {\r\n vm.shipmentVolVsCountSettings.selectedLane = vm.topLanePairs[1].label;\r\n }\r\n }\r\n //-------------------------------------------------------------------\r\n // Shipping Volume over Count Settings - Lane Type Tabs\r\n // - Controls which business type - air, sea, ground, all is used\r\n // - Grabs new lane pair object and selects the lane;\r\n //-------------------------------------------------------------------\r\n vm.onSVOCLaneTypeTabSelected = onSVOCLaneTypeTabSelected;\r\n function onSVOCLaneTypeTabSelected(tab){\r\n vm.shipmentVolVsCountSettings.selectedLaneType = tab.field;\r\n getLanePair(vm.shipmentVolVsCountSettings.selectedPeriod);\r\n selectLane();\r\n }\r\n\r\n //used to show the test loading\r\n function showLoading() {\r\n vm.showLoading = true;\r\n }\r\n\r\n function hideLoading() {\r\n vm.showLoading = false;\r\n }\r\n\r\n //------------\r\n // Active Shipments\r\n // Current Exceptions\r\n // Potential Exceptions\r\n //------------\r\n loadDonutWidget('activeShipments');\r\n loadDonutWidget('currentExceptions');\r\n loadDonutWidget('potentialExceptions');\r\n\r\n //------------\r\n // Spending over time\r\n //------------\r\n vm.spendingOverTime = spendingOverTime();\r\n function loadDefaultSpendingOverTime() {\r\n localStorage.removeItem('spentTime');\r\n var dateFrom, dateTo;\r\n\r\n dateFrom = vm.params.due_date_from ? vm.params.due_date_from :\r\n $location.search()['dateFrom'] ? $location.search()['dateFrom'] : false;\r\n dateTo = vm.params.due_date_to ? vm.params.due_date_to :\r\n $location.search()['dateTo'] ? $location.search()['dateTo'] : $filter(\"date\")(new Date(), 'yyyy-MM-dd', \"UTC\");\r\n\r\n if (!dateFrom) {\r\n dateFrom = new Date(dateTo);\r\n dateFrom = $filter(\"date\")(dateFrom.setFullYear(dateFrom.getFullYear() - 1), 'yyyy-MM-dd', \"UTC\");\r\n }\r\n loadSpendingOverTime(dateFrom, dateTo, 'week');\r\n // loadSpendingOverTime(dateFrom, dateTo, 'month');\r\n // loadSpendingOverTime(dateFrom, dateTo, 'quarter');\r\n // loadSpendingOverTime(dateFrom, dateTo, 'year');\r\n }\r\n loadDefaultSpendingOverTime();\r\n\r\n //------------\r\n // On-Time Percentage\r\n //------------\r\n vm.onTimePercentage = onTimePercentage();\r\n\r\n function loadDefaultOnTimePercentage() {\r\n\r\n var dateTo = vm.params.due_date_to ? vm.params.due_date_to :\r\n $location.search()['dateTo'] ? $location.search()['dateTo'] : $filter(\"date\")(new Date(), 'yyyy-MM-dd', \"UTC\");\r\n var dateFrom = $filter(\"date\")(new Date(), 'yyyy-MM-dd', \"UTC\");\r\n loadOnTimePercentage(dateFrom,dateTo, 'week');\r\n loadOnTimePercentage(dateFrom,dateTo, 'month');\r\n loadOnTimePercentage(dateFrom,dateTo, 'quarter');\r\n loadOnTimePercentage(dateFrom,dateTo, 'year');\r\n }\r\n loadDefaultOnTimePercentage();\r\n\r\n // -----------\r\n // Lane Pairs\r\n // -----------\r\n\r\n function loadDefaultLanePairs() {\r\n\r\n // var startDateForm = moment(dateTo).startOf('week').format();\r\n var startDateforWeek = moment(dateTo).subtract('week',8).format();\r\n var startWeekDate = $filter('date')(startDateforWeek, 'yyyy-MM-dd', \"UTC\");\r\n var startDateforYear = moment(dateTo).subtract('years',1).format();\r\n var startYearDate = $filter('date')(startDateforYear, 'yyyy-MM-dd', \"UTC\");\r\n\r\n\r\n var dateTo = vm.params.due_date_to ? vm.params.due_date_to :\r\n $location.search()['dateTo'] ? $location.search()['dateTo'] : $filter(\"date\")(new Date(), 'yyyy-MM-dd', \"UTC\");\r\n\r\n loadLanePairs(startWeekDate, dateTo, 'week', true);\r\n loadLanePairs(startYearDate, dateTo, 'month', true);\r\n loadLanePairs(startYearDate, dateTo, 'quarter', true);\r\n loadLanePairs(startYearDate, dateTo, 'year', true);\r\n }\r\n loadDefaultLanePairs();\r\n\r\n //------------\r\n // Donut Widgets\r\n //------------\r\n function loadDonutWidget(name) {\r\n var donut_data = {\r\n icons: {air:'', sea:'', ground:''},\r\n activeShipments: {air:'md-success-2', sea:'md-success-3', ground:'md-success'},\r\n potentialExceptions: {air:'md-warning-2', sea:'md-warning-3', ground:'md-warning'},\r\n currentExceptions: {air:'md-danger-2', sea:'md-danger-3', ground:'md-danger'}\r\n };\r\n var capName = name.substring(0, 1).toUpperCase() + name.substring(1);\r\n vm[name + 'Loaded'] = false;\r\n vm['is' + capName + 'FirstLoad'] = !DashboardService['hasCached' + capName]();\r\n if (vm['is' + capName + 'FirstLoad']) {\r\n vm[name] = getCounts(null, name);\r\n }\r\n else {\r\n var data = DashboardService['getCached' + capName]();\r\n vm[name] = getCounts(data, name);\r\n }\r\n vm[name + 'Control'] = {\r\n onClick: function(type) {\r\n\r\n var url = \"/track-trace?status=0\",\r\n params = {status: 0};\r\n switch (name) {\r\n case 'currentExceptions':\r\n //params.current_exception = 1;\r\n url += \"¤t_exception=1\";\r\n break;\r\n case 'potentialExceptions':\r\n // params.potential_exception = 1;\r\n url += \"&potential_exception=1\";\r\n break;\r\n }\r\n if (type) {\r\n params.business_type_group = type;\r\n }\r\n $scope.$apply(function() {\r\n window.location.href = url; //.search(params);\r\n });\r\n }\r\n };\r\n vm[name + 'SegmentClassMap'] = {air: false, sea: false, ground: false};\r\n DashboardService['load' + capName]().then(\r\n function(response) {\r\n vm.donutNums[name+'Num'] = false;\r\n vm.largeDonutNumbers = false;\r\n vm[name + 'Loaded'] = true;\r\n vm['is' + capName + 'FirstLoad'] = false;\r\n if (response.error){\r\n vm[name + 'Error'] = response.error;\r\n } else {\r\n var data = response.data;\r\n vm[name] = getCounts(data, name);\r\n if (data.air > 999 || data.sea > 999 || data.ground > 999) {\r\n vm.donutNums[name+'Num'] = true;\r\n }\r\n if (vm.donutNums['potentialExceptionsNum'] || vm.donutNums['currentExceptionsNum'] || vm.donutNums['activeShipmentsNum']) {\r\n vm.largeDonutNumbers = true;\r\n }\r\n }\r\n },\r\n function(error) {\r\n vm[name + 'Loaded'] = true;\r\n vm['is' + capName + 'FirstLoad'] = false;\r\n vm.error = error.message;\r\n }\r\n );\r\n function getCounts(_data, name){\r\n var isData = !!_data, dd = donut_data;\r\n return [\r\n {type: 'air', shipments: isData ? _data.air : 0, color: dd[name].air, icon: dd.icons.air},\r\n {type: 'sea', shipments: isData ? _data.sea : 0, color: dd[name].sea, icon: dd.icons.sea},\r\n {type: 'ground', shipments: isData ? _data.ground : 0, color: dd[name].ground, icon: dd.icons.ground}\r\n ];\r\n }\r\n }\r\n\r\n function spendingOverTime(){\r\n function def(){return {dateFrom: '', dateTo: '', data: [], isLoaded: false, hasData: false};}\r\n var data = {\r\n week: def(),\r\n month: def(),\r\n quarter: def(),\r\n year: def()\r\n };\r\n var sotime = {\r\n data: data,\r\n selected: 'week',\r\n tabs: angular.copy(vm.periods),\r\n tabSelected: tabSelected,\r\n isLoaded: isLoaded,\r\n loadData: loadData,\r\n hasData: hasData,\r\n getData: getData,\r\n getDateFrom: getDateFrom,\r\n getDateRange: getDateRange,\r\n getDateTo: getDateTo,\r\n getTheme: getTheme,\r\n theme: {week: \"\", month: \"success\", quarter: \"warning\", year: \"danger\"}\r\n };\r\n function loadData(_data, period){\r\n data[period].isLoaded = true;\r\n var d = data[period]\r\n if (!_data || _data.length === 0){\r\n\r\n d.hasData = false;\r\n return;\r\n }\r\n d.data = _data;\r\n if (!period.includes(\"year\")){\r\n\r\n d.dateFrom = d.data[0].date;\r\n\r\n }\r\n }\r\n function getDateRange(){\r\n\r\n return displayDateRange(sotime.getDateFrom(), sotime.getDateTo(), localStorage.getItem('tabType'));\r\n }\r\n function parseDate(date, period){ displayDateOnGraph(date, period); } // end parseMethod\r\n function getTheme() { return sotime.theme[localStorage.getItem('tabType')];}\r\n function getDateTo() { return data[localStorage.getItem('tabType')].dateTo;}\r\n function getDateFrom() { return data[localStorage.getItem('tabType')].dateFrom;}\r\n function getData() { if(data) { return data[localStorage.getItem('tabType')].data;}};\r\n function hasData() {\r\n if(data[localStorage.getItem('tabType')]){\r\n return data[localStorage.getItem('tabType')].hasData;\r\n }\r\n }\r\n function tabSelected(tab) { //localStorage.getItem('tabType') = tab.field;\r\n sotime.selected = localStorage.getItem('tabType'); }\r\n function isLoaded() {\r\n if(data[localStorage.getItem('tabType')]){\r\n return data[localStorage.getItem('tabType')].isLoaded;\r\n }\r\n }\r\n return sotime;\r\n }\r\n //// Fix for bug no. APPENG - 3264 ///////\r\n function displayDateOnGraph(date, period){\r\n switch (period){\r\n case 'week':\r\n return moment(date).startOf(period).format('MMM')+'\\n' + moment(date).startOf(period).format('DD') + ' - ' + moment(date).endOf(period).format('MMM')+'\\n' + moment(date).endOf(period).format('DD');\r\n case 'month':\r\n return moment(date).format('MMM');//+'\\n'+moment(date).format('YYYY');\r\n case 'quarter':\r\n return moment(date).format('[Q]Q') + '\\n' + moment(date).format('YYYY');\r\n case 'year':\r\n return moment(date).format('YYYY');\r\n }\r\n }\r\n\r\n function displayDateRange(dateFrom, dateTo, period, otp){\r\n var format;\r\n switch (period){\r\n case 'week':\r\n format = \"MMM Do, YYYY\"\r\n break;\r\n case 'month':\r\n format = otp ? \"MMMM YYYY\" : \"MMM YYYY\";\r\n break;\r\n case 'quarter':\r\n format = otp ? \"MMM Do, YYYY\" : \"[Quarter] Q, YYYY\"\r\n break;\r\n case 'year':\r\n format = otp ? \"YYYY\" : \"MMM Do, YYYY\"\r\n break;\r\n }\r\n if (otp){\r\n switch (period){\r\n case 'month':\r\n return moment(dateTo).format(format);\r\n case 'year':\r\n return moment(dateTo).format(format);\r\n default:\r\n return moment(dateFrom).startOf(period).format(format) + ' - ' + moment(dateTo).endOf(period).format(format);\r\n }\r\n } else {\r\n if (period == 'week'){\r\n return moment(dateFrom).startOf(period).format(format) + ' - ' + moment(dateTo).format(format);\r\n }\r\n else {\r\n return moment(dateFrom).format(format) + ' - ' + moment(dateTo).format(format);\r\n }\r\n }\r\n }\r\n\r\n function displayDate(date){\r\n return moment(date).format(\"MMM D, YYYY\");\r\n }\r\n //--------------------\r\n // Spending Over Time\r\n //--------------------\r\n\r\n\r\n function loadSpendingOverTime(dateFrom, dateTo, group) {\r\n // if (spendingOverTimeTimeout[group]) {\r\n // spendingOverTimeTimeout[group].promise.finally(function() {\r\n // doLoadSpendingOverTime(dateFrom, dateTo, group);\r\n // vm.spendingOverTime.data[group].isLoaded = false;\r\n // // because our loadmask has a fade, if we don't do this, we don't\r\n // // end up with a loadmask if we've actually cancelled it.\r\n // // 600 is to be longer than the .5s fade\r\n // $timeout(function() {\r\n // vm.spendingOverTime.data[group].isLoaded = false;\r\n // $scope.$apply();\r\n // }, 600);\r\n // });\r\n // spendingOverTimeTimeout[group].resolve();\r\n // vm.spendingOverTime.data[group].isLoaded = false;\r\n // }\r\n // else {\r\n // vm.spendingOverTime.data[group].isLoaded = false;\r\n // doLoadSpendingOverTime(dateFrom, dateTo, group);\r\n // }\r\n\r\n vm.spendingOverTime.data[group].isLoaded = false;\r\n doLoadSpendingOverTime(dateFrom, dateTo, group);\r\n }\r\n\r\n function parseFormattedDate(date, period){\r\n switch (period){\r\n case 'week':\r\n return moment(date, 'YYYY-WW');\r\n case 'month':\r\n return moment(date, 'YYYY-MM');\r\n case 'quarter':\r\n return moment(date.replace(/.{2}/,\"\"), 'YYYY-Q');\r\n case 'year':\r\n return moment(date, 'YYYY')\r\n }\r\n }\r\n vm.defaultTabSelected = -1;\r\n vm.sopDefaultDate = {};\r\n function doLoadSpendingOverTime(dateFrom, dateTo, group) {\r\n vm.spendingOverTime.data[group].dateTo = dateTo;\r\n vm.spendingOverTime.data[group].dateFrom = dateFrom;\r\n //d.subtract(1,group).format(vm.momentDateFormat);\r\n if(group == 'week') {\r\n //we fudge the week date from since we can only show 7 weeks but we still send date from as the last year\r\n var d = new moment(dateTo);\r\n vm.spendingOverTime.data[group].dateFrom = d.subtract(8,group).format(vm.momentDateFormat);\r\n }\r\n spendingOverTimeTimeout[group] = $q.defer();\r\n\r\n vm.spendingOverTime.data['week'].isLoaded = false;\r\n\r\n\r\n vm.spendingOverTime.data[group].isLoaded = false;\r\n $scope.selectedTabIndex = 0;\r\n\r\n DashboardService\r\n .loadSpendingOverTime(dateFrom, dateTo, group, spendingOverTimeTimeout[group])\r\n .then(function(data) {\r\n var resData = data.groups\r\n if(Object.keys(resData).length === 0){\r\n var startWeekDate = moment(dateTo).startOf('week').format();\r\n vm.sopDefaultDate.dateFrom = $filter(\"date\")(startWeekDate, 'yyyy-MM-dd', \"UTC\");\r\n vm.sopDefaultDate.dateTo = dateTo;\r\n vm.sopDefaultDate.group = data.group_by;\r\n }\r\n vm.spendingOverTime.data[group].isLoaded = true;\r\n vm.spendingOverTime.loadData(parse(group, resData), group);// parseFunctions[group](data.groups);\r\n spendingOverTimeTimeout[group] = false;\r\n\r\n // getChartLabels(vm.spendingOverTime)\r\n\r\n getstackedChartData(vm.spendingOverTime,'all')\r\n vm.defaultTabSelected = 0;\r\n }, function() {\r\n vm.spendingOverTime.data[group].isLoaded = true;\r\n });\r\n //---\r\n // These functions flatten the data and prep it for use by D3\r\n //---\r\n function parseMethod(group, year, time_unit){\r\n switch (group){\r\n case 'week':\r\n return 'W' + time_unit + \"\\n\" + year;\r\n case 'month':\r\n return (time_unit < 10 ? (\"\" + time_unit).substring(1) : time_unit) + '/' + (\"\" + year).substring(2);\r\n case 'quarter':\r\n var time_units = time_unit.split('-')\r\n return 'Q' + time_units[1] + '-' + time_units[0];\r\n case 'year':\r\n return time_unit;\r\n }\r\n } // end parseMethod\r\n\r\n function limitData(group, data){\r\n switch (group){\r\n case 'week':\r\n return (data.length > 7 ? data.slice(-7) : data);\r\n case 'month':\r\n return (data.length > 12 ? data.slice(-12) : data);\r\n case 'quarter':\r\n return (data.length > 4 ? data.slice(-4) : data);\r\n case 'year':\r\n return (data.length > 4 ? data.slice(-4) : data);\r\n }\r\n } // end limitData\r\n\r\n function spent(group, data, year, time_unit){\r\n switch (group){\r\n case 'year':\r\n return data[time_unit];\r\n default:\r\n return data[year][time_unit];\r\n }\r\n } // end spent\r\n\r\n function spentMode(group, data, year, time_unit,mode){\r\n\r\n if(group === 'year'){\r\n // return data[time_unit];\r\n switch (mode){\r\n case 'ground':\r\n return data[time_unit][0].ground;\r\n case 'air':\r\n return data[time_unit][1].air;\r\n case 'sea':\r\n return data[time_unit][2].sea;\r\n case 'urgent_air':\r\n return data[time_unit][3].urgent_air;\r\n case 'warehouse':\r\n return data[time_unit][4].warehouse;\r\n case 'custom_brokerage':\r\n return data[time_unit][5].custom_brokerage;\r\n\r\n }\r\n }else{\r\n switch (mode){\r\n case 'ground':\r\n return data[year][time_unit][0].ground;\r\n case 'air':\r\n return data[year][time_unit][1].air;\r\n case 'sea':\r\n return data[year][time_unit][2].sea;\r\n case 'urgent_air':\r\n return data[year][time_unit][3].urgent_air;\r\n case 'warehouse':\r\n return data[year][time_unit][4].warehouse;\r\n case 'custom_brokerage':\r\n return data[year][time_unit][5].custom_brokerage;\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n function parse(group, data){\r\n var results = [],\r\n data_date,\r\n years = Object.keys(data).sort(sortNum);\r\n\r\n years.map(function(year){\r\n if (group.includes(\"year\")){\r\n data_date = parseFormattedDate(year, group);\r\n var progress = periodIsOver(group, data_date) ? 100 : getDatePercentage(moment(), group);\r\n results.push({\r\n xVal: displayDateOnGraph(data_date, group),\r\n date: data_date,\r\n progress: progress,\r\n periodType : 'year',\r\n // spent: spent(group, data, year, year),\r\n ground: spentMode(group, data, year, year,'ground'),\r\n air: spentMode(group, data, year, year,'air'),\r\n sea: spentMode(group, data, year, year,'sea'),\r\n urgent_air: spentMode(group, data, year, year,'urgent_air'),\r\n warehouse: spentMode(group, data, year, year,'warehouse'),\r\n custom_brokerage: spentMode(group, data, year, year,'custom_brokerage')\r\n });\r\n } else {\r\n var time_units = Object.keys(data[year]).sort(sortNum);\r\n time_units.map(function(time_unit){\r\n data_date = parseFormattedDate(year + '-' + time_unit, group);\r\n var progress = periodIsOver(group, data_date) ? 100 : getDatePercentage(moment(), group);\r\n\r\n results.push({\r\n xVal: displayDateOnGraph(data_date, group),\r\n date: data_date,\r\n progress: progress,\r\n periodType : group,\r\n // spent: spent(group, data, year, time_unit),\r\n ground: spentMode(group, data, year, time_unit,'ground'),\r\n air: spentMode(group, data, year, time_unit,'air'),\r\n sea: spentMode(group, data, year, time_unit,'sea'),\r\n urgent_air: spentMode(group, data, year, time_unit,'urgent_air'),\r\n warehouse: spentMode(group, data, year, time_unit,'warehouse'),\r\n custom_brokerage: spentMode(group, data, year, time_unit,'custom_brokerage')\r\n });\r\n });\r\n }\r\n });\r\n\r\n\r\n // return last 7 weeks\r\n var limitedData = limitData(group, results);\r\n // Check for actual values\r\n angular.forEach(limitedData, function(v) {\r\n if (v.air > 0 || v.sea > 0 || v.ground > 0 || v.urgent_air > 0 || v.warehouse > 0 || v.custom_brokerage > 0) {\r\n vm.spendingOverTime.data[group].hasData = true;\r\n }\r\n });\r\n\r\n return limitedData;\r\n\r\n } // end parse\r\n\r\n function periodIsOver(group, date){\r\n\r\n return moment(date).endOf(group) < moment();\r\n\r\n }\r\n function sortNum(a, b) {\r\n a = parseInt(a);\r\n b = parseInt(b);\r\n return a < b ? -1 : (a > b ? 1 : 0);\r\n }\r\n }\r\n\r\n //--------------------\r\n // On-Time Percentage\r\n //--------------------\r\n function onTimePercentage(){\r\n function def(){return {currentPercent: 0, previousPercent: 0, change: 0, percentage: 0, previousPercentage: 0, direction: \"\"}}\r\n var data = {\r\n week: {ontime: def(), adjusted_ontime: def(), isLoaded: false},\r\n month: {ontime: def(), adjusted_ontime: def(), isLoaded: false},\r\n quarter: {ontime: def(), adjusted_ontime: def(), isLoaded: false},\r\n year: {ontime: def(), adjusted_ontime: def(), isLoaded: false}\r\n };\r\n /* Functions and variables */\r\n var otp = {\r\n data: data,\r\n getChange: getChange,\r\n getDateFrom: getDateFrom,\r\n getDateRange: getDateRange,\r\n getDateTo: getDateTo,\r\n getDatePeriodTo: getDatePeriodTo,\r\n getDirection: getDirection,\r\n getPercentage: getPercentage,\r\n isLoaded: isLoaded,\r\n isNoPreviousData: isNoPreviousData,\r\n isNoCurrentData: isNoCurrentData,\r\n getDatePercentage: _getDatePercentage,\r\n loadData: loadData,\r\n selected: 'week',\r\n switch: false,\r\n tabs: angular.copy(vm.periods),\r\n tabSelected: tabSelected,\r\n version: 'ontime',\r\n fromLast: fromLast,\r\n noPreviousData: noPreviousData,\r\n noCurrentData: noCurrentData,\r\n period: {\r\n week:{},\r\n month:{},\r\n quarter:{},\r\n year:{}\r\n }\r\n };\r\n /* Load the data into the object */\r\n function loadData (period, _data){\r\n data[period].isLoaded = true;\r\n if (!_data){\r\n data[period].ontime.currentTotal = 0;\r\n data[period].adjusted_ontime.currentTotal = 0;\r\n return;\r\n }\r\n for (var field in {ontime:{}, adjusted_ontime:{}}){\r\n var d = data[period][field];\r\n d.currentPercent = Math.round( (_data.current[field] / Math.max(1, _data.current.total)) * 100 );\r\n d.previousPercent = Math.round( (_data.previous[field] / Math.max(1, _data.previous.total)) * 100 );\r\n d.change = Math.abs(Math.round( ((d.previousPercent - d.currentPercent) / Math.max(1, d.previousPercent)) * 100 ));\r\n d.percentage = parseInt(d.currentPercent);\r\n d.previousPercentage = parseInt(d.previousPercent);\r\n d.direction = d.currentPercent > d.previousPercent ? 'expand_less' : (d.currentPercent < d.previousPercent ? 'expand_more' : \"remove\");\r\n d.currentTotal = _data.current.total;\r\n d.previousTotal = _data.previous.total;\r\n d.currentOnTime = _data.current.ontime;\r\n d.previousOnTime = _data.previous.ontime;\r\n }\r\n }\r\n function _getDatePercentage() { return getDatePercentage(otp.getDateTo(), otp.selected); }\r\n function getDateFrom() { return getDatePeriod(otp.period[otp.selected].dateFrom, otp.selected, false); }\r\n function getDateRange() { return displayDateRange(otp.getDateFrom(), otp.getDateTo(), otp.selected, true); }\r\n function getDateTo() { return otp.period[otp.selected].dateTo; }\r\n function getDatePeriodTo() { return getDatePeriod(otp.period[otp.selected].dateTo, otp.selected, true); }\r\n function getPercentage() { return data[otp.selected][otp.version].percentage; }\r\n function getChange() { return data[otp.selected][otp.version].change; }\r\n function isNoPreviousData() { return data[otp.selected][otp.version].previousTotal === 0; }\r\n function isNoCurrentData() { return data[otp.selected][otp.version].currentTotal === 0; }\r\n function getDirection() { return data[otp.selected][otp.version].direction; }\r\n function tabSelected(tab) {\r\n otp.selected = tab.field;\r\n // debugger;\r\n // var element = angular.element(document.querySelector('.bar'))[0]\r\n // var animator = $animateCss(element, {\r\n // from: {width: 0},\r\n // to: {width: otp.getDatePercentage()}\r\n // });\r\n // animator.start();\r\n // .map(function(meter){\r\n // debugger;\r\n // meter.data(\"origWidth\", meter.width())\r\n // .width(0)\r\n // .animate({width: meter.data(\"origWidth\")}, 1200)\r\n // });\r\n }\r\n function isLoaded() { return data[otp.selected].isLoaded; }\r\n function fromLast() { return 'WIDGETS.FROM_LAST_' + otp.selected.toUpperCase(); }\r\n function noPreviousData() { return 'WIDGETS.NO_DATA_FOR_LAST_' + otp.selected.toUpperCase(); }\r\n function noCurrentData() { return \"WIDGETS.NO_DATA_FOR_CURRENT_\" + otp.selected.toUpperCase(); }\r\n return otp;\r\n }\r\n\r\n function getDatePercentage(date, period){\r\n var percent_complete = 0;\r\n\r\n switch (period){\r\n case 'week':\r\n\r\n percent_complete = moment(date).weekday() / 7.0;\r\n break;\r\n case 'month':\r\n\r\n percent_complete = 1.0 * moment(date).date() / moment(date).daysInMonth();\r\n break;\r\n case 'quarter':\r\n var start = moment(date).dayOfYear() - moment(date).startOf('quarter').dayOfYear(),\r\n ending = moment(date).endOf('quarter').dayOfYear() - moment(date).startOf('quarter').dayOfYear()\r\n percent_complete = 1.0 * start / ending;\r\n break;\r\n case 'year':\r\n percent_complete = moment(date).dayOfYear() / 365.0\r\n break;\r\n }\r\n return Math.round(percent_complete * 100)\r\n }\r\n\r\n function getDatePeriod(date, period, isEnd){\r\n return isEnd ? moment(date).endOf(period) : moment(date).startOf(period)\r\n // switch (period){\r\n // case 'week':\r\n // isEnd ? moment(date).endOf(period) : moment(date).startOf(period)\r\n // break;\r\n // case 'month':\r\n // percent_complete = 1.0 * moment(date).date() / moment(date).daysInMonth();\r\n // break;\r\n // case 'quarter':\r\n // var start = moment(date).dayOfYear() - moment(date).startOf('quarter').dayOfYear(),\r\n // ending = moment(date).endOf('quarter').dayOfYear() - moment(date).startOf('quarter').dayOfYear()\r\n // percent_complete = 1.0 * start / ending;\r\n // break;\r\n // case 'year':\r\n // }\r\n }\r\n\r\n $scope.$watch(\"vm.onTimePercentage.switch\", function(){\r\n /*Updated by Abheesh - Swap type*/\r\n vm.onTimePercentage.version = vm.onTimePercentage.switch ? \"ontime\" : \"adjusted_ontime\";}, true);\r\n\r\n function onTimePercentageSwap(type) {\r\n vm.onTimePercentage.version = type;\r\n }\r\n\r\n\r\n function loadOnTimePercentage(dateFrom, dateTo, group) {\r\n vm.onTimePercentage.period[group].dateTo = dateTo;\r\n vm.onTimePercentage.period[group].dateFrom = dateFrom;\r\n\r\n if (onTimePercentageTimeout[group]) {\r\n onTimePercentageTimeout[group].promise.finally(function() {\r\n doLoadOnTimePercentage(dateFrom,dateTo, group);\r\n vm.onTimePercentage.data[group].isLoaded = false;\r\n // because our loadmask has a fade, if we don't do this, we don't\r\n // end up with a loadmask if we've actually cancelled it.\r\n // 600 is to be longer than the .5s fade\r\n $timeout(function() {\r\n vm.onTimePercentage.data[group].isLoaded = false;\r\n $scope.$apply();\r\n }, 600);\r\n });\r\n onTimePercentageTimeout[group].resolve();\r\n }\r\n else {\r\n vm.onTimePercentage.data[group].isLoaded = false;\r\n doLoadOnTimePercentage(dateFrom,dateTo, group);\r\n }\r\n }\r\n\r\n function doLoadOnTimePercentage(dateFrom,dateTo, group) {\r\n onTimePercentageTimeout[group] = $q.defer();\r\n DashboardService.loadOnTimePercentage(dateFrom,dateTo, group, onTimePercentageTimeout[group]).then(function(data) {\r\n var d = new moment(data.current.date_from);\r\n // vm.onTimePercentage.period[group].dateFrom = d.format(vm.momentDateFormat);\r\n vm.onTimePercentage.period[group].dateFrom = dateFrom;\r\n vm.onTimePercentage.loadData(group, data);\r\n onTimePercentageTimeout[group] = false;\r\n }, function() {\r\n vm.onTimePercentage.loadData(group, null);\r\n });\r\n }\r\n\r\n $scope.$on('$destroy', cancelRequests);\r\n $rootScope.$on('user:logout', cancelRequests);\r\n function cancelRequests() {\r\n angular.forEach(Object.keys(spendingOverTimeTimeout), function(k) {\r\n if (spendingOverTimeTimeout[k]) spendingOverTimeTimeout[k].resolve();\r\n });\r\n angular.forEach(Object.keys(onTimePercentageTimeout), function(k) {\r\n if (onTimePercentageTimeout[k]) onTimePercentageTimeout[k].resolve();\r\n });\r\n angular.forEach(Object.keys(lanePairsTimeout), function(k) {\r\n if (lanePairsTimeout[k]) lanePairsTimeout[k].resolve();\r\n });\r\n }\r\n\r\n // -----------\r\n // Lane Pairs\r\n // ----------\r\n function loadLanePairs(dateFrom, dateTo, group, forceFirstLoad){\r\n forceFirstLoad = typeof forceFirstLoad === 'undefined' ? false : forceFirstLoad;\r\n vm.lanePairsPeriod[group].DateTo = dateTo;\r\n var d = new moment(dateTo);\r\n var dateSubPeriod = group, dateSubAmount = 1;\r\n if(dateSubPeriod == \"week\") {\r\n dateSubAmount = 7; //week graph goes back 7 weeks\r\n\r\n } else {\r\n dateSubPeriod = \"year\";\r\n }\r\n if(dateFrom){\r\n\r\n vm.lanePairsPeriod[group].DateFrom = dateFrom;\r\n }else{\r\n dateFrom = dateFrom || d.subtract(dateSubAmount,dateSubPeriod);\r\n dateFrom = dateFrom.format(vm.momentDateFormat);\r\n\r\n vm.lanePairsPeriod[group].DateFrom = dateFrom;\r\n }\r\n\r\n if (lanePairsTimeout[group]) {\r\n\r\n lanePairsTimeout[group].promise.finally(function() {\r\n doLoadLanePairs(dateFrom, dateTo, group);\r\n // because our loadmask has a fade, if we don't do this, we don't\r\n // end up with a loadmask if we've actually cancelled it.\r\n // 600 is to be longer than the .5s fade\r\n\r\n // Not sure I get it...seems like this is causing\r\n // a bug in which the loadmask never disappears on occasion\r\n // removing for now...\r\n // $timeout(function() {\r\n\r\n // vm.shipmentVolVsCountSettings.isLoaded[group] = false;\r\n // $scope.$apply();\r\n // }, 600);\r\n });\r\n lanePairsTimeout[group].resolve();\r\n vm.shipmentVolVsCountSettings.isLoaded[group] = false;\r\n }\r\n else {\r\n vm.shipmentVolVsCountSettings.isLoaded[group] = false;\r\n doLoadLanePairs(dateFrom, dateTo, group);\r\n }\r\n vm.shipmentVolVsCountSettings.firstLoad[group] = forceFirstLoad;\r\n\r\n // vm.shipmentVolVsCountSettings.isLoaded[group] = DashboardService.hasCachedLanePairs(group);\r\n // vm.shipmentVolVsCountSettings.firstLoad[group] = !DashboardService.hasCachedLanePairs(group);\r\n }\r\n\r\n function doLoadLanePairs(dateFrom, dateTo, group) {\r\n lanePairsTimeout[group] = $q.defer();\r\n DashboardService.loadLanePairs(dateFrom, dateTo, group, lanePairsTimeout[group]).then(function(data){\r\n vm.shipmentVolVsCountSettings.isLoaded[group] = true;\r\n vm.shipmentVolVsCountSettings.firstLoad[group] = false;\r\n if (vm.shipmentVolVsCountSettings.selectedPeriod == group){\r\n getLanePair(group);\r\n selectLane();\r\n vm.shipmentVolVsCountSettings.isLanePairFirstLoad = vm.shipmentVolVsCountSettings.firstLoad[group];\r\n }\r\n });\r\n }\r\n\r\n //----------------\r\n // Custom Date Ranges\r\n //----------------\r\n var activeWidgetRange = false;\r\n function setCustomRange(widget) {\r\n activeWidgetRange = widget;\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n parent: angular.element(document.body),\r\n templateUrl: '/app/components/widgets/custom-end-date.html',\r\n clickOutsideToClose:false,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n }).then(function() {\r\n activeWidgetRange = false;\r\n });\r\n $scope.activeModal = activeWidgetRange;\r\n var dateShow = $scope.vm.widgetHasCustomRange;\r\n if(activeWidgetRange == 'lane-pairs'){\r\n $scope.startDate = dateShow.laneDate.startDate;\r\n $scope.endDate = dateShow.laneDate.endDate;\r\n }else if(activeWidgetRange == 'spend-over-time'){\r\n $scope.startDate = dateShow.sopDate.startDate;\r\n $scope.endDate = dateShow.sopDate.endDate;\r\n }\r\n else if(activeWidgetRange == \"on-time-percentage\"){\r\n $scope.startDate = dateShow.otpDate.startDate;\r\n $scope.endDate = dateShow.otpDate.endDate;\r\n }else{\r\n $scope.startDate = '';\r\n $scope.endDate = '';\r\n }\r\n }\r\n vm.disableSet = false;\r\n function setEndDate(startDate,enddate) {\r\n\r\n if((startDate === '' || startDate === null) && (enddate === '' || enddate === null)){\r\n vm.disableSet = true;\r\n }else if((startDate !== '' || startDate !== null) || (enddate !== '' || enddate !== null)){\r\n\r\n\r\n\r\n if (activeWidgetRange == 'lane-pairs') {\r\n var datefromWeek = '';\r\n var datefromYear = '';\r\n var dateToWeek = '';\r\n var dateToYear = '';\r\n var CurrDate = new Date();\r\n if(enddate && (startDate == '' || startDate == undefined)){\r\n var eightWeekBefore = moment(enddate).subtract('week',8).format();\r\n var yearBefore = moment(enddate).subtract('years',1).format();\r\n datefromWeek = $filter(\"date\")(eightWeekBefore, 'yyyy-MM-dd', \"UTC\");\r\n datefromYear = $filter(\"date\")(yearBefore, 'yyyy-MM-dd', \"UTC\");\r\n dateToWeek = $filter(\"date\")(enddate, 'yyyy-MM-dd', \"UTC\");\r\n dateToYear = $filter(\"date\")(enddate, 'yyyy-MM-dd', \"UTC\");\r\n }else if (startDate && (enddate == '' || enddate == undefined)){\r\n var temp = $filter(\"date\")(CurrDate, 'yyyy-MM-dd', \"UTC\");\r\n var eightWeekBeforeCurrDate = moment(CurrDate).subtract('week',8).format();\r\n var yearBefore = moment(temp).subtract('years',1).format();\r\n var totalMonths = monthDiff(startDate,CurrDate)\r\n\r\n if(totalMonths > 12){\r\n datefromYear = $filter(\"date\")(yearBefore, 'yyyy-MM-dd', \"UTC\");\r\n dateToYear = $filter(\"date\")(CurrDate, 'yyyy-MM-dd', \"UTC\");\r\n }else{\r\n datefromYear = $filter(\"date\")(startDate, 'yyyy-MM-dd', \"UTC\");\r\n dateToYear = $filter(\"date\")(CurrDate, 'yyyy-MM-dd', \"UTC\");\r\n }\r\n datefromWeek = $filter(\"date\")(eightWeekBeforeCurrDate, 'yyyy-MM-dd', \"UTC\"); ;\r\n dateToWeek = $filter(\"date\")(CurrDate, 'yyyy-MM-dd', \"UTC\");\r\n\r\n }\r\n else if(startDate && enddate){\r\n var eightWeekBefore = moment(enddate).subtract('week',8).format();\r\n eightWeekBefore = new Date(eightWeekBefore);\r\n var yearBefore = moment(enddate).subtract('years',1).format();\r\n yearBefore = new Date(yearBefore);\r\n var noOfdays = daysDifference(startDate,enddate);\r\n var totalMonths = monthDiff(startDate,enddate)\r\n var FormatedEndDate = $filter(\"date\")(enddate, 'yyyy-MM-dd', \"UTC\");\r\n var FormatedStartDate = $filter(\"date\")(startDate, 'yyyy-MM-dd', \"UTC\");\r\n\r\n if(noOfdays > 56 ){\r\n datefromWeek = $filter(\"date\")(eightWeekBefore, 'yyyy-MM-dd', \"UTC\");\r\n dateToWeek = FormatedEndDate;\r\n }else{\r\n datefromWeek = FormatedStartDate;\r\n dateToWeek = FormatedEndDate;\r\n }\r\n if(totalMonths > 12){\r\n datefromYear = $filter(\"date\")(yearBefore, 'yyyy-MM-dd', \"UTC\");\r\n dateToYear = FormatedEndDate;\r\n }else{\r\n datefromYear = FormatedStartDate;\r\n dateToYear = FormatedEndDate;\r\n }\r\n }\r\n vm.widgetHasCustomRange.lanePairs = true;\r\n vm.shipmentVolVsCountSettings.isLanePairLoaded = false;\r\n vm.shipmentVolVsCountSettings.isLanePairData = false;\r\n vm.shipmentVolVsCountSettings.isLanePairFirstLoad = true;\r\n vm.shipmentVolVsCountSettings.period.start = moment(dateToWeek).startOf('week').format();\r\n vm.shipmentVolVsCountSettings.period.end = dateToWeek;\r\n vm.widgetHasCustomRange.laneDate.startDate = startDate;\r\n vm.widgetHasCustomRange.laneDate.endDate = enddate;\r\n\r\n loadLanePairs(datefromWeek, dateToWeek, 'week', true);\r\n loadLanePairs(datefromYear, dateToYear, 'month', true);\r\n loadLanePairs(datefromYear, dateToYear, 'quarter', true);\r\n loadLanePairs(datefromYear, dateToYear, 'year', true);\r\n }\r\n else if (activeWidgetRange == 'on-time-percentage') {\r\n var dateFrom = '';\r\n if(startDate){\r\n if(startDate && (enddate == '' || enddate == undefined)){\r\n var crDate = new Date();\r\n var startDateForm = moment(crDate).startOf('week').format();\r\n dateFrom = $filter(\"date\")(startDateForm, 'yyyy-MM-dd', \"UTC\");\r\n }else{\r\n dateFrom = $filter(\"date\")(startDate, 'yyyy-MM-dd', \"UTC\");\r\n }\r\n }else{\r\n dateFrom = vm.params.due_date_from ? vm.params.due_date_from :\r\n $location.search()['dateFrom'] ? $location.search()['dateFrom'] : '';\r\n }\r\n var dateTo = '';\r\n if(enddate){\r\n dateTo = $filter(\"date\")(enddate, 'yyyy-MM-dd', \"UTC\");\r\n var startDateForm = moment(dateTo).startOf('week').format();\r\n dateFrom = $filter(\"date\")(startDateForm, 'yyyy-MM-dd', \"UTC\");\r\n }else{\r\n var currDate = new Date();\r\n dateTo = $filter(\"date\")(currDate, 'yyyy-MM-dd', \"UTC\");\r\n }\r\n\r\n\r\n vm.widgetHasCustomRange.onTimePercentage = true;\r\n vm.widgetHasCustomRange.otpDate.startDate = startDate;\r\n vm.widgetHasCustomRange.otpDate.endDate = enddate;\r\n loadOnTimePercentage(dateFrom,dateTo, 'week');\r\n loadOnTimePercentage(dateFrom,dateTo, 'month');\r\n loadOnTimePercentage(dateFrom,dateTo, 'quarter');\r\n loadOnTimePercentage(dateFrom,dateTo, 'year');\r\n }\r\n else if (activeWidgetRange == 'spend-over-time') {\r\n var dateFrom = '';\r\n if(startDate){\r\n if(startDate && (enddate == '' || enddate == undefined)){\r\n var crDate = new Date();\r\n var startDateForm = moment(crDate).startOf('week').format();\r\n dateFrom = $filter(\"date\")(startDateForm, 'yyyy-MM-dd', \"UTC\");\r\n }else{\r\n dateFrom = $filter(\"date\")(startDate, 'yyyy-MM-dd', \"UTC\");\r\n }\r\n }else{\r\n dateFrom = vm.params.due_date_from ? vm.params.due_date_from :\r\n $location.search()['dateFrom'] ? $location.search()['dateFrom'] : '';\r\n }\r\n var dateTo = '';\r\n if(enddate){\r\n dateTo = $filter(\"date\")(enddate, 'yyyy-MM-dd', \"UTC\");\r\n var startDateForm = moment(dateTo).startOf('week').format();\r\n dateFrom = $filter(\"date\")(startDateForm, 'yyyy-MM-dd', \"UTC\");\r\n }else{\r\n var currDate = new Date();\r\n dateTo = $filter(\"date\")(currDate, 'yyyy-MM-dd', \"UTC\");\r\n }\r\n vm.widgetHasCustomRange.spendOverTime = true;\r\n var sopdateFrom = new Date(enddate);\r\n var dateForLoad = {};\r\n var crDate = new Date();\r\n if(startDate && (enddate == \"\" || enddate == undefined)){\r\n dateForLoad.dateFrom = $filter(\"date\")(startDate, 'yyyy-MM-dd', \"UTC\");\r\n dateForLoad.dateTo = $filter(\"date\")(crDate, 'yyyy-MM-dd', \"UTC\");\r\n }else if(enddate && (startDate == \"\" || startDate == undefined)){\r\n dateForLoad.dateFrom = $filter(\"date\")(sopdateFrom.setFullYear(sopdateFrom.getFullYear() - 1), 'yyyy-MM-dd', \"UTC\");\r\n dateForLoad.dateTo = $filter(\"date\")(enddate, 'yyyy-MM-dd', \"UTC\");\r\n }else{\r\n dateForLoad.dateFrom = $filter(\"date\")(startDate, 'yyyy-MM-dd', \"UTC\");;\r\n dateForLoad.dateTo = $filter(\"date\")(enddate, 'yyyy-MM-dd', \"UTC\");;\r\n }\r\n\r\n vm.widgetHasCustomRange.sopDate.startDate = startDate;\r\n vm.widgetHasCustomRange.sopDate.endDate = enddate;\r\n localStorage.setItem('spentTime',JSON.stringify(dateForLoad));\r\n\r\n var tabValue = localStorage.getItem('tabType');\r\n\r\n if(tabValue == 'week'){ loadSpendingOverTime(dateForLoad.dateFrom, dateForLoad.dateTo, 'week'); }\r\n if(tabValue == 'month'){ loadSpendingOverTime(dateForLoad.dateFrom, dateForLoad.dateTo, 'month'); }\r\n if(tabValue == 'quarter'){ loadSpendingOverTime(dateForLoad.dateFrom, dateForLoad.dateTo, 'quarter');}\r\n if(tabValue == 'year'){ loadSpendingOverTime(dateForLoad.dateFrom, dateForLoad.dateTo, 'year'); }\r\n\r\n }\r\n closeModal();\r\n }\r\n\r\n }\r\n\r\n function resetCustomRange(widget) {\r\n var currDate = new Date();\r\n var dateReset = $filter(\"date\")(currDate, 'yyyy-MM-dd', \"UTC\");\r\n var startDateForm = moment(dateReset).startOf('week').format();\r\n var startDate = $filter('date')(startDateForm, \"MM/dd/yy\",\"UTC\");\r\n\r\n vm.shipmentVolVsCountSettings.period.start = startDate;\r\n vm.shipmentVolVsCountSettings.period.end = dateReset;\r\n if (widget == 'lane-pairs') {\r\n vm.widgetHasCustomRange.lanePairs = false;\r\n vm.shipmentVolVsCountSettings.isLanePairLoaded = false;\r\n vm.shipmentVolVsCountSettings.isLanePairData = false;\r\n vm.shipmentVolVsCountSettings.isLanePairFirstLoad = true;\r\n vm.widgetHasCustomRange.laneDate.startDate = '';\r\n vm.widgetHasCustomRange.laneDate.endDate = '';\r\n loadDefaultLanePairs();\r\n }\r\n else if (widget == 'on-time-percentage') {\r\n vm.widgetHasCustomRange.onTimePercentage = false;\r\n loadDefaultOnTimePercentage();\r\n vm.widgetHasCustomRange.otpDate.startDate = '';\r\n vm.widgetHasCustomRange.otpDate.endDate = '';\r\n }\r\n else if (widget == 'spend-over-time') {\r\n var toDate = $filter(\"date\")(new Date(), 'yyyy-MM-dd', \"UTC\");\r\n var dateFrom = new Date(toDate);\r\n dateFrom = $filter(\"date\")(dateFrom.setFullYear(dateFrom.getFullYear() - 1), 'yyyy-MM-dd', \"UTC\");\r\n var dateForLoad = {};\r\n dateForLoad.dateFrom = dateFrom;\r\n dateForLoad.dateTo = toDate;\r\n vm.widgetHasCustomRange.spendOverTime = false;\r\n localStorage.setItem('spentTime',JSON.stringify(dateForLoad));\r\n //loadSpendingOverTime(dateForLoad.dateFrom, dateForLoad.dateTo, 'week');\r\n // loadDefaultSpendingOverTime();\r\n vm.widgetHasCustomRange.sopDate.startDate = '';\r\n vm.widgetHasCustomRange.sopDate.endDate = '';\r\n var tabValue = localStorage.getItem('tabType');\r\n\r\n if(tabValue == 'week'){ doLoadSpendingOverTime(dateFrom, toDate, 'week'); }\r\n if(tabValue == 'month'){ doLoadSpendingOverTime(dateFrom, toDate, 'month'); }\r\n if(tabValue == 'quarter'){ doLoadSpendingOverTime(dateFrom, toDate, 'quarter'); }\r\n if(tabValue == 'year'){ doLoadSpendingOverTime(dateFrom, toDate, 'year'); }\r\n\r\n }\r\n }\r\n\r\n function closeModal() {\r\n $mdDialog.hide();\r\n vm.disableSet = false;\r\n }\r\n\r\n function getStartDate(startDate ,endofDate){\r\n var returnDate = '';\r\n if(startDate || startDate != ''){\r\n returnDate = startDate;\r\n }else{\r\n var endofDateForm = moment(endofDate).startOf('week').format();\r\n returnDate = $filter('date')(endofDateForm, \"MM/dd/yy\",\"UTC\");\r\n }\r\n return returnDate;\r\n }\r\n\r\n function monthDiff(dateFrom, dateTo) {\r\n return dateTo.getMonth() - dateFrom.getMonth() +\r\n (12 * (dateTo.getFullYear() - dateFrom.getFullYear()))\r\n }\r\n\r\n function daysDifference(startDate,endDate){\r\n var timeDiff = Math.abs(endDate.getTime() - startDate.getTime());\r\n var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));\r\n return diffDays;\r\n }\r\n vm.setValid = false;\r\n\r\n\r\n function checkValidDate(event,startDate,endDate){\r\n vm.disableSet = false;\r\n var currentDate = new Date();\r\n if(startDate && (endDate == \"\" || endDate == undefined)){\r\n if(startDate <= currentDate){\r\n vm.setValid = false;\r\n\r\n }else{\r\n vm.setValid = true;\r\n\r\n }\r\n\r\n\r\n }else if (endDate && (startDate == \"\" || startDate == undefined)){\r\n if(endDate <= currentDate){\r\n vm.setValid = false;\r\n\r\n }else{\r\n vm.setValid = true;\r\n\r\n }\r\n }\r\n else if(startDate && endDate){\r\n if(startDate <= endDate && endDate <= currentDate && startDate <= currentDate){\r\n vm.setValid = false;\r\n\r\n }else{\r\n vm.setValid = true;\r\n\r\n\r\n }\r\n }\r\n }\r\n\r\n function loadTrackandTracePage(otpSelection) {\r\n var query = {};\r\n query.otp_type = (otpSelection.version === \"adjusted_ontime\") ? 'adjusted' : 'raw';\r\n query.otp_period = otpSelection.selected;\r\n var otp_date_from = displayDate(otpSelection.getDateFrom());\r\n query.otp_date_from = moment.utc(otp_date_from).format('YYYY-MM-DD');\r\n var otp_date_to = displayDate(otpSelection.getDatePeriodTo());\r\n query.otp_date_to = moment.utc(otp_date_to).format('YYYY-MM-DD');\r\n query.advSearch = 'true';\r\n query = $httpParamSerializer(query);\r\n window.open(\"/track-trace?\" + query);\r\n }\r\n\r\n// canvas columnchart\r\n\r\n$scope.labelColors = [];\r\n$scope.seriesText = [];\r\n $scope.stackedData = [];\r\n $scope.percentage = 0;\r\n $scope.Allseries = ['Air','Sea','Ground','Urgent Air','Warehouse','Custom Brokerage'];\r\n$scope.options = {\r\n responsive: true,\r\n maintainAspectRatio: false,\r\n scales: {\r\n xAxes: [{\r\n stacked: true,\r\n ticks: {\r\n fontColor: \"#fff\"\r\n }\r\n }],\r\n yAxes: [{\r\n stacked: true,\r\n ticks: {\r\n fontColor: \"#fff\",\r\n callback: function(value, index, values) {\r\n\r\n return parseInt(value).toLocaleString(\"en-US\",{style:\"currency\", currency:\"USD\",minimumFractionDigits:0,maximumFractionDigits:0,fontColor: \"#fff\"});\r\n }\r\n\r\n },\r\n scaleLabel: {\r\n display: true,\r\n labelString: 'USD',\r\n fontColor:'#fff'\r\n }\r\n }\r\n]\r\n },\r\n legend: { display: true,\r\n horizontalAlign: \"right\",\r\n labels: {\r\n fontColor: '#ffffff'\r\n\r\n }\r\n\r\n },\r\n tooltips: {\r\n xPadding: 25,\r\n callbacks: {\r\n label: function(tooltipItem, data) {\r\n\r\n var label = data.datasets[tooltipItem.datasetIndex].label;\r\n var labelvalue = data.datasets[tooltipItem.datasetIndex].data[tooltipItem.index];\r\n var percentage = data.datasets[tooltipItem.datasetIndex].progress[tooltipItem.index];\r\n $scope.percentage = percentage\r\n if (labelvalue) {\r\n labelvalue ='$' + labelvalue;\r\n }else if(labelvalue === 0){\r\n labelvalue ='$' + labelvalue;\r\n }\r\n\r\n return label+' : '+labelvalue ;\r\n },\r\n footer: function(tooltipItem, data) {\r\n\r\n var total = 0;\r\n\r\n for (var i = 0; i < tooltipItem.length; i++) {\r\n total += parseInt(tooltipItem[i].yLabel, 10);\r\n }\r\n if(total && $scope.percentage != undefined){\r\n if(data.datasets.length > 1 && $scope.percentage < 100){\r\n return 'Total : $' + total + ' at ' + $scope.percentage +'% completed';\r\n }else if(data.datasets.length == 1 && $scope.percentage < 100){\r\n return ' At ' + $scope.percentage +'% completed';\r\n }\r\n else if(data.datasets.length > 1 && $scope.percentage == 100){\r\n return 'Total : $' + total ;\r\n }\r\n\r\n }else{\r\n return 'Total : $' + total ;\r\n }\r\n }\r\n }\r\n}\r\n};\r\n$scope.chart = null;\r\n$scope.$on('chart-create', function(event, instance){\r\n // used to obtain chart instance\r\n $scope.chart = instance.chart;\r\n});\r\n\r\n\r\n\r\nfunction onspentModeSelected(mode){\r\n var data = vm.spendingOverTime\r\n getstackedChartData(data,mode.field);\r\n\r\n}\r\n\r\nfunction deselectSpendMode(mode){\r\n}\r\n\r\n\r\n\r\n\r\nfunction getstackedChartData(data,mode){\r\n $scope.stackedData = [];\r\n\r\n var totalData = data.getData();\r\n\r\n var sea = []; var air = []; var ground = []; var urgent_air = []; var warehouse = []; var custom_brokerage = []; var formatedData = []; var labels = [];var progress = [];\r\n angular.forEach(totalData,function(val,key){\r\n labels.push(val.xVal);\r\n ground.push(val.ground);\r\n sea.push(val.sea);\r\n air.push(val.air);\r\n urgent_air.push(val.urgent_air);\r\n warehouse.push(val.warehouse);\r\n custom_brokerage.push(val.custom_brokerage);\r\n progress.push(val.progress);\r\n })\r\n $scope.labelColors = labels;\r\n switch (mode){\r\n\r\n case 'sea' : {\r\n formatedData = []; var air = []; var ground = []; var urgent_air = []; $scope.series = []; var warehouse = []; var custom_brokerage = [];\r\n $scope.type = 'Bar';\r\n $scope.series.push('Sea');\r\n $scope.chartColors = [];\r\n $scope.chartColors = [\r\n {\r\n label : 'Sea',\r\n backgroundColor: '#45afe3',\r\n borderColor: '#45afe3',\r\n hoverBackgroundColor: '#45afe3',\r\n hoverBorderColor: '#45afe3',\r\n progress : progress\r\n\r\n }]\r\n formatedData.push(sea);\r\n break;\r\n }\r\n case 'air' : {\r\n var ground = []; var urgent_air = []; var sea = []; $scope.series = []; var warehouse = []; var custom_brokerage = [];\r\n $scope.type = 'Bar';\r\n $scope.series.push('Air');\r\n formatedData = [];\r\n $scope.chartColors = [];\r\n $scope.chartColors = [\r\n {\r\n label : 'Air',\r\n backgroundColor: '#82dba7',\r\n borderColor: '#82dba7',\r\n hoverBackgroundColor: '#82dba7',\r\n hoverBorderColor: '#82dba7',\r\n progress : progress\r\n\r\n }]\r\n formatedData.push(air);\r\n\r\n break;\r\n }\r\n case 'ground' : {\r\n var air = []; var sea = []; $scope.series = []; var urgent_air = []; var warehouse = []; var custom_brokerage = [];\r\n $scope.type = 'Bar';\r\n $scope.chartColors = [];\r\n $scope.series.push('Ground');\r\n formatedData = [];\r\n $scope.chartColors = [\r\n {\r\n label : 'Ground',\r\n backgroundColor: '#fce39c',\r\n borderColor: '#fce39c',\r\n hoverBackgroundColor: '#fce39c',\r\n hoverBorderColor: '#fce39c',\r\n progress :progress\r\n\r\n } ];\r\n\r\n formatedData.push(ground);\r\n break;\r\n }\r\n case 'urgent_air' : {\r\n var air = []; var sea = []; $scope.series = []; var ground = []; var warehouse = []; var custom_brokerage = [];\r\n $scope.type = 'Bar';\r\n $scope.chartColors = [];\r\n $scope.series.push('Urgent Air');\r\n formatedData = [];\r\n $scope.chartColors = [\r\n {\r\n label : 'Urgent Air',\r\n\r\n backgroundColor: '#F4978A',\r\n borderColor: '#F4978A',\r\n hoverBackgroundColor: '#F4978A',\r\n hoverBorderColor: '#F4978A',\r\n progress : progress\r\n\r\n } ];\r\n formatedData.push(urgent_air);\r\n\r\n break;\r\n }\r\n case 'warehouse' : {\r\n var air = []; var sea = []; $scope.series = []; var ground = []; var urgent_air = []; var custom_brokerage = [];\r\n $scope.type = 'Bar';\r\n $scope.chartColors = [];\r\n $scope.series.push('Warehouse');\r\n formatedData = [];\r\n $scope.chartColors = [\r\n {\r\n label : 'Warehouse',\r\n\r\n backgroundColor: '#9575cd',\r\n borderColor: '#9575cd',\r\n hoverBackgroundColor: '#9575cd',\r\n hoverBorderColor: '#9575cd',\r\n progress : progress\r\n\r\n } ];\r\n formatedData.push(warehouse);\r\n\r\n break;\r\n }\r\n case 'custom_brokerage' : {\r\n var air = []; var sea = []; $scope.series = []; var ground = []; var urgent_air = []; var warehouse = [];\r\n $scope.type = 'Bar';\r\n $scope.chartColors = [];\r\n $scope.series.push('Custom Brokerage');\r\n formatedData = [];\r\n $scope.chartColors = [\r\n {\r\n label : 'Custom Brokerage',\r\n\r\n backgroundColor: '#2d7d8f',\r\n borderColor: '#2d7d8f',\r\n hoverBackgroundColor: '#2d7d8f',\r\n hoverBorderColor: '#2d7d8f',\r\n progress : progress\r\n\r\n } ];\r\n formatedData.push(custom_brokerage);\r\n\r\n break;\r\n }\r\n case 'all' : {\r\n $scope.chartColors = [];\r\n $scope.type = 'StackedBar';\r\n formatedData = [];\r\n $scope.options.legend.display = true;\r\n\r\n\r\n formatedData.push(air);\r\n formatedData.push(sea);\r\n formatedData.push(ground);\r\n formatedData.push(urgent_air);\r\n formatedData.push(warehouse);\r\n formatedData.push(custom_brokerage);\r\n $scope.chartColors = [\r\n {\r\n label : $scope.labelColors[0],\r\n backgroundColor: '#82dba7',\r\n borderColor: '#82dba7',\r\n hoverBackgroundColor: '#82dba7',\r\n hoverBorderColor: '#82dba7',\r\n progress : progress\r\n\r\n },\r\n {\r\n label : $scope.labelColors[1],\r\n backgroundColor: '#45afe3',\r\n borderColor: '#45afe3',\r\n hoverBackgroundColor: '#45afe3',\r\n hoverBorderColor: '#45afe3',\r\n progress : progress\r\n\r\n },\r\n {\r\n label : $scope.labelColors[2],\r\n backgroundColor: '#fce39c',\r\n borderColor: '#fce39c',\r\n hoverBackgroundColor: '#fce39c',\r\n hoverBorderColor: '#fce39c',\r\n progress : progress\r\n\r\n\r\n },\r\n {\r\n label : $scope.labelColors[3],\r\n backgroundColor: '#F4978A',\r\n borderColor: '#F4978A',\r\n hoverBackgroundColor: '#F4978A',\r\n hoverBorderColor: '#F4978A',\r\n progress : progress\r\n\r\n\r\n },\r\n {\r\n label : $scope.labelColors[4],\r\n backgroundColor: '#9575cd',\r\n borderColor: '#9575cd',\r\n hoverBackgroundColor: '#9575cd',\r\n hoverBorderColor: '#9575cd',\r\n progress : progress\r\n\r\n\r\n },\r\n {\r\n label : $scope.labelColors[5],\r\n backgroundColor: '#2d7d8f',\r\n borderColor: '#2d7d8f',\r\n hoverBackgroundColor: '#2d7d8f',\r\n hoverBorderColor: '#2d7d8f',\r\n progress : progress\r\n\r\n\r\n }\r\n\r\n ];\r\n $scope.series = $scope.Allseries\r\n break;\r\n }\r\n\r\n }\r\n $scope.stackedData = formatedData;\r\n\r\n\r\n}\r\n// end of chart\r\n\r\n\r\n\r\n\r\n }\r\n })();\r\n\n(function(){\r\n 'use strict';\r\n\r\n angular.module('app.core')\r\n .service('DownloadService', DownloadService);\r\n\r\n DownloadService.$inject = ['$http', '$window'];\r\n function DownloadService($http, $window){\r\n return {\r\n postDownloadFile: postDownloadFile,\r\n getDownloadFile: getDownloadFile,\r\n generateFile: generateFile\r\n };\r\n\r\n function postDownloadFile(url, request, filename){\r\n return $http.post(url, request, {responseType: 'blob'})\r\n .success(function(data, status, headers, config){\r\n $window.saveAs(data, filename);\r\n })\r\n }\r\n\r\n function getDownloadFile(url, request, filename){\r\n return $http({\r\n url: url,\r\n method: 'GET', \r\n params: request,\r\n responseType: 'blob'\r\n }).success(function(data, status, headers, config){\r\n $window.saveAs(data, filename);\r\n })\r\n }\r\n\r\n function generateFile(data, filename){\r\n $window.saveAs(data, filename);\r\n }\r\n }\r\n})();\n// (function() {\r\n// 'use strict';\r\n\r\n// angular\r\n// .module('app.core')\r\n// .factory('dataservice', dataservice);\r\n\r\n// dataservice.$inject = ['$http', '$q', 'exception', 'logger'];\r\n// /* @ngInject */\r\n// function dataservice($http, $q, exception, logger) {\r\n// var service = {\r\n// getPeople: getPeople,\r\n// getMessageCount: getMessageCount\r\n// };\r\n\r\n// return service;\r\n\r\n// function getMessageCount() { return $q.when(72); }\r\n\r\n// function getPeople() {\r\n// return $http.get('/api/people')\r\n// .then(success)\r\n// .catch(fail);\r\n\r\n// function success(response) {\r\n// return response.data;\r\n// }\r\n\r\n// function fail(e) {\r\n// return exception.catcher('XHR Failed for getPeople')(e);\r\n// }\r\n// }\r\n// }\r\n// })();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .config(['$stateProvider', '$urlRouterProvider', '$locationProvider', 'routerHelperProvider', routerConfig]);\r\n\r\n /* @ngInject */\r\n function routerConfig($stateProvider, $urlRouterProvider, $locationProvider, routerHelperProvider) {\r\n $stateProvider\r\n .state('404', {\r\n url: '/404',\r\n templateUrl: 'app/core/404.html',\r\n title: '404',\r\n data: {\r\n requireLogin: false\r\n }\r\n });\r\n\r\n $urlRouterProvider.otherwise('/404');\r\n $locationProvider.html5Mode({\r\n enabled: true,\r\n requireBase: false\r\n });\r\n\r\n routerHelperProvider.configure({\r\n docTitle: 'C-View'\r\n });\r\n }\r\n})();\r\n\n/* global toastr:false, moment:false */\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .constant('moment', moment)\r\n\r\n // menu\r\n .constant('menuGroups', {\r\n dashboard: 'dashboard',\r\n dashboardCfs:'dashboardCfs',\r\n dashboardCmts:'dashboardCmts',\r\n dashboardCsl:'dashboardCsl',\r\n trackAndTrace: 'trackAndTrace',\r\n trackAndTraceBooking:'trackAndTraceBooking',\r\n trackAndTraceActionBoard:'trackAndTraceActionBoard',\r\n trackAndTraceInTransit:'trackAndTraceInTransit',\r\n trackAndTraceDiscussion:'trackAndTraceDiscussion',\r\n trackAndTraceDiscussionCsl:'trackAndTraceDiscussionCsl',\r\n trackAndTraceDiscussionCfs:'trackAndTraceDiscussionCfs',\r\n trackAndTraceDiscussionCmts:'trackAndTraceDiscussionCmts',\r\n trackAndTraceCfs: 'trackAndTraceCfs',\r\n trackAndTraceCsl: 'trackAndTraceCsl',\r\n trackAndTraceCmts: 'trackAndTraceCmts',\r\n bookShipment: 'bookShipment',\r\n admin: {\r\n equipment_type: 'equipmentType',\r\n cslException: 'cslException',\r\n cfsException: 'cfsException',\r\n cmtsException: 'cmtsException',\r\n potentialExceptions: 'potentialExceptions',\r\n user: 'user',\r\n company: 'company',\r\n //groups: 'groups',\r\n lensgroup:'lensGroup',\r\n auditlog : 'auditLog',\r\n reports: 'reports',\r\n shiplinktext : 'shiplinkText',\r\n featureSpotlight : 'featureSpotlight',\r\n demo_account: 'demo',\r\n supportRequests:'supportRequests',\r\n ship_link:'shiplink'\r\n }\r\n })\r\n // permission\r\n .constant('permissions', {\r\n potentialExceptions: {\r\n create: 'PotentialException.create',\r\n publish: 'PotentialException.publish',\r\n read: 'PotentialException.read',\r\n reader: 'PotentialException.reader'\r\n },\r\n cslException: {\r\n approver: 'CslException.approver',\r\n all_clients_approver: 'CslException.all_clients_approver',\r\n read: 'CslException.read',\r\n create: 'CslException.create'\r\n },\r\n load:{\r\n manage: 'Load.read'\r\n },\r\n user: {\r\n manage: 'User.manage',\r\n read: 'User.read'\r\n },\r\n company: {\r\n manage: 'Company.manage',\r\n read: 'Company.read'\r\n },\r\n bookShipment: {\r\n create: 'BookShipment.create'\r\n },\r\n groups: {\r\n manage: 'Group.manage',\r\n read: 'Group.read'\r\n },\r\n lensgroup: {\r\n manage: 'LensGroup.manage'\r\n },\r\n shipment: {\r\n read: 'Shipment.read',\r\n export: 'Shipment.export',\r\n financial: 'Shipment.financial'\r\n },\r\n //demo\r\n demo_account: {\r\n demo: 'User.demo'\r\n },\r\n //cview icons....\r\n cview_warehouse:{\r\n warehouse : 'User.warehouse'\r\n },\r\n\r\n cview_operationskpi:{\r\n operationskpi : 'User.operations_kpi'\r\n },\r\n\r\n cview_operations_dashboard:{\r\n Operations_Dashboard: 'User.operations_dashboard'\r\n },\r\n\r\n\r\n cview_accounts_receivables:{\r\n accounts_receivables : 'User.accounts_receivables'\r\n },\r\n\r\n cview_book_shipment:{\r\n book_shipment : 'User.book_shipment'\r\n },\r\n\r\n cview_operations:{\r\n operations : 'User.operations'\r\n },\r\n cview_reporting:{\r\n reporting : 'User.reporting'\r\n },\r\n\r\n cview_transportation:{\r\n transportation : 'User.track_and_trace'\r\n },\r\n\r\n cview_customs:{\r\n customs : 'User.customs'\r\n },\r\n //report sub menu cview icons....\r\n reports_creports:{\r\n creports : 'User.creports'\r\n },\r\n\r\n reports_maintenance_report:{\r\n maintenance_report : 'User.maintenance_report'\r\n },\r\n\r\n reports_reporting_sharepoint:{\r\n reporting_sharepoint : 'User.reporting_sharepoint'\r\n },\r\n\r\n reports_kpi_services:{\r\n kpi_services : 'User.kpi_services'\r\n },\r\n featureSpotlight: {\r\n manage: 'Spotlight.manage'\r\n }\r\n /* reports_Operations:{\r\n Operations_Dashboard : 'User.Operations_Dashboard'\r\n }\r\n*/\r\n\r\n\r\n })\r\n\r\n\r\n\r\n\r\n\r\n .constant('searchParams', {\r\n customer_group: \"customer_group\",\r\n customer_name:\"customer_name\",\r\n origin_country:\"origin_country\",\r\n origin_city:\"origin_city\",\r\n ship_date_from:\"ship_date_from\",\r\n ship_date_to:\"ship_date_to\",\r\n shipper:\"shipper\",\r\n reference_number:\"reference_number\",\r\n business_type_group:\"business_type_group\",\r\n service_level_code:\"service_level_code\",\r\n consol_number:\"consol_number\",\r\n bol_number:\"bol_number\",\r\n destination_country:\"destination_country\",\r\n destination_city:\"destination_city\",\r\n due_date_from:\"due_date_from\",\r\n due_date_to:\"due_date_to\",\r\n pod_eta_date_from:\"pod_eta_date_from\",\r\n pod_eta_date_to:\"pod_eta_date_to\",\r\n pol_etd_date_from:\"pol_etd_date_from\",\r\n pol_etd_date_to:\"pol_etd_date_to\",\r\n consignee:\"consignee\",\r\n reason_code:\"reason_code\",\r\n status:\"status\",\r\n container_number:\"container_number\",\r\n quick_filter:\"quick_filter\",\r\n potential_exception_id:\"potential_exception_id\"\r\n });\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.core')\r\n .config(function($mdDateLocaleProvider){\r\n // $mdDateLocaleProvider.formatDate = function(date){\r\n // return moment(date).format('YYYY-MM-DD');\r\n // };\r\n\r\n $mdDateLocaleProvider.parseDate = function(dateString, $filter) {\r\n return $filter(\"date:YYYY-MM-DD\")(dateString);\r\n }\r\n })\r\n // .config(function(localStorageServiceProvider){\r\n // localStorageServiceProvider\r\n // .setDefaultToCookie(false);\r\n // })\r\n .config(function($authProvider, api) {\r\n var dummyUserParam = \"\";\r\n\r\n if(localStorage.getItem(\"dummyUser\") != null || localStorage.getItem(\"dummyUser\") != undefined){\r\n dummyUserParam = '?dummyUserEmail='+ encodeURIComponent(localStorage.getItem(\"dummyUser\"))\r\n }\r\n\r\n if(localStorage.getItem(\"auth_headers\")!= undefined && localStorage.getItem(\"auth_headers\")!= null){\r\n var authHeadersData=JSON.parse(localStorage.getItem(\"auth_headers\"));\r\n if(authHeadersData.client && authHeadersData.uid){\r\n if(dummyUserParam!=\"\")\r\n dummyUserParam+=\"&client=\"+authHeadersData.client+\"&uid=\"+authHeadersData.uid;\r\n else\r\n dummyUserParam=\"?client=\"+authHeadersData.client+\"&uid=\"+authHeadersData.uid;\r\n }\r\n }\r\n\r\n $authProvider.configure({\r\n apiUrl: api.url_v2,\r\n tokenValidationPath: '/auth/validate_token'+ dummyUserParam,\r\n signOutUrl: '/auth/sign_out'+ dummyUserParam,\r\n emailRegistrationPath: '/auth',\r\n accountUpdatePath: '/auth',\r\n accountDeletePath: '/auth',\r\n confirmationSuccessUrl: window.location.href,\r\n passwordResetPath: '/auth/password',\r\n passwordUpdatePath: '/auth/password',\r\n passwordResetSuccessUrl: 'http://'+window.location.host+'/reset-password',\r\n emailSignInPath: '/auth/sign_in',\r\n storage: 'localStorage',\r\n forceValidateToken: true,\r\n validateOnPageLoad: false,\r\n proxyIf: function() { return false; },\r\n proxyUrl: '/proxy',\r\n omniauthWindowType: 'sameWindow',\r\n authProviderPaths: {\r\n github: '/auth/github',\r\n facebook: '/auth/facebook',\r\n google: '/auth/google'\r\n },\r\n tokenFormat: {\r\n \"access-token\": \"{{ token }}\",\r\n \"token-type\": \"Bearer\",\r\n \"client\": \"{{ client_id }}\",\r\n \"expiry\": \"{{ expiry }}\",\r\n \"uid\": \"{{ uid }}\"\r\n },\r\n cookieOps: {\r\n path: \"/\",\r\n expires: 9999,\r\n expirationUnit: 'days',\r\n secure: false,\r\n domain: api.url_v2\r\n },\r\n createPopup: function(url) {\r\n return window.open(url, '_blank', 'closebuttoncaption=Cancel');\r\n },\r\n parseExpiry: function(headers) {\r\n // convert from UTC ruby (seconds) to UTC js (milliseconds)\r\n return (parseInt(headers['expiry']) * 1000) || null;\r\n },\r\n handleLoginResponse: function(response) {\r\n return response.data;\r\n },\r\n handleAccountUpdateResponse: function(response) {\r\n return response.data;\r\n },\r\n handleTokenValidationResponse: function(response) {\r\n return response.data;\r\n }\r\n });\r\n });\r\n\r\n\r\n\r\n // //.config(toastrConfig)\r\n // .value('config', config)\r\n // .config(configure)\r\n\r\n // // toastrConfig.$inject = ['toastr'];\r\n // // /* @ngInject */\r\n // // function toastrConfig(toastr) {\r\n // // toastr.options.timeOut = 4000;\r\n // // toastr.options.positionClass = 'toast-bottom-right';\r\n // // }\r\n\r\n // var config = {\r\n // appErrorPrefix: '[C-View Error] ',\r\n // appTitle: 'C-View'\r\n // };\r\n\r\n\r\n // configure.$inject = ['$logProvider', 'routerHelperProvider', 'exceptionHandlerProvider'];\r\n // /* @ngInject */\r\n // function configure($logProvider, routerHelperProvider, exceptionHandlerProvider) {\r\n // if ($logProvider.debugEnabled) {\r\n // $logProvider.debugEnabled(true);\r\n // }\r\n // exceptionHandlerProvider.configure(config.appErrorPrefix);\r\n // routerHelperProvider.configure({ docTitle: config.appTitle + ': ' });\r\n // }\r\n\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n\r\n angular\r\n .module('app.core')\r\n .factory('authInterceptor', ['$q','ipCookie','$location', '$log','$injector','$timeout', function ($q, ipCookie, $location, $log, $injector, $timeout){\r\n\r\n return {\r\n\r\n request: function(config){\r\n\r\n config.headers = config.headers || {};\r\n\r\n var authData=JSON.parse(localStorage.getItem(\"auth_headers\"));\r\n\r\n if (authData !== undefined && authData !== \"{}\"&& authData != null\r\n && !config.headers['Uid'] && config.headers['Uid'] == undefined){\r\n\r\n /*angular.forEach(config.headers, function(value, key){\r\n if(key.toLowerCase() == \"uid\" && value && value.length>0){\r\n return config;\r\n }\r\n });*/\r\n config.headers['Access-Token'] = authData['access-token'];\r\n config.headers['Client'] = authData['client'];\r\n config.headers['Expiry'] = authData['expiry'];\r\n config.headers['Uid'] = authData['uid'];\r\n\r\n //config.headers['Access-Token'] = ipCookie('access-token');\r\n //config.headers['Client'] = ipCookie('client');\r\n //config.headers['Expiry'] = ipCookie('expiry');\r\n //config.headers['Uid'] = ipCookie('uid');\r\n }\r\n\r\n delete config.headers['access-token'];\r\n delete config.headers.client;\r\n delete config.headers.expiry;\r\n delete config.headers.uid;\r\n return config;\r\n },\r\n responseError: function(response) {\r\n var $mdDialog = $injector.get('$mdDialog');\r\n switch (response.status){\r\n case 401:\r\n if ($location.path() !== '/reset-password' && $location.path() !== '/confirm-account'){\r\n var dummyUserParam = \"\";\r\n\r\n if(localStorage.getItem(\"dummyUser\") != null || localStorage.getItem(\"dummyUser\") != undefined){\r\n dummyUserParam = '?dummyUserEmail='+ encodeURIComponent(localStorage.getItem(\"dummyUser\"))\r\n }\r\n\r\n if(localStorage.getItem(\"auth_headers\")!= undefined && localStorage.getItem(\"auth_headers\")!= null){\r\n var authHeadersData=JSON.parse(localStorage.getItem(\"auth_headers\"));\r\n if(authHeadersData.client && authHeadersData.uid){\r\n if(dummyUserParam!=\"\")\r\n dummyUserParam+=\"&client=\"+authHeadersData.client+\"&uid=\"+authHeadersData.uid;\r\n else\r\n dummyUserParam=\"?client=\"+authHeadersData.client+\"&uid=\"+authHeadersData.uid;\r\n }\r\n }\r\n\r\n if(dummyUserParam!='' && dummyUserParam.length>0){\r\n var $httpVal= $injector.get('$http');\r\n var api =$injector.get('api');\r\n $httpVal.delete(api.url_v2 + '/auth/sign_out'+ dummyUserParam).finally(function(resp){\r\n $mdDialog.hide();\r\n localStorage.removeItem('auth_headers');\r\n localStorage.removeItem('user');\r\n localStorage.removeItem('dummyUser');\r\n localStorage.clear();\r\n sessionStorage.fromPath = \"/\";\r\n //sessionStorage.clear();\r\n $mdDialog.cancel();\r\n });\r\n var startInterval = setInterval(function () {}, 0);\r\n while(startInterval--){\r\n startInterval.clearInterval();\r\n }\r\n }\r\n\r\n $timeout(function(){\r\n localStorage.clear();\r\n sessionStorage.fromPath = \"/\";\r\n ipCookie.remove('access-token');\r\n $location.path('/login');\r\n },2500);\r\n }\r\n break;\r\n case 500:\r\n break;\r\n case 503:\r\n break;\r\n }\r\n return $q.reject(response);\r\n }\r\n };\r\n }])\r\n .config(function ($httpProvider){\r\n $httpProvider.interceptors.push('authInterceptor');\r\n });\r\n}) ();\r\n\n// (function() {\r\n// 'use strict';\r\n\r\n// var core = angular.module('app.core');\r\n// core.config(toastrConfig);\r\n\r\n// toastrConfig.$inject = ['toastr'];\r\n// /* @ngInject */\r\n// function toastrConfig(toastr) {\r\n// toastr.options.timeOut = 4000;\r\n// toastr.options.positionClass = 'toast-bottom-right';\r\n// }\r\n\r\n// var config = {\r\n// appErrorPrefix: '[helloWorld Error] ',\r\n// appTitle: 'helloWorld'\r\n// };\r\n\r\n// core.value('config', config)\r\n// core.config(configure);\r\n \r\n// configure.$inject = ['$logProvider', 'routerHelperProvider', 'exceptionHandlerProvider'];\r\n// /* @ngInject */\r\n// function configure($logProvider, routerHelperProvider, exceptionHandlerProvider) {\r\n// if ($logProvider.debugEnabled) {\r\n// $logProvider.debugEnabled(true);\r\n// }\r\n// exceptionHandlerProvider.configure(config.appErrorPrefix);\r\n// routerHelperProvider.configure({ docTitle: config.appTitle + ': ' });\r\n// }\r\n\r\n// })();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular.module('app.bookShipment', [\r\n 'app.core',\r\n 'duScroll',\r\n 'ngMessages',\r\n 'mdPickers',\r\n 'ngFileUpload'\r\n ]);\r\n\r\n})();\n/**\r\n * @ngdoc module\r\n * @name BookShipmentService\r\n *\r\n * @description\r\n * The BookShipmentService does stuff\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.bookShipment')\r\n .service('BookShipmentService', BookShipmentService);\r\n\r\n /** @ngInject */\r\n BookShipmentService.$inject = ['$http', '$log', '$rootScope', '$q','$timeout', 'api', 'Upload'];\r\n function BookShipmentService($http, $log, $rootScope, $q, $timeout, api, Upload) {\r\n var ship_order = {},\r\n deferred = $q.defer(),\r\n serviceLevelTypes = false;\r\n\r\n $timeout(function() {\r\n deferred.resolve();\r\n }, 6000);\r\n\r\n var serviceLevelType = '';\r\n\r\n\t\tfunction unpackageShipOrder(data){\r\n\r\n\t\t\tfor (var section in data){\r\n\t\t\t\tswitch(section){\r\n\t\t\t\t\tcase \"id\":\r\n\t\t\t\t\t\tship_order[section] = data[section];\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"reference_numbers\":\r\n\t\t\t\t\t\tship_order[section] = [];\r\n if (data[section]){\r\n\t\t\t\t\t\tdata[section].map(function(d){ ship_order[section].push(d); });\r\n }\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"item_details\":\r\n\t\t\t\t\t\tship_order[section] = [];\r\n if (data[section]){\r\n\t\t\t\t\t\tdata[section].map(function(d){ ship_order[section].push(d); });\r\n }\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase \"attachments\":\r\n\t\t\t\t\t\tship_order[section] = [];\r\n if (data[section]){\r\n\t\t\t\t\t\tdata[section].map(function(d){ ship_order[section].push(d); });\r\n }\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tship_order[section] = {};\r\n\r\n\t\t\t\t\t\tfor (var field in data[section]){\r\n\t\t\t\t\t\t\tif (field.includes(\"Date\")){\r\n\r\n\t\t\t\t\t\t\t\tship_order[section][field] = data[section][field] ? new Date(data[section][field]) : null;\r\n\t\t\t\t\t\t\t}\r\n else if (field.includes(\"Time\")){\r\n if (data[section][field]){\r\n var time = moment(data[section][field].trim(), \"hh:mm a\");\r\n }\r\n //debugger;\r\n ship_order[section][field] = time ? time.toDate() : null;\r\n\r\n }\r\n else {\r\n\t\t\t\t\t\t\t\tship_order[section][field] = data[section][field];\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t} // end switch\r\n\t\t\t} // end for\r\n\t\t}\r\n\r\n function packageShipOrder(_data){\r\n var data = angular.copy(_data);\r\n\r\n data.reference_numbers = data.reference_numbers || [];\r\n data.reference_numbers = data.reference_numbers.filter(function(d){\r\n return (d.type && d.type !== \"\") && (d.reference && d.reference !== \"\" );\r\n });\r\n\r\n return data;\r\n }\r\n\r\n\r\n // ----------------------------\r\n // Submit the shipment order\r\n // ----------------------------\r\n function submitShipOrder(id){\r\n $timeout.cancel(deferred.promise);\r\n return $http.post(api.url + '/ship-order/' + id, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n for (var field in response.data){\r\n ship_order[field] = response.data[field];\r\n }\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n }\r\n return {\r\n getCurrentShipOrder: function(){return ship_order;},\r\n setCurrentShipOrder: function(shipment){ship_order = shipment;},\r\n getShipOrder: getShipOrder,\r\n getShipOrderVariable: getShipOrderVariable,\r\n postShipOrder: postShipOrder,\r\n submitShipOrder: submitShipOrder,\r\n getServiceLevelType: function() {\r\n return serviceLevelType;\r\n },\r\n getServiceLevelTypes: getServiceLevelTypes,\r\n uploadFile: uploadFile,\r\n removeFile: removeFile,\r\n getBookingDraft: getBookingDraft,\r\n putBookingDraft: putBookingDraft,\r\n deleteBookingDraft: deleteBookingDraft,\r\n autocomplete: autocomplete\r\n };\r\n\r\n function getBlankOrder(){\r\n return $http.get('/app/book-shipment/order-form.json')\r\n .then(function(response){\r\n\t\t\t\t\t\t\tunpackageShipOrder(response.data);\r\n return ship_order;\r\n });\r\n }\r\n\r\n // ---------------------\r\n // Get a shipment order\r\n // // ------------------\r\n function getShipOrder(id){\r\n\r\n if (id && id > 0){\r\n return $http.get(api.url + '/ship-order/' + id, {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n\r\n for (var field in response.data){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\tif (field.includes(\"Date\")){\r\n\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tship_order[field] = new Date(response.data[field]);\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n else if (field.includes(\"Time\")){\r\n\r\n ship_order[field] = moment(response.data[field]);\r\n }\r\n else {\r\n\t\t\t\t\t\t\t\t\t\t\t\t\tship_order[field] = response.data[field];\r\n\t\t\t\t\t\t\t\t\t\t\t\t}\r\n }\r\n return ship_order;\r\n }, function onError(response){\r\n if (response.status === 0){\r\n // Handle timeout or network error\r\n } else {\r\n // Handle error from server\r\n }\r\n });\r\n } else {return getBlankOrder();}\r\n }\r\n\r\n function getShipOrderVariable() {\r\n return ship_order;\r\n }\r\n\r\n // ----------------------------\r\n // Create a shipment order\r\n // ----------------------------\r\n function postShipOrder(){\r\n $timeout.cancel(deferred.promise);\r\n\t\t\tdeferred = $q.defer();\r\n var promise = $q.defer();\r\n $http.post(api.url + '/book_shipments', packageShipOrder(ship_order), {timeout: deferred.promise})\r\n .then(function onSuccess(response){\r\n for (var field in response.data){\r\n ship_order[field] = response.data[field];\r\n }\r\n return promise.resolve(response);\r\n }, function onError(response){\r\n if (response.status === 0){\r\n return promise.reject(response);\r\n } else {\r\n return promise.reject(response);\r\n }\r\n });\r\n return promise.promise;\r\n }\r\n\r\n // ----------------------------\r\n // POST to upload a file\r\n // ----------------------------\r\n function uploadFile(file, errFiles) {\r\n return Upload.upload({\r\n url: api.url + '/booking_draft/attach_file',\r\n method: 'POST',\r\n data: {attachments: file}\r\n });\r\n }\r\n // ----------------------------\r\n // DELETE remove file\r\n // ----------------------------\r\n function removeFile(id) {\r\n return $http.delete(api.url + '/booking_draft/remove_files/' + id);\r\n }\r\n\r\n // ----------------------------\r\n // Get the last booking draft\r\n // ----------------------------\r\n function getBookingDraft() {\r\n return $http.get(api.url + '/booking_draft')\r\n .then(function onSuccess(response){\r\n\t\t\t\t\t\t\t\t\tunpackageShipOrder(response.data);\r\n return ship_order;\r\n });\r\n }\r\n\r\n // ----------------------------\r\n // Update or Create booking draft\r\n // ----------------------------\r\n function putBookingDraft() {\r\n return $http.put(api.url + '/booking_draft', packageShipOrder(ship_order));\r\n }\r\n\r\n // ----------------------------\r\n // Delete booking draft\r\n // ----------------------------\r\n function deleteBookingDraft() {\r\n return $http.delete(api.url + '/booking_draft');\r\n }\r\n\r\n // ----------------------------\r\n // autocomplete for bookShipment form\r\n // ----------------------------\r\n function autocomplete(query) {\r\n query.book_shipment = 'true'; //set the api to return shipment data\r\n var promise = $http.post(api.url_v2 + '/autocomplete', query).then(function(res){\r\n var autocompletes = res.data.map(function(d){\r\n var display = '';\r\n switch(query.field) {\r\n case 'customer':\r\n display = d.customer_name;\r\n break;\r\n case 'shipper':\r\n display = d.shipper_name;\r\n break;\r\n case 'consignee':\r\n display = d.consignee_name;\r\n break;\r\n }\r\n return {\r\n value: d,\r\n display: display\r\n }\r\n });\r\n return autocompletes;\r\n });\r\n return promise;\r\n }\r\n\r\n //------------------------\r\n // Loads the service level types\r\n //------------------------\r\n function getServiceLevelTypes() {\r\n var defer = $q.defer();\r\n if (serviceLevelTypes) {\r\n defer.resolve(serviceLevelTypes);\r\n }\r\n else {\r\n $http.get('/app/book-shipment/service-levels.json').then(function(response) {\r\n serviceLevelTypes = response.data;\r\n defer.resolve(serviceLevelTypes);\r\n });\r\n }\r\n return defer.promise;\r\n }\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.bookShipment')\r\n .config(routerConfig);\r\n\r\n /* @ngInject */\r\n function routerConfig($stateProvider, menuGroups) {\r\n $stateProvider\r\n .state('book-shipment', {\r\n url: '/book-shipment',\r\n templateUrl: '/app/book-shipment/book-shipment.html',\r\n controller: 'BookShipmentController',\r\n controllerAs: 'vm',\r\n title: 'Book Shipment',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.bookShipment\r\n }\r\n })\r\n .state('terms-conditions', {\r\n url: '/terms-conditions',\r\n templateUrl: '/app/book-shipment/terms-and-conditions.html',\r\n title: 'terms and conditions',\r\n data: {\r\n requireLogin: true \r\n }\r\n });\r\n }\r\n})();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.bookShipment')\r\n .controller('BookShipmentController', BookShipmentController);\r\n\r\n\r\n BookShipmentController.$inject = [\"$scope\", \"$q\",\"BookShipmentService\", \"$log\", \"$translatePartialLoader\", \"$location\", \"$timeout\", \"$http\", \"$document\", \"$mdToast\", \"$mdDialog\", \"$mdMedia\", \"$window\", \"mdSelectHelper\",'ContactsService', 'api', 'UserService', 'DownloadService'];\r\n function BookShipmentController($scope, $q, BookShipmentService, $log, $translatePartialLoader, $location, $timeout, $http, $document, $mdToast, $mdDialog, $mdMedia, $window, mdSelectHelper, ContactsService, api, UserService, DownloadService) {\r\n $translatePartialLoader.addPart('bookshipment');\r\n\r\n //variables\r\n var vm = this;\r\n\r\n\r\n vm.validReferenceCodes = ['CUST', 'PO', 'SHPR', 'SONO', 'CSGN' ];\r\n vm.minPickUpDate = moment().add('days', 1).format('YYYY-MM-DD')\r\n vm.ready = false;\r\n vm.isReview = false;\r\n vm.totalNumPieces = 0;\r\n vm.totalGrossWeight = 0;\r\n vm.confirmCSS = 'md-primary';\r\n vm.showItemDetailRemoveButton = false;\r\n vm.showRefNumRemoveButton = false;\r\n vm.readTermsAndConditions = false;\r\n vm.isSavedDraft = false;\r\n vm.isSavingDraft = false;\r\n vm.isLocked = {\r\n customer: false,\r\n shipper: false,\r\n consignee: false\r\n };\r\n vm.isCustomerFieldLocked = false;\r\n vm.isShipperFieldLocked = false;\r\n vm.isConsigneeFieldLocked = false;\r\n vm.isTouchSupported = isTouchSupported;\r\n\t\tvm.referenceNumberTypes = [];\r\n vm.serviceLevelTypes = [];\r\n vm.serviceLevelType = BookShipmentService.getServiceLevelType();\r\n vm.sideBarData = [\r\n {id: 'customer_info', isValid: false, display: 'BOOKSHIPMENT.CUSTOMER_INFO', optional: false},\r\n {id: 'shipper_consignee_info', isValid: false, display: 'BOOKSHIPMENT.SHIPPER_CONSIGNEE_INFO', optional: false},\r\n {id: 'shipment_options', isValid: false, display: 'BOOKSHIPMENT.SHIPMENT_OPTIONS', optional: false},\r\n {id: 'shipment_details', isValid: false, display: 'BOOKSHIPMENT.SHIPMENT_DETAILS', optional: false},\r\n {id: 'reference_numbers', isValid: false, display: 'BOOKSHIPMENT.REFERENCE_NUMBERS', optional: true},\r\n {id: 'haz_mat', isValid: false, display: 'BOOKSHIPMENT.HAZ_MAT', optional: true},\r\n {id: 'item_details', isValid: false, display: 'BOOKSHIPMENT.ITEM_DETAILS', optional: false},\r\n {id: 'complete_shipment', isValid: false, display: 'BOOKSHIPMENT.COMPLETE_SHIPMENT', optional: false}\r\n ];\r\n BookShipmentService.getShipOrder()\r\n .then(function(data){\r\n vm.ship_order = data;\r\n setOrdersFromShipOrder(); //set the orders from ship_order\r\n });\r\n\r\n\t\t// Load the reference types\r\n\t\t$http.get('/app/book-shipment/reference-number-types.json').then(function(response){\r\n\r\n // filtered to types currently accepted by SI\r\n\t\t\tvm.referenceNumberTypes = response.data.filter(function(v, i){ return vm.validReferenceCodes.includes(v.code)});\r\n\t\t});\r\n\r\n // Load the service level types\r\n\t\tBookShipmentService.getServiceLevelTypes().then(function(types){\r\n\t\t\tvm.serviceLevelTypes = types;\r\n\t\t});\r\n\r\n\t\t// ---------------------------------------------\r\n // Initialization: get the draft data if there is some\r\n\t\t// ---------------------------------------------\r\n BookShipmentService.getBookingDraft().then(function(response) {\r\n\r\n if(response && response != 'undefined') {\r\n //vm.ship_order is updated from the service so now we can update the other controller vars\r\n vm.isSavedDraft = true;\r\n setOrdersFromShipOrder();\r\n //if(vm.shipper_consignee_info.shipper != '') vm.isLocked.shipper = true;\r\n //if(vm.shipper_consignee_info.consignee != '') vm.isLocked.consignee = true;\r\n //if(vm.customer_info.customer != '') vm.isLocked.customer = true;\r\n }\r\n }).catch(function(error) {\r\n //failed to get the draft\r\n });\r\n\t\t// Do we need this?\r\n\t\t//vm.isCustomerFieldLocked = false;\r\n //vm.isShipperFieldLocked = false;\r\n //vm.isConsigneeFieldLocked = false;\r\n ContactsService.setSubjectStatuses({billOfLading: {billOfLading: true}});\r\n // -----------\r\n // Functions\r\n // -----------\r\n vm.clearOrder = clearOrder;\r\n vm.clearSection = clearSection;\r\n // vm.getShipOrder = getShipOrder;\r\n vm.updateItemDetails = updateItemDetails;\r\n vm.updateServiceLevel = updateServiceLevel;\r\n vm.reviewOrder = reviewOrder;\r\n vm.submitOrder = submitOrder;\r\n vm.printBillOfLading = printBillOfLading;\r\n vm.printShippingLabel = printShippingLabel;\r\n vm.closeConfirmationModal = closeConfirmationModal;\r\n vm.changedSameAsBilling = changedSameAsBilling;\r\n vm.addReferenceNumber = addReferenceNumber;\r\n vm.addItemDetail = addItemDetail;\r\n vm.removeItemDetail = removeItemDetail;\r\n vm.editItemDetailRows = editItemDetailRows;\r\n vm.doneEditingItemDetails = doneEditingItemDetails;\r\n vm.uploadFile = uploadFile;\r\n vm.removeFile = removeFile;\r\n vm.removeRefNum = removeRefNum;\r\n vm.editRefNumRows = editRefNumRows;\r\n vm.doneEditingRefNums = doneEditingRefNums;\r\n vm.saveDraft = saveDraft;\r\n vm.clearDraft = clearDraft;\r\n vm.showModal = showModal;\r\n vm.closeModal = closeModal;\r\n vm.resizeSidebar = resizeSidebar;\r\n vm.getMatches = getMatches;\r\n vm.onSelectOpen = mdSelectHelper.onSelectOpen;\r\n vm.viewBookedShipment = viewBookedShipment;\r\n //validate the form\r\n angular.element(document).ready(function(){\r\n $scope.$watch('vm.ship_order', function(){\r\n $timeout(function() {\r\n validateForm();\r\n\r\n }, 700);\r\n }, true);\r\n });\r\n $scope.$watch('vm.reference_numbers', function(){\r\n $timeout(function() {\r\n validateForm();\r\n\r\n }, 700);\r\n }, true);\r\n\r\n $scope.$watch('vm.item_details', function(){\r\n updateItemDetails();\r\n }, true);\r\n\r\n $scope.$watch('vm.shipment_details', function(){\r\n if (vm.ship_order){\r\n vm.ship_order.shipment_details = angular.copy(vm.shipment_details);\r\n }\r\n }, true);\r\n\r\n // $scope.$watch('vm.reference_numbers', function(){\r\n // if (vm.ship_order){\r\n // $timeout(function(){\r\n // vm.ship_order.reference_numbers = angular.copy(vm.reference_numbers);\r\n // }, 200);\r\n // }\r\n // }, true);\r\n\r\n function setOrdersFromShipOrder() {\r\n\r\n vm.customer_info = vm.ship_order.customer_info;\r\n vm.shipper_consignee_info = vm.ship_order.shipper_consignee_info;\r\n vm.shipment_options = vm.ship_order.shipment_options;\r\n vm.shipment_details = angular.copy(vm.ship_order.shipment_details);\r\n vm.reference_numbers = angular.copy(vm.ship_order.reference_numbers);\r\n vm.haz_mat = vm.ship_order.haz_mat;\r\n vm.item_details = vm.ship_order.item_details;\r\n vm.complete_shipment = vm.ship_order.complete_shipment;\r\n\t\t\tvm.attachments = vm.ship_order.attachments;\r\n\r\n if (!['prepaid', 'collect', 'third_party'].includes(vm.customer_info.paymentOptions) ){\r\n vm.customer_info.paymentOptions = 'prepaid'; //if payment options not present in loaded draft, set default\r\n }\r\n\r\n vm.reference_numbers.map(function(d){\r\n var reference_code = vm.validReferenceCodes.includes(d.type) ? d.type : undefined;\r\n d.type = reference_code;\r\n return d;\r\n });\r\n\r\n\r\n\r\n if (!vm.isSavedDraft) {\r\n // user settings\r\n var user = UserService.getUserData();\r\n vm.complete_shipment.generate_label = !!user.settings.book_shipment_generate_label;\r\n\r\n //company settings\r\n if (user.company.settings && user.company.settings.book_shipment_settings) {\r\n var settings = user.company.settings.book_shipment_settings;\r\n if (angular.isArray(settings.default_reference_number_types)) {\r\n vm.reference_numbers = vm.ship_order.reference_numbers = [];\r\n angular.forEach(settings.default_reference_number_types, function(t) {\r\n vm.reference_numbers.push({type: t, reference: ''});\r\n });\r\n }\r\n }\r\n }\r\n\r\n BookShipmentService.setCurrentShipOrder(vm.ship_order);\r\n }\r\n\r\n function makeReferenceNumbersDirty(){\r\n vm.reference_numbers.map(function(d, i){\r\n vm.ReferenceNumbersForm['reference_type-'+i].$setDirty();\r\n vm.ReferenceNumbersForm['reference_number-'+i].$setDirty();\r\n })\r\n }\r\n\r\n //validates the form\r\n function validateForm() {\r\n // Validate mdp pickers\r\n vm.ShipmentDetailsForm.shipmentAvailableTime.$validate();\r\n vm.ShipmentDetailsForm.pickUpDate.$validate();\r\n vm.ShipmentDetailsForm.dockTime.$validate();\r\n //when loading previous data display validation errors immediately\r\n\r\n //vm.ReferenceNumbersForm.$validate();\r\n // Is the form valid?\r\n vm.sideBarData[0].isValid = vm.CustomerInfoForm.$valid && vm.customer_info.paymentOptions != '';\r\n vm.sideBarData[1].isValid = vm.ShipperConsigneeForm.$valid;\r\n vm.sideBarData[2].isValid = vm.ShipmentOptionsForm.$valid;\r\n vm.sideBarData[3].isValid = vm.ShipmentDetailsForm.$valid;\r\n if (shouldValidateReferenceNumbers()){\r\n vm.sideBarData[4].optional = false;\r\n vm.sideBarData[4].isValid = vm.ReferenceNumbersForm.$valid;\r\n }\r\n else {\r\n vm.sideBarData[4].isValid = true;\r\n vm.sideBarData[4].optional = true;\r\n\r\n }\r\n\r\n\r\n vm.sideBarData[5].isValid = vm.haz_mat.unID != '' && vm.haz_mat.classGroup != '';//vm.HazMatForm.$valid;\r\n vm.sideBarData[6].isValid = vm.ItemDetailsForm.$valid;//validateItemDetails();\r\n vm.sideBarData[7].isValid = vm.CompleteShipmentForm.$valid;\r\n\r\n var isAllFormsValid = true;\r\n for(var k in vm.sideBarData) {\r\n if(!vm.sideBarData[k].isValid && k != 5 ) { //checking k for the values aren't required\r\n isAllFormsValid = false;\r\n }\r\n }\r\n vm.isFormValid = isAllFormsValid;\r\n //vm.ShipperConsigneeForm.$setDirty();\r\n }\r\n\r\n function shouldValidateReferenceNumbers(){\r\n\r\n if (vm.reference_numbers.length && vm.reference_numbers.length > 0 ){\r\n\r\n if ((vm.reference_numbers[0].reference !== \"\" || vm.reference_numbers[0].type !== \"\")\r\n && (vm.reference_numbers[0].type || vm.reference_numbers[0].reference)){\r\n return true;\r\n }\r\n\r\n }\r\n return false;\r\n }\r\n\r\n function clearOrder(){\r\n\t\t\t/* Get a blank order and reset to it */\r\n\t\t\tBookShipmentService.getShipOrder().then(function(blank_order){\r\n\t\t\t\tvm.ship_order = blank_order;\r\n\r\n\t\t\t\tsetOrdersFromShipOrder();\r\n\t\t\t});\r\n\r\n for (var field in vm.isLocked){\r\n vm.isLocked[field] = false;\r\n }\r\n\r\n vm.searchOrigin = undefined;\r\n vm.searchDestination = undefined;\r\n\r\n setTimeout(function(){$scope.$digest();}, 150);\r\n\t\t\t/* Reset forms */\r\n var forms = [vm.CustomerInfoForm, vm.ShipperConsigneeForm, vm.ShipmentOptionsForm, vm.ShipmentDetailsForm, vm.ItemDetailsForm];\r\n forms.map(function(form){ resetForm(form); });\r\n vm.clearDraft();\r\n closeModal();\r\n }\r\n\r\n function resetForm(form){\r\n form.$setPristine();\r\n form.$setUntouched();\r\n }\r\n\r\n function clearSection(section, form){\r\n\r\n for (var field in vm.ship_order[section]){\r\n if(section == 'item_details') {\r\n for(var k in vm.ship_order[section][field]) {\r\n vm.ship_order[section][field][k] = \"\";\r\n }\r\n } else {\r\n if (section !== 'reference_numbers'){\r\n vm.ship_order[section][field] = \"\";\r\n }\r\n }\r\n }\r\n\r\n //md-autocomplete is stupid, so have to both remove search text and the ng-model value\r\n if (section =='customer_info'){\r\n vm.searchOrigin = undefined;\r\n vm.searchDestination = undefined;\r\n }\r\n\r\n if (section == 'shipment_details') vm.shipment_details = {};\r\n if (section == 'shipment_options') vm.serviceLevelType = '';\r\n if (section == 'reference_numbers') {\r\n vm.reference_numbers.length = 0;\r\n vm.reference_numbers = [{reference: \"\", type: \"\"}];\r\n\r\n }\r\n if (section == 'item_details') vm.item_details = [{noOfPieces: '', grossWeight: '', uom1: '', descriptionOfGoods: '', scheduleBInternational: '', length: '', width: '', height: '', uom2: ''}];\r\n if (form){\r\n resetForm(form);\r\n }\r\n\r\n }\r\n\r\n function updateItemDetails(){\r\n vm.totalNumPieces = 0;\r\n vm.totalGrossWeight = 0;\r\n if (vm.item_details){\r\n vm.item_details.map(function(d){\r\n if (d.noOfPieces)\r\n vm.totalNumPieces += +d.noOfPieces;\r\n if (d.grossWeight)\r\n vm.totalGrossWeight += +d.grossWeight;\r\n });\r\n }\r\n }\r\n\r\n function updateServiceLevel() {\r\n if(!vm.isReview) {\r\n vm.shipment_options.serviceLevel = null;\r\n vm.sideBarData[2].isValid = false;\r\n vm.isFormValid = false;\r\n }\r\n }\r\n\r\n function reviewOrder(){\r\n $log.debug(\"Let's review your order!\");\r\n // if(vm.isFormValid) {\r\n showModal(null, 'review-form');\r\n // }\r\n }\r\n\r\n angular.element($window).bind('resize', vm.resizeSidebar);\r\n $scope.$on('$destroy', function() {\r\n angular.element($window).unbind('resize', vm.resizeSidebar);\r\n })\r\n\r\n function resizeSidebar() {\r\n angular.element(document.querySelector('#sticky-sidebar'))[0].style.width = 'auto';\r\n }\r\n\r\n function viewBookedShipment(){\r\n if (vm.bookingNumber){\r\n localStorage.setItem('invalidateCache', true);\r\n var bookingNumberSearch = '/track-trace?booking_number=' + vm.bookingNumber;\r\n window.open(bookingNumberSearch);\r\n }\r\n }\r\n\r\n function submitOrder(){\r\n vm.confirmCSS = \"md-warn\";\r\n vm.submissionErrors = false;\r\n if(vm.readTermsAndConditions) {\r\n $log.debug(\"Submitting Order\");\r\n closeModal();\r\n showModal(null, 'confirmation');\r\n\r\n\r\n vm.isSubmitLoading = true;\r\n vm.ship_order.reference_numbers = angular.copy(vm.reference_numbers);\r\n BookShipmentService.postShipOrder().then(function(response) {\r\n\r\n vm.confirmCSS = \"md-primary\";\r\n vm.isSubmitLoading = false;\r\n vm.billOfLading = response.data.bill_of_lading_download_path;\r\n vm.shippingLabel = response.data.shipping_label_download_path;\r\n if (response.data.complete_shipment && response.data.complete_shipment.bol_sli_cmr){\r\n vm.bookingNumber = response.data.complete_shipment.bol_sli_cmr.toUpperCase();\r\n }\r\n\r\n\r\n }).catch(function(response) {\r\n var error;\r\n var errors = [];\r\n switch (response.status){\r\n case 500:\r\n error = response.data.status + \": \" + response.data.error;\r\n errors.push(error);\r\n showToastWithFile('submit.error.html', errors);\r\n break;\r\n case 422:\r\n for (var section in response.data){\r\n\r\n for (var i in response.data[section]){\r\n var error_msg = response.data[section][i];\r\n\r\n error_msg = typeof error_msg === 'string' ? error_msg.replace('(SOAP-ENV:Receiver)', '') : \"There was a problem submitting your request\";\r\n var section_label = section ? section :'';\r\n\r\n errors.push(section_label + \": \" + error_msg); //hide unecessary SI info from user\r\n }\r\n }\r\n\r\n showToastWithFile('submit.error.html', errors, (3000+ (1000*errors.length)));\r\n break;\r\n default:\r\n errors.push(\"Server is unreachable or is timing out\");\r\n showToastWithFile('submit.error.html', errors);\r\n break;\r\n }\r\n vm.confirmCSS = \"md-danger\";\r\n vm.submissionErrors = errors;\r\n $timeout(function(){vm.isSubmitLoading = false;}, 150);\r\n\r\n });\r\n } else {\r\n showToastWithFile('terms-conditions.html', '');\r\n }\r\n }\r\n\r\n function printBillOfLading() {\r\n if (vm.billOfLading){\r\n var filename = (moment().format('YYYY-MM-DD') + '-Bill_of_Lading' + vm.bookingNumber + '.pdf');\r\n //$http.get().then(function(response){\r\n DownloadService.getDownloadFile(api.url.replace('/api/v1', '') + vm.billOfLading, '', filename);\r\n }\r\n\r\n\r\n }\r\n\r\n function printShippingLabel() {\r\n if (vm.shippingLabel){\r\n var filename = (moment().format('YYYY-MM-DD') + '-Shipping_Label' + vm.bookingNumber + '.pdf');\r\n DownloadService.getDownloadFile(api.url.replace('/api/v1', '') + vm.shippingLabel, '', filename);\r\n\r\n }\r\n }\r\n\r\n\r\n\r\n function closeConfirmationModal() {\r\n $mdDialog.hide();\r\n clearOrder();\r\n }\r\n\r\n //sets the shipper consignee values to the same as customer info\r\n function changedSameAsBilling() {\r\n if(vm.shipper_consignee_info.same_as_billing) {\r\n vm.shipper_consignee_info.shipperPhone = vm.customer_info.customerPhone;\r\n vm.shipper_consignee_info.shipper = vm.customer_info.customer;\r\n vm.shipper_consignee_info.shipperAddress1 = vm.customer_info.customerAddress1;\r\n vm.shipper_consignee_info.shipperCity = vm.customer_info.customerCityName;\r\n vm.shipper_consignee_info.shipperCountry = vm.customer_info.customerCountry;\r\n vm.shipper_consignee_info.shipperAccountCode = vm.customer_info.customerAccountCode;\r\n vm.shipper_consignee_info.shipperAddress2 = vm.customer_info.customerAddress2;\r\n vm.shipper_consignee_info.shipperState = vm.customer_info.customerStateProv;\r\n vm.shipper_consignee_info.shipperPostalCode = vm.customer_info.customerPostalCode;\r\n } else {\r\n var values = ['shipperPhone', 'shipper', 'shipperAddress1', 'shipperCity', 'shipperCountry',\r\n 'shipperAccountCode', 'shipperAddress2', 'shipperState', 'shipperPostalCode'];\r\n for(var k in values) {\r\n vm.shipper_consignee_info[values[k]] = '';\r\n }\r\n }\r\n }\r\n\r\n function addReferenceNumber() {\r\n vm.reference_numbers.push({\r\n type: \"\",\r\n reference: \"\"\r\n });\r\n }\r\n\r\n function addItemDetail() {\r\n vm.item_details.push({\r\n noOfPieces: \"\",\r\n grossWeight: \"\",\r\n uom1: \"\",\r\n descriptionOfGoods: \"\",\r\n scheduleBInternational: \"\",\r\n length: \"\",\r\n width: \"\",\r\n height: \"\",\r\n uom2: \"\"\r\n });\r\n }\r\n\r\n function isTouchSupported() {\r\n var msTouchEnabled = window.navigator.msMaxTouchPoints;\r\n var generalTouchEnabled = \"ontouchstart\" in document.createElement(\"div\");\r\n\r\n if (msTouchEnabled || generalTouchEnabled) {\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n function removeItemDetail(index) {\r\n if(vm.item_details.length > 1) {\r\n vm.item_details.splice(index, 1);\r\n if(vm.item_details.length == 1) doneEditingItemDetails();\r\n }\r\n }\r\n\r\n function editItemDetailRows() {\r\n vm.showItemDetailRemoveButton = true;\r\n }\r\n\r\n function doneEditingItemDetails() {\r\n vm.showItemDetailRemoveButton = false;\r\n }\r\n\r\n function removeRefNum(index) {\r\n if(vm.reference_numbers.length > 1) {\r\n vm.reference_numbers.splice(index, 1);\r\n if(vm.reference_numbers.length == 1) doneEditingRefNums();\r\n }\r\n }\r\n\r\n function editRefNumRows() {\r\n vm.showRefNumRemoveButton = true;\r\n }\r\n\r\n function doneEditingRefNums() {\r\n vm.showRefNumRemoveButton = false;\r\n }\r\n\r\n function saveDraft() {\r\n vm.isSavingDraft = true;\r\n $log.debug('save draft');\r\n return BookShipmentService.putBookingDraft().then(function(response) {\r\n showToastWithFile('save-draft.success.html', '');\r\n vm.isSavingDraft = false;\r\n }).catch(function(error) {\r\n showToastWithFile('save-draft.error.html', '');\r\n vm.isSavingDraft = false;\r\n });\r\n }\r\n\r\n function clearDraft(){\r\n $log.debug('clear draft');\r\n BookShipmentService.deleteBookingDraft().then(function(response) {\r\n showToastWithFile('clear-draft.success.html', '');\r\n }).catch(function(error) {\r\n showToastWithFile('clear-draft.error.html', '');\r\n });\r\n }\r\n function getMatches(key, searchText){\r\n var query = {field: key, value: searchText}\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n // ----------------------------------\r\n // Uploads files to the backend\r\n // ----------------------------------\r\n function uploadFile(file, errFiles) {\r\n vm.errFile = errFiles && errFiles[0];\r\n if(!file) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\tvm.saveDraft().then(function(d){\r\n\t\t\t\tfile.isUploading = true;\r\n BookShipmentService.uploadFile(file, errFiles).then(function (response) {\r\n $timeout(function () {\r\n\t\t\t\t\t\tvm.attachments.length = 0;\r\n\t\t\t\t\t\tresponse.data.booking_draft.attachments.map(function(f){ vm.attachments.push(f); });\r\n file.isUploading = false;\r\n var index = response.data.booking_draft.attachments.length - 1;\r\n file.file_index = response.data.booking_draft.attachments[index].file_index;\r\n showToastWithFile('attach-doc.success.html', '');\r\n });\r\n }).catch(function (response) {\r\n if(response.status > 0) {\r\n $scope.errorMsg = response.status + ': ' + response.data;\r\n }\r\n showToastWithFile('attach-doc.error.html', response.error);\r\n });\r\n });\r\n }\r\n\r\n // ----------------------------------\r\n // Removes file from the backend\r\n // ----------------------------------\r\n function removeFile(index) {\r\n var id = vm.attachments[index].file_index;\r\n BookShipmentService.removeFile(id).then(function(response) {\r\n vm.attachments.splice(index, 1);\r\n showToastWithFile('remove-doc.success.html', '');\r\n }).catch(function(error) {\r\n showToastWithFile('remove-doc.error.html', '');\r\n });\r\n }\r\n\r\n function showModal(ev, modal) {\r\n $log.debug(vm.ship_order);\r\n if (modal === 'review-form'){\r\n vm.isReview = true;\r\n }\r\n /* Show the modal */\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/book-shipment/modals/'+ modal + '.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen,\r\n scope: $scope,\r\n preserveScope: true\r\n })\r\n .then(function(answer) {\r\n\r\n }, function() {\r\n vm.isReview = false;\r\n //on close out or cancel\r\n });\r\n }\r\n\r\n //closes a modal\r\n function closeModal() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n //toast used for alerts\r\n function showToastWithFile(file, messages, delay) {\r\n $mdToast.show({\r\n position: 'top right',\r\n hideDelay: (delay ? delay : 3000),\r\n preserveScope: true,\r\n templateUrl: '/app/book-shipment/toast/' + file,\r\n locals: {messages: messages},\r\n controller: function($scope, messages){\r\n $scope.messages = messages;\r\n },\r\n parent: angular.element(document.getElementById('toast-parent'))\r\n });\r\n }\r\n\r\n }\r\n}) ();\r\n\n/**\r\n * @ngdoc directive\r\n * @name auto-complete-bookment\r\n * @description directive that creates an autocomplete form\r\n * @restrict E\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.bookShipment')\r\n .directive('autoCompleteBookment', autoCompleteBookment)\r\n\r\n /** @ngInject **/\r\n function autoCompleteBookment() {\r\n var directive = {\r\n restrict: 'E',\r\n scope: {\r\n field: '@',\r\n searchField: '@',\r\n displayName: '@',\r\n searchText: '=',\r\n name: '=',\r\n form: '=',\r\n isReview: '=',\r\n isFieldsLocked: '='\r\n },\r\n templateUrl: '/app/book-shipment/auto-complete-field.html',\r\n controller: ['BookShipmentService', '$scope', autoBookController],\r\n controllerAs: \"bookCtrl\",\r\n link: function(scope, element, attrs){\r\n // debugger;\r\n }\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n function autoBookController(BookShipmentService, $scope){\r\n var vm = this;\r\n\r\n vm.autocomplete = autocomplete;\r\n vm.selectItemChange = selectItemChange;\r\n vm.textChange = textChange;\r\n\r\n //called on autocomplete and calls the backend\r\n function autocomplete(field1, query){\r\n return BookShipmentService.autocomplete({field:field1, value: query});\r\n }\r\n\r\n //set the filed to empty if the name gets deleted\r\n function textChange(field) {\r\n // if(searchText == undefined || searchText == '')\r\n // $scope.isFieldsLocked = false;\r\n\r\n var booking = BookShipmentService.getCurrentShipOrder();\r\n switch(field) {\r\n case 'customer':\r\n if(booking.customer_info.customer == undefined || booking.customer_info.customer == '') {\r\n booking.customer_info.customerAddress1 = '';\r\n booking.customer_info.customerAddress2 = '';\r\n booking.customer_info.customer = '';\r\n booking.customer_info.customerPhone = '';\r\n booking.customer_info.customerAccountCode = '';\r\n $scope.isFieldsLocked = false;\r\n }\r\n break;\r\n case 'shipper':\r\n if(booking.shipper_consignee_info.shipper == undefined || booking.shipper_consignee_info.shipper == '') {\r\n booking.shipper_consignee_info.shipperAddress1 = '';\r\n booking.shipper_consignee_info.shipperAddress2 = '';\r\n booking.shipper_consignee_info.shipperAddress3 = '';\r\n booking.shipper_consignee_info.shipperAddress4 = '';\r\n booking.shipper_consignee_info.shipperCity = '';\r\n booking.shipper_consignee_info.shipperCountry = '';\r\n booking.shipper_consignee_info.shipper = '';\r\n booking.shipper_consignee_info.shipperPostalCode = '';\r\n booking.shipper_consignee_info.shipperAccountCode = '';\r\n $scope.isFieldsLocked = false;\r\n }\r\n\r\n break;\r\n case 'consignee':\r\n if(booking.shipper_consignee_info.consignee == undefined || booking.shipper_consignee_info.consignee == '') {\r\n booking.shipper_consignee_info.consigneeAddress1 = '';\r\n booking.shipper_consignee_info.consigneeAddress2 = '';\r\n booking.shipper_consignee_info.consigneeAddress3 = '';\r\n booking.shipper_consignee_info.consigneeAddress4 = '';\r\n booking.shipper_consignee_info.consigneeCity = '';\r\n booking.shipper_consignee_info.consigneeCountry = '';\r\n booking.shipper_consignee_info.consignee = '';\r\n booking.shipper_consignee_info.consigneeContactName = '';\r\n booking.shipper_consignee_info.consigneePostalCode = '';\r\n booking.shipper_consignee_info.consigneePhone = '';\r\n booking.shipper_consignee_info.consigneeAccountCode = '';\r\n $scope.isFieldsLocked = false;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n //called when autocomplete field is selected\r\n function selectItemChange(item, field) {\r\n //$scope.isFieldsLocked = true; //set fileds locked so the auto completed fields can't be edited\r\n var booking = BookShipmentService.getCurrentShipOrder();\r\n if (!item) {\r\n $scope.isFieldsLocked = false;\r\n return;\r\n }\r\n switch(field) {\r\n case 'customer':\r\n booking.customer_info.customerAddress1 = item.value.customer_address1;\r\n booking.customer_info.customerAddress2 = item.value.customer_address2;\r\n booking.customer_info.customer = item.value.customer_name;\r\n booking.customer_info.customerPhone = item.value.customer_phone;\r\n booking.customer_info.customerAccountCode = item.value.account_code; \r\n break;\r\n case 'shipper':\r\n booking.shipper_consignee_info.shipperAddress1 = item.value.shipper_address1;\r\n booking.shipper_consignee_info.shipperAddress2 = item.value.shipper_address2;\r\n booking.shipper_consignee_info.shipperAddress3 = item.value.shipper_address3;\r\n booking.shipper_consignee_info.shipperAddress4 = item.value.shipper_address4;\r\n booking.shipper_consignee_info.shipperCity = item.value.shipper_city;\r\n booking.shipper_consignee_info.shipperCountry = item.value.shipper_country;\r\n booking.shipper_consignee_info.shipper = item.value.shipper_name;\r\n booking.shipper_consignee_info.shipperPostalCode = item.value.shipper_zip_code;\r\n booking.shipper_consignee_info.shipperAccountCode = item.value.account_code;\r\n break;\r\n case 'consignee':\r\n booking.shipper_consignee_info.consigneeAddress1 = item.value.consignee_address1;\r\n booking.shipper_consignee_info.consigneeAddress2 = item.value.consignee_address2;\r\n booking.shipper_consignee_info.consigneeAddress3 = item.value.consignee_address3;\r\n booking.shipper_consignee_info.consigneeAddress4 = item.value.consignee_address4;\r\n booking.shipper_consignee_info.consigneeCity = item.value.consignee_city;\r\n booking.shipper_consignee_info.consigneeCountry = item.value.consignee_country;\r\n booking.shipper_consignee_info.consignee = item.value.consignee_name;\r\n booking.shipper_consignee_info.consigneeContactName = item.value.consignee_contact;\r\n booking.shipper_consignee_info.consigneePostalCode = item.value.consignee_zip;\r\n booking.shipper_consignee_info.consigneePhone = item.value.consignee_phone;\r\n booking.shipper_consignee_info.consigneeAccountCode = item.value.account_code;\r\n break;\r\n }\r\n }\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc directive\r\n * @name auto-complete\r\n * @description directive that creates an autocomplete form\r\n * @restrict E\r\n */\r\n\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .directive('autoComplete', autoComplete)\r\n\r\n /** @ngInject */\r\n function autoComplete() {\r\n var directive = {\r\n restrict: 'E',\r\n scope: {\r\n field: '@',\r\n searchField: '@',\r\n displayName: '@',\r\n searchText: '=',\r\n focusField: '=',\r\n extraParamString: '@'\r\n },\r\n templateUrl: '/app/advanced-search/auto-complete-field.html',\r\n controller: \"AdvSearchController\",\r\n controllerAs: \"searchCtrl\",\r\n link: function(scope, element, attrs){\r\n // debugger;\r\n }\r\n };\r\n\r\n return directive;\r\n }\r\n\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.search\r\n * @description method that includes the current search fields into a search\r\n * visible\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.autocomplete\r\n * @description method that querys from the database given the letters typed in\r\n * @param {query} - the letters from the input field\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.saveDefaultSearch\r\n * @description method that saves a search\r\n * @param {query} - the searchFields that you want to saved\r\n * @param {name} - name for the search that your saving\r\n * @param {isDefault} - true or false wether this is your default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.listSavedSearches\r\n * @description method that lists all the searches that have been saved\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.loadSearch\r\n * @description method that loads the search with the given id\r\n * @param {id} - the id for the search that you want to load\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.deleteSearch\r\n * @description method that deletes the search with the given id\r\n * @param {id} - the id for the search that you want to delete\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getEmptySearchFields\r\n * @description method that gets the empty search field\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getCurrentSearchFields\r\n * @description method that gets the current search fields\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getIsFirstSearch\r\n * @description method that gets if the search is the first search or not\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setIsFirstSearch\r\n * @description method that sets if the search is the first search or not\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setCurrentSearchFields\r\n * @params {searchFields}\r\n * @description method that sets teh current search fields with searchFields\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.setClickedChip\r\n * @description method TODO\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.removeChip\r\n * @description method TODO\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchService.getSearchFieldsFocus\r\n * @description method TODO\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .service('AdvSearchService', AdvSearchService);\r\n\r\n /** @ngInject */\r\n AdvSearchService.$inject = ['$state', '$http', '$log', '$filter', 'api', '$q', '$timeout', '$rootScope', '$location', 'DownloadService', 'TrackTracePaginationService'];\r\n function AdvSearchService($state, $http, $log, $filter, api, $q, $timeout, $rootScope, $location, DownloadService, TrackTracePaginationService) {\r\n\r\n var isSavedSearch = false;\r\n var searchFieldChips = [];\r\n listSavedSearches(); //sets isSavedSearch\r\n var isFirstSearch = true; //saves if it is the first search\r\n var timeoutPromise = false;\r\n\r\n var emptySearchFields = {\r\n awb: {\r\n field: \"awb\",\r\n value: \"\",\r\n display: \"AWB/BOL #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n origin_country: {\r\n field: \"origin_country\",\r\n value: \"\",\r\n display: \"TRACKTRACE.COUNTRY_ORIGIN\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n origin_city: {\r\n field: \"origin_city\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CITY_ORIGIN\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n ship_date_from: {\r\n field: \"ship_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.START_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n ship_date_to: {\r\n field: \"ship_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.START_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n shipper: {\r\n field: \"shipper\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SHIPPER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n reference_number: {\r\n field: \"reference_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.REFERENCE_NUM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n business_type_group: {\r\n field: \"business_type_group\",\r\n value: \"\",\r\n display: \"TRACKTRACE.BUSINESS_TYPE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n service_level_code: {\r\n field: \"service_level_code\",\r\n value: \"\",\r\n display: \"TRACKTRACE.SERVICE_LEVEL\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consol_number: {\r\n field: \"consol_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CONSOL_NUM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n bol_number: {\r\n field: \"bol_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.AWB_BOL\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n destination_country: {\r\n field: \"destination_country\",\r\n value: \"\",\r\n display: \"TRACKTRACE.COUNTRY_DESTINATION\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n destination_city: {\r\n field: \"destination_city\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CITY_DESTINATION\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n due_date_from: {\r\n field: \"due_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DUE_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n due_date_to: {\r\n field: \"due_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DUE_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pod_eta_date_from: {\r\n field: \"pod_eta_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.POD_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pod_eta_date_to: {\r\n field: \"pod_eta_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.POD_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pol_etd_date_from: {\r\n field: \"pol_etd_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ETD_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n pol_etd_date_to: {\r\n field: \"pol_etd_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ETD_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n eta_date_from: {\r\n field: \"pod_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.POD_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n eta_date_to: {\r\n field: \"pod_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.POD_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n etd_date_from: {\r\n field: \"etd_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ETD_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n etd_date_to: {\r\n field: \"etd_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ETD_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n\r\n estimated_date_from: {\r\n field: \"estimated_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ESTIMATED_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n estimated_date_to: {\r\n field: \"estimated_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ESTIMATED_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n consignee: {\r\n field: \"consignee\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CONSIGNEE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n incoterm: {\r\n field: \"incoterm\",\r\n value: \"\",\r\n display: \"TRACKTRACE.INCOTERM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n vesselname: {\r\n field: \"vesselname\",\r\n value: \"\",\r\n display: \"TRACKTRACE.VESSELNAME\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n voyage: {\r\n field: \"voyage\",\r\n value: \"\",\r\n display: \"TRACKTRACE.VOYAGE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n reason_code: {\r\n field: \"reason_code\",\r\n value: \"\",\r\n display: \"TRACKTRACE.REASON_CODE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n status: {\r\n field: \"status\",\r\n value: \"\",\r\n display: \"TRACKTRACE.STATUS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n container_number: {\r\n field: \"container_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CONTAINER_NUM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n quick_filter: {\r\n field: \"quick_filter\",\r\n value: [],\r\n display: \"TRACKTRACE.FILTER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n potential_exception_id: {\r\n field: \"potential_exception_id\",\r\n value: \"\",\r\n display: \"TRACKTRACE.POTENTIAL_EXCEPTION\",\r\n displayValue: false,\r\n focus: false\r\n },\r\n origin_code: {\r\n field: \"origin_code\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ORIGIN\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n destination_code: {\r\n field: \"destination_code\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DESTINATION\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n arrive_date_from: {\r\n field: \"arrive_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ARRIVE_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n arrive_date_to: {\r\n field: \"arrive_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ARRIVE_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n invoicenumber: {\r\n field: \"invoicenumber\",\r\n value: \"\",\r\n display: \"TRACKTRACE.INVOICE_NUMBER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n invoice_number: {\r\n field: \"invoice_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.INVOICE_NUMBER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n otp_date_from: {\r\n field: \"otp_date_from\",\r\n value: \"\",\r\n display: \"TRACKTRACE.OTP_DATE_FROM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n otp_date_to: {\r\n field: \"otp_date_to\",\r\n value: \"\",\r\n display: \"TRACKTRACE.OTP_DATE_TO\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n otp_type: {\r\n field: \"otp_type\",\r\n value: \"\",\r\n display: \"TRACKTRACE.OTP_TYPE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n otp_period: {\r\n field: \"otp_period\",\r\n value: \"\",\r\n display: \"TRACKTRACE.OTP_PERIOD\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"origins\": {\r\n field: \"origins\",\r\n value: \"\",\r\n display: \"TRACKTRACE.ORIGINS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"destinations\": {\r\n field: \"destinations\",\r\n value: \"\",\r\n display: \"TRACKTRACE.DESTINATIONS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"lane_pairs\": {\r\n field: \"lane_pairs\",\r\n value: \"\",\r\n display: \"TRACKTRACE.LANE_PAIRS\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"booking_number\": {\r\n field: \"booking_number\",\r\n value: \"\",\r\n display: \"TRACKTRACE.BOOKING_NUMBER\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n /*Added by Abheesh*/\r\n customer_group: {\r\n field: \"customer_group\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CUSTOMER_GROUP\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n customer_name: {\r\n field: \"customer_name\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CUSTOMER_NAME\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"customer_street_address\": {\r\n field: \"customer_street_address\",\r\n value: \"\",\r\n display: \"Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"customer_zip\": {\r\n field: \"customer_zip\",\r\n value: \"\",\r\n display: \"Customer Zip\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"customer_phone\": {\r\n field: \"customer_phone\",\r\n value: \"\",\r\n display: \"Customer Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"customer_party_id\": {\r\n field: \"customer_party_id\",\r\n value: \"\",\r\n display: \"Customer Party Id\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_delivery_status\": {\r\n field: \"shipment_delivery_status\",\r\n value: \"\",\r\n display: \"Delivery Status\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_current_status\": {\r\n field: \"shipment_current_status\",\r\n value: \"\",\r\n display: \"Current Status\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_invoice_amount_is_less_than\": {\r\n field: \"shipment_invoice_amount_is_less_than\",\r\n value: \"\",\r\n display: \"Invoice amount <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_invoice_amount_is_greater_than\": {\r\n field: \"shipment_invoice_amount_is_greater_than\",\r\n value: \"\",\r\n display: \"Invoice amount >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_invoice_amount_equal_to\": {\r\n field: \"shipment_invoice_amount_equal_to\",\r\n value: \"\",\r\n display: \"Invoice amount =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_invoice_amount_range\": {\r\n field: \"shipment_invoice_amount_range\",\r\n value: \"\",\r\n display: \"Invoice amount between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_gross_weight_range\": {\r\n field: \"shipment_gross_weight_range\",\r\n value: \"\",\r\n display: \"Gross Weight between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_gross_weight_equal_to\": {\r\n field: \"shipment_gross_weight_equal_to\",\r\n value: \"\",\r\n display: \"Gross Weight =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_gross_weight_is_greater_than\": {\r\n field: \"shipment_gross_weight_is_greater_than\",\r\n value: \"\",\r\n display: \"Gross Weight >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_gross_weight_is_less_than\": {\r\n field: \"shipment_gross_weight_is_less_than\",\r\n value: \"\",\r\n display: \"Gross Weight <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_total_pieces_is_less_than\": {\r\n field: \"shipment_total_pieces_is_less_than\",\r\n value: \"\",\r\n display: \"Total Pieces <\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_total_pieces_is_greater_than\": {\r\n field: \"shipment_total_pieces_is_greater_than\",\r\n value: \"\",\r\n display: \"Total Pieces >\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_total_pieces_equal_to\": {\r\n field: \"shipment_total_pieces_is_equal_to\",\r\n value: \"\",\r\n display: \"Total Pieces =\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_total_pieces_range\": {\r\n field: \"shipment_total_pieces_range\",\r\n value: \"\",\r\n display: \"Total Pieces Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_mode\": {\r\n field: \"shipment_mode\",\r\n value: \"\",\r\n display: \"Business Type\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_is_bookmarked\": {\r\n field: \"shipment_is_bookmarked\",\r\n value: \"\",\r\n display: \"Isbookmarked\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_reason_code\": {\r\n field: \"shipment_reason_code\",\r\n value: \"\",\r\n display: \"Exception\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_service_level\": {\r\n field: \"shipment_service_level\",\r\n value: \"\",\r\n display: \"Service Level\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_awb_bol\": {\r\n field: \"shipment_awb_bol\",\r\n value: \"\",\r\n display: \"AWB/BOL #\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_invoice\": {\r\n field: \"shipment_invoice\",\r\n value: \"\",\r\n display: \"Invoice\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_ref\": {\r\n field: \"shipment_ref\",\r\n value: \"\",\r\n display: \"Reference\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_consol\": {\r\n field: \"shipment_consol\",\r\n value: \"\",\r\n display: \"Consol\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_container\": {\r\n field: \"shipment_container\",\r\n value: \"\",\r\n display: \"TRACKTRACE.CONTAINER_NUM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_delivered_date_equal_to\": {\r\n field: \"shipment_delivered_date_equal_to\",\r\n value: \"\",\r\n display: \"Delivered Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_delivered_date_range_to\": {\r\n field: \"shipment_delivered_date_range_to\",\r\n value: \"\",\r\n display: \"Delivered Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_ship_date_equal_to\": {\r\n field: \"shipment_ship_date_equal_to\",\r\n value: \"\",\r\n display: \"Start Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_ship_date_range_to\": {\r\n field: \"shipment_ship_date_range_to\",\r\n value: \"\",\r\n display: \"Start Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_due_date_equal_to\": {\r\n field: \"shipment_due_date_equal_to\",\r\n value: \"\",\r\n display: \"Due Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_due_date_range_to\": {\r\n field: \"shipment_due_date_range_to\",\r\n value: \"\",\r\n display: \"Due Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_expected_delivery_date_equal_to\": {\r\n field: \"shipment_expected_delivery_date_equal_to\",\r\n value: \"\",\r\n display: \"Expected Delivery Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_expected_delivery_date_range_to\": {\r\n field: \"shipment_expected_delivery_date_range_to\",\r\n value: \"\",\r\n display: \"Expected Delivery Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_origin_country\": {\r\n field: \"shipment_origin_country\",\r\n value: \"\",\r\n display: \"Origin Country\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_origin_state\": {\r\n field: \"shipment_origin_state\",\r\n value: \"\",\r\n display: \"Origin State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_origin_city\": {\r\n field: \"shipment_origin_city\",\r\n value: \"\",\r\n display: \"Origin City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_origin_city_code\": {\r\n field: \"shipment_origin_city_code\",\r\n value: \"\",\r\n display: \"Origin City Code\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_destination_country\": {\r\n field: \"shipment_destination_country\",\r\n value: \"\",\r\n display: \"Destination Country\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_destination_state\": {\r\n field: \"shipment_destination_state\",\r\n value: \"\",\r\n display: \"Destination State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_destination_city\": {\r\n field: \"shipment_destination_city\",\r\n value: \"\",\r\n display: \"Destination City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_destination_city_code\": {\r\n field: \"shipment_destination_city_code\",\r\n value: \"\",\r\n display: \"Destination City Code\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_lane_pair\": {\r\n field: \"shipment_lane_pair\",\r\n value: \"\",\r\n display: \"Lane Pair\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipper_street_address\": {\r\n field: \"shipper_street_address\",\r\n value: \"\",\r\n display: \"Shipper Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipper_state\": {\r\n field: \"shipper_state\",\r\n value: \"\",\r\n display: \"Shipper State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipper_city\": {\r\n field: \"shipper_city\",\r\n value: \"\",\r\n display: \"Shipper City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipper_zip\": {\r\n field: \"shipper_zip\",\r\n value: \"\",\r\n display: \"Shipper Zip\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipper_phone\": {\r\n field: \"shipper_phone\",\r\n value: \"\",\r\n display: \"Shipper Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipper_country\": {\r\n field: \"shipper_country\",\r\n value: \"\",\r\n display: \"Shipper Country\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipper_party_id\": {\r\n field: \"shipper_party_id\",\r\n value: \"\",\r\n display: \"Shipper Party Id\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipper_name\": {\r\n field: \"shipper_name\",\r\n value: \"\",\r\n display: \"Shipper Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"consignee_street_address\": {\r\n field: \"consignee_street_address\",\r\n value: \"\",\r\n display: \"Consignee Street Address\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"consignee_state\": {\r\n field: \"consignee_state\",\r\n value: \"\",\r\n display: \"Consignee State\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"consignee_city\": {\r\n field: \"consignee_city\",\r\n value: \"\",\r\n display: \"Consignee City\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"consignee_zip\": {\r\n field: \"consignee_zip\",\r\n value: \"\",\r\n display: \"Consignee Zip\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"consignee_phone\": {\r\n field: \"consignee_phone\",\r\n value: \"\",\r\n display: \"Consignee Phone\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"consignee_country\": {\r\n field: \"consignee_country\",\r\n value: \"\",\r\n display: \"Consignee Country\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"consignee_party_id\": {\r\n field: \"consignee_party_id\",\r\n value: \"\",\r\n display: \"Consignee Party Id\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"consignee_name\": {\r\n field: \"consignee_name\",\r\n value: \"\",\r\n display: \"Consignee Name\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_port_of_discharge\": {\r\n field: \"shipment_port_of_discharge\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PORT_OF_DISCHARGE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_port_of_load\": {\r\n field: \"shipment_port_of_load\",\r\n value: \"\",\r\n display: \"TRACKTRACE.PORT_OF_LOAD\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_eta_date_equal_to\": {\r\n field: \"shipment_eta_date_equal_to\",\r\n value: \"\",\r\n display: \"POD ETA Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_eta_date_range_to\": {\r\n field: \"shipment_eta_date_range_to\",\r\n value: \"\",\r\n display: \"POD ETA Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_etd_date_equal_to\": {\r\n field: \"shipment_etd_date_equal_to\",\r\n value: \"\",\r\n display: \"POL ETD Date\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_etd_date_range_to\": {\r\n field: \"shipment_etd_date_range_to\",\r\n value: \"\",\r\n display: \"POL ETD Date Between\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_incoterm\": {\r\n field: \"shipment_incoterm\",\r\n value: \"\",\r\n display: \"TRACKTRACE.INCOTERM\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_vesselname\": {\r\n field: \"shipment_vesselname\",\r\n value: \"\",\r\n display: \"TRACKTRACE.VESSELNAME\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n \"shipment_voyage\": {\r\n field: \"shipment_voyage\",\r\n value: \"\",\r\n display: \"TRACKTRACE.VOYAGE\",\r\n displayValue: true,\r\n focus: false\r\n },\r\n forecast_custom_options: {\r\n field: \"forecast_custom_options\",\r\n value: \"\",\r\n display: \"Forecast Custom Option\",\r\n displayValue: true,\r\n focus: false\r\n }\r\n\r\n };\r\n\r\n var business_type_codes = [],\r\n reason_codes = [],\r\n search_params = [],\r\n service_level_codes = [],\r\n hasLoadedSearchValues = false,\r\n currentSearchFields = angular.copy(emptySearchFields),\r\n query = {};\r\n updateQuery();\r\n\r\n function listSavedSearches() {\r\n\r\n\r\n var promise = $http.get(api.url_v2 + '/search/saved').then(function(res){\r\n $log.debug(res);\r\n isSavedSearch = res['data'].length > 0;\r\n return res;\r\n });\r\n return promise;\r\n }\r\n\r\n function deleteSearch(id) {\r\n var promise = $http.delete(api.url_v2 + '/search/saved/' + id).then(function(res){\r\n $log.debug(res);\r\n });\r\n return promise;\r\n }\r\n\r\n //goes through the search fields from advance search and generates an object for pills\r\n function generateChips() {\r\n var k = 0; //for the chipTranslations index\r\n searchFieldChips.length = 0;\r\n var shipbetweendate = localStorage.getItem('shipbetweendate');\r\n var duebetweendate = localStorage.getItem('duebetweendate');\r\n var deliveredbetweendate = localStorage.getItem('deliveredbetweendate');\r\n var expectedbetweendate = localStorage.getItem('expectedbetweendate');\r\n var etabetweendate = localStorage.getItem('etabetweendate');\r\n for (var i in currentSearchFields) {\r\n if(currentSearchFields[i].value !== null && currentSearchFields[i].value !== \"\" && i != 'quick_filter' && (i != 'invalidate_cache')) { //dont make chips for quick_filter\r\n var object = {};\r\n object['key'] = currentSearchFields[i].field;\r\n object['display'] = currentSearchFields[i].display;\r\n // code for between dates invalid issue after refresh\r\n\r\n if(currentSearchFields[i].display == 'Start Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('shipbetweendate') : currentSearchFields[i].value;\r\n }\r\n else if(currentSearchFields[i].display == 'Due Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('duebetweendate') : currentSearchFields[i].value;\r\n }\r\n\r\n else if(currentSearchFields[i].display == 'Delivered Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('deliveredbetweendate') : currentSearchFields[i].value;\r\n }\r\n\r\n else if(currentSearchFields[i].display == 'Expected Delivery Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('expectedbetweendate') : currentSearchFields[i].value;\r\n }\r\n else if(currentSearchFields[i].display == 'ETA Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('etabetweendate') : currentSearchFields[i].value;\r\n }\r\n else if(currentSearchFields[i].display == 'ETD Date Between'){\r\n object['searchField'] = (currentSearchFields[i].value == 'Invalid Date')? localStorage.getItem('etdbetweendate') : currentSearchFields[i].value;\r\n }\r\n else{\r\n object['searchField'] = currentSearchFields[i].value;\r\n }\r\n object['displayValue'] = currentSearchFields[i].displayValue;\r\n\r\n if(object.display.includes('Start Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('shipbetweendate',object['searchField']);\r\n }\r\n if(object.display.includes('ETA Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('etabetweendate',object['searchField']);\r\n }\r\n if(object.display.includes('ETD Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('etdbetweendate',object['searchField']);\r\n }\r\n if(object.display.includes('Due Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('duebetweendate',object['searchField']);\r\n }\r\n\r\n if(object.display.includes('Delivered Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('deliveredbetweendate',object['searchField']);\r\n }\r\n\r\n if(object.display.includes('Expected Delivery Date Between') && (object.searchField == 'Invalid Date' || object.searchField != 'Invalid Date')){\r\n localStorage.setItem('expectedbetweendate',object['searchField']);\r\n }\r\n\r\n if(i == 'status' ) {\r\n if(currentSearchFields[i].value == '0') object['searchField'] = 'Undelivered';\r\n if(currentSearchFields[i].value == '1') object['searchField'] = 'Delivered';\r\n if(currentSearchFields[i].value == '2') object['searchField'] = 'Not Available';\r\n if(currentSearchFields[i].value == '3') object['searchField'] = 'booked';\r\n // } else if(i == 'business_type' || i == 'service_level' || i == 'reason_code'){\r\n //object['searchField'] = ;\r\n\r\n }\r\n else if (i == 'business_type_group') {\r\n object['searchField'] = object['searchField'].substring(0, 1).toUpperCase() + object['searchField'].substring(1);\r\n }\r\n searchFieldChips.push(object);\r\n }\r\n k++;\r\n }\r\n\r\n var idx=null,idx2=null, cnt=0;\r\n for( var j in searchFieldChips){\r\n if( [\"business_type_group\",\"shipment_mode\"].includes(searchFieldChips[j].key))\r\n cnt++;\r\n if(searchFieldChips[j].key == \"business_type_group\")\r\n {\r\n idx = j;\r\n }\r\n if(searchFieldChips[j].key == \"shipment_mode\")\r\n {\r\n idx2 = j;\r\n }\r\n if((cnt > 0 && idx2 >0) && idx)\r\n searchFieldChips.splice(idx,1);\r\n\r\n }\r\n\r\n if($state.current.name == 'track-trace-booking' || $state.current.name == 'track-trace-transit'){\r\n\r\n removeCloseMarkInChips(searchFieldChips, 'onload');\r\n\r\n }\r\n\r\n return searchFieldChips;\r\n\r\n\r\n }\r\n\r\n function removeCloseMarkInChips(chips, page){\r\n\r\n //var chips = vm.chipSearchFields;\r\n angular.forEach(chips, function(data,key){\r\n\r\n var dataToBeRemovalkey = '';\r\n\r\n if(data){\r\n\r\n if(data.key && data.searchField){\r\n\r\n if((data.key == 'status' && data.searchField == \"booked\") || (data.key == 'status' && data.searchField == \"Undelivered\") ){\r\n dataToBeRemovalkey = key;\r\n }\r\n\r\n }if(data.value && data.field){\r\n\r\n if((data.field == 'status' && data.value == \"booked\") || (data.field == 'status' && data.value == \"Undelivered\") ){\r\n dataToBeRemovalkey = key;\r\n }\r\n\r\n }\r\n// only removing cancel button on chips for otp shipments\r\n if(data.key == \"otp_date_from\" || data.key == \"otp_date_to\" || data.key == \"otp_type\" || data.key == \"otp_period\"\r\n || data.key == \"arrive_date_from\" || data.key == \"arrive_date_to\" || data.key == \"forecast_custom_options\"){\r\n dataToBeRemovalkey = key;\r\n var nodes =angular.element( document.querySelectorAll( '.mdChipsCloseMarkRemoval md-chip' ));\r\n var myEl = nodes[dataToBeRemovalkey];\r\n if(myEl){\r\n if (angular.element(myEl).find('.md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).find('.md-chip-remove-container').addClass('hide');\r\n }\r\n }\r\n }\r\n // end of shipments\r\n }\r\n\r\n\r\n\r\n if(dataToBeRemovalkey !== ''){\r\n\r\n setTimeout(function(){\r\n try{\r\n\r\n var nodes =angular.element( document.querySelectorAll( '.mdChipsCloseMarkRemoval md-chip' ));\r\n var myEl = nodes[dataToBeRemovalkey];\r\n\r\n if(myEl){\r\n\r\n if (angular.element(myEl).find('.md-chip-remove-container')) {\r\n angular.element(myEl).addClass('md-readonly');\r\n angular.element(myEl).find('.md-chip-remove-container').addClass('hide');\r\n }\r\n\r\n }\r\n\r\n var nodes1 =angular.element( document.querySelectorAll( '.mdChipsCloseMarkRemoval1 md-chip' ));\r\n var myEl1 = nodes1[dataToBeRemovalkey];\r\n\r\n if(myEl1){\r\n\r\n if (angular.element(myEl1).find('.md-chip-remove-container')) {\r\n angular.element(myEl1).addClass('md-readonly');\r\n angular.element(myEl1).find('.md-chip-remove-container').addClass('hide');\r\n }\r\n\r\n }\r\n\r\n }\r\n catch(e){\r\n console.warn(\"test\",e)\r\n }\r\n\r\n }, 25);\r\n\r\n }\r\n\r\n });\r\n\r\n }\r\n\r\n function setUrl(){\r\n\r\n var newParams = {};\r\n angular.forEach(Object.keys(currentSearchFields), function(k) {\r\n\r\n // code for between dates invalid issue after refresh\r\n if(currentSearchFields.shipment_ship_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_ship_date_range_to.value = localStorage.getItem('shipbetweendate');\r\n }\r\n\r\n if(currentSearchFields.shipment_expected_delivery_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_expected_delivery_date_range_to.value = localStorage.getItem('expectedbetweendate');\r\n }\r\n\r\n if(currentSearchFields.shipment_delivered_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_delivered_date_range_to.value = localStorage.getItem('deliveredbetweendate');\r\n }\r\n\r\n if(currentSearchFields.shipment_due_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_due_date_range_to.value = localStorage.getItem('duebetweendate');\r\n }\r\n\r\n if(currentSearchFields.shipment_eta_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_eta_date_range_to.value = localStorage.getItem('etabetweendate');\r\n }\r\n if(currentSearchFields.shipment_etd_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_etd_date_range_to.value = localStorage.getItem('etdbetweendate');\r\n }\r\n if (k != 'quick_filter' && currentSearchFields[k].value) {\r\n if (k.includes('_date')){\r\n if (k.includes('shipment_mode')){\r\n delete newParams['business_type_group'];\r\n }\r\n //newParams[k] = $filter(\"date\")(currentSearchFields[k].value, 'yyyy-MM-dd', \"UTC\");\r\n newParams[k] = $filter(\"date\")(currentSearchFields[k].value, 'yyyy-MM-dd');\r\n } else {\r\n if (k.includes('shipment_mode')){\r\n delete newParams['business_type_group'];\r\n }\r\n newParams[k] = currentSearchFields[k].value;\r\n }\r\n }\r\n });\r\n // if (!disableUrlReplacement) {\r\n\r\n var page_number = TrackTracePaginationService.get_page_number();\r\n var per_page = TrackTracePaginationService.get_per_page();\r\n\r\n newParams.page = page_number;\r\n newParams.per_page = per_page;\r\n\r\n $location.search(newParams);\r\n // }\r\n }\r\n\r\n function saveLastSearchLocally(search) {\r\n\r\n\r\n search = search || angular.copy(currentSearchFields);\r\n\r\n var searchShippDueDate=search.shipment_due_date_equal_to.value;\r\n var searchDelDate=search[\"shipment_delivered_date_equal_to\"].value;\r\n var searchDeliveryDate=search.shipment_expected_delivery_date_equal_to.value;\r\n\r\n\r\n if(searchShippDueDate!=\"\"){\r\n var date = new Date(searchShippDueDate).toDateString();\r\n var convDueDate = date.slice(4);\r\n search.shipment_due_date_equal_to.value=convDueDate;\r\n }\r\n if(searchDelDate!=\"\"){\r\n var date = new Date(searchDelDate).toDateString();\r\n var convDelDate = date.slice(4);\r\n search[\"shipment_delivered_date_equal_to\"].value=convDelDate;\r\n\r\n } if(searchDeliveryDate!=\"\"){\r\n var date = new Date(searchDeliveryDate).toDateString();\r\n var conDeliveryDate = date.slice(4);\r\n search.shipment_expected_delivery_date_equal_to.value=conDeliveryDate;\r\n }\r\n\r\n\r\n\r\n //search[\"shipment_delivered_date_equal_to\"].value;\r\n\r\n for (var field in search){\r\n if (field.includes('_date')){\r\n search[field].value = $filter('date')(search[field].value, 'yyyy-MM-dd', \"IST\");\r\n\r\n\r\n /*var search_date=\"Tue Jun 20 2017 00:00:00 GMT+0530 (IST)\";\r\n var date = new Date(search_date).toDateString();\r\n search[field].value = date.slice(4);\r\n */\r\n //var date = new Date((search[field].value)).toDateString();\r\n //search[field].value = date.slice(4);\r\n }\r\n }\r\n\r\n switch($state.current.name) {\r\n\r\n case 'track-trace-booking':\r\n localStorage.setItem(\"lastSearchBooking\", JSON.stringify(search));\r\n break;\r\n\r\n case 'track-trace-transit':\r\n localStorage.setItem(\"lastSearchTransit\", JSON.stringify(search));\r\n break;\r\n\r\n default:\r\n /*search['reference_number'].value=\"\";\r\n search['arrive_date_from'].value=\"\";\r\n search['arrive_date_to'].value=\"\";*/\r\n localStorage.setItem(\"lastSearchTT\", JSON.stringify(search));\r\n\r\n }\r\n\r\n //localStorage.setItem(\"lastSearchTT\", JSON.stringify(search));\r\n\r\n }\r\n\r\n function updateQuery() {\r\n delete query['status'];\r\n for (var prop in currentSearchFields){\r\n\r\n // code for between dates invalid issue after refresh\r\n if(currentSearchFields.shipment_ship_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_ship_date_range_to.value = localStorage.getItem('shipbetweendate');\r\n }\r\n\r\n if(currentSearchFields.shipment_expected_delivery_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_expected_delivery_date_range_to.value = localStorage.getItem('expectedbetweendate');\r\n }\r\n\r\n if(currentSearchFields.shipment_delivered_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_delivered_date_range_to.value = localStorage.getItem('deliveredbetweendate');\r\n }\r\n\r\n if(currentSearchFields.shipment_due_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_due_date_range_to.value = localStorage.getItem('duebetweendate');\r\n }\r\n if(currentSearchFields.shipment_eta_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_eta_date_range_to.value = localStorage.getItem('etabetweendate');\r\n }\r\n if(currentSearchFields.shipment_etd_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentSearchFields.shipment_etd_date_range_to.value = localStorage.getItem('etdbetweendate');\r\n }\r\n\r\n if (query[prop] && (currentSearchFields[prop].value === \"\" ||\r\n (prop === 'quick_filter' && currentSearchFields[prop].value.length === 0))){\r\n if(prop.includes('shipment_mode'))\r\n {\r\n delete query['business_type_group'];\r\n }\r\n delete query[prop];\r\n }\r\n if (currentSearchFields[prop].value != null && ((prop === 'quick_filter' && currentSearchFields[prop].value.length > 0) || (prop !== 'quick_filter' && currentSearchFields[prop].value !== \"\"))) {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n if(prop.includes('shipment_mode'))\r\n delete query['business_type_group'];\r\n query[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n if(prop.includes('shipment_mode'))\r\n delete query['business_type_group'];\r\n query[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return {\r\n clearTimeout: function() { timeoutPromise = false; },\r\n search: function(query){\r\n var search = query ? query : {};\r\n\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value != null && currentSearchFields[prop].value != \"\") {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n search[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n search[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n if (timeoutPromise) timeoutPromise.resolve('newSearch');\r\n timeoutPromise = $q.defer();\r\n saveLastSearchLocally();\r\n // return ServerTableService.setQuery(search, timeoutPromise);\r\n },\r\n\r\n exportSearchFields: function(fields, params){\r\n var search = {};\r\n if (fields && fields.length !== 0){\r\n search.columns = fields.map(function(d){return d.field;});\r\n }\r\n search.columns = search.columns || [];\r\n if (params){\r\n if (params.filter){search.filter = params.filter;}\r\n if (params.sorting){search.sorting = params.sorting;}\r\n }\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value !== \"\" &&\r\n currentSearchFields[prop].value.length != 0) {\r\n if (prop.includes(\"status\")){\r\n if(currentSearchFields[prop].value == 'Delivered'){\r\n currentSearchFields[prop].value = '1';\r\n }else if(currentSearchFields[prop].value == 'Undelivered'){\r\n currentSearchFields[prop].value = '0';\r\n }else if(currentSearchFields[prop].value == \"n/a\"){\r\n currentSearchFields[prop].value = '2';\r\n }else if(currentSearchFields[prop].value == 'booked'){\r\n currentSearchFields[prop].value = '3';\r\n }else{\r\n currentSearchFields[prop].value = currentSearchFields[prop].value;\r\n }\r\n }\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n search[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n search[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n $log.debug(search);\r\n var csv_date = new Date();\r\n var filename = (moment().format('YYYY-MM-DD') + '-Track-Trace-Export.csv');\r\n var params = \"\";\r\n\r\n // if(localStorage.switchEmail){\r\n // params +=\"?userEmail=\"+localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompany);\r\n // }else if(localStorage.userDepartment){\r\n // params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartment)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompany;\r\n // }else if(localStorage.dummyUser){\r\n // params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser);\r\n // }\r\n\r\n\r\n if(localStorage.customerType == 'cww'){\r\n\r\n if(localStorage.switchEmailCwwType){\r\n params +=\"?userEmail=\"+localStorage.switchEmailCwwType+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userCompanyCww){\r\n params +=\"?userCompany=\"+encodeURIComponent(localStorage.userCompanyCww)+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.userDepartmentCww){\r\n params +=\"?userDepartment=\"+encodeURIComponent(localStorage.userDepartmentCww)+\"&departmentCompanyId=\"+localStorage.userDepartmentCompanyCww+\"&customer_type=\"+localStorage.customerType;\r\n }else if(localStorage.dummyUser){\r\n params +=\"?dummyUserEmail=\"+encodeURIComponent(localStorage.dummyUser)+\"&customer_type=\"+localStorage.customerType;\r\n }\r\n\r\n }else{\r\n params +=\"?customer_type=cww\";\r\n }\r\n\r\n var page_number = TrackTracePaginationService.get_page_number();\r\n var per_page = TrackTracePaginationService.get_per_page();\r\n\r\n search.page = page_number;\r\n search.per_page = per_page;\r\n\r\n return DownloadService.postDownloadFile(api.url_v2 + '/search/export'+params, search, filename);\r\n // var promise = $http.post(api.url + '/search/export', search).then(function(res){\r\n // var anchor = angular.element('<a/>');\r\n // // debugger;\r\n // // var FileSaver = require('file-saver');\r\n // var filename = new Blob([res.data], {type: \"text/plain;charset=utf-8\"});\r\n // DownloadService.downloadFile(api.url + '/search/export', search).saveAs(file, (moment().format('YYYY-MM-DD') + '-Track-Trace-Export.csv'));\r\n // saveAs(file);\r\n // anchor.attr({\r\n // href: 'data:attachment/csv;charset=utf-8,'+ encodeURIComponent(res.data),\r\n // target: '_self',\r\n // download: (moment().format('YYYY-MM-DD') + '-Track-Trace-Export.csv')\r\n // })[0].click();\r\n // return res.data;\r\n // });+\"&departmentCompanyId=\"+localStorage.userDepartmentCompany;\r\n // return promise;\r\n },\r\n autocomplete: function(query, extraParamString) {\r\n var theQuery = angular.copy(query);\r\n\r\n // if(localStorage.switchEmail){\r\n // theQuery.userEmail =localStorage.switchEmail;\r\n // }else if(localStorage.userCompany){\r\n // theQuery.userCompany= encodeURIComponent(localStorage.userCompany);\r\n // }else if(localStorage.userDepartment){\r\n // theQuery.userDepartment=encodeURIComponent(localStorage.userDepartment);\r\n // theQuery.departmentCompanyId=localStorage.userDepartmentCompany;\r\n // }\r\n\r\n\r\n if(localStorage.customerType == 'cww'){\r\n if(localStorage.switchEmailCwwType){\r\n theQuery.userEmail =localStorage.switchEmailCwwType;\r\n theQuery.customer_type = localStorage.customerType;\r\n }else if(localStorage.userCompanyCww){\r\n theQuery.userCompany= encodeURIComponent(localStorage.userCompanyCww);\r\n theQuery.customer_type = localStorage.customerType;\r\n }else if(localStorage.userDepartmentCww){\r\n theQuery.userDepartment=encodeURIComponent(localStorage.userDepartmentCww);\r\n theQuery.departmentCompanyId=localStorage.userDepartmentCompanyCww;\r\n theQuery.customer_type = localStorage.customerType;\r\n }\r\n }else{\r\n theQuery.customer_type = 'cww';\r\n }\r\n\r\n if (extraParamString) {\r\n var pairs = extraParamString.split('&');\r\n angular.forEach(pairs, function(p) {\r\n var bits = p.split('=');\r\n theQuery[bits[0]] = bits[1];\r\n });\r\n }\r\n var promise = $http.post(api.url_v2 + '/autocomplete', theQuery).then(function(res){\r\n //if(theQuery.field != \"t_and_t_citycountry\"){\r\n var autocompletes = res.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n // }else{\r\n // var autocompletes = res.data.map(function(d){\r\n // return {\r\n // value: d.value,\r\n // display: d.display\r\n // };\r\n // });\r\n // }\r\n\r\n return autocompletes;\r\n });\r\n return promise;\r\n },\r\n listSavedSearches: listSavedSearches, //list the saved searches\r\n saveDefaultSearch: function(query, name, isDefault) {\r\n\r\n var fields = query ? query : {};\r\n for (var prop in currentSearchFields){\r\n if (currentSearchFields[prop].value !== \"\") {\r\n if (prop.includes(\"_date\")){\r\n /* Convert dates into appropriate format for DB */\r\n fields[prop] = $filter(\"date\")(currentSearchFields[prop].value, 'yyyy-MM-dd', \"UTC\");\r\n } else {\r\n fields[prop] = currentSearchFields[prop].value;\r\n }\r\n }\r\n }\r\n $log.debug(fields);\r\n fields.search_name = name;\r\n fields.default_search = isDefault;\r\n var promise = $http.post(api.url_v2 + '/search/saved', fields).then(function(res){\r\n $log.debug(res);\r\n var emptySearchSave = true;\r\n for (var prop in currentSearchFields){ //see if they saved an empty search\r\n if (res.data[prop] != null) {\r\n emptySearchSave = false;\r\n }\r\n }\r\n if(emptySearchSave) deleteSearch(res.data.id); //delete the search if it is empty\r\n });\r\n return promise;\r\n },\r\n loadSearch: function(id) {\r\n\r\n var promise = $http.get(api.url_v2 + '/search/saved/' + id).then(function(res){\r\n $log.debug(res);\r\n return res;\r\n });\r\n return promise;\r\n },\r\n deleteSearch: deleteSearch,\r\n getIsSavedSearch: function() {\r\n return isSavedSearch;\r\n },\r\n getEmptySearchFields: function() {\r\n return angular.copy(emptySearchFields);\r\n },\r\n getSearch: function(){\r\n\r\n var promise = $http.get(api.url_v2 + '/search').then(function(res){\r\n var data = res.data;\r\n data.business_type_codes.sort(descSort);\r\n business_type_codes = data.business_type_codes;\r\n\r\n data.reason_codes.sort(descSort);\r\n reason_codes = data.reason_codes;\r\n\r\n search_params = data.search_params;\r\n\r\n data.service_level_codes.sort(descSort);\r\n service_level_codes = data.service_level_codes;\r\n\r\n function descSort(a, b) {\r\n return a.description < b.description ? -1 : (a.description > b.description ? 1 : 0);\r\n }\r\n hasLoadedSearchValues = true;\r\n });\r\n return promise;\r\n },\r\n hasLoadedSearchValues: function() {\r\n return hasLoadedSearchValues;\r\n },\r\n getBusinessTypeCodes: function(){\r\n return business_type_codes;\r\n },\r\n getReasonCodes: function(){\r\n return reason_codes;\r\n },\r\n getSearchParams: function(){\r\n return search_params;\r\n },\r\n getChips: function(){\r\n return searchFieldChips;\r\n },\r\n getServiceLevelCodes: function(){\r\n return service_level_codes;\r\n },\r\n getCurrentSearchFields: function() {\r\n return currentSearchFields;\r\n },\r\n getIsFirstSearch: function() {\r\n return isFirstSearch;\r\n },\r\n setIsFirstSearch: function(first) {\r\n isFirstSearch = first;\r\n },\r\n getCurrentSearch: function(){\r\n return query;\r\n },\r\n setCurrentSearchFields: function(searchFields, disableUrlReplacement, advSearch) {\r\n\r\n\r\n\r\n var searchDelDate=searchFields.shipment_delivered_date_equal_to.value;\r\n var searchShippDueDate=searchFields.shipment_due_date_equal_to.value;\r\n var searchDeliveryDate=searchFields.shipment_expected_delivery_date_equal_to.value;\r\n\r\n if(searchShippDueDate!=\"\"){\r\n var date = new Date(searchShippDueDate).toDateString();\r\n var convDueDate = date.slice(4);\r\n searchFields.shipment_due_date_equal_to.value=convDueDate;\r\n\r\n } if(searchDelDate!=\"\"){\r\n var date = new Date(searchDelDate).toDateString();\r\n var convDelDate = date.slice(4);\r\n searchFields.shipment_delivered_date_equal_to.value=convDelDate;\r\n\r\n } if(searchDeliveryDate!=\"\"){\r\n var date = new Date(searchDeliveryDate).toDateString();\r\n var conDeliveryDate = date.slice(4);\r\n searchFields.shipment_expected_delivery_date_equal_to.value=conDeliveryDate;\r\n }\r\n\r\n\r\n for (var field in searchFields){\r\n // if (field === 'quick_filter'){\r\n // currentSearchFields[field].value.length = 0;\r\n // searchFields[field].value.map(function(d) {currentSearchFields[field].value.push(d);});\r\n // } else {\r\n try{\r\n currentSearchFields[field].value = searchFields[field].value;\r\n }\r\n catch(e){}\r\n\r\n //}\r\n }\r\n var search = angular.copy(currentSearchFields);\r\n // for (var field in search){\r\n // if (field.includes('_date')){\r\n\r\n // search[field].value = $filter(\"date\")(search[field].value, 'yyyy-MM-dd', \"UTC\");\r\n // }\r\n // }\r\n saveLastSearchLocally(search);\r\n if (!disableUrlReplacement) {\r\n setUrl();\r\n }\r\n if(!advSearch)\r\n updateQuery();\r\n generateChips();\r\n //setUrl();\r\n\r\n },\r\n setClickedChip: function(chip) {\r\n for (var field in currentSearchFields){\r\n if (field === chip.key){\r\n currentSearchFields[field].focus = true;\r\n }\r\n }\r\n },\r\n removeChip: function(chip) { //remove chip from current searchFields\r\n if (chip.key === 'quick_filter'){\r\n currentSearchFields[chip.key].value = [];\r\n } else if(currentSearchFields[chip.key]) {\r\n currentSearchFields[chip.key].value = \"\";\r\n }\r\n updateQuery();\r\n saveLastSearchLocally();\r\n setUrl();\r\n\r\n },\r\n getSearchFieldsFocus: function() {\r\n return searchFieldsFocus;\r\n },\r\n saveLastSearchLocally: saveLastSearchLocally,\r\n removeCloseMarkInChips:removeCloseMarkInChips,\r\n getLastSearchLocally: function() {\r\n\r\n var booking_status = new Object();\r\n booking_status.status = '';\r\n\r\n var transit_status = new Object();\r\n transit_status.status = '';\r\n\r\n switch($state.current.name) {\r\n\r\n case 'track-trace-booking':\r\n return localStorage.getItem(\"lastSearchBooking\");\r\n break;\r\n\r\n case 'track-trace-transit':\r\n return localStorage.getItem(\"lastSearchTransit\");\r\n break;\r\n\r\n default:\r\n return localStorage.getItem(\"lastSearchTT\");\r\n\r\n }\r\n\r\n }\r\n };\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc directive\r\n * @name focusOn\r\n * @description directive that focuses on an input field based on the model\r\n * @restrict E\r\n */\r\n\r\n/**\r\n * @ngdoc directive\r\n * @name focusOn\r\n * @description directive that focuses on an input field based on the model\r\n */\r\n\r\n \r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .directive('setFocus',function(){\r\n return {\r\n link: function(scope, element, attrs){\r\n element.bind('click',function(){ \r\n setTimeout(function(){\r\n\t\t\t\t\tdocument.getElementById(\"text-field-focus\").focus()\r\n\t\t\t\t},100)\r\n })\r\n }\r\n }\r\n\t});\r\n\r\n})();\r\n\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.cancel\r\n * @description method that cancels the advance search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.search\r\n * @description method that button action for when the user clicks search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.saveToDefault\r\n * @description method that saves the current form to default\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.loadDefault\r\n * @description method that loads the saved default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.clearDefault\r\n * @description method that clears the saved default search\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getReasonCodes\r\n * @description method that returns a list of codes from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getServiceLevels\r\n * @description method that returns a list of service levels from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.getBusinessTypes\r\n * @description method that returns a list of business types from a query\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name AdvSearchController.resetForm\r\n * @description method that resets the advance search form\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.chipClicked\r\n * @description sets the search fields in AdvSearchService based on the chip clicked\r\n * @param {chip} - the chip that was clicked\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceControzller.chipRemoved\r\n * @description removes the search field from advance search and re-runs the query\r\n * @param {chip} - the chip that was removed\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name TrackTraceController.generateChips\r\n * @description generates the chips from the AdvSearchService's currentSearchFields and shows them in the view\r\n * @param {searchFields} - the searchFields to generate the chips from\r\n */\r\n(function() {\r\n 'use strict';\r\n\r\n var multiplepillseperator =\" , \"\r\n\r\n angular\r\n .module('app.trackTrace')\r\n .filter('underscoreless', function () {\r\n return function (input) {\r\n if(input != undefined)\r\n return input.replace(/_/g, ' ');\r\n else\r\n return input;\r\n };\r\n })\r\n .filter('capitalize', function() {\r\n return function(input){\r\n if(input != undefined) {\r\n input = input.toString();\r\n if(input == \"awb bol\") { input = \"awb/bol\";}\r\n\r\n\r\n\r\n var serviceLevel =\r\n { \"HOT\": \"Hot Shot Service\",\r\n \"IPRI\": \"International Priority Service\",\r\n \"NFO\":\"Next Flight Out\",\r\n \"ISTD\": \"International Standard Service\",\r\n \"3DAY\": \"3rd Day\",\r\n \"2DAY\": \"2nd Day\",\r\n \"NDAM\": \"Next Day AM By Commitment Time\",\r\n \"NDPM\": \"Next Day PM By Commitment Time\",\r\n \"2DAM\": \"2nd Day AM By Commitment Time\",\r\n \"2DPM\": \"2nd Day PM By Commitment Time\",\r\n \"ECO\":\"Economy Service\",\r\n \"3DAM\": \"3rd Day AM By Commitment Time\",\r\n \"3DPM\": \"3rd Day PM by Commitment Time\",\r\n \"DEFR\": \"Deferred Service\",\r\n \"TKLD\": \"Truckload Service Level\",\r\n \"LCL\":\"LCL Ocean Freight\",\r\n \"IECO\": \"International Economy Service\",\r\n \"PROJ\": \"Projects Charters\",\r\n \"CSTBKR\": \"Customs Brokerage\",\r\n \"4TH\":\"4th Day Service\",\r\n \"5TH\":\"5th Day Service\",\r\n \"OCN\":\"Ocean Freight\",\r\n \"NDR\":\"Next Day Regular\",\r\n \"INVOICE\": \"Invoice Only\",\r\n \"LOCAL\": \"Local Pick Up and Delivery\"\r\n };\r\n\r\n var reasoncode = { \"OTPACT\" : \"Force Majeure\",\r\n \"OTPAPT\": \"Appointment\",\r\n \"OTPCAO\": \"Cargo Aircraft Only\",\r\n \"OTPCAR\": \"Air/Sea Carrier Failure\",\r\n \"OTPCEC\": \"Civic Event Closures\",\r\n \"OTPCIV\": \"Civil Unrest\",\r\n \"OTPCON\": \"Client Requested Consolidation\",\r\n \"OTPCST\": \"Client Related\",\r\n \"OTPCUS\": \"Customs Delay\",\r\n \"OTPCUT\": \"Shipped After Cut\",\r\n \"OTPDRP\": \"Trailer Dropped/Pending Unload\",\r\n \"OTPGND\": \"Ground Carrier Failure\",\r\n \"OTPHOL\": \"Holiday\",\r\n \"OTPMIS\": \"Misrouted\",\r\n \"OTPMPU\": \"Missed Pickup\",\r\n \"OTPNFO\": \"Next Flight Out\",\r\n \"OTPPCK\": \"Insufficient Packaging of Cargo\",\r\n \"OTPPCON\": \"Port Congestion\",\r\n \"OTPPRO\": \"Procedural Error\",\r\n \"OTPREF\": \"Refused by Consignee\",\r\n \"OTPRRH\": \"Restricted Receiving Hours\",\r\n \"OTPSEC\": \"Security Delay\",\r\n \"OTPUDO\": \"Documentation Delay\",\r\n \"OTPWHS\": \"Warehouse Delay\",\r\n \"OTPWX\":\"Weather Related Delay\" };\r\n\r\n\r\n\r\n\r\n\r\n if(input.indexOf(' ') !== -1){\r\n var inputPieces, i;\r\n\r\n input = input.toLowerCase();\r\n inputPieces = input.split(' ');\r\n\r\n\r\n for(i = 0; i < inputPieces.length; i++){\r\n\r\n if(reasoncode[inputPieces[i].toUpperCase()] ){\r\n if(inputPieces[i] != multiplepillseperator)\r\n {\r\n // + sign will be discared for conversion\r\n inputPieces[i] = reasoncode[inputPieces[i].toUpperCase()];\r\n }\r\n //input = data.split(' ');\r\n }else if(serviceLevel[inputPieces[i].toUpperCase()]){\r\n if(inputPieces[i] != multiplepillseperator)\r\n {\r\n // + sign will be discared for conversion\r\n inputPieces[i] = serviceLevel[inputPieces[i].toUpperCase()];\r\n }\r\n } else if(inputPieces[i] !='is' && inputPieces[i] !='less' && inputPieces[i] !='greater' && inputPieces[i] !='than'){\r\n if(inputPieces[i] !=\"id\"){\r\n inputPieces[i] = capitalizeString(inputPieces[i]);\r\n if(inputPieces[i] ==\"Equal\"){\r\n inputPieces[i+1] +=\" =\";\r\n }\r\n\r\n } else{\r\n inputPieces[i] = inputPieces[i].toUpperCase();\r\n }\r\n\r\n }else{\r\n if(inputPieces[i] =='than'){\r\n inputPieces[i] += (inputPieces[i-1] == \"greater\") ? \" >\" :\" <\" ;\r\n }\r\n }\r\n\r\n\r\n }\r\n\r\n return inputPieces.join(\" \");\r\n }\r\n else {\r\n input = input.toLowerCase();\r\n\r\n\r\n if(reasoncode[input.toUpperCase()]){\r\n input = reasoncode[input.toUpperCase()];\r\n //input = data.split(' ');\r\n }else if(serviceLevel[input.toUpperCase()]){\r\n input = serviceLevel[input.toUpperCase()];\r\n }\r\n\r\n if(input == \"awb/bol\"){\r\n input = input.toUpperCase()+\" #\";\r\n }\r\n\r\n if( input =='ref' || input == 'invoice'|| input == 'consol' || input == 'container'){\r\n input +=\" #\";\r\n }\r\n return capitalizeString(input);\r\n }\r\n }else{\r\n return input;\r\n }\r\n };\r\n function capitalizeString(inputString){\r\n if(inputString == 'n/a'){\r\n inputString = 'N/A';\r\n }\r\n return inputString.substring(0,1).toUpperCase() + inputString.substring(1);\r\n }\r\n })\r\n\r\n .controller('AdvSearchController', AdvSearchController);\r\n\r\n\r\n\r\n /** @ngInject */\r\n AdvSearchController.$inject = ['$rootScope','$state', '$log', 'UserService', 'AdvSearchService', '$translatePartialLoader', '$mdBottomSheet', '$mdDialog', '$mdMedia','$filter', '$scope', '$timeout', '$location', '$q', '$http', 'api', 'permissions', 'ServerTableService', 'TrackTracePaginationService'];\r\n function AdvSearchController($rootScope, $state, $log, UserService, AdvSearchService, $translatePartialLoader, $mdBottomSheet, $mdDialog, $mdMedia, $filter, $scope, $timeout, $location, $q, $http, api, permissions, ServerTableService, TrackTracePaginationService) {\r\n $translatePartialLoader.addPart('tracktrace');\r\n //variables\r\n var vm = this;\r\n var INVALID_DATE = \"Invalid date\";\r\n $scope.addAllBtnShow = false;\r\n vm.modifySearch = false;\r\n\r\n angular.element(document).ready(function () {\r\n if(location.search.includes('advSearch') && $location.search()['advSearch'] === 'true'){\r\n vm.modifySearch = true;\r\n }else{\r\n vm.modifySearch = false;\r\n }\r\n });\r\n\r\n\r\n //set the searchFields to be the current searchFields\r\n vm.searchFields = convertStatusFieldToString(angular.copy(AdvSearchService.getCurrentSearchFields()));\r\n vm.searchText;\r\n vm.selectedItem;\r\n vm.chipSearchFields = AdvSearchService.getChips();\r\n\r\n if (!AdvSearchService.hasLoadedSearchValues()) {\r\n AdvSearchService.getSearch();\r\n }\r\n vm.isSavedSearch = AdvSearchService.getIsSavedSearch();\r\n vm.minDate = \"'\" + (moment().subtract(13, 'months').format('YYYY-MM-DD')) + \"'\";\r\n\r\n // Quarter math\r\n var quarterAdjustment= (moment().month() % 3) + 1;\r\n var lastQuarterEndDate = moment().subtract({ months: quarterAdjustment }).endOf('month');\r\n var lastQuarterStartDate = lastQuarterEndDate.clone().subtract({ months: 2 }).startOf('month');\r\n\r\n //functions\r\n //.attachFocusToAutoComplete = attachFocusToAutoComplete;\r\n vm.autocomplete = autocomplete;\r\n vm.addOneMoreDay = addOneMoreDay;\r\n vm.subtractOneDay = subtractOneDay;\r\n vm.cancel = cancel;\r\n vm.getBusinessTypes = getBusinessTypes;\r\n vm.getReasonCodes = getReasonCodes;\r\n vm.getServiceLevels = getServiceLevels;\r\n vm.resetForm = resetForm;\r\n vm.saveToDefault = saveToDefault;\r\n vm.loadDefault = loadDefault;\r\n vm.clearDefault = clearDefault;\r\n vm.search = search;\r\n vm.selectClear = selectClear;\r\n vm.showAdvSearch = showAdvSearch;\r\n vm.chipClicked = chipClicked;\r\n vm.chipRemoved = chipRemoved;\r\n vm.showListBottomSheet = showListBottomSheet;\r\n vm.resetSearch = resetSearch;\r\n vm.newSearch = newSearch;\r\n vm.dateItemOrNot = dateItemOrNot;\r\n vm.checkrangeOrNot = checkrangeOrNot;\r\n vm.clearFlags = clearFlags;\r\n vm.searchdata = null;\r\n vm.getMatches = getMatches;\r\n vm.searchValue = '';\r\n vm.clearValues = clearValues;\r\n /*Added by Abheesh*/\r\n vm.ttSearch = ttSearch;\r\n vm.advSearch = advSearch;\r\n vm.ttSearchFlag = undefined;\r\n vm.clearSearch = clearSearch;\r\n vm.chipData = [];\r\n vm.chipTempRemoved = chipTempRemoved;\r\n vm.formClick = formClick;\r\n vm.array_unique = array_unique;\r\n vm.hasFinancialPermissions = UserService.canAccess(permissions.shipment.financial);\r\n vm.bookingMode = false;\r\n vm.transitMode = false;\r\n vm.booking_number_quick_search = false;\r\n vm.status_advanced_search = true;\r\n vm.is_consignee_user = UserService.check_consignee_user();\r\n\r\n\r\n var currentFields = AdvSearchService.getCurrentSearchFields();\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n // if(currentFields[field].value == \"Undelivered\"){currentFields[field].value=0;}\r\n // else if(currentFields[field].value == \"Delivered\"){currentFields[field].value=1;}\r\n if(currentFields[field].value !== null && currentFields[field].value != ''){\r\n\r\n if(currentFields[field].field == \"status\"){\r\n\r\n if(currentFields[field].value == '1'){\r\n currentFields[field].value = '1';\r\n }else if(currentFields[field].value == '0'){\r\n currentFields[field].value = '0';\r\n }\r\n else if(currentFields[field].value == '2'){\r\n currentFields[field].value = \"n/a\";\r\n }\r\n else if(currentFields[field].value == '3'){\r\n currentFields[field].value = \"3\";\r\n }\r\n }\r\n vm.chipData.push(currentFields[field]);\r\n\r\n }\r\n }\r\n\r\n callingToRemoveCrossIConInChips(vm.chipSearchFields, 'onload');\r\n\r\n\r\n //vm.mainItems = [\"Shipment\",\"Customer\",\"Shipper\",\"Consignee\"];\r\n\r\n vm.customer = [\"name\", \"group\", \"street_address\", \"zip\", \"phone\", \"party_id\" ];\r\n\r\n\r\n\r\n\r\n\r\n vm.shipment = {\r\n \"status\":\r\n [\"delivered\",\"undelivered\",\"n/a\",\"booked\"],\r\n // \"current_status\":\r\n // [\"ontime\",\"delayed\"],\r\n \"invoice_amount\":\r\n [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n \"gross_weight\":\r\n [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n \"total_pieces\":\r\n [\"is_less_than\",\"is_greater_than\",\"equal_to\",\"range\"],\r\n \"mode\":\r\n [\"sea\",\"air\",\"land\"],\r\n \"is_bookmarked\":\r\n [\"yes\",\"no\"],\r\n \"reason_code\":\r\n [\"OTPACT\",\"OTPAPT\", \"OTPCAO\",\"OTPCAR\", \"OTPCDO\", \"OTPCEC\", \"OTPCIV\", \"OTPCON\", \"OTPCUS\", \"OTPCUT\", \"OTPDRP\", \"OTPGND\", \"OTPHOL\", \"OTPMIS\", \"OTPMPU\", \"OTPNFO\", \"OTPPCK\", \"OTPPCON\",\"OTPPRO\", \"OTPREF\", \"OTPRRH\",\"OTPSEC\",\"OTPUDO\", \"OTPWHS\",\"OTPWX\"],\r\n \"service_level\":\r\n [\"HOT\", \"IPRI\", \"NFO\", \"ISTD\" ,\"3DAY\" ,\"2DAY\" ,\"NDAM\" ,\"NDPM\", \"2DAM\" , \"2DPM\" , \"ECO\", \"3DAM\" , \"3DPM\" , \"DEFR\", \"TKLD\", \"LCL\", \"IECO\", \"PROJ\", \"CSTBKR\", \"4TH\", \"5TH\", \"OCN\", \"NDR\", \"INVOICE\", \"LOCAL\"],\r\n // \"awb\":null,\r\n // \"bol\": null,\r\n \"awb_bol\":null,\r\n //\"invoice\":null,\r\n \"ref\":null,\r\n \"consol\":null,\r\n \"container\":null,\r\n \"delivered_date\": [\"equal_to\",\"range_to\"],\r\n \"ship_date\": [\"equal_to\",\"range_to\"],\r\n \"due_date\": [\"equal_to\",\"range_to\"],\r\n \"expected_delivery_date\":[\"equal_to\",\"range_to\"],\r\n \"origin\":\r\n [\"country\",\"state\",\"city\", \"city_code\"],\r\n \"destination\":\r\n [\"country\", \"state\", \"city\", \"city_code\"],\r\n \"lane_pair\": null,\r\n \"port_of_discharge\": null,\r\n \"port_of_load\": null,\r\n \"eta_date\": [\"equal_to\",\"range_to\"],\r\n \"etd_date\": [\"equal_to\",\"range_to\"],\r\n \"incoterm\": null,\r\n \"vesselname\":null,\r\n \"voyage\":null\r\n };\r\n vm.shipper = [\"name\",\"street_address\",\"state\",\"city\",\"zip\",\"phone\",\"country\",\"party_id\"];\r\n vm.consignee = [\"name\",\"street_address\",\"state\",\"city\",\"zip\",\"phone\",\"country\",\"party_id\"];\r\n\r\n $scope.notSorted = function(obj){\r\n if (!obj) {\r\n return [];\r\n }\r\n return Object.keys(obj);\r\n }\r\n\r\n $scope.checkValue = function(key){\r\n // $scope.selectedSearch = key;\r\n return vm.shipment[key];\r\n }\r\n\r\n\r\n function getMatches(key, searchText){\r\n var query = {field: key, value: searchText}\r\n var dfd = $q.defer();\r\n $http.post(api.url_v2 + '/autocomplete', query).then(function(response){\r\n var autocompletes = response.data.map(function(d){\r\n return {\r\n value: d,\r\n display: d\r\n };\r\n });\r\n return dfd.resolve(response.data);\r\n }, function errorCallback(error){\r\n return dfd.reject(error);\r\n });\r\n return dfd.promise;\r\n }\r\n\r\n var contains = function(needle) {\r\n // Per spec, the way to identify NaN is that it is not equal to itself\r\n var findNaN = needle !== needle;\r\n var indexOf;\r\n\r\n if(!findNaN && typeof Array.prototype.indexOf === 'function') {\r\n indexOf = Array.prototype.indexOf;\r\n } else {\r\n indexOf = function(needle) {\r\n var i = -1, index = -1;\r\n\r\n for(i = 0; i < this.length; i++) {\r\n var item = this[i];\r\n\r\n if((findNaN && item !== item) || item === needle) {\r\n index = i;\r\n break;\r\n }\r\n }\r\n\r\n return index;\r\n };\r\n }\r\n\r\n return indexOf.call(this, needle) > -1;\r\n };\r\n\r\n vm.searchValueFlag = false;\r\n function ttSearch(search){\r\n vm.inputRangeFlag = false;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n vm.textFieldData = undefined;\r\n vm.dateInputFlag =false;\r\n vm.searchValue = '';\r\n vm.nextElem = \"\";\r\n vm.ttserchdata = search;\r\n // vm.thirdChildFlg = 100;\r\n search = search.toLowerCase();\r\n search = search.replace(/_/g, ' ');\r\n vm.ttserchdataNew = search.replace(/mode/g,'business type').replace(/reason code/g,'exception');\r\n search = search.split(\" \");\r\n if('shipment'.includes(search[0])){ vm.ttSearchFlag = 1;vm.nextElem=\"shipment\";}\r\n if('customer'.includes(search[0])){ vm.ttSearchFlag = 2; vm.nextElem=\"customer\";}\r\n if('shipper'.includes(search[0])){ vm.ttSearchFlag = 3; vm.nextElem=\"shipper\";}\r\n if('consignee'.includes(search[0])){ vm.ttSearchFlag = 4;vm.nextElem=\"consignee\";}\r\n\r\n if(search[0] == 'customer'){\r\n vm.ttSearchFlag = 2;\r\n if(search.length > 1){\r\n var index = contains.call(vm.customer, search[1]);\r\n\r\n angular.forEach(vm.customer, function(data,key){\r\n if(data.includes(search[1])){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+ data;\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n if(data !=\"street_address\" && data !='party_id'){\r\n vm.searchValue = search[2];\r\n }else{\r\n //vm.searchValue = search[3];\r\n vm.searchValue =\"\";\r\n for(var i=3; i< search.length; i++){\r\n\r\n vm.searchValue += search[i] + ' ';\r\n }\r\n }\r\n }\r\n });\r\n\r\n\r\n if(index == true){\r\n vm.secondChildFlg = vm.customer.indexOf(search[1]);\r\n\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n // vm.searchValue = search[2];\r\n\r\n\r\n\r\n }else{\r\n if(search.length >2){\r\n var index = contains.call(vm.customer, search[1]+\"_\"+search[2]);\r\n if(index == true){\r\n vm.secondChildFlg = vm.customer.indexOf(search[1]+\"_\"+search[2]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[3];\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n\r\n }else if(search[0] == 'shipment'){\r\n vm.ttSearchFlag = 1;\r\n if(search.length > 1){\r\n var breakFlag = false;\r\n angular.forEach(vm.shipment,function(ship,key){\r\n if(!breakFlag){\r\n\r\n if(key.includes(search[1])){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+key;\r\n breakFlag = true;\r\n if(contains.call(['invoice','ref','consol'], search[1])){\r\n // vm.shipmentOpenInputFlag = false;\r\n\r\n // vm.secondChildElem = key;\r\n\r\n // vm.openInputFlag = true;\r\n // vm.searchValue = search[2];\r\n var temStr= \"amount\";\r\n if(!temStr.includes(search[2]) && search[1] == 'invoice'){\r\n vm.secondChildFlg = 'invoice';\r\n vm.nextElem = search[0]+' invoice';\r\n }\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[2];\r\n vm.thirdChildFlg = 100;\r\n }\r\n\r\n\r\n if(key == 'reason_code' || key =='service_level'){vm.openInputFlag = true;vm.shipmentOpenInputFlag=true;}\r\n if(key == 'lane_pair'){vm.searchValue = search[3];vm.openInputFlag = true;vm.shipmentOpenInputFlag = false;vm.dateInputFlag =false;}\r\n if(key == 'awb_bol'){vm.openInputFlag = true;vm.searchValue = search[3];}\r\n if(key == 'awb' || key == 'bol'){\r\n vm.openInputFlag = true;vm.searchValue = search[2];\r\n vm.secondChildFlg = 'awb_bol';\r\n if(search[1] == 'awb' || search[1] == 'bol'){\r\n vm.nextElem = '';\r\n search[1] = key;\r\n vm.ttserchdata = search[0]+' awb bol';\r\n\r\n }\r\n }\r\n\r\n\r\n if(key == 'expected_delivery_date'){\r\n vm.openInputFlag = true;\r\n vm.searchValue = search[6];\r\n vm.shipmentOpenInputFlag = false;\r\n vm.dateInputFlag = true;\r\n }\r\n\r\n if(key == 'ship_date' || key == 'due_date' || key == 'delivered_date' || key == 'pod_eta' || key == 'eta_date' || key == 'pol_etd' || key == 'etd_date'){\r\n vm.openInputFlag = true;\r\n vm.shipmentOpenInputFlag = false;\r\n vm.dateInputFlag = true;\r\n }\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n if(!breakFlag){\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n\r\n if(!breakFlag){\r\n if((key == search[1]+\"_\"+search[2]) || (key.includes(search[1]))){\r\n vm.nextElem = search[0]+' '+search[1]+' '+key;\r\n vm.secondChildFlg = key;\r\n // if(key == 'lane_pair'){vm.shipmentOpenInputFlag = false;vm.dateInputFlag =false;}\r\n\r\n // if(key == 'reason_code'){vm.openInputFlag = true;vm.searchValue = search[3];}\r\n breakFlag = true;\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n if(breakFlag == false){\r\n\r\n angular.forEach(vm.shipment,function(ship,key){\r\n if(!breakFlag){\r\n if((key == search[1]+\"_\"+search[2]+\"_\"+search[3]) || (key.includes(search[1]))){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+search[2]+' '+key;\r\n breakFlag = true;\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n if(search.length > 2){\r\n\r\n var breakFlag = false;\r\n angular.forEach(vm.shipment[vm.secondChildFlg],function(ship,key){\r\n\r\n if(!breakFlag){\r\n if((ship == search[2]) || (ship.includes(search[2]))){\r\n vm.thirdChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+ship;\r\n // if(ship == 'sea'||ship =='air'||ship=='land'){\r\n vm.shipmentOpenInputFlag = true;\r\n // vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n // vm.searchValue = search[2];\r\n //}\r\n\r\n breakFlag = true;\r\n }else{\r\n vm.thirdChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n\r\n }\r\n\r\n if(search.length > 3){\r\n\r\n var breakFlag = false;\r\n var remainingText=\"\";\r\n var limit = search.length;\r\n if(contains.call(['than','to','range', 'is'], search[search.length-1]) == false){\r\n limit -= 1;\r\n }\r\n var breakRemaining = false;\r\n for(var i=3;i<limit;i++){\r\n if(!breakRemaining){\r\n if(search[i] != 'date'){\r\n remainingText +=search[i];\r\n\r\n if(remainingText == \"range\"){\r\n if(search[i+1] != 'to')\r\n breakRemaining = i;\r\n }else if(i+1 != limit ){remainingText +=\"_\";}\r\n }\r\n }\r\n\r\n }\r\n if(search.length == 4 && limit == 3 && search[1] != 'port'){\r\n remainingText = search[3];\r\n }\r\n if(search.length == 4 && limit == 3 && search[3] == 'load'){\r\n remainingText = search[3];\r\n vm.secondChildFlg = 'port_of_load';\r\n vm.nextElem = search[0]+' '+search[1]+' '+search[2] + ' '+search[3];\r\n\r\n }\r\n if(search.length == 4 && limit == 3 && (search[3] == 'Discharge'|| search[3] == 'discharge')){\r\n remainingText = search[3];\r\n vm.secondChildFlg = 'port_of_discharge';\r\n vm.nextElem = search[0]+' '+search[1]+' '+search[2] + ' '+search[3];\r\n }\r\n\r\n angular.forEach(vm.shipment[vm.secondChildFlg],function(ship,key){\r\n if(remainingText == 'is' && limit < search.length){\r\n remainingText +=\"_\"+search[ search.length-1];\r\n }\r\n if(!breakFlag && !(search.length == 4 && search[2].includes('delivery'))){\r\n if((ship == remainingText) || (ship.includes(remainingText))){\r\n vm.thirdChildFlg = key;\r\n vm.nextElem = search[0]+' '+search[1]+' '+search[2]+' '+ship;\r\n breakFlag = true;\r\n if(contains.call(['ontime','delayed','yes','no'], ship)){\r\n\r\n vm.shipmentOpenInputFlag = true;\r\n vm.openInputFlag = true;\r\n\r\n }\r\n if(contains.call(['is_less_than','is_greater_than','range','equal_to', 'range_to'], remainingText)){\r\n vm.searchValue = search[limit];\r\n vm.thirdChildFlg = key;\r\n if(ship.includes('range')){\r\n vm.inputRangeFlag = true;\r\n //if(breakRemaining == false){breakRemaining = limit;}\r\n vm.searchValue2 = search[breakRemaining+2];\r\n vm.searchValue = search[breakRemaining+1];\r\n }\r\n vm.shipmentOpenInputFlag = false;\r\n vm.openInputFlag = true;\r\n\r\n if(search.length == 6 && search[1] ==\"expected\")\r\n {\r\n //In Shipment -> Expected Delivery date\r\n vm.textFieldData = \"shipment\"+\" \"+search[1]+\"_\"+search[2]+\"_\"+search[3]+\" \"+ remainingText;\r\n }\r\n\r\n else\r\n {\r\n //in Shipment -> Due date, etc\r\n vm.textFieldData = \"shipment\"+\" \"+search[1]+\"_\"+search[2]+\" \"+remainingText;\r\n }\r\n\r\n\r\n // vm.inputRangeFlag = true;\r\n\r\n }\r\n }else{\r\n vm.thirdChildFlg = 1000;\r\n }\r\n }\r\n });\r\n\r\n\r\n }\r\n\r\n\r\n }else if(search[0] == 'shipper'){\r\n vm.ttSearchFlag = 3;\r\n if(search.length > 1){\r\n\r\n var index = contains.call(vm.shipper, search[1]);\r\n\r\n angular.forEach(vm.shipper, function(data,key){\r\n if(data.includes(search[1])){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+ data;\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n if(data !=\"street_address\" && data !='party_id'){\r\n vm.searchValue = search[2];\r\n }else{\r\n vm.searchValue =\"\";\r\n for(var i=3; i<search.length; i++){\r\n vm.searchValue += search[i]+' ';\r\n }\r\n\r\n }\r\n\r\n }\r\n });\r\n\r\n\r\n if(index == true ){\r\n vm.secondChildFlg = vm.shipper.indexOf(search[1]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n\r\n }else{\r\n //vm.secondChildFlg = 1000;\r\n if(search.length >2){\r\n var index = contains.call(vm.shipper, search[1]+\"_\"+search[2]);\r\n if(index == true){\r\n vm.secondChildFlg = vm.shipper.indexOf(search[1]+\"_\"+search[2]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[3];\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }\r\n\r\n }\r\n }else if(search[0] == 'consignee'){\r\n vm.ttSearchFlag = 4;\r\n if(search.length > 1){\r\n var index = contains.call(vm.consignee, search[1]);\r\n\r\n angular.forEach(vm.consignee, function(data,key){\r\n if(data.includes(search[1])){\r\n vm.secondChildFlg = key;\r\n vm.nextElem = search[0]+' '+ data;\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n if(data !=\"street_address\" && data !='party_id'){\r\n vm.searchValue = search[2];\r\n }else{\r\n //vm.searchValue = search[3];\r\n vm.searchValue =\"\";\r\n for(var i=3; i<search.length; i++){\r\n vm.searchValue += search[i] +' ';\r\n }\r\n }\r\n }\r\n });\r\n\r\n if(index == true){\r\n vm.secondChildFlg = vm.consignee.indexOf(search[1]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n //vm.searchValue = search[2];\r\n\r\n }else{\r\n //vm.secondChildFlg = 1000;\r\n if(search.length >2){\r\n var index = contains.call(vm.consignee, search[1]+\"_\"+search[2]);\r\n if(index == true){\r\n vm.secondChildFlg = vm.consignee.indexOf(search[1]+\"_\"+search[2]);\r\n vm.searchValueFlag = true;\r\n vm.secondChildElem = search[1];\r\n vm.openInputFlag = true;\r\n // vm.searchValue = search[3];\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }else{\r\n vm.secondChildFlg = 1000;\r\n vm.searchValueFlag = false;\r\n }\r\n }\r\n\r\n }\r\n }else {\r\n vm.ttSearchFlag = 0;\r\n }\r\n\r\n }\r\n\r\n\r\n angular.element(document).ready(function () {\r\n var el;\r\n angular.forEach(vm.searchFields, function(field){\r\n if (field.focus){\r\n $timeout(function() {\r\n el = angular.element(document.querySelector(\"#\"+field.field));\r\n el.focus();\r\n if(el[0] && el[0].value != null) { //in place becasue mg-datepickers don't have a value\r\n el[0].setSelectionRange(0, el[0].value.length);\r\n }\r\n }, 1000);\r\n }\r\n });\r\n });\r\n\r\n function dateItemOrNot(keyItem){\r\n vm.dateInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n\r\n var index = keyItem.search('date');\r\n if(index>=0){\r\n vm.dateInputFlag = true;\r\n }\r\n }\r\n\r\n\r\n\r\n function checkrangeOrNot(item){\r\n\r\n vm.inputRangeFlag = false;\r\n if(item == 'range'){\r\n vm.inputRangeFlag = true;\r\n }\r\n }\r\n\r\n function clearFlags(flag,searchdata){\r\n vm.nextElem =\"\";\r\n vm.textFieldData = undefined;\r\n vm.openInputFlag = false;\r\n $scope.addAllBtnShow = false;\r\n vm.dateInputFlag = false;\r\n vm.inputRangeFlag = false;\r\n //vm.secondChildFlg = 100;\r\n //vm.ttSearchFlag = undefined;\r\n vm.ttserchdata = undefined;\r\n vm.inputRangeFlag = false;\r\n vm.ttserchdataNew = searchdata;\r\n if(flag && searchdata){\r\n vm.ttSearchFlag = flag;\r\n vm.ttserchdata = searchdata;\r\n }\r\n\r\n\r\n\r\n\r\n }\r\n\r\n function clearValues(flag){\r\n if(flag == 'reason_code' || flag == 'service_level'){\r\n $scope.addAllBtnShow = true;\r\n }else{\r\n $scope.addAllBtnShow = false;\r\n }\r\n vm.searchValue = '';\r\n vm.searchValue2 = '';\r\n\r\n }\r\n\r\n\r\n\r\n function chipClicked(chip) {\r\n $log.debug('chip was clicked ' + chip.display);\r\n AdvSearchService.setClickedChip(chip);\r\n showAdvSearch();\r\n }\r\n\r\n function chipRemoved(chip) {\r\n $log.debug('remove chip ' + chip.title);\r\n AdvSearchService.removeChip(chip);\r\n vm.searchFields[chip.key]['value'] ='';\r\n $rootScope.searchParamStatusVal = ($location.search().status) ? parseInt($location.search().status) : 'none' ;\r\n\r\n //vm.search({});\r\n }\r\n\r\n function chipTempRemoved(chip){\r\n //vm.chipData[chip.key]['value'] ='';\r\n // AdvSearchService.removeChip(chip);\r\n // var temp = convertedFields[field];\r\n // temp.key = convertedFields[field].field;\r\n // temp.searchField = convertedFields[field].value;\r\n // AdvSearchService.removeChip(temp);\r\n vm.searchFields[chip.field]['value'] ='';\r\n }\r\n\r\n // Show the advanced search md-dialog\r\n\r\n function showAdvSearch(ev) {\r\n // var convertedFields = convertStatusFieldToString(angular.copy(AdvSearchService.getCurrentSearchFields()));\r\n // for (var field in convertedFields) { //set the focus to false\r\n // convertedFields[field].focus = false;\r\n // if(convertedFields[field].value !== null && convertedFields[field].value != ''){\r\n\r\n // if(convertedFields[field].field == \"status\"){\r\n\r\n // if(convertedFields[field].value == 1){\r\n // convertedFields[field].value = \"Delivered\";\r\n // }else{\r\n // convertedFields[field].value = \"Undelivered\";\r\n // }\r\n // }\r\n // vm.chipData.push(convertedFields[field]);\r\n // }\r\n // }\r\n var currentFields = AdvSearchService.getCurrentSearchFields();\r\n\r\n if(currentFields.shipment_mode.value != \"\"){\r\n delete currentFields.business_type_group;\r\n }\r\n\r\n // code for between dates invalid issue after refresh\r\n\r\n if(currentFields.shipment_ship_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.shipment_ship_date_range_to.value = localStorage.getItem('shipbetweendate');\r\n }\r\n\r\n if(currentFields.shipment_expected_delivery_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.shipment_expected_delivery_date_range_to.value = localStorage.getItem('expectedbetweendate');\r\n }\r\n\r\n if(currentFields.shipment_delivered_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.shipment_delivered_date_range_to.value = localStorage.getItem('deliveredbetweendate');\r\n }\r\n\r\n if(currentFields.shipment_due_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.shipment_due_date_range_to.value = localStorage.getItem('duebetweendate');\r\n }\r\n if(currentFields.shipment_eta_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.shipment_eta_date_range_to.value = localStorage.getItem('etabetweendate');\r\n }\r\n if(currentFields.shipment_etd_date_range_to.value == \"Invalid Date\")\r\n {\r\n currentFields.shipment_etd_date_range_to.value = localStorage.getItem('etdbetweendate');\r\n }\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n\r\n if(currentFields[field].value !== null && currentFields[field].value != ''){\r\n\r\n if(currentFields[field].field == \"status\"){\r\n\r\n if(currentFields[field].value == '1'){\r\n currentFields[field].value = \"Delivered\";\r\n }else if (currentFields[field].value == '0'){\r\n currentFields[field].value = \"Undelivered\";\r\n }\r\n else if (currentFields[field].value == '2'){\r\n currentFields[field].value = \"n/a\";\r\n }\r\n else if (currentFields[field].value == '3'){\r\n currentFields[field].value = \"booked\";\r\n }\r\n }\r\n\r\n vm.chipData.push(currentFields[field]);\r\n var ids = [];\r\n for( var i in vm.chipData){\r\n\r\n if([\"business_type_group\"].includes(vm.chipData[i].field))\r\n ids = ids.concat(i);\r\n\r\n if([\"shipment_mode\"].includes(vm.chipData[i].field))\r\n for(var j in ids){\r\n\r\n delete vm.chipData[ids[j]];\r\n }\r\n\r\n }\r\n\r\n\r\n // var idx=null,idx2=null, cnt=0\r\n // for( let i in vm.chipData){\r\n // if( [\"business_type_group\",\"shipment_mode\"].includes(vm.chipData[i].field))\r\n // cnt++;\r\n\r\n // if(vm.chipData[i].field == \"business_type_group\")\r\n // {\r\n // var value1 = vm.chipData[i].value;\r\n // idx = i;\r\n // }\r\n // if(vm.chipData[i].field == \"shipment_mode\")\r\n // {\r\n // idx2 = i;\r\n // var value2 = vm.chipData[i].value;\r\n // }\r\n // }\r\n\r\n // if((cnt > 0 && idx2 >0) && idx)\r\n // vm.chipData.splice(idx,1);\r\n\r\n\r\n\r\n\r\n }\r\n }\r\n\r\n var useFullScreen = ($mdMedia('sm') || $mdMedia('xs')) && vm.customFullscreen;\r\n $mdDialog.show({\r\n templateUrl: '/app/advanced-search/adv-search-form.html',\r\n parent: angular.element(document.body),\r\n targetEvent: ev,\r\n clickOutsideToClose:true,\r\n fullscreen: useFullScreen\r\n })\r\n .then(function(answer) {\r\n // var query = AdvSearchService.getCurrentSearchFields();\r\n // //set the pills so they contian the advanced search form\r\n // vm.chipSearchFields = generateChips(query);\r\n // //make the search\r\n // vm.search({});\r\n\r\n\r\n\r\n }, function() {\r\n //canceled the advance search\r\n //set all the focus fields back to false so that the chips are reset for next time one is clicked\r\n var currentFields = AdvSearchService.getCurrentSearchFields();\r\n for (var field in currentFields) {\r\n currentFields[field].focus = false;\r\n // if(currentFields[field].value == \"Undelivered\"){currentFields[field].value=0;}\r\n // else if(currentFields[field].value == \"Delivered\"){currentFields[field].value=1;}\r\n\r\n }\r\n });\r\n\r\n callingToRemoveCrossIConInChips(vm.chipSearchFields, 'onload');\r\n\r\n }\r\n\r\n function resetSearch(){\r\n vm.modifySearch = false;\r\n var params = {}, searchFields = angular.copy(AdvSearchService.getEmptySearchFields());\r\n for (var field in $location.search()){\r\n if (!(field in searchFields)){\r\n params[field] = $location.search()[field];\r\n }\r\n }\r\n $location.search(params);\r\n\r\n if(vm.bookingMode){\r\n searchFields.status.value='3';\r\n }\r\n\r\n if(vm.transitMode){\r\n searchFields.status.value='0';\r\n }\r\n\r\n AdvSearchService.setCurrentSearchFields(searchFields);\r\n //Added by Abheesh\r\n vm.searchFields = searchFields;\r\n angular.element(document.querySelectorAll('.clear-fields')).val('');\r\n }\r\n\r\n function selectClear(e) {\r\n var focused = document.getElementsByClassName('md-input-focused');\r\n angular.element(focused).removeClass('md-input-focused');\r\n }\r\n\r\n function showListBottomSheet() {\r\n $mdBottomSheet.show({\r\n templateUrl: '/app/advanced-search/adv-search-actions.html',\r\n scope: $scope,\r\n preserveScope: true\r\n });\r\n }\r\n\r\n //converts the status field\r\n function convertStatusFieldToString(field) {\r\n switch(field.status.value) {\r\n case '0':\r\n field.status.value = 'Undelivered';\r\n break;\r\n case '1':\r\n field.status.value = 'Delivered';\r\n break;\r\n case '2':\r\n field.status.value = 'n/a';\r\n break;\r\n case '3':\r\n field.status.value = 'booked';\r\n break;\r\n // default:\r\n // field.status.value = '';\r\n }\r\n return field;\r\n }\r\n\r\n //convertst the status field\r\n function convertStatusFieldToInt(field) {\r\n switch(field.status.value) {\r\n case 'Undelivered':\r\n field.status.value = '0';\r\n break;\r\n case 'Delivered':\r\n field.status.value = '1';\r\n break;\r\n case 'n/a':\r\n field.status.value = '2';\r\n break;\r\n case 'booked':\r\n field.status.value = '3';\r\n break;\r\n // default:\r\n // field.status.value = '';\r\n }\r\n return field;\r\n }\r\n\r\n function autocomplete(field1, query, extraParamString){\r\n $log.debug(\"Value: \"+ query);\r\n return AdvSearchService.autocomplete({field:field1, value: query}, extraParamString);\r\n }\r\n //cancels the advance search\r\n function cancel() {\r\n $mdDialog.cancel();\r\n }\r\n\r\n //button action for when the user clicks search\r\n function search() {\r\n if(vm.ttSearchFlag == 2){\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n vm.searchFields[\"customer_\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n\r\n }\r\n var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n for (var field in convertedFields) { //set the focus to false\r\n convertedFields[field].focus = false;\r\n }\r\n AdvSearchService.setCurrentSearchFields(convertedFields);\r\n\r\n //the search is then done in the track and trace controller\r\n $mdDialog.hide();\r\n }\r\n\r\n//Added by Abheesh\r\n function newSearch(isAddAll) {\r\n\r\n // var sel1 = e.target.getAttribute('data-value');\r\n // alert(sel1);\r\n\r\n\r\n vm.nextElem =\"\";\r\n vm.ttserchdataNew = \"\";\r\n if(vm.ttSearchFlag == 1){\r\n if(vm.textFieldData !=undefined){\r\n vm.ttserchdata = vm.textFieldData;\r\n vm.textFieldData = undefined;\r\n }\r\n if(vm.searchValue != undefined){\r\n vm.ttserchdata = vm.ttserchdata+' '+vm.searchValue;\r\n }\r\n\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n if(searchdata[1] == 'consol'){\r\n searchdata[2] = searchdata[2]+' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n if(searchdata[1] == 'ref'){\r\n searchdata[2] = searchdata[2]+' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n if(searchdata[1] == 'incoterm'){\r\n searchdata[2] = searchdata[2]+' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n if(searchdata[1] == 'voyage'){\r\n searchdata[2] = searchdata[2]+' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n if(searchdata[1] == 'vesselname'){\r\n searchdata[2] = searchdata[2]+' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n if(searchdata[1] == 'port_of_load'){\r\n searchdata[2] = searchdata[2]+' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n if(searchdata[1] == 'port_of_discharge'){\r\n searchdata[2] = searchdata[2]+' '+searchdata[3];\r\n searchdata[3] = \"\";\r\n }\r\n var value1 = vm.searchValue;\r\n var value2 = vm.searchValue2;\r\n if(vm.dateInputFlag){\r\n\r\n for(var key in vm.searchFields)\r\n\r\n if(searchdata[0].toLowerCase()==\"shipment\" &&\r\n (\r\n (searchdata[1].toLowerCase() ==\"delivered_date\" && key.includes(\"shipment_delivered_date\"))\r\n || (key.includes(\"shipment_ship_date\") && searchdata[1].toLowerCase() ==\"ship_date\" )\r\n || (key.includes(\"shipment_due_date\") && searchdata[1].toLowerCase() ==\"due_date\" )\r\n || (key.includes(\"shipment_expected_delivery_date\") && searchdata[1].toLowerCase() ==\"expected_delivery_date\")\r\n || (key.includes(\"shipment_eta_date\") && searchdata[1].toLowerCase() ==\"eta_date\" )\r\n || (key.includes(\"shipment_etd_date\") && searchdata[1].toLowerCase() ==\"etd_date\" )\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\"\r\n }\r\n\r\n if(vm.shipment[vm.secondChildFlg][vm.thirdChildFlg] == 'range_to'){\r\n var date2 =' '+vm.searchValue2;\r\n date2 = date2.split(\" \");\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[4]+' '+searchdata[5]+' '+searchdata[6] + ' and '\r\n + date2[2] +' '+date2[3]+' '+date2[4];\r\n }else{\r\n\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[4]+' '+searchdata[5]+' '+searchdata[6];\r\n\r\n //searchdata[4]+' '+searchdata[5]+' '+searchdata[6]\r\n }\r\n\r\n\r\n\r\n }else if(vm.inputRangeFlag){\r\n\r\n for(var key in vm.searchFields)\r\n\r\n if(searchdata[0].toLowerCase() == \"shipment\" &&\r\n (\r\n (key.includes(\"shipment_invoice_amount\") && searchdata[1].toLowerCase() == \"invoice_amount\") ||\r\n (key.includes(\"shipment_gross_weight\") && searchdata[1].toLowerCase() == \"gross_weight\") ||\r\n (key.includes(\"shipment_total_pieces\") && searchdata[1].toLowerCase() == \"total_pieces\")\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\"\r\n }\r\n\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue +' - '+vm.searchValue2;\r\n }\r\n else if(searchdata.length == 3 || (searchdata.length == 4 && searchdata[3]==\"\") ){\r\n // vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = searchdata[2];\r\n if(vm.searchValue != ''){\r\n if(vm.thirdChildFlg == 100)\r\n {\r\n if(vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"].length > 0 && !vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"].split(\" , \").includes(vm.searchValue)\r\n &&\r\n (searchdata[1]==\"ref\" || searchdata[1]==\"consol\" || searchdata[1]==\"invoice\" || searchdata[1]==\"lane_pair\" || searchdata[1]==\"awb_bol\" || searchdata[1]==\"container\"\r\n || searchdata[1]==\"vesselname\" || searchdata[1]==\"voyage\" || searchdata[1]==\"incoterm\" || searchdata[1]==\"port_of_load\" || searchdata[1]==\"port_of_discharge\"))\r\n {\r\n //add multiple values to the chip\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] =vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"]+ multiplepillseperator + vm.searchValue;\r\n }\r\n else if(vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"].length == 0)\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n }\r\n\r\n }\r\n else\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue;\r\n\r\n }else{\r\n if(searchdata[1] == \"status\"){\r\n //var displaycontent = (searchdata[2] == 'delivered' ) ? '1' : '0';\r\n\r\n if(searchdata[2] == 'delivered'){\r\n var displaycontent = '1';\r\n }\r\n else if(searchdata[2] == 'undelivered'){\r\n var displaycontent = '0';\r\n }\r\n else if(searchdata[2] == 'n/a'){\r\n var displaycontent = '2';\r\n }\r\n else if(searchdata[2] == 'booked'){\r\n var displaycontent = '3';\r\n }\r\n vm.searchFields[\"status\"][\"value\"] = displaycontent;\r\n }else{\r\n\r\n if(isAddAll && (searchdata[1]==\"reason_code\" || searchdata[1]==\"service_level\")){\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = \"all\";\r\n }\r\n else if(vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"].length>0 && (searchdata[1]==\"mode\"\r\n || searchdata[1]==\"reason_code\" || searchdata[1]==\"service_level\"))\r\n {\r\n //adding multiple chips in shipment - mode tab\r\n if(vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] != 'all')\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] + multiplepillseperator + searchdata[2];\r\n else\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = searchdata[2];\r\n }\r\n else\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = searchdata[2];\r\n }\r\n\r\n }\r\n\r\n }\r\n }else{\r\n //vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[3];\r\n if(vm.searchValue != ''){\r\n if(vm.thirdChildFlg == 100)\r\n {\r\n if(searchdata.length == 4 || (searchdata.length == 5 && searchdata[4]==\"\"))\r\n {\r\n //for shipment -> AWB\r\n if(vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"].length>0 && (searchdata[1]==\"awb\"\r\n && searchdata[2]==\"bol\"))\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] + multiplepillseperator + vm.searchValue;\r\n }\r\n else\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue;\r\n }\r\n }\r\n else\r\n {\r\n vm.searchFields[\"shipment_\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n }\r\n\r\n }\r\n else{\r\n for(var key in vm.searchFields)\r\n\r\n if(searchdata[0].toLowerCase() == \"shipment\" &&\r\n (\r\n (key.includes(\"shipment_invoice_amount\") && searchdata[1].toLowerCase() == \"invoice_amount\")\r\n || (key.includes(\"shipment_gross_weight\") && searchdata[1].toLowerCase() == \"gross_weight\")\r\n || (key.includes(\"shipment_total_pieces\") && searchdata[1].toLowerCase() == \"total_pieces\")\r\n )\r\n ){\r\n //this is to remove the chips which is adding up instead of replcement\r\n vm.searchFields[key].value = \"\"\r\n }\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue;\r\n }\r\n\r\n }\r\n // vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue;\r\n else\r\n vm.searchFields[\"shipment_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = searchdata[3];\r\n }\r\n vm.searchValue = \"\";\r\n vm.searchValue2 = \"\";\r\n vm.ttserchdata = \"\";\r\n\r\n }else if(vm.ttSearchFlag == 2){\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n if(searchdata[1] == 'party' || searchdata[1] == 'street'){\r\n vm.searchFields[\"customer_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue;\r\n }else{\r\n vm.searchFields[\"customer_\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n }\r\n\r\n\r\n }else if(vm.ttSearchFlag == 3){\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n //vm.searchFields[\"shipper_\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n if(searchdata[1] == 'party' || searchdata[1] == 'street'){\r\n vm.searchFields[\"shipper_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue;\r\n }else{\r\n vm.searchFields[\"shipper_\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n }\r\n\r\n }else if(vm.ttSearchFlag == 4){\r\n var searchdata = vm.ttserchdata.split(\" \");\r\n //vm.searchFields[\"consignee_\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n if(searchdata[1] == 'party' || searchdata[1] == 'street'){\r\n vm.searchFields[\"consignee_\"+searchdata[1]+\"_\"+searchdata[2]][\"value\"] = vm.searchValue;\r\n }else{\r\n vm.searchFields[\"consignee_\"+searchdata[1]][\"value\"] = vm.searchValue;\r\n }\r\n\r\n }\r\n // var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n\r\n var convertedFields = vm.searchFields;\r\n vm.chipData = [];\r\n for (var field in convertedFields) { //set the focus to false\r\n convertedFields[field].focus = false;\r\n if((convertedFields[field].value !== null && convertedFields[field].value != '' && !convertedFields[field].value.toString().includes('undefined'))){\r\n\r\n if(convertedFields[field].field == \"status\"){\r\n\r\n if(convertedFields[field].value == '1'){\r\n convertedFields[field].value = \"Delivered\";\r\n }else if(convertedFields[field].value == '0'){\r\n convertedFields[field].value = \"Undelivered\";\r\n }\r\n else if(convertedFields[field].value == '2'){\r\n convertedFields[field].value = \"n/a\";\r\n }\r\n else if(convertedFields[field].value == '3'){\r\n convertedFields[field].value = \"booked\";\r\n }\r\n }\r\n\r\n vm.chipData.push(convertedFields[field]);\r\n\r\n //added by chaitanya for removal of multiple pills\r\n\r\n var idx=null,idx2=null, cnt=0\r\n for( var i in vm.chipData){\r\n\r\n if( [\"shipment_reason_code\"].includes(vm.chipData[i].field)){\r\n var myArrayRC = vm.chipData[i].value.split(' , ');\r\n var uniqueRC = array_unique(myArrayRC);\r\n var fnalvalueRC = uniqueRC.join(' , ');\r\n vm.chipData[i].value = fnalvalueRC.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_service_level\"].includes(vm.chipData[i].field)){\r\n var myArraySL = vm.chipData[i].value.split(' , ');\r\n var uniqueSL = array_unique(myArraySL);\r\n var fnalvalueSL = uniqueSL.join(' , ');\r\n vm.chipData[i].value = fnalvalueSL.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_awb_bol\"].includes(vm.chipData[i].field)){\r\n var myArrayAW = vm.chipData[i].value.split(' , ');\r\n var uniqueAW = array_unique(myArrayAW);\r\n var fnalvalueAW = uniqueAW.join(' , ');\r\n vm.chipData[i].value = fnalvalueAW.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_vesselname\"].includes(vm.chipData[i].field)){\r\n var myArrayAW = vm.chipData[i].value.split(' , ');\r\n var uniqueAW = array_unique(myArrayAW);\r\n var fnalvalueAW = uniqueAW.join(' , ');\r\n vm.chipData[i].value = fnalvalueAW.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_voyage\"].includes(vm.chipData[i].field)){\r\n var myArrayAW = vm.chipData[i].value.split(' , ');\r\n var uniqueAW = array_unique(myArrayAW);\r\n var fnalvalueAW = uniqueAW.join(' , ');\r\n vm.chipData[i].value = fnalvalueAW.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_incoterm\"].includes(vm.chipData[i].field)){\r\n var myArrayAW = vm.chipData[i].value.split(' , ');\r\n var uniqueAW = array_unique(myArrayAW);\r\n var fnalvalueAW = uniqueAW.join(' , ');\r\n vm.chipData[i].value = fnalvalueAW.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_port_of_load\"].includes(vm.chipData[i].field)){\r\n var myArrayAW = vm.chipData[i].value.split(' , ');\r\n var uniqueAW = array_unique(myArrayAW);\r\n var fnalvalueAW = uniqueAW.join(' , ');\r\n vm.chipData[i].value = fnalvalueAW.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"shipment_port_of_discharge\"].includes(vm.chipData[i].field)){\r\n var myArrayAW = vm.chipData[i].value.split(' , ');\r\n var uniqueAW = array_unique(myArrayAW);\r\n var fnalvalueAW = uniqueAW.join(' , ');\r\n vm.chipData[i].value = fnalvalueAW.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if( [\"business_type_group\",\"shipment_mode\"].includes(vm.chipData[i].field))\r\n cnt++;\r\n\r\n if(vm.chipData[i].field == \"business_type_group\")\r\n {\r\n var value1 = vm.chipData[i].value;\r\n idx = i;\r\n }\r\n else\r\n {\r\n var value1 = \"\";\r\n }\r\n if(vm.chipData[i].field == \"shipment_mode\")\r\n {\r\n idx2 = i;\r\n var value2 = vm.chipData[i].value;\r\n }\r\n else\r\n {\r\n var value2 = \"\";\r\n }\r\n }\r\n if(value1 && value2){\r\n //if(value1 != value2)\r\n var myArray = value2.split(' , ').concat(value1);\r\n var unique = array_unique(myArray);\r\n var fnalvalue = unique.join(' , ');\r\n vm.chipData[idx2].value = fnalvalue.replace(/,\\s*$/, \"\").trim();\r\n }\r\n if(value2){\r\n var myArray = value2.split(' , ').concat(value1);\r\n var unique = array_unique(myArray);\r\n var fnalvalue = unique.join(' , ');\r\n vm.chipData[idx2].value = fnalvalue.replace(/,\\s*$/, \"\").trim();\r\n }\r\n\r\n if((cnt > 0 && idx2 >0) && idx){\r\n vm.chipData.splice(idx,1);\r\n }\r\n\r\n }\r\n }\r\n\r\n callingToRemoveCrossIConInChips(vm.chipData, 'popup');\r\n\r\n }\r\n\r\n function array_unique(arr) {\r\n var result = [];\r\n for (var i = 0; i < arr.length; i++) {\r\n if (result.indexOf(arr[i]) == -1) {\r\n result.push(arr[i]);\r\n }\r\n }\r\n return result;\r\n }\r\n\r\n function clearSearch(){\r\n vm.chipData = [];\r\n /*\r\n vm.bookingMode = true;\r\n vm.transitMode = false;\r\n */\r\n\r\n if(vm.bookingMode){\r\n vm.chipData.push({field: \"status\", value: \"booked\", display: \"TRACKTRACE.STATUS\", displayValue: true, focus: false});\r\n }\r\n\r\n if(vm.transitMode){\r\n vm.chipData.push({field: \"status\", value: \"Undelivered\", display: \"TRACKTRACE.STATUS\", displayValue: true, focus: false});\r\n }\r\n\r\n callingToRemoveCrossIConInChips(vm.chipData, 'popup');\r\n\r\n }\r\n\r\n function advSearch(event){\r\n var convertedFields = vm.searchFields;\r\n for (var field in convertedFields) { //set the focus to false\r\n if(convertedFields[field].value == \"Delivered\"){\r\n convertedFields[field].value = '1';\r\n }else if(convertedFields[field].value == \"Undelivered\"){\r\n convertedFields[field].value = '0';\r\n }else if(convertedFields[field].value == \"n/a\"){\r\n convertedFields[field].value = '2';\r\n }\r\n else if(convertedFields[field].value == \"booked\"){\r\n convertedFields[field].value = '3';\r\n }\r\n else if(convertedFields[field].value.toString().includes('undefined')){\r\n convertedFields[field].value = \"\";\r\n // var temp = {\r\n // display: \"Invoice amount =\",displayValue:true,key:\"shipment_invoice_amount_is_equal_to\",\r\n // searchField:\"1478\"\r\n // }\r\n // AdvSearchService.removeChip(convertedFields[field]);\r\n\r\n }\r\n\r\n\r\n // if(vm.chipData[field].value){\r\n // convertedFields[field].value = vm.chipData[field].value;\r\n // }\r\n\r\n convertedFields[field].focus = false;\r\n\r\n\r\n }\r\n AdvSearchService.setCurrentSearchFields(convertedFields);\r\n if(event.target.id != \"btnSearch\" || event.target.id != \"spSearch\" ) {\r\n $rootScope.searchParamStatusVal = ($location.search().status) ? parseInt($location.search().status) : 'none' ;\r\n $mdDialog.cancel();\r\n }\r\n else {\r\n angular.element(document.querySelector('#AdvSearch')).focus();\r\n }\r\n\r\n TrackTracePaginationService.save_page_number(1);\r\n TrackTracePaginationService.save_per_page(10);\r\n\r\n vm.tableParams = ServerTableService.getTable();\r\n\r\n vm.tableParams.page(TrackTracePaginationService.get_page_number());\r\n vm.tableParams.count(TrackTracePaginationService.get_per_page());\r\n vm.tableParams.reload();\r\n\r\n }\r\n\r\n\r\n\r\n //saves the current form to default\r\n function saveToDefault() {\r\n vm.clearDefault(); //clear the old one so we can save a new one\r\n $log.debug(\"saved to default\");\r\n var convertedFields = convertStatusFieldToInt(vm.searchFields);\r\n AdvSearchService.setCurrentSearchFields(convertedFields);\r\n if(convertedFields.status.field == \"status\"){\r\n if(convertedFields.status.value == '1'){\r\n convertedFields.status.value = \"Delivered\";\r\n }else if(convertedFields.status.value == '0'){\r\n convertedFields.status.value = \"Undelivered\";\r\n }\r\n else if(convertedFields.status.value == '2'){\r\n convertedFields.status.value = \"Not Available\";\r\n }\r\n else if(convertedFields.status.value == '3'){\r\n convertedFields.status.value = \"Booked\";\r\n }\r\n }\r\n for(i in vm.chipData){\r\n if([\"status\"].includes(vm.chipData[i].field)){\r\n if(vm.chipData[i].value == '1'){\r\n vm.chipData[i].value = \"Delivered\";\r\n }else if(vm.chipData[i].value == '0'){\r\n vm.chipData[i].value = \"Undelivered\";\r\n }\r\n else if(vm.chipData[i].value == '2'){\r\n vm.chipData[i].value = \"Not Available\";\r\n }\r\n else if(vm.chipData[i].value == '3'){\r\n vm.chipData[i].value = \"Booked\";\r\n }\r\n }\r\n }\r\n AdvSearchService.saveDefaultSearch({}, 'testDefault', true).then(function() {\r\n AdvSearchService.listSavedSearches().then(function(res){\r\n vm.isSavedSearch = res['data'].length > 0;\r\n localStorage.setItem('clearadvancedsearch', 'false')\r\n });\r\n });\r\n }\r\n\r\n function loadDefault() {\r\n AdvSearchService.listSavedSearches().then(function(res){\r\n var isSavedSearch = res['data'].length > 0;\r\n if(isSavedSearch) {\r\n AdvSearchService.loadSearch((res['data'])['0'].id).then(function(res) {\r\n var searchFields = AdvSearchService.getCurrentSearchFields();\r\n var data = res['data'];\r\n vm.chipData = []\r\n if(data.shipment_mode != \"\" && data.business_type_group != \"\"){\r\n data.business_type_group = \"\"\r\n }\r\n for (var field in searchFields) {\r\n if(data[field] != null) {\r\n if (field.includes(\"date\") && !data[field].includes(\"and\")){\r\n searchFields[field].value = new Date(data[field]);\r\n } else {\r\n searchFields[field].value = data[field];\r\n }\r\n } else {\r\n searchFields[field].value = \"\";\r\n }\r\n if (searchFields[field].value != \"\"){\r\n if (searchFields[field].field == 'status'){\r\n switch (searchFields[field].value){\r\n case '0' :\r\n searchFields[field].value = 'Undelivered'\r\n break;\r\n case '1' :\r\n searchFields[field].value = 'Delivered'\r\n break;\r\n case '2' :\r\n searchFields[field].value = 'Not Available'\r\n break;\r\n case '3' :\r\n searchFields[field].value = 'Booked'\r\n break;\r\n }\r\n }\r\n vm.chipData.push(searchFields[field])\r\n }\r\n }\r\n vm.searchFields = searchFields;\r\n vm.searchFields;\r\n localStorage.setItem('clearadvancedsearch', 'false')\r\n });\r\n }\r\n });\r\n }\r\n\r\n function clearDefault() {\r\n //use list to get the correct id to delete\r\n AdvSearchService.listSavedSearches().then(function(res){\r\n if(res['data'].length > 0) { //if there is one to delete\r\n //delete the saved search with the id\r\n AdvSearchService.deleteSearch((res['data'])['0'].id).then(function(res) {\r\n //update if there is any saved searches\r\n AdvSearchService.listSavedSearches().then(function(res){\r\n vm.isSavedSearch = res['data'].length > 0;\r\n //vm.resetForm();\r\n });\r\n });\r\n }\r\n });\r\n }\r\n\r\n function resetForm() {\r\n var emptySearchFields = angular.copy(AdvSearchService.getEmptySearchFields());\r\n for (var field in emptySearchFields){\r\n vm.searchFields[field].value = emptySearchFields[field].value;\r\n }\r\n }\r\n\r\n //returns a list of the reason codes from the database\r\n function getReasonCodes() {\r\n //TODO: change this to return results from a query\r\n return AdvSearchService.getReasonCodes();\r\n }\r\n\r\n //returns a list of the service levels from the database\r\n function getServiceLevels() {\r\n //TODO: change this to return results from a query\r\n return AdvSearchService.getServiceLevelCodes();\r\n }\r\n\r\n function getBusinessTypes() {\r\n return AdvSearchService.getBusinessTypeCodes();\r\n }\r\n\r\n function formClick(event) {\r\n event.preventDefault();\r\n if (vm.openInputFlag) // if input is availble enter click is handled for add btn\r\n {\r\n newSearch();\r\n clearFlags();\r\n angular.element(document.querySelector('#AdvSearch')).focus();\r\n } else {\r\n advSearch(event);\r\n }\r\n }\r\n\r\n\r\n function addOneMoreDay(selectedDate){\r\n $scope.dateMin = moment(selectedDate).add(1,'days');\r\n }\r\n\r\n function subtractOneDay(selectedDate){\r\n $scope.dateMax = moment(selectedDate).subtract(1,'days');\r\n }\r\n\r\n\r\n function callingToRemoveCrossIConInChips(data, page){\r\n\r\n switch ($state.current.name){\r\n\r\n case 'track-trace-booking' :\r\n\r\n vm.bookingMode = true;\r\n vm.transitMode = false;\r\n vm.heading_text = \"Booking\";\r\n vm.booking_number_quick_search = true;\r\n vm.status_advanced_search = false;\r\n vm.searchType = 'booking_number';\r\n AdvSearchService.removeCloseMarkInChips(data, page);\r\n\r\n break;\r\n\r\n case 'track-trace-transit' :\r\n\r\n vm.bookingMode = false;\r\n vm.transitMode = true;\r\n vm.status_advanced_search = false;\r\n vm.heading_text = \"In_Transit\";\r\n AdvSearchService.removeCloseMarkInChips(data, page);\r\n\r\n break;\r\n\r\n default:\r\n vm.bookingMode = false;\r\n vm.transitMode = false;\r\n vm.heading_text = \"Track & Trace\";\r\n AdvSearchService.removeCloseMarkInChips(data, page);\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('supportRequestCompanyDetailsController', supportRequestCompanyDetailsController);\r\n\r\n\r\n supportRequestCompanyDetailsController.$inject = [\"$rootScope\", \"$translate\", \"$translatePartialLoader\", \"$window\", \"$scope\", \"$q\", \"$http\", \"api\", \"downloadLink\", \"$location\", 'NgTableParams', \"$log\", '$state', '$stateParams', '$mdToast', '$mdConstant', 'mdSelectHelper', '$mdMedia', '$mdDialog', '$timeout'];\r\n function supportRequestCompanyDetailsController($rootScope, $translate, $translatePartialLoader, $window, $scope,$q, $http, api, downloadLink, $location, NgTableParams, $log, $state, $stateParams, $mdToast, $mdConstant, mdSelectHelper, $mdMedia, $mdDialog, $timeout) {\r\n\r\n var vm = this;\r\n\r\n vm.loadingCompanyData = false;\r\n\r\n\r\n \r\n\r\n\r\n\r\n\r\n }\r\n}) ();\r\n\n/**\r\n * @ngdoc module\r\n * @name AdminService\r\n *\r\n * @description \r\n * The adminService module provides a user by communicating with the Rails API\r\n *\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .service('AdminService', AdminService);\r\n\r\n /** @ngInject */\r\n function AdminService(/** $resource */) {\r\n var user = {\r\n first_name: \"Noah\",\r\n last_name: \"Bragg\",\r\n user_name: \"nbragg@gmail.com\",\r\n password: \"password\",\r\n role: \"Admin\"\r\n };\r\n \r\n var newUserInfo = {\r\n first_name: \"\",\r\n last_name: \"\",\r\n display_name: \"\",\r\n email_address: \"\",\r\n crane_poc: \"\",\r\n user_group: \"\",\r\n phone: \"\"\r\n };\r\n\r\n return {\r\n /** \r\n * \r\n * @name AdminService\r\n * getUserData() calls the API and returns the current user\r\n * @constructor\r\n */\r\n getAdminData: function() {\r\n return user; // $resource('/api/user/:id');\r\n },\r\n getNewUserInfo: function() {\r\n return newUserInfo;\r\n },\r\n postUserData: function() {\r\n \r\n }\r\n };\r\n\r\n }\r\n})();\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .config(routerConfig);\r\n //.run(runFunction);\r\n //\r\n //\r\n //function runFunction($location,CompanyManagementService){\r\n // var path = $location.path();\r\n // if(path.includes('lensgroups/')) {\r\n // CompanyManagementService.companyRouteChanged(true);\r\n //\r\n //}\r\n\r\n /* @ngInject */\r\n function routerConfig($stateProvider, menuGroups, permissions) {\r\n $stateProvider\r\n // .state('createUser', {\r\n // url: '/create-user',\r\n // templateUrl: '/app/admin/create-account/create-user.html',\r\n // controller: 'AdminController',\r\n // controllerAs: 'adminCtrl',\r\n // title: 'Create User',\r\n // data: {\r\n // requireLogin: true,\r\n // menuGroup: menuGroups.admin.user\r\n // }\r\n // })\r\n .state('editAccount', {\r\n url: '/edit-account',\r\n templateUrl: '/app/admin/edit-account/admin-edit-account.html',\r\n controller: 'AdminController',\r\n controllerAs: 'adminCtrl',\r\n title: 'Edit Account',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n .state('shipmentDiscussions', {\r\n url: '/shipment-discussions',\r\n templateUrl: '/app/admin/discussion-shipments/discussion-shipments.html',\r\n controller: 'DiscussionShipmentsController',\r\n controllerAs: 'vm',\r\n title: 'Shipment Discussions',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceDiscussion\r\n }\r\n })\r\n .state('shipmentDiscussionsCsl', {\r\n url: '/shipment-discussions-csl',\r\n templateUrl: '/app/admin/discussion-shipments-csl/discussion-shipments.html',\r\n controller: 'DiscussionShipmentsCslController',\r\n controllerAs: 'vm',\r\n title: 'Shipment Discussions',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceDiscussionCsl\r\n }\r\n })\r\n .state('shipmentDiscussionsCfs', {\r\n url: '/shipment-discussions-cfs',\r\n templateUrl: '/app/admin/discussion-shipments-cfs/discussion-shipments.html',\r\n controller: 'DiscussionShipmentsCfsController',\r\n controllerAs: 'vm',\r\n title: 'Shipment Discussions',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.trackAndTraceDiscussionCfs\r\n }\r\n })\r\n .state('cslExceptions', {\r\n url: '/csl-exceptions',\r\n templateUrl: '/app/admin/exceptions-csl/exceptions-csl.html',\r\n controller: 'ExceptionsCslController',\r\n controllerAs: 'vm',\r\n title: 'CSL Exceptions',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.cslException\r\n }\r\n })\r\n .state('cfsExceptions', {\r\n url: '/cfs-exceptions',\r\n templateUrl: '/app/admin/exceptions-cfs/exceptions-cfs.html',\r\n controller: 'ExceptionsCfsController',\r\n controllerAs: 'vm',\r\n title: 'CFS Exceptions',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.cfsException\r\n }\r\n })\r\n .state('cmtsExceptions', {\r\n url: '/cmts-exceptions',\r\n templateUrl: '/app/admin/exceptions-cmts/exceptions-cmts.html',\r\n controller: 'ExceptionsCmtsController',\r\n controllerAs: 'vm',\r\n title: 'CMTS Exceptions',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.cmtsException\r\n }\r\n })\r\n .state('vieCSLExceptions', {\r\n url: '/csl-exceptions/:id',\r\n templateUrl: '/app/admin/exceptions-csl/view-csl-exceptions.html',\r\n controller: 'ExceptionsCslController',\r\n controllerAs: 'vm',\r\n title: 'View CSL Exception',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.cslException\r\n }\r\n })\r\n .state('vieCFSExceptions', {\r\n url: '/cfs-exceptions/:id',\r\n templateUrl: '/app/admin/exceptions-cfs/view-cfs-exceptions.html',\r\n controller: 'ExceptionsCfsController',\r\n controllerAs: 'vm',\r\n title: 'View CFS Exception',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.cfsException\r\n }\r\n })\r\n .state('vieCMTSExceptions', {\r\n url: '/cmts-exceptions/:id',\r\n templateUrl: '/app/admin/exceptions-cmts/view-cmts-exceptions.html',\r\n controller: 'ExceptionsCmtsController',\r\n controllerAs: 'vm',\r\n title: 'View CMTS Exception',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.cmtsException\r\n }\r\n })\r\n .state('potentialExceptions', {\r\n url: '/potential-exceptions',\r\n templateUrl: '/app/admin/potential-exceptions/potential-exceptions.html',\r\n controller: 'PotentialExceptionsController',\r\n controllerAs: 'vm',\r\n title: 'Potential Exceptions',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.potentialExceptions.read+\",\"+permissions.potentialExceptions.reader+\",\"+permissions.potentialExceptions.publish,\r\n menuGroup: menuGroups.admin.potentialExceptions\r\n }\r\n })\r\n .state('createPotentialExceptions', {\r\n url: '/potential-exceptions/new',\r\n templateUrl: '/app/admin/create-potential-exceptions/create-potential-exceptions.html',\r\n controller: 'CreatePotentialExceptionsController',\r\n controllerAs: 'vm',\r\n title: 'Create Potential Exception',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.potentialExceptions.read+\",\"+permissions.potentialExceptions.reader+\",\"+permissions.potentialExceptions.publish,\r\n menuGroup: menuGroups.admin.potentialExceptions\r\n }\r\n })\r\n .state('viewPotentialException', {\r\n url: '/potential-exceptions/:id',\r\n templateUrl: '/app/admin/create-potential-exceptions/create-potential-exceptions.html',\r\n controller: 'CreatePotentialExceptionsController',\r\n controllerAs: 'vm',\r\n title: 'View Potential Exception',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.potentialExceptions.read+\",\"+permissions.potentialExceptions.reader+\",\"+permissions.potentialExceptions.publish,\r\n menuGroup: menuGroups.admin.potentialExceptions\r\n }\r\n })\r\n .state('manageContacts', {\r\n url: '/manage-contacts',\r\n templateUrl: '/app/admin/contacts/manage-contacts.html',\r\n controller: 'ManageContactsController',\r\n controllerAs: 'vm',\r\n title: 'Manage Contacts',\r\n data: {\r\n requireLogin: false\r\n //menuGroup: menuGroups.bookShipment\r\n }\r\n\r\n })\r\n .state('manageUsers', {\r\n url: '/users',\r\n templateUrl: '/app/admin/users/manage-users.html',\r\n controller: 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'Manage Users',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.user.manage,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n .state(\"redirectUser\", {\r\n url: '/users/redirect_to_new',\r\n templateUrl: '/app/admin/users/fresh.html',\r\n controller: function($location){$location.url(\"/users/new\");},\r\n data: { requireLogin: true}\r\n })\r\n .state('createUser', {\r\n url: '/users/new',\r\n templateUrl: '/app/admin/users/show-user.html',\r\n controller: 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'Create User',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.user.create,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n\r\n .state('bulkEdit', {\r\n url: '/users/bulk-edit',\r\n templateUrl: '/app/admin/users/bulk-edit.html',\r\n controller: 'BulkEditController',\r\n controllerAs: 'vm',\r\n title: 'Bulk Edit Users',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.user.manage,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n .state('verifyUsers', {\r\n url: '/users/verify-users',\r\n templateUrl: '/app/admin/users/verify-users.html',\r\n controller: 'BulkUsersController',\r\n controllerAs: 'vm',\r\n title: 'Verify Users',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.user.manage,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n .state('importUsers', {\r\n url: '/users/import-users',\r\n templateUrl: '/app/admin/users/import-users.html',\r\n controller: 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'Import Users',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.user.manage,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n .state('showUser', {\r\n url: '/users/:id',\r\n templateUrl: '/app/admin/users/show-user.html',\r\n controller: 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'User',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.user.manage,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n\r\n .state('manageCompanies', {\r\n url: '/companies',\r\n templateUrl: '/app/admin/companies/manage-companies.html',\r\n controller: 'CompanyManagementController',\r\n controllerAs: 'vm',\r\n title: 'Manage Companies',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission:permissions.company.manage,\r\n menuGroup: menuGroups.admin.company\r\n }\r\n })\r\n .state('viewCompanies', {\r\n url: '/viewcompanies',\r\n templateUrl: '/app/admin/companies/manage-companies.html',\r\n controller: 'CompanyManagementController',\r\n controllerAs: 'vm',\r\n title: 'View Companies',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission:permissions.company.read,\r\n menuGroup: menuGroups.admin.company\r\n }\r\n })\r\n .state('createCompany', {\r\n url: '/companies/new',\r\n templateUrl: '/app/admin/companies/show-company.html',\r\n controller: 'CompanyManagementController',\r\n controllerAs: 'vm',\r\n title: 'Create Company',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission:permissions.company.create,\r\n menuGroup: menuGroups.admin.company\r\n }\r\n })\r\n .state('verifyCompanies', {\r\n url: '/companies/verify-companies',\r\n templateUrl: '/app/admin/companies/verify-companies.html',\r\n controller: 'BulkCompaniesController',\r\n controllerAs: 'vm',\r\n title: 'Verify Companies',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.company.manage,\r\n menuGroup: menuGroups.admin.company\r\n }\r\n })\r\n .state('importCompanies', {\r\n url: '/companies/import-companies',\r\n templateUrl: '/app/admin/companies/import-companies.html',\r\n controller: 'CompanyManagementController',\r\n controllerAs: 'vm',\r\n title: 'Import Companies',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.company.manage,\r\n menuGroup: menuGroups.admin.company\r\n }\r\n })\r\n .state('showCompany', {\r\n url: '/companies/:id',\r\n templateUrl: '/app/admin/companies/show-company.html',\r\n controller: 'CompanyManagementController',\r\n controllerAs: 'vm',\r\n title: 'Company',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.company.manage,\r\n menuGroup: menuGroups.admin.company\r\n }\r\n })\r\n .state('supportRequestViewCompany', {\r\n url: '/companies/view/:id',\r\n templateUrl: '/app/admin/companies/views/company-details.html',\r\n controller: 'CompanyManagementController',\r\n controllerAs: 'vm',\r\n title: 'Company Details',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission:permissions.company.read,\r\n menuGroup: menuGroups.admin.company\r\n }\r\n })\r\n /* \r\n .state('groupsIndex', {\r\n url: '/groups',\r\n templateUrl: '/app/admin/groups/groups-index.html',\r\n controller: 'GroupsIndexController',\r\n controllerAs: 'vm',\r\n title: 'Groups',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.groups.manage,\r\n menuGroup: menuGroups.admin.groups\r\n }\r\n })\r\n .state('groupsCreate', {\r\n url: '/groups/new',\r\n templateUrl: '/app/admin/groups/groups-form.html',\r\n controller: 'GroupsManageController',\r\n controllerAs: 'vm',\r\n title: 'Create Group',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.groups.manage,\r\n menuGroup: menuGroups.admin.groups\r\n }\r\n })\r\n .state('groupsUpdate', {\r\n url: '/groups/:id',\r\n templateUrl: '/app/admin/groups/groups-form.html',\r\n controller: 'GroupsManageController',\r\n controllerAs: 'vm',\r\n title: 'Update Group',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.groups.manage,\r\n menuGroup: menuGroups.admin.groups\r\n }\r\n })*/\r\n .state('lensgroup', {\r\n url: '/lensgroups',\r\n templateUrl: '/app/admin/lensview/viewlensgroup.html',\r\n controller: 'lensviewController',\r\n controllerAs: 'vm',\r\n title: 'Lens Group',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.lensgroup.manage,\r\n menuGroup: menuGroups.admin.lensgroup\r\n }\r\n })\r\n .state('showLensGroup', {\r\n url: '/lensgroups/:id',\r\n templateUrl: '/app/admin/lensview/edit-lensgroup.html',\r\n controller: 'lensviewController',\r\n controllerAs: 'vm',\r\n title: 'Lens Group',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.lensgroup.manage,\r\n menuGroup: menuGroups.admin.lensgroup\r\n\r\n }\r\n })\r\n .state('newlensgroup', {\r\n url: '/lensgroup/new',\r\n templateUrl: '/app/admin/lensview/edit-lensgroup.html',\r\n controller: 'lensviewController',\r\n controllerAs: 'vm',\r\n title: 'Lens Group',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.lensgroup.manage,\r\n menuGroup: menuGroups.admin.lensgroup\r\n\r\n }\r\n })\r\n .state('demo', {\r\n url: '/demo',\r\n templateUrl: '/app/admin/lensview/demo-user.html',\r\n controller: 'lensviewController',\r\n controllerAs: 'vm',\r\n title: 'Demo',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.demo_account.demo,\r\n menuGroup: menuGroups.admin.demo_account\r\n\r\n }\r\n })\r\n .state('shiplink', {\r\n url: '/shiplink',\r\n templateUrl: '/app/admin/ship_link/shiplink.html',\r\n controller: 'lensviewController',\r\n controllerAs: 'vm',\r\n title: 'Ship Link',\r\n data: {\r\n requireLogin: true, \r\n menuGroup: menuGroups.admin.ship_link \r\n }\r\n })\r\n .state('shiplinktext', {\r\n url: '/shiplinktext',\r\n templateUrl: '/app/admin/ship_link/shiplinktext.html',\r\n controller: 'lensviewController',\r\n controllerAs: 'vm',\r\n title: 'Ship Link Text',\r\n data: {\r\n requireLogin: true, \r\n menuGroup: \"shiplinkText\"\r\n }\r\n })\r\n .state('equipment_type', {\r\n url: '/equipment_type',\r\n templateUrl: '/app/admin/equipment-type/company.html',\r\n controller: 'equipmentTypeController',\r\n controllerAs: 'vm',\r\n title: 'Equipment Type',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.company.manage,\r\n menuGroup: menuGroups.admin.equipment_type\r\n }\r\n })\r\n .state('supportRequests', {\r\n url: '/supportRequests',\r\n templateUrl: '/app/admin/support-requests/support-requests.html',\r\n controller: 'SupportRequestsController',\r\n controllerAs: 'vm',\r\n title: 'Support Requests',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.supportRequests\r\n\r\n }\r\n })\r\n .state('generalSupportRequest', {\r\n url: '/generalSupportRequest',\r\n templateUrl: '/app/admin/support-requests/general-support-request.html',\r\n controller: 'SupportRequestsController',\r\n controllerAs: 'vm',\r\n title: 'General Support Request',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.supportRequests\r\n\r\n }\r\n })\r\n .state('generalSupportRequestEdit', {\r\n url: '/generalSupportRequest/:id',\r\n templateUrl: '/app/admin/support-requests/general-support-request.html',\r\n controller: 'SupportRequestsController',\r\n controllerAs: 'vm',\r\n title: 'General Support Request',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.supportRequests\r\n\r\n }\r\n })\r\n .state('generalSupportRequestPreview', {\r\n url: '/generalSupportRequestView/:id',\r\n templateUrl: '/app/admin/support-requests/general-support-preview.html',\r\n controller: 'SupportRequestsController',\r\n controllerAs: 'vm',\r\n title: 'General Support Request',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.supportRequests\r\n }\r\n })\r\n .state('companySupportRequestPreview', {\r\n url: '/companySupportRequestView/:id',\r\n templateUrl: '/app/admin/support-requests/company-support-preview.html',\r\n controller: 'SupportRequestsController',\r\n controllerAs: 'vm',\r\n title: 'Company Support Request',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.supportRequests\r\n }\r\n })\r\n .state('userAccountPreview', {\r\n url: '/userAccountPreview/:id',\r\n templateUrl: '/app/admin/support-requests/add-user/preview/preview.html',\r\n controller: 'SupportRequestsViewController',\r\n controllerAs: 'vm',\r\n title: 'User Preview',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.supportRequests\r\n }\r\n })\r\n .state('supportRequestAddUser', {\r\n url: '/supportRequestAddUser',\r\n templateUrl: '/app/admin/support-requests/add-user/add-user.html',\r\n controller: 'SupportRequestsController',\r\n controllerAs: 'vm',\r\n title: 'Add User',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.supportRequests\r\n }\r\n })\r\n .state('supportRequestEditUser', {\r\n url: '/supportRequestAddUser/:id',\r\n templateUrl: '/app/admin/support-requests/add-user/add-user.html',\r\n controller: 'SupportRequestsController',\r\n controllerAs: 'vm',\r\n title: 'Edit User',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.supportRequests\r\n }\r\n })\r\n \r\n .state('supportRequestCompany', {\r\n url: '/supportRequestCompany',\r\n templateUrl: '/app/admin/support-requests/add-company/add-company.html',\r\n controller: 'SupportRequestsController',\r\n controllerAs: 'vm',\r\n title: 'Company Support Request',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.supportRequests\r\n }\r\n })\r\n .state('supportRequestCompanyEdit', {\r\n url: '/supportRequestCompany/:id',\r\n templateUrl: '/app/admin/support-requests/add-company/add-company.html',\r\n controller: 'SupportRequestsController',\r\n controllerAs: 'vm',\r\n title: 'Company Support Request',\r\n data: {\r\n requireLogin: true,\r\n menuGroup: menuGroups.admin.supportRequests\r\n\r\n }\r\n })\r\n .state('c2c', {\r\n url: '/c2c',\r\n templateUrl: '/app/admin/c2c.html',\r\n controller: 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'C2C',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.user.manage,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n .state('Invoice Report', {\r\n url: '/invoice',\r\n templateUrl: '/app/admin/Invoice.html',\r\n controller: 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'Invoice Report',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n .state('Carbon foot-print calculator',{\r\n url: '/carbon-cal',\r\n templateUrl: '/app/admin/carbon-cal.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'Carbon foot-print calculator',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n .state('C-Reports',{\r\n url: '/c-reports',\r\n templateUrl: '/app/admin/c-reports.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'c-reports',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n .state('KPI services',{\r\n url: '/kpi-services',\r\n templateUrl: '/app/admin/kpi-services.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'KPI services',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n\r\n .state('Dashboard',{\r\n url: '/opt-dashboard',\r\n templateUrl: '/app/admin/dashboard.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'Dashboard',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n .state('Shipment Tracking (C2C)',{\r\n url: '/shipment-tracking-C2C',\r\n templateUrl: '/app/admin/shipment-tracking-C2C.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'Shipment Tracking (C2C)',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.user.manage,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n\r\n .state('ISF',{\r\n url: '/isf',\r\n templateUrl: '/app/admin/isf.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title: 'ISF',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.user.manage,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n\r\n .state('C-labels',{\r\n url: '/CLabels',\r\n templateUrl: '/app/admin/c-lables.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'C-labels',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n .state('Downstream-Warehouse',{\r\n url: '/downstream-warehouse',\r\n templateUrl: '/app/admin/downstream-warehouse.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'Downstream-Warehouse',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.user.manage,\r\n menuGroup: menuGroups.admin.user\r\n }\r\n })\r\n\r\n .state('Reporting-Sharepoint',{\r\n url: '/reporting-sharepoint',\r\n templateUrl: '/app/admin/reporting-sharepoint.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'Reporting-Sharepoint',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n .state('C-Clear',{\r\n url: '/c-clear',\r\n templateUrl: '/app/admin/custom_clear.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'C-Clear',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n .state('C-Complience',{\r\n url: '/c-complience',\r\n templateUrl: '/app/admin/custom_comp.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'C-Complience',\r\n data: {\r\n requireLogin: true\r\n\r\n }\r\n })\r\n\r\n .state('C - Stock',{\r\n url: '/c-stock',\r\n templateUrl: '/app/admin/c-stock.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'C-Complience',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n .state('Milestone',{\r\n url: '/milestone',\r\n templateUrl: '/app/admin/milestone.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'Milestone',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n .state('Carbon Footprint',{\r\n url: '/carbon-footprint',\r\n templateUrl: '/app/admin/carbon_footprint.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'Carbon Footprint',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n .state('CLabels',{\r\n url: '/CLabels',\r\n templateUrl: '/app/admin/c-labels.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'CLabels',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n .state('/Edocs',{\r\n url: '/E_docs',\r\n templateUrl: '/app/admin/Edocs.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'E-Docs',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n .state('Console',{\r\n url: '/console',\r\n templateUrl: '/app/admin/console.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'Console',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n .state('Cprints',{\r\n url: '/Cprints',\r\n templateUrl: '/app/admin/Cprint.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'Cprints',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n\r\n .state('BOL - SLI - CMR',{\r\n url: '/bol-sli-cmr',\r\n templateUrl: '/app/admin/bol-sli-cmr.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'BOL - SLI - CMR',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n\r\n .state('US Domestic Booking',{\r\n url: '/us_domestic_booking',\r\n templateUrl: '/app/admin/us_domestic_booking.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'US Domestic Booking',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n\r\n .state('Accounts Receivables',{\r\n url: '/accounts_receivables',\r\n templateUrl: '/app/admin/accounts_receivables.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'Accounts Receivables',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n\r\n .state('WHSE Shipment Tracking',{\r\n url: '/WHSEShipmentTracking',\r\n templateUrl: '/app/admin/WHSEShipmentTracking.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'WHSE Shipment Tracking',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n\r\n\r\n .state('Schedule Maintenance Report',{\r\n url: '/schedule-maintenance-report',\r\n templateUrl: '/app/admin/schedule-maintenance-report.html',\r\n controller : 'UserManagementController',\r\n controllerAs: 'vm',\r\n title:'Schedule Maintenance Report',\r\n data: {\r\n requireLogin: true\r\n }\r\n })\r\n .state('featureSpotlightState', {\r\n url: '/featureSpotlight',\r\n templateUrl: '/app/admin/feature-spotlight/feature-spotlight.html',\r\n controller: 'featureSpotlightController',\r\n controllerAs: 'vm',\r\n title: 'Feature Spotlight',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.featureSpotlight.manage,\r\n menuGroup: menuGroups.admin.featureSpotlight\r\n }\r\n })\r\n .state('addFeatureSpotlightState', {\r\n url: '/featureSpotlight/addspotlight',\r\n templateUrl: '/app/admin/feature-spotlight/add-feature-spotlight.html',\r\n controller: 'addfeatureSpotlightController',\r\n controllerAs: 'vm',\r\n title: 'Add Feature Spotlight',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.featureSpotlight.manage,\r\n menuGroup: menuGroups.admin.featureSpotlight\r\n }\r\n })\r\n .state('showFeatureSpotlightState', {\r\n url: '/featureSpotlight/addspotlight/:id',\r\n templateUrl: '/app/admin/feature-spotlight/add-feature-spotlight.html',\r\n controller: 'addfeatureSpotlightController',\r\n controllerAs: 'vm',\r\n title: 'Edit Feature Spotlight',\r\n data: {\r\n requireLogin: true,\r\n requiredPermission: permissions.featureSpotlight.manage,\r\n menuGroup: menuGroups.admin.featureSpotlight\r\n }\r\n });\r\n }\r\n})();\r\n\n/**\r\n * @ngdoc module\r\n * @name AdminController\r\n *\r\n * @description \r\n * The adminController module provides comunication between the admin view and the admin service\r\n *\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name createUser\r\n * @description createUser creates a new user by the admin\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name updateNameEmail\r\n * @description method that updates the users name and email\r\n */\r\n\r\n/**\r\n * @ngdoc method\r\n * @name updatePassword\r\n * @description method that logs in using the rails api\r\n * @param {string} - current password\r\n * @param {string} - new password\r\n * @param {string} - confirm the new password\r\n */\r\n\r\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app.admin')\r\n .controller('AdminController', AdminController);\r\n\r\n /** @ngInject */\r\n AdminController.$inject = ['AdminService', '$log', '$translatePartialLoader'];\r\n function AdminController(AdminService, $log, $translatePartialLoader) {\r\n /* Tell the translator where to grab translations from */\r\n $translatePartialLoader.addPart('admin');\r\n \r\n //variables\r\n var vm = this;\r\n vm.user = AdminService.getAdminData();\r\n vm.newUser = AdminService.getNewUserInfo();\r\n //copy used to set form back to empty when they clear it\r\n vm.newUserCopy = angular.copy(vm.newUser);\r\n //for the view to get the values but not change them\r\n vm.firstName = vm.user.first_name;\r\n vm.lastName = vm.user.last_name;\r\n vm.username = vm.user.user_name;\r\n \r\n //functions\r\n vm.createUser = createUser;\r\n vm.updateNameEmail = updateNameEmail;\r\n vm.updatePassword = updatePassword;\r\n \r\n \r\n function createUser() {\r\n $log.debug(\"created user with: \" + vm.newUser.first_name + \" \" + vm.newUser.display_name + \" \" + vm.newUser.email_address + \" \" + vm.newUser.crane_poc + \" \" + vm.newUser.last_name + \" \" + vm.newUser.user_group + \" \" + vm.newUser.phone);\r\n // TODO: create the new user with the api\r\n \r\n }\r\n \r\n function updateNameEmail() {\r\n $log.debug(\"update name with: \" + vm.firstName + \" \" + vm.lastName + \" \" + vm.username);\r\n vm.user.first_name = vm.firstName;\r\n vm.user.last_name = vm.lastName;\r\n vm.user.user_name = vm.username;\r\n }\r\n // TODO May need to change the interface for the updatePassword\r\n function updatePassword(currPass, newPass, confirmPass) {\r\n $log.debug(\"update password: \" + currPass + \" \" + newPass + \" \" + confirmPass);\r\n if((currPass == null || currPass == \"\") && (newPass == null || newPass == \"\") && (confirmPass == null || confirmPass == \"\")) {\r\n //keep the current password\r\n } else {\r\n vm.user.password = newPass;\r\n }\r\n }\r\n \r\n }\r\n})();\n\r\n function s2ab(s) {\r\n var buf = new ArrayBuffer(s.length);\r\n var view = new Uint8Array(buf);\r\n for (var i=0; i!=s.length; ++i) view[i] = s.charCodeAt(i) & 0xFF;\r\n return buf;\r\n }\r\n\r\n function Workbook() {\r\n if(!(this instanceof Workbook)) return new Workbook();\r\n this.SheetNames = [];\r\n this.Sheets = {};\r\n }\r\n\r\n //Xlsx style formatting\r\n function sheet_from_array_of_arrays(data,headerIndex,instructionIndex) {\r\n var ws = {};\r\n var range = {s: {c:10000000, r:10000000}, e: {c:0, r:0 }};\r\n var wscols = [];\r\n // columns length added\r\n angular.forEach(data[headerIndex],function(val){\r\n wscols.push({ wch: val.length + 5});\r\n });\r\n\r\n for(var R = 0; R != data.length; ++R) { \r\n for(var C = 0; C != data[R].length; ++C) {\r\n if(range.s.r > R) range.s.r = R;\r\n if(range.s.c > C) range.s.c = C;\r\n if(range.e.r < R) range.e.r = R;\r\n if(range.e.c < C) range.e.c = C;\r\n //var cell = {v: data[R][C] }; \r\n var cell = {v: data[R][C], \"s\": {font: {name: \"Bitstream Charter\", sz: 12}} };\r\n if(cell.v == null) continue;\r\n var cell_ref = XLSX.utils.encode_cell({c:C,r:R});\r\n \r\n if(typeof cell.v === 'number') cell.t = 'n';\r\n else if(typeof cell.v === 'boolean') cell.t = 'b';\r\n else if(cell.v instanceof Date) {\r\n cell.t = 'n'; cell.z = XLSX.SSF._table[14];\r\n cell.v = datenum(cell.v);\r\n }\r\n else cell.t = 's';\r\n \r\n if(R == headerIndex){\r\n //cell.wch = cell.v.length + 5;\r\n cell.s={\r\n /*fill:{\r\n fgColor:{ rgb: \"BEC0D8\" }\r\n },*/\r\n font:{\r\n name:'Bitstream Charter',\r\n bold:true\r\n }\r\n }\r\n }\r\n \r\n ws[cell_ref] = cell;\r\n }\r\n }\r\n ws[\"!cols\"] = wscols;\r\n if(instructionIndex>-1){\r\n const merge = [{ s: { r: instructionIndex, c: 0 }, e: { r: 0, c: data[headerIndex].length-1 } }];\r\n ws[\"!merges\"] = merge;\r\n }\r\n if(range.s.c < 10000000) ws['!ref'] = XLSX.utils.encode_range(range);\r\n return ws;\r\n }\r\n\n/* xlsx.js (C) 2013-2015 SheetJS -- http://sheetjs.com */\r\n!function(e){if(\"object\"==typeof exports&&\"undefined\"!=typeof module)module.exports=e();else if(\"function\"==typeof define&&define.amd)define([],e);else{var f;\"undefined\"!=typeof window?f=window:\"undefined\"!=typeof global?f=global:\"undefined\"!=typeof self&&(f=self),f.JSZip=e()}}(function(){var define,module,exports;return function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require==\"function\"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error(\"Cannot find module '\"+o+\"'\")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require==\"function\"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s}({1:[function(_dereq_,module,exports){\"use strict\";var _keyStr=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";exports.encode=function(input,utf8){var output=\"\";var chr1,chr2,chr3,enc1,enc2,enc3,enc4;var i=0;while(i<input.length){chr1=input.charCodeAt(i++);chr2=input.charCodeAt(i++);chr3=input.charCodeAt(i++);enc1=chr1>>2;enc2=(chr1&3)<<4|chr2>>4;enc3=(chr2&15)<<2|chr3>>6;enc4=chr3&63;if(isNaN(chr2)){enc3=enc4=64}else if(isNaN(chr3)){enc4=64}output=output+_keyStr.charAt(enc1)+_keyStr.charAt(enc2)+_keyStr.charAt(enc3)+_keyStr.charAt(enc4)}return output};exports.decode=function(input,utf8){var output=\"\";var chr1,chr2,chr3;var enc1,enc2,enc3,enc4;var i=0;input=input.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");while(i<input.length){enc1=_keyStr.indexOf(input.charAt(i++));enc2=_keyStr.indexOf(input.charAt(i++));enc3=_keyStr.indexOf(input.charAt(i++));enc4=_keyStr.indexOf(input.charAt(i++));chr1=enc1<<2|enc2>>4;chr2=(enc2&15)<<4|enc3>>2;chr3=(enc3&3)<<6|enc4;output=output+String.fromCharCode(chr1);if(enc3!=64){output=output+String.fromCharCode(chr2)}if(enc4!=64){output=output+String.fromCharCode(chr3)}}return output}},{}],2:[function(_dereq_,module,exports){\"use strict\";function CompressedObject(){this.compressedSize=0;this.uncompressedSize=0;this.crc32=0;this.compressionMethod=null;this.compressedContent=null}CompressedObject.prototype={getContent:function(){return null},getCompressedContent:function(){return null}};module.exports=CompressedObject},{}],3:[function(_dereq_,module,exports){\"use strict\";exports.STORE={magic:\"\\x00\\x00\",compress:function(content){return content},uncompress:function(content){return content},compressInputType:null,uncompressInputType:null};exports.DEFLATE=_dereq_(\"./flate\")},{\"./flate\":8}],4:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"./utils\");var table=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];module.exports=function crc32(input,crc){if(typeof input===\"undefined\"||!input.length){return 0}var isArray=utils.getTypeOf(input)!==\"string\";if(typeof crc==\"undefined\"){crc=0}var x=0;var y=0;var b=0;crc=crc^-1;for(var i=0,iTop=input.length;i<iTop;i++){b=isArray?input[i]:input.charCodeAt(i);y=(crc^b)&255;x=table[y];crc=crc>>>8^x}return crc^-1}},{\"./utils\":21}],5:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"./utils\");function DataReader(data){this.data=null;this.length=0;this.index=0}DataReader.prototype={checkOffset:function(offset){this.checkIndex(this.index+offset)},checkIndex:function(newIndex){if(this.length<newIndex||newIndex<0){throw new Error(\"End of data reached (data length = \"+this.length+\", asked index = \"+newIndex+\"). Corrupted zip ?\")}},setIndex:function(newIndex){this.checkIndex(newIndex);this.index=newIndex},skip:function(n){this.setIndex(this.index+n)},byteAt:function(i){},readInt:function(size){var result=0,i;this.checkOffset(size);for(i=this.index+size-1;i>=this.index;i--){result=(result<<8)+this.byteAt(i)}this.index+=size;return result},readString:function(size){return utils.transformTo(\"string\",this.readData(size))},readData:function(size){},lastIndexOfSignature:function(sig){},readDate:function(){var dostime=this.readInt(4);return new Date((dostime>>25&127)+1980,(dostime>>21&15)-1,dostime>>16&31,dostime>>11&31,dostime>>5&63,(dostime&31)<<1)}};module.exports=DataReader},{\"./utils\":21}],6:[function(_dereq_,module,exports){\"use strict\";exports.base64=false;exports.binary=false;exports.dir=false;exports.createFolders=false;exports.date=null;exports.compression=null;exports.comment=null},{}],7:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"./utils\");exports.string2binary=function(str){return utils.string2binary(str)};exports.string2Uint8Array=function(str){return utils.transformTo(\"uint8array\",str)};exports.uint8Array2String=function(array){return utils.transformTo(\"string\",array)};exports.string2Blob=function(str){var buffer=utils.transformTo(\"arraybuffer\",str);return utils.arrayBuffer2Blob(buffer)};exports.arrayBuffer2Blob=function(buffer){return utils.arrayBuffer2Blob(buffer)};exports.transformTo=function(outputType,input){return utils.transformTo(outputType,input)};exports.getTypeOf=function(input){return utils.getTypeOf(input)};exports.checkSupport=function(type){return utils.checkSupport(type)};exports.MAX_VALUE_16BITS=utils.MAX_VALUE_16BITS;exports.MAX_VALUE_32BITS=utils.MAX_VALUE_32BITS;exports.pretty=function(str){return utils.pretty(str)};exports.findCompression=function(compressionMethod){return utils.findCompression(compressionMethod)};exports.isRegExp=function(object){return utils.isRegExp(object)}},{\"./utils\":21}],8:[function(_dereq_,module,exports){\"use strict\";var USE_TYPEDARRAY=typeof Uint8Array!==\"undefined\"&&typeof Uint16Array!==\"undefined\"&&typeof Uint32Array!==\"undefined\";var pako=_dereq_(\"pako\");exports.uncompressInputType=USE_TYPEDARRAY?\"uint8array\":\"array\";exports.compressInputType=USE_TYPEDARRAY?\"uint8array\":\"array\";exports.magic=\"\\b\\x00\";exports.compress=function(input){return pako.deflateRaw(input)};exports.uncompress=function(input){return pako.inflateRaw(input)}},{pako:24}],9:[function(_dereq_,module,exports){\"use strict\";var base64=_dereq_(\"./base64\");function JSZip(data,options){if(!(this instanceof JSZip))return new JSZip(data,options);this.files={};this.comment=null;this.root=\"\";if(data){this.load(data,options)}this.clone=function(){var newObj=new JSZip;for(var i in this){if(typeof this[i]!==\"function\"){newObj[i]=this[i]}}return newObj}}JSZip.prototype=_dereq_(\"./object\");JSZip.prototype.load=_dereq_(\"./load\");JSZip.support=_dereq_(\"./support\");JSZip.defaults=_dereq_(\"./defaults\");JSZip.utils=_dereq_(\"./deprecatedPublicUtils\");JSZip.base64={encode:function(input){return base64.encode(input)},decode:function(input){return base64.decode(input)}};JSZip.compressions=_dereq_(\"./compressions\");module.exports=JSZip},{\"./base64\":1,\"./compressions\":3,\"./defaults\":6,\"./deprecatedPublicUtils\":7,\"./load\":10,\"./object\":13,\"./support\":17}],10:[function(_dereq_,module,exports){\"use strict\";var base64=_dereq_(\"./base64\");var ZipEntries=_dereq_(\"./zipEntries\");module.exports=function(data,options){var files,zipEntries,i,input;options=options||{};if(options.base64){data=base64.decode(data)}zipEntries=new ZipEntries(data,options);files=zipEntries.files;for(i=0;i<files.length;i++){input=files[i];this.file(input.fileName,input.decompressed,{binary:true,optimizedBinaryString:true,date:input.date,dir:input.dir,comment:input.fileComment.length?input.fileComment:null,createFolders:options.createFolders})}if(zipEntries.zipComment.length){this.comment=zipEntries.zipComment}return this}},{\"./base64\":1,\"./zipEntries\":22}],11:[function(_dereq_,module,exports){(function(Buffer){\"use strict\";module.exports=function(data,encoding){return new Buffer(data,encoding)};module.exports.test=function(b){return Buffer.isBuffer(b)}}).call(this,typeof Buffer!==\"undefined\"?Buffer:undefined)},{}],12:[function(_dereq_,module,exports){\"use strict\";var Uint8ArrayReader=_dereq_(\"./uint8ArrayReader\");function NodeBufferReader(data){this.data=data;this.length=this.data.length;this.index=0}NodeBufferReader.prototype=new Uint8ArrayReader;NodeBufferReader.prototype.readData=function(size){this.checkOffset(size);var result=this.data.slice(this.index,this.index+size);this.index+=size;return result};module.exports=NodeBufferReader},{\"./uint8ArrayReader\":18}],13:[function(_dereq_,module,exports){\"use strict\";var support=_dereq_(\"./support\");var utils=_dereq_(\"./utils\");var crc32=_dereq_(\"./crc32\");var signature=_dereq_(\"./signature\");var defaults=_dereq_(\"./defaults\");var base64=_dereq_(\"./base64\");var compressions=_dereq_(\"./compressions\");var CompressedObject=_dereq_(\"./compressedObject\");var nodeBuffer=_dereq_(\"./nodeBuffer\");var utf8=_dereq_(\"./utf8\");var StringWriter=_dereq_(\"./stringWriter\");var Uint8ArrayWriter=_dereq_(\"./uint8ArrayWriter\");var getRawData=function(file){if(file._data instanceof CompressedObject){file._data=file._data.getContent();file.options.binary=true;file.options.base64=false;if(utils.getTypeOf(file._data)===\"uint8array\"){var copy=file._data;file._data=new Uint8Array(copy.length);if(copy.length!==0){file._data.set(copy,0)}}}return file._data};var getBinaryData=function(file){var result=getRawData(file),type=utils.getTypeOf(result);if(type===\"string\"){if(!file.options.binary){if(support.nodebuffer){return nodeBuffer(result,\"utf-8\")}}return file.asBinary()}return result};var dataToString=function(asUTF8){var result=getRawData(this);if(result===null||typeof result===\"undefined\"){return\"\"}if(this.options.base64){result=base64.decode(result)}if(asUTF8&&this.options.binary){result=out.utf8decode(result)}else{result=utils.transformTo(\"string\",result)}if(!asUTF8&&!this.options.binary){result=utils.transformTo(\"string\",out.utf8encode(result))}return result};var ZipObject=function(name,data,options){this.name=name;this.dir=options.dir;this.date=options.date;this.comment=options.comment;this._data=data;this.options=options;this._initialMetadata={dir:options.dir,date:options.date}};ZipObject.prototype={asText:function(){return dataToString.call(this,true)},asBinary:function(){return dataToString.call(this,false)},asNodeBuffer:function(){var result=getBinaryData(this);return utils.transformTo(\"nodebuffer\",result)},asUint8Array:function(){var result=getBinaryData(this);return utils.transformTo(\"uint8array\",result)},asArrayBuffer:function(){return this.asUint8Array().buffer}};var decToHex=function(dec,bytes){var hex=\"\",i;for(i=0;i<bytes;i++){hex+=String.fromCharCode(dec&255);dec=dec>>>8}return hex};var extend=function(){var result={},i,attr;for(i=0;i<arguments.length;i++){for(attr in arguments[i]){if(arguments[i].hasOwnProperty(attr)&&typeof result[attr]===\"undefined\"){result[attr]=arguments[i][attr]}}}return result};var prepareFileAttrs=function(o){o=o||{};if(o.base64===true&&(o.binary===null||o.binary===undefined)){o.binary=true}o=extend(o,defaults);o.date=o.date||new Date;if(o.compression!==null)o.compression=o.compression.toUpperCase();return o};var fileAdd=function(name,data,o){var dataType=utils.getTypeOf(data),parent;o=prepareFileAttrs(o);if(o.createFolders&&(parent=parentFolder(name))){folderAdd.call(this,parent,true)}if(o.dir||data===null||typeof data===\"undefined\"){o.base64=false;o.binary=false;data=null}else if(dataType===\"string\"){if(o.binary&&!o.base64){if(o.optimizedBinaryString!==true){data=utils.string2binary(data)}}}else{o.base64=false;o.binary=true;if(!dataType&&!(data instanceof CompressedObject)){throw new Error(\"The data of '\"+name+\"' is in an unsupported format !\")}if(dataType===\"arraybuffer\"){data=utils.transformTo(\"uint8array\",data)}}var object=new ZipObject(name,data,o);this.files[name]=object;return object};var parentFolder=function(path){if(path.slice(-1)==\"/\"){path=path.substring(0,path.length-1)}var lastSlash=path.lastIndexOf(\"/\");return lastSlash>0?path.substring(0,lastSlash):\"\"};var folderAdd=function(name,createFolders){if(name.slice(-1)!=\"/\"){name+=\"/\"}createFolders=typeof createFolders!==\"undefined\"?createFolders:false;if(!this.files[name]){fileAdd.call(this,name,null,{dir:true,createFolders:createFolders})}return this.files[name]};var generateCompressedObjectFrom=function(file,compression){var result=new CompressedObject,content;if(file._data instanceof CompressedObject){result.uncompressedSize=file._data.uncompressedSize;result.crc32=file._data.crc32;if(result.uncompressedSize===0||file.dir){compression=compressions[\"STORE\"];result.compressedContent=\"\";result.crc32=0}else if(file._data.compressionMethod===compression.magic){result.compressedContent=file._data.getCompressedContent()}else{content=file._data.getContent();result.compressedContent=compression.compress(utils.transformTo(compression.compressInputType,content))}}else{content=getBinaryData(file);if(!content||content.length===0||file.dir){compression=compressions[\"STORE\"];content=\"\"}result.uncompressedSize=content.length;result.crc32=crc32(content);result.compressedContent=compression.compress(utils.transformTo(compression.compressInputType,content))}result.compressedSize=result.compressedContent.length;result.compressionMethod=compression.magic;return result};var generateZipParts=function(name,file,compressedObject,offset){var data=compressedObject.compressedContent,utfEncodedFileName=utils.transformTo(\"string\",utf8.utf8encode(file.name)),comment=file.comment||\"\",utfEncodedComment=utils.transformTo(\"string\",utf8.utf8encode(comment)),useUTF8ForFileName=utfEncodedFileName.length!==file.name.length,useUTF8ForComment=utfEncodedComment.length!==comment.length,o=file.options,dosTime,dosDate,extraFields=\"\",unicodePathExtraField=\"\",unicodeCommentExtraField=\"\",dir,date;if(file._initialMetadata.dir!==file.dir){dir=file.dir}else{dir=o.dir}if(file._initialMetadata.date!==file.date){date=file.date}else{date=o.date}dosTime=date.getHours();dosTime=dosTime<<6;dosTime=dosTime|date.getMinutes();dosTime=dosTime<<5;dosTime=dosTime|date.getSeconds()/2;dosDate=date.getFullYear()-1980;dosDate=dosDate<<4;dosDate=dosDate|date.getMonth()+1;dosDate=dosDate<<5;dosDate=dosDate|date.getDate();if(useUTF8ForFileName){unicodePathExtraField=decToHex(1,1)+decToHex(crc32(utfEncodedFileName),4)+utfEncodedFileName;extraFields+=\"up\"+decToHex(unicodePathExtraField.length,2)+unicodePathExtraField}if(useUTF8ForComment){unicodeCommentExtraField=decToHex(1,1)+decToHex(this.crc32(utfEncodedComment),4)+utfEncodedComment;extraFields+=\"uc\"+decToHex(unicodeCommentExtraField.length,2)+unicodeCommentExtraField}var header=\"\";header+=\"\\n\\x00\";header+=useUTF8ForFileName||useUTF8ForComment?\"\\x00\\b\":\"\\x00\\x00\";header+=compressedObject.compressionMethod;header+=decToHex(dosTime,2);header+=decToHex(dosDate,2);header+=decToHex(compressedObject.crc32,4);header+=decToHex(compressedObject.compressedSize,4);header+=decToHex(compressedObject.uncompressedSize,4);header+=decToHex(utfEncodedFileName.length,2);header+=decToHex(extraFields.length,2);var fileRecord=signature.LOCAL_FILE_HEADER+header+utfEncodedFileName+extraFields;var dirRecord=signature.CENTRAL_FILE_HEADER+\"\u0014\\x00\"+header+decToHex(utfEncodedComment.length,2)+\"\\x00\\x00\"+\"\\x00\\x00\"+(dir===true?\"\u0010\\x00\\x00\\x00\":\"\\x00\\x00\\x00\\x00\")+decToHex(offset,4)+utfEncodedFileName+extraFields+utfEncodedComment;return{fileRecord:fileRecord,dirRecord:dirRecord,compressedObject:compressedObject}};var out={load:function(stream,options){throw new Error(\"Load method is not defined. Is the file jszip-load.js included ?\")},filter:function(search){var result=[],filename,relativePath,file,fileClone;for(filename in this.files){if(!this.files.hasOwnProperty(filename)){continue}file=this.files[filename];fileClone=new ZipObject(file.name,file._data,extend(file.options));relativePath=filename.slice(this.root.length,filename.length);if(filename.slice(0,this.root.length)===this.root&&search(relativePath,fileClone)){result.push(fileClone)}}return result},file:function(name,data,o){if(arguments.length===1){if(utils.isRegExp(name)){var regexp=name;return this.filter(function(relativePath,file){return!file.dir&®exp.test(relativePath)})}else{return this.filter(function(relativePath,file){return!file.dir&&relativePath===name})[0]||null}}else{name=this.root+name;fileAdd.call(this,name,data,o)}return this},folder:function(arg){if(!arg){return this}if(utils.isRegExp(arg)){return this.filter(function(relativePath,file){return file.dir&&arg.test(relativePath)})}var name=this.root+arg;var newFolder=folderAdd.call(this,name);var ret=this.clone();ret.root=newFolder.name;return ret},remove:function(name){name=this.root+name;var file=this.files[name];if(!file){if(name.slice(-1)!=\"/\"){name+=\"/\"}file=this.files[name]}if(file&&!file.dir){delete this.files[name]}else{var kids=this.filter(function(relativePath,file){return file.name.slice(0,name.length)===name});for(var i=0;i<kids.length;i++){delete this.files[kids[i].name]}}return this},generate:function(options){options=extend(options||{},{base64:true,compression:\"STORE\",type:\"base64\",comment:null});utils.checkSupport(options.type);var zipData=[],localDirLength=0,centralDirLength=0,writer,i,utfEncodedComment=utils.transformTo(\"string\",this.utf8encode(options.comment||this.comment||\"\"));for(var name in this.files){if(!this.files.hasOwnProperty(name)){continue}var file=this.files[name];var compressionName=file.options.compression||options.compression.toUpperCase();var compression=compressions[compressionName];if(!compression){throw new Error(compressionName+\" is not a valid compression method !\")}var compressedObject=generateCompressedObjectFrom.call(this,file,compression);var zipPart=generateZipParts.call(this,name,file,compressedObject,localDirLength);localDirLength+=zipPart.fileRecord.length+compressedObject.compressedSize;centralDirLength+=zipPart.dirRecord.length;zipData.push(zipPart)}var dirEnd=\"\";dirEnd=signature.CENTRAL_DIRECTORY_END+\"\\x00\\x00\"+\"\\x00\\x00\"+decToHex(zipData.length,2)+decToHex(zipData.length,2)+decToHex(centralDirLength,4)+decToHex(localDirLength,4)+decToHex(utfEncodedComment.length,2)+utfEncodedComment;var typeName=options.type.toLowerCase();if(typeName===\"uint8array\"||typeName===\"arraybuffer\"||typeName===\"blob\"||typeName===\"nodebuffer\"){writer=new Uint8ArrayWriter(localDirLength+centralDirLength+dirEnd.length)}else{writer=new StringWriter(localDirLength+centralDirLength+dirEnd.length)}for(i=0;i<zipData.length;i++){writer.append(zipData[i].fileRecord);writer.append(zipData[i].compressedObject.compressedContent)}for(i=0;i<zipData.length;i++){writer.append(zipData[i].dirRecord)}writer.append(dirEnd);var zip=writer.finalize();switch(options.type.toLowerCase()){case\"uint8array\":case\"arraybuffer\":case\"nodebuffer\":return utils.transformTo(options.type.toLowerCase(),zip);case\"blob\":return utils.arrayBuffer2Blob(utils.transformTo(\"arraybuffer\",zip));case\"base64\":return options.base64?base64.encode(zip):zip;default:return zip}},crc32:function(input,crc){return crc32(input,crc)},utf8encode:function(string){return utils.transformTo(\"string\",utf8.utf8encode(string))},utf8decode:function(input){return utf8.utf8decode(input)}};module.exports=out},{\"./base64\":1,\"./compressedObject\":2,\"./compressions\":3,\"./crc32\":4,\"./defaults\":6,\"./nodeBuffer\":11,\"./signature\":14,\"./stringWriter\":16,\"./support\":17,\"./uint8ArrayWriter\":19,\"./utf8\":20,\"./utils\":21}],14:[function(_dereq_,module,exports){\"use strict\";exports.LOCAL_FILE_HEADER=\"PK\u0003\u0004\";exports.CENTRAL_FILE_HEADER=\"PK\u0001\u0002\";exports.CENTRAL_DIRECTORY_END=\"PK\u0005\u0006\";exports.ZIP64_CENTRAL_DIRECTORY_LOCATOR=\"PK\u0006\u0007\";exports.ZIP64_CENTRAL_DIRECTORY_END=\"PK\u0006\u0006\";exports.DATA_DESCRIPTOR=\"PK\u0007\\b\"},{}],15:[function(_dereq_,module,exports){\"use strict\";var DataReader=_dereq_(\"./dataReader\");var utils=_dereq_(\"./utils\");function StringReader(data,optimizedBinaryString){this.data=data;if(!optimizedBinaryString){this.data=utils.string2binary(this.data)}this.length=this.data.length;this.index=0}StringReader.prototype=new DataReader;StringReader.prototype.byteAt=function(i){return this.data.charCodeAt(i)};StringReader.prototype.lastIndexOfSignature=function(sig){return this.data.lastIndexOf(sig)};StringReader.prototype.readData=function(size){this.checkOffset(size);var result=this.data.slice(this.index,this.index+size);this.index+=size;return result};module.exports=StringReader},{\"./dataReader\":5,\"./utils\":21}],16:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"./utils\");var StringWriter=function(){this.data=[]};StringWriter.prototype={append:function(input){input=utils.transformTo(\"string\",input);this.data.push(input)},finalize:function(){return this.data.join(\"\")}};module.exports=StringWriter},{\"./utils\":21}],17:[function(_dereq_,module,exports){(function(Buffer){\"use strict\";exports.base64=true;exports.array=true;exports.string=true;exports.arraybuffer=typeof ArrayBuffer!==\"undefined\"&&typeof Uint8Array!==\"undefined\";exports.nodebuffer=typeof Buffer!==\"undefined\";exports.uint8array=typeof Uint8Array!==\"undefined\";if(typeof ArrayBuffer===\"undefined\"){exports.blob=false}else{var buffer=new ArrayBuffer(0);try{exports.blob=new Blob([buffer],{type:\"application/zip\"}).size===0}catch(e){try{var Builder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;var builder=new Builder;builder.append(buffer);exports.blob=builder.getBlob(\"application/zip\").size===0}catch(e){exports.blob=false}}}}).call(this,typeof Buffer!==\"undefined\"?Buffer:undefined)},{}],18:[function(_dereq_,module,exports){\"use strict\";var DataReader=_dereq_(\"./dataReader\");function Uint8ArrayReader(data){if(data){this.data=data;this.length=this.data.length;this.index=0}}Uint8ArrayReader.prototype=new DataReader;Uint8ArrayReader.prototype.byteAt=function(i){return this.data[i]};Uint8ArrayReader.prototype.lastIndexOfSignature=function(sig){var sig0=sig.charCodeAt(0),sig1=sig.charCodeAt(1),sig2=sig.charCodeAt(2),sig3=sig.charCodeAt(3);for(var i=this.length-4;i>=0;--i){if(this.data[i]===sig0&&this.data[i+1]===sig1&&this.data[i+2]===sig2&&this.data[i+3]===sig3){return i}}return-1};Uint8ArrayReader.prototype.readData=function(size){this.checkOffset(size);if(size===0){return new Uint8Array(0)}var result=this.data.subarray(this.index,this.index+size);this.index+=size;return result};module.exports=Uint8ArrayReader},{\"./dataReader\":5}],19:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"./utils\");var Uint8ArrayWriter=function(length){this.data=new Uint8Array(length);this.index=0};Uint8ArrayWriter.prototype={append:function(input){if(input.length!==0){input=utils.transformTo(\"uint8array\",input);this.data.set(input,this.index);this.index+=input.length}},finalize:function(){return this.data}};module.exports=Uint8ArrayWriter},{\"./utils\":21}],20:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"./utils\");var support=_dereq_(\"./support\");var nodeBuffer=_dereq_(\"./nodeBuffer\");var _utf8len=new Array(256);for(var i=0;i<256;i++){_utf8len[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1}_utf8len[254]=_utf8len[254]=1;var string2buf=function(str){var buf,c,c2,m_pos,i,str_len=str.length,buf_len=0;for(m_pos=0;m_pos<str_len;m_pos++){c=str.charCodeAt(m_pos);if((c&64512)===55296&&m_pos+1<str_len){c2=str.charCodeAt(m_pos+1);if((c2&64512)===56320){c=65536+(c-55296<<10)+(c2-56320);m_pos++}}buf_len+=c<128?1:c<2048?2:c<65536?3:4}if(support.uint8array){buf=new Uint8Array(buf_len)}else{buf=new Array(buf_len)}for(i=0,m_pos=0;i<buf_len;m_pos++){c=str.charCodeAt(m_pos);if((c&64512)===55296&&m_pos+1<str_len){c2=str.charCodeAt(m_pos+1);if((c2&64512)===56320){c=65536+(c-55296<<10)+(c2-56320);m_pos++}}if(c<128){buf[i++]=c}else if(c<2048){buf[i++]=192|c>>>6;buf[i++]=128|c&63}else if(c<65536){buf[i++]=224|c>>>12;buf[i++]=128|c>>>6&63;buf[i++]=128|c&63}else{buf[i++]=240|c>>>18;buf[i++]=128|c>>>12&63;buf[i++]=128|c>>>6&63;buf[i++]=128|c&63}}return buf};var utf8border=function(buf,max){var pos;max=max||buf.length;if(max>buf.length){max=buf.length}pos=max-1;while(pos>=0&&(buf[pos]&192)===128){pos--}if(pos<0){return max}if(pos===0){return max}return pos+_utf8len[buf[pos]]>max?pos:max};var buf2string=function(buf){var str,i,out,c,c_len;var len=buf.length;var utf16buf=new Array(len*2);for(out=0,i=0;i<len;){c=buf[i++];if(c<128){utf16buf[out++]=c;continue}c_len=_utf8len[c];if(c_len>4){utf16buf[out++]=65533;i+=c_len-1;continue}c&=c_len===2?31:c_len===3?15:7;while(c_len>1&&i<len){c=c<<6|buf[i++]&63;c_len--}if(c_len>1){utf16buf[out++]=65533;continue}if(c<65536){utf16buf[out++]=c}else{c-=65536;utf16buf[out++]=55296|c>>10&1023;utf16buf[out++]=56320|c&1023}}if(utf16buf.length!==out){if(utf16buf.subarray){utf16buf=utf16buf.subarray(0,out)}else{utf16buf.length=out}}return utils.applyFromCharCode(utf16buf)};exports.utf8encode=function utf8encode(str){if(support.nodebuffer){return nodeBuffer(str,\"utf-8\")}return string2buf(str)};exports.utf8decode=function utf8decode(buf){if(support.nodebuffer){return utils.transformTo(\"nodebuffer\",buf).toString(\"utf-8\")}buf=utils.transformTo(support.uint8array?\"uint8array\":\"array\",buf);var result=[],k=0,len=buf.length,chunk=65536;while(k<len){var nextBoundary=utf8border(buf,Math.min(k+chunk,len));if(support.uint8array){result.push(buf2string(buf.subarray(k,nextBoundary)))}else{result.push(buf2string(buf.slice(k,nextBoundary)))}k=nextBoundary}return result.join(\"\")}},{\"./nodeBuffer\":11,\"./support\":17,\"./utils\":21}],21:[function(_dereq_,module,exports){\"use strict\";var support=_dereq_(\"./support\");var compressions=_dereq_(\"./compressions\");var nodeBuffer=_dereq_(\"./nodeBuffer\");exports.string2binary=function(str){var result=\"\";for(var i=0;i<str.length;i++){result+=String.fromCharCode(str.charCodeAt(i)&255)}return result};exports.arrayBuffer2Blob=function(buffer){exports.checkSupport(\"blob\");try{return new Blob([buffer],{type:\"application/zip\"})}catch(e){try{var Builder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder;var builder=new Builder;builder.append(buffer);return builder.getBlob(\"application/zip\")}catch(e){throw new Error(\"Bug : can't construct the Blob.\")}}};function identity(input){return input}function stringToArrayLike(str,array){for(var i=0;i<str.length;++i){array[i]=str.charCodeAt(i)&255}return array}function arrayLikeToString(array){var chunk=65536;var result=[],len=array.length,type=exports.getTypeOf(array),k=0,canUseApply=true;try{switch(type){case\"uint8array\":String.fromCharCode.apply(null,new Uint8Array(0));break;case\"nodebuffer\":String.fromCharCode.apply(null,nodeBuffer(0));break}}catch(e){canUseApply=false}if(!canUseApply){var resultStr=\"\";for(var i=0;i<array.length;i++){resultStr+=String.fromCharCode(array[i])}return resultStr}while(k<len&&chunk>1){try{if(type===\"array\"||type===\"nodebuffer\"){result.push(String.fromCharCode.apply(null,array.slice(k,Math.min(k+chunk,len))))}else{result.push(String.fromCharCode.apply(null,array.subarray(k,Math.min(k+chunk,len))))}k+=chunk}catch(e){chunk=Math.floor(chunk/2)}}return result.join(\"\")}exports.applyFromCharCode=arrayLikeToString;function arrayLikeToArrayLike(arrayFrom,arrayTo){for(var i=0;i<arrayFrom.length;i++){arrayTo[i]=arrayFrom[i]}return arrayTo}var transform={};transform[\"string\"]={string:identity,array:function(input){return stringToArrayLike(input,new Array(input.length))},arraybuffer:function(input){return transform[\"string\"][\"uint8array\"](input).buffer},uint8array:function(input){return stringToArrayLike(input,new Uint8Array(input.length))},nodebuffer:function(input){return stringToArrayLike(input,nodeBuffer(input.length))}};transform[\"array\"]={string:arrayLikeToString,array:identity,arraybuffer:function(input){return new Uint8Array(input).buffer},uint8array:function(input){return new Uint8Array(input)},nodebuffer:function(input){return nodeBuffer(input)}};transform[\"arraybuffer\"]={string:function(input){return arrayLikeToString(new Uint8Array(input))},array:function(input){return arrayLikeToArrayLike(new Uint8Array(input),new Array(input.byteLength))},arraybuffer:identity,uint8array:function(input){return new Uint8Array(input)},nodebuffer:function(input){return nodeBuffer(new Uint8Array(input))}};transform[\"uint8array\"]={string:arrayLikeToString,array:function(input){return arrayLikeToArrayLike(input,new Array(input.length))},arraybuffer:function(input){return input.buffer},uint8array:identity,nodebuffer:function(input){return nodeBuffer(input)}};transform[\"nodebuffer\"]={string:arrayLikeToString,array:function(input){return arrayLikeToArrayLike(input,new Array(input.length))},arraybuffer:function(input){return transform[\"nodebuffer\"][\"uint8array\"](input).buffer},uint8array:function(input){return arrayLikeToArrayLike(input,new Uint8Array(input.length))},nodebuffer:identity};exports.transformTo=function(outputType,input){if(!input){input=\"\"}if(!outputType){return input}exports.checkSupport(outputType);var inputType=exports.getTypeOf(input);var result=transform[inputType][outputType](input);return result};exports.getTypeOf=function(input){if(typeof input===\"string\"){return\"string\"}if(Object.prototype.toString.call(input)===\"[object Array]\"){return\"array\"}if(support.nodebuffer&&nodeBuffer.test(input)){return\"nodebuffer\"}if(support.uint8array&&input instanceof Uint8Array){return\"uint8array\"}if(support.arraybuffer&&input instanceof ArrayBuffer){return\"arraybuffer\"}};exports.checkSupport=function(type){var supported=support[type.toLowerCase()];if(!supported){throw new Error(type+\" is not supported by this browser\")}};exports.MAX_VALUE_16BITS=65535;exports.MAX_VALUE_32BITS=-1;exports.pretty=function(str){var res=\"\",code,i;for(i=0;i<(str||\"\").length;i++){code=str.charCodeAt(i);res+=\"\\\\x\"+(code<16?\"0\":\"\")+code.toString(16).toUpperCase();\r\n}return res};exports.findCompression=function(compressionMethod){for(var method in compressions){if(!compressions.hasOwnProperty(method)){continue}if(compressions[method].magic===compressionMethod){return compressions[method]}}return null};exports.isRegExp=function(object){return Object.prototype.toString.call(object)===\"[object RegExp]\"}},{\"./compressions\":3,\"./nodeBuffer\":11,\"./support\":17}],22:[function(_dereq_,module,exports){\"use strict\";var StringReader=_dereq_(\"./stringReader\");var NodeBufferReader=_dereq_(\"./nodeBufferReader\");var Uint8ArrayReader=_dereq_(\"./uint8ArrayReader\");var utils=_dereq_(\"./utils\");var sig=_dereq_(\"./signature\");var ZipEntry=_dereq_(\"./zipEntry\");var support=_dereq_(\"./support\");var jszipProto=_dereq_(\"./object\");function ZipEntries(data,loadOptions){this.files=[];this.loadOptions=loadOptions;if(data){this.load(data)}}ZipEntries.prototype={checkSignature:function(expectedSignature){var signature=this.reader.readString(4);if(signature!==expectedSignature){throw new Error(\"Corrupted zip or bug : unexpected signature \"+\"(\"+utils.pretty(signature)+\", expected \"+utils.pretty(expectedSignature)+\")\")}},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2);this.diskWithCentralDirStart=this.reader.readInt(2);this.centralDirRecordsOnThisDisk=this.reader.readInt(2);this.centralDirRecords=this.reader.readInt(2);this.centralDirSize=this.reader.readInt(4);this.centralDirOffset=this.reader.readInt(4);this.zipCommentLength=this.reader.readInt(2);this.zipComment=this.reader.readString(this.zipCommentLength);this.zipComment=jszipProto.utf8decode(this.zipComment)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8);this.versionMadeBy=this.reader.readString(2);this.versionNeeded=this.reader.readInt(2);this.diskNumber=this.reader.readInt(4);this.diskWithCentralDirStart=this.reader.readInt(4);this.centralDirRecordsOnThisDisk=this.reader.readInt(8);this.centralDirRecords=this.reader.readInt(8);this.centralDirSize=this.reader.readInt(8);this.centralDirOffset=this.reader.readInt(8);this.zip64ExtensibleData={};var extraDataSize=this.zip64EndOfCentralSize-44,index=0,extraFieldId,extraFieldLength,extraFieldValue;while(index<extraDataSize){extraFieldId=this.reader.readInt(2);extraFieldLength=this.reader.readInt(4);extraFieldValue=this.reader.readString(extraFieldLength);this.zip64ExtensibleData[extraFieldId]={id:extraFieldId,length:extraFieldLength,value:extraFieldValue}}},readBlockZip64EndOfCentralLocator:function(){this.diskWithZip64CentralDirStart=this.reader.readInt(4);this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8);this.disksCount=this.reader.readInt(4);if(this.disksCount>1){throw new Error(\"Multi-volumes zip are not supported\")}},readLocalFiles:function(){var i,file;for(i=0;i<this.files.length;i++){file=this.files[i];this.reader.setIndex(file.localHeaderOffset);this.checkSignature(sig.LOCAL_FILE_HEADER);file.readLocalPart(this.reader);file.handleUTF8()}},readCentralDir:function(){var file;this.reader.setIndex(this.centralDirOffset);while(this.reader.readString(4)===sig.CENTRAL_FILE_HEADER){file=new ZipEntry({zip64:this.zip64},this.loadOptions);file.readCentralPart(this.reader);this.files.push(file)}},readEndOfCentral:function(){var offset=this.reader.lastIndexOfSignature(sig.CENTRAL_DIRECTORY_END);if(offset===-1){throw new Error(\"Corrupted zip : can't find end of central directory\")}this.reader.setIndex(offset);this.checkSignature(sig.CENTRAL_DIRECTORY_END);this.readBlockEndOfCentral();if(this.diskNumber===utils.MAX_VALUE_16BITS||this.diskWithCentralDirStart===utils.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===utils.MAX_VALUE_16BITS||this.centralDirRecords===utils.MAX_VALUE_16BITS||this.centralDirSize===utils.MAX_VALUE_32BITS||this.centralDirOffset===utils.MAX_VALUE_32BITS){this.zip64=true;offset=this.reader.lastIndexOfSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);if(offset===-1){throw new Error(\"Corrupted zip : can't find the ZIP64 end of central directory locator\")}this.reader.setIndex(offset);this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_LOCATOR);this.readBlockZip64EndOfCentralLocator();this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir);this.checkSignature(sig.ZIP64_CENTRAL_DIRECTORY_END);this.readBlockZip64EndOfCentral()}},prepareReader:function(data){var type=utils.getTypeOf(data);if(type===\"string\"&&!support.uint8array){this.reader=new StringReader(data,this.loadOptions.optimizedBinaryString)}else if(type===\"nodebuffer\"){this.reader=new NodeBufferReader(data)}else{this.reader=new Uint8ArrayReader(utils.transformTo(\"uint8array\",data))}},load:function(data){this.prepareReader(data);this.readEndOfCentral();this.readCentralDir();this.readLocalFiles()}};module.exports=ZipEntries},{\"./nodeBufferReader\":12,\"./object\":13,\"./signature\":14,\"./stringReader\":15,\"./support\":17,\"./uint8ArrayReader\":18,\"./utils\":21,\"./zipEntry\":23}],23:[function(_dereq_,module,exports){\"use strict\";var StringReader=_dereq_(\"./stringReader\");var utils=_dereq_(\"./utils\");var CompressedObject=_dereq_(\"./compressedObject\");var jszipProto=_dereq_(\"./object\");function ZipEntry(options,loadOptions){this.options=options;this.loadOptions=loadOptions}ZipEntry.prototype={isEncrypted:function(){return(this.bitFlag&1)===1},useUTF8:function(){return(this.bitFlag&2048)===2048},prepareCompressedContent:function(reader,from,length){return function(){var previousIndex=reader.index;reader.setIndex(from);var compressedFileData=reader.readData(length);reader.setIndex(previousIndex);return compressedFileData}},prepareContent:function(reader,from,length,compression,uncompressedSize){return function(){var compressedFileData=utils.transformTo(compression.uncompressInputType,this.getCompressedContent());var uncompressedFileData=compression.uncompress(compressedFileData);if(uncompressedFileData.length!==uncompressedSize){throw new Error(\"Bug : uncompressed data size mismatch\")}return uncompressedFileData}},readLocalPart:function(reader){var compression,localExtraFieldsLength;reader.skip(22);this.fileNameLength=reader.readInt(2);localExtraFieldsLength=reader.readInt(2);this.fileName=reader.readString(this.fileNameLength);reader.skip(localExtraFieldsLength);if(this.compressedSize==-1||this.uncompressedSize==-1){throw new Error(\"Bug or corrupted zip : didn't get enough informations from the central directory \"+\"(compressedSize == -1 || uncompressedSize == -1)\")}compression=utils.findCompression(this.compressionMethod);if(compression===null){throw new Error(\"Corrupted zip : compression \"+utils.pretty(this.compressionMethod)+\" unknown (inner file : \"+this.fileName+\")\")}this.decompressed=new CompressedObject;this.decompressed.compressedSize=this.compressedSize;this.decompressed.uncompressedSize=this.uncompressedSize;this.decompressed.crc32=this.crc32;this.decompressed.compressionMethod=this.compressionMethod;this.decompressed.getCompressedContent=this.prepareCompressedContent(reader,reader.index,this.compressedSize,compression);this.decompressed.getContent=this.prepareContent(reader,reader.index,this.compressedSize,compression,this.uncompressedSize);if(this.loadOptions.checkCRC32){this.decompressed=utils.transformTo(\"string\",this.decompressed.getContent());if(jszipProto.crc32(this.decompressed)!==this.crc32){throw new Error(\"Corrupted zip : CRC32 mismatch\")}}},readCentralPart:function(reader){this.versionMadeBy=reader.readString(2);this.versionNeeded=reader.readInt(2);this.bitFlag=reader.readInt(2);this.compressionMethod=reader.readString(2);this.date=reader.readDate();this.crc32=reader.readInt(4);this.compressedSize=reader.readInt(4);this.uncompressedSize=reader.readInt(4);this.fileNameLength=reader.readInt(2);this.extraFieldsLength=reader.readInt(2);this.fileCommentLength=reader.readInt(2);this.diskNumberStart=reader.readInt(2);this.internalFileAttributes=reader.readInt(2);this.externalFileAttributes=reader.readInt(4);this.localHeaderOffset=reader.readInt(4);if(this.isEncrypted()){throw new Error(\"Encrypted zip are not supported\")}this.fileName=reader.readString(this.fileNameLength);this.readExtraFields(reader);this.parseZIP64ExtraField(reader);this.fileComment=reader.readString(this.fileCommentLength);this.dir=this.externalFileAttributes&16?true:false},parseZIP64ExtraField:function(reader){if(!this.extraFields[1]){return}var extraReader=new StringReader(this.extraFields[1].value);if(this.uncompressedSize===utils.MAX_VALUE_32BITS){this.uncompressedSize=extraReader.readInt(8)}if(this.compressedSize===utils.MAX_VALUE_32BITS){this.compressedSize=extraReader.readInt(8)}if(this.localHeaderOffset===utils.MAX_VALUE_32BITS){this.localHeaderOffset=extraReader.readInt(8)}if(this.diskNumberStart===utils.MAX_VALUE_32BITS){this.diskNumberStart=extraReader.readInt(4)}},readExtraFields:function(reader){var start=reader.index,extraFieldId,extraFieldLength,extraFieldValue;this.extraFields=this.extraFields||{};while(reader.index<start+this.extraFieldsLength){extraFieldId=reader.readInt(2);extraFieldLength=reader.readInt(2);extraFieldValue=reader.readString(extraFieldLength);this.extraFields[extraFieldId]={id:extraFieldId,length:extraFieldLength,value:extraFieldValue}}},handleUTF8:function(){if(this.useUTF8()){this.fileName=jszipProto.utf8decode(this.fileName);this.fileComment=jszipProto.utf8decode(this.fileComment)}else{var upath=this.findExtraFieldUnicodePath();if(upath!==null){this.fileName=upath}var ucomment=this.findExtraFieldUnicodeComment();if(ucomment!==null){this.fileComment=ucomment}}},findExtraFieldUnicodePath:function(){var upathField=this.extraFields[28789];if(upathField){var extraReader=new StringReader(upathField.value);if(extraReader.readInt(1)!==1){return null}if(jszipProto.crc32(this.fileName)!==extraReader.readInt(4)){return null}return jszipProto.utf8decode(extraReader.readString(upathField.length-5))}return null},findExtraFieldUnicodeComment:function(){var ucommentField=this.extraFields[25461];if(ucommentField){var extraReader=new StringReader(ucommentField.value);if(extraReader.readInt(1)!==1){return null}if(jszipProto.crc32(this.fileComment)!==extraReader.readInt(4)){return null}return jszipProto.utf8decode(extraReader.readString(ucommentField.length-5))}return null}};module.exports=ZipEntry},{\"./compressedObject\":2,\"./object\":13,\"./stringReader\":15,\"./utils\":21}],24:[function(_dereq_,module,exports){\"use strict\";var assign=_dereq_(\"./lib/utils/common\").assign;var deflate=_dereq_(\"./lib/deflate\");var inflate=_dereq_(\"./lib/inflate\");var constants=_dereq_(\"./lib/zlib/constants\");var pako={};assign(pako,deflate,inflate,constants);module.exports=pako},{\"./lib/deflate\":25,\"./lib/inflate\":26,\"./lib/utils/common\":27,\"./lib/zlib/constants\":30}],25:[function(_dereq_,module,exports){\"use strict\";var zlib_deflate=_dereq_(\"./zlib/deflate.js\");var utils=_dereq_(\"./utils/common\");var strings=_dereq_(\"./utils/strings\");var msg=_dereq_(\"./zlib/messages\");var zstream=_dereq_(\"./zlib/zstream\");var Z_NO_FLUSH=0;var Z_FINISH=4;var Z_OK=0;var Z_STREAM_END=1;var Z_DEFAULT_COMPRESSION=-1;var Z_DEFAULT_STRATEGY=0;var Z_DEFLATED=8;var Deflate=function(options){this.options=utils.assign({level:Z_DEFAULT_COMPRESSION,method:Z_DEFLATED,chunkSize:16384,windowBits:15,memLevel:8,strategy:Z_DEFAULT_STRATEGY,to:\"\"},options||{});var opt=this.options;if(opt.raw&&opt.windowBits>0){opt.windowBits=-opt.windowBits}else if(opt.gzip&&opt.windowBits>0&&opt.windowBits<16){opt.windowBits+=16}this.err=0;this.msg=\"\";this.ended=false;this.chunks=[];this.strm=new zstream;this.strm.avail_out=0;var status=zlib_deflate.deflateInit2(this.strm,opt.level,opt.method,opt.windowBits,opt.memLevel,opt.strategy);if(status!==Z_OK){throw new Error(msg[status])}if(opt.header){zlib_deflate.deflateSetHeader(this.strm,opt.header)}};Deflate.prototype.push=function(data,mode){var strm=this.strm;var chunkSize=this.options.chunkSize;var status,_mode;if(this.ended){return false}_mode=mode===~~mode?mode:mode===true?Z_FINISH:Z_NO_FLUSH;if(typeof data===\"string\"){strm.input=strings.string2buf(data)}else{strm.input=data}strm.next_in=0;strm.avail_in=strm.input.length;do{if(strm.avail_out===0){strm.output=new utils.Buf8(chunkSize);strm.next_out=0;strm.avail_out=chunkSize}status=zlib_deflate.deflate(strm,_mode);if(status!==Z_STREAM_END&&status!==Z_OK){this.onEnd(status);this.ended=true;return false}if(strm.avail_out===0||strm.avail_in===0&&_mode===Z_FINISH){if(this.options.to===\"string\"){this.onData(strings.buf2binstring(utils.shrinkBuf(strm.output,strm.next_out)))}else{this.onData(utils.shrinkBuf(strm.output,strm.next_out))}}}while((strm.avail_in>0||strm.avail_out===0)&&status!==Z_STREAM_END);if(_mode===Z_FINISH){status=zlib_deflate.deflateEnd(this.strm);this.onEnd(status);this.ended=true;return status===Z_OK}return true};Deflate.prototype.onData=function(chunk){this.chunks.push(chunk)};Deflate.prototype.onEnd=function(status){if(status===Z_OK){if(this.options.to===\"string\"){this.result=this.chunks.join(\"\")}else{this.result=utils.flattenChunks(this.chunks)}}this.chunks=[];this.err=status;this.msg=this.strm.msg};function deflate(input,options){var deflator=new Deflate(options);deflator.push(input,true);if(deflator.err){throw deflator.msg}return deflator.result}function deflateRaw(input,options){options=options||{};options.raw=true;return deflate(input,options)}function gzip(input,options){options=options||{};options.gzip=true;return deflate(input,options)}exports.Deflate=Deflate;exports.deflate=deflate;exports.deflateRaw=deflateRaw;exports.gzip=gzip},{\"./utils/common\":27,\"./utils/strings\":28,\"./zlib/deflate.js\":32,\"./zlib/messages\":37,\"./zlib/zstream\":39}],26:[function(_dereq_,module,exports){\"use strict\";var zlib_inflate=_dereq_(\"./zlib/inflate.js\");var utils=_dereq_(\"./utils/common\");var strings=_dereq_(\"./utils/strings\");var c=_dereq_(\"./zlib/constants\");var msg=_dereq_(\"./zlib/messages\");var zstream=_dereq_(\"./zlib/zstream\");var gzheader=_dereq_(\"./zlib/gzheader\");var Inflate=function(options){this.options=utils.assign({chunkSize:16384,windowBits:0,to:\"\"},options||{});var opt=this.options;if(opt.raw&&opt.windowBits>=0&&opt.windowBits<16){opt.windowBits=-opt.windowBits;if(opt.windowBits===0){opt.windowBits=-15}}if(opt.windowBits>=0&&opt.windowBits<16&&!(options&&options.windowBits)){opt.windowBits+=32}if(opt.windowBits>15&&opt.windowBits<48){if((opt.windowBits&15)===0){opt.windowBits|=15}}this.err=0;this.msg=\"\";this.ended=false;this.chunks=[];this.strm=new zstream;this.strm.avail_out=0;var status=zlib_inflate.inflateInit2(this.strm,opt.windowBits);if(status!==c.Z_OK){throw new Error(msg[status])}this.header=new gzheader;zlib_inflate.inflateGetHeader(this.strm,this.header)};Inflate.prototype.push=function(data,mode){var strm=this.strm;var chunkSize=this.options.chunkSize;var status,_mode;var next_out_utf8,tail,utf8str;if(this.ended){return false}_mode=mode===~~mode?mode:mode===true?c.Z_FINISH:c.Z_NO_FLUSH;if(typeof data===\"string\"){strm.input=strings.binstring2buf(data)}else{strm.input=data}strm.next_in=0;strm.avail_in=strm.input.length;do{if(strm.avail_out===0){strm.output=new utils.Buf8(chunkSize);strm.next_out=0;strm.avail_out=chunkSize}status=zlib_inflate.inflate(strm,c.Z_NO_FLUSH);if(status!==c.Z_STREAM_END&&status!==c.Z_OK){this.onEnd(status);this.ended=true;return false}if(strm.next_out){if(strm.avail_out===0||status===c.Z_STREAM_END||strm.avail_in===0&&_mode===c.Z_FINISH){if(this.options.to===\"string\"){next_out_utf8=strings.utf8border(strm.output,strm.next_out);tail=strm.next_out-next_out_utf8;utf8str=strings.buf2string(strm.output,next_out_utf8);strm.next_out=tail;strm.avail_out=chunkSize-tail;if(tail){utils.arraySet(strm.output,strm.output,next_out_utf8,tail,0)}this.onData(utf8str)}else{this.onData(utils.shrinkBuf(strm.output,strm.next_out))}}}}while(strm.avail_in>0&&status!==c.Z_STREAM_END);if(status===c.Z_STREAM_END){_mode=c.Z_FINISH}if(_mode===c.Z_FINISH){status=zlib_inflate.inflateEnd(this.strm);this.onEnd(status);this.ended=true;return status===c.Z_OK}return true};Inflate.prototype.onData=function(chunk){this.chunks.push(chunk)};Inflate.prototype.onEnd=function(status){if(status===c.Z_OK){if(this.options.to===\"string\"){this.result=this.chunks.join(\"\")}else{this.result=utils.flattenChunks(this.chunks)}}this.chunks=[];this.err=status;this.msg=this.strm.msg};function inflate(input,options){var inflator=new Inflate(options);inflator.push(input,true);if(inflator.err){throw inflator.msg}return inflator.result}function inflateRaw(input,options){options=options||{};options.raw=true;return inflate(input,options)}exports.Inflate=Inflate;exports.inflate=inflate;exports.inflateRaw=inflateRaw;exports.ungzip=inflate},{\"./utils/common\":27,\"./utils/strings\":28,\"./zlib/constants\":30,\"./zlib/gzheader\":33,\"./zlib/inflate.js\":35,\"./zlib/messages\":37,\"./zlib/zstream\":39}],27:[function(_dereq_,module,exports){\"use strict\";var TYPED_OK=typeof Uint8Array!==\"undefined\"&&typeof Uint16Array!==\"undefined\"&&typeof Int32Array!==\"undefined\";exports.assign=function(obj){var sources=Array.prototype.slice.call(arguments,1);while(sources.length){var source=sources.shift();if(!source){continue}if(typeof source!==\"object\"){throw new TypeError(source+\"must be non-object\")}for(var p in source){if(source.hasOwnProperty(p)){obj[p]=source[p]}}}return obj};exports.shrinkBuf=function(buf,size){if(buf.length===size){return buf}if(buf.subarray){return buf.subarray(0,size)}buf.length=size;return buf};var fnTyped={arraySet:function(dest,src,src_offs,len,dest_offs){if(src.subarray&&dest.subarray){dest.set(src.subarray(src_offs,src_offs+len),dest_offs);return}for(var i=0;i<len;i++){dest[dest_offs+i]=src[src_offs+i]}},flattenChunks:function(chunks){var i,l,len,pos,chunk,result;len=0;for(i=0,l=chunks.length;i<l;i++){len+=chunks[i].length}result=new Uint8Array(len);pos=0;for(i=0,l=chunks.length;i<l;i++){chunk=chunks[i];result.set(chunk,pos);pos+=chunk.length}return result}};var fnUntyped={arraySet:function(dest,src,src_offs,len,dest_offs){for(var i=0;i<len;i++){dest[dest_offs+i]=src[src_offs+i]}},flattenChunks:function(chunks){return[].concat.apply([],chunks)}};exports.setTyped=function(on){if(on){exports.Buf8=Uint8Array;exports.Buf16=Uint16Array;exports.Buf32=Int32Array;exports.assign(exports,fnTyped)}else{exports.Buf8=Array;exports.Buf16=Array;exports.Buf32=Array;exports.assign(exports,fnUntyped)}};exports.setTyped(TYPED_OK)},{}],28:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"./common\");var STR_APPLY_OK=true;var STR_APPLY_UIA_OK=true;try{String.fromCharCode.apply(null,[0])}catch(__){STR_APPLY_OK=false}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(__){STR_APPLY_UIA_OK=false}var _utf8len=new utils.Buf8(256);for(var i=0;i<256;i++){_utf8len[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1}_utf8len[254]=_utf8len[254]=1;exports.string2buf=function(str){var buf,c,c2,m_pos,i,str_len=str.length,buf_len=0;for(m_pos=0;m_pos<str_len;m_pos++){c=str.charCodeAt(m_pos);if((c&64512)===55296&&m_pos+1<str_len){c2=str.charCodeAt(m_pos+1);if((c2&64512)===56320){c=65536+(c-55296<<10)+(c2-56320);m_pos++}}buf_len+=c<128?1:c<2048?2:c<65536?3:4}buf=new utils.Buf8(buf_len);for(i=0,m_pos=0;i<buf_len;m_pos++){c=str.charCodeAt(m_pos);if((c&64512)===55296&&m_pos+1<str_len){c2=str.charCodeAt(m_pos+1);if((c2&64512)===56320){c=65536+(c-55296<<10)+(c2-56320);m_pos++}}if(c<128){buf[i++]=c}else if(c<2048){buf[i++]=192|c>>>6;buf[i++]=128|c&63}else if(c<65536){buf[i++]=224|c>>>12;buf[i++]=128|c>>>6&63;buf[i++]=128|c&63}else{buf[i++]=240|c>>>18;buf[i++]=128|c>>>12&63;buf[i++]=128|c>>>6&63;buf[i++]=128|c&63}}return buf};function buf2binstring(buf,len){if(len<65537){if(buf.subarray&&STR_APPLY_UIA_OK||!buf.subarray&&STR_APPLY_OK){return String.fromCharCode.apply(null,utils.shrinkBuf(buf,len))}}var result=\"\";for(var i=0;i<len;i++){result+=String.fromCharCode(buf[i])}return result}exports.buf2binstring=function(buf){return buf2binstring(buf,buf.length)};exports.binstring2buf=function(str){var buf=new utils.Buf8(str.length);for(var i=0,len=buf.length;i<len;i++){buf[i]=str.charCodeAt(i)}return buf};exports.buf2string=function(buf,max){var i,out,c,c_len;var len=max||buf.length;var utf16buf=new Array(len*2);for(out=0,i=0;i<len;){c=buf[i++];if(c<128){utf16buf[out++]=c;continue}c_len=_utf8len[c];if(c_len>4){utf16buf[out++]=65533;i+=c_len-1;continue}c&=c_len===2?31:c_len===3?15:7;while(c_len>1&&i<len){c=c<<6|buf[i++]&63;c_len--}if(c_len>1){utf16buf[out++]=65533;continue}if(c<65536){utf16buf[out++]=c}else{c-=65536;utf16buf[out++]=55296|c>>10&1023;utf16buf[out++]=56320|c&1023}}return buf2binstring(utf16buf,out)};exports.utf8border=function(buf,max){var pos;max=max||buf.length;if(max>buf.length){max=buf.length}pos=max-1;while(pos>=0&&(buf[pos]&192)===128){pos--}if(pos<0){return max}if(pos===0){return max}return pos+_utf8len[buf[pos]]>max?pos:max}},{\"./common\":27}],29:[function(_dereq_,module,exports){\"use strict\";function adler32(adler,buf,len,pos){var s1=adler&65535|0,s2=adler>>>16&65535|0,n=0;while(len!==0){n=len>2e3?2e3:len;len-=n;do{s1=s1+buf[pos++]|0;s2=s2+s1|0}while(--n);s1%=65521;s2%=65521}return s1|s2<<16|0}module.exports=adler32},{}],30:[function(_dereq_,module,exports){module.exports={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8}},{}],31:[function(_dereq_,module,exports){\"use strict\";function makeTable(){var c,table=[];for(var n=0;n<256;n++){c=n;for(var k=0;k<8;k++){c=c&1?3988292384^c>>>1:c>>>1}table[n]=c}return table}var crcTable=makeTable();function crc32(crc,buf,len,pos){var t=crcTable,end=pos+len;crc=crc^-1;for(var i=pos;i<end;i++){crc=crc>>>8^t[(crc^buf[i])&255]}return crc^-1}module.exports=crc32},{}],32:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"../utils/common\");var trees=_dereq_(\"./trees\");var adler32=_dereq_(\"./adler32\");var crc32=_dereq_(\"./crc32\");var msg=_dereq_(\"./messages\");var Z_NO_FLUSH=0;var Z_PARTIAL_FLUSH=1;var Z_FULL_FLUSH=3;var Z_FINISH=4;var Z_BLOCK=5;var Z_OK=0;var Z_STREAM_END=1;var Z_STREAM_ERROR=-2;var Z_DATA_ERROR=-3;var Z_BUF_ERROR=-5;var Z_DEFAULT_COMPRESSION=-1;var Z_FILTERED=1;var Z_HUFFMAN_ONLY=2;var Z_RLE=3;var Z_FIXED=4;var Z_DEFAULT_STRATEGY=0;var Z_UNKNOWN=2;var Z_DEFLATED=8;var MAX_MEM_LEVEL=9;var MAX_WBITS=15;var DEF_MEM_LEVEL=8;var LENGTH_CODES=29;var LITERALS=256;var L_CODES=LITERALS+1+LENGTH_CODES;var D_CODES=30;var BL_CODES=19;var HEAP_SIZE=2*L_CODES+1;var MAX_BITS=15;var MIN_MATCH=3;var MAX_MATCH=258;var MIN_LOOKAHEAD=MAX_MATCH+MIN_MATCH+1;var PRESET_DICT=32;var INIT_STATE=42;var EXTRA_STATE=69;var NAME_STATE=73;var COMMENT_STATE=91;var HCRC_STATE=103;var BUSY_STATE=113;var FINISH_STATE=666;var BS_NEED_MORE=1;var BS_BLOCK_DONE=2;var BS_FINISH_STARTED=3;var BS_FINISH_DONE=4;var OS_CODE=3;function err(strm,errorCode){strm.msg=msg[errorCode];return errorCode}function rank(f){return(f<<1)-(f>4?9:0)}function zero(buf){var len=buf.length;while(--len>=0){buf[len]=0}}function flush_pending(strm){var s=strm.state;var len=s.pending;if(len>strm.avail_out){len=strm.avail_out}if(len===0){return}utils.arraySet(strm.output,s.pending_buf,s.pending_out,len,strm.next_out);strm.next_out+=len;s.pending_out+=len;strm.total_out+=len;strm.avail_out-=len;s.pending-=len;if(s.pending===0){s.pending_out=0}}function flush_block_only(s,last){trees._tr_flush_block(s,s.block_start>=0?s.block_start:-1,s.strstart-s.block_start,last);s.block_start=s.strstart;flush_pending(s.strm)}function put_byte(s,b){s.pending_buf[s.pending++]=b}function putShortMSB(s,b){s.pending_buf[s.pending++]=b>>>8&255;s.pending_buf[s.pending++]=b&255}function read_buf(strm,buf,start,size){var len=strm.avail_in;if(len>size){len=size}if(len===0){return 0}strm.avail_in-=len;utils.arraySet(buf,strm.input,strm.next_in,len,start);if(strm.state.wrap===1){strm.adler=adler32(strm.adler,buf,len,start)}else if(strm.state.wrap===2){strm.adler=crc32(strm.adler,buf,len,start)}strm.next_in+=len;strm.total_in+=len;return len}function longest_match(s,cur_match){var chain_length=s.max_chain_length;var scan=s.strstart;var match;var len;var best_len=s.prev_length;var nice_match=s.nice_match;var limit=s.strstart>s.w_size-MIN_LOOKAHEAD?s.strstart-(s.w_size-MIN_LOOKAHEAD):0;var _win=s.window;var wmask=s.w_mask;var prev=s.prev;var strend=s.strstart+MAX_MATCH;var scan_end1=_win[scan+best_len-1];var scan_end=_win[scan+best_len];if(s.prev_length>=s.good_match){chain_length>>=2}if(nice_match>s.lookahead){nice_match=s.lookahead}do{match=cur_match;if(_win[match+best_len]!==scan_end||_win[match+best_len-1]!==scan_end1||_win[match]!==_win[scan]||_win[++match]!==_win[scan+1]){continue}scan+=2;match++;do{}while(_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&_win[++scan]===_win[++match]&&scan<strend);len=MAX_MATCH-(strend-scan);scan=strend-MAX_MATCH;if(len>best_len){s.match_start=cur_match;best_len=len;if(len>=nice_match){break}scan_end1=_win[scan+best_len-1];scan_end=_win[scan+best_len]}}while((cur_match=prev[cur_match&wmask])>limit&&--chain_length!==0);if(best_len<=s.lookahead){return best_len}return s.lookahead}function fill_window(s){var _w_size=s.w_size;var p,n,m,more,str;do{more=s.window_size-s.lookahead-s.strstart;if(s.strstart>=_w_size+(_w_size-MIN_LOOKAHEAD)){utils.arraySet(s.window,s.window,_w_size,_w_size,0);s.match_start-=_w_size;s.strstart-=_w_size;s.block_start-=_w_size;n=s.hash_size;p=n;do{m=s.head[--p];s.head[p]=m>=_w_size?m-_w_size:0}while(--n);n=_w_size;p=n;do{m=s.prev[--p];s.prev[p]=m>=_w_size?m-_w_size:0}while(--n);more+=_w_size}if(s.strm.avail_in===0){break}n=read_buf(s.strm,s.window,s.strstart+s.lookahead,more);s.lookahead+=n;if(s.lookahead+s.insert>=MIN_MATCH){str=s.strstart-s.insert;s.ins_h=s.window[str];s.ins_h=(s.ins_h<<s.hash_shift^s.window[str+1])&s.hash_mask;while(s.insert){s.ins_h=(s.ins_h<<s.hash_shift^s.window[str+MIN_MATCH-1])&s.hash_mask;s.prev[str&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=str;str++;s.insert--;if(s.lookahead+s.insert<MIN_MATCH){break}}}}while(s.lookahead<MIN_LOOKAHEAD&&s.strm.avail_in!==0)}function deflate_stored(s,flush){var max_block_size=65535;if(max_block_size>s.pending_buf_size-5){max_block_size=s.pending_buf_size-5}for(;;){if(s.lookahead<=1){fill_window(s);if(s.lookahead===0&&flush===Z_NO_FLUSH){return BS_NEED_MORE}if(s.lookahead===0){break}}s.strstart+=s.lookahead;s.lookahead=0;var max_start=s.block_start+max_block_size;if(s.strstart===0||s.strstart>=max_start){s.lookahead=s.strstart-max_start;s.strstart=max_start;flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}if(s.strstart-s.block_start>=s.w_size-MIN_LOOKAHEAD){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.strstart>s.block_start){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_NEED_MORE}function deflate_fast(s,flush){var hash_head;var bflush;for(;;){if(s.lookahead<MIN_LOOKAHEAD){fill_window(s);if(s.lookahead<MIN_LOOKAHEAD&&flush===Z_NO_FLUSH){return BS_NEED_MORE}if(s.lookahead===0){break}}hash_head=0;if(s.lookahead>=MIN_MATCH){s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart}if(hash_head!==0&&s.strstart-hash_head<=s.w_size-MIN_LOOKAHEAD){s.match_length=longest_match(s,hash_head)}if(s.match_length>=MIN_MATCH){bflush=trees._tr_tally(s,s.strstart-s.match_start,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;if(s.match_length<=s.max_lazy_match&&s.lookahead>=MIN_MATCH){s.match_length--;do{s.strstart++;s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart}while(--s.match_length!==0);s.strstart++}else{s.strstart+=s.match_length;s.match_length=0;s.ins_h=s.window[s.strstart];s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+1])&s.hash_mask}}else{bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++}if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=s.strstart<MIN_MATCH-1?s.strstart:MIN_MATCH-1;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}function deflate_slow(s,flush){var hash_head;var bflush;var max_insert;for(;;){if(s.lookahead<MIN_LOOKAHEAD){fill_window(s);if(s.lookahead<MIN_LOOKAHEAD&&flush===Z_NO_FLUSH){return BS_NEED_MORE}if(s.lookahead===0){break}}hash_head=0;if(s.lookahead>=MIN_MATCH){s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart}s.prev_length=s.match_length;s.prev_match=s.match_start;s.match_length=MIN_MATCH-1;if(hash_head!==0&&s.prev_length<s.max_lazy_match&&s.strstart-hash_head<=s.w_size-MIN_LOOKAHEAD){s.match_length=longest_match(s,hash_head);if(s.match_length<=5&&(s.strategy===Z_FILTERED||s.match_length===MIN_MATCH&&s.strstart-s.match_start>4096)){s.match_length=MIN_MATCH-1}}if(s.prev_length>=MIN_MATCH&&s.match_length<=s.prev_length){max_insert=s.strstart+s.lookahead-MIN_MATCH;bflush=trees._tr_tally(s,s.strstart-1-s.prev_match,s.prev_length-MIN_MATCH);s.lookahead-=s.prev_length-1;s.prev_length-=2;do{if(++s.strstart<=max_insert){s.ins_h=(s.ins_h<<s.hash_shift^s.window[s.strstart+MIN_MATCH-1])&s.hash_mask;hash_head=s.prev[s.strstart&s.w_mask]=s.head[s.ins_h];s.head[s.ins_h]=s.strstart}}while(--s.prev_length!==0);s.match_available=0;s.match_length=MIN_MATCH-1;s.strstart++;if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}else if(s.match_available){bflush=trees._tr_tally(s,0,s.window[s.strstart-1]);if(bflush){flush_block_only(s,false)}s.strstart++;s.lookahead--;if(s.strm.avail_out===0){return BS_NEED_MORE}}else{s.match_available=1;s.strstart++;s.lookahead--}}if(s.match_available){bflush=trees._tr_tally(s,0,s.window[s.strstart-1]);s.match_available=0}s.insert=s.strstart<MIN_MATCH-1?s.strstart:MIN_MATCH-1;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}function deflate_rle(s,flush){var bflush;var prev;var scan,strend;var _win=s.window;for(;;){if(s.lookahead<=MAX_MATCH){fill_window(s);if(s.lookahead<=MAX_MATCH&&flush===Z_NO_FLUSH){return BS_NEED_MORE}if(s.lookahead===0){break}}s.match_length=0;if(s.lookahead>=MIN_MATCH&&s.strstart>0){scan=s.strstart-1;prev=_win[scan];if(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]){strend=s.strstart+MAX_MATCH;do{}while(prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&prev===_win[++scan]&&scan<strend);s.match_length=MAX_MATCH-(strend-scan);if(s.match_length>s.lookahead){s.match_length=s.lookahead}}}if(s.match_length>=MIN_MATCH){bflush=trees._tr_tally(s,1,s.match_length-MIN_MATCH);s.lookahead-=s.match_length;s.strstart+=s.match_length;s.match_length=0}else{bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++}if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}function deflate_huff(s,flush){\r\nvar bflush;for(;;){if(s.lookahead===0){fill_window(s);if(s.lookahead===0){if(flush===Z_NO_FLUSH){return BS_NEED_MORE}break}}s.match_length=0;bflush=trees._tr_tally(s,0,s.window[s.strstart]);s.lookahead--;s.strstart++;if(bflush){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}}s.insert=0;if(flush===Z_FINISH){flush_block_only(s,true);if(s.strm.avail_out===0){return BS_FINISH_STARTED}return BS_FINISH_DONE}if(s.last_lit){flush_block_only(s,false);if(s.strm.avail_out===0){return BS_NEED_MORE}}return BS_BLOCK_DONE}var Config=function(good_length,max_lazy,nice_length,max_chain,func){this.good_length=good_length;this.max_lazy=max_lazy;this.nice_length=nice_length;this.max_chain=max_chain;this.func=func};var configuration_table;configuration_table=[new Config(0,0,0,0,deflate_stored),new Config(4,4,8,4,deflate_fast),new Config(4,5,16,8,deflate_fast),new Config(4,6,32,32,deflate_fast),new Config(4,4,16,16,deflate_slow),new Config(8,16,32,32,deflate_slow),new Config(8,16,128,128,deflate_slow),new Config(8,32,128,256,deflate_slow),new Config(32,128,258,1024,deflate_slow),new Config(32,258,258,4096,deflate_slow)];function lm_init(s){s.window_size=2*s.w_size;zero(s.head);s.max_lazy_match=configuration_table[s.level].max_lazy;s.good_match=configuration_table[s.level].good_length;s.nice_match=configuration_table[s.level].nice_length;s.max_chain_length=configuration_table[s.level].max_chain;s.strstart=0;s.block_start=0;s.lookahead=0;s.insert=0;s.match_length=s.prev_length=MIN_MATCH-1;s.match_available=0;s.ins_h=0}function DeflateState(){this.strm=null;this.status=0;this.pending_buf=null;this.pending_buf_size=0;this.pending_out=0;this.pending=0;this.wrap=0;this.gzhead=null;this.gzindex=0;this.method=Z_DEFLATED;this.last_flush=-1;this.w_size=0;this.w_bits=0;this.w_mask=0;this.window=null;this.window_size=0;this.prev=null;this.head=null;this.ins_h=0;this.hash_size=0;this.hash_bits=0;this.hash_mask=0;this.hash_shift=0;this.block_start=0;this.match_length=0;this.prev_match=0;this.match_available=0;this.strstart=0;this.match_start=0;this.lookahead=0;this.prev_length=0;this.max_chain_length=0;this.max_lazy_match=0;this.level=0;this.strategy=0;this.good_match=0;this.nice_match=0;this.dyn_ltree=new utils.Buf16(HEAP_SIZE*2);this.dyn_dtree=new utils.Buf16((2*D_CODES+1)*2);this.bl_tree=new utils.Buf16((2*BL_CODES+1)*2);zero(this.dyn_ltree);zero(this.dyn_dtree);zero(this.bl_tree);this.l_desc=null;this.d_desc=null;this.bl_desc=null;this.bl_count=new utils.Buf16(MAX_BITS+1);this.heap=new utils.Buf16(2*L_CODES+1);zero(this.heap);this.heap_len=0;this.heap_max=0;this.depth=new utils.Buf16(2*L_CODES+1);zero(this.depth);this.l_buf=0;this.lit_bufsize=0;this.last_lit=0;this.d_buf=0;this.opt_len=0;this.static_len=0;this.matches=0;this.insert=0;this.bi_buf=0;this.bi_valid=0}function deflateResetKeep(strm){var s;if(!strm||!strm.state){return err(strm,Z_STREAM_ERROR)}strm.total_in=strm.total_out=0;strm.data_type=Z_UNKNOWN;s=strm.state;s.pending=0;s.pending_out=0;if(s.wrap<0){s.wrap=-s.wrap}s.status=s.wrap?INIT_STATE:BUSY_STATE;strm.adler=s.wrap===2?0:1;s.last_flush=Z_NO_FLUSH;trees._tr_init(s);return Z_OK}function deflateReset(strm){var ret=deflateResetKeep(strm);if(ret===Z_OK){lm_init(strm.state)}return ret}function deflateSetHeader(strm,head){if(!strm||!strm.state){return Z_STREAM_ERROR}if(strm.state.wrap!==2){return Z_STREAM_ERROR}strm.state.gzhead=head;return Z_OK}function deflateInit2(strm,level,method,windowBits,memLevel,strategy){if(!strm){return Z_STREAM_ERROR}var wrap=1;if(level===Z_DEFAULT_COMPRESSION){level=6}if(windowBits<0){wrap=0;windowBits=-windowBits}else if(windowBits>15){wrap=2;windowBits-=16}if(memLevel<1||memLevel>MAX_MEM_LEVEL||method!==Z_DEFLATED||windowBits<8||windowBits>15||level<0||level>9||strategy<0||strategy>Z_FIXED){return err(strm,Z_STREAM_ERROR)}if(windowBits===8){windowBits=9}var s=new DeflateState;strm.state=s;s.strm=strm;s.wrap=wrap;s.gzhead=null;s.w_bits=windowBits;s.w_size=1<<s.w_bits;s.w_mask=s.w_size-1;s.hash_bits=memLevel+7;s.hash_size=1<<s.hash_bits;s.hash_mask=s.hash_size-1;s.hash_shift=~~((s.hash_bits+MIN_MATCH-1)/MIN_MATCH);s.window=new utils.Buf8(s.w_size*2);s.head=new utils.Buf16(s.hash_size);s.prev=new utils.Buf16(s.w_size);s.lit_bufsize=1<<memLevel+6;s.pending_buf_size=s.lit_bufsize*4;s.pending_buf=new utils.Buf8(s.pending_buf_size);s.d_buf=s.lit_bufsize>>1;s.l_buf=(1+2)*s.lit_bufsize;s.level=level;s.strategy=strategy;s.method=method;return deflateReset(strm)}function deflateInit(strm,level){return deflateInit2(strm,level,Z_DEFLATED,MAX_WBITS,DEF_MEM_LEVEL,Z_DEFAULT_STRATEGY)}function deflate(strm,flush){var old_flush,s;var beg,val;if(!strm||!strm.state||flush>Z_BLOCK||flush<0){return strm?err(strm,Z_STREAM_ERROR):Z_STREAM_ERROR}s=strm.state;if(!strm.output||!strm.input&&strm.avail_in!==0||s.status===FINISH_STATE&&flush!==Z_FINISH){return err(strm,strm.avail_out===0?Z_BUF_ERROR:Z_STREAM_ERROR)}s.strm=strm;old_flush=s.last_flush;s.last_flush=flush;if(s.status===INIT_STATE){if(s.wrap===2){strm.adler=0;put_byte(s,31);put_byte(s,139);put_byte(s,8);if(!s.gzhead){put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,0);put_byte(s,s.level===9?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0);put_byte(s,OS_CODE);s.status=BUSY_STATE}else{put_byte(s,(s.gzhead.text?1:0)+(s.gzhead.hcrc?2:0)+(!s.gzhead.extra?0:4)+(!s.gzhead.name?0:8)+(!s.gzhead.comment?0:16));put_byte(s,s.gzhead.time&255);put_byte(s,s.gzhead.time>>8&255);put_byte(s,s.gzhead.time>>16&255);put_byte(s,s.gzhead.time>>24&255);put_byte(s,s.level===9?2:s.strategy>=Z_HUFFMAN_ONLY||s.level<2?4:0);put_byte(s,s.gzhead.os&255);if(s.gzhead.extra&&s.gzhead.extra.length){put_byte(s,s.gzhead.extra.length&255);put_byte(s,s.gzhead.extra.length>>8&255)}if(s.gzhead.hcrc){strm.adler=crc32(strm.adler,s.pending_buf,s.pending,0)}s.gzindex=0;s.status=EXTRA_STATE}}else{var header=Z_DEFLATED+(s.w_bits-8<<4)<<8;var level_flags=-1;if(s.strategy>=Z_HUFFMAN_ONLY||s.level<2){level_flags=0}else if(s.level<6){level_flags=1}else if(s.level===6){level_flags=2}else{level_flags=3}header|=level_flags<<6;if(s.strstart!==0){header|=PRESET_DICT}header+=31-header%31;s.status=BUSY_STATE;putShortMSB(s,header);if(s.strstart!==0){putShortMSB(s,strm.adler>>>16);putShortMSB(s,strm.adler&65535)}strm.adler=1}}if(s.status===EXTRA_STATE){if(s.gzhead.extra){beg=s.pending;while(s.gzindex<(s.gzhead.extra.length&65535)){if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){break}}put_byte(s,s.gzhead.extra[s.gzindex]&255);s.gzindex++}if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(s.gzindex===s.gzhead.extra.length){s.gzindex=0;s.status=NAME_STATE}}else{s.status=NAME_STATE}}if(s.status===NAME_STATE){if(s.gzhead.name){beg=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){val=1;break}}if(s.gzindex<s.gzhead.name.length){val=s.gzhead.name.charCodeAt(s.gzindex++)&255}else{val=0}put_byte(s,val)}while(val!==0);if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(val===0){s.gzindex=0;s.status=COMMENT_STATE}}else{s.status=COMMENT_STATE}}if(s.status===COMMENT_STATE){if(s.gzhead.comment){beg=s.pending;do{if(s.pending===s.pending_buf_size){if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}flush_pending(strm);beg=s.pending;if(s.pending===s.pending_buf_size){val=1;break}}if(s.gzindex<s.gzhead.comment.length){val=s.gzhead.comment.charCodeAt(s.gzindex++)&255}else{val=0}put_byte(s,val)}while(val!==0);if(s.gzhead.hcrc&&s.pending>beg){strm.adler=crc32(strm.adler,s.pending_buf,s.pending-beg,beg)}if(val===0){s.status=HCRC_STATE}}else{s.status=HCRC_STATE}}if(s.status===HCRC_STATE){if(s.gzhead.hcrc){if(s.pending+2>s.pending_buf_size){flush_pending(strm)}if(s.pending+2<=s.pending_buf_size){put_byte(s,strm.adler&255);put_byte(s,strm.adler>>8&255);strm.adler=0;s.status=BUSY_STATE}}else{s.status=BUSY_STATE}}if(s.pending!==0){flush_pending(strm);if(strm.avail_out===0){s.last_flush=-1;return Z_OK}}else if(strm.avail_in===0&&rank(flush)<=rank(old_flush)&&flush!==Z_FINISH){return err(strm,Z_BUF_ERROR)}if(s.status===FINISH_STATE&&strm.avail_in!==0){return err(strm,Z_BUF_ERROR)}if(strm.avail_in!==0||s.lookahead!==0||flush!==Z_NO_FLUSH&&s.status!==FINISH_STATE){var bstate=s.strategy===Z_HUFFMAN_ONLY?deflate_huff(s,flush):s.strategy===Z_RLE?deflate_rle(s,flush):configuration_table[s.level].func(s,flush);if(bstate===BS_FINISH_STARTED||bstate===BS_FINISH_DONE){s.status=FINISH_STATE}if(bstate===BS_NEED_MORE||bstate===BS_FINISH_STARTED){if(strm.avail_out===0){s.last_flush=-1}return Z_OK}if(bstate===BS_BLOCK_DONE){if(flush===Z_PARTIAL_FLUSH){trees._tr_align(s)}else if(flush!==Z_BLOCK){trees._tr_stored_block(s,0,0,false);if(flush===Z_FULL_FLUSH){zero(s.head);if(s.lookahead===0){s.strstart=0;s.block_start=0;s.insert=0}}}flush_pending(strm);if(strm.avail_out===0){s.last_flush=-1;return Z_OK}}}if(flush!==Z_FINISH){return Z_OK}if(s.wrap<=0){return Z_STREAM_END}if(s.wrap===2){put_byte(s,strm.adler&255);put_byte(s,strm.adler>>8&255);put_byte(s,strm.adler>>16&255);put_byte(s,strm.adler>>24&255);put_byte(s,strm.total_in&255);put_byte(s,strm.total_in>>8&255);put_byte(s,strm.total_in>>16&255);put_byte(s,strm.total_in>>24&255)}else{putShortMSB(s,strm.adler>>>16);putShortMSB(s,strm.adler&65535)}flush_pending(strm);if(s.wrap>0){s.wrap=-s.wrap}return s.pending!==0?Z_OK:Z_STREAM_END}function deflateEnd(strm){var status;if(!strm||!strm.state){return Z_STREAM_ERROR}status=strm.state.status;if(status!==INIT_STATE&&status!==EXTRA_STATE&&status!==NAME_STATE&&status!==COMMENT_STATE&&status!==HCRC_STATE&&status!==BUSY_STATE&&status!==FINISH_STATE){return err(strm,Z_STREAM_ERROR)}strm.state=null;return status===BUSY_STATE?err(strm,Z_DATA_ERROR):Z_OK}exports.deflateInit=deflateInit;exports.deflateInit2=deflateInit2;exports.deflateReset=deflateReset;exports.deflateResetKeep=deflateResetKeep;exports.deflateSetHeader=deflateSetHeader;exports.deflate=deflate;exports.deflateEnd=deflateEnd;exports.deflateInfo=\"pako deflate (from Nodeca project)\"},{\"../utils/common\":27,\"./adler32\":29,\"./crc32\":31,\"./messages\":37,\"./trees\":38}],33:[function(_dereq_,module,exports){\"use strict\";function GZheader(){this.text=0;this.time=0;this.xflags=0;this.os=0;this.extra=null;this.extra_len=0;this.name=\"\";this.comment=\"\";this.hcrc=0;this.done=false}module.exports=GZheader},{}],34:[function(_dereq_,module,exports){\"use strict\";var BAD=30;var TYPE=12;module.exports=function inflate_fast(strm,start){var state;var _in;var last;var _out;var beg;var end;var dmax;var wsize;var whave;var wnext;var window;var hold;var bits;var lcode;var dcode;var lmask;var dmask;var here;var op;var len;var dist;var from;var from_source;var input,output;state=strm.state;_in=strm.next_in;input=strm.input;last=_in+(strm.avail_in-5);_out=strm.next_out;output=strm.output;beg=_out-(start-strm.avail_out);end=_out+(strm.avail_out-257);dmax=state.dmax;wsize=state.wsize;whave=state.whave;wnext=state.wnext;window=state.window;hold=state.hold;bits=state.bits;lcode=state.lencode;dcode=state.distcode;lmask=(1<<state.lenbits)-1;dmask=(1<<state.distbits)-1;top:do{if(bits<15){hold+=input[_in++]<<bits;bits+=8;hold+=input[_in++]<<bits;bits+=8}here=lcode[hold&lmask];dolen:for(;;){op=here>>>24;hold>>>=op;bits-=op;op=here>>>16&255;if(op===0){output[_out++]=here&65535}else if(op&16){len=here&65535;op&=15;if(op){if(bits<op){hold+=input[_in++]<<bits;bits+=8}len+=hold&(1<<op)-1;hold>>>=op;bits-=op}if(bits<15){hold+=input[_in++]<<bits;bits+=8;hold+=input[_in++]<<bits;bits+=8}here=dcode[hold&dmask];dodist:for(;;){op=here>>>24;hold>>>=op;bits-=op;op=here>>>16&255;if(op&16){dist=here&65535;op&=15;if(bits<op){hold+=input[_in++]<<bits;bits+=8;if(bits<op){hold+=input[_in++]<<bits;bits+=8}}dist+=hold&(1<<op)-1;if(dist>dmax){strm.msg=\"invalid distance too far back\";state.mode=BAD;break top}hold>>>=op;bits-=op;op=_out-beg;if(dist>op){op=dist-op;if(op>whave){if(state.sane){strm.msg=\"invalid distance too far back\";state.mode=BAD;break top}}from=0;from_source=window;if(wnext===0){from+=wsize-op;if(op<len){len-=op;do{output[_out++]=window[from++]}while(--op);from=_out-dist;from_source=output}}else if(wnext<op){from+=wsize+wnext-op;op-=wnext;if(op<len){len-=op;do{output[_out++]=window[from++]}while(--op);from=0;if(wnext<len){op=wnext;len-=op;do{output[_out++]=window[from++]}while(--op);from=_out-dist;from_source=output}}}else{from+=wnext-op;if(op<len){len-=op;do{output[_out++]=window[from++]}while(--op);from=_out-dist;from_source=output}}while(len>2){output[_out++]=from_source[from++];output[_out++]=from_source[from++];output[_out++]=from_source[from++];len-=3}if(len){output[_out++]=from_source[from++];if(len>1){output[_out++]=from_source[from++]}}}else{from=_out-dist;do{output[_out++]=output[from++];output[_out++]=output[from++];output[_out++]=output[from++];len-=3}while(len>2);if(len){output[_out++]=output[from++];if(len>1){output[_out++]=output[from++]}}}}else if((op&64)===0){here=dcode[(here&65535)+(hold&(1<<op)-1)];continue dodist}else{strm.msg=\"invalid distance code\";state.mode=BAD;break top}break}}else if((op&64)===0){here=lcode[(here&65535)+(hold&(1<<op)-1)];continue dolen}else if(op&32){state.mode=TYPE;break top}else{strm.msg=\"invalid literal/length code\";state.mode=BAD;break top}break}}while(_in<last&&_out<end);len=bits>>3;_in-=len;bits-=len<<3;hold&=(1<<bits)-1;strm.next_in=_in;strm.next_out=_out;strm.avail_in=_in<last?5+(last-_in):5-(_in-last);strm.avail_out=_out<end?257+(end-_out):257-(_out-end);state.hold=hold;state.bits=bits;return}},{}],35:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"../utils/common\");var adler32=_dereq_(\"./adler32\");var crc32=_dereq_(\"./crc32\");var inflate_fast=_dereq_(\"./inffast\");var inflate_table=_dereq_(\"./inftrees\");var CODES=0;var LENS=1;var DISTS=2;var Z_FINISH=4;var Z_BLOCK=5;var Z_TREES=6;var Z_OK=0;var Z_STREAM_END=1;var Z_NEED_DICT=2;var Z_STREAM_ERROR=-2;var Z_DATA_ERROR=-3;var Z_MEM_ERROR=-4;var Z_BUF_ERROR=-5;var Z_DEFLATED=8;var HEAD=1;var FLAGS=2;var TIME=3;var OS=4;var EXLEN=5;var EXTRA=6;var NAME=7;var COMMENT=8;var HCRC=9;var DICTID=10;var DICT=11;var TYPE=12;var TYPEDO=13;var STORED=14;var COPY_=15;var COPY=16;var TABLE=17;var LENLENS=18;var CODELENS=19;var LEN_=20;var LEN=21;var LENEXT=22;var DIST=23;var DISTEXT=24;var MATCH=25;var LIT=26;var CHECK=27;var LENGTH=28;var DONE=29;var BAD=30;var MEM=31;var SYNC=32;var ENOUGH_LENS=852;var ENOUGH_DISTS=592;var MAX_WBITS=15;var DEF_WBITS=MAX_WBITS;function ZSWAP32(q){return(q>>>24&255)+(q>>>8&65280)+((q&65280)<<8)+((q&255)<<24)}function InflateState(){this.mode=0;this.last=false;this.wrap=0;this.havedict=false;this.flags=0;this.dmax=0;this.check=0;this.total=0;this.head=null;this.wbits=0;this.wsize=0;this.whave=0;this.wnext=0;this.window=null;this.hold=0;this.bits=0;this.length=0;this.offset=0;this.extra=0;this.lencode=null;this.distcode=null;this.lenbits=0;this.distbits=0;this.ncode=0;this.nlen=0;this.ndist=0;this.have=0;this.next=null;this.lens=new utils.Buf16(320);this.work=new utils.Buf16(288);this.lendyn=null;this.distdyn=null;this.sane=0;this.back=0;this.was=0}function inflateResetKeep(strm){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;strm.total_in=strm.total_out=state.total=0;strm.msg=\"\";if(state.wrap){strm.adler=state.wrap&1}state.mode=HEAD;state.last=0;state.havedict=0;state.dmax=32768;state.head=null;state.hold=0;state.bits=0;state.lencode=state.lendyn=new utils.Buf32(ENOUGH_LENS);state.distcode=state.distdyn=new utils.Buf32(ENOUGH_DISTS);state.sane=1;state.back=-1;return Z_OK}function inflateReset(strm){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;state.wsize=0;state.whave=0;state.wnext=0;return inflateResetKeep(strm)}function inflateReset2(strm,windowBits){var wrap;var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;if(windowBits<0){wrap=0;windowBits=-windowBits}else{wrap=(windowBits>>4)+1;if(windowBits<48){windowBits&=15}}if(windowBits&&(windowBits<8||windowBits>15)){return Z_STREAM_ERROR}if(state.window!==null&&state.wbits!==windowBits){state.window=null}state.wrap=wrap;state.wbits=windowBits;return inflateReset(strm)}function inflateInit2(strm,windowBits){var ret;var state;if(!strm){return Z_STREAM_ERROR}state=new InflateState;strm.state=state;state.window=null;ret=inflateReset2(strm,windowBits);if(ret!==Z_OK){strm.state=null}return ret}function inflateInit(strm){return inflateInit2(strm,DEF_WBITS)}var virgin=true;var lenfix,distfix;function fixedtables(state){if(virgin){var sym;lenfix=new utils.Buf32(512);distfix=new utils.Buf32(32);sym=0;while(sym<144){state.lens[sym++]=8}while(sym<256){state.lens[sym++]=9}while(sym<280){state.lens[sym++]=7}while(sym<288){state.lens[sym++]=8}inflate_table(LENS,state.lens,0,288,lenfix,0,state.work,{bits:9});sym=0;while(sym<32){state.lens[sym++]=5}inflate_table(DISTS,state.lens,0,32,distfix,0,state.work,{bits:5});virgin=false}state.lencode=lenfix;state.lenbits=9;state.distcode=distfix;state.distbits=5}function updatewindow(strm,src,end,copy){var dist;var state=strm.state;if(state.window===null){state.wsize=1<<state.wbits;state.wnext=0;state.whave=0;state.window=new utils.Buf8(state.wsize)}if(copy>=state.wsize){utils.arraySet(state.window,src,end-state.wsize,state.wsize,0);state.wnext=0;state.whave=state.wsize}else{dist=state.wsize-state.wnext;if(dist>copy){dist=copy}utils.arraySet(state.window,src,end-copy,dist,state.wnext);copy-=dist;if(copy){utils.arraySet(state.window,src,end-copy,copy,0);state.wnext=copy;state.whave=state.wsize}else{state.wnext+=dist;if(state.wnext===state.wsize){state.wnext=0}if(state.whave<state.wsize){state.whave+=dist}}}return 0}function inflate(strm,flush){var state;var input,output;var next;var put;var have,left;var hold;var bits;var _in,_out;var copy;var from;var from_source;var here=0;var here_bits,here_op,here_val;var last_bits,last_op,last_val;var len;var ret;var hbuf=new utils.Buf8(4);var opts;var n;var order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!strm||!strm.state||!strm.output||!strm.input&&strm.avail_in!==0){return Z_STREAM_ERROR}state=strm.state;if(state.mode===TYPE){state.mode=TYPEDO}put=strm.next_out;output=strm.output;left=strm.avail_out;next=strm.next_in;input=strm.input;have=strm.avail_in;hold=state.hold;bits=state.bits;_in=have;_out=left;ret=Z_OK;inf_leave:for(;;){switch(state.mode){case HEAD:if(state.wrap===0){state.mode=TYPEDO;break}while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}if(state.wrap&2&&hold===35615){state.check=0;hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0);hold=0;bits=0;state.mode=FLAGS;break}state.flags=0;if(state.head){state.head.done=false}if(!(state.wrap&1)||(((hold&255)<<8)+(hold>>8))%31){strm.msg=\"incorrect header check\";state.mode=BAD;break}if((hold&15)!==Z_DEFLATED){strm.msg=\"unknown compression method\";state.mode=BAD;break}hold>>>=4;bits-=4;len=(hold&15)+8;if(state.wbits===0){state.wbits=len}else if(len>state.wbits){strm.msg=\"invalid window size\";state.mode=BAD;break}state.dmax=1<<len;strm.adler=state.check=1;state.mode=hold&512?DICTID:TYPE;hold=0;bits=0;break;case FLAGS:while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}state.flags=hold;if((state.flags&255)!==Z_DEFLATED){strm.msg=\"unknown compression method\";state.mode=BAD;break}if(state.flags&57344){strm.msg=\"unknown header flags set\";state.mode=BAD;break}if(state.head){state.head.text=hold>>8&1}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0;state.mode=TIME;case TIME:while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}if(state.head){state.head.time=hold}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;hbuf[2]=hold>>>16&255;hbuf[3]=hold>>>24&255;state.check=crc32(state.check,hbuf,4,0)}hold=0;bits=0;state.mode=OS;case OS:while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}if(state.head){state.head.xflags=hold&255;state.head.os=hold>>8}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0;state.mode=EXLEN;case EXLEN:if(state.flags&1024){while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}state.length=hold;if(state.head){state.head.extra_len=hold}if(state.flags&512){hbuf[0]=hold&255;hbuf[1]=hold>>>8&255;state.check=crc32(state.check,hbuf,2,0)}hold=0;bits=0}else if(state.head){state.head.extra=null}state.mode=EXTRA;case EXTRA:if(state.flags&1024){copy=state.length;if(copy>have){copy=have}if(copy){if(state.head){len=state.head.extra_len-state.length;if(!state.head.extra){state.head.extra=new Array(state.head.extra_len)}utils.arraySet(state.head.extra,input,next,copy,len)}if(state.flags&512){state.check=crc32(state.check,input,copy,next)}have-=copy;next+=copy;state.length-=copy}if(state.length){break inf_leave}}state.length=0;state.mode=NAME;case NAME:if(state.flags&2048){if(have===0){break inf_leave}copy=0;do{len=input[next+copy++];if(state.head&&len&&state.length<65536){state.head.name+=String.fromCharCode(len)}}while(len&©<have);if(state.flags&512){state.check=crc32(state.check,input,copy,next)}have-=copy;next+=copy;if(len){break inf_leave}}else if(state.head){state.head.name=null}state.length=0;state.mode=COMMENT;case COMMENT:if(state.flags&4096){if(have===0){break inf_leave}copy=0;do{len=input[next+copy++];if(state.head&&len&&state.length<65536){state.head.comment+=String.fromCharCode(len)}}while(len&©<have);if(state.flags&512){state.check=crc32(state.check,input,copy,next)}have-=copy;next+=copy;if(len){break inf_leave}}else if(state.head){state.head.comment=null}state.mode=HCRC;case HCRC:if(state.flags&512){while(bits<16){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}if(hold!==(state.check&65535)){strm.msg=\"header crc mismatch\";state.mode=BAD;break}hold=0;bits=0}if(state.head){state.head.hcrc=state.flags>>9&1;state.head.done=true}strm.adler=state.check=0;state.mode=TYPE;break;case DICTID:while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}strm.adler=state.check=ZSWAP32(hold);hold=0;bits=0;state.mode=DICT;case DICT:if(state.havedict===0){strm.next_out=put;strm.avail_out=left;strm.next_in=next;strm.avail_in=have;state.hold=hold;state.bits=bits;return Z_NEED_DICT}strm.adler=state.check=1;state.mode=TYPE;case TYPE:if(flush===Z_BLOCK||flush===Z_TREES){break inf_leave}case TYPEDO:if(state.last){hold>>>=bits&7;bits-=bits&7;state.mode=CHECK;break}while(bits<3){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}state.last=hold&1;hold>>>=1;bits-=1;switch(hold&3){case 0:state.mode=STORED;break;case 1:fixedtables(state);state.mode=LEN_;if(flush===Z_TREES){hold>>>=2;bits-=2;break inf_leave}break;case 2:state.mode=TABLE;break;case 3:strm.msg=\"invalid block type\";state.mode=BAD}hold>>>=2;bits-=2;break;case STORED:hold>>>=bits&7;bits-=bits&7;while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}if((hold&65535)!==(hold>>>16^65535)){strm.msg=\"invalid stored block lengths\";state.mode=BAD;break}state.length=hold&65535;hold=0;bits=0;state.mode=COPY_;if(flush===Z_TREES){break inf_leave}case COPY_:state.mode=COPY;case COPY:copy=state.length;if(copy){if(copy>have){copy=have}if(copy>left){copy=left}if(copy===0){break inf_leave}utils.arraySet(output,input,next,copy,put);have-=copy;next+=copy;left-=copy;put+=copy;state.length-=copy;break}state.mode=TYPE;break;case TABLE:while(bits<14){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}state.nlen=(hold&31)+257;hold>>>=5;bits-=5;state.ndist=(hold&31)+1;hold>>>=5;bits-=5;state.ncode=(hold&15)+4;hold>>>=4;bits-=4;if(state.nlen>286||state.ndist>30){strm.msg=\"too many length or distance symbols\";state.mode=BAD;break}state.have=0;state.mode=LENLENS;case LENLENS:while(state.have<state.ncode){while(bits<3){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}state.lens[order[state.have++]]=hold&7;hold>>>=3;bits-=3}while(state.have<19){state.lens[order[state.have++]]=0}state.lencode=state.lendyn;state.lenbits=7;opts={bits:state.lenbits};ret=inflate_table(CODES,state.lens,0,19,state.lencode,0,state.work,opts);state.lenbits=opts.bits;if(ret){strm.msg=\"invalid code lengths set\";state.mode=BAD;break}state.have=0;state.mode=CODELENS;case CODELENS:while(state.have<state.nlen+state.ndist){for(;;){here=state.lencode[hold&(1<<state.lenbits)-1];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}if(here_val<16){hold>>>=here_bits;bits-=here_bits;state.lens[state.have++]=here_val}else{if(here_val===16){n=here_bits+2;while(bits<n){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}hold>>>=here_bits;bits-=here_bits;if(state.have===0){strm.msg=\"invalid bit length repeat\";state.mode=BAD;break}len=state.lens[state.have-1];copy=3+(hold&3);hold>>>=2;bits-=2}else if(here_val===17){n=here_bits+3;while(bits<n){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}hold>>>=here_bits;bits-=here_bits;len=0;copy=3+(hold&7);hold>>>=3;bits-=3}else{n=here_bits+7;while(bits<n){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}hold>>>=here_bits;bits-=here_bits;len=0;copy=11+(hold&127);hold>>>=7;bits-=7}if(state.have+copy>state.nlen+state.ndist){strm.msg=\"invalid bit length repeat\";state.mode=BAD;break}while(copy--){state.lens[state.have++]=len}}}if(state.mode===BAD){break}if(state.lens[256]===0){strm.msg=\"invalid code -- missing end-of-block\";state.mode=BAD;break}state.lenbits=9;opts={bits:state.lenbits};ret=inflate_table(LENS,state.lens,0,state.nlen,state.lencode,0,state.work,opts);state.lenbits=opts.bits;if(ret){strm.msg=\"invalid literal/lengths set\";state.mode=BAD;break}state.distbits=6;state.distcode=state.distdyn;opts={bits:state.distbits};ret=inflate_table(DISTS,state.lens,state.nlen,state.ndist,state.distcode,0,state.work,opts);state.distbits=opts.bits;if(ret){strm.msg=\"invalid distances set\";state.mode=BAD;break}state.mode=LEN_;if(flush===Z_TREES){break inf_leave}case LEN_:state.mode=LEN;case LEN:if(have>=6&&left>=258){strm.next_out=put;strm.avail_out=left;strm.next_in=next;strm.avail_in=have;state.hold=hold;state.bits=bits;inflate_fast(strm,_out);put=strm.next_out;output=strm.output;left=strm.avail_out;next=strm.next_in;input=strm.input;have=strm.avail_in;hold=state.hold;bits=state.bits;if(state.mode===TYPE){state.back=-1}break}state.back=0;for(;;){here=state.lencode[hold&(1<<state.lenbits)-1];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}if(here_op&&(here_op&240)===0){last_bits=here_bits;last_op=here_op;last_val=here_val;for(;;){here=state.lencode[last_val+((hold&(1<<last_bits+last_op)-1)>>last_bits)];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(last_bits+here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}hold>>>=last_bits;bits-=last_bits;state.back+=last_bits}hold>>>=here_bits;bits-=here_bits;state.back+=here_bits;state.length=here_val;if(here_op===0){state.mode=LIT;break}if(here_op&32){state.back=-1;state.mode=TYPE;break}if(here_op&64){strm.msg=\"invalid literal/length code\";state.mode=BAD;break}state.extra=here_op&15;state.mode=LENEXT;case LENEXT:if(state.extra){n=state.extra;while(bits<n){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}state.length+=hold&(1<<state.extra)-1;hold>>>=state.extra;bits-=state.extra;state.back+=state.extra}state.was=state.length;state.mode=DIST;case DIST:for(;;){here=state.distcode[hold&(1<<state.distbits)-1];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}if((here_op&240)===0){last_bits=here_bits;last_op=here_op;last_val=here_val;for(;;){here=state.distcode[last_val+((hold&(1<<last_bits+last_op)-1)>>last_bits)];here_bits=here>>>24;here_op=here>>>16&255;here_val=here&65535;if(last_bits+here_bits<=bits){break}if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}hold>>>=last_bits;bits-=last_bits;state.back+=last_bits}hold>>>=here_bits;bits-=here_bits;state.back+=here_bits;if(here_op&64){strm.msg=\"invalid distance code\";state.mode=BAD;break}state.offset=here_val;state.extra=here_op&15;state.mode=DISTEXT;case DISTEXT:if(state.extra){n=state.extra;while(bits<n){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}state.offset+=hold&(1<<state.extra)-1;hold>>>=state.extra;bits-=state.extra;state.back+=state.extra}if(state.offset>state.dmax){strm.msg=\"invalid distance too far back\";state.mode=BAD;break}state.mode=MATCH;case MATCH:if(left===0){break inf_leave}copy=_out-left;if(state.offset>copy){copy=state.offset-copy;if(copy>state.whave){if(state.sane){strm.msg=\"invalid distance too far back\";state.mode=BAD;break}}if(copy>state.wnext){copy-=state.wnext;from=state.wsize-copy}else{from=state.wnext-copy}if(copy>state.length){copy=state.length}from_source=state.window}else{from_source=output;from=put-state.offset;copy=state.length}if(copy>left){copy=left}left-=copy;state.length-=copy;do{output[put++]=from_source[from++]}while(--copy);if(state.length===0){state.mode=LEN}break;case LIT:if(left===0){break inf_leave}output[put++]=state.length;left--;state.mode=LEN;break;case CHECK:if(state.wrap){while(bits<32){if(have===0){break inf_leave}have--;hold|=input[next++]<<bits;bits+=8}_out-=left;strm.total_out+=_out;state.total+=_out;if(_out){strm.adler=state.check=state.flags?crc32(state.check,output,_out,put-_out):adler32(state.check,output,_out,put-_out)}_out=left;if((state.flags?hold:ZSWAP32(hold))!==state.check){strm.msg=\"incorrect data check\";state.mode=BAD;break}hold=0;bits=0}state.mode=LENGTH;case LENGTH:if(state.wrap&&state.flags){while(bits<32){if(have===0){break inf_leave}have--;hold+=input[next++]<<bits;bits+=8}if(hold!==(state.total&4294967295)){strm.msg=\"incorrect length check\";state.mode=BAD;break}hold=0;bits=0}state.mode=DONE;case DONE:ret=Z_STREAM_END;break inf_leave;case BAD:ret=Z_DATA_ERROR;break inf_leave;case MEM:return Z_MEM_ERROR;case SYNC:default:return Z_STREAM_ERROR}}strm.next_out=put;strm.avail_out=left;strm.next_in=next;strm.avail_in=have;state.hold=hold;state.bits=bits;if(state.wsize||_out!==strm.avail_out&&state.mode<BAD&&(state.mode<CHECK||flush!==Z_FINISH)){if(updatewindow(strm,strm.output,strm.next_out,_out-strm.avail_out)){state.mode=MEM;return Z_MEM_ERROR}}_in-=strm.avail_in;_out-=strm.avail_out;strm.total_in+=_in;strm.total_out+=_out;state.total+=_out;if(state.wrap&&_out){strm.adler=state.check=state.flags?crc32(state.check,output,_out,strm.next_out-_out):adler32(state.check,output,_out,strm.next_out-_out)}strm.data_type=state.bits+(state.last?64:0)+(state.mode===TYPE?128:0)+(state.mode===LEN_||state.mode===COPY_?256:0);if((_in===0&&_out===0||flush===Z_FINISH)&&ret===Z_OK){ret=Z_BUF_ERROR}return ret}function inflateEnd(strm){if(!strm||!strm.state){return Z_STREAM_ERROR}var state=strm.state;if(state.window){state.window=null}strm.state=null;return Z_OK}function inflateGetHeader(strm,head){var state;if(!strm||!strm.state){return Z_STREAM_ERROR}state=strm.state;if((state.wrap&2)===0){return Z_STREAM_ERROR}state.head=head;head.done=false;return Z_OK}exports.inflateReset=inflateReset;exports.inflateReset2=inflateReset2;exports.inflateResetKeep=inflateResetKeep;exports.inflateInit=inflateInit;exports.inflateInit2=inflateInit2;exports.inflate=inflate;exports.inflateEnd=inflateEnd;exports.inflateGetHeader=inflateGetHeader;\r\nexports.inflateInfo=\"pako inflate (from Nodeca project)\"},{\"../utils/common\":27,\"./adler32\":29,\"./crc32\":31,\"./inffast\":34,\"./inftrees\":36}],36:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"../utils/common\");var MAXBITS=15;var ENOUGH_LENS=852;var ENOUGH_DISTS=592;var CODES=0;var LENS=1;var DISTS=2;var lbase=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0];var lext=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78];var dbase=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0];var dext=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];module.exports=function inflate_table(type,lens,lens_index,codes,table,table_index,work,opts){var bits=opts.bits;var len=0;var sym=0;var min=0,max=0;var root=0;var curr=0;var drop=0;var left=0;var used=0;var huff=0;var incr;var fill;var low;var mask;var next;var base=null;var base_index=0;var end;var count=new utils.Buf16(MAXBITS+1);var offs=new utils.Buf16(MAXBITS+1);var extra=null;var extra_index=0;var here_bits,here_op,here_val;for(len=0;len<=MAXBITS;len++){count[len]=0}for(sym=0;sym<codes;sym++){count[lens[lens_index+sym]]++}root=bits;for(max=MAXBITS;max>=1;max--){if(count[max]!==0){break}}if(root>max){root=max}if(max===0){table[table_index++]=1<<24|64<<16|0;table[table_index++]=1<<24|64<<16|0;opts.bits=1;return 0}for(min=1;min<max;min++){if(count[min]!==0){break}}if(root<min){root=min}left=1;for(len=1;len<=MAXBITS;len++){left<<=1;left-=count[len];if(left<0){return-1}}if(left>0&&(type===CODES||max!==1)){return-1}offs[1]=0;for(len=1;len<MAXBITS;len++){offs[len+1]=offs[len]+count[len]}for(sym=0;sym<codes;sym++){if(lens[lens_index+sym]!==0){work[offs[lens[lens_index+sym]]++]=sym}}if(type===CODES){base=extra=work;end=19}else if(type===LENS){base=lbase;base_index-=257;extra=lext;extra_index-=257;end=256}else{base=dbase;extra=dext;end=-1}huff=0;sym=0;len=min;next=table_index;curr=root;drop=0;low=-1;used=1<<root;mask=used-1;if(type===LENS&&used>ENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS){return 1}var i=0;for(;;){i++;here_bits=len-drop;if(work[sym]<end){here_op=0;here_val=work[sym]}else if(work[sym]>end){here_op=extra[extra_index+work[sym]];here_val=base[base_index+work[sym]]}else{here_op=32+64;here_val=0}incr=1<<len-drop;fill=1<<curr;min=fill;do{fill-=incr;table[next+(huff>>drop)+fill]=here_bits<<24|here_op<<16|here_val|0}while(fill!==0);incr=1<<len-1;while(huff&incr){incr>>=1}if(incr!==0){huff&=incr-1;huff+=incr}else{huff=0}sym++;if(--count[len]===0){if(len===max){break}len=lens[lens_index+work[sym]]}if(len>root&&(huff&mask)!==low){if(drop===0){drop=root}next+=min;curr=len-drop;left=1<<curr;while(curr+drop<max){left-=count[curr+drop];if(left<=0){break}curr++;left<<=1}used+=1<<curr;if(type===LENS&&used>ENOUGH_LENS||type===DISTS&&used>ENOUGH_DISTS){return 1}low=huff&mask;table[low]=root<<24|curr<<16|next-table_index|0}}if(huff!==0){table[next+huff]=len-drop<<24|64<<16|0}opts.bits=root;return 0}},{\"../utils/common\":27}],37:[function(_dereq_,module,exports){\"use strict\";module.exports={2:\"need dictionary\",1:\"stream end\",0:\"\",\"-1\":\"file error\",\"-2\":\"stream error\",\"-3\":\"data error\",\"-4\":\"insufficient memory\",\"-5\":\"buffer error\",\"-6\":\"incompatible version\"}},{}],38:[function(_dereq_,module,exports){\"use strict\";var utils=_dereq_(\"../utils/common\");var Z_FIXED=4;var Z_BINARY=0;var Z_TEXT=1;var Z_UNKNOWN=2;function zero(buf){var len=buf.length;while(--len>=0){buf[len]=0}}var STORED_BLOCK=0;var STATIC_TREES=1;var DYN_TREES=2;var MIN_MATCH=3;var MAX_MATCH=258;var LENGTH_CODES=29;var LITERALS=256;var L_CODES=LITERALS+1+LENGTH_CODES;var D_CODES=30;var BL_CODES=19;var HEAP_SIZE=2*L_CODES+1;var MAX_BITS=15;var Buf_size=16;var MAX_BL_BITS=7;var END_BLOCK=256;var REP_3_6=16;var REPZ_3_10=17;var REPZ_11_138=18;var extra_lbits=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0];var extra_dbits=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var extra_blbits=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];var bl_order=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var DIST_CODE_LEN=512;var static_ltree=new Array((L_CODES+2)*2);zero(static_ltree);var static_dtree=new Array(D_CODES*2);zero(static_dtree);var _dist_code=new Array(DIST_CODE_LEN);zero(_dist_code);var _length_code=new Array(MAX_MATCH-MIN_MATCH+1);zero(_length_code);var base_length=new Array(LENGTH_CODES);zero(base_length);var base_dist=new Array(D_CODES);zero(base_dist);var StaticTreeDesc=function(static_tree,extra_bits,extra_base,elems,max_length){this.static_tree=static_tree;this.extra_bits=extra_bits;this.extra_base=extra_base;this.elems=elems;this.max_length=max_length;this.has_stree=static_tree&&static_tree.length};var static_l_desc;var static_d_desc;var static_bl_desc;var TreeDesc=function(dyn_tree,stat_desc){this.dyn_tree=dyn_tree;this.max_code=0;this.stat_desc=stat_desc};function d_code(dist){return dist<256?_dist_code[dist]:_dist_code[256+(dist>>>7)]}function put_short(s,w){s.pending_buf[s.pending++]=w&255;s.pending_buf[s.pending++]=w>>>8&255}function send_bits(s,value,length){if(s.bi_valid>Buf_size-length){s.bi_buf|=value<<s.bi_valid&65535;put_short(s,s.bi_buf);s.bi_buf=value>>Buf_size-s.bi_valid;s.bi_valid+=length-Buf_size}else{s.bi_buf|=value<<s.bi_valid&65535;s.bi_valid+=length}}function send_code(s,c,tree){send_bits(s,tree[c*2],tree[c*2+1])}function bi_reverse(code,len){var res=0;do{res|=code&1;code>>>=1;res<<=1}while(--len>0);return res>>>1}function bi_flush(s){if(s.bi_valid===16){put_short(s,s.bi_buf);s.bi_buf=0;s.bi_valid=0}else if(s.bi_valid>=8){s.pending_buf[s.pending++]=s.bi_buf&255;s.bi_buf>>=8;s.bi_valid-=8}}function gen_bitlen(s,desc){var tree=desc.dyn_tree;var max_code=desc.max_code;var stree=desc.stat_desc.static_tree;var has_stree=desc.stat_desc.has_stree;var extra=desc.stat_desc.extra_bits;var base=desc.stat_desc.extra_base;var max_length=desc.stat_desc.max_length;var h;var n,m;var bits;var xbits;var f;var overflow=0;for(bits=0;bits<=MAX_BITS;bits++){s.bl_count[bits]=0}tree[s.heap[s.heap_max]*2+1]=0;for(h=s.heap_max+1;h<HEAP_SIZE;h++){n=s.heap[h];bits=tree[tree[n*2+1]*2+1]+1;if(bits>max_length){bits=max_length;overflow++}tree[n*2+1]=bits;if(n>max_code){continue}s.bl_count[bits]++;xbits=0;if(n>=base){xbits=extra[n-base]}f=tree[n*2];s.opt_len+=f*(bits+xbits);if(has_stree){s.static_len+=f*(stree[n*2+1]+xbits)}}if(overflow===0){return}do{bits=max_length-1;while(s.bl_count[bits]===0){bits--}s.bl_count[bits]--;s.bl_count[bits+1]+=2;s.bl_count[max_length]--;overflow-=2}while(overflow>0);for(bits=max_length;bits!==0;bits--){n=s.bl_count[bits];while(n!==0){m=s.heap[--h];if(m>max_code){continue}if(tree[m*2+1]!==bits){s.opt_len+=(bits-tree[m*2+1])*tree[m*2];tree[m*2+1]=bits}n--}}}function gen_codes(tree,max_code,bl_count){var next_code=new Array(MAX_BITS+1);var code=0;var bits;var n;for(bits=1;bits<=MAX_BITS;bits++){next_code[bits]=code=code+bl_count[bits-1]<<1}for(n=0;n<=max_code;n++){var len=tree[n*2+1];if(len===0){continue}tree[n*2]=bi_reverse(next_code[len]++,len)}}function tr_static_init(){var n;var bits;var length;var code;var dist;var bl_count=new Array(MAX_BITS+1);length=0;for(code=0;code<LENGTH_CODES-1;code++){base_length[code]=length;for(n=0;n<1<<extra_lbits[code];n++){_length_code[length++]=code}}_length_code[length-1]=code;dist=0;for(code=0;code<16;code++){base_dist[code]=dist;for(n=0;n<1<<extra_dbits[code];n++){_dist_code[dist++]=code}}dist>>=7;for(;code<D_CODES;code++){base_dist[code]=dist<<7;for(n=0;n<1<<extra_dbits[code]-7;n++){_dist_code[256+dist++]=code}}for(bits=0;bits<=MAX_BITS;bits++){bl_count[bits]=0}n=0;while(n<=143){static_ltree[n*2+1]=8;n++;bl_count[8]++}while(n<=255){static_ltree[n*2+1]=9;n++;bl_count[9]++}while(n<=279){static_ltree[n*2+1]=7;n++;bl_count[7]++}while(n<=287){static_ltree[n*2+1]=8;n++;bl_count[8]++}gen_codes(static_ltree,L_CODES+1,bl_count);for(n=0;n<D_CODES;n++){static_dtree[n*2+1]=5;static_dtree[n*2]=bi_reverse(n,5)}static_l_desc=new StaticTreeDesc(static_ltree,extra_lbits,LITERALS+1,L_CODES,MAX_BITS);static_d_desc=new StaticTreeDesc(static_dtree,extra_dbits,0,D_CODES,MAX_BITS);static_bl_desc=new StaticTreeDesc(new Array(0),extra_blbits,0,BL_CODES,MAX_BL_BITS)}function init_block(s){var n;for(n=0;n<L_CODES;n++){s.dyn_ltree[n*2]=0}for(n=0;n<D_CODES;n++){s.dyn_dtree[n*2]=0}for(n=0;n<BL_CODES;n++){s.bl_tree[n*2]=0}s.dyn_ltree[END_BLOCK*2]=1;s.opt_len=s.static_len=0;s.last_lit=s.matches=0}function bi_windup(s){if(s.bi_valid>8){put_short(s,s.bi_buf)}else if(s.bi_valid>0){s.pending_buf[s.pending++]=s.bi_buf}s.bi_buf=0;s.bi_valid=0}function copy_block(s,buf,len,header){bi_windup(s);if(header){put_short(s,len);put_short(s,~len)}utils.arraySet(s.pending_buf,s.window,buf,len,s.pending);s.pending+=len}function smaller(tree,n,m,depth){var _n2=n*2;var _m2=m*2;return tree[_n2]<tree[_m2]||tree[_n2]===tree[_m2]&&depth[n]<=depth[m]}function pqdownheap(s,tree,k){var v=s.heap[k];var j=k<<1;while(j<=s.heap_len){if(j<s.heap_len&&smaller(tree,s.heap[j+1],s.heap[j],s.depth)){j++}if(smaller(tree,v,s.heap[j],s.depth)){break}s.heap[k]=s.heap[j];k=j;j<<=1}s.heap[k]=v}function compress_block(s,ltree,dtree){var dist;var lc;var lx=0;var code;var extra;if(s.last_lit!==0){do{dist=s.pending_buf[s.d_buf+lx*2]<<8|s.pending_buf[s.d_buf+lx*2+1];lc=s.pending_buf[s.l_buf+lx];lx++;if(dist===0){send_code(s,lc,ltree)}else{code=_length_code[lc];send_code(s,code+LITERALS+1,ltree);extra=extra_lbits[code];if(extra!==0){lc-=base_length[code];send_bits(s,lc,extra)}dist--;code=d_code(dist);send_code(s,code,dtree);extra=extra_dbits[code];if(extra!==0){dist-=base_dist[code];send_bits(s,dist,extra)}}}while(lx<s.last_lit)}send_code(s,END_BLOCK,ltree)}function build_tree(s,desc){var tree=desc.dyn_tree;var stree=desc.stat_desc.static_tree;var has_stree=desc.stat_desc.has_stree;var elems=desc.stat_desc.elems;var n,m;var max_code=-1;var node;s.heap_len=0;s.heap_max=HEAP_SIZE;for(n=0;n<elems;n++){if(tree[n*2]!==0){s.heap[++s.heap_len]=max_code=n;s.depth[n]=0}else{tree[n*2+1]=0}}while(s.heap_len<2){node=s.heap[++s.heap_len]=max_code<2?++max_code:0;tree[node*2]=1;s.depth[node]=0;s.opt_len--;if(has_stree){s.static_len-=stree[node*2+1]}}desc.max_code=max_code;for(n=s.heap_len>>1;n>=1;n--){pqdownheap(s,tree,n)}node=elems;do{n=s.heap[1];s.heap[1]=s.heap[s.heap_len--];pqdownheap(s,tree,1);m=s.heap[1];s.heap[--s.heap_max]=n;s.heap[--s.heap_max]=m;tree[node*2]=tree[n*2]+tree[m*2];s.depth[node]=(s.depth[n]>=s.depth[m]?s.depth[n]:s.depth[m])+1;tree[n*2+1]=tree[m*2+1]=node;s.heap[1]=node++;pqdownheap(s,tree,1)}while(s.heap_len>=2);s.heap[--s.heap_max]=s.heap[1];gen_bitlen(s,desc);gen_codes(tree,max_code,s.bl_count)}function scan_tree(s,tree,max_code){var n;var prevlen=-1;var curlen;var nextlen=tree[0*2+1];var count=0;var max_count=7;var min_count=4;if(nextlen===0){max_count=138;min_count=3}tree[(max_code+1)*2+1]=65535;for(n=0;n<=max_code;n++){curlen=nextlen;nextlen=tree[(n+1)*2+1];if(++count<max_count&&curlen===nextlen){continue}else if(count<min_count){s.bl_tree[curlen*2]+=count}else if(curlen!==0){if(curlen!==prevlen){s.bl_tree[curlen*2]++}s.bl_tree[REP_3_6*2]++}else if(count<=10){s.bl_tree[REPZ_3_10*2]++}else{s.bl_tree[REPZ_11_138*2]++}count=0;prevlen=curlen;if(nextlen===0){max_count=138;min_count=3}else if(curlen===nextlen){max_count=6;min_count=3}else{max_count=7;min_count=4}}}function send_tree(s,tree,max_code){var n;var prevlen=-1;var curlen;var nextlen=tree[0*2+1];var count=0;var max_count=7;var min_count=4;if(nextlen===0){max_count=138;min_count=3}for(n=0;n<=max_code;n++){curlen=nextlen;nextlen=tree[(n+1)*2+1];if(++count<max_count&&curlen===nextlen){continue}else if(count<min_count){do{send_code(s,curlen,s.bl_tree)}while(--count!==0)}else if(curlen!==0){if(curlen!==prevlen){send_code(s,curlen,s.bl_tree);count--}send_code(s,REP_3_6,s.bl_tree);send_bits(s,count-3,2)}else if(count<=10){send_code(s,REPZ_3_10,s.bl_tree);send_bits(s,count-3,3)}else{send_code(s,REPZ_11_138,s.bl_tree);send_bits(s,count-11,7)}count=0;prevlen=curlen;if(nextlen===0){max_count=138;min_count=3}else if(curlen===nextlen){max_count=6;min_count=3}else{max_count=7;min_count=4}}}function build_bl_tree(s){var max_blindex;scan_tree(s,s.dyn_ltree,s.l_desc.max_code);scan_tree(s,s.dyn_dtree,s.d_desc.max_code);build_tree(s,s.bl_desc);for(max_blindex=BL_CODES-1;max_blindex>=3;max_blindex--){if(s.bl_tree[bl_order[max_blindex]*2+1]!==0){break}}s.opt_len+=3*(max_blindex+1)+5+5+4;return max_blindex}function send_all_trees(s,lcodes,dcodes,blcodes){var rank;send_bits(s,lcodes-257,5);send_bits(s,dcodes-1,5);send_bits(s,blcodes-4,4);for(rank=0;rank<blcodes;rank++){send_bits(s,s.bl_tree[bl_order[rank]*2+1],3)}send_tree(s,s.dyn_ltree,lcodes-1);send_tree(s,s.dyn_dtree,dcodes-1)}function detect_data_type(s){var black_mask=4093624447;var n;for(n=0;n<=31;n++,black_mask>>>=1){if(black_mask&1&&s.dyn_ltree[n*2]!==0){return Z_BINARY}}if(s.dyn_ltree[9*2]!==0||s.dyn_ltree[10*2]!==0||s.dyn_ltree[13*2]!==0){return Z_TEXT}for(n=32;n<LITERALS;n++){if(s.dyn_ltree[n*2]!==0){return Z_TEXT}}return Z_BINARY}var static_init_done=false;function _tr_init(s){if(!static_init_done){tr_static_init();static_init_done=true}s.l_desc=new TreeDesc(s.dyn_ltree,static_l_desc);s.d_desc=new TreeDesc(s.dyn_dtree,static_d_desc);s.bl_desc=new TreeDesc(s.bl_tree,static_bl_desc);s.bi_buf=0;s.bi_valid=0;init_block(s)}function _tr_stored_block(s,buf,stored_len,last){send_bits(s,(STORED_BLOCK<<1)+(last?1:0),3);copy_block(s,buf,stored_len,true)}function _tr_align(s){send_bits(s,STATIC_TREES<<1,3);send_code(s,END_BLOCK,static_ltree);bi_flush(s)}function _tr_flush_block(s,buf,stored_len,last){var opt_lenb,static_lenb;var max_blindex=0;if(s.level>0){if(s.strm.data_type===Z_UNKNOWN){s.strm.data_type=detect_data_type(s)}build_tree(s,s.l_desc);build_tree(s,s.d_desc);max_blindex=build_bl_tree(s);opt_lenb=s.opt_len+3+7>>>3;static_lenb=s.static_len+3+7>>>3;if(static_lenb<=opt_lenb){opt_lenb=static_lenb}}else{opt_lenb=static_lenb=stored_len+5}if(stored_len+4<=opt_lenb&&buf!==-1){_tr_stored_block(s,buf,stored_len,last)}else if(s.strategy===Z_FIXED||static_lenb===opt_lenb){send_bits(s,(STATIC_TREES<<1)+(last?1:0),3);compress_block(s,static_ltree,static_dtree)}else{send_bits(s,(DYN_TREES<<1)+(last?1:0),3);send_all_trees(s,s.l_desc.max_code+1,s.d_desc.max_code+1,max_blindex+1);compress_block(s,s.dyn_ltree,s.dyn_dtree)}init_block(s);if(last){bi_windup(s)}}function _tr_tally(s,dist,lc){s.pending_buf[s.d_buf+s.last_lit*2]=dist>>>8&255;s.pending_buf[s.d_buf+s.last_lit*2+1]=dist&255;s.pending_buf[s.l_buf+s.last_lit]=lc&255;s.last_lit++;if(dist===0){s.dyn_ltree[lc*2]++}else{s.matches++;dist--;s.dyn_ltree[(_length_code[lc]+LITERALS+1)*2]++;s.dyn_dtree[d_code(dist)*2]++}return s.last_lit===s.lit_bufsize-1}exports._tr_init=_tr_init;exports._tr_stored_block=_tr_stored_block;exports._tr_flush_block=_tr_flush_block;exports._tr_tally=_tr_tally;exports._tr_align=_tr_align},{\"../utils/common\":27}],39:[function(_dereq_,module,exports){\"use strict\";function ZStream(){this.input=null;this.next_in=0;this.avail_in=0;this.total_in=0;this.output=null;this.next_out=0;this.avail_out=0;this.total_out=0;this.msg=\"\";this.state=null;this.data_type=2;this.adler=0}module.exports=ZStream},{}]},{},[9])(9)});var XLSX={};(function make_xlsx(XLSX){XLSX.version=\"0.8.11\";var current_codepage=1200,current_cptable;if(typeof module!==\"undefined\"&&typeof require!==\"undefined\"){if(typeof cptable===\"undefined\")cptable=require(\"./dist/cpexcel\");current_cptable=cptable[current_codepage]}function reset_cp(){set_cp(1200)}var set_cp=function(cp){current_codepage=cp};function char_codes(data){var o=[];for(var i=0,len=data.length;i<len;++i)o[i]=data.charCodeAt(i);return o}var debom_xml=function(data){return data};var _getchar=function _gc1(x){return String.fromCharCode(x)};if(typeof cptable!==\"undefined\"){set_cp=function(cp){current_codepage=cp;current_cptable=cptable[cp]};debom_xml=function(data){if(data.charCodeAt(0)===255&&data.charCodeAt(1)===254){return cptable.utils.decode(1200,char_codes(data.substr(2)))}return data};_getchar=function _gc2(x){if(current_codepage===1200)return String.fromCharCode(x);return cptable.utils.decode(current_codepage,[x&255,x>>8])[0]}}var Base64=function make_b64(){var map=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";return{encode:function(input,utf8){var o=\"\";var c1,c2,c3,e1,e2,e3,e4;for(var i=0;i<input.length;){c1=input.charCodeAt(i++);c2=input.charCodeAt(i++);c3=input.charCodeAt(i++);e1=c1>>2;e2=(c1&3)<<4|c2>>4;e3=(c2&15)<<2|c3>>6;e4=c3&63;if(isNaN(c2)){e3=e4=64}else if(isNaN(c3)){e4=64}o+=map.charAt(e1)+map.charAt(e2)+map.charAt(e3)+map.charAt(e4)}return o},decode:function b64_decode(input,utf8){var o=\"\";var c1,c2,c3;var e1,e2,e3,e4;input=input.replace(/[^A-Za-z0-9\\+\\/\\=]/g,\"\");for(var i=0;i<input.length;){e1=map.indexOf(input.charAt(i++));e2=map.indexOf(input.charAt(i++));e3=map.indexOf(input.charAt(i++));e4=map.indexOf(input.charAt(i++));c1=e1<<2|e2>>4;c2=(e2&15)<<4|e3>>2;c3=(e3&3)<<6|e4;o+=String.fromCharCode(c1);if(e3!=64){o+=String.fromCharCode(c2)}if(e4!=64){o+=String.fromCharCode(c3)}}return o}}}();var has_buf=typeof Buffer!==\"undefined\";function new_raw_buf(len){return new(has_buf?Buffer:Array)(len)}function s2a(s){if(has_buf)return new Buffer(s,\"binary\");return s.split(\"\").map(function(x){return x.charCodeAt(0)&255})}var bconcat=function(bufs){return[].concat.apply([],bufs)};var chr0=/\\u0000/g,chr1=/[\\u0001-\\u0006]/;var SSF={};var make_ssf=function make_ssf(SSF){SSF.version=\"0.8.1\";function _strrev(x){var o=\"\",i=x.length-1;while(i>=0)o+=x.charAt(i--);return o}function fill(c,l){var o=\"\";while(o.length<l)o+=c;return o}function pad0(v,d){var t=\"\"+v;return t.length>=d?t:fill(\"0\",d-t.length)+t}function pad_(v,d){var t=\"\"+v;return t.length>=d?t:fill(\" \",d-t.length)+t}function rpad_(v,d){var t=\"\"+v;return t.length>=d?t:t+fill(\" \",d-t.length)}function pad0r1(v,d){var t=\"\"+Math.round(v);return t.length>=d?t:fill(\"0\",d-t.length)+t}function pad0r2(v,d){var t=\"\"+v;return t.length>=d?t:fill(\"0\",d-t.length)+t}var p2_32=Math.pow(2,32);function pad0r(v,d){if(v>p2_32||v<-p2_32)return pad0r1(v,d);var i=Math.round(v);return pad0r2(i,d)}function isgeneral(s,i){return s.length>=7+i&&(s.charCodeAt(i)|32)===103&&(s.charCodeAt(i+1)|32)===101&&(s.charCodeAt(i+2)|32)===110&&(s.charCodeAt(i+3)|32)===101&&(s.charCodeAt(i+4)|32)===114&&(s.charCodeAt(i+5)|32)===97&&(s.charCodeAt(i+6)|32)===108}var opts_fmt=[[\"date1904\",0],[\"output\",\"\"],[\"WTF\",false]];function fixopts(o){for(var y=0;y!=opts_fmt.length;++y)if(o[opts_fmt[y][0]]===undefined)o[opts_fmt[y][0]]=opts_fmt[y][1]}SSF.opts=opts_fmt;var table_fmt={0:\"General\",1:\"0\",2:\"0.00\",3:\"#,##0\",4:\"#,##0.00\",9:\"0%\",10:\"0.00%\",11:\"0.00E+00\",12:\"# ?/?\",13:\"# ??/??\",14:\"m/d/yy\",15:\"d-mmm-yy\",16:\"d-mmm\",17:\"mmm-yy\",18:\"h:mm AM/PM\",19:\"h:mm:ss AM/PM\",20:\"h:mm\",21:\"h:mm:ss\",22:\"m/d/yy h:mm\",37:\"#,##0 ;(#,##0)\",38:\"#,##0 ;[Red](#,##0)\",39:\"#,##0.00;(#,##0.00)\",40:\"#,##0.00;[Red](#,##0.00)\",45:\"mm:ss\",46:\"[h]:mm:ss\",47:\"mmss.0\",48:\"##0.0E+0\",49:\"@\",56:'\"上午/下午 \"hh\"時\"mm\"分\"ss\"秒 \"',65535:\"General\"};var days=[[\"Sun\",\"Sunday\"],[\"Mon\",\"Monday\"],[\"Tue\",\"Tuesday\"],[\"Wed\",\"Wednesday\"],[\"Thu\",\"Thursday\"],[\"Fri\",\"Friday\"],[\"Sat\",\"Saturday\"]];var months=[[\"J\",\"Jan\",\"January\"],[\"F\",\"Feb\",\"February\"],[\"M\",\"Mar\",\"March\"],[\"A\",\"Apr\",\"April\"],[\"M\",\"May\",\"May\"],[\"J\",\"Jun\",\"June\"],[\"J\",\"Jul\",\"July\"],[\"A\",\"Aug\",\"August\"],[\"S\",\"Sep\",\"September\"],[\"O\",\"Oct\",\"October\"],[\"N\",\"Nov\",\"November\"],[\"D\",\"Dec\",\"December\"]];function frac(x,D,mixed){var sgn=x<0?-1:1;var B=x*sgn;var P_2=0,P_1=1,P=0;var Q_2=1,Q_1=0,Q=0;var A=Math.floor(B);while(Q_1<D){A=Math.floor(B);P=A*P_1+P_2;Q=A*Q_1+Q_2;if(B-A<5e-10)break;B=1/(B-A);P_2=P_1;P_1=P;Q_2=Q_1;Q_1=Q}if(Q>D){Q=Q_1;P=P_1}if(Q>D){Q=Q_2;P=P_2}if(!mixed)return[0,sgn*P,Q];if(Q===0)throw\"Unexpected state: \"+P+\" \"+P_1+\" \"+P_2+\" \"+Q+\" \"+Q_1+\" \"+Q_2;var q=Math.floor(sgn*P/Q);return[q,sgn*P-q*Q,Q]}function general_fmt_int(v,opts){return\"\"+v}SSF._general_int=general_fmt_int;var general_fmt_num=function make_general_fmt_num(){var gnr1=/\\.(\\d*[1-9])0+$/,gnr2=/\\.0*$/,gnr4=/\\.(\\d*[1-9])0+/,gnr5=/\\.0*[Ee]/,gnr6=/(E[+-])(\\d)$/;function gfn2(v){var w=v<0?12:11;var o=gfn5(v.toFixed(12));if(o.length<=w)return o;o=v.toPrecision(10);if(o.length<=w)return o;return v.toExponential(5)}function gfn3(v){var o=v.toFixed(11).replace(gnr1,\".$1\");if(o.length>(v<0?12:11))o=v.toPrecision(6);return o}function gfn4(o){for(var i=0;i!=o.length;++i)if((o.charCodeAt(i)|32)===101)return o.replace(gnr4,\".$1\").replace(gnr5,\"E\").replace(\"e\",\"E\").replace(gnr6,\"$10$2\");return o}function gfn5(o){return o.indexOf(\".\")>-1?o.replace(gnr2,\"\").replace(gnr1,\".$1\"):o}return function general_fmt_num(v,opts){var V=Math.floor(Math.log(Math.abs(v))*Math.LOG10E),o;if(V>=-4&&V<=-1)o=v.toPrecision(10+V);else if(Math.abs(V)<=9)o=gfn2(v);else if(V===10)o=v.toFixed(10).substr(0,12);else o=gfn3(v);return gfn5(gfn4(o))}}();SSF._general_num=general_fmt_num;function general_fmt(v,opts){switch(typeof v){case\"string\":return v;case\"boolean\":return v?\"TRUE\":\"FALSE\";case\"number\":return(v|0)===v?general_fmt_int(v,opts):general_fmt_num(v,opts)}throw new Error(\"unsupported value in General format: \"+v)}SSF._general=general_fmt;function fix_hijri(date,o){return 0}function parse_date_code(v,opts,b2){if(v>2958465||v<0)return null;var date=v|0,time=Math.floor(86400*(v-date)),dow=0;var dout=[];var out={D:date,T:time,u:86400*(v-date)-time,y:0,m:0,d:0,H:0,M:0,S:0,q:0};if(Math.abs(out.u)<1e-6)out.u=0;fixopts(opts!=null?opts:opts=[]);if(opts.date1904)date+=1462;if(out.u>.999){out.u=0;if(++time==86400){time=0;++date}}if(date===60){dout=b2?[1317,10,29]:[1900,2,29];dow=3}else if(date===0){dout=b2?[1317,8,29]:[1900,1,0];dow=6}else{if(date>60)--date;var d=new Date(1900,0,1);d.setDate(d.getDate()+date-1);dout=[d.getFullYear(),d.getMonth()+1,d.getDate()];dow=d.getDay();if(date<60)dow=(dow+6)%7;if(b2)dow=fix_hijri(d,dout)}out.y=dout[0];out.m=dout[1];out.d=dout[2];out.S=time%60;time=Math.floor(time/60);out.M=time%60;time=Math.floor(time/60);out.H=time;out.q=dow;return out}SSF.parse_date_code=parse_date_code;function write_date(type,fmt,val,ss0){var o=\"\",ss=0,tt=0,y=val.y,out,outl=0;switch(type){case 98:y=val.y+543;case 121:switch(fmt.length){case 1:case 2:out=y%100;outl=2;break;default:out=y%1e4;outl=4;break}break;case 109:switch(fmt.length){case 1:case 2:out=val.m;outl=fmt.length;break;case 3:return months[val.m-1][1];case 5:return months[val.m-1][0];default:return months[val.m-1][2]}break;case 100:switch(fmt.length){case 1:case 2:out=val.d;outl=fmt.length;break;case 3:return days[val.q][0];default:return days[val.q][1]}break;case 104:switch(fmt.length){case 1:case 2:out=1+(val.H+11)%12;outl=fmt.length;break;default:throw\"bad hour format: \"+fmt}break;case 72:switch(fmt.length){case 1:case 2:out=val.H;outl=fmt.length;break;default:throw\"bad hour format: \"+fmt}break;case 77:switch(fmt.length){case 1:case 2:out=val.M;outl=fmt.length;break;default:throw\"bad minute format: \"+fmt}break;case 115:if(val.u===0)switch(fmt){case\"s\":case\"ss\":return pad0(val.S,fmt.length);case\".0\":case\".00\":case\".000\":}switch(fmt){case\"s\":case\"ss\":case\".0\":case\".00\":case\".000\":if(ss0>=2)tt=ss0===3?1e3:100;else tt=ss0===1?10:1;ss=Math.round(tt*(val.S+val.u));if(ss>=60*tt)ss=0;if(fmt===\"s\")return ss===0?\"0\":\"\"+ss/tt;o=pad0(ss,2+ss0);if(fmt===\"ss\")return o.substr(0,2);return\".\"+o.substr(2,fmt.length-1);default:throw\"bad second format: \"+fmt}case 90:switch(fmt){case\"[h]\":case\"[hh]\":out=val.D*24+val.H;break;case\"[m]\":case\"[mm]\":out=(val.D*24+val.H)*60+val.M;break;case\"[s]\":case\"[ss]\":out=((val.D*24+val.H)*60+val.M)*60+Math.round(val.S+val.u);break;default:throw\"bad abstime format: \"+fmt}outl=fmt.length===3?1:2;break;case 101:out=y;outl=1}if(outl>0)return pad0(out,outl);else return\"\"}function commaify(s){if(s.length<=3)return s;var j=s.length%3,o=s.substr(0,j);for(;j!=s.length;j+=3)o+=(o.length>0?\",\":\"\")+s.substr(j,3);return o}var write_num=function make_write_num(){var pct1=/%/g;function write_num_pct(type,fmt,val){var sfmt=fmt.replace(pct1,\"\"),mul=fmt.length-sfmt.length;return write_num(type,sfmt,val*Math.pow(10,2*mul))+fill(\"%\",mul)}function write_num_cm(type,fmt,val){var idx=fmt.length-1;while(fmt.charCodeAt(idx-1)===44)--idx;return write_num(type,fmt.substr(0,idx),val/Math.pow(10,3*(fmt.length-idx)))}function write_num_exp(fmt,val){var o;var idx=fmt.indexOf(\"E\")-fmt.indexOf(\".\")-1;if(fmt.match(/^#+0.0E\\+0$/)){var period=fmt.indexOf(\".\");if(period===-1)period=fmt.indexOf(\"E\");var ee=Math.floor(Math.log(Math.abs(val))*Math.LOG10E)%period;if(ee<0)ee+=period;o=(val/Math.pow(10,ee)).toPrecision(idx+1+(period+ee)%period);if(o.indexOf(\"e\")===-1){var fakee=Math.floor(Math.log(Math.abs(val))*Math.LOG10E);if(o.indexOf(\".\")===-1)o=o[0]+\".\"+o.substr(1)+\"E+\"+(fakee-o.length+ee);else o+=\"E+\"+(fakee-ee);while(o.substr(0,2)===\"0.\"){o=o[0]+o.substr(2,period)+\".\"+o.substr(2+period);o=o.replace(/^0+([1-9])/,\"$1\").replace(/^0+\\./,\"0.\")}o=o.replace(/\\+-/,\"-\")}o=o.replace(/^([+-]?)(\\d*)\\.(\\d*)[Ee]/,function($$,$1,$2,$3){return $1+$2+$3.substr(0,(period+ee)%period)+\".\"+$3.substr(ee)+\"E\"})}else o=val.toExponential(idx);if(fmt.match(/E\\+00$/)&&o.match(/e[+-]\\d$/))o=o.substr(0,o.length-1)+\"0\"+o[o.length-1];if(fmt.match(/E\\-/)&&o.match(/e\\+/))o=o.replace(/e\\+/,\"e\");return o.replace(\"e\",\"E\")}var frac1=/# (\\?+)( ?)\\/( ?)(\\d+)/;function write_num_f1(r,aval,sign){var den=parseInt(r[4]),rr=Math.round(aval*den),base=Math.floor(rr/den);var myn=rr-base*den,myd=den;return sign+(base===0?\"\":\"\"+base)+\" \"+(myn===0?fill(\" \",r[1].length+1+r[4].length):pad_(myn,r[1].length)+r[2]+\"/\"+r[3]+pad0(myd,r[4].length))}function write_num_f2(r,aval,sign){return sign+(aval===0?\"\":\"\"+aval)+fill(\" \",r[1].length+2+r[4].length)}var dec1=/^#*0*\\.(0+)/;var closeparen=/\\).*[0#]/;var phone=/\\(###\\) ###\\\\?-####/;function hashq(str){var o=\"\",cc;for(var i=0;i!=str.length;++i)switch(cc=str.charCodeAt(i)){case 35:break;case 63:o+=\" \";break;case 48:o+=\"0\";break;default:o+=String.fromCharCode(cc)}return o}function rnd(val,d){var dd=Math.pow(10,d);return\"\"+Math.round(val*dd)/dd}function dec(val,d){return Math.round((val-Math.floor(val))*Math.pow(10,d))}function flr(val){if(val<2147483647&&val>-2147483648)return\"\"+(val>=0?val|0:val-1|0);return\"\"+Math.floor(val)}function write_num_flt(type,fmt,val){if(type.charCodeAt(0)===40&&!fmt.match(closeparen)){var ffmt=fmt.replace(/\\( */,\"\").replace(/ \\)/,\"\").replace(/\\)/,\"\");if(val>=0)return write_num_flt(\"n\",ffmt,val);return\"(\"+write_num_flt(\"n\",ffmt,-val)+\")\"}if(fmt.charCodeAt(fmt.length-1)===44)return write_num_cm(type,fmt,val);if(fmt.indexOf(\"%\")!==-1)return write_num_pct(type,fmt,val);if(fmt.indexOf(\"E\")!==-1)return write_num_exp(fmt,val);if(fmt.charCodeAt(0)===36)return\"$\"+write_num_flt(type,fmt.substr(fmt[1]==\" \"?2:1),val);var o,oo;var r,ri,ff,aval=Math.abs(val),sign=val<0?\"-\":\"\";if(fmt.match(/^00+$/))return sign+pad0r(aval,fmt.length);if(fmt.match(/^[#?]+$/)){o=pad0r(val,0);if(o===\"0\")o=\"\";return o.length>fmt.length?o:hashq(fmt.substr(0,fmt.length-o.length))+o}if((r=fmt.match(frac1))!==null)return write_num_f1(r,aval,sign);if(fmt.match(/^#+0+$/)!==null)return sign+pad0r(aval,fmt.length-fmt.indexOf(\"0\"));if((r=fmt.match(dec1))!==null){o=rnd(val,r[1].length).replace(/^([^\\.]+)$/,\"$1.\"+r[1]).replace(/\\.$/,\".\"+r[1]).replace(/\\.(\\d*)$/,function($$,$1){return\".\"+$1+fill(\"0\",r[1].length-$1.length)});return fmt.indexOf(\"0.\")!==-1?o:o.replace(/^0\\./,\".\")}fmt=fmt.replace(/^#+([0.])/,\"$1\");if((r=fmt.match(/^(0*)\\.(#*)$/))!==null){return sign+rnd(aval,r[2].length).replace(/\\.(\\d*[1-9])0*$/,\".$1\").replace(/^(-?\\d*)$/,\"$1.\").replace(/^0\\./,r[1].length?\"0.\":\".\")}if((r=fmt.match(/^#,##0(\\.?)$/))!==null)return sign+commaify(pad0r(aval,0));if((r=fmt.match(/^#,##0\\.([#0]*0)$/))!==null){return val<0?\"-\"+write_num_flt(type,fmt,-val):commaify(\"\"+Math.floor(val))+\".\"+pad0(dec(val,r[1].length),r[1].length)}if((r=fmt.match(/^#,#*,#0/))!==null)return write_num_flt(type,fmt.replace(/^#,#*,/,\"\"),val);if((r=fmt.match(/^([0#]+)(\\\\?-([0#]+))+$/))!==null){o=_strrev(write_num_flt(type,fmt.replace(/[\\\\-]/g,\"\"),val));ri=0;return _strrev(_strrev(fmt.replace(/\\\\/g,\"\")).replace(/[0#]/g,function(x){return ri<o.length?o[ri++]:x===\"0\"?\"0\":\"\"}))}if(fmt.match(phone)!==null){o=write_num_flt(type,\"##########\",val);return\"(\"+o.substr(0,3)+\") \"+o.substr(3,3)+\"-\"+o.substr(6)}var oa=\"\";if((r=fmt.match(/^([#0?]+)( ?)\\/( ?)([#0?]+)/))!==null){ri=Math.min(r[4].length,7);ff=frac(aval,Math.pow(10,ri)-1,false);o=\"\"+sign;oa=write_num(\"n\",r[1],ff[1]);if(oa[oa.length-1]==\" \")oa=oa.substr(0,oa.length-1)+\"0\";o+=oa+r[2]+\"/\"+r[3];oa=rpad_(ff[2],ri);if(oa.length<r[4].length)oa=hashq(r[4].substr(r[4].length-oa.length))+oa;o+=oa;return o}if((r=fmt.match(/^# ([#0?]+)( ?)\\/( ?)([#0?]+)/))!==null){ri=Math.min(Math.max(r[1].length,r[4].length),7);ff=frac(aval,Math.pow(10,ri)-1,true);return sign+(ff[0]||(ff[1]?\"\":\"0\"))+\" \"+(ff[1]?pad_(ff[1],ri)+r[2]+\"/\"+r[3]+rpad_(ff[2],ri):fill(\" \",2*ri+1+r[2].length+r[3].length))}if((r=fmt.match(/^[#0?]+$/))!==null){o=pad0r(val,0);if(fmt.length<=o.length)return o;return hashq(fmt.substr(0,fmt.length-o.length))+o}if((r=fmt.match(/^([#0?]+)\\.([#0]+)$/))!==null){o=\"\"+val.toFixed(Math.min(r[2].length,10)).replace(/([^0])0+$/,\"$1\");ri=o.indexOf(\".\");var lres=fmt.indexOf(\".\")-ri,rres=fmt.length-o.length-lres;return hashq(fmt.substr(0,lres)+o+fmt.substr(fmt.length-rres))}if((r=fmt.match(/^00,000\\.([#0]*0)$/))!==null){ri=dec(val,r[1].length);return val<0?\"-\"+write_num_flt(type,fmt,-val):commaify(flr(val)).replace(/^\\d,\\d{3}$/,\"0$&\").replace(/^\\d*$/,function($$){return\"00,\"+($$.length<3?pad0(0,3-$$.length):\"\")+$$})+\".\"+pad0(ri,r[1].length)}switch(fmt){case\"#,###\":var x=commaify(pad0r(aval,0));return x!==\"0\"?sign+x:\"\";default:}throw new Error(\"unsupported format |\"+fmt+\"|\")}function write_num_cm2(type,fmt,val){var idx=fmt.length-1;while(fmt.charCodeAt(idx-1)===44)--idx;return write_num(type,fmt.substr(0,idx),val/Math.pow(10,3*(fmt.length-idx)))}function write_num_pct2(type,fmt,val){var sfmt=fmt.replace(pct1,\"\"),mul=fmt.length-sfmt.length;return write_num(type,sfmt,val*Math.pow(10,2*mul))+fill(\"%\",mul)}function write_num_exp2(fmt,val){var o;var idx=fmt.indexOf(\"E\")-fmt.indexOf(\".\")-1;if(fmt.match(/^#+0.0E\\+0$/)){var period=fmt.indexOf(\".\");if(period===-1)period=fmt.indexOf(\"E\");var ee=Math.floor(Math.log(Math.abs(val))*Math.LOG10E)%period;if(ee<0)ee+=period;o=(val/Math.pow(10,ee)).toPrecision(idx+1+(period+ee)%period);if(!o.match(/[Ee]/)){var fakee=Math.floor(Math.log(Math.abs(val))*Math.LOG10E);if(o.indexOf(\".\")===-1)o=o[0]+\".\"+o.substr(1)+\"E+\"+(fakee-o.length+ee);else o+=\"E+\"+(fakee-ee);o=o.replace(/\\+-/,\"-\")}o=o.replace(/^([+-]?)(\\d*)\\.(\\d*)[Ee]/,function($$,$1,$2,$3){return $1+$2+$3.substr(0,(period+ee)%period)+\".\"+$3.substr(ee)+\"E\"})}else o=val.toExponential(idx);if(fmt.match(/E\\+00$/)&&o.match(/e[+-]\\d$/))o=o.substr(0,o.length-1)+\"0\"+o[o.length-1];if(fmt.match(/E\\-/)&&o.match(/e\\+/))o=o.replace(/e\\+/,\"e\");return o.replace(\"e\",\"E\")}function write_num_int(type,fmt,val){if(type.charCodeAt(0)===40&&!fmt.match(closeparen)){var ffmt=fmt.replace(/\\( */,\"\").replace(/ \\)/,\"\").replace(/\\)/,\"\");if(val>=0)return write_num_int(\"n\",ffmt,val);return\"(\"+write_num_int(\"n\",ffmt,-val)+\")\"}if(fmt.charCodeAt(fmt.length-1)===44)return write_num_cm2(type,fmt,val);if(fmt.indexOf(\"%\")!==-1)return write_num_pct2(type,fmt,val);if(fmt.indexOf(\"E\")!==-1)return write_num_exp2(fmt,val);if(fmt.charCodeAt(0)===36)return\"$\"+write_num_int(type,fmt.substr(fmt[1]==\" \"?2:1),val);var o;var r,ri,ff,aval=Math.abs(val),sign=val<0?\"-\":\"\";if(fmt.match(/^00+$/))return sign+pad0(aval,fmt.length);if(fmt.match(/^[#?]+$/)){o=\"\"+val;if(val===0)o=\"\";return o.length>fmt.length?o:hashq(fmt.substr(0,fmt.length-o.length))+o}if((r=fmt.match(frac1))!==null)return write_num_f2(r,aval,sign);if(fmt.match(/^#+0+$/)!==null)return sign+pad0(aval,fmt.length-fmt.indexOf(\"0\"));if((r=fmt.match(dec1))!==null){o=(\"\"+val).replace(/^([^\\.]+)$/,\"$1.\"+r[1]).replace(/\\.$/,\".\"+r[1]).replace(/\\.(\\d*)$/,function($$,$1){return\".\"+$1+fill(\"0\",r[1].length-$1.length)});return fmt.indexOf(\"0.\")!==-1?o:o.replace(/^0\\./,\".\");\r\n}fmt=fmt.replace(/^#+([0.])/,\"$1\");if((r=fmt.match(/^(0*)\\.(#*)$/))!==null){return sign+(\"\"+aval).replace(/\\.(\\d*[1-9])0*$/,\".$1\").replace(/^(-?\\d*)$/,\"$1.\").replace(/^0\\./,r[1].length?\"0.\":\".\")}if((r=fmt.match(/^#,##0(\\.?)$/))!==null)return sign+commaify(\"\"+aval);if((r=fmt.match(/^#,##0\\.([#0]*0)$/))!==null){return val<0?\"-\"+write_num_int(type,fmt,-val):commaify(\"\"+val)+\".\"+fill(\"0\",r[1].length)}if((r=fmt.match(/^#,#*,#0/))!==null)return write_num_int(type,fmt.replace(/^#,#*,/,\"\"),val);if((r=fmt.match(/^([0#]+)(\\\\?-([0#]+))+$/))!==null){o=_strrev(write_num_int(type,fmt.replace(/[\\\\-]/g,\"\"),val));ri=0;return _strrev(_strrev(fmt.replace(/\\\\/g,\"\")).replace(/[0#]/g,function(x){return ri<o.length?o[ri++]:x===\"0\"?\"0\":\"\"}))}if(fmt.match(phone)!==null){o=write_num_int(type,\"##########\",val);return\"(\"+o.substr(0,3)+\") \"+o.substr(3,3)+\"-\"+o.substr(6)}var oa=\"\";if((r=fmt.match(/^([#0?]+)( ?)\\/( ?)([#0?]+)/))!==null){ri=Math.min(r[4].length,7);ff=frac(aval,Math.pow(10,ri)-1,false);o=\"\"+sign;oa=write_num(\"n\",r[1],ff[1]);if(oa[oa.length-1]==\" \")oa=oa.substr(0,oa.length-1)+\"0\";o+=oa+r[2]+\"/\"+r[3];oa=rpad_(ff[2],ri);if(oa.length<r[4].length)oa=hashq(r[4].substr(r[4].length-oa.length))+oa;o+=oa;return o}if((r=fmt.match(/^# ([#0?]+)( ?)\\/( ?)([#0?]+)/))!==null){ri=Math.min(Math.max(r[1].length,r[4].length),7);ff=frac(aval,Math.pow(10,ri)-1,true);return sign+(ff[0]||(ff[1]?\"\":\"0\"))+\" \"+(ff[1]?pad_(ff[1],ri)+r[2]+\"/\"+r[3]+rpad_(ff[2],ri):fill(\" \",2*ri+1+r[2].length+r[3].length))}if((r=fmt.match(/^[#0?]+$/))!==null){o=\"\"+val;if(fmt.length<=o.length)return o;return hashq(fmt.substr(0,fmt.length-o.length))+o}if((r=fmt.match(/^([#0]+)\\.([#0]+)$/))!==null){o=\"\"+val.toFixed(Math.min(r[2].length,10)).replace(/([^0])0+$/,\"$1\");ri=o.indexOf(\".\");var lres=fmt.indexOf(\".\")-ri,rres=fmt.length-o.length-lres;return hashq(fmt.substr(0,lres)+o+fmt.substr(fmt.length-rres))}if((r=fmt.match(/^00,000\\.([#0]*0)$/))!==null){return val<0?\"-\"+write_num_int(type,fmt,-val):commaify(\"\"+val).replace(/^\\d,\\d{3}$/,\"0$&\").replace(/^\\d*$/,function($$){return\"00,\"+($$.length<3?pad0(0,3-$$.length):\"\")+$$})+\".\"+pad0(0,r[1].length)}switch(fmt){case\"#,###\":var x=commaify(\"\"+aval);return x!==\"0\"?sign+x:\"\";default:}throw new Error(\"unsupported format |\"+fmt+\"|\")}return function write_num(type,fmt,val){return(val|0)===val?write_num_int(type,fmt,val):write_num_flt(type,fmt,val)}}();function split_fmt(fmt){var out=[];var in_str=false,cc;for(var i=0,j=0;i<fmt.length;++i)switch(cc=fmt.charCodeAt(i)){case 34:in_str=!in_str;break;case 95:case 42:case 92:++i;break;case 59:out[out.length]=fmt.substr(j,i-j);j=i+1}out[out.length]=fmt.substr(j);if(in_str===true)throw new Error(\"Format |\"+fmt+\"| unterminated string \");return out}SSF._split=split_fmt;var abstime=/\\[[HhMmSs]*\\]/;function eval_fmt(fmt,v,opts,flen){var out=[],o=\"\",i=0,c=\"\",lst=\"t\",q,dt,j,cc;var hr=\"H\";while(i<fmt.length){switch(c=fmt[i]){case\"G\":if(!isgeneral(fmt,i))throw new Error(\"unrecognized character \"+c+\" in \"+fmt);out[out.length]={t:\"G\",v:\"General\"};i+=7;break;case'\"':for(o=\"\";(cc=fmt.charCodeAt(++i))!==34&&i<fmt.length;)o+=String.fromCharCode(cc);out[out.length]={t:\"t\",v:o};++i;break;case\"\\\\\":var w=fmt[++i],t=w===\"(\"||w===\")\"?w:\"t\";out[out.length]={t:t,v:w};++i;break;case\"_\":out[out.length]={t:\"t\",v:\" \"};i+=2;break;case\"@\":out[out.length]={t:\"T\",v:v};++i;break;case\"B\":case\"b\":if(fmt[i+1]===\"1\"||fmt[i+1]===\"2\"){if(dt==null){dt=parse_date_code(v,opts,fmt[i+1]===\"2\");if(dt==null)return\"\"}out[out.length]={t:\"X\",v:fmt.substr(i,2)};lst=c;i+=2;break}case\"M\":case\"D\":case\"Y\":case\"H\":case\"S\":case\"E\":c=c.toLowerCase();case\"m\":case\"d\":case\"y\":case\"h\":case\"s\":case\"e\":case\"g\":if(v<0)return\"\";if(dt==null){dt=parse_date_code(v,opts);if(dt==null)return\"\"}o=c;while(++i<fmt.length&&fmt[i].toLowerCase()===c)o+=c;if(c===\"m\"&&lst.toLowerCase()===\"h\")c=\"M\";if(c===\"h\")c=hr;out[out.length]={t:c,v:o};lst=c;break;case\"A\":q={t:c,v:\"A\"};if(dt==null)dt=parse_date_code(v,opts);if(fmt.substr(i,3)===\"A/P\"){if(dt!=null)q.v=dt.H>=12?\"P\":\"A\";q.t=\"T\";hr=\"h\";i+=3}else if(fmt.substr(i,5)===\"AM/PM\"){if(dt!=null)q.v=dt.H>=12?\"PM\":\"AM\";q.t=\"T\";i+=5;hr=\"h\"}else{q.t=\"t\";++i}if(dt==null&&q.t===\"T\")return\"\";out[out.length]=q;lst=c;break;case\"[\":o=c;while(fmt[i++]!==\"]\"&&i<fmt.length)o+=fmt[i];if(o.substr(-1)!==\"]\")throw'unterminated \"[\" block: |'+o+\"|\";if(o.match(abstime)){if(dt==null){dt=parse_date_code(v,opts);if(dt==null)return\"\"}out[out.length]={t:\"Z\",v:o.toLowerCase()}}else{o=\"\"}break;case\".\":if(dt!=null){o=c;while((c=fmt[++i])===\"0\")o+=c;out[out.length]={t:\"s\",v:o};break}case\"0\":case\"#\":o=c;while(\"0#?.,E+-%\".indexOf(c=fmt[++i])>-1||c==\"\\\\\"&&fmt[i+1]==\"-\"&&\"0#\".indexOf(fmt[i+2])>-1)o+=c;out[out.length]={t:\"n\",v:o};break;case\"?\":o=c;while(fmt[++i]===c)o+=c;q={t:c,v:o};out[out.length]=q;lst=c;break;case\"*\":++i;if(fmt[i]==\" \"||fmt[i]==\"*\")++i;break;case\"(\":case\")\":out[out.length]={t:flen===1?\"t\":c,v:c};++i;break;case\"1\":case\"2\":case\"3\":case\"4\":case\"5\":case\"6\":case\"7\":case\"8\":case\"9\":o=c;while(\"0123456789\".indexOf(fmt[++i])>-1)o+=fmt[i];out[out.length]={t:\"D\",v:o};break;case\" \":out[out.length]={t:c,v:c};++i;break;default:if(\",$-+/():!^&'~{}<>=€acfijklopqrtuvwxz\".indexOf(c)===-1)throw new Error(\"unrecognized character \"+c+\" in \"+fmt);out[out.length]={t:\"t\",v:c};++i;break}}var bt=0,ss0=0,ssm;for(i=out.length-1,lst=\"t\";i>=0;--i){switch(out[i].t){case\"h\":case\"H\":out[i].t=hr;lst=\"h\";if(bt<1)bt=1;break;case\"s\":if(ssm=out[i].v.match(/\\.0+$/))ss0=Math.max(ss0,ssm[0].length-1);if(bt<3)bt=3;case\"d\":case\"y\":case\"M\":case\"e\":lst=out[i].t;break;case\"m\":if(lst===\"s\"){out[i].t=\"M\";if(bt<2)bt=2}break;case\"X\":if(out[i].v===\"B2\");break;case\"Z\":if(bt<1&&out[i].v.match(/[Hh]/))bt=1;if(bt<2&&out[i].v.match(/[Mm]/))bt=2;if(bt<3&&out[i].v.match(/[Ss]/))bt=3}}switch(bt){case 0:break;case 1:if(dt.u>=.5){dt.u=0;++dt.S}if(dt.S>=60){dt.S=0;++dt.M}if(dt.M>=60){dt.M=0;++dt.H}break;case 2:if(dt.u>=.5){dt.u=0;++dt.S}if(dt.S>=60){dt.S=0;++dt.M}break}var nstr=\"\",jj;for(i=0;i<out.length;++i){switch(out[i].t){case\"t\":case\"T\":case\" \":case\"D\":break;case\"X\":out[i]=undefined;break;case\"d\":case\"m\":case\"y\":case\"h\":case\"H\":case\"M\":case\"s\":case\"e\":case\"b\":case\"Z\":out[i].v=write_date(out[i].t.charCodeAt(0),out[i].v,dt,ss0);out[i].t=\"t\";break;case\"n\":case\"(\":case\"?\":jj=i+1;while(out[jj]!=null&&((c=out[jj].t)===\"?\"||c===\"D\"||(c===\" \"||c===\"t\")&&out[jj+1]!=null&&(out[jj+1].t===\"?\"||out[jj+1].t===\"t\"&&out[jj+1].v===\"/\")||out[i].t===\"(\"&&(c===\" \"||c===\"n\"||c===\")\")||c===\"t\"&&(out[jj].v===\"/\"||\"$€\".indexOf(out[jj].v)>-1||out[jj].v===\" \"&&out[jj+1]!=null&&out[jj+1].t==\"?\"))){out[i].v+=out[jj].v;out[jj]=undefined;++jj}nstr+=out[i].v;i=jj-1;break;case\"G\":out[i].t=\"t\";out[i].v=general_fmt(v,opts);break}}var vv=\"\",myv,ostr;if(nstr.length>0){myv=v<0&&nstr.charCodeAt(0)===45?-v:v;ostr=write_num(nstr.charCodeAt(0)===40?\"(\":\"n\",nstr,myv);jj=ostr.length-1;var decpt=out.length;for(i=0;i<out.length;++i)if(out[i]!=null&&out[i].v.indexOf(\".\")>-1){decpt=i;break}var lasti=out.length;if(decpt===out.length&&ostr.indexOf(\"E\")===-1){for(i=out.length-1;i>=0;--i){if(out[i]==null||\"n?(\".indexOf(out[i].t)===-1)continue;if(jj>=out[i].v.length-1){jj-=out[i].v.length;out[i].v=ostr.substr(jj+1,out[i].v.length)}else if(jj<0)out[i].v=\"\";else{out[i].v=ostr.substr(0,jj+1);jj=-1}out[i].t=\"t\";lasti=i}if(jj>=0&&lasti<out.length)out[lasti].v=ostr.substr(0,jj+1)+out[lasti].v}else if(decpt!==out.length&&ostr.indexOf(\"E\")===-1){jj=ostr.indexOf(\".\")-1;for(i=decpt;i>=0;--i){if(out[i]==null||\"n?(\".indexOf(out[i].t)===-1)continue;j=out[i].v.indexOf(\".\")>-1&&i===decpt?out[i].v.indexOf(\".\")-1:out[i].v.length-1;vv=out[i].v.substr(j+1);for(;j>=0;--j){if(jj>=0&&(out[i].v[j]===\"0\"||out[i].v[j]===\"#\"))vv=ostr[jj--]+vv}out[i].v=vv;out[i].t=\"t\";lasti=i}if(jj>=0&&lasti<out.length)out[lasti].v=ostr.substr(0,jj+1)+out[lasti].v;jj=ostr.indexOf(\".\")+1;for(i=decpt;i<out.length;++i){if(out[i]==null||\"n?(\".indexOf(out[i].t)===-1&&i!==decpt)continue;j=out[i].v.indexOf(\".\")>-1&&i===decpt?out[i].v.indexOf(\".\")+1:0;vv=out[i].v.substr(0,j);for(;j<out[i].v.length;++j){if(jj<ostr.length)vv+=ostr[jj++]}out[i].v=vv;out[i].t=\"t\";lasti=i}}}for(i=0;i<out.length;++i)if(out[i]!=null&&\"n(?\".indexOf(out[i].t)>-1){myv=flen>1&&v<0&&i>0&&out[i-1].v===\"-\"?-v:v;out[i].v=write_num(out[i].t,out[i].v,myv);out[i].t=\"t\"}var retval=\"\";for(i=0;i!==out.length;++i)if(out[i]!=null)retval+=out[i].v;return retval}SSF._eval=eval_fmt;var cfregex=/\\[[=<>]/;var cfregex2=/\\[([=<>]*)(-?\\d+\\.?\\d*)\\]/;function chkcond(v,rr){if(rr==null)return false;var thresh=parseFloat(rr[2]);switch(rr[1]){case\"=\":if(v==thresh)return true;break;case\">\":if(v>thresh)return true;break;case\"<\":if(v<thresh)return true;break;case\"<>\":if(v!=thresh)return true;break;case\">=\":if(v>=thresh)return true;break;case\"<=\":if(v<=thresh)return true;break}return false}function choose_fmt(f,v){var fmt=split_fmt(f);var l=fmt.length,lat=fmt[l-1].indexOf(\"@\");if(l<4&&lat>-1)--l;if(fmt.length>4)throw\"cannot find right format for |\"+fmt+\"|\";if(typeof v!==\"number\")return[4,fmt.length===4||lat>-1?fmt[fmt.length-1]:\"@\"];switch(fmt.length){case 1:fmt=lat>-1?[\"General\",\"General\",\"General\",fmt[0]]:[fmt[0],fmt[0],fmt[0],\"@\"];break;case 2:fmt=lat>-1?[fmt[0],fmt[0],fmt[0],fmt[1]]:[fmt[0],fmt[1],fmt[0],\"@\"];break;case 3:fmt=lat>-1?[fmt[0],fmt[1],fmt[0],fmt[2]]:[fmt[0],fmt[1],fmt[2],\"@\"];break;case 4:break}var ff=v>0?fmt[0]:v<0?fmt[1]:fmt[2];if(fmt[0].indexOf(\"[\")===-1&&fmt[1].indexOf(\"[\")===-1)return[l,ff];if(fmt[0].match(cfregex)!=null||fmt[1].match(cfregex)!=null){var m1=fmt[0].match(cfregex2);var m2=fmt[1].match(cfregex2);return chkcond(v,m1)?[l,fmt[0]]:chkcond(v,m2)?[l,fmt[1]]:[l,fmt[m1!=null&&m2!=null?2:1]]}return[l,ff]}function format(fmt,v,o){fixopts(o!=null?o:o=[]);var sfmt=\"\";switch(typeof fmt){case\"string\":sfmt=fmt;break;case\"number\":sfmt=(o.table!=null?o.table:table_fmt)[fmt];break}if(isgeneral(sfmt,0))return general_fmt(v,o);var f=choose_fmt(sfmt,v);if(isgeneral(f[1]))return general_fmt(v,o);if(v===true)v=\"TRUE\";else if(v===false)v=\"FALSE\";else if(v===\"\"||v==null)return\"\";return eval_fmt(f[1],v,o,f[0])}SSF._table=table_fmt;SSF.load=function load_entry(fmt,idx){table_fmt[idx]=fmt};SSF.format=format;SSF.get_table=function get_table(){return table_fmt};SSF.load_table=function load_table(tbl){for(var i=0;i!=392;++i)if(tbl[i]!==undefined)SSF.load(tbl[i],i)}};make_ssf(SSF);var XLMLFormatMap={\"General Number\":\"General\",\"General Date\":SSF._table[22],\"Long Date\":\"dddd, mmmm dd, yyyy\",\"Medium Date\":SSF._table[15],\"Short Date\":SSF._table[14],\"Long Time\":SSF._table[19],\"Medium Time\":SSF._table[18],\"Short Time\":SSF._table[20],Currency:'\"$\"#,##0.00_);[Red]\\\\(\"$\"#,##0.00\\\\)',Fixed:SSF._table[2],Standard:SSF._table[4],Percent:SSF._table[10],Scientific:SSF._table[11],\"Yes/No\":'\"Yes\";\"Yes\";\"No\";@',\"True/False\":'\"True\";\"True\";\"False\";@',\"On/Off\":'\"Yes\";\"Yes\";\"No\";@'};var DO_NOT_EXPORT_CFB=true;var CFB=function _CFB(){var exports={};exports.version=\"0.10.2\";function parse(file){var mver=3;var ssz=512;var nmfs=0;var ndfs=0;var dir_start=0;var minifat_start=0;var difat_start=0;var fat_addrs=[];var blob=file.slice(0,512);prep_blob(blob,0);var mv=check_get_mver(blob);mver=mv[0];switch(mver){case 3:ssz=512;break;case 4:ssz=4096;break;default:throw\"Major Version: Expected 3 or 4 saw \"+mver}if(ssz!==512){blob=file.slice(0,ssz);prep_blob(blob,28)}var header=file.slice(0,ssz);check_shifts(blob,mver);var nds=blob.read_shift(4,\"i\");if(mver===3&&nds!==0)throw\"# Directory Sectors: Expected 0 saw \"+nds;blob.l+=4;dir_start=blob.read_shift(4,\"i\");blob.l+=4;blob.chk(\"00100000\",\"Mini Stream Cutoff Size: \");minifat_start=blob.read_shift(4,\"i\");nmfs=blob.read_shift(4,\"i\");difat_start=blob.read_shift(4,\"i\");ndfs=blob.read_shift(4,\"i\");for(var q,j=0;j<109;++j){q=blob.read_shift(4,\"i\");if(q<0)break;fat_addrs[j]=q}var sectors=sectorify(file,ssz);sleuth_fat(difat_start,ndfs,sectors,ssz,fat_addrs);var sector_list=make_sector_list(sectors,dir_start,fat_addrs,ssz);sector_list[dir_start].name=\"!Directory\";if(nmfs>0&&minifat_start!==ENDOFCHAIN)sector_list[minifat_start].name=\"!MiniFAT\";sector_list[fat_addrs[0]].name=\"!FAT\";sector_list.fat_addrs=fat_addrs;sector_list.ssz=ssz;var files={},Paths=[],FileIndex=[],FullPaths=[],FullPathDir={};read_directory(dir_start,sector_list,sectors,Paths,nmfs,files,FileIndex);build_full_paths(FileIndex,FullPathDir,FullPaths,Paths);var root_name=Paths.shift();Paths.root=root_name;var find_path=make_find_path(FullPaths,Paths,FileIndex,files,root_name);return{raw:{header:header,sectors:sectors},FileIndex:FileIndex,FullPaths:FullPaths,FullPathDir:FullPathDir,find:find_path}}function check_get_mver(blob){blob.chk(HEADER_SIGNATURE,\"Header Signature: \");blob.chk(HEADER_CLSID,\"CLSID: \");var mver=blob.read_shift(2,\"u\");return[blob.read_shift(2,\"u\"),mver]}function check_shifts(blob,mver){var shift=9;blob.chk(\"feff\",\"Byte Order: \");switch(shift=blob.read_shift(2)){case 9:if(mver!==3)throw\"MajorVersion/SectorShift Mismatch\";break;case 12:if(mver!==4)throw\"MajorVersion/SectorShift Mismatch\";break;default:throw\"Sector Shift: Expected 9 or 12 saw \"+shift}blob.chk(\"0600\",\"Mini Sector Shift: \");blob.chk(\"000000000000\",\"Reserved: \")}function sectorify(file,ssz){var nsectors=Math.ceil(file.length/ssz)-1;var sectors=new Array(nsectors);for(var i=1;i<nsectors;++i)sectors[i-1]=file.slice(i*ssz,(i+1)*ssz);sectors[nsectors-1]=file.slice(nsectors*ssz);return sectors}function build_full_paths(FI,FPD,FP,Paths){var i=0,L=0,R=0,C=0,j=0,pl=Paths.length;var dad=new Array(pl),q=new Array(pl);for(;i<pl;++i){dad[i]=q[i]=i;FP[i]=Paths[i]}for(;j<q.length;++j){i=q[j];L=FI[i].L;R=FI[i].R;C=FI[i].C;if(dad[i]===i){if(L!==-1&&dad[L]!==L)dad[i]=dad[L];if(R!==-1&&dad[R]!==R)dad[i]=dad[R]}if(C!==-1)dad[C]=i;if(L!==-1){dad[L]=dad[i];q.push(L)}if(R!==-1){dad[R]=dad[i];q.push(R)}}for(i=1;i!==pl;++i)if(dad[i]===i){if(R!==-1&&dad[R]!==R)dad[i]=dad[R];else if(L!==-1&&dad[L]!==L)dad[i]=dad[L]}for(i=1;i<pl;++i){if(FI[i].type===0)continue;j=dad[i];if(j===0)FP[i]=FP[0]+\"/\"+FP[i];else while(j!==0){FP[i]=FP[j]+\"/\"+FP[i];j=dad[j]}dad[i]=0}FP[0]+=\"/\";for(i=1;i<pl;++i){if(FI[i].type!==2)FP[i]+=\"/\";FPD[FP[i]]=FI[i]}}function make_find_path(FullPaths,Paths,FileIndex,files,root_name){var UCFullPaths=new Array(FullPaths.length);var UCPaths=new Array(Paths.length),i;for(i=0;i<FullPaths.length;++i)UCFullPaths[i]=FullPaths[i].toUpperCase().replace(chr0,\"\").replace(chr1,\"!\");for(i=0;i<Paths.length;++i)UCPaths[i]=Paths[i].toUpperCase().replace(chr0,\"\").replace(chr1,\"!\");return function find_path(path){var k;if(path.charCodeAt(0)===47){k=true;path=root_name+path}else k=path.indexOf(\"/\")!==-1;var UCPath=path.toUpperCase().replace(chr0,\"\").replace(chr1,\"!\");var w=k===true?UCFullPaths.indexOf(UCPath):UCPaths.indexOf(UCPath);if(w===-1)return null;return k===true?FileIndex[w]:files[Paths[w]]}}function sleuth_fat(idx,cnt,sectors,ssz,fat_addrs){var q;if(idx===ENDOFCHAIN){if(cnt!==0)throw\"DIFAT chain shorter than expected\"}else if(idx!==-1){var sector=sectors[idx],m=(ssz>>>2)-1;for(var i=0;i<m;++i){if((q=__readInt32LE(sector,i*4))===ENDOFCHAIN)break;fat_addrs.push(q)}sleuth_fat(__readInt32LE(sector,ssz-4),cnt-1,sectors,ssz,fat_addrs)}}function get_sector_list(sectors,start,fat_addrs,ssz,chkd){var sl=sectors.length;var buf,buf_chain;if(!chkd)chkd=new Array(sl);var modulus=ssz-1,j,jj;buf=[];buf_chain=[];for(j=start;j>=0;){chkd[j]=true;buf[buf.length]=j;buf_chain.push(sectors[j]);var addr=fat_addrs[Math.floor(j*4/ssz)];jj=j*4&modulus;if(ssz<4+jj)throw\"FAT boundary crossed: \"+j+\" 4 \"+ssz;j=__readInt32LE(sectors[addr],jj)}return{nodes:buf,data:__toBuffer([buf_chain])}}function make_sector_list(sectors,dir_start,fat_addrs,ssz){var sl=sectors.length,sector_list=new Array(sl);var chkd=new Array(sl),buf,buf_chain;var modulus=ssz-1,i,j,k,jj;for(i=0;i<sl;++i){buf=[];k=i+dir_start;if(k>=sl)k-=sl;if(chkd[k]===true)continue;buf_chain=[];for(j=k;j>=0;){chkd[j]=true;buf[buf.length]=j;buf_chain.push(sectors[j]);var addr=fat_addrs[Math.floor(j*4/ssz)];jj=j*4&modulus;if(ssz<4+jj)throw\"FAT boundary crossed: \"+j+\" 4 \"+ssz;j=__readInt32LE(sectors[addr],jj)}sector_list[k]={nodes:buf,data:__toBuffer([buf_chain])}}return sector_list}function read_directory(dir_start,sector_list,sectors,Paths,nmfs,files,FileIndex){var blob;var minifat_store=0,pl=Paths.length?2:0;var sector=sector_list[dir_start].data;var i=0,namelen=0,name,o,ctime,mtime;for(;i<sector.length;i+=128){blob=sector.slice(i,i+128);prep_blob(blob,64);namelen=blob.read_shift(2);if(namelen===0)continue;name=__utf16le(blob,0,namelen-pl);Paths.push(name);o={name:name,type:blob.read_shift(1),color:blob.read_shift(1),L:blob.read_shift(4,\"i\"),R:blob.read_shift(4,\"i\"),C:blob.read_shift(4,\"i\"),clsid:blob.read_shift(16),state:blob.read_shift(4,\"i\")};ctime=blob.read_shift(2)+blob.read_shift(2)+blob.read_shift(2)+blob.read_shift(2);if(ctime!==0){o.ctime=ctime;o.ct=read_date(blob,blob.l-8)}mtime=blob.read_shift(2)+blob.read_shift(2)+blob.read_shift(2)+blob.read_shift(2);if(mtime!==0){o.mtime=mtime;o.mt=read_date(blob,blob.l-8)}o.start=blob.read_shift(4,\"i\");o.size=blob.read_shift(4,\"i\");if(o.type===5){minifat_store=o.start;if(nmfs>0&&minifat_store!==ENDOFCHAIN)sector_list[minifat_store].name=\"!StreamData\"}else if(o.size>=4096){o.storage=\"fat\";if(sector_list[o.start]===undefined)sector_list[o.start]=get_sector_list(sectors,o.start,sector_list.fat_addrs,sector_list.ssz);sector_list[o.start].name=o.name;o.content=sector_list[o.start].data.slice(0,o.size);prep_blob(o.content,0)}else{o.storage=\"minifat\";if(minifat_store!==ENDOFCHAIN&&o.start!==ENDOFCHAIN){o.content=sector_list[minifat_store].data.slice(o.start*MSSZ,o.start*MSSZ+o.size);prep_blob(o.content,0)}}files[name]=o;FileIndex.push(o)}}function read_date(blob,offset){return new Date((__readUInt32LE(blob,offset+4)/1e7*Math.pow(2,32)+__readUInt32LE(blob,offset)/1e7-11644473600)*1e3)}var fs;function readFileSync(filename,options){if(fs===undefined)fs=require(\"fs\");return parse(fs.readFileSync(filename),options)}function readSync(blob,options){switch(options!==undefined&&options.type!==undefined?options.type:\"base64\"){case\"file\":return readFileSync(blob,options);case\"base64\":return parse(s2a(Base64.decode(blob)),options);case\"binary\":return parse(s2a(blob),options)}return parse(blob)}var MSSZ=64;var ENDOFCHAIN=-2;var HEADER_SIGNATURE=\"d0cf11e0a1b11ae1\";var HEADER_CLSID=\"00000000000000000000000000000000\";var consts={MAXREGSECT:-6,DIFSECT:-4,FATSECT:-3,ENDOFCHAIN:ENDOFCHAIN,FREESECT:-1,HEADER_SIGNATURE:HEADER_SIGNATURE,HEADER_MINOR_VERSION:\"3e00\",MAXREGSID:-6,NOSTREAM:-1,HEADER_CLSID:HEADER_CLSID,EntryTypes:[\"unknown\",\"storage\",\"stream\",\"lockbytes\",\"property\",\"root\"]};exports.read=readSync;exports.parse=parse;exports.utils={ReadShift:ReadShift,CheckField:CheckField,prep_blob:prep_blob,bconcat:bconcat,consts:consts};return exports}();if(typeof require!==\"undefined\"&&typeof module!==\"undefined\"&&typeof DO_NOT_EXPORT_CFB===\"undefined\"){module.exports=CFB}function isval(x){return x!==undefined&&x!==null}function keys(o){return Object.keys(o)}function evert_key(obj,key){var o=[],K=keys(obj);for(var i=0;i!==K.length;++i)o[obj[K[i]][key]]=K[i];return o}function evert(obj){var o=[],K=keys(obj);for(var i=0;i!==K.length;++i)o[obj[K[i]]]=K[i];return o}function evert_num(obj){var o=[],K=keys(obj);for(var i=0;i!==K.length;++i)o[obj[K[i]]]=parseInt(K[i],10);return o}function evert_arr(obj){var o=[],K=keys(obj);for(var i=0;i!==K.length;++i){if(o[obj[K[i]]]==null)o[obj[K[i]]]=[];o[obj[K[i]]].push(K[i])}return o}function datenum(v,date1904){if(date1904)v+=1462;var epoch=Date.parse(v);return(epoch+22091616e5)/(24*60*60*1e3)}function cc2str(arr){var o=\"\";for(var i=0;i!=arr.length;++i)o+=String.fromCharCode(arr[i]);return o}function getdata(data){if(!data)return null;if(data.name.substr(-4)===\".bin\"){if(data.data)return char_codes(data.data);if(data.asNodeBuffer&&has_buf)return data.asNodeBuffer();if(data._data&&data._data.getContent)return Array.prototype.slice.call(data._data.getContent())}else{if(data.data)return data.name.substr(-4)!==\".bin\"?debom_xml(data.data):char_codes(data.data);if(data.asNodeBuffer&&has_buf)return debom_xml(data.asNodeBuffer().toString(\"binary\"));if(data.asBinary)return debom_xml(data.asBinary());if(data._data&&data._data.getContent)return debom_xml(cc2str(Array.prototype.slice.call(data._data.getContent(),0)))}return null}function safegetzipfile(zip,file){var f=file;if(zip.files[f])return zip.files[f];f=file.toLowerCase();if(zip.files[f])return zip.files[f];f=f.replace(/\\//g,\"\\\\\");if(zip.files[f])return zip.files[f];return null}function getzipfile(zip,file){var o=safegetzipfile(zip,file);if(o==null)throw new Error(\"Cannot find file \"+file+\" in zip\");return o}function getzipdata(zip,file,safe){if(!safe)return getdata(getzipfile(zip,file));if(!file)return null;try{return getzipdata(zip,file)}catch(e){return null}}var _fs,jszip;if(typeof JSZip!==\"undefined\")jszip=JSZip;if(typeof exports!==\"undefined\"){if(typeof module!==\"undefined\"&&module.exports){if(has_buf&&typeof jszip===\"undefined\")jszip=require(\"js\"+\"zip\");if(typeof jszip===\"undefined\")jszip=require(\"./js\"+\"zip\").JSZip;_fs=require(\"f\"+\"s\")}}var attregexg=/([\\w:]+)=((?:\")([^\"]*)(?:\")|(?:')([^']*)(?:'))/g;var tagregex=/<[^>]*>/g;var nsregex=/<\\w*:/,nsregex2=/<(\\/?)\\w+:/;function parsexmltag(tag,skip_root){var z=[];var eq=0,c=0;for(;eq!==tag.length;++eq)if((c=tag.charCodeAt(eq))===32||c===10||c===13)break;if(!skip_root)z[0]=tag.substr(0,eq);if(eq===tag.length)return z;var m=tag.match(attregexg),j=0,w=\"\",v=\"\",i=0,q=\"\",cc=\"\";if(m)for(i=0;i!=m.length;++i){cc=m[i];for(c=0;c!=cc.length;++c)if(cc.charCodeAt(c)===61)break;q=cc.substr(0,c);v=cc.substring(c+2,cc.length-1);for(j=0;j!=q.length;++j)if(q.charCodeAt(j)===58)break;if(j===q.length)z[q]=v;else z[(j===5&&q.substr(0,5)===\"xmlns\"?\"xmlns\":\"\")+q.substr(j+1)]=v}return z}function strip_ns(x){return x.replace(nsregex2,\"<$1\")}var encodings={\""\":'\"',\"'\":\"'\",\">\":\">\",\"<\":\"<\",\"&\":\"&\"};var rencoding=evert(encodings);var rencstr=\"&<>'\\\"\".split(\"\");var unescapexml=function(){var encregex=/&[a-z]*;/g,coderegex=/_x([\\da-fA-F]+)_/g;return function unescapexml(text){var s=text+\"\";return s.replace(encregex,function($$){return encodings[$$]}).replace(coderegex,function(m,c){return String.fromCharCode(parseInt(c,16))})}}();var decregex=/[&<>'\"]/g,charegex=/[\\u0000-\\u0008\\u000b-\\u001f]/g;function escapexml(text){var s=text+\"\";return s.replace(decregex,function(y){return rencoding[y]}).replace(charegex,function(s){return\"_x\"+(\"000\"+s.charCodeAt(0).toString(16)).substr(-4)+\"_\"})}var xlml_fixstr=function(){var entregex=/&#(\\d+);/g;function entrepl($$,$1){return String.fromCharCode(parseInt($1,10))}return function xlml_fixstr(str){return str.replace(entregex,entrepl)}}();function parsexmlbool(value,tag){switch(value){case\"1\":case\"true\":case\"TRUE\":return true;default:return false}}var utf8read=function utf8reada(orig){var out=\"\",i=0,c=0,d=0,e=0,f=0,w=0;while(i<orig.length){c=orig.charCodeAt(i++);if(c<128){out+=String.fromCharCode(c);continue}d=orig.charCodeAt(i++);if(c>191&&c<224){out+=String.fromCharCode((c&31)<<6|d&63);continue}e=orig.charCodeAt(i++);if(c<240){out+=String.fromCharCode((c&15)<<12|(d&63)<<6|e&63);continue}f=orig.charCodeAt(i++);w=((c&7)<<18|(d&63)<<12|(e&63)<<6|f&63)-65536;out+=String.fromCharCode(55296+(w>>>10&1023));out+=String.fromCharCode(56320+(w&1023))}return out};if(has_buf){var utf8readb=function utf8readb(data){var out=new Buffer(2*data.length),w,i,j=1,k=0,ww=0,c;for(i=0;i<data.length;i+=j){j=1;if((c=data.charCodeAt(i))<128)w=c;else if(c<224){w=(c&31)*64+(data.charCodeAt(i+1)&63);j=2}else if(c<240){w=(c&15)*4096+(data.charCodeAt(i+1)&63)*64+(data.charCodeAt(i+2)&63);j=3}else{j=4;w=(c&7)*262144+(data.charCodeAt(i+1)&63)*4096+(data.charCodeAt(i+2)&63)*64+(data.charCodeAt(i+3)&63);w-=65536;ww=55296+(w>>>10&1023);w=56320+(w&1023)}if(ww!==0){out[k++]=ww&255;out[k++]=ww>>>8;ww=0}out[k++]=w%256;out[k++]=w>>>8}out.length=k;return out.toString(\"ucs2\")};var corpus=\"foo bar baz☃🍣\";if(utf8read(corpus)==utf8readb(corpus))utf8read=utf8readb;var utf8readc=function utf8readc(data){return Buffer(data,\"binary\").toString(\"utf8\")};if(utf8read(corpus)==utf8readc(corpus))utf8read=utf8readc}var matchtag=function(){var mtcache={};return function matchtag(f,g){var t=f+\"|\"+g;if(mtcache[t]!==undefined)return mtcache[t];return mtcache[t]=new RegExp(\"<(?:\\\\w+:)?\"+f+'(?: xml:space=\"preserve\")?(?:[^>]*)>([^☃]*)</(?:\\\\w+:)?'+f+\">\",g||\"\")}}();var vtregex=function(){var vt_cache={};return function vt_regex(bt){if(vt_cache[bt]!==undefined)return vt_cache[bt];return vt_cache[bt]=new RegExp(\"<vt:\"+bt+\">(.*?)</vt:\"+bt+\">\",\"g\")}}();var vtvregex=/<\\/?vt:variant>/g,vtmregex=/<vt:([^>]*)>(.*)</;function parseVector(data){var h=parsexmltag(data);var matches=data.match(vtregex(h.baseType))||[];if(matches.length!=h.size)throw\"unexpected vector length \"+matches.length+\" != \"+h.size;var res=[];matches.forEach(function(x){var v=x.replace(vtvregex,\"\").match(vtmregex);res.push({v:v[2],t:v[1]})});return res}var wtregex=/(^\\s|\\s$|\\n)/;function writetag(f,g){return\"<\"+f+(g.match(wtregex)?' xml:space=\"preserve\"':\"\")+\">\"+g+\"</\"+f+\">\"}function wxt_helper(h){return keys(h).map(function(k){return\" \"+k+'=\"'+h[k]+'\"'}).join(\"\")}function writextag(f,g,h){return\"<\"+f+(isval(h)?wxt_helper(h):\"\")+(isval(g)?(g.match(wtregex)?' xml:space=\"preserve\"':\"\")+\">\"+g+\"</\"+f:\"/\")+\">\"}function write_w3cdtf(d,t){try{return d.toISOString().replace(/\\.\\d*/,\"\")}catch(e){if(t)throw e}}function write_vt(s){switch(typeof s){case\"string\":return writextag(\"vt:lpwstr\",s);case\"number\":return writextag((s|0)==s?\"vt:i4\":\"vt:r8\",String(s));case\"boolean\":return writextag(\"vt:bool\",s?\"true\":\"false\")}if(s instanceof Date)return writextag(\"vt:filetime\",write_w3cdtf(s));throw new Error(\"Unable to serialize \"+s)}var XML_HEADER='<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\\r\\n';var XMLNS={dc:\"http://purl.org/dc/elements/1.1/\",dcterms:\"http://purl.org/dc/terms/\",dcmitype:\"http://purl.org/dc/dcmitype/\",mx:\"http://schemas.microsoft.com/office/mac/excel/2008/main\",r:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships\",sjs:\"http://schemas.openxmlformats.org/package/2006/sheetjs/core-properties\",vt:\"http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes\",xsi:\"http://www.w3.org/2001/XMLSchema-instance\",xsd:\"http://www.w3.org/2001/XMLSchema\"};XMLNS.main=[\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\",\"http://purl.oclc.org/ooxml/spreadsheetml/main\",\"http://schemas.microsoft.com/office/excel/2006/main\",\"http://schemas.microsoft.com/office/excel/2006/2\"];function readIEEE754(buf,idx,isLE,nl,ml){if(isLE===undefined)isLE=true;if(!nl)nl=8;if(!ml&&nl===8)ml=52;var e,m,el=nl*8-ml-1,eMax=(1<<el)-1,eBias=eMax>>1;var bits=-7,d=isLE?-1:1,i=isLE?nl-1:0,s=buf[idx+i];i+=d;e=s&(1<<-bits)-1;s>>>=-bits;bits+=el;for(;bits>0;e=e*256+buf[idx+i],i+=d,bits-=8);m=e&(1<<-bits)-1;e>>>=-bits;bits+=ml;for(;bits>0;m=m*256+buf[idx+i],i+=d,bits-=8);if(e===eMax)return m?NaN:(s?-1:1)*Infinity;else if(e===0)e=1-eBias;else{m=m+Math.pow(2,ml);e=e-eBias}return(s?-1:1)*m*Math.pow(2,e-ml)}var __toBuffer,___toBuffer;__toBuffer=___toBuffer=function toBuffer_(bufs){var x=[];for(var i=0;i<bufs[0].length;++i){x.push.apply(x,bufs[0][i])}return x};var __utf16le,___utf16le;__utf16le=___utf16le=function utf16le_(b,s,e){var ss=[];for(var i=s;i<e;i+=2)ss.push(String.fromCharCode(__readUInt16LE(b,i)));return ss.join(\"\")};var __hexlify,___hexlify;__hexlify=___hexlify=function hexlify_(b,s,l){return b.slice(s,s+l).map(function(x){return(x<16?\"0\":\"\")+x.toString(16)}).join(\"\")};var __utf8,___utf8;__utf8=___utf8=function(b,s,e){var ss=[];for(var i=s;i<e;i++)ss.push(String.fromCharCode(__readUInt8(b,i)));return ss.join(\"\")};var __lpstr,___lpstr;__lpstr=___lpstr=function lpstr_(b,i){var len=__readUInt32LE(b,i);return len>0?__utf8(b,i+4,i+4+len-1):\"\"};var __lpwstr,___lpwstr;__lpwstr=___lpwstr=function lpwstr_(b,i){var len=2*__readUInt32LE(b,i);return len>0?__utf8(b,i+4,i+4+len-1):\"\"};var __double,___double;__double=___double=function(b,idx){return readIEEE754(b,idx)};var is_buf=function is_buf_a(a){return Array.isArray(a)};if(has_buf){__utf16le=function utf16le_b(b,s,e){if(!Buffer.isBuffer(b))return ___utf16le(b,s,e);return b.toString(\"utf16le\",s,e)};__hexlify=function(b,s,l){return Buffer.isBuffer(b)?b.toString(\"hex\",s,s+l):___hexlify(b,s,l)};__lpstr=function lpstr_b(b,i){if(!Buffer.isBuffer(b))return ___lpstr(b,i);var len=b.readUInt32LE(i);return len>0?b.toString(\"utf8\",i+4,i+4+len-1):\"\"};__lpwstr=function lpwstr_b(b,i){if(!Buffer.isBuffer(b))return ___lpwstr(b,i);var len=2*b.readUInt32LE(i);return b.toString(\"utf16le\",i+4,i+4+len-1)};__utf8=function utf8_b(s,e){return this.toString(\"utf8\",s,e)};__toBuffer=function(bufs){return bufs[0].length>0&&Buffer.isBuffer(bufs[0][0])?Buffer.concat(bufs[0]):___toBuffer(bufs)};bconcat=function(bufs){return Buffer.isBuffer(bufs[0])?Buffer.concat(bufs):[].concat.apply([],bufs)};__double=function double_(b,i){if(Buffer.isBuffer(b))return b.readDoubleLE(i);return ___double(b,i)};is_buf=function is_buf_b(a){return Buffer.isBuffer(a)||Array.isArray(a)}}if(typeof cptable!==\"undefined\"){__utf16le=function(b,s,e){return cptable.utils.decode(1200,b.slice(s,e))};__utf8=function(b,s,e){return cptable.utils.decode(65001,b.slice(s,e))};__lpstr=function(b,i){var len=__readUInt32LE(b,i);return len>0?cptable.utils.decode(current_codepage,b.slice(i+4,i+4+len-1)):\"\"};__lpwstr=function(b,i){var len=2*__readUInt32LE(b,i);return len>0?cptable.utils.decode(1200,b.slice(i+4,i+4+len-1)):\"\"}}var __readUInt8=function(b,idx){return b[idx]};var __readUInt16LE=function(b,idx){return b[idx+1]*(1<<8)+b[idx]};var __readInt16LE=function(b,idx){var u=b[idx+1]*(1<<8)+b[idx];return u<32768?u:(65535-u+1)*-1};var __readUInt32LE=function(b,idx){return b[idx+3]*(1<<24)+(b[idx+2]<<16)+(b[idx+1]<<8)+b[idx]};var __readInt32LE=function(b,idx){return b[idx+3]<<24|b[idx+2]<<16|b[idx+1]<<8|b[idx]};var ___unhexlify=function(s){return s.match(/../g).map(function(x){return parseInt(x,16)})};var __unhexlify=typeof Buffer!==\"undefined\"?function(s){return Buffer.isBuffer(s)?new Buffer(s,\"hex\"):___unhexlify(s)}:___unhexlify;function ReadShift(size,t){var o=\"\",oI,oR,oo=[],w,vv,i,loc;switch(t){case\"dbcs\":loc=this.l;if(has_buf&&Buffer.isBuffer(this))o=this.slice(this.l,this.l+2*size).toString(\"utf16le\");else for(i=0;i!=size;++i){o+=String.fromCharCode(__readUInt16LE(this,loc));loc+=2}size*=2;break;case\"utf8\":o=__utf8(this,this.l,this.l+size);break;case\"utf16le\":size*=2;o=__utf16le(this,this.l,this.l+size);break;case\"lpstr\":o=__lpstr(this,this.l);size=5+o.length;break;case\"lpwstr\":o=__lpwstr(this,this.l);size=5+o.length;if(o[o.length-1]==\"\\x00\")size+=2;break;case\"cstr\":size=0;o=\"\";while((w=__readUInt8(this,this.l+size++))!==0)oo.push(_getchar(w));o=oo.join(\"\");break;case\"wstr\":size=0;o=\"\";while((w=__readUInt16LE(this,this.l+size))!==0){oo.push(_getchar(w));size+=2}size+=2;o=oo.join(\"\");break;case\"dbcs-cont\":o=\"\";loc=this.l;for(i=0;i!=size;++i){if(this.lens&&this.lens.indexOf(loc)!==-1){w=__readUInt8(this,loc);this.l=loc+1;vv=ReadShift.call(this,size-i,w?\"dbcs-cont\":\"sbcs-cont\");return oo.join(\"\")+vv}oo.push(_getchar(__readUInt16LE(this,loc)));loc+=2}o=oo.join(\"\");size*=2;break;case\"sbcs-cont\":o=\"\";loc=this.l;for(i=0;i!=size;++i){if(this.lens&&this.lens.indexOf(loc)!==-1){w=__readUInt8(this,loc);this.l=loc+1;vv=ReadShift.call(this,size-i,w?\"dbcs-cont\":\"sbcs-cont\");return oo.join(\"\")+vv}oo.push(_getchar(__readUInt8(this,loc)));loc+=1}o=oo.join(\"\");break;default:switch(size){case 1:oI=__readUInt8(this,this.l);this.l++;return oI;case 2:oI=(t===\"i\"?__readInt16LE:__readUInt16LE)(this,this.l);this.l+=2;return oI;case 4:if(t===\"i\"||(this[this.l+3]&128)===0){oI=__readInt32LE(this,this.l);this.l+=4;return oI}else{oR=__readUInt32LE(this,this.l);this.l+=4;return oR}break;case 8:if(t===\"f\"){oR=__double(this,this.l);this.l+=8;return oR}case 16:o=__hexlify(this,this.l,size);break}}this.l+=size;return o}function WriteShift(t,val,f){var size,i;if(f===\"dbcs\"){for(i=0;i!=val.length;++i)this.writeUInt16LE(val.charCodeAt(i),this.l+2*i);size=2*val.length}else switch(t){case 1:size=1;this[this.l]=val&255;break;case 3:size=3;this[this.l+2]=val&255;val>>>=8;\r\nthis[this.l+1]=val&255;val>>>=8;this[this.l]=val&255;break;case 4:size=4;this.writeUInt32LE(val,this.l);break;case 8:size=8;if(f===\"f\"){this.writeDoubleLE(val,this.l);break}case 16:break;case-4:size=4;this.writeInt32LE(val,this.l);break}this.l+=size;return this}function CheckField(hexstr,fld){var m=__hexlify(this,this.l,hexstr.length>>1);if(m!==hexstr)throw fld+\"Expected \"+hexstr+\" saw \"+m;this.l+=hexstr.length>>1}function prep_blob(blob,pos){blob.l=pos;blob.read_shift=ReadShift;blob.chk=CheckField;blob.write_shift=WriteShift}function parsenoop(blob,length){blob.l+=length}function writenoop(blob,length){blob.l+=length}function new_buf(sz){var o=new_raw_buf(sz);prep_blob(o,0);return o}function recordhopper(data,cb,opts){var tmpbyte,cntbyte,length;prep_blob(data,data.l||0);while(data.l<data.length){var RT=data.read_shift(1);if(RT&128)RT=(RT&127)+((data.read_shift(1)&127)<<7);var R=XLSBRecordEnum[RT]||XLSBRecordEnum[65535];tmpbyte=data.read_shift(1);length=tmpbyte&127;for(cntbyte=1;cntbyte<4&&tmpbyte&128;++cntbyte)length+=((tmpbyte=data.read_shift(1))&127)<<7*cntbyte;var d=R.f(data,length,opts);if(cb(d,R,RT))return}}function buf_array(){var bufs=[],blksz=2048;var newblk=function ba_newblk(sz){var o=new_buf(sz);prep_blob(o,0);return o};var curbuf=newblk(blksz);var endbuf=function ba_endbuf(){curbuf.length=curbuf.l;if(curbuf.length>0)bufs.push(curbuf);curbuf=null};var next=function ba_next(sz){if(sz<curbuf.length-curbuf.l)return curbuf;endbuf();return curbuf=newblk(Math.max(sz+1,blksz))};var end=function ba_end(){endbuf();return __toBuffer([bufs])};var push=function ba_push(buf){endbuf();curbuf=buf;next(blksz)};return{next:next,push:push,end:end,_bufs:bufs}}function write_record(ba,type,payload,length){var t=evert_RE[type],l;if(!length)length=XLSBRecordEnum[t].p||(payload||[]).length||0;l=1+(t>=128?1:0)+1+length;if(length>=128)++l;if(length>=16384)++l;if(length>=2097152)++l;var o=ba.next(l);if(t<=127)o.write_shift(1,t);else{o.write_shift(1,(t&127)+128);o.write_shift(1,t>>7)}for(var i=0;i!=4;++i){if(length>=128){o.write_shift(1,(length&127)+128);length>>=7}else{o.write_shift(1,length);break}}if(length>0&&is_buf(payload))ba.push(payload)}function shift_cell_xls(cell,tgt){if(tgt.s){if(cell.cRel)cell.c+=tgt.s.c;if(cell.rRel)cell.r+=tgt.s.r}else{cell.c+=tgt.c;cell.r+=tgt.r}cell.cRel=cell.rRel=0;while(cell.c>=256)cell.c-=256;while(cell.r>=65536)cell.r-=65536;return cell}function shift_range_xls(cell,range){cell.s=shift_cell_xls(cell.s,range.s);cell.e=shift_cell_xls(cell.e,range.s);return cell}var OFFCRYPTO={};var make_offcrypto=function(O,_crypto){var crypto;if(typeof _crypto!==\"undefined\")crypto=_crypto;else if(typeof require!==\"undefined\"){try{crypto=require(\"cry\"+\"pto\")}catch(e){crypto=null}}O.rc4=function(key,data){var S=new Array(256);var c=0,i=0,j=0,t=0;for(i=0;i!=256;++i)S[i]=i;for(i=0;i!=256;++i){j=j+S[i]+key[i%key.length].charCodeAt(0)&255;t=S[i];S[i]=S[j];S[j]=t}i=j=0;out=Buffer(data.length);for(c=0;c!=data.length;++c){i=i+1&255;j=(j+S[i])%256;t=S[i];S[i]=S[j];S[j]=t;out[c]=data[c]^S[S[i]+S[j]&255]}return out};if(crypto){O.md5=function(hex){return crypto.createHash(\"md5\").update(hex).digest(\"hex\")}}else{O.md5=function(hex){throw\"unimplemented\"}}};make_offcrypto(OFFCRYPTO,typeof crypto!==\"undefined\"?crypto:undefined);function parse_StrRun(data,length){return{ich:data.read_shift(2),ifnt:data.read_shift(2)}}function parse_RichStr(data,length){var start=data.l;var flags=data.read_shift(1);var str=parse_XLWideString(data);var rgsStrRun=[];var z={t:str,h:str};if((flags&1)!==0){var dwSizeStrRun=data.read_shift(4);for(var i=0;i!=dwSizeStrRun;++i)rgsStrRun.push(parse_StrRun(data));z.r=rgsStrRun}else z.r=\"<t>\"+escapexml(str)+\"</t>\";if((flags&2)!==0){}data.l=start+length;return z}function write_RichStr(str,o){if(o==null)o=new_buf(5+2*str.t.length);o.write_shift(1,0);write_XLWideString(str.t,o);return o}function parse_XLSBCell(data){var col=data.read_shift(4);var iStyleRef=data.read_shift(2);iStyleRef+=data.read_shift(1)<<16;var fPhShow=data.read_shift(1);return{c:col,iStyleRef:iStyleRef}}function write_XLSBCell(cell,o){if(o==null)o=new_buf(8);o.write_shift(-4,cell.c);o.write_shift(3,cell.iStyleRef===undefined?cell.iStyleRef:cell.s);o.write_shift(1,0);return o}function parse_XLSBCodeName(data,length){return parse_XLWideString(data,length)}function parse_XLNullableWideString(data){var cchCharacters=data.read_shift(4);return cchCharacters===0||cchCharacters===4294967295?\"\":data.read_shift(cchCharacters,\"dbcs\")}function write_XLNullableWideString(data,o){if(!o)o=new_buf(127);o.write_shift(4,data.length>0?data.length:4294967295);if(data.length>0)o.write_shift(0,data,\"dbcs\");return o}function parse_XLWideString(data){var cchCharacters=data.read_shift(4);return cchCharacters===0?\"\":data.read_shift(cchCharacters,\"dbcs\")}function write_XLWideString(data,o){if(o==null)o=new_buf(4+2*data.length);o.write_shift(4,data.length);if(data.length>0)o.write_shift(0,data,\"dbcs\");return o}var parse_RelID=parse_XLNullableWideString;var write_RelID=write_XLNullableWideString;function parse_RkNumber(data){var b=data.slice(data.l,data.l+4);var fX100=b[0]&1,fInt=b[0]&2;data.l+=4;b[0]&=252;var RK=fInt===0?__double([0,0,0,0,b[0],b[1],b[2],b[3]],0):__readInt32LE(b,0)>>2;return fX100?RK/100:RK}function parse_UncheckedRfX(data){var cell={s:{},e:{}};cell.s.r=data.read_shift(4);cell.e.r=data.read_shift(4);cell.s.c=data.read_shift(4);cell.e.c=data.read_shift(4);return cell}function write_UncheckedRfX(r,o){if(!o)o=new_buf(16);o.write_shift(4,r.s.r);o.write_shift(4,r.e.r);o.write_shift(4,r.s.c);o.write_shift(4,r.e.c);return o}function parse_Xnum(data,length){return data.read_shift(8,\"f\")}function write_Xnum(data,o){return(o||new_buf(8)).write_shift(8,\"f\",data)}var BErr={0:\"#NULL!\",7:\"#DIV/0!\",15:\"#VALUE!\",23:\"#REF!\",29:\"#NAME?\",36:\"#NUM!\",42:\"#N/A\",43:\"#GETTING_DATA\",255:\"#WTF?\"};var RBErr=evert_num(BErr);function parse_BrtColor(data,length){var out={};var d=data.read_shift(1);out.fValidRGB=d&1;out.xColorType=d>>>1;out.index=data.read_shift(1);out.nTintAndShade=data.read_shift(2,\"i\");out.bRed=data.read_shift(1);out.bGreen=data.read_shift(1);out.bBlue=data.read_shift(1);out.bAlpha=data.read_shift(1)}function parse_FontFlags(data,length){var d=data.read_shift(1);data.l++;var out={fItalic:d&2,fStrikeout:d&8,fOutline:d&16,fShadow:d&32,fCondense:d&64,fExtend:d&128};return out}{var VT_EMPTY=0;var VT_NULL=1;var VT_I2=2;var VT_I4=3;var VT_R4=4;var VT_R8=5;var VT_CY=6;var VT_DATE=7;var VT_BSTR=8;var VT_ERROR=10;var VT_BOOL=11;var VT_VARIANT=12;var VT_DECIMAL=14;var VT_I1=16;var VT_UI1=17;var VT_UI2=18;var VT_UI4=19;var VT_I8=20;var VT_UI8=21;var VT_INT=22;var VT_UINT=23;var VT_LPSTR=30;var VT_LPWSTR=31;var VT_FILETIME=64;var VT_BLOB=65;var VT_STREAM=66;var VT_STORAGE=67;var VT_STREAMED_Object=68;var VT_STORED_Object=69;var VT_BLOB_Object=70;var VT_CF=71;var VT_CLSID=72;var VT_VERSIONED_STREAM=73;var VT_VECTOR=4096;var VT_ARRAY=8192;var VT_STRING=80;var VT_USTR=81;var VT_CUSTOM=[VT_STRING,VT_USTR]}var DocSummaryPIDDSI={1:{n:\"CodePage\",t:VT_I2},2:{n:\"Category\",t:VT_STRING},3:{n:\"PresentationFormat\",t:VT_STRING},4:{n:\"ByteCount\",t:VT_I4},5:{n:\"LineCount\",t:VT_I4},6:{n:\"ParagraphCount\",t:VT_I4},7:{n:\"SlideCount\",t:VT_I4},8:{n:\"NoteCount\",t:VT_I4},9:{n:\"HiddenCount\",t:VT_I4},10:{n:\"MultimediaClipCount\",t:VT_I4},11:{n:\"Scale\",t:VT_BOOL},12:{n:\"HeadingPair\",t:VT_VECTOR|VT_VARIANT},13:{n:\"DocParts\",t:VT_VECTOR|VT_LPSTR},14:{n:\"Manager\",t:VT_STRING},15:{n:\"Company\",t:VT_STRING},16:{n:\"LinksDirty\",t:VT_BOOL},17:{n:\"CharacterCount\",t:VT_I4},19:{n:\"SharedDoc\",t:VT_BOOL},22:{n:\"HLinksChanged\",t:VT_BOOL},23:{n:\"AppVersion\",t:VT_I4,p:\"version\"},26:{n:\"ContentType\",t:VT_STRING},27:{n:\"ContentStatus\",t:VT_STRING},28:{n:\"Language\",t:VT_STRING},29:{n:\"Version\",t:VT_STRING},255:{}};var SummaryPIDSI={1:{n:\"CodePage\",t:VT_I2},2:{n:\"Title\",t:VT_STRING},3:{n:\"Subject\",t:VT_STRING},4:{n:\"Author\",t:VT_STRING},5:{n:\"Keywords\",t:VT_STRING},6:{n:\"Comments\",t:VT_STRING},7:{n:\"Template\",t:VT_STRING},8:{n:\"LastAuthor\",t:VT_STRING},9:{n:\"RevNumber\",t:VT_STRING},10:{n:\"EditTime\",t:VT_FILETIME},11:{n:\"LastPrinted\",t:VT_FILETIME},12:{n:\"CreatedDate\",t:VT_FILETIME},13:{n:\"ModifiedDate\",t:VT_FILETIME},14:{n:\"PageCount\",t:VT_I4},15:{n:\"WordCount\",t:VT_I4},16:{n:\"CharCount\",t:VT_I4},17:{n:\"Thumbnail\",t:VT_CF},18:{n:\"ApplicationName\",t:VT_LPSTR},19:{n:\"DocumentSecurity\",t:VT_I4},255:{}};var SpecialProperties={2147483648:{n:\"Locale\",t:VT_UI4},2147483651:{n:\"Behavior\",t:VT_UI4},1919054434:{}};(function(){for(var y in SpecialProperties)if(SpecialProperties.hasOwnProperty(y))DocSummaryPIDDSI[y]=SummaryPIDSI[y]=SpecialProperties[y]})();var CountryEnum={1:\"US\",2:\"CA\",3:\"\",7:\"RU\",20:\"EG\",30:\"GR\",31:\"NL\",32:\"BE\",33:\"FR\",34:\"ES\",36:\"HU\",39:\"IT\",41:\"CH\",43:\"AT\",44:\"GB\",45:\"DK\",46:\"SE\",47:\"NO\",48:\"PL\",49:\"DE\",52:\"MX\",55:\"BR\",61:\"AU\",64:\"NZ\",66:\"TH\",81:\"JP\",82:\"KR\",84:\"VN\",86:\"CN\",90:\"TR\",105:\"JS\",213:\"DZ\",216:\"MA\",218:\"LY\",351:\"PT\",354:\"IS\",358:\"FI\",420:\"CZ\",886:\"TW\",961:\"LB\",962:\"JO\",963:\"SY\",964:\"IQ\",965:\"KW\",966:\"SA\",971:\"AE\",972:\"IL\",974:\"QA\",981:\"IR\",65535:\"US\"};var XLSFillPattern=[null,\"solid\",\"mediumGray\",\"darkGray\",\"lightGray\",\"darkHorizontal\",\"darkVertical\",\"darkDown\",\"darkUp\",\"darkGrid\",\"darkTrellis\",\"lightHorizontal\",\"lightVertical\",\"lightDown\",\"lightUp\",\"lightGrid\",\"lightTrellis\",\"gray125\",\"gray0625\"];function rgbify(arr){return arr.map(function(x){return[x>>16&255,x>>8&255,x&255]})}var XLSIcv=rgbify([0,16777215,16711680,65280,255,16776960,16711935,65535,0,16777215,16711680,65280,255,16776960,16711935,65535,8388608,32768,128,8421376,8388736,32896,12632256,8421504,10066431,10040166,16777164,13434879,6684774,16744576,26316,13421823,128,16711935,16776960,65535,8388736,8388608,32896,255,52479,13434879,13434828,16777113,10079487,16751052,13408767,16764057,3368703,3394764,10079232,16763904,16750848,16737792,6710937,9868950,13158,3381606,13056,3355392,10040064,10040166,3355545,3355443,16777215,0]);var ct2type={\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\":\"workbooks\",\"application/vnd.ms-excel.binIndexWs\":\"TODO\",\"application/vnd.ms-excel.chartsheet\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\":\"TODO\",\"application/vnd.ms-excel.dialogsheet\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\":\"TODO\",\"application/vnd.ms-excel.macrosheet\":\"TODO\",\"application/vnd.ms-excel.macrosheet+xml\":\"TODO\",\"application/vnd.ms-excel.intlmacrosheet\":\"TODO\",\"application/vnd.ms-excel.binIndexMs\":\"TODO\",\"application/vnd.openxmlformats-package.core-properties+xml\":\"coreprops\",\"application/vnd.openxmlformats-officedocument.custom-properties+xml\":\"custprops\",\"application/vnd.openxmlformats-officedocument.extended-properties+xml\":\"extprops\",\"application/vnd.openxmlformats-officedocument.customXmlProperties+xml\":\"TODO\",\"application/vnd.ms-excel.comments\":\"comments\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\":\"comments\",\"application/vnd.ms-excel.pivotTable\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml\":\"TODO\",\"application/vnd.ms-excel.calcChain\":\"calcchains\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml\":\"calcchains\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.printerSettings\":\"TODO\",\"application/vnd.ms-office.activeX\":\"TODO\",\"application/vnd.ms-office.activeX+xml\":\"TODO\",\"application/vnd.ms-excel.attachedToolbars\":\"TODO\",\"application/vnd.ms-excel.connections\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml\":\"TODO\",\"application/vnd.ms-excel.externalLink\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml\":\"TODO\",\"application/vnd.ms-excel.sheetMetadata\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml\":\"TODO\",\"application/vnd.ms-excel.pivotCacheDefinition\":\"TODO\",\"application/vnd.ms-excel.pivotCacheRecords\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml\":\"TODO\",\"application/vnd.ms-excel.queryTable\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml\":\"TODO\",\"application/vnd.ms-excel.userNames\":\"TODO\",\"application/vnd.ms-excel.revisionHeaders\":\"TODO\",\"application/vnd.ms-excel.revisionLog\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml\":\"TODO\",\"application/vnd.ms-excel.tableSingleCells\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml\":\"TODO\",\"application/vnd.ms-excel.slicer\":\"TODO\",\"application/vnd.ms-excel.slicerCache\":\"TODO\",\"application/vnd.ms-excel.slicer+xml\":\"TODO\",\"application/vnd.ms-excel.slicerCache+xml\":\"TODO\",\"application/vnd.ms-excel.wsSortMap\":\"TODO\",\"application/vnd.ms-excel.table\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.theme+xml\":\"themes\",\"application/vnd.ms-excel.Timeline+xml\":\"TODO\",\"application/vnd.ms-excel.TimelineCache+xml\":\"TODO\",\"application/vnd.ms-office.vbaProject\":\"vba\",\"application/vnd.ms-office.vbaProjectSignature\":\"vba\",\"application/vnd.ms-office.volatileDependencies\":\"TODO\",\"application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml\":\"TODO\",\"application/vnd.ms-excel.controlproperties+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.model+data\":\"TODO\",\"application/vnd.ms-excel.Survey+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.drawing+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml\":\"TODO\",\"application/vnd.openxmlformats-officedocument.vmlDrawing\":\"TODO\",\"application/vnd.openxmlformats-package.relationships+xml\":\"rels\",\"application/vnd.openxmlformats-officedocument.oleObject\":\"TODO\",sheet:\"js\"};var CT_LIST=function(){var o={workbooks:{xlsx:\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\",xlsm:\"application/vnd.ms-excel.sheet.macroEnabled.main+xml\",xlsb:\"application/vnd.ms-excel.sheet.binary.macroEnabled.main\",xltx:\"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\"},strs:{xlsx:\"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml\",xlsb:\"application/vnd.ms-excel.sharedStrings\"},sheets:{xlsx:\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\",xlsb:\"application/vnd.ms-excel.worksheet\"},styles:{xlsx:\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\",xlsb:\"application/vnd.ms-excel.styles\"}};keys(o).forEach(function(k){if(!o[k].xlsm)o[k].xlsm=o[k].xlsx});keys(o).forEach(function(k){keys(o[k]).forEach(function(v){ct2type[o[k][v]]=k})});return o}();var type2ct=evert_arr(ct2type);XMLNS.CT=\"http://schemas.openxmlformats.org/package/2006/content-types\";function parse_ct(data,opts){var ctext={};if(!data||!data.match)return data;var ct={workbooks:[],sheets:[],calcchains:[],themes:[],styles:[],coreprops:[],extprops:[],custprops:[],strs:[],comments:[],vba:[],TODO:[],rels:[],xmlns:\"\"};(data.match(tagregex)||[]).forEach(function(x){var y=parsexmltag(x);switch(y[0].replace(nsregex,\"<\")){case\"<?xml\":break;case\"<Types\":ct.xmlns=y[\"xmlns\"+(y[0].match(/<(\\w+):/)||[\"\",\"\"])[1]];break;case\"<Default\":ctext[y.Extension]=y.ContentType;break;case\"<Override\":if(ct[ct2type[y.ContentType]]!==undefined)ct[ct2type[y.ContentType]].push(y.PartName);else if(opts.WTF)console.error(y);break}});if(ct.xmlns!==XMLNS.CT)throw new Error(\"Unknown Namespace: \"+ct.xmlns);ct.calcchain=ct.calcchains.length>0?ct.calcchains[0]:\"\";ct.sst=ct.strs.length>0?ct.strs[0]:\"\";ct.style=ct.styles.length>0?ct.styles[0]:\"\";ct.defaults=ctext;delete ct.calcchains;return ct}var CTYPE_XML_ROOT=writextag(\"Types\",null,{xmlns:XMLNS.CT,\"xmlns:xsd\":XMLNS.xsd,\"xmlns:xsi\":XMLNS.xsi});var CTYPE_DEFAULTS=[[\"xml\",\"application/xml\"],[\"bin\",\"application/vnd.ms-excel.sheet.binary.macroEnabled.main\"],[\"rels\",type2ct.rels[0]]].map(function(x){return writextag(\"Default\",null,{Extension:x[0],ContentType:x[1]})});function write_ct(ct,opts){var o=[],v;o[o.length]=XML_HEADER;o[o.length]=CTYPE_XML_ROOT;o=o.concat(CTYPE_DEFAULTS);var f1=function(w){if(ct[w]&&ct[w].length>0){v=ct[w][0];o[o.length]=writextag(\"Override\",null,{PartName:(v[0]==\"/\"?\"\":\"/\")+v,ContentType:CT_LIST[w][opts.bookType||\"xlsx\"]})}};var f2=function(w){ct[w].forEach(function(v){o[o.length]=writextag(\"Override\",null,{PartName:(v[0]==\"/\"?\"\":\"/\")+v,ContentType:CT_LIST[w][opts.bookType||\"xlsx\"]})})};var f3=function(t){(ct[t]||[]).forEach(function(v){o[o.length]=writextag(\"Override\",null,{PartName:(v[0]==\"/\"?\"\":\"/\")+v,ContentType:type2ct[t][0]})})};f1(\"workbooks\");f2(\"sheets\");f3(\"themes\");[\"strs\",\"styles\"].forEach(f1);[\"coreprops\",\"extprops\",\"custprops\"].forEach(f3);if(o.length>2){o[o.length]=\"</Types>\";o[1]=o[1].replace(\"/>\",\">\")}return o.join(\"\")}var RELS={WB:\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument\",SHEET:\"http://sheetjs.openxmlformats.org/officeDocument/2006/relationships/officeDocument\"};function parse_rels(data,currentFilePath){if(!data)return data;if(currentFilePath.charAt(0)!==\"/\"){currentFilePath=\"/\"+currentFilePath}var rels={};var hash={};var resolveRelativePathIntoAbsolute=function(to){var toksFrom=currentFilePath.split(\"/\");toksFrom.pop();var toksTo=to.split(\"/\");var reversed=[];while(toksTo.length!==0){var tokTo=toksTo.shift();if(tokTo===\"..\"){toksFrom.pop()}else if(tokTo!==\".\"){toksFrom.push(tokTo)}}return toksFrom.join(\"/\")};data.match(tagregex).forEach(function(x){var y=parsexmltag(x);if(y[0]===\"<Relationship\"){var rel={};rel.Type=y.Type;rel.Target=y.Target;rel.Id=y.Id;rel.TargetMode=y.TargetMode;var canonictarget=y.TargetMode===\"External\"?y.Target:resolveRelativePathIntoAbsolute(y.Target);rels[canonictarget]=rel;hash[y.Id]=rel}});rels[\"!id\"]=hash;return rels}XMLNS.RELS=\"http://schemas.openxmlformats.org/package/2006/relationships\";var RELS_ROOT=writextag(\"Relationships\",null,{xmlns:XMLNS.RELS});function write_rels(rels){var o=[];o[o.length]=XML_HEADER;o[o.length]=RELS_ROOT;keys(rels[\"!id\"]).forEach(function(rid){var rel=rels[\"!id\"][rid];o[o.length]=writextag(\"Relationship\",null,rel)});if(o.length>2){o[o.length]=\"</Relationships>\";o[1]=o[1].replace(\"/>\",\">\")}return o.join(\"\")}var CORE_PROPS=[[\"cp:category\",\"Category\"],[\"cp:contentStatus\",\"ContentStatus\"],[\"cp:keywords\",\"Keywords\"],[\"cp:lastModifiedBy\",\"LastAuthor\"],[\"cp:lastPrinted\",\"LastPrinted\"],[\"cp:revision\",\"RevNumber\"],[\"cp:version\",\"Version\"],[\"dc:creator\",\"Author\"],[\"dc:description\",\"Comments\"],[\"dc:identifier\",\"Identifier\"],[\"dc:language\",\"Language\"],[\"dc:subject\",\"Subject\"],[\"dc:title\",\"Title\"],[\"dcterms:created\",\"CreatedDate\",\"date\"],[\"dcterms:modified\",\"ModifiedDate\",\"date\"]];XMLNS.CORE_PROPS=\"http://schemas.openxmlformats.org/package/2006/metadata/core-properties\";RELS.CORE_PROPS=\"http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties\";var CORE_PROPS_REGEX=function(){var r=new Array(CORE_PROPS.length);for(var i=0;i<CORE_PROPS.length;++i){var f=CORE_PROPS[i];var g=\"(?:\"+f[0].substr(0,f[0].indexOf(\":\"))+\":)\"+f[0].substr(f[0].indexOf(\":\")+1);r[i]=new RegExp(\"<\"+g+\"[^>]*>(.*)</\"+g+\">\")}return r}();function parse_core_props(data){var p={};for(var i=0;i<CORE_PROPS.length;++i){var f=CORE_PROPS[i],cur=data.match(CORE_PROPS_REGEX[i]);if(cur!=null&&cur.length>0)p[f[1]]=cur[1];if(f[2]===\"date\"&&p[f[1]])p[f[1]]=new Date(p[f[1]])}return p}var CORE_PROPS_XML_ROOT=writextag(\"cp:coreProperties\",null,{\"xmlns:cp\":XMLNS.CORE_PROPS,\"xmlns:dc\":XMLNS.dc,\"xmlns:dcterms\":XMLNS.dcterms,\"xmlns:dcmitype\":XMLNS.dcmitype,\"xmlns:xsi\":XMLNS.xsi});function cp_doit(f,g,h,o,p){if(p[f]!=null||g==null||g===\"\")return;p[f]=g;o[o.length]=h?writextag(f,g,h):writetag(f,g)}function write_core_props(cp,opts){var o=[XML_HEADER,CORE_PROPS_XML_ROOT],p={};if(opts&&opts.Props){if(opts.Props.title)o[o.length]=\"<dc:title>\"+opts.Props.title+\"</dc:title>\";if(opts.Props.subject)o[o.length]=\"<dc:subject>\"+opts.Props.subject+\"</dc:subject>\";if(opts.Props.creator)o[o.length]=\"<dc:creator>\"+opts.Props.creator+\"</dc:creator>\";if(opts.Props.keywords)o[o.length]=\"<cp:keywords>\"+opts.Props.keywords+\"</cp:keywords>\";if(opts.Props.description)o[o.length]=\"<dc:description>\"+opts.Props.description+\"</dc:description>\"}if(cp){if(cp.CreatedDate!=null)cp_doit(\"dcterms:created\",typeof cp.CreatedDate===\"string\"?cp.CreatedDate:write_w3cdtf(cp.CreatedDate,opts.WTF),{\"xsi:type\":\"dcterms:W3CDTF\"},o,p);if(cp.ModifiedDate!=null)cp_doit(\"dcterms:modified\",typeof cp.ModifiedDate===\"string\"?cp.ModifiedDate:write_w3cdtf(cp.ModifiedDate,opts.WTF),{\"xsi:type\":\"dcterms:W3CDTF\"},o,p);for(var i=0;i!=CORE_PROPS.length;++i){var f=CORE_PROPS[i];cp_doit(f[0],cp[f[1]],null,o,p)}}if(o.length>2){o[o.length]=\"</cp:coreProperties>\";o[1]=o[1].replace(\"/>\",\">\")}return o.join(\"\")}var EXT_PROPS=[[\"Application\",\"Application\",\"string\"],[\"AppVersion\",\"AppVersion\",\"string\"],[\"Company\",\"Company\",\"string\"],[\"DocSecurity\",\"DocSecurity\",\"string\"],[\"Manager\",\"Manager\",\"string\"],[\"HyperlinksChanged\",\"HyperlinksChanged\",\"bool\"],[\"SharedDoc\",\"SharedDoc\",\"bool\"],[\"LinksUpToDate\",\"LinksUpToDate\",\"bool\"],[\"ScaleCrop\",\"ScaleCrop\",\"bool\"],[\"HeadingPairs\",\"HeadingPairs\",\"raw\"],[\"TitlesOfParts\",\"TitlesOfParts\",\"raw\"]];XMLNS.EXT_PROPS=\"http://schemas.openxmlformats.org/officeDocument/2006/extended-properties\";RELS.EXT_PROPS=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties\";function parse_ext_props(data,p){var q={};if(!p)p={};EXT_PROPS.forEach(function(f){switch(f[2]){case\"string\":p[f[1]]=(data.match(matchtag(f[0]))||[])[1];break;case\"bool\":p[f[1]]=(data.match(matchtag(f[0]))||[])[1]===\"true\";break;case\"raw\":var cur=data.match(new RegExp(\"<\"+f[0]+\"[^>]*>(.*)</\"+f[0]+\">\"));if(cur&&cur.length>0)q[f[1]]=cur[1];break}});if(q.HeadingPairs&&q.TitlesOfParts){var v=parseVector(q.HeadingPairs);var j=0,widx=0;for(var i=0;i!==v.length;++i){switch(v[i].v){case\"Worksheets\":widx=j;p.Worksheets=+v[++i].v;break;case\"Named Ranges\":++i;break}}var parts=parseVector(q.TitlesOfParts).map(function(x){return utf8read(x.v)});p.SheetNames=parts.slice(widx,widx+p.Worksheets)}return p}var EXT_PROPS_XML_ROOT=writextag(\"Properties\",null,{xmlns:XMLNS.EXT_PROPS,\"xmlns:vt\":XMLNS.vt});function write_ext_props(cp,opts){var o=[],p={},W=writextag;if(!cp)cp={};cp.Application=\"SheetJS\";o[o.length]=XML_HEADER;o[o.length]=EXT_PROPS_XML_ROOT;EXT_PROPS.forEach(function(f){if(cp[f[1]]===undefined)return;var v;switch(f[2]){case\"string\":v=cp[f[1]];break;case\"bool\":v=cp[f[1]]?\"true\":\"false\";break}if(v!==undefined)o[o.length]=W(f[0],v)});o[o.length]=W(\"HeadingPairs\",W(\"vt:vector\",W(\"vt:variant\",\"<vt:lpstr>Worksheets</vt:lpstr>\")+W(\"vt:variant\",W(\"vt:i4\",String(cp.Worksheets))),{size:2,baseType:\"variant\"}));o[o.length]=W(\"TitlesOfParts\",W(\"vt:vector\",cp.SheetNames.map(function(s){return\"<vt:lpstr>\"+s+\"</vt:lpstr>\"}).join(\"\"),{size:cp.Worksheets,baseType:\"lpstr\"}));if(o.length>2){o[o.length]=\"</Properties>\";o[1]=o[1].replace(\"/>\",\">\")}return o.join(\"\")}XMLNS.CUST_PROPS=\"http://schemas.openxmlformats.org/officeDocument/2006/custom-properties\";RELS.CUST_PROPS=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties\";var custregex=/<[^>]+>[^<]*/g;function parse_cust_props(data,opts){var p={},name;var m=data.match(custregex);if(m)for(var i=0;i!=m.length;++i){var x=m[i],y=parsexmltag(x);switch(y[0]){case\"<?xml\":break;case\"<Properties\":if(y.xmlns!==XMLNS.CUST_PROPS)throw\"unrecognized xmlns \"+y.xmlns;if(y.xmlnsvt&&y.xmlnsvt!==XMLNS.vt)throw\"unrecognized vt \"+y.xmlnsvt;break;case\"<property\":name=y.name;break;case\"</property>\":name=null;break;default:if(x.indexOf(\"<vt:\")===0){var toks=x.split(\">\");var type=toks[0].substring(4),text=toks[1];switch(type){case\"lpstr\":case\"lpwstr\":case\"bstr\":case\"lpwstr\":p[name]=unescapexml(text);break;case\"bool\":p[name]=parsexmlbool(text,\"<vt:bool>\");break;case\"i1\":case\"i2\":case\"i4\":case\"i8\":case\"int\":case\"uint\":p[name]=parseInt(text,10);break;case\"r4\":case\"r8\":case\"decimal\":p[name]=parseFloat(text);break;case\"filetime\":case\"date\":p[name]=new Date(text);break;case\"cy\":case\"error\":p[name]=unescapexml(text);break;default:if(typeof console!==\"undefined\")console.warn(\"Unexpected\",x,type,toks)}}else if(x.substr(0,2)===\"</\"){}else if(opts.WTF)throw new Error(x)}}return p}var CUST_PROPS_XML_ROOT=writextag(\"Properties\",null,{xmlns:XMLNS.CUST_PROPS,\"xmlns:vt\":XMLNS.vt});function write_cust_props(cp,opts){var o=[XML_HEADER,CUST_PROPS_XML_ROOT];if(!cp)return o.join(\"\");var pid=1;keys(cp).forEach(function custprop(k){++pid;o[o.length]=writextag(\"property\",write_vt(cp[k]),{fmtid:\"{D5CDD505-2E9C-101B-9397-08002B2CF9AE}\",pid:pid,name:k})});if(o.length>2){o[o.length]=\"</Properties>\";o[1]=o[1].replace(\"/>\",\">\")}return o.join(\"\")}function xlml_set_prop(Props,tag,val){switch(tag){case\"Description\":tag=\"Comments\";break}Props[tag]=val}function parse_FILETIME(blob){var dwLowDateTime=blob.read_shift(4),dwHighDateTime=blob.read_shift(4);return new Date((dwHighDateTime/1e7*Math.pow(2,32)+dwLowDateTime/1e7-11644473600)*1e3).toISOString().replace(/\\.000/,\"\")}function parse_lpstr(blob,type,pad){var str=blob.read_shift(0,\"lpstr\");if(pad)blob.l+=4-(str.length+1&3)&3;return str}function parse_lpwstr(blob,type,pad){var str=blob.read_shift(0,\"lpwstr\");if(pad)blob.l+=4-(str.length+1&3)&3;return str}function parse_VtStringBase(blob,stringType,pad){if(stringType===31)return parse_lpwstr(blob);return parse_lpstr(blob,stringType,pad)}function parse_VtString(blob,t,pad){return parse_VtStringBase(blob,t,pad===false?0:4)}function parse_VtUnalignedString(blob,t){if(!t)throw new Error(\"dafuq?\");return parse_VtStringBase(blob,t,0)}function parse_VtVecUnalignedLpstrValue(blob){var length=blob.read_shift(4);var ret=[];for(var i=0;i!=length;++i)ret[i]=blob.read_shift(0,\"lpstr\");return ret}function parse_VtVecUnalignedLpstr(blob){return parse_VtVecUnalignedLpstrValue(blob)}function parse_VtHeadingPair(blob){var headingString=parse_TypedPropertyValue(blob,VT_USTR);var headerParts=parse_TypedPropertyValue(blob,VT_I4);return[headingString,headerParts]}function parse_VtVecHeadingPairValue(blob){var cElements=blob.read_shift(4);var out=[];for(var i=0;i!=cElements/2;++i)out.push(parse_VtHeadingPair(blob));return out}function parse_VtVecHeadingPair(blob){return parse_VtVecHeadingPairValue(blob)}function parse_dictionary(blob,CodePage){var cnt=blob.read_shift(4);var dict={};for(var j=0;j!=cnt;++j){var pid=blob.read_shift(4);var len=blob.read_shift(4);dict[pid]=blob.read_shift(len,CodePage===1200?\"utf16le\":\"utf8\").replace(chr0,\"\").replace(chr1,\"!\")}if(blob.l&3)blob.l=blob.l>>2+1<<2;return dict}function parse_BLOB(blob){var size=blob.read_shift(4);var bytes=blob.slice(blob.l,blob.l+size);if(size&3>0)blob.l+=4-(size&3)&3;return bytes}function parse_ClipboardData(blob){var o={};o.Size=blob.read_shift(4);blob.l+=o.Size;return o}function parse_VtVector(blob,cb){}function parse_TypedPropertyValue(blob,type,_opts){var t=blob.read_shift(2),ret,opts=_opts||{};blob.l+=2;if(type!==VT_VARIANT)if(t!==type&&VT_CUSTOM.indexOf(type)===-1)throw new Error(\"Expected type \"+type+\" saw \"+t);switch(type===VT_VARIANT?t:type){case 2:ret=blob.read_shift(2,\"i\");if(!opts.raw)blob.l+=2;return ret;case 3:ret=blob.read_shift(4,\"i\");return ret;case 11:return blob.read_shift(4)!==0;case 19:ret=blob.read_shift(4);return ret;case 30:return parse_lpstr(blob,t,4).replace(chr0,\"\");case 31:return parse_lpwstr(blob);case 64:return parse_FILETIME(blob);case 65:return parse_BLOB(blob);case 71:return parse_ClipboardData(blob);case 80:return parse_VtString(blob,t,!opts.raw&&4).replace(chr0,\"\");case 81:return parse_VtUnalignedString(blob,t,4).replace(chr0,\"\");case 4108:return parse_VtVecHeadingPair(blob);case 4126:return parse_VtVecUnalignedLpstr(blob);default:throw new Error(\"TypedPropertyValue unrecognized type \"+type+\" \"+t)}}function parse_PropertySet(blob,PIDSI){var start_addr=blob.l;var size=blob.read_shift(4);var NumProps=blob.read_shift(4);var Props=[],i=0;var CodePage=0;var Dictionary=-1,DictObj;for(i=0;i!=NumProps;++i){var PropID=blob.read_shift(4);var Offset=blob.read_shift(4);Props[i]=[PropID,Offset+start_addr]}var PropH={};for(i=0;i!=NumProps;++i){if(blob.l!==Props[i][1]){var fail=true;if(i>0&&PIDSI)switch(PIDSI[Props[i-1][0]].t){case 2:if(blob.l+2===Props[i][1]){blob.l+=2;fail=false}break;case 80:if(blob.l<=Props[i][1]){blob.l=Props[i][1];fail=false}break;case 4108:if(blob.l<=Props[i][1]){blob.l=Props[i][1];fail=false}break}if(!PIDSI&&blob.l<=Props[i][1]){fail=false;blob.l=Props[i][1]}if(fail)throw new Error(\"Read Error: Expected address \"+Props[i][1]+\" at \"+blob.l+\" :\"+i)}if(PIDSI){var piddsi=PIDSI[Props[i][0]];PropH[piddsi.n]=parse_TypedPropertyValue(blob,piddsi.t,{raw:true});if(piddsi.p===\"version\")PropH[piddsi.n]=String(PropH[piddsi.n]>>16)+\".\"+String(PropH[piddsi.n]&65535);if(piddsi.n==\"CodePage\")switch(PropH[piddsi.n]){case 0:PropH[piddsi.n]=1252;case 1e4:case 1252:case 874:case 1250:case 1251:case 1253:case 1254:case 1255:case 1256:case 1257:case 1258:case 932:case 936:case 949:case 950:case 1200:case 1201:case 65e3:case-536:case 65001:case-535:set_cp(CodePage=PropH[piddsi.n]);break;default:throw new Error(\"Unsupported CodePage: \"+PropH[piddsi.n])}}else{if(Props[i][0]===1){CodePage=PropH.CodePage=parse_TypedPropertyValue(blob,VT_I2);set_cp(CodePage);if(Dictionary!==-1){var oldpos=blob.l;blob.l=Props[Dictionary][1];DictObj=parse_dictionary(blob,CodePage);blob.l=oldpos}}else if(Props[i][0]===0){if(CodePage===0){Dictionary=i;blob.l=Props[i+1][1];continue}DictObj=parse_dictionary(blob,CodePage)}else{var name=DictObj[Props[i][0]];var val;switch(blob[blob.l]){case 65:blob.l+=4;val=parse_BLOB(blob);break;case 30:blob.l+=4;val=parse_VtString(blob,blob[blob.l-4]);break;case 31:blob.l+=4;val=parse_VtString(blob,blob[blob.l-4]);break;case 3:blob.l+=4;val=blob.read_shift(4,\"i\");break;case 19:blob.l+=4;val=blob.read_shift(4);break;case 5:blob.l+=4;val=blob.read_shift(8,\"f\");break;case 11:blob.l+=4;val=parsebool(blob,4);break;case 64:blob.l+=4;val=new Date(parse_FILETIME(blob));break;default:throw new Error(\"unparsed value: \"+blob[blob.l])}PropH[name]=val}}}blob.l=start_addr+size;return PropH}function parse_PropertySetStream(file,PIDSI){var blob=file.content;prep_blob(blob,0);var NumSets,FMTID0,FMTID1,Offset0,Offset1;blob.chk(\"feff\",\"Byte Order: \");var vers=blob.read_shift(2);var SystemIdentifier=blob.read_shift(4);blob.chk(CFB.utils.consts.HEADER_CLSID,\"CLSID: \");NumSets=blob.read_shift(4);if(NumSets!==1&&NumSets!==2)throw\"Unrecognized #Sets: \"+NumSets;FMTID0=blob.read_shift(16);Offset0=blob.read_shift(4);if(NumSets===1&&Offset0!==blob.l)throw\"Length mismatch\";else if(NumSets===2){FMTID1=blob.read_shift(16);Offset1=blob.read_shift(4)}var PSet0=parse_PropertySet(blob,PIDSI);var rval={SystemIdentifier:SystemIdentifier};for(var y in PSet0)rval[y]=PSet0[y];rval.FMTID=FMTID0;if(NumSets===1)return rval;if(blob.l!==Offset1)throw\"Length mismatch 2: \"+blob.l+\" !== \"+Offset1;var PSet1;try{PSet1=parse_PropertySet(blob,null)}catch(e){}for(y in PSet1)rval[y]=PSet1[y];rval.FMTID=[FMTID0,FMTID1];return rval}function parsenoop2(blob,length){blob.read_shift(length);return null}function parslurp(blob,length,cb){var arr=[],target=blob.l+length;while(blob.l<target)arr.push(cb(blob,target-blob.l));if(target!==blob.l)throw new Error(\"Slurp error\");return arr}function parslurp2(blob,length,cb){var arr=[],target=blob.l+length,len=blob.read_shift(2);\r\nwhile(len--!==0)arr.push(cb(blob,target-blob.l));if(target!==blob.l)throw new Error(\"Slurp error\");return arr}function parsebool(blob,length){return blob.read_shift(length)===1}function parseuint16(blob){return blob.read_shift(2,\"u\")}function parseuint16a(blob,length){return parslurp(blob,length,parseuint16)}var parse_Boolean=parsebool;function parse_Bes(blob){var v=blob.read_shift(1),t=blob.read_shift(1);return t===1?v:v===1}function parse_ShortXLUnicodeString(blob,length,opts){var cch=blob.read_shift(1);var width=1,encoding=\"sbcs-cont\";var cp=current_codepage;if(opts&&opts.biff>=8)current_codepage=1200;if(opts===undefined||opts.biff!==5){var fHighByte=blob.read_shift(1);if(fHighByte){width=2;encoding=\"dbcs-cont\"}}var o=cch?blob.read_shift(cch,encoding):\"\";current_codepage=cp;return o}function parse_XLUnicodeRichExtendedString(blob){var cp=current_codepage;current_codepage=1200;var cch=blob.read_shift(2),flags=blob.read_shift(1);var fHighByte=flags&1,fExtSt=flags&4,fRichSt=flags&8;var width=1+(flags&1);var cRun,cbExtRst;var z={};if(fRichSt)cRun=blob.read_shift(2);if(fExtSt)cbExtRst=blob.read_shift(4);var encoding=flags&1?\"dbcs-cont\":\"sbcs-cont\";var msg=cch===0?\"\":blob.read_shift(cch,encoding);if(fRichSt)blob.l+=4*cRun;if(fExtSt)blob.l+=cbExtRst;z.t=msg;if(!fRichSt){z.raw=\"<t>\"+z.t+\"</t>\";z.r=z.t}current_codepage=cp;return z}function parse_XLUnicodeStringNoCch(blob,cch,opts){var retval;var fHighByte=blob.read_shift(1);if(fHighByte===0){retval=blob.read_shift(cch,\"sbcs-cont\")}else{retval=blob.read_shift(cch,\"dbcs-cont\")}return retval}function parse_XLUnicodeString(blob,length,opts){var cch=blob.read_shift(opts!==undefined&&opts.biff>0&&opts.biff<8?1:2);if(cch===0){blob.l++;return\"\"}return parse_XLUnicodeStringNoCch(blob,cch,opts)}function parse_XLUnicodeString2(blob,length,opts){if(opts.biff!==5&&opts.biff!==2)return parse_XLUnicodeString(blob,length,opts);var cch=blob.read_shift(1);if(cch===0){blob.l++;return\"\"}return blob.read_shift(cch,\"sbcs-cont\")}var parse_ControlInfo=parsenoop;var parse_URLMoniker=function(blob,length){var len=blob.read_shift(4),start=blob.l;var extra=false;if(len>24){blob.l+=len-24;if(blob.read_shift(16)===\"795881f43b1d7f48af2c825dc4852763\")extra=true;blob.l=start}var url=blob.read_shift((extra?len-24:len)>>1,\"utf16le\").replace(chr0,\"\");if(extra)blob.l+=24;return url};var parse_FileMoniker=function(blob,length){var cAnti=blob.read_shift(2);var ansiLength=blob.read_shift(4);var ansiPath=blob.read_shift(ansiLength,\"cstr\");var endServer=blob.read_shift(2);var versionNumber=blob.read_shift(2);var cbUnicodePathSize=blob.read_shift(4);if(cbUnicodePathSize===0)return ansiPath.replace(/\\\\/g,\"/\");var cbUnicodePathBytes=blob.read_shift(4);var usKeyValue=blob.read_shift(2);var unicodePath=blob.read_shift(cbUnicodePathBytes>>1,\"utf16le\").replace(chr0,\"\");return unicodePath};var parse_HyperlinkMoniker=function(blob,length){var clsid=blob.read_shift(16);length-=16;switch(clsid){case\"e0c9ea79f9bace118c8200aa004ba90b\":return parse_URLMoniker(blob,length);case\"0303000000000000c000000000000046\":return parse_FileMoniker(blob,length);default:throw\"unsupported moniker \"+clsid}};var parse_HyperlinkString=function(blob,length){var len=blob.read_shift(4);var o=blob.read_shift(len,\"utf16le\").replace(chr0,\"\");return o};var parse_Hyperlink=function(blob,length){var end=blob.l+length;var sVer=blob.read_shift(4);if(sVer!==2)throw new Error(\"Unrecognized streamVersion: \"+sVer);var flags=blob.read_shift(2);blob.l+=2;var displayName,targetFrameName,moniker,oleMoniker,location,guid,fileTime;if(flags&16)displayName=parse_HyperlinkString(blob,end-blob.l);if(flags&128)targetFrameName=parse_HyperlinkString(blob,end-blob.l);if((flags&257)===257)moniker=parse_HyperlinkString(blob,end-blob.l);if((flags&257)===1)oleMoniker=parse_HyperlinkMoniker(blob,end-blob.l);if(flags&8)location=parse_HyperlinkString(blob,end-blob.l);if(flags&32)guid=blob.read_shift(16);if(flags&64)fileTime=parse_FILETIME(blob,8);blob.l=end;var target=targetFrameName||moniker||oleMoniker;if(location)target+=\"#\"+location;return{Target:target}};function parse_LongRGBA(blob,length){var r=blob.read_shift(1),g=blob.read_shift(1),b=blob.read_shift(1),a=blob.read_shift(1);return[r,g,b,a]}function parse_LongRGB(blob,length){var x=parse_LongRGBA(blob,length);x[3]=0;return x}function parse_XLSCell(blob,length){var rw=blob.read_shift(2);var col=blob.read_shift(2);var ixfe=blob.read_shift(2);return{r:rw,c:col,ixfe:ixfe}}function parse_frtHeader(blob){var rt=blob.read_shift(2);var flags=blob.read_shift(2);blob.l+=8;return{type:rt,flags:flags}}function parse_OptXLUnicodeString(blob,length,opts){return length===0?\"\":parse_XLUnicodeString2(blob,length,opts)}var HIDEOBJENUM=[\"SHOWALL\",\"SHOWPLACEHOLDER\",\"HIDEALL\"];var parse_HideObjEnum=parseuint16;function parse_XTI(blob,length){var iSupBook=blob.read_shift(2),itabFirst=blob.read_shift(2,\"i\"),itabLast=blob.read_shift(2,\"i\");return[iSupBook,itabFirst,itabLast]}function parse_RkRec(blob,length){var ixfe=blob.read_shift(2);var RK=parse_RkNumber(blob);return[ixfe,RK]}function parse_AddinUdf(blob,length){blob.l+=4;length-=4;var l=blob.l+length;var udfName=parse_ShortXLUnicodeString(blob,length);var cb=blob.read_shift(2);l-=blob.l;if(cb!==l)throw\"Malformed AddinUdf: padding = \"+l+\" != \"+cb;blob.l+=cb;return udfName}function parse_Ref8U(blob,length){var rwFirst=blob.read_shift(2);var rwLast=blob.read_shift(2);var colFirst=blob.read_shift(2);var colLast=blob.read_shift(2);return{s:{c:colFirst,r:rwFirst},e:{c:colLast,r:rwLast}}}function parse_RefU(blob,length){var rwFirst=blob.read_shift(2);var rwLast=blob.read_shift(2);var colFirst=blob.read_shift(1);var colLast=blob.read_shift(1);return{s:{c:colFirst,r:rwFirst},e:{c:colLast,r:rwLast}}}var parse_Ref=parse_RefU;function parse_FtCmo(blob,length){blob.l+=4;var ot=blob.read_shift(2);var id=blob.read_shift(2);var flags=blob.read_shift(2);blob.l+=12;return[id,ot,flags]}function parse_FtNts(blob,length){var out={};blob.l+=4;blob.l+=16;out.fSharedNote=blob.read_shift(2);blob.l+=4;return out}function parse_FtCf(blob,length){var out={};blob.l+=4;blob.cf=blob.read_shift(2);return out}var FtTab={21:parse_FtCmo,19:parsenoop,18:function(blob,length){blob.l+=12},17:function(blob,length){blob.l+=8},16:parsenoop,15:parsenoop,13:parse_FtNts,12:function(blob,length){blob.l+=24},11:function(blob,length){blob.l+=10},10:function(blob,length){blob.l+=16},9:parsenoop,8:function(blob,length){blob.l+=6},7:parse_FtCf,6:function(blob,length){blob.l+=6},4:parsenoop,0:function(blob,length){blob.l+=4}};function parse_FtArray(blob,length,ot){var s=blob.l;var fts=[];while(blob.l<s+length){var ft=blob.read_shift(2);blob.l-=2;try{fts.push(FtTab[ft](blob,s+length-blob.l))}catch(e){blob.l=s+length;return fts}}if(blob.l!=s+length)blob.l=s+length;return fts}var parse_FontIndex=parseuint16;function parse_BOF(blob,length){var o={};o.BIFFVer=blob.read_shift(2);length-=2;switch(o.BIFFVer){case 1536:case 1280:case 2:case 7:break;default:throw\"Unexpected BIFF Ver \"+o.BIFFVer}blob.read_shift(length);return o}function parse_InterfaceHdr(blob,length){if(length===0)return 1200;var q;if((q=blob.read_shift(2))!==1200)throw\"InterfaceHdr codePage \"+q;return 1200}function parse_WriteAccess(blob,length,opts){if(opts.enc){blob.l+=length;return\"\"}var l=blob.l;var UserName=parse_XLUnicodeString(blob,0,opts);blob.read_shift(length+l-blob.l);return UserName}function parse_BoundSheet8(blob,length,opts){var pos=blob.read_shift(4);var hidden=blob.read_shift(1)>>6;var dt=blob.read_shift(1);switch(dt){case 0:dt=\"Worksheet\";break;case 1:dt=\"Macrosheet\";break;case 2:dt=\"Chartsheet\";break;case 6:dt=\"VBAModule\";break}var name=parse_ShortXLUnicodeString(blob,0,opts);if(name.length===0)name=\"Sheet1\";return{pos:pos,hs:hidden,dt:dt,name:name}}function parse_SST(blob,length){var cnt=blob.read_shift(4);var ucnt=blob.read_shift(4);var strs=[];for(var i=0;i!=ucnt;++i){strs.push(parse_XLUnicodeRichExtendedString(blob))}strs.Count=cnt;strs.Unique=ucnt;return strs}function parse_ExtSST(blob,length){var extsst={};extsst.dsst=blob.read_shift(2);blob.l+=length-2;return extsst}function parse_Row(blob,length){var rw=blob.read_shift(2),col=blob.read_shift(2),Col=blob.read_shift(2),rht=blob.read_shift(2);blob.read_shift(4);var flags=blob.read_shift(1);blob.read_shift(1);blob.read_shift(2);return{r:rw,c:col,cnt:Col-col}}function parse_ForceFullCalculation(blob,length){var header=parse_frtHeader(blob);if(header.type!=2211)throw\"Invalid Future Record \"+header.type;var fullcalc=blob.read_shift(4);return fullcalc!==0}var parse_CompressPictures=parsenoop2;function parse_RecalcId(blob,length){blob.read_shift(2);return blob.read_shift(4)}function parse_DefaultRowHeight(blob,length){var f=blob.read_shift(2),miyRw;miyRw=blob.read_shift(2);var fl={Unsynced:f&1,DyZero:(f&2)>>1,ExAsc:(f&4)>>2,ExDsc:(f&8)>>3};return[fl,miyRw]}function parse_Window1(blob,length){var xWn=blob.read_shift(2),yWn=blob.read_shift(2),dxWn=blob.read_shift(2),dyWn=blob.read_shift(2);var flags=blob.read_shift(2),iTabCur=blob.read_shift(2),iTabFirst=blob.read_shift(2);var ctabSel=blob.read_shift(2),wTabRatio=blob.read_shift(2);return{Pos:[xWn,yWn],Dim:[dxWn,dyWn],Flags:flags,CurTab:iTabCur,FirstTab:iTabFirst,Selected:ctabSel,TabRatio:wTabRatio}}function parse_Font(blob,length,opts){blob.l+=14;var name=parse_ShortXLUnicodeString(blob,0,opts);return name}function parse_LabelSst(blob,length){var cell=parse_XLSCell(blob);cell.isst=blob.read_shift(4);return cell}function parse_Label(blob,length,opts){var cell=parse_XLSCell(blob,6);var str=parse_XLUnicodeString(blob,length-6,opts);cell.val=str;return cell}function parse_Format(blob,length,opts){var ifmt=blob.read_shift(2);var fmtstr=parse_XLUnicodeString2(blob,0,opts);return[ifmt,fmtstr]}function parse_Dimensions(blob,length){var w=length===10?2:4;var r=blob.read_shift(w),R=blob.read_shift(w),c=blob.read_shift(2),C=blob.read_shift(2);blob.l+=2;return{s:{r:r,c:c},e:{r:R,c:C}}}function parse_RK(blob,length){var rw=blob.read_shift(2),col=blob.read_shift(2);var rkrec=parse_RkRec(blob);return{r:rw,c:col,ixfe:rkrec[0],rknum:rkrec[1]}}function parse_MulRk(blob,length){var target=blob.l+length-2;var rw=blob.read_shift(2),col=blob.read_shift(2);var rkrecs=[];while(blob.l<target)rkrecs.push(parse_RkRec(blob));if(blob.l!==target)throw\"MulRK read error\";var lastcol=blob.read_shift(2);if(rkrecs.length!=lastcol-col+1)throw\"MulRK length mismatch\";return{r:rw,c:col,C:lastcol,rkrec:rkrecs}}function parse_CellStyleXF(blob,length,style){var o={};var a=blob.read_shift(4),b=blob.read_shift(4);var c=blob.read_shift(4),d=blob.read_shift(2);o.patternType=XLSFillPattern[c>>26];o.icvFore=d&127;o.icvBack=d>>7&127;return o}function parse_CellXF(blob,length){return parse_CellStyleXF(blob,length,0)}function parse_StyleXF(blob,length){return parse_CellStyleXF(blob,length,1)}function parse_XF(blob,length){var o={};o.ifnt=blob.read_shift(2);o.ifmt=blob.read_shift(2);o.flags=blob.read_shift(2);o.fStyle=o.flags>>2&1;length-=6;o.data=parse_CellStyleXF(blob,length,o.fStyle);return o}function parse_Guts(blob,length){blob.l+=4;var out=[blob.read_shift(2),blob.read_shift(2)];if(out[0]!==0)out[0]--;if(out[1]!==0)out[1]--;if(out[0]>7||out[1]>7)throw\"Bad Gutters: \"+out;return out}function parse_BoolErr(blob,length){var cell=parse_XLSCell(blob,6);var val=parse_Bes(blob,2);cell.val=val;cell.t=val===true||val===false?\"b\":\"e\";return cell}function parse_Number(blob,length){var cell=parse_XLSCell(blob,6);var xnum=parse_Xnum(blob,8);cell.val=xnum;return cell}var parse_XLHeaderFooter=parse_OptXLUnicodeString;function parse_SupBook(blob,length,opts){var end=blob.l+length;var ctab=blob.read_shift(2);var cch=blob.read_shift(2);var virtPath;if(cch>=1&&cch<=255)virtPath=parse_XLUnicodeStringNoCch(blob,cch);var rgst=blob.read_shift(end-blob.l);opts.sbcch=cch;return[cch,ctab,virtPath,rgst]}function parse_ExternName(blob,length,opts){var flags=blob.read_shift(2);var body;var o={fBuiltIn:flags&1,fWantAdvise:flags>>>1&1,fWantPict:flags>>>2&1,fOle:flags>>>3&1,fOleLink:flags>>>4&1,cf:flags>>>5&1023,fIcon:flags>>>15&1};if(opts.sbcch===14849)body=parse_AddinUdf(blob,length-2);o.body=body||blob.read_shift(length-2);return o}function parse_Lbl(blob,length,opts){if(opts.biff<8)return parse_Label(blob,length,opts);var target=blob.l+length;var flags=blob.read_shift(2);var chKey=blob.read_shift(1);var cch=blob.read_shift(1);var cce=blob.read_shift(2);blob.l+=2;var itab=blob.read_shift(2);blob.l+=4;var name=parse_XLUnicodeStringNoCch(blob,cch,opts);var rgce=parse_NameParsedFormula(blob,target-blob.l,opts,cce);return{chKey:chKey,Name:name,rgce:rgce}}function parse_ExternSheet(blob,length,opts){if(opts.biff<8)return parse_ShortXLUnicodeString(blob,length,opts);var o=parslurp2(blob,length,parse_XTI);var oo=[];if(opts.sbcch===1025){for(var i=0;i!=o.length;++i)oo.push(opts.snames[o[i][1]]);return oo}else return o}function parse_ShrFmla(blob,length,opts){var ref=parse_RefU(blob,6);blob.l++;var cUse=blob.read_shift(1);length-=8;return[parse_SharedParsedFormula(blob,length,opts),cUse]}function parse_Array(blob,length,opts){var ref=parse_Ref(blob,6);blob.l+=6;length-=12;return[ref,parse_ArrayParsedFormula(blob,length,opts,ref)]}function parse_MTRSettings(blob,length){var fMTREnabled=blob.read_shift(4)!==0;var fUserSetThreadCount=blob.read_shift(4)!==0;var cUserThreadCount=blob.read_shift(4);return[fMTREnabled,fUserSetThreadCount,cUserThreadCount]}function parse_NoteSh(blob,length,opts){if(opts.biff<8)return;var row=blob.read_shift(2),col=blob.read_shift(2);var flags=blob.read_shift(2),idObj=blob.read_shift(2);var stAuthor=parse_XLUnicodeString2(blob,0,opts);if(opts.biff<8)blob.read_shift(1);return[{r:row,c:col},stAuthor,idObj,flags]}function parse_Note(blob,length,opts){return parse_NoteSh(blob,length,opts)}function parse_MergeCells(blob,length){var merges=[];var cmcs=blob.read_shift(2);while(cmcs--)merges.push(parse_Ref8U(blob,length));return merges}function parse_Obj(blob,length){var cmo=parse_FtCmo(blob,22);var fts=parse_FtArray(blob,length-22,cmo[1]);return{cmo:cmo,ft:fts}}function parse_TxO(blob,length,opts){var s=blob.l;try{blob.l+=4;var ot=(opts.lastobj||{cmo:[0,0]}).cmo[1];var controlInfo;if([0,5,7,11,12,14].indexOf(ot)==-1)blob.l+=6;else controlInfo=parse_ControlInfo(blob,6,opts);var cchText=blob.read_shift(2);var cbRuns=blob.read_shift(2);var ifntEmpty=parse_FontIndex(blob,2);var len=blob.read_shift(2);blob.l+=len;var texts=\"\";for(var i=1;i<blob.lens.length-1;++i){if(blob.l-s!=blob.lens[i])throw\"TxO: bad continue record\";var hdr=blob[blob.l];var t=parse_XLUnicodeStringNoCch(blob,blob.lens[i+1]-blob.lens[i]-1);texts+=t;if(texts.length>=(hdr?cchText:2*cchText))break}if(texts.length!==cchText&&texts.length!==cchText*2){throw\"cchText: \"+cchText+\" != \"+texts.length}blob.l=s+length;return{t:texts}}catch(e){blob.l=s+length;return{t:texts||\"\"}}}var parse_HLink=function(blob,length){var ref=parse_Ref8U(blob,8);blob.l+=16;var hlink=parse_Hyperlink(blob,length-24);return[ref,hlink]};var parse_HLinkTooltip=function(blob,length){var end=blob.l+length;blob.read_shift(2);var ref=parse_Ref8U(blob,8);var wzTooltip=blob.read_shift((length-10)/2,\"dbcs-cont\");wzTooltip=wzTooltip.replace(chr0,\"\");return[ref,wzTooltip]};function parse_Country(blob,length){var o=[],d;d=blob.read_shift(2);o[0]=CountryEnum[d]||d;d=blob.read_shift(2);o[1]=CountryEnum[d]||d;return o}function parse_ClrtClient(blob,length){var ccv=blob.read_shift(2);var o=[];while(ccv-->0)o.push(parse_LongRGB(blob,8));return o}function parse_Palette(blob,length){var ccv=blob.read_shift(2);var o=[];while(ccv-->0)o.push(parse_LongRGB(blob,8));return o}function parse_XFCRC(blob,length){blob.l+=2;var o={cxfs:0,crc:0};o.cxfs=blob.read_shift(2);o.crc=blob.read_shift(4);return o}var parse_Style=parsenoop;var parse_StyleExt=parsenoop;var parse_ColInfo=parsenoop;var parse_Window2=parsenoop;var parse_Backup=parsebool;var parse_Blank=parse_XLSCell;var parse_BottomMargin=parse_Xnum;var parse_BuiltInFnGroupCount=parseuint16;var parse_CalcCount=parseuint16;var parse_CalcDelta=parse_Xnum;var parse_CalcIter=parsebool;var parse_CalcMode=parseuint16;var parse_CalcPrecision=parsebool;var parse_CalcRefMode=parsenoop2;var parse_CalcSaveRecalc=parsebool;var parse_CodePage=parseuint16;var parse_Compat12=parsebool;var parse_Date1904=parsebool;var parse_DefColWidth=parseuint16;var parse_DSF=parsenoop2;var parse_EntExU2=parsenoop2;var parse_EOF=parsenoop2;var parse_Excel9File=parsenoop2;var parse_FeatHdr=parsenoop2;var parse_FontX=parseuint16;var parse_Footer=parse_XLHeaderFooter;var parse_GridSet=parseuint16;var parse_HCenter=parsebool;var parse_Header=parse_XLHeaderFooter;var parse_HideObj=parse_HideObjEnum;var parse_InterfaceEnd=parsenoop2;var parse_LeftMargin=parse_Xnum;var parse_Mms=parsenoop2;var parse_ObjProtect=parsebool;var parse_Password=parseuint16;var parse_PrintGrid=parsebool;var parse_PrintRowCol=parsebool;var parse_PrintSize=parseuint16;var parse_Prot4Rev=parsebool;var parse_Prot4RevPass=parseuint16;var parse_Protect=parsebool;var parse_RefreshAll=parsebool;var parse_RightMargin=parse_Xnum;var parse_RRTabId=parseuint16a;var parse_ScenarioProtect=parsebool;var parse_Scl=parseuint16a;var parse_String=parse_XLUnicodeString;var parse_SxBool=parsebool;var parse_TopMargin=parse_Xnum;var parse_UsesELFs=parsebool;var parse_VCenter=parsebool;var parse_WinProtect=parsebool;var parse_WriteProtect=parsenoop;var parse_VerticalPageBreaks=parsenoop;var parse_HorizontalPageBreaks=parsenoop;var parse_Selection=parsenoop;var parse_Continue=parsenoop;var parse_Pane=parsenoop;var parse_Pls=parsenoop;var parse_DCon=parsenoop;var parse_DConRef=parsenoop;var parse_DConName=parsenoop;var parse_XCT=parsenoop;var parse_CRN=parsenoop;var parse_FileSharing=parsenoop;var parse_Uncalced=parsenoop;var parse_Template=parsenoop;var parse_Intl=parsenoop;var parse_WsBool=parsenoop;var parse_Sort=parsenoop;var parse_Sync=parsenoop;var parse_LPr=parsenoop;var parse_DxGCol=parsenoop;var parse_FnGroupName=parsenoop;var parse_FilterMode=parsenoop;var parse_AutoFilterInfo=parsenoop;var parse_AutoFilter=parsenoop;var parse_Setup=parsenoop;var parse_ScenMan=parsenoop;var parse_SCENARIO=parsenoop;var parse_SxView=parsenoop;var parse_Sxvd=parsenoop;var parse_SXVI=parsenoop;var parse_SxIvd=parsenoop;var parse_SXLI=parsenoop;var parse_SXPI=parsenoop;var parse_DocRoute=parsenoop;var parse_RecipName=parsenoop;var parse_MulBlank=parsenoop;var parse_SXDI=parsenoop;var parse_SXDB=parsenoop;var parse_SXFDB=parsenoop;var parse_SXDBB=parsenoop;var parse_SXNum=parsenoop;var parse_SxErr=parsenoop;var parse_SXInt=parsenoop;var parse_SXString=parsenoop;var parse_SXDtr=parsenoop;var parse_SxNil=parsenoop;var parse_SXTbl=parsenoop;var parse_SXTBRGIITM=parsenoop;var parse_SxTbpg=parsenoop;var parse_ObProj=parsenoop;var parse_SXStreamID=parsenoop;var parse_DBCell=parsenoop;var parse_SXRng=parsenoop;var parse_SxIsxoper=parsenoop;var parse_BookBool=parsenoop;var parse_DbOrParamQry=parsenoop;var parse_OleObjectSize=parsenoop;var parse_SXVS=parsenoop;var parse_BkHim=parsenoop;var parse_MsoDrawingGroup=parsenoop;var parse_MsoDrawing=parsenoop;var parse_MsoDrawingSelection=parsenoop;var parse_PhoneticInfo=parsenoop;var parse_SxRule=parsenoop;var parse_SXEx=parsenoop;var parse_SxFilt=parsenoop;var parse_SxDXF=parsenoop;var parse_SxItm=parsenoop;var parse_SxName=parsenoop;var parse_SxSelect=parsenoop;var parse_SXPair=parsenoop;var parse_SxFmla=parsenoop;var parse_SxFormat=parsenoop;var parse_SXVDEx=parsenoop;var parse_SXFormula=parsenoop;var parse_SXDBEx=parsenoop;var parse_RRDInsDel=parsenoop;var parse_RRDHead=parsenoop;var parse_RRDChgCell=parsenoop;var parse_RRDRenSheet=parsenoop;var parse_RRSort=parsenoop;var parse_RRDMove=parsenoop;var parse_RRFormat=parsenoop;var parse_RRAutoFmt=parsenoop;var parse_RRInsertSh=parsenoop;var parse_RRDMoveBegin=parsenoop;var parse_RRDMoveEnd=parsenoop;var parse_RRDInsDelBegin=parsenoop;var parse_RRDInsDelEnd=parsenoop;var parse_RRDConflict=parsenoop;var parse_RRDDefName=parsenoop;var parse_RRDRstEtxp=parsenoop;var parse_LRng=parsenoop;var parse_CUsr=parsenoop;var parse_CbUsr=parsenoop;var parse_UsrInfo=parsenoop;var parse_UsrExcl=parsenoop;var parse_FileLock=parsenoop;var parse_RRDInfo=parsenoop;var parse_BCUsrs=parsenoop;var parse_UsrChk=parsenoop;var parse_UserBView=parsenoop;var parse_UserSViewBegin=parsenoop;var parse_UserSViewEnd=parsenoop;var parse_RRDUserView=parsenoop;var parse_Qsi=parsenoop;var parse_CondFmt=parsenoop;var parse_CF=parsenoop;var parse_DVal=parsenoop;var parse_DConBin=parsenoop;var parse_Lel=parsenoop;var parse_XLSCodeName=parse_XLUnicodeString;var parse_SXFDBType=parsenoop;var parse_ObNoMacros=parsenoop;var parse_Dv=parsenoop;var parse_Index=parsenoop;var parse_Table=parsenoop;var parse_BigName=parsenoop;var parse_ContinueBigName=parsenoop;var parse_WebPub=parsenoop;var parse_QsiSXTag=parsenoop;var parse_DBQueryExt=parsenoop;var parse_ExtString=parsenoop;var parse_TxtQry=parsenoop;var parse_Qsir=parsenoop;var parse_Qsif=parsenoop;var parse_RRDTQSIF=parsenoop;var parse_OleDbConn=parsenoop;var parse_WOpt=parsenoop;var parse_SXViewEx=parsenoop;var parse_SXTH=parsenoop;var parse_SXPIEx=parsenoop;var parse_SXVDTEx=parsenoop;var parse_SXViewEx9=parsenoop;var parse_ContinueFrt=parsenoop;var parse_RealTimeData=parsenoop;var parse_ChartFrtInfo=parsenoop;var parse_FrtWrapper=parsenoop;var parse_StartBlock=parsenoop;var parse_EndBlock=parsenoop;var parse_StartObject=parsenoop;var parse_EndObject=parsenoop;var parse_CatLab=parsenoop;var parse_YMult=parsenoop;var parse_SXViewLink=parsenoop;var parse_PivotChartBits=parsenoop;var parse_FrtFontList=parsenoop;var parse_SheetExt=parsenoop;var parse_BookExt=parsenoop;var parse_SXAddl=parsenoop;var parse_CrErr=parsenoop;var parse_HFPicture=parsenoop;var parse_Feat=parsenoop;var parse_DataLabExt=parsenoop;var parse_DataLabExtContents=parsenoop;var parse_CellWatch=parsenoop;var parse_FeatHdr11=parsenoop;var parse_Feature11=parsenoop;var parse_DropDownObjIds=parsenoop;var parse_ContinueFrt11=parsenoop;var parse_DConn=parsenoop;var parse_List12=parsenoop;var parse_Feature12=parsenoop;var parse_CondFmt12=parsenoop;var parse_CF12=parsenoop;var parse_CFEx=parsenoop;var parse_AutoFilter12=parsenoop;var parse_ContinueFrt12=parsenoop;var parse_MDTInfo=parsenoop;var parse_MDXStr=parsenoop;var parse_MDXTuple=parsenoop;var parse_MDXSet=parsenoop;var parse_MDXProp=parsenoop;var parse_MDXKPI=parsenoop;var parse_MDB=parsenoop;var parse_PLV=parsenoop;var parse_DXF=parsenoop;var parse_TableStyles=parsenoop;var parse_TableStyle=parsenoop;var parse_TableStyleElement=parsenoop;var parse_NamePublish=parsenoop;var parse_NameCmt=parsenoop;var parse_SortData=parsenoop;var parse_GUIDTypeLib=parsenoop;var parse_FnGrp12=parsenoop;var parse_NameFnGrp12=parsenoop;var parse_HeaderFooter=parsenoop;var parse_CrtLayout12=parsenoop;var parse_CrtMlFrt=parsenoop;var parse_CrtMlFrtContinue=parsenoop;var parse_ShapePropsStream=parsenoop;var parse_TextPropsStream=parsenoop;var parse_RichTextStream=parsenoop;var parse_CrtLayout12A=parsenoop;var parse_Units=parsenoop;var parse_Chart=parsenoop;var parse_Series=parsenoop;var parse_DataFormat=parsenoop;var parse_LineFormat=parsenoop;var parse_MarkerFormat=parsenoop;var parse_AreaFormat=parsenoop;var parse_PieFormat=parsenoop;var parse_AttachedLabel=parsenoop;var parse_SeriesText=parsenoop;var parse_ChartFormat=parsenoop;var parse_Legend=parsenoop;var parse_SeriesList=parsenoop;var parse_Bar=parsenoop;var parse_Line=parsenoop;var parse_Pie=parsenoop;var parse_Area=parsenoop;var parse_Scatter=parsenoop;var parse_CrtLine=parsenoop;var parse_Axis=parsenoop;var parse_Tick=parsenoop;var parse_ValueRange=parsenoop;var parse_CatSerRange=parsenoop;var parse_AxisLine=parsenoop;var parse_CrtLink=parsenoop;var parse_DefaultText=parsenoop;var parse_Text=parsenoop;var parse_ObjectLink=parsenoop;var parse_Frame=parsenoop;var parse_Begin=parsenoop;var parse_End=parsenoop;var parse_PlotArea=parsenoop;var parse_Chart3d=parsenoop;var parse_PicF=parsenoop;var parse_DropBar=parsenoop;var parse_Radar=parsenoop;var parse_Surf=parsenoop;var parse_RadarArea=parsenoop;var parse_AxisParent=parsenoop;var parse_LegendException=parsenoop;var parse_ShtProps=parsenoop;var parse_SerToCrt=parsenoop;var parse_AxesUsed=parsenoop;var parse_SBaseRef=parsenoop;var parse_SerParent=parsenoop;var parse_SerAuxTrend=parsenoop;var parse_IFmtRecord=parsenoop;var parse_Pos=parsenoop;var parse_AlRuns=parsenoop;var parse_BRAI=parsenoop;var parse_SerAuxErrBar=parsenoop;var parse_SerFmt=parsenoop;var parse_Chart3DBarShape=parsenoop;var parse_Fbi=parsenoop;var parse_BopPop=parsenoop;var parse_AxcExt=parsenoop;var parse_Dat=parsenoop;var parse_PlotGrowth=parsenoop;var parse_SIIndex=parsenoop;var parse_GelFrame=parsenoop;var parse_BopPopCustom=parsenoop;var parse_Fbi2=parsenoop;function parse_BIFF5String(blob){var len=blob.read_shift(1);return blob.read_shift(len,\"sbcs-cont\")}function parse_BIFF2STR(blob,length,opts){var cell=parse_XLSCell(blob,6);++blob.l;var str=parse_XLUnicodeString2(blob,length-7,opts);cell.val=str;return cell}function parse_BIFF2NUM(blob,length,opts){var cell=parse_XLSCell(blob,6);++blob.l;var num=parse_Xnum(blob,8);cell.val=num;return cell}var CS2CP={0:1252,1:65001,2:65001,77:1e4,128:932,129:949,130:1361,134:936,136:950,161:1253,162:1254,163:1258,177:1255,178:1256,186:1257,204:1251,222:874,238:1250,255:1252,69:6969};var parse_rs=function parse_rs_factory(){var tregex=matchtag(\"t\"),rpregex=matchtag(\"rPr\"),rregex=/<r>/g,rend=/<\\/r>/,nlregex=/\\r\\n/g;var parse_rpr=function parse_rpr(rpr,intro,outro){var font={},cp=65001;var m=rpr.match(tagregex),i=0;if(m)for(;i!=m.length;++i){var y=parsexmltag(m[i]);switch(y[0]){case\"<condense\":break;case\"<extend\":break;case\"<shadow\":case\"<shadow/>\":break;case\"<charset\":if(y.val==\"1\")break;cp=CS2CP[parseInt(y.val,10)];break;case\"<outline\":case\"<outline/>\":break;case\"<rFont\":font.name=y.val;break;case\"<sz\":font.sz=y.val;break;case\"<strike\":if(!y.val)break;case\"<strike/>\":font.strike=1;break;case\"</strike>\":break;case\"<u\":if(!y.val)break;case\"<u/>\":font.u=1;break;case\"</u>\":break;case\"<b\":if(!y.val)break;case\"<b/>\":font.b=1;break;case\"</b>\":break;case\"<i\":if(!y.val)break;case\"<i/>\":font.i=1;break;case\"</i>\":break;case\"<color\":if(y.rgb)font.color=y.rgb.substr(2,6);break;case\"<family\":font.family=y.val;break;case\"<vertAlign\":break;case\"<scheme\":break;default:if(y[0].charCodeAt(1)!==47)throw\"Unrecognized rich format \"+y[0]}}var style=[];if(font.b)style.push(\"font-weight: bold;\");if(font.i)style.push(\"font-style: italic;\");intro.push('<span style=\"'+style.join(\"\")+'\">');outro.push(\"</span>\");return cp};function parse_r(r){var terms=[[],\"\",[]];var t=r.match(tregex),cp=65001;if(!isval(t))return\"\";terms[1]=t[1];var rpr=r.match(rpregex);if(isval(rpr))cp=parse_rpr(rpr[1],terms[0],terms[2]);return terms[0].join(\"\")+terms[1].replace(nlregex,\"<br/>\")+terms[2].join(\"\")}return function parse_rs(rs){return rs.replace(rregex,\"\").split(rend).map(parse_r).join(\"\")}}();var sitregex=/<t[^>]*>([^<]*)<\\/t>/g,sirregex=/<r>/;function parse_si(x,opts){var html=opts?opts.cellHTML:true;var z={};if(!x)return null;var y;if(x.charCodeAt(1)===116){z.t=utf8read(unescapexml(x.substr(x.indexOf(\">\")+1).split(/<\\/t>/)[0]));z.r=x;if(html)z.h=z.t}else if(y=x.match(sirregex)){z.r=x;z.t=utf8read(unescapexml(x.match(sitregex).join(\"\").replace(tagregex,\"\")));if(html)z.h=parse_rs(x)}return z}var sstr0=/<sst([^>]*)>([\\s\\S]*)<\\/sst>/;var sstr1=/<(?:si|sstItem)>/g;var sstr2=/<\\/(?:si|sstItem)>/;function parse_sst_xml(data,opts){var s=[],ss;var sst=data.match(sstr0);if(isval(sst)){ss=sst[2].replace(sstr1,\"\").split(sstr2);for(var i=0;i!=ss.length;++i){var o=parse_si(ss[i],opts);if(o!=null)s[s.length]=o}sst=parsexmltag(sst[1]);s.Count=sst.count;s.Unique=sst.uniqueCount}return s}RELS.SST=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings\";var straywsregex=/^\\s|\\s$|[\\t\\n\\r]/;function write_sst_xml(sst,opts){if(!opts.bookSST)return\"\";var o=[XML_HEADER];o[o.length]=writextag(\"sst\",null,{xmlns:XMLNS.main[0],count:sst.Count,uniqueCount:sst.Unique});for(var i=0;i!=sst.length;++i){if(sst[i]==null)continue;var s=sst[i];var sitag=\"<si>\";if(s.r)sitag+=s.r;else{sitag+=\"<t\";if(s.t.match(straywsregex))sitag+=' xml:space=\"preserve\"';sitag+=\">\"+escapexml(s.t)+\"</t>\"}sitag+=\"</si>\";o[o.length]=sitag}if(o.length>2){o[o.length]=\"</sst>\";o[1]=o[1].replace(\"/>\",\">\")}return o.join(\"\")}function parse_BrtBeginSst(data,length){return[data.read_shift(4),data.read_shift(4)]}function parse_sst_bin(data,opts){var s=[];var pass=false;recordhopper(data,function hopper_sst(val,R,RT){switch(R.n){case\"BrtBeginSst\":s.Count=val[0];s.Unique=val[1];break;case\"BrtSSTItem\":s.push(val);break;case\"BrtEndSst\":return true;case\"BrtFRTBegin\":pass=true;break;case\"BrtFRTEnd\":pass=false;break;default:if(!pass||opts.WTF)throw new Error(\"Unexpected record \"+RT+\" \"+R.n)}});return s}function write_BrtBeginSst(sst,o){if(!o)o=new_buf(8);o.write_shift(4,sst.Count);o.write_shift(4,sst.Unique);return o}var write_BrtSSTItem=write_RichStr;function write_sst_bin(sst,opts){var ba=buf_array();write_record(ba,\"BrtBeginSst\",write_BrtBeginSst(sst));for(var i=0;i<sst.length;++i)write_record(ba,\"BrtSSTItem\",write_BrtSSTItem(sst[i]));write_record(ba,\"BrtEndSst\");return ba.end()}function _JS2ANSI(str){if(typeof cptable!==\"undefined\")return cptable.utils.encode(1252,str);return str.split(\"\").map(function(x){return x.charCodeAt(0)})}function parse_Version(blob,length){var o={};o.Major=blob.read_shift(2);o.Minor=blob.read_shift(2);return o}function parse_EncryptionHeader(blob,length){var o={};o.Flags=blob.read_shift(4);var tmp=blob.read_shift(4);if(tmp!==0)throw\"Unrecognized SizeExtra: \"+tmp;o.AlgID=blob.read_shift(4);switch(o.AlgID){case 0:case 26625:case 26126:case 26127:case 26128:break;default:throw\"Unrecognized encryption algorithm: \"+o.AlgID}parsenoop(blob,length-12);return o}function parse_EncryptionVerifier(blob,length){return parsenoop(blob,length)}function parse_RC4CryptoHeader(blob,length){var o={};var vers=o.EncryptionVersionInfo=parse_Version(blob,4);length-=4;if(vers.Minor!=2)throw\"unrecognized minor version code: \"+vers.Minor;if(vers.Major>4||vers.Major<2)throw\"unrecognized major version code: \"+vers.Major;o.Flags=blob.read_shift(4);length-=4;var sz=blob.read_shift(4);length-=4;o.EncryptionHeader=parse_EncryptionHeader(blob,sz);length-=sz;o.EncryptionVerifier=parse_EncryptionVerifier(blob,length);return o}function parse_RC4Header(blob,length){var o={};var vers=o.EncryptionVersionInfo=parse_Version(blob,4);length-=4;if(vers.Major!=1||vers.Minor!=1)throw\"unrecognized version code \"+vers.Major+\" : \"+vers.Minor;o.Salt=blob.read_shift(16);o.EncryptedVerifier=blob.read_shift(16);o.EncryptedVerifierHash=blob.read_shift(16);return o}function crypto_CreatePasswordVerifier_Method1(Password){var Verifier=0,PasswordArray;var PasswordDecoded=_JS2ANSI(Password);var len=PasswordDecoded.length+1,i,PasswordByte;var Intermediate1,Intermediate2,Intermediate3;PasswordArray=new_raw_buf(len);PasswordArray[0]=PasswordDecoded.length;for(i=1;i!=len;++i)PasswordArray[i]=PasswordDecoded[i-1];for(i=len-1;i>=0;--i){PasswordByte=PasswordArray[i];Intermediate1=(Verifier&16384)===0?0:1;Intermediate2=Verifier<<1&32767;Intermediate3=Intermediate1|Intermediate2;Verifier=Intermediate3^PasswordByte}return Verifier^52811}var crypto_CreateXorArray_Method1=function(){var PadArray=[187,255,255,186,255,255,185,128,0,190,15,0,191,15,0];var InitialCode=[57840,7439,52380,33984,4364,3600,61902,12606,6258,57657,54287,34041,10252,43370,20163];var XorMatrix=[44796,19929,39858,10053,20106,40212,10761,31585,63170,64933,60267,50935,40399,11199,17763,35526,1453,2906,5812,11624,23248,885,1770,3540,7080,14160,28320,56640,55369,41139,20807,41614,21821,43642,17621,28485,56970,44341,19019,38038,14605,29210,60195,50791,40175,10751,21502,43004,24537,18387,36774,3949,7898,15796,31592,63184,47201,24803,49606,37805,14203,28406,56812,17824,35648,1697,3394,6788,13576,27152,43601,17539,35078,557,1114,2228,4456,30388,60776,51953,34243,7079,14158,28316,14128,28256,56512,43425,17251,34502,7597,13105,26210,52420,35241,883,1766,3532,4129,8258,16516,33032,4657,9314,18628];\r\nvar Ror=function(Byte){return(Byte/2|Byte*128)&255};var XorRor=function(byte1,byte2){return Ror(byte1^byte2)};var CreateXorKey_Method1=function(Password){var XorKey=InitialCode[Password.length-1];var CurrentElement=104;for(var i=Password.length-1;i>=0;--i){var Char=Password[i];for(var j=0;j!=7;++j){if(Char&64)XorKey^=XorMatrix[CurrentElement];Char*=2;--CurrentElement}}return XorKey};return function(password){var Password=_JS2ANSI(password);var XorKey=CreateXorKey_Method1(Password);var Index=Password.length;var ObfuscationArray=new_raw_buf(16);for(var i=0;i!=16;++i)ObfuscationArray[i]=0;var Temp,PasswordLastChar,PadIndex;if((Index&1)===1){Temp=XorKey>>8;ObfuscationArray[Index]=XorRor(PadArray[0],Temp);--Index;Temp=XorKey&255;PasswordLastChar=Password[Password.length-1];ObfuscationArray[Index]=XorRor(PasswordLastChar,Temp)}while(Index>0){--Index;Temp=XorKey>>8;ObfuscationArray[Index]=XorRor(Password[Index],Temp);--Index;Temp=XorKey&255;ObfuscationArray[Index]=XorRor(Password[Index],Temp)}Index=15;PadIndex=15-Password.length;while(PadIndex>0){Temp=XorKey>>8;ObfuscationArray[Index]=XorRor(PadArray[PadIndex],Temp);--Index;--PadIndex;Temp=XorKey&255;ObfuscationArray[Index]=XorRor(Password[Index],Temp);--Index;--PadIndex}return ObfuscationArray}}();var crypto_DecryptData_Method1=function(password,Data,XorArrayIndex,XorArray,O){if(!O)O=Data;if(!XorArray)XorArray=crypto_CreateXorArray_Method1(password);var Index,Value;for(Index=0;Index!=Data.length;++Index){Value=Data[Index];Value^=XorArray[XorArrayIndex];Value=(Value>>5|Value<<3)&255;O[Index]=Value;++XorArrayIndex}return[O,XorArrayIndex,XorArray]};var crypto_MakeXorDecryptor=function(password){var XorArrayIndex=0,XorArray=crypto_CreateXorArray_Method1(password);return function(Data){var O=crypto_DecryptData_Method1(null,Data,XorArrayIndex,XorArray);XorArrayIndex=O[1];return O[0]}};function parse_XORObfuscation(blob,length,opts,out){var o={key:parseuint16(blob),verificationBytes:parseuint16(blob)};if(opts.password)o.verifier=crypto_CreatePasswordVerifier_Method1(opts.password);out.valid=o.verificationBytes===o.verifier;if(out.valid)out.insitu_decrypt=crypto_MakeXorDecryptor(opts.password);return o}function parse_FilePassHeader(blob,length,oo){var o=oo||{};o.Info=blob.read_shift(2);blob.l-=2;if(o.Info===1)o.Data=parse_RC4Header(blob,length);else o.Data=parse_RC4CryptoHeader(blob,length);return o}function parse_FilePass(blob,length,opts){var o={Type:blob.read_shift(2)};if(o.Type)parse_FilePassHeader(blob,length-2,o);else parse_XORObfuscation(blob,length-2,opts,o);return o}function hex2RGB(h){var o=h.substr(h[0]===\"#\"?1:0,6);return[parseInt(o.substr(0,2),16),parseInt(o.substr(2,2),16),parseInt(o.substr(4,2),16)]}function rgb2Hex(rgb){for(var i=0,o=1;i!=3;++i)o=o*256+(rgb[i]>255?255:rgb[i]<0?0:rgb[i]);return o.toString(16).toUpperCase().substr(1)}function rgb2HSL(rgb){var R=rgb[0]/255,G=rgb[1]/255,B=rgb[2]/255;var M=Math.max(R,G,B),m=Math.min(R,G,B),C=M-m;if(C===0)return[0,0,R];var H6=0,S=0,L2=M+m;S=C/(L2>1?2-L2:L2);switch(M){case R:H6=((G-B)/C+6)%6;break;case G:H6=(B-R)/C+2;break;case B:H6=(R-G)/C+4;break}return[H6/6,S,L2/2]}function hsl2RGB(hsl){var H=hsl[0],S=hsl[1],L=hsl[2];var C=S*2*(L<.5?L:1-L),m=L-C/2;var rgb=[m,m,m],h6=6*H;var X;if(S!==0)switch(h6|0){case 0:case 6:X=C*h6;rgb[0]+=C;rgb[1]+=X;break;case 1:X=C*(2-h6);rgb[0]+=X;rgb[1]+=C;break;case 2:X=C*(h6-2);rgb[1]+=C;rgb[2]+=X;break;case 3:X=C*(4-h6);rgb[1]+=X;rgb[2]+=C;break;case 4:X=C*(h6-4);rgb[2]+=C;rgb[0]+=X;break;case 5:X=C*(6-h6);rgb[2]+=X;rgb[0]+=C;break}for(var i=0;i!=3;++i)rgb[i]=Math.round(rgb[i]*255);return rgb}function rgb_tint(hex,tint){if(tint==0)return hex;var hsl=rgb2HSL(hex2RGB(hex));if(tint<0)hsl[2]=hsl[2]*(1+tint);else hsl[2]=1-(1-hsl[2])*(1-tint);var rev=rgb2Hex(hsl2RGB(hsl));return rev}var DEF_MDW=7,MAX_MDW=15,MIN_MDW=1,MDW=DEF_MDW;function width2px(width){return(width+(128/MDW|0)/256)*MDW|0}function px2char(px){return((px-5)/MDW*100+.5|0)/100}function char2width(chr){return((chr*MDW+5)/MDW*256|0)/256}function cycle_width(collw){return char2width(px2char(width2px(collw)))}function find_mdw(collw,coll){if(cycle_width(collw)!=collw){for(MDW=DEF_MDW;MDW>MIN_MDW;--MDW)if(cycle_width(collw)===collw)break;if(MDW===MIN_MDW)for(MDW=DEF_MDW+1;MDW<MAX_MDW;++MDW)if(cycle_width(collw)===collw)break;if(MDW===MAX_MDW)MDW=DEF_MDW}}var XLMLPatternTypeMap={None:\"none\",Solid:\"solid\",Gray50:\"mediumGray\",Gray75:\"darkGray\",Gray25:\"lightGray\",HorzStripe:\"darkHorizontal\",VertStripe:\"darkVertical\",ReverseDiagStripe:\"darkDown\",DiagStripe:\"darkUp\",DiagCross:\"darkGrid\",ThickDiagCross:\"darkTrellis\",ThinHorzStripe:\"lightHorizontal\",ThinVertStripe:\"lightVertical\",ThinReverseDiagStripe:\"lightDown\",ThinHorzCross:\"lightGrid\"};var styles={};var themes={};function parse_fills(t,opts){styles.Fills=[];var fill={};t[0].match(tagregex).forEach(function(x){var y=parsexmltag(x);switch(y[0]){case\"<fills\":case\"<fills>\":case\"</fills>\":break;case\"<fill>\":break;case\"</fill>\":styles.Fills.push(fill);fill={};break;case\"<patternFill\":if(y.patternType)fill.patternType=y.patternType;break;case\"<patternFill/>\":case\"</patternFill>\":break;case\"<bgColor\":if(!fill.bgColor)fill.bgColor={};if(y.indexed)fill.bgColor.indexed=parseInt(y.indexed,10);if(y.theme)fill.bgColor.theme=parseInt(y.theme,10);if(y.tint)fill.bgColor.tint=parseFloat(y.tint);if(y.theme&&themes.themeElements&&themes.themeElements.clrScheme){fill.bgColor.rgb=rgb_tint(themes.themeElements.clrScheme[fill.bgColor.theme].rgb,fill.bgColor.tint||0);if(opts.WTF)fill.bgColor.raw_rgb=rgb_tint(themes.themeElements.clrScheme[fill.bgColor.theme].rgb,0)}if(y.rgb)fill.bgColor.rgb=y.rgb;break;case\"<bgColor/>\":case\"</bgColor>\":break;case\"<fgColor\":if(!fill.fgColor)fill.fgColor={};if(y.theme)fill.fgColor.theme=parseInt(y.theme,10);if(y.tint)fill.fgColor.tint=parseFloat(y.tint);if(y.theme&&themes.themeElements&&themes.themeElements.clrScheme){fill.fgColor.rgb=rgb_tint(themes.themeElements.clrScheme[fill.fgColor.theme].rgb,fill.fgColor.tint||0);if(opts.WTF)fill.fgColor.raw_rgb=rgb_tint(themes.themeElements.clrScheme[fill.fgColor.theme].rgb,0)}if(y.rgb)fill.fgColor.rgb=y.rgb;break;case\"<fgColor/>\":case\"</fgColor>\":break;default:if(opts.WTF)throw\"unrecognized \"+y[0]+\" in fills\"}})}function parse_fonts(t,opts){styles.Fonts=[];var font={};t[0].match(tagregex).forEach(function(x){var y=parsexmltag(x);switch(y[0]){case\"<fonts\":case\"<fonts>\":case\"</fonts>\":break;case\"<font\":break;case\"</font>\":styles.Fonts.push(font);font={};break;case\"<name\":if(y.val)font.name=y.val;break;case\"<name/>\":case\"</name>\":break;case\"<b/>\":font.bold=true;break;case\"<u/>\":font.underline=true;break;case\"<i/>\":font.italic=true;break;case\"<strike/>\":font.strike=true;break;case\"<outline/>\":font.outline=true;break;case\"<shadow/>\":font.shadow=true;break;case\"<sz\":if(y.val)font.sz=y.val;break;case\"<sz/>\":case\"</sz>\":break;case\"<vertAlign\":if(y.val)font.vertAlign=y.val;break;case\"<vertAlign/>\":case\"</vertAlign>\":break;case\"<color\":if(!font.color)font.color={};if(y.theme)font.color.theme=y.theme;if(y.tint)font.color.tint=y.tint;if(y.theme&&themes.themeElements&&themes.themeElements.clrScheme){font.color.rgb=rgb_tint(themes.themeElements.clrScheme[font.color.theme].rgb,font.color.tint||0)}if(y.rgb)font.color.rgb=y.rgb;break;case\"<color/>\":case\"</color>\":break}})}function parse_borders(t,opts){styles.Borders=[];var border={},sub_border={};t[0].match(tagregex).forEach(function(x){var y=parsexmltag(x);switch(y[0]){case\"<borders\":case\"<borders>\":case\"</borders>\":break;case\"<border\":case\"<border>\":border={};if(y.diagonalUp){border.diagonalUp=y.diagonalUp}if(y.diagonalDown){border.diagonalDown=y.diagonalDown}styles.Borders.push(border);break;break;case\"</border>\":break;case\"<left\":sub_border=border.left={};if(y.style){sub_border.style=y.style}break;case\"<right\":sub_border=border.right={};if(y.style){sub_border.style=y.style}break;case\"<top\":sub_border=border.top={};if(y.style){sub_border.style=y.style}break;case\"<bottom\":sub_border=border.bottom={};if(y.style){sub_border.style=y.style}break;case\"<diagonal\":sub_border=border.diagonal={};if(y.style){sub_border.style=y.style}break;case\"<color\":sub_border.color={};if(y.theme)sub_border.color.theme=y.theme;if(y.theme&&themes.themeElements&&themes.themeElements.clrScheme){sub_border.color.rgb=rgb_tint(themes.themeElements.clrScheme[sub_border.color.theme].rgb,sub_border.color.tint||0)}if(y.tint)sub_border.color.tint=y.tint;if(y.rgb)sub_border.color.rgb=y.rgb;if(y.auto)sub_border.color.auto=y.auto;break;case\"<name/>\":case\"</name>\":break;default:break}})}function parse_numFmts(t,opts){styles.NumberFmt=[];var k=keys(SSF._table);for(var i=0;i<k.length;++i)styles.NumberFmt[k[i]]=SSF._table[k[i]];var m=t[0].match(tagregex);for(i=0;i<m.length;++i){var y=parsexmltag(m[i]);switch(y[0]){case\"<numFmts\":case\"</numFmts>\":case\"<numFmts/>\":case\"<numFmts>\":break;case\"<numFmt\":{var f=unescapexml(utf8read(y.formatCode)),j=parseInt(y.numFmtId,10);styles.NumberFmt[j]=f;if(j>0)SSF.load(f,j)}break;default:if(opts.WTF)throw\"unrecognized \"+y[0]+\" in numFmts\"}}}function write_numFmts(NF,opts){var o=[\"<numFmts>\"];[[5,8],[23,26],[41,44],[63,66],[164,392]].forEach(function(r){for(var i=r[0];i<=r[1];++i)if(NF[i]!==undefined)o[o.length]=writextag(\"numFmt\",null,{numFmtId:i,formatCode:escapexml(NF[i])})});if(o.length===1)return\"\";o[o.length]=\"</numFmts>\";o[0]=writextag(\"numFmts\",null,{count:o.length-2}).replace(\"/>\",\">\");return o.join(\"\")}function parse_cellXfs(t,opts){styles.CellXf=[];var xf;t[0].match(tagregex).forEach(function(x){var y=parsexmltag(x);switch(y[0]){case\"<cellXfs\":case\"<cellXfs>\":case\"<cellXfs/>\":case\"</cellXfs>\":break;case\"<xf\":xf=y;delete xf[0];delete y[0];if(xf.numFmtId)xf.numFmtId=parseInt(xf.numFmtId,10);if(xf.fillId)xf.fillId=parseInt(xf.fillId,10);styles.CellXf.push(xf);break;case\"</xf>\":break;case\"<alignment\":case\"<alignment/>\":var alignment={};if(y.vertical){alignment.vertical=y.vertical}if(y.horizontal){alignment.horizontal=y.horizontal}if(y.textRotation!=undefined){alignment.textRotation=y.textRotation}if(y.indent){alignment.indent=y.indent}if(y.wrapText){alignment.wrapText=y.wrapText}xf.alignment=alignment;break;case\"<protection\":case\"</protection>\":case\"<protection/>\":break;case\"<extLst\":case\"</extLst>\":break;case\"<ext\":break;default:if(opts.WTF)throw\"unrecognized \"+y[0]+\" in cellXfs\"}})}function write_cellXfs(cellXfs){var o=[];o[o.length]=writextag(\"cellXfs\",null);cellXfs.forEach(function(c){o[o.length]=writextag(\"xf\",null,c)});o[o.length]=\"</cellXfs>\";if(o.length===2)return\"\";o[0]=writextag(\"cellXfs\",null,{count:o.length-2}).replace(\"/>\",\">\");return o.join(\"\")}var parse_sty_xml=function make_pstyx(){var numFmtRegex=/<numFmts([^>]*)>.*<\\/numFmts>/;var cellXfRegex=/<cellXfs([^>]*)>.*<\\/cellXfs>/;var fillsRegex=/<fills([^>]*)>.*<\\/fills>/;var bordersRegex=/<borders([^>]*)>.*<\\/borders>/;return function parse_sty_xml(data,opts){var t;if(t=data.match(numFmtRegex))parse_numFmts(t,opts);if(t=data.match(/<fonts([^>]*)>.*<\\/fonts>/))parse_fonts(t,opts);if(t=data.match(fillsRegex))parse_fills(t,opts);if(t=data.match(bordersRegex))parse_borders(t,opts);if(t=data.match(cellXfRegex))parse_cellXfs(t,opts);return styles}}();var STYLES_XML_ROOT=writextag(\"styleSheet\",null,{xmlns:XMLNS.main[0],\"xmlns:vt\":XMLNS.vt});RELS.STY=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles\";function write_sty_xml(wb,opts){if(typeof style_builder!=\"undefined\"&&typeof\"require\"!=\"undefined\"){return style_builder.toXml()}var o=[XML_HEADER,STYLES_XML_ROOT],w;if((w=write_numFmts(wb.SSF))!=null)o[o.length]=w;o[o.length]='<fonts count=\"1\"><font><sz val=\"12\"/><color theme=\"1\"/><name val=\"Calibri\"/><family val=\"2\"/><scheme val=\"minor\"/></font></fonts>';o[o.length]='<fills count=\"2\"><fill><patternFill patternType=\"none\"/></fill><fill><patternFill patternType=\"gray125\"/></fill></fills>';o[o.length]='<borders count=\"1\"><border><left/><right/><top/><bottom/><diagonal/></border></borders>';o[o.length]='<cellStyleXfs count=\"1\"><xf numFmtId=\"0\" fontId=\"0\" fillId=\"0\" borderId=\"0\"/></cellStyleXfs>';if(w=write_cellXfs(opts.cellXfs))o[o.length]=w;o[o.length]='<cellStyles count=\"1\"><cellStyle name=\"Normal\" xfId=\"0\" builtinId=\"0\"/></cellStyles>';o[o.length]='<dxfs count=\"0\"/>';o[o.length]='<tableStyles count=\"0\" defaultTableStyle=\"TableStyleMedium9\" defaultPivotStyle=\"PivotStyleMedium4\"/>';if(o.length>2){o[o.length]=\"</styleSheet>\";o[1]=o[1].replace(\"/>\",\">\")}return o.join(\"\")}function parse_BrtFmt(data,length){var ifmt=data.read_shift(2);var stFmtCode=parse_XLWideString(data,length-2);return[ifmt,stFmtCode]}function parse_BrtFont(data,length){var out={flags:{}};out.dyHeight=data.read_shift(2);out.grbit=parse_FontFlags(data,2);out.bls=data.read_shift(2);out.sss=data.read_shift(2);out.uls=data.read_shift(1);out.bFamily=data.read_shift(1);out.bCharSet=data.read_shift(1);data.l++;out.brtColor=parse_BrtColor(data,8);out.bFontScheme=data.read_shift(1);out.name=parse_XLWideString(data,length-21);out.flags.Bold=out.bls===700;out.flags.Italic=out.grbit.fItalic;out.flags.Strikeout=out.grbit.fStrikeout;out.flags.Outline=out.grbit.fOutline;out.flags.Shadow=out.grbit.fShadow;out.flags.Condense=out.grbit.fCondense;out.flags.Extend=out.grbit.fExtend;out.flags.Sub=out.sss&2;out.flags.Sup=out.sss&1;return out}function parse_BrtXF(data,length){var ixfeParent=data.read_shift(2);var ifmt=data.read_shift(2);parsenoop(data,length-4);return{ixfe:ixfeParent,ifmt:ifmt}}function parse_sty_bin(data,opts){styles.NumberFmt=[];for(var y in SSF._table)styles.NumberFmt[y]=SSF._table[y];styles.CellXf=[];var state=\"\";var pass=false;recordhopper(data,function hopper_sty(val,R,RT){switch(R.n){case\"BrtFmt\":styles.NumberFmt[val[0]]=val[1];SSF.load(val[1],val[0]);break;case\"BrtFont\":break;case\"BrtKnownFonts\":break;case\"BrtFill\":break;case\"BrtBorder\":break;case\"BrtXF\":if(state===\"CELLXFS\"){styles.CellXf.push(val)}break;case\"BrtStyle\":break;case\"BrtDXF\":break;case\"BrtMRUColor\":break;case\"BrtIndexedColor\":break;case\"BrtBeginStyleSheet\":break;case\"BrtEndStyleSheet\":break;case\"BrtBeginTableStyle\":break;case\"BrtTableStyleElement\":break;case\"BrtEndTableStyle\":break;case\"BrtBeginFmts\":state=\"FMTS\";break;case\"BrtEndFmts\":state=\"\";break;case\"BrtBeginFonts\":state=\"FONTS\";break;case\"BrtEndFonts\":state=\"\";break;case\"BrtACBegin\":state=\"ACFONTS\";break;case\"BrtACEnd\":state=\"\";break;case\"BrtBeginFills\":state=\"FILLS\";break;case\"BrtEndFills\":state=\"\";break;case\"BrtBeginBorders\":state=\"BORDERS\";break;case\"BrtEndBorders\":state=\"\";break;case\"BrtBeginCellStyleXFs\":state=\"CELLSTYLEXFS\";break;case\"BrtEndCellStyleXFs\":state=\"\";break;case\"BrtBeginCellXFs\":state=\"CELLXFS\";break;case\"BrtEndCellXFs\":state=\"\";break;case\"BrtBeginStyles\":state=\"STYLES\";break;case\"BrtEndStyles\":state=\"\";break;case\"BrtBeginDXFs\":state=\"DXFS\";break;case\"BrtEndDXFs\":state=\"\";break;case\"BrtBeginTableStyles\":state=\"TABLESTYLES\";break;case\"BrtEndTableStyles\":state=\"\";break;case\"BrtBeginColorPalette\":state=\"COLORPALETTE\";break;case\"BrtEndColorPalette\":state=\"\";break;case\"BrtBeginIndexedColors\":state=\"INDEXEDCOLORS\";break;case\"BrtEndIndexedColors\":state=\"\";break;case\"BrtBeginMRUColors\":state=\"MRUCOLORS\";break;case\"BrtEndMRUColors\":state=\"\";break;case\"BrtFRTBegin\":pass=true;break;case\"BrtFRTEnd\":pass=false;break;case\"BrtBeginStyleSheetExt14\":break;case\"BrtBeginSlicerStyles\":break;case\"BrtEndSlicerStyles\":break;case\"BrtBeginTimelineStylesheetExt15\":break;case\"BrtEndTimelineStylesheetExt15\":break;case\"BrtBeginTimelineStyles\":break;case\"BrtEndTimelineStyles\":break;case\"BrtEndStyleSheetExt14\":break;default:if(!pass||opts.WTF)throw new Error(\"Unexpected record \"+RT+\" \"+R.n)}});return styles}function write_sty_bin(data,opts){var ba=buf_array();write_record(ba,\"BrtBeginStyleSheet\");write_record(ba,\"BrtEndStyleSheet\");return ba.end()}RELS.THEME=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme\";function parse_clrScheme(t,opts){themes.themeElements.clrScheme=[];var color={};t[0].match(tagregex).forEach(function(x){var y=parsexmltag(x);switch(y[0]){case\"<a:clrScheme\":case\"</a:clrScheme>\":break;case\"<a:srgbClr\":color.rgb=y.val;break;case\"<a:sysClr\":color.rgb=y.lastClr;break;case\"<a:dk1>\":case\"</a:dk1>\":case\"<a:dk2>\":case\"</a:dk2>\":case\"<a:lt1>\":case\"</a:lt1>\":case\"<a:lt2>\":case\"</a:lt2>\":case\"<a:accent1>\":case\"</a:accent1>\":case\"<a:accent2>\":case\"</a:accent2>\":case\"<a:accent3>\":case\"</a:accent3>\":case\"<a:accent4>\":case\"</a:accent4>\":case\"<a:accent5>\":case\"</a:accent5>\":case\"<a:accent6>\":case\"</a:accent6>\":case\"<a:hlink>\":case\"</a:hlink>\":case\"<a:folHlink>\":case\"</a:folHlink>\":if(y[0][1]===\"/\"){themes.themeElements.clrScheme.push(color);color={}}else{color.name=y[0].substring(3,y[0].length-1)}break;default:if(opts.WTF)throw\"unrecognized \"+y[0]+\" in clrScheme\"}})}function parse_fontScheme(t,opts){}function parse_fmtScheme(t,opts){}var clrsregex=/<a:clrScheme([^>]*)>[^\\u2603]*<\\/a:clrScheme>/;var fntsregex=/<a:fontScheme([^>]*)>[^\\u2603]*<\\/a:fontScheme>/;var fmtsregex=/<a:fmtScheme([^>]*)>[^\\u2603]*<\\/a:fmtScheme>/;function parse_themeElements(data,opts){themes.themeElements={};var t;[[\"clrScheme\",clrsregex,parse_clrScheme],[\"fontScheme\",fntsregex,parse_fontScheme],[\"fmtScheme\",fmtsregex,parse_fmtScheme]].forEach(function(m){if(!(t=data.match(m[1])))throw m[0]+\" not found in themeElements\";m[2](t,opts)})}var themeltregex=/<a:themeElements([^>]*)>[^\\u2603]*<\\/a:themeElements>/;function parse_theme_xml(data,opts){if(!data||data.length===0)return themes;var t;if(!(t=data.match(themeltregex)))throw\"themeElements not found in theme\";parse_themeElements(t[0],opts);return themes}function write_theme(opts){if(opts.themeXml){return opts.themeXml}return'<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\\n<a:theme xmlns:a=\"http://schemas.openxmlformats.org/drawingml/2006/main\" name=\"Office Theme\"><a:themeElements><a:clrScheme name=\"Office\"><a:dk1><a:sysClr val=\"windowText\" lastClr=\"000000\"/></a:dk1><a:lt1><a:sysClr val=\"window\" lastClr=\"FFFFFF\"/></a:lt1><a:dk2><a:srgbClr val=\"1F497D\"/></a:dk2><a:lt2><a:srgbClr val=\"EEECE1\"/></a:lt2><a:accent1><a:srgbClr val=\"4F81BD\"/></a:accent1><a:accent2><a:srgbClr val=\"C0504D\"/></a:accent2><a:accent3><a:srgbClr val=\"9BBB59\"/></a:accent3><a:accent4><a:srgbClr val=\"8064A2\"/></a:accent4><a:accent5><a:srgbClr val=\"4BACC6\"/></a:accent5><a:accent6><a:srgbClr val=\"F79646\"/></a:accent6><a:hlink><a:srgbClr val=\"0000FF\"/></a:hlink><a:folHlink><a:srgbClr val=\"800080\"/></a:folHlink></a:clrScheme><a:fontScheme name=\"Office\"><a:majorFont><a:latin typeface=\"Cambria\"/><a:ea typeface=\"\"/><a:cs typeface=\"\"/><a:font script=\"Jpan\" typeface=\"MS Pゴシック\"/><a:font script=\"Hang\" typeface=\"맑은 고딕\"/><a:font script=\"Hans\" typeface=\"宋体\"/><a:font script=\"Hant\" typeface=\"新細明體\"/><a:font script=\"Arab\" typeface=\"Times New Roman\"/><a:font script=\"Hebr\" typeface=\"Times New Roman\"/><a:font script=\"Thai\" typeface=\"Tahoma\"/><a:font script=\"Ethi\" typeface=\"Nyala\"/><a:font script=\"Beng\" typeface=\"Vrinda\"/><a:font script=\"Gujr\" typeface=\"Shruti\"/><a:font script=\"Khmr\" typeface=\"MoolBoran\"/><a:font script=\"Knda\" typeface=\"Tunga\"/><a:font script=\"Guru\" typeface=\"Raavi\"/><a:font script=\"Cans\" typeface=\"Euphemia\"/><a:font script=\"Cher\" typeface=\"Plantagenet Cherokee\"/><a:font script=\"Yiii\" typeface=\"Microsoft Yi Baiti\"/><a:font script=\"Tibt\" typeface=\"Microsoft Himalaya\"/><a:font script=\"Thaa\" typeface=\"MV Boli\"/><a:font script=\"Deva\" typeface=\"Mangal\"/><a:font script=\"Telu\" typeface=\"Gautami\"/><a:font script=\"Taml\" typeface=\"Latha\"/><a:font script=\"Syrc\" typeface=\"Estrangelo Edessa\"/><a:font script=\"Orya\" typeface=\"Kalinga\"/><a:font script=\"Mlym\" typeface=\"Kartika\"/><a:font script=\"Laoo\" typeface=\"DokChampa\"/><a:font script=\"Sinh\" typeface=\"Iskoola Pota\"/><a:font script=\"Mong\" typeface=\"Mongolian Baiti\"/><a:font script=\"Viet\" typeface=\"Times New Roman\"/><a:font script=\"Uigh\" typeface=\"Microsoft Uighur\"/><a:font script=\"Geor\" typeface=\"Sylfaen\"/></a:majorFont><a:minorFont><a:latin typeface=\"Calibri\"/><a:ea typeface=\"\"/><a:cs typeface=\"\"/><a:font script=\"Jpan\" typeface=\"MS Pゴシック\"/><a:font script=\"Hang\" typeface=\"맑은 고딕\"/><a:font script=\"Hans\" typeface=\"宋体\"/><a:font script=\"Hant\" typeface=\"新細明體\"/><a:font script=\"Arab\" typeface=\"Arial\"/><a:font script=\"Hebr\" typeface=\"Arial\"/><a:font script=\"Thai\" typeface=\"Tahoma\"/><a:font script=\"Ethi\" typeface=\"Nyala\"/><a:font script=\"Beng\" typeface=\"Vrinda\"/><a:font script=\"Gujr\" typeface=\"Shruti\"/><a:font script=\"Khmr\" typeface=\"DaunPenh\"/><a:font script=\"Knda\" typeface=\"Tunga\"/><a:font script=\"Guru\" typeface=\"Raavi\"/><a:font script=\"Cans\" typeface=\"Euphemia\"/><a:font script=\"Cher\" typeface=\"Plantagenet Cherokee\"/><a:font script=\"Yiii\" typeface=\"Microsoft Yi Baiti\"/><a:font script=\"Tibt\" typeface=\"Microsoft Himalaya\"/><a:font script=\"Thaa\" typeface=\"MV Boli\"/><a:font script=\"Deva\" typeface=\"Mangal\"/><a:font script=\"Telu\" typeface=\"Gautami\"/><a:font script=\"Taml\" typeface=\"Latha\"/><a:font script=\"Syrc\" typeface=\"Estrangelo Edessa\"/><a:font script=\"Orya\" typeface=\"Kalinga\"/><a:font script=\"Mlym\" typeface=\"Kartika\"/><a:font script=\"Laoo\" typeface=\"DokChampa\"/><a:font script=\"Sinh\" typeface=\"Iskoola Pota\"/><a:font script=\"Mong\" typeface=\"Mongolian Baiti\"/><a:font script=\"Viet\" typeface=\"Arial\"/><a:font script=\"Uigh\" typeface=\"Microsoft Uighur\"/><a:font script=\"Geor\" typeface=\"Sylfaen\"/></a:minorFont></a:fontScheme><a:fmtScheme name=\"Office\"><a:fillStyleLst><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"50000\"/><a:satMod val=\"300000\"/></a:schemeClr></a:gs><a:gs pos=\"35000\"><a:schemeClr val=\"phClr\"><a:tint val=\"37000\"/><a:satMod val=\"300000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:tint val=\"15000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs></a:gsLst><a:lin ang=\"16200000\" scaled=\"1\"/></a:gradFill><a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"100000\"/><a:shade val=\"100000\"/><a:satMod val=\"130000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:tint val=\"50000\"/><a:shade val=\"100000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs></a:gsLst><a:lin ang=\"16200000\" scaled=\"0\"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w=\"9525\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"><a:shade val=\"95000\"/><a:satMod val=\"105000\"/></a:schemeClr></a:solidFill><a:prstDash val=\"solid\"/></a:ln><a:ln w=\"25400\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/></a:ln><a:ln w=\"38100\" cap=\"flat\" cmpd=\"sng\" algn=\"ctr\"><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:prstDash val=\"solid\"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst><a:outerShdw blurRad=\"40000\" dist=\"20000\" dir=\"5400000\" rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"38000\"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad=\"40000\" dist=\"23000\" dir=\"5400000\" rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"35000\"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad=\"40000\" dist=\"23000\" dir=\"5400000\" rotWithShape=\"0\"><a:srgbClr val=\"000000\"><a:alpha val=\"35000\"/></a:srgbClr></a:outerShdw></a:effectLst><a:scene3d><a:camera prst=\"orthographicFront\"><a:rot lat=\"0\" lon=\"0\" rev=\"0\"/></a:camera><a:lightRig rig=\"threePt\" dir=\"t\"><a:rot lat=\"0\" lon=\"0\" rev=\"1200000\"/></a:lightRig></a:scene3d><a:sp3d><a:bevelT w=\"63500\" h=\"25400\"/></a:sp3d></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val=\"phClr\"/></a:solidFill><a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"40000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs><a:gs pos=\"40000\"><a:schemeClr val=\"phClr\"><a:tint val=\"45000\"/><a:shade val=\"99000\"/><a:satMod val=\"350000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:shade val=\"20000\"/><a:satMod val=\"255000\"/></a:schemeClr></a:gs></a:gsLst><a:path path=\"circle\"><a:fillToRect l=\"50000\" t=\"-80000\" r=\"50000\" b=\"180000\"/></a:path></a:gradFill><a:gradFill rotWithShape=\"1\"><a:gsLst><a:gs pos=\"0\"><a:schemeClr val=\"phClr\"><a:tint val=\"80000\"/><a:satMod val=\"300000\"/></a:schemeClr></a:gs><a:gs pos=\"100000\"><a:schemeClr val=\"phClr\"><a:shade val=\"30000\"/><a:satMod val=\"200000\"/></a:schemeClr></a:gs></a:gsLst><a:path path=\"circle\"><a:fillToRect l=\"50000\" t=\"50000\" r=\"50000\" b=\"50000\"/></a:path></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults><a:spDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx=\"1\"><a:schemeClr val=\"accent1\"/></a:lnRef><a:fillRef idx=\"3\"><a:schemeClr val=\"accent1\"/></a:fillRef><a:effectRef idx=\"2\"><a:schemeClr val=\"accent1\"/></a:effectRef><a:fontRef idx=\"minor\"><a:schemeClr val=\"lt1\"/></a:fontRef></a:style></a:spDef><a:lnDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx=\"2\"><a:schemeClr val=\"accent1\"/></a:lnRef><a:fillRef idx=\"0\"><a:schemeClr val=\"accent1\"/></a:fillRef><a:effectRef idx=\"1\"><a:schemeClr val=\"accent1\"/></a:effectRef><a:fontRef idx=\"minor\"><a:schemeClr val=\"tx1\"/></a:fontRef></a:style></a:lnDef></a:objectDefaults><a:extraClrSchemeLst/></a:theme>'}function parse_Theme(blob,length){var dwThemeVersion=blob.read_shift(4);if(dwThemeVersion===124226)return;blob.l+=length-4}function parse_ColorTheme(blob,length){return blob.read_shift(4)}function parse_FullColorExt(blob,length){var o={};o.xclrType=blob.read_shift(2);o.nTintShade=blob.read_shift(2);switch(o.xclrType){case 0:blob.l+=4;break;case 1:o.xclrValue=parse_IcvXF(blob,4);break;case 2:o.xclrValue=parse_LongRGBA(blob,4);break;case 3:o.xclrValue=parse_ColorTheme(blob,4);break;case 4:blob.l+=4;break}blob.l+=8;return o}function parse_IcvXF(blob,length){return parsenoop(blob,length)}function parse_XFExtGradient(blob,length){return parsenoop(blob,length)}function parse_ExtProp(blob,length){var extType=blob.read_shift(2);var cb=blob.read_shift(2);var o=[extType];switch(extType){case 4:case 5:case 7:case 8:case 9:case 10:case 11:case 13:o[1]=parse_FullColorExt(blob,cb);break;case 6:o[1]=parse_XFExtGradient(blob,cb);break;case 14:case 15:o[1]=blob.read_shift(cb===5?1:2);break;default:throw new Error(\"Unrecognized ExtProp type: \"+extType+\" \"+cb)}return o}function parse_XFExt(blob,length){var end=blob.l+length;blob.l+=2;var ixfe=blob.read_shift(2);blob.l+=2;var cexts=blob.read_shift(2);var ext=[];while(cexts-->0)ext.push(parse_ExtProp(blob,end-blob.l));return{ixfe:ixfe,ext:ext}}function update_xfext(xf,xfext){xfext.forEach(function(xfe){switch(xfe[0]){case 4:break;case 5:break;case 7:case 8:case 9:case 10:break;case 13:break;case 14:break;default:throw\"bafuq\"+xfe[0].toString(16)}})}function parse_cc_xml(data,opts){var d=[];var l=0,i=1;(data.match(tagregex)||[]).forEach(function(x){var y=parsexmltag(x);switch(y[0]){case\"<?xml\":break;case\"<calcChain\":case\"<calcChain>\":case\"</calcChain>\":break;case\"<c\":delete y[0];if(y.i)i=y.i;else y.i=i;d.push(y);break}});return d}function write_cc_xml(data,opts){}function parse_BrtCalcChainItem$(data,length){var out={};out.i=data.read_shift(4);var cell={};cell.r=data.read_shift(4);cell.c=data.read_shift(4);out.r=encode_cell(cell);var flags=data.read_shift(1);if(flags&2)out.l=\"1\";if(flags&8)out.a=\"1\";return out}function parse_cc_bin(data,opts){var out=[];var pass=false;recordhopper(data,function hopper_cc(val,R,RT){switch(R.n){case\"BrtCalcChainItem$\":out.push(val);break;case\"BrtBeginCalcChain$\":break;case\"BrtEndCalcChain$\":break;default:if(!pass||opts.WTF)throw new Error(\"Unexpected record \"+RT+\" \"+R.n)}});return out}function write_cc_bin(data,opts){}function parse_comments(zip,dirComments,sheets,sheetRels,opts){for(var i=0;i!=dirComments.length;++i){var canonicalpath=dirComments[i];var comments=parse_cmnt(getzipdata(zip,canonicalpath.replace(/^\\//,\"\"),true),canonicalpath,opts);if(!comments||!comments.length)continue;var sheetNames=keys(sheets);for(var j=0;j!=sheetNames.length;++j){var sheetName=sheetNames[j];var rels=sheetRels[sheetName];if(rels){var rel=rels[canonicalpath];if(rel)insertCommentsIntoSheet(sheetName,sheets[sheetName],comments)}}}}function insertCommentsIntoSheet(sheetName,sheet,comments){comments.forEach(function(comment){var cell=sheet[comment.ref];if(!cell){cell={};sheet[comment.ref]=cell;var range=safe_decode_range(sheet[\"!ref\"]||\"BDWGO1000001:A1\");var thisCell=decode_cell(comment.ref);if(range.s.r>thisCell.r)range.s.r=thisCell.r;if(range.e.r<thisCell.r)range.e.r=thisCell.r;if(range.s.c>thisCell.c)range.s.c=thisCell.c;if(range.e.c<thisCell.c)range.e.c=thisCell.c;var encoded=encode_range(range);if(encoded!==sheet[\"!ref\"])sheet[\"!ref\"]=encoded}if(!cell.c)cell.c=[];var o={a:comment.author,t:comment.t,r:comment.r};if(comment.h)o.h=comment.h;cell.c.push(o)})}function parse_comments_xml(data,opts){if(data.match(/<(?:\\w+:)?comments *\\/>/))return[];var authors=[];var commentList=[];data.match(/<(?:\\w+:)?authors>([^\\u2603]*)<\\/(?:\\w+:)?authors>/)[1].split(/<\\/\\w*:?author>/).forEach(function(x){if(x===\"\"||x.trim()===\"\")return;authors.push(x.match(/<(?:\\w+:)?author[^>]*>(.*)/)[1])});(data.match(/<(?:\\w+:)?commentList>([^\\u2603]*)<\\/(?:\\w+:)?commentList>/)||[\"\",\"\"])[1].split(/<\\/\\w*:?comment>/).forEach(function(x,index){if(x===\"\"||x.trim()===\"\")return;var y=parsexmltag(x.match(/<(?:\\w+:)?comment[^>]*>/)[0]);var comment={author:y.authorId&&authors[y.authorId]?authors[y.authorId]:undefined,ref:y.ref,guid:y.guid};var cell=decode_cell(y.ref);if(opts.sheetRows&&opts.sheetRows<=cell.r)return;var textMatch=x.match(/<text>([^\\u2603]*)<\\/text>/);if(!textMatch||!textMatch[1])return;var rt=parse_si(textMatch[1]);comment.r=rt.r;comment.t=rt.t;if(opts.cellHTML)comment.h=rt.h;commentList.push(comment)});return commentList}function write_comments_xml(data,opts){}function parse_BrtBeginComment(data,length){var out={};out.iauthor=data.read_shift(4);var rfx=parse_UncheckedRfX(data,16);out.rfx=rfx.s;out.ref=encode_cell(rfx.s);data.l+=16;return out}var parse_BrtCommentAuthor=parse_XLWideString;var parse_BrtCommentText=parse_RichStr;function parse_comments_bin(data,opts){var out=[];var authors=[];var c={};var pass=false;recordhopper(data,function hopper_cmnt(val,R,RT){switch(R.n){case\"BrtCommentAuthor\":authors.push(val);break;case\"BrtBeginComment\":c=val;break;case\"BrtCommentText\":c.t=val.t;c.h=val.h;c.r=val.r;break;case\"BrtEndComment\":c.author=authors[c.iauthor];delete c.iauthor;if(opts.sheetRows&&opts.sheetRows<=c.rfx.r)break;delete c.rfx;out.push(c);break;case\"BrtBeginComments\":break;case\"BrtEndComments\":break;case\"BrtBeginCommentAuthors\":break;case\"BrtEndCommentAuthors\":break;case\"BrtBeginCommentList\":break;case\"BrtEndCommentList\":break;default:if(!pass||opts.WTF)throw new Error(\"Unexpected record \"+RT+\" \"+R.n)}});return out}function write_comments_bin(data,opts){}var rc_to_a1=function(){var rcregex=/(^|[^A-Za-z])R(\\[?)(-?\\d+|)\\]?C(\\[?)(-?\\d+|)\\]?/g;var rcbase;function rcfunc($$,$1,$2,$3,$4,$5){var R=$3.length>0?parseInt($3,10)|0:0,C=$5.length>0?parseInt($5,10)|0:0;if(C<0&&$4.length===0)C=0;if($4.length>0)C+=rcbase.c;if($2.length>0)R+=rcbase.r;return $1+encode_col(C)+encode_row(R)}return function rc_to_a1(fstr,base){rcbase=base;return fstr.replace(rcregex,rcfunc)}}();function parseread(l){return function(blob,length){blob.l+=l;return}}function parseread1(blob,length){blob.l+=1;return}function parse_ColRelU(blob,length){var c=blob.read_shift(2);return[c&16383,c>>14&1,c>>15&1]}function parse_RgceArea(blob,length){var r=blob.read_shift(2),R=blob.read_shift(2);var c=parse_ColRelU(blob,2);var C=parse_ColRelU(blob,2);return{s:{r:r,c:c[0],cRel:c[1],rRel:c[2]},e:{r:R,c:C[0],cRel:C[1],rRel:C[2]}}}function parse_RgceAreaRel(blob,length){var r=blob.read_shift(2),R=blob.read_shift(2);var c=parse_ColRelU(blob,2);var C=parse_ColRelU(blob,2);return{s:{r:r,c:c[0],cRel:c[1],rRel:c[2]},e:{r:R,c:C[0],cRel:C[1],rRel:C[2]}}}function parse_RgceLoc(blob,length){var r=blob.read_shift(2);var c=parse_ColRelU(blob,2);return{r:r,c:c[0],cRel:c[1],rRel:c[2]}}function parse_RgceLocRel(blob,length){var r=blob.read_shift(2);var cl=blob.read_shift(2);\r\nvar cRel=(cl&32768)>>15,rRel=(cl&16384)>>14;cl&=16383;if(cRel!==0)while(cl>=256)cl-=256;return{r:r,c:cl,cRel:cRel,rRel:rRel}}function parse_PtgArea(blob,length){var type=(blob[blob.l++]&96)>>5;var area=parse_RgceArea(blob,8);return[type,area]}function parse_PtgArea3d(blob,length){var type=(blob[blob.l++]&96)>>5;var ixti=blob.read_shift(2);var area=parse_RgceArea(blob,8);return[type,ixti,area]}function parse_PtgAreaErr(blob,length){var type=(blob[blob.l++]&96)>>5;blob.l+=8;return[type]}function parse_PtgAreaErr3d(blob,length){var type=(blob[blob.l++]&96)>>5;var ixti=blob.read_shift(2);blob.l+=8;return[type,ixti]}function parse_PtgAreaN(blob,length){var type=(blob[blob.l++]&96)>>5;var area=parse_RgceAreaRel(blob,8);return[type,area]}function parse_PtgArray(blob,length){var type=(blob[blob.l++]&96)>>5;blob.l+=7;return[type]}function parse_PtgAttrBaxcel(blob,length){var bitSemi=blob[blob.l+1]&1;var bitBaxcel=1;blob.l+=4;return[bitSemi,bitBaxcel]}function parse_PtgAttrChoose(blob,length){blob.l+=2;var offset=blob.read_shift(2);var o=[];for(var i=0;i<=offset;++i)o.push(blob.read_shift(2));return o}function parse_PtgAttrGoto(blob,length){var bitGoto=blob[blob.l+1]&255?1:0;blob.l+=2;return[bitGoto,blob.read_shift(2)]}function parse_PtgAttrIf(blob,length){var bitIf=blob[blob.l+1]&255?1:0;blob.l+=2;return[bitIf,blob.read_shift(2)]}function parse_PtgAttrSemi(blob,length){var bitSemi=blob[blob.l+1]&255?1:0;blob.l+=4;return[bitSemi]}function parse_PtgAttrSpaceType(blob,length){var type=blob.read_shift(1),cch=blob.read_shift(1);return[type,cch]}function parse_PtgAttrSpace(blob,length){blob.read_shift(2);return parse_PtgAttrSpaceType(blob,2)}function parse_PtgAttrSpaceSemi(blob,length){blob.read_shift(2);return parse_PtgAttrSpaceType(blob,2)}function parse_PtgRef(blob,length){var ptg=blob[blob.l]&31;var type=(blob[blob.l]&96)>>5;blob.l+=1;var loc=parse_RgceLoc(blob,4);return[type,loc]}function parse_PtgRefN(blob,length){var ptg=blob[blob.l]&31;var type=(blob[blob.l]&96)>>5;blob.l+=1;var loc=parse_RgceLocRel(blob,4);return[type,loc]}function parse_PtgRef3d(blob,length){var ptg=blob[blob.l]&31;var type=(blob[blob.l]&96)>>5;blob.l+=1;var ixti=blob.read_shift(2);var loc=parse_RgceLoc(blob,4);return[type,ixti,loc]}function parse_PtgFunc(blob,length){var ptg=blob[blob.l]&31;var type=(blob[blob.l]&96)>>5;blob.l+=1;var iftab=blob.read_shift(2);return[FtabArgc[iftab],Ftab[iftab]]}function parse_PtgFuncVar(blob,length){blob.l++;var cparams=blob.read_shift(1),tab=parsetab(blob);return[cparams,(tab[0]===0?Ftab:Cetab)[tab[1]]]}function parsetab(blob,length){return[blob[blob.l+1]>>7,blob.read_shift(2)&32767]}var parse_PtgAttrSum=parseread(4);var parse_PtgConcat=parseread1;function parse_PtgExp(blob,length){blob.l++;var row=blob.read_shift(2);var col=blob.read_shift(2);return[row,col]}function parse_PtgErr(blob,length){blob.l++;return BErr[blob.read_shift(1)]}function parse_PtgInt(blob,length){blob.l++;return blob.read_shift(2)}function parse_PtgBool(blob,length){blob.l++;return blob.read_shift(1)!==0}function parse_PtgNum(blob,length){blob.l++;return parse_Xnum(blob,8)}function parse_PtgStr(blob,length){blob.l++;return parse_ShortXLUnicodeString(blob)}function parse_SerAr(blob){var val=[];switch(val[0]=blob.read_shift(1)){case 4:val[1]=parsebool(blob,1)?\"TRUE\":\"FALSE\";blob.l+=7;break;case 16:val[1]=BErr[blob[blob.l]];blob.l+=8;break;case 0:blob.l+=8;break;case 1:val[1]=parse_Xnum(blob,8);break;case 2:val[1]=parse_XLUnicodeString(blob);break}return val}function parse_PtgExtraMem(blob,cce){var count=blob.read_shift(2);var out=[];for(var i=0;i!=count;++i)out.push(parse_Ref8U(blob,8));return out}function parse_PtgExtraArray(blob){var cols=1+blob.read_shift(1);var rows=1+blob.read_shift(2);for(var i=0,o=[];i!=rows&&(o[i]=[]);++i)for(var j=0;j!=cols;++j)o[i][j]=parse_SerAr(blob);return o}function parse_PtgName(blob,length){var type=blob.read_shift(1)>>>5&3;var nameindex=blob.read_shift(4);return[type,0,nameindex]}function parse_PtgNameX(blob,length){var type=blob.read_shift(1)>>>5&3;var ixti=blob.read_shift(2);var nameindex=blob.read_shift(4);return[type,ixti,nameindex]}function parse_PtgMemArea(blob,length){var type=blob.read_shift(1)>>>5&3;blob.l+=4;var cce=blob.read_shift(2);return[type,cce]}function parse_PtgMemFunc(blob,length){var type=blob.read_shift(1)>>>5&3;var cce=blob.read_shift(2);return[type,cce]}function parse_PtgRefErr(blob,length){var type=blob.read_shift(1)>>>5&3;blob.l+=4;return[type]}var parse_PtgAdd=parseread1;var parse_PtgDiv=parseread1;var parse_PtgEq=parseread1;var parse_PtgGe=parseread1;var parse_PtgGt=parseread1;var parse_PtgIsect=parseread1;var parse_PtgLe=parseread1;var parse_PtgLt=parseread1;var parse_PtgMissArg=parseread1;var parse_PtgMul=parseread1;var parse_PtgNe=parseread1;var parse_PtgParen=parseread1;var parse_PtgPercent=parseread1;var parse_PtgPower=parseread1;var parse_PtgRange=parseread1;var parse_PtgSub=parseread1;var parse_PtgUminus=parseread1;var parse_PtgUnion=parseread1;var parse_PtgUplus=parseread1;var parse_PtgMemErr=parsenoop;var parse_PtgMemNoMem=parsenoop;var parse_PtgRefErr3d=parsenoop;var parse_PtgTbl=parsenoop;var PtgTypes={1:{n:\"PtgExp\",f:parse_PtgExp},2:{n:\"PtgTbl\",f:parse_PtgTbl},3:{n:\"PtgAdd\",f:parse_PtgAdd},4:{n:\"PtgSub\",f:parse_PtgSub},5:{n:\"PtgMul\",f:parse_PtgMul},6:{n:\"PtgDiv\",f:parse_PtgDiv},7:{n:\"PtgPower\",f:parse_PtgPower},8:{n:\"PtgConcat\",f:parse_PtgConcat},9:{n:\"PtgLt\",f:parse_PtgLt},10:{n:\"PtgLe\",f:parse_PtgLe},11:{n:\"PtgEq\",f:parse_PtgEq},12:{n:\"PtgGe\",f:parse_PtgGe},13:{n:\"PtgGt\",f:parse_PtgGt},14:{n:\"PtgNe\",f:parse_PtgNe},15:{n:\"PtgIsect\",f:parse_PtgIsect},16:{n:\"PtgUnion\",f:parse_PtgUnion},17:{n:\"PtgRange\",f:parse_PtgRange},18:{n:\"PtgUplus\",f:parse_PtgUplus},19:{n:\"PtgUminus\",f:parse_PtgUminus},20:{n:\"PtgPercent\",f:parse_PtgPercent},21:{n:\"PtgParen\",f:parse_PtgParen},22:{n:\"PtgMissArg\",f:parse_PtgMissArg},23:{n:\"PtgStr\",f:parse_PtgStr},28:{n:\"PtgErr\",f:parse_PtgErr},29:{n:\"PtgBool\",f:parse_PtgBool},30:{n:\"PtgInt\",f:parse_PtgInt},31:{n:\"PtgNum\",f:parse_PtgNum},32:{n:\"PtgArray\",f:parse_PtgArray},33:{n:\"PtgFunc\",f:parse_PtgFunc},34:{n:\"PtgFuncVar\",f:parse_PtgFuncVar},35:{n:\"PtgName\",f:parse_PtgName},36:{n:\"PtgRef\",f:parse_PtgRef},37:{n:\"PtgArea\",f:parse_PtgArea},38:{n:\"PtgMemArea\",f:parse_PtgMemArea},39:{n:\"PtgMemErr\",f:parse_PtgMemErr},40:{n:\"PtgMemNoMem\",f:parse_PtgMemNoMem},41:{n:\"PtgMemFunc\",f:parse_PtgMemFunc},42:{n:\"PtgRefErr\",f:parse_PtgRefErr},43:{n:\"PtgAreaErr\",f:parse_PtgAreaErr},44:{n:\"PtgRefN\",f:parse_PtgRefN},45:{n:\"PtgAreaN\",f:parse_PtgAreaN},57:{n:\"PtgNameX\",f:parse_PtgNameX},58:{n:\"PtgRef3d\",f:parse_PtgRef3d},59:{n:\"PtgArea3d\",f:parse_PtgArea3d},60:{n:\"PtgRefErr3d\",f:parse_PtgRefErr3d},61:{n:\"PtgAreaErr3d\",f:parse_PtgAreaErr3d},255:{}};var PtgDupes={64:32,96:32,65:33,97:33,66:34,98:34,67:35,99:35,68:36,100:36,69:37,101:37,70:38,102:38,71:39,103:39,72:40,104:40,73:41,105:41,74:42,106:42,75:43,107:43,76:44,108:44,77:45,109:45,89:57,121:57,90:58,122:58,91:59,123:59,92:60,124:60,93:61,125:61};(function(){for(var y in PtgDupes)PtgTypes[y]=PtgTypes[PtgDupes[y]]})();var Ptg18={};var Ptg19={1:{n:\"PtgAttrSemi\",f:parse_PtgAttrSemi},2:{n:\"PtgAttrIf\",f:parse_PtgAttrIf},4:{n:\"PtgAttrChoose\",f:parse_PtgAttrChoose},8:{n:\"PtgAttrGoto\",f:parse_PtgAttrGoto},16:{n:\"PtgAttrSum\",f:parse_PtgAttrSum},32:{n:\"PtgAttrBaxcel\",f:parse_PtgAttrBaxcel},64:{n:\"PtgAttrSpace\",f:parse_PtgAttrSpace},65:{n:\"PtgAttrSpaceSemi\",f:parse_PtgAttrSpaceSemi},255:{}};function parse_Formula(blob,length,opts){var cell=parse_XLSCell(blob,6);var val=parse_FormulaValue(blob,8);var flags=blob.read_shift(1);blob.read_shift(1);var chn=blob.read_shift(4);var cbf=\"\";if(opts.biff===5)blob.l+=length-20;else cbf=parse_XLSCellParsedFormula(blob,length-20,opts);return{cell:cell,val:val[0],formula:cbf,shared:flags>>3&1,tt:val[1]}}function parse_FormulaValue(blob){var b;if(__readUInt16LE(blob,blob.l+6)!==65535)return[parse_Xnum(blob),\"n\"];switch(blob[blob.l]){case 0:blob.l+=8;return[\"String\",\"s\"];case 1:b=blob[blob.l+2]===1;blob.l+=8;return[b,\"b\"];case 2:b=blob[blob.l+2];blob.l+=8;return[b,\"e\"];case 3:blob.l+=8;return[\"\",\"s\"]}}function parse_RgbExtra(blob,length,rgce,opts){if(opts.biff<8)return parsenoop(blob,length);var target=blob.l+length;var o=[];for(var i=0;i!==rgce.length;++i){switch(rgce[i][0]){case\"PtgArray\":rgce[i][1]=parse_PtgExtraArray(blob);o.push(rgce[i][1]);break;case\"PtgMemArea\":rgce[i][2]=parse_PtgExtraMem(blob,rgce[i][1]);o.push(rgce[i][2]);break;default:break}}length=target-blob.l;if(length!==0)o.push(parsenoop(blob,length));return o}function parse_NameParsedFormula(blob,length,opts,cce){var target=blob.l+length;var rgce=parse_Rgce(blob,cce);var rgcb;if(target!==blob.l)rgcb=parse_RgbExtra(blob,target-blob.l,rgce,opts);return[rgce,rgcb]}function parse_XLSCellParsedFormula(blob,length,opts){var target=blob.l+length;var rgcb,cce=blob.read_shift(2);if(cce==65535)return[[],parsenoop(blob,length-2)];var rgce=parse_Rgce(blob,cce);if(length!==cce+2)rgcb=parse_RgbExtra(blob,length-cce-2,rgce,opts);return[rgce,rgcb]}function parse_SharedParsedFormula(blob,length,opts){var target=blob.l+length;var rgcb,cce=blob.read_shift(2);var rgce=parse_Rgce(blob,cce);if(cce==65535)return[[],parsenoop(blob,length-2)];if(length!==cce+2)rgcb=parse_RgbExtra(blob,target-cce-2,rgce,opts);return[rgce,rgcb]}function parse_ArrayParsedFormula(blob,length,opts,ref){var target=blob.l+length;var rgcb,cce=blob.read_shift(2);if(cce==65535)return[[],parsenoop(blob,length-2)];var rgce=parse_Rgce(blob,cce);if(length!==cce+2)rgcb=parse_RgbExtra(blob,target-cce-2,rgce,opts);return[rgce,rgcb]}function parse_Rgce(blob,length){var target=blob.l+length;var R,id,ptgs=[];while(target!=blob.l){length=target-blob.l;id=blob[blob.l];R=PtgTypes[id];if(id===24||id===25){id=blob[blob.l+1];R=(id===24?Ptg18:Ptg19)[id]}if(!R||!R.f){ptgs.push(parsenoop(blob,length))}else{ptgs.push([R.n,R.f(blob,length)])}}return ptgs}function mapper(x){return x.map(function f2(y){return y[1]}).join(\",\")}function stringify_formula(formula,range,cell,supbooks,opts){if(opts!==undefined&&opts.biff===5)return\"BIFF5??\";var _range=range!==undefined?range:{s:{c:0,r:0}};var stack=[],e1,e2,type,c,ixti,nameidx,r;if(!formula[0]||!formula[0][0])return\"\";for(var ff=0,fflen=formula[0].length;ff<fflen;++ff){var f=formula[0][ff];switch(f[0]){case\"PtgUminus\":stack.push(\"-\"+stack.pop());break;case\"PtgUplus\":stack.push(\"+\"+stack.pop());break;case\"PtgPercent\":stack.push(stack.pop()+\"%\");break;case\"PtgAdd\":e1=stack.pop();e2=stack.pop();stack.push(e2+\"+\"+e1);break;case\"PtgSub\":e1=stack.pop();e2=stack.pop();stack.push(e2+\"-\"+e1);break;case\"PtgMul\":e1=stack.pop();e2=stack.pop();stack.push(e2+\"*\"+e1);break;case\"PtgDiv\":e1=stack.pop();e2=stack.pop();stack.push(e2+\"/\"+e1);break;case\"PtgPower\":e1=stack.pop();e2=stack.pop();stack.push(e2+\"^\"+e1);break;case\"PtgConcat\":e1=stack.pop();e2=stack.pop();stack.push(e2+\"&\"+e1);break;case\"PtgLt\":e1=stack.pop();e2=stack.pop();stack.push(e2+\"<\"+e1);break;case\"PtgLe\":e1=stack.pop();e2=stack.pop();stack.push(e2+\"<=\"+e1);break;case\"PtgEq\":e1=stack.pop();e2=stack.pop();stack.push(e2+\"=\"+e1);break;case\"PtgGe\":e1=stack.pop();e2=stack.pop();stack.push(e2+\">=\"+e1);break;case\"PtgGt\":e1=stack.pop();e2=stack.pop();stack.push(e2+\">\"+e1);break;case\"PtgNe\":e1=stack.pop();e2=stack.pop();stack.push(e2+\"<>\"+e1);break;case\"PtgIsect\":e1=stack.pop();e2=stack.pop();stack.push(e2+\" \"+e1);break;case\"PtgUnion\":e1=stack.pop();e2=stack.pop();stack.push(e2+\",\"+e1);break;case\"PtgRange\":break;case\"PtgAttrChoose\":break;case\"PtgAttrGoto\":break;case\"PtgAttrIf\":break;case\"PtgRef\":type=f[1][0];c=shift_cell_xls(decode_cell(encode_cell(f[1][1])),_range);stack.push(encode_cell(c));break;case\"PtgRefN\":type=f[1][0];c=shift_cell_xls(decode_cell(encode_cell(f[1][1])),cell);stack.push(encode_cell(c));break;case\"PtgRef3d\":type=f[1][0];ixti=f[1][1];c=shift_cell_xls(f[1][2],_range);stack.push(supbooks[1][ixti+1]+\"!\"+encode_cell(c));break;case\"PtgFunc\":case\"PtgFuncVar\":var argc=f[1][0],func=f[1][1];if(!argc)argc=0;var args=stack.slice(-argc);stack.length-=argc;if(func===\"User\")func=args.shift();stack.push(func+\"(\"+args.join(\",\")+\")\");break;case\"PtgBool\":stack.push(f[1]?\"TRUE\":\"FALSE\");break;case\"PtgInt\":stack.push(f[1]);break;case\"PtgNum\":stack.push(String(f[1]));break;case\"PtgStr\":stack.push('\"'+f[1]+'\"');break;case\"PtgErr\":stack.push(f[1]);break;case\"PtgArea\":type=f[1][0];r=shift_range_xls(f[1][1],_range);stack.push(encode_range(r));break;case\"PtgArea3d\":type=f[1][0];ixti=f[1][1];r=f[1][2];stack.push(supbooks[1][ixti+1]+\"!\"+encode_range(r));break;case\"PtgAttrSum\":stack.push(\"SUM(\"+stack.pop()+\")\");break;case\"PtgAttrSemi\":break;case\"PtgName\":nameidx=f[1][2];var lbl=supbooks[0][nameidx];var name=lbl.Name;if(name in XLSXFutureFunctions)name=XLSXFutureFunctions[name];stack.push(name);break;case\"PtgNameX\":var bookidx=f[1][1];nameidx=f[1][2];var externbook;if(supbooks[bookidx+1])externbook=supbooks[bookidx+1][nameidx];else if(supbooks[bookidx-1])externbook=supbooks[bookidx-1][nameidx];if(!externbook)externbook={body:\"??NAMEX??\"};stack.push(externbook.body);break;case\"PtgParen\":stack.push(\"(\"+stack.pop()+\")\");break;case\"PtgRefErr\":stack.push(\"#REF!\");break;case\"PtgExp\":c={c:f[1][1],r:f[1][0]};var q={c:cell.c,r:cell.r};if(supbooks.sharedf[encode_cell(c)]){var parsedf=supbooks.sharedf[encode_cell(c)];stack.push(stringify_formula(parsedf,_range,q,supbooks,opts))}else{var fnd=false;for(e1=0;e1!=supbooks.arrayf.length;++e1){e2=supbooks.arrayf[e1];if(c.c<e2[0].s.c||c.c>e2[0].e.c)continue;if(c.r<e2[0].s.r||c.r>e2[0].e.r)continue;stack.push(stringify_formula(e2[1],_range,q,supbooks,opts))}if(!fnd)stack.push(f[1])}break;case\"PtgArray\":stack.push(\"{\"+f[1].map(mapper).join(\";\")+\"}\");break;case\"PtgMemArea\":break;case\"PtgAttrSpace\":break;case\"PtgTbl\":break;case\"PtgMemErr\":break;case\"PtgMissArg\":stack.push(\"\");break;case\"PtgAreaErr\":break;case\"PtgAreaN\":stack.push(\"\");break;case\"PtgRefErr3d\":break;case\"PtgMemFunc\":break;default:throw\"Unrecognized Formula Token: \"+f}}return stack[0]}function parse_XLSBCellParsedFormula(data,length){var cce=data.read_shift(4);return parsenoop(data,length-4)}var PtgDataType={1:\"REFERENCE\",2:\"VALUE\",3:\"ARRAY\"};var Cetab={0:\"BEEP\",1:\"OPEN\",2:\"OPEN.LINKS\",3:\"CLOSE.ALL\",4:\"SAVE\",5:\"SAVE.AS\",6:\"FILE.DELETE\",7:\"PAGE.SETUP\",8:\"PRINT\",9:\"PRINTER.SETUP\",10:\"QUIT\",11:\"NEW.WINDOW\",12:\"ARRANGE.ALL\",13:\"WINDOW.SIZE\",14:\"WINDOW.MOVE\",15:\"FULL\",16:\"CLOSE\",17:\"RUN\",22:\"SET.PRINT.AREA\",23:\"SET.PRINT.TITLES\",24:\"SET.PAGE.BREAK\",25:\"REMOVE.PAGE.BREAK\",26:\"FONT\",27:\"DISPLAY\",28:\"PROTECT.DOCUMENT\",29:\"PRECISION\",30:\"A1.R1C1\",31:\"CALCULATE.NOW\",32:\"CALCULATION\",34:\"DATA.FIND\",35:\"EXTRACT\",36:\"DATA.DELETE\",37:\"SET.DATABASE\",38:\"SET.CRITERIA\",39:\"SORT\",40:\"DATA.SERIES\",41:\"TABLE\",42:\"FORMAT.NUMBER\",43:\"ALIGNMENT\",44:\"STYLE\",45:\"BORDER\",46:\"CELL.PROTECTION\",47:\"COLUMN.WIDTH\",48:\"UNDO\",49:\"CUT\",50:\"COPY\",51:\"PASTE\",52:\"CLEAR\",53:\"PASTE.SPECIAL\",54:\"EDIT.DELETE\",55:\"INSERT\",56:\"FILL.RIGHT\",57:\"FILL.DOWN\",61:\"DEFINE.NAME\",62:\"CREATE.NAMES\",63:\"FORMULA.GOTO\",64:\"FORMULA.FIND\",65:\"SELECT.LAST.CELL\",66:\"SHOW.ACTIVE.CELL\",67:\"GALLERY.AREA\",68:\"GALLERY.BAR\",69:\"GALLERY.COLUMN\",70:\"GALLERY.LINE\",71:\"GALLERY.PIE\",72:\"GALLERY.SCATTER\",73:\"COMBINATION\",74:\"PREFERRED\",75:\"ADD.OVERLAY\",76:\"GRIDLINES\",77:\"SET.PREFERRED\",78:\"AXES\",79:\"LEGEND\",80:\"ATTACH.TEXT\",81:\"ADD.ARROW\",82:\"SELECT.CHART\",83:\"SELECT.PLOT.AREA\",84:\"PATTERNS\",85:\"MAIN.CHART\",86:\"OVERLAY\",87:\"SCALE\",88:\"FORMAT.LEGEND\",89:\"FORMAT.TEXT\",90:\"EDIT.REPEAT\",91:\"PARSE\",92:\"JUSTIFY\",93:\"HIDE\",94:\"UNHIDE\",95:\"WORKSPACE\",96:\"FORMULA\",97:\"FORMULA.FILL\",98:\"FORMULA.ARRAY\",99:\"DATA.FIND.NEXT\",100:\"DATA.FIND.PREV\",101:\"FORMULA.FIND.NEXT\",102:\"FORMULA.FIND.PREV\",103:\"ACTIVATE\",104:\"ACTIVATE.NEXT\",105:\"ACTIVATE.PREV\",106:\"UNLOCKED.NEXT\",107:\"UNLOCKED.PREV\",108:\"COPY.PICTURE\",109:\"SELECT\",110:\"DELETE.NAME\",111:\"DELETE.FORMAT\",112:\"VLINE\",113:\"HLINE\",114:\"VPAGE\",115:\"HPAGE\",116:\"VSCROLL\",117:\"HSCROLL\",118:\"ALERT\",119:\"NEW\",120:\"CANCEL.COPY\",121:\"SHOW.CLIPBOARD\",122:\"MESSAGE\",124:\"PASTE.LINK\",125:\"APP.ACTIVATE\",126:\"DELETE.ARROW\",127:\"ROW.HEIGHT\",128:\"FORMAT.MOVE\",129:\"FORMAT.SIZE\",130:\"FORMULA.REPLACE\",131:\"SEND.KEYS\",132:\"SELECT.SPECIAL\",133:\"APPLY.NAMES\",134:\"REPLACE.FONT\",135:\"FREEZE.PANES\",136:\"SHOW.INFO\",137:\"SPLIT\",138:\"ON.WINDOW\",139:\"ON.DATA\",140:\"DISABLE.INPUT\",142:\"OUTLINE\",143:\"LIST.NAMES\",144:\"FILE.CLOSE\",145:\"SAVE.WORKBOOK\",146:\"DATA.FORM\",147:\"COPY.CHART\",148:\"ON.TIME\",149:\"WAIT\",150:\"FORMAT.FONT\",151:\"FILL.UP\",152:\"FILL.LEFT\",153:\"DELETE.OVERLAY\",155:\"SHORT.MENUS\",159:\"SET.UPDATE.STATUS\",161:\"COLOR.PALETTE\",162:\"DELETE.STYLE\",163:\"WINDOW.RESTORE\",164:\"WINDOW.MAXIMIZE\",166:\"CHANGE.LINK\",167:\"CALCULATE.DOCUMENT\",168:\"ON.KEY\",169:\"APP.RESTORE\",170:\"APP.MOVE\",171:\"APP.SIZE\",172:\"APP.MINIMIZE\",173:\"APP.MAXIMIZE\",174:\"BRING.TO.FRONT\",175:\"SEND.TO.BACK\",185:\"MAIN.CHART.TYPE\",186:\"OVERLAY.CHART.TYPE\",187:\"SELECT.END\",188:\"OPEN.MAIL\",189:\"SEND.MAIL\",190:\"STANDARD.FONT\",191:\"CONSOLIDATE\",192:\"SORT.SPECIAL\",193:\"GALLERY.3D.AREA\",194:\"GALLERY.3D.COLUMN\",195:\"GALLERY.3D.LINE\",196:\"GALLERY.3D.PIE\",197:\"VIEW.3D\",198:\"GOAL.SEEK\",199:\"WORKGROUP\",200:\"FILL.GROUP\",201:\"UPDATE.LINK\",202:\"PROMOTE\",203:\"DEMOTE\",204:\"SHOW.DETAIL\",206:\"UNGROUP\",207:\"OBJECT.PROPERTIES\",208:\"SAVE.NEW.OBJECT\",209:\"SHARE\",210:\"SHARE.NAME\",211:\"DUPLICATE\",212:\"APPLY.STYLE\",213:\"ASSIGN.TO.OBJECT\",214:\"OBJECT.PROTECTION\",215:\"HIDE.OBJECT\",216:\"SET.EXTRACT\",217:\"CREATE.PUBLISHER\",218:\"SUBSCRIBE.TO\",219:\"ATTRIBUTES\",220:\"SHOW.TOOLBAR\",222:\"PRINT.PREVIEW\",223:\"EDIT.COLOR\",224:\"SHOW.LEVELS\",225:\"FORMAT.MAIN\",226:\"FORMAT.OVERLAY\",227:\"ON.RECALC\",228:\"EDIT.SERIES\",229:\"DEFINE.STYLE\",240:\"LINE.PRINT\",243:\"ENTER.DATA\",249:\"GALLERY.RADAR\",250:\"MERGE.STYLES\",251:\"EDITION.OPTIONS\",252:\"PASTE.PICTURE\",253:\"PASTE.PICTURE.LINK\",254:\"SPELLING\",256:\"ZOOM\",259:\"INSERT.OBJECT\",260:\"WINDOW.MINIMIZE\",265:\"SOUND.NOTE\",266:\"SOUND.PLAY\",267:\"FORMAT.SHAPE\",268:\"EXTEND.POLYGON\",269:\"FORMAT.AUTO\",272:\"GALLERY.3D.BAR\",273:\"GALLERY.3D.SURFACE\",274:\"FILL.AUTO\",276:\"CUSTOMIZE.TOOLBAR\",277:\"ADD.TOOL\",278:\"EDIT.OBJECT\",279:\"ON.DOUBLECLICK\",280:\"ON.ENTRY\",281:\"WORKBOOK.ADD\",282:\"WORKBOOK.MOVE\",283:\"WORKBOOK.COPY\",284:\"WORKBOOK.OPTIONS\",285:\"SAVE.WORKSPACE\",288:\"CHART.WIZARD\",289:\"DELETE.TOOL\",290:\"MOVE.TOOL\",291:\"WORKBOOK.SELECT\",292:\"WORKBOOK.ACTIVATE\",293:\"ASSIGN.TO.TOOL\",295:\"COPY.TOOL\",296:\"RESET.TOOL\",297:\"CONSTRAIN.NUMERIC\",298:\"PASTE.TOOL\",302:\"WORKBOOK.NEW\",305:\"SCENARIO.CELLS\",306:\"SCENARIO.DELETE\",307:\"SCENARIO.ADD\",308:\"SCENARIO.EDIT\",309:\"SCENARIO.SHOW\",310:\"SCENARIO.SHOW.NEXT\",311:\"SCENARIO.SUMMARY\",312:\"PIVOT.TABLE.WIZARD\",313:\"PIVOT.FIELD.PROPERTIES\",314:\"PIVOT.FIELD\",315:\"PIVOT.ITEM\",316:\"PIVOT.ADD.FIELDS\",318:\"OPTIONS.CALCULATION\",319:\"OPTIONS.EDIT\",320:\"OPTIONS.VIEW\",321:\"ADDIN.MANAGER\",322:\"MENU.EDITOR\",323:\"ATTACH.TOOLBARS\",324:\"VBAActivate\",325:\"OPTIONS.CHART\",328:\"VBA.INSERT.FILE\",330:\"VBA.PROCEDURE.DEFINITION\",336:\"ROUTING.SLIP\",338:\"ROUTE.DOCUMENT\",339:\"MAIL.LOGON\",342:\"INSERT.PICTURE\",343:\"EDIT.TOOL\",344:\"GALLERY.DOUGHNUT\",350:\"CHART.TREND\",352:\"PIVOT.ITEM.PROPERTIES\",354:\"WORKBOOK.INSERT\",355:\"OPTIONS.TRANSITION\",356:\"OPTIONS.GENERAL\",370:\"FILTER.ADVANCED\",373:\"MAIL.ADD.MAILER\",374:\"MAIL.DELETE.MAILER\",375:\"MAIL.REPLY\",376:\"MAIL.REPLY.ALL\",377:\"MAIL.FORWARD\",378:\"MAIL.NEXT.LETTER\",379:\"DATA.LABEL\",380:\"INSERT.TITLE\",381:\"FONT.PROPERTIES\",382:\"MACRO.OPTIONS\",383:\"WORKBOOK.HIDE\",384:\"WORKBOOK.UNHIDE\",385:\"WORKBOOK.DELETE\",386:\"WORKBOOK.NAME\",388:\"GALLERY.CUSTOM\",390:\"ADD.CHART.AUTOFORMAT\",391:\"DELETE.CHART.AUTOFORMAT\",392:\"CHART.ADD.DATA\",393:\"AUTO.OUTLINE\",394:\"TAB.ORDER\",395:\"SHOW.DIALOG\",396:\"SELECT.ALL\",397:\"UNGROUP.SHEETS\",398:\"SUBTOTAL.CREATE\",399:\"SUBTOTAL.REMOVE\",400:\"RENAME.OBJECT\",412:\"WORKBOOK.SCROLL\",413:\"WORKBOOK.NEXT\",414:\"WORKBOOK.PREV\",415:\"WORKBOOK.TAB.SPLIT\",416:\"FULL.SCREEN\",417:\"WORKBOOK.PROTECT\",420:\"SCROLLBAR.PROPERTIES\",421:\"PIVOT.SHOW.PAGES\",422:\"TEXT.TO.COLUMNS\",423:\"FORMAT.CHARTTYPE\",424:\"LINK.FORMAT\",425:\"TRACER.DISPLAY\",430:\"TRACER.NAVIGATE\",431:\"TRACER.CLEAR\",432:\"TRACER.ERROR\",433:\"PIVOT.FIELD.GROUP\",434:\"PIVOT.FIELD.UNGROUP\",435:\"CHECKBOX.PROPERTIES\",436:\"LABEL.PROPERTIES\",437:\"LISTBOX.PROPERTIES\",438:\"EDITBOX.PROPERTIES\",439:\"PIVOT.REFRESH\",440:\"LINK.COMBO\",441:\"OPEN.TEXT\",442:\"HIDE.DIALOG\",443:\"SET.DIALOG.FOCUS\",444:\"ENABLE.OBJECT\",445:\"PUSHBUTTON.PROPERTIES\",446:\"SET.DIALOG.DEFAULT\",447:\"FILTER\",448:\"FILTER.SHOW.ALL\",449:\"CLEAR.OUTLINE\",450:\"FUNCTION.WIZARD\",451:\"ADD.LIST.ITEM\",452:\"SET.LIST.ITEM\",453:\"REMOVE.LIST.ITEM\",454:\"SELECT.LIST.ITEM\",455:\"SET.CONTROL.VALUE\",456:\"SAVE.COPY.AS\",458:\"OPTIONS.LISTS.ADD\",459:\"OPTIONS.LISTS.DELETE\",460:\"SERIES.AXES\",461:\"SERIES.X\",462:\"SERIES.Y\",463:\"ERRORBAR.X\",464:\"ERRORBAR.Y\",465:\"FORMAT.CHART\",466:\"SERIES.ORDER\",467:\"MAIL.LOGOFF\",468:\"CLEAR.ROUTING.SLIP\",469:\"APP.ACTIVATE.MICROSOFT\",470:\"MAIL.EDIT.MAILER\",471:\"ON.SHEET\",472:\"STANDARD.WIDTH\",473:\"SCENARIO.MERGE\",474:\"SUMMARY.INFO\",475:\"FIND.FILE\",476:\"ACTIVE.CELL.FONT\",477:\"ENABLE.TIPWIZARD\",478:\"VBA.MAKE.ADDIN\",480:\"INSERTDATATABLE\",481:\"WORKGROUP.OPTIONS\",482:\"MAIL.SEND.MAILER\",485:\"AUTOCORRECT\",489:\"POST.DOCUMENT\",491:\"PICKLIST\",493:\"VIEW.SHOW\",494:\"VIEW.DEFINE\",495:\"VIEW.DELETE\",509:\"SHEET.BACKGROUND\",510:\"INSERT.MAP.OBJECT\",511:\"OPTIONS.MENONO\",517:\"MSOCHECKS\",518:\"NORMAL\",519:\"LAYOUT\",520:\"RM.PRINT.AREA\",521:\"CLEAR.PRINT.AREA\",522:\"ADD.PRINT.AREA\",523:\"MOVE.BRK\",545:\"HIDECURR.NOTE\",546:\"HIDEALL.NOTES\",547:\"DELETE.NOTE\",548:\"TRAVERSE.NOTES\",549:\"ACTIVATE.NOTES\",620:\"PROTECT.REVISIONS\",621:\"UNPROTECT.REVISIONS\",647:\"OPTIONS.ME\",653:\"WEB.PUBLISH\",667:\"NEWWEBQUERY\",673:\"PIVOT.TABLE.CHART\",753:\"OPTIONS.SAVE\",755:\"OPTIONS.SPELL\",808:\"HIDEALL.INKANNOTS\"};var Ftab={0:\"COUNT\",1:\"IF\",2:\"ISNA\",3:\"ISERROR\",4:\"SUM\",5:\"AVERAGE\",6:\"MIN\",7:\"MAX\",8:\"ROW\",9:\"COLUMN\",10:\"NA\",11:\"NPV\",12:\"STDEV\",13:\"DOLLAR\",14:\"FIXED\",15:\"SIN\",16:\"COS\",17:\"TAN\",18:\"ATAN\",19:\"PI\",20:\"SQRT\",21:\"EXP\",22:\"LN\",23:\"LOG10\",24:\"ABS\",25:\"INT\",26:\"SIGN\",27:\"ROUND\",28:\"LOOKUP\",29:\"INDEX\",30:\"REPT\",31:\"MID\",32:\"LEN\",33:\"VALUE\",34:\"TRUE\",35:\"FALSE\",36:\"AND\",37:\"OR\",38:\"NOT\",39:\"MOD\",40:\"DCOUNT\",41:\"DSUM\",42:\"DAVERAGE\",43:\"DMIN\",44:\"DMAX\",45:\"DSTDEV\",46:\"VAR\",47:\"DVAR\",48:\"TEXT\",49:\"LINEST\",50:\"TREND\",51:\"LOGEST\",52:\"GROWTH\",53:\"GOTO\",54:\"HALT\",55:\"RETURN\",56:\"PV\",57:\"FV\",58:\"NPER\",59:\"PMT\",60:\"RATE\",61:\"MIRR\",62:\"IRR\",63:\"RAND\",64:\"MATCH\",65:\"DATE\",66:\"TIME\",67:\"DAY\",68:\"MONTH\",69:\"YEAR\",70:\"WEEKDAY\",71:\"HOUR\",72:\"MINUTE\",73:\"SECOND\",74:\"NOW\",75:\"AREAS\",76:\"ROWS\",77:\"COLUMNS\",78:\"OFFSET\",79:\"ABSREF\",80:\"RELREF\",81:\"ARGUMENT\",82:\"SEARCH\",83:\"TRANSPOSE\",84:\"ERROR\",85:\"STEP\",86:\"TYPE\",87:\"ECHO\",88:\"SET.NAME\",89:\"CALLER\",90:\"DEREF\",91:\"WINDOWS\",92:\"SERIES\",93:\"DOCUMENTS\",94:\"ACTIVE.CELL\",95:\"SELECTION\",96:\"RESULT\",97:\"ATAN2\",98:\"ASIN\",99:\"ACOS\",100:\"CHOOSE\",101:\"HLOOKUP\",102:\"VLOOKUP\",103:\"LINKS\",104:\"INPUT\",105:\"ISREF\",106:\"GET.FORMULA\",107:\"GET.NAME\",108:\"SET.VALUE\",109:\"LOG\",110:\"EXEC\",111:\"CHAR\",112:\"LOWER\",113:\"UPPER\",114:\"PROPER\",115:\"LEFT\",116:\"RIGHT\",117:\"EXACT\",118:\"TRIM\",119:\"REPLACE\",120:\"SUBSTITUTE\",121:\"CODE\",122:\"NAMES\",123:\"DIRECTORY\",124:\"FIND\",125:\"CELL\",126:\"ISERR\",127:\"ISTEXT\",128:\"ISNUMBER\",129:\"ISBLANK\",130:\"T\",131:\"N\",132:\"FOPEN\",133:\"FCLOSE\",134:\"FSIZE\",135:\"FREADLN\",136:\"FREAD\",137:\"FWRITELN\",138:\"FWRITE\",139:\"FPOS\",140:\"DATEVALUE\",141:\"TIMEVALUE\",142:\"SLN\",143:\"SYD\",144:\"DDB\",145:\"GET.DEF\",146:\"REFTEXT\",147:\"TEXTREF\",148:\"INDIRECT\",149:\"REGISTER\",150:\"CALL\",151:\"ADD.BAR\",152:\"ADD.MENU\",153:\"ADD.COMMAND\",154:\"ENABLE.COMMAND\",155:\"CHECK.COMMAND\",156:\"RENAME.COMMAND\",157:\"SHOW.BAR\",158:\"DELETE.MENU\",159:\"DELETE.COMMAND\",160:\"GET.CHART.ITEM\",161:\"DIALOG.BOX\",162:\"CLEAN\",163:\"MDETERM\",164:\"MINVERSE\",165:\"MMULT\",166:\"FILES\",167:\"IPMT\",168:\"PPMT\",169:\"COUNTA\",170:\"CANCEL.KEY\",171:\"FOR\",172:\"WHILE\",173:\"BREAK\",174:\"NEXT\",175:\"INITIATE\",176:\"REQUEST\",177:\"POKE\",178:\"EXECUTE\",179:\"TERMINATE\",180:\"RESTART\",181:\"HELP\",182:\"GET.BAR\",183:\"PRODUCT\",184:\"FACT\",185:\"GET.CELL\",186:\"GET.WORKSPACE\",187:\"GET.WINDOW\",188:\"GET.DOCUMENT\",189:\"DPRODUCT\",190:\"ISNONTEXT\",191:\"GET.NOTE\",192:\"NOTE\",193:\"STDEVP\",194:\"VARP\",195:\"DSTDEVP\",196:\"DVARP\",197:\"TRUNC\",198:\"ISLOGICAL\",199:\"DCOUNTA\",200:\"DELETE.BAR\",201:\"UNREGISTER\",204:\"USDOLLAR\",205:\"FINDB\",206:\"SEARCHB\",207:\"REPLACEB\",208:\"LEFTB\",209:\"RIGHTB\",210:\"MIDB\",211:\"LENB\",212:\"ROUNDUP\",213:\"ROUNDDOWN\",214:\"ASC\",215:\"DBCS\",216:\"RANK\",219:\"ADDRESS\",220:\"DAYS360\",221:\"TODAY\",222:\"VDB\",223:\"ELSE\",224:\"ELSE.IF\",225:\"END.IF\",226:\"FOR.CELL\",227:\"MEDIAN\",228:\"SUMPRODUCT\",229:\"SINH\",230:\"COSH\",231:\"TANH\",232:\"ASINH\",233:\"ACOSH\",234:\"ATANH\",235:\"DGET\",236:\"CREATE.OBJECT\",237:\"VOLATILE\",238:\"LAST.ERROR\",239:\"CUSTOM.UNDO\",240:\"CUSTOM.REPEAT\",241:\"FORMULA.CONVERT\",242:\"GET.LINK.INFO\",243:\"TEXT.BOX\",244:\"INFO\",245:\"GROUP\",246:\"GET.OBJECT\",247:\"DB\",248:\"PAUSE\",251:\"RESUME\",252:\"FREQUENCY\",253:\"ADD.TOOLBAR\",254:\"DELETE.TOOLBAR\",255:\"User\",256:\"RESET.TOOLBAR\",257:\"EVALUATE\",258:\"GET.TOOLBAR\",259:\"GET.TOOL\",260:\"SPELLING.CHECK\",261:\"ERROR.TYPE\",262:\"APP.TITLE\",263:\"WINDOW.TITLE\",264:\"SAVE.TOOLBAR\",265:\"ENABLE.TOOL\",266:\"PRESS.TOOL\",267:\"REGISTER.ID\",268:\"GET.WORKBOOK\",269:\"AVEDEV\",270:\"BETADIST\",271:\"GAMMALN\",272:\"BETAINV\",273:\"BINOMDIST\",274:\"CHIDIST\",275:\"CHIINV\",276:\"COMBIN\",277:\"CONFIDENCE\",278:\"CRITBINOM\",279:\"EVEN\",280:\"EXPONDIST\",281:\"FDIST\",282:\"FINV\",283:\"FISHER\",284:\"FISHERINV\",285:\"FLOOR\",286:\"GAMMADIST\",287:\"GAMMAINV\",288:\"CEILING\",289:\"HYPGEOMDIST\",290:\"LOGNORMDIST\",291:\"LOGINV\",292:\"NEGBINOMDIST\",293:\"NORMDIST\",294:\"NORMSDIST\",295:\"NORMINV\",296:\"NORMSINV\",297:\"STANDARDIZE\",298:\"ODD\",299:\"PERMUT\",300:\"POISSON\",301:\"TDIST\",302:\"WEIBULL\",303:\"SUMXMY2\",304:\"SUMX2MY2\",305:\"SUMX2PY2\",306:\"CHITEST\",307:\"CORREL\",308:\"COVAR\",309:\"FORECAST\",310:\"FTEST\",311:\"INTERCEPT\",312:\"PEARSON\",313:\"RSQ\",314:\"STEYX\",315:\"SLOPE\",316:\"TTEST\",317:\"PROB\",318:\"DEVSQ\",319:\"GEOMEAN\",320:\"HARMEAN\",321:\"SUMSQ\",322:\"KURT\",323:\"SKEW\",324:\"ZTEST\",325:\"LARGE\",326:\"SMALL\",327:\"QUARTILE\",328:\"PERCENTILE\",329:\"PERCENTRANK\",330:\"MODE\",331:\"TRIMMEAN\",332:\"TINV\",334:\"MOVIE.COMMAND\",335:\"GET.MOVIE\",336:\"CONCATENATE\",337:\"POWER\",338:\"PIVOT.ADD.DATA\",339:\"GET.PIVOT.TABLE\",340:\"GET.PIVOT.FIELD\",341:\"GET.PIVOT.ITEM\",342:\"RADIANS\",343:\"DEGREES\",344:\"SUBTOTAL\",345:\"SUMIF\",346:\"COUNTIF\",347:\"COUNTBLANK\",348:\"SCENARIO.GET\",349:\"OPTIONS.LISTS.GET\",350:\"ISPMT\",351:\"DATEDIF\",352:\"DATESTRING\",353:\"NUMBERSTRING\",354:\"ROMAN\",355:\"OPEN.DIALOG\",356:\"SAVE.DIALOG\",357:\"VIEW.GET\",358:\"GETPIVOTDATA\",359:\"HYPERLINK\",360:\"PHONETIC\",361:\"AVERAGEA\",362:\"MAXA\",363:\"MINA\",364:\"STDEVPA\",365:\"VARPA\",366:\"STDEVA\",367:\"VARA\",368:\"BAHTTEXT\",369:\"THAIDAYOFWEEK\",370:\"THAIDIGIT\",371:\"THAIMONTHOFYEAR\",372:\"THAINUMSOUND\",373:\"THAINUMSTRING\",374:\"THAISTRINGLENGTH\",375:\"ISTHAIDIGIT\",376:\"ROUNDBAHTDOWN\",377:\"ROUNDBAHTUP\",378:\"THAIYEAR\",379:\"RTD\"};var FtabArgc={2:1,3:1,15:1,16:1,17:1,18:1,20:1,21:1,22:1,23:1,24:1,25:1,26:1,27:2,30:2,31:3,32:1,33:1,38:1,39:2,40:3,41:3,42:3,43:3,44:3,45:3,47:3,48:2,53:1,61:3,65:3,66:3,67:1,68:1,69:1,71:1,72:1,73:1,75:1,76:1,77:1,79:2,80:2,83:1,86:1,90:1,97:2,98:1,99:1,105:1,111:1,112:1,113:1,114:1,117:2,118:1,119:4,121:1,126:1,127:1,128:1,129:1,130:1,131:1,133:1,134:1,135:1,136:2,137:2,138:2,140:1,141:1,142:3,143:4,162:1,163:1,164:1,165:2,172:1,175:2,176:2,177:3,178:2,179:1,184:1,189:3,190:1,195:3,196:3,198:1,199:3,201:1,207:4,210:3,211:1,212:2,213:2,214:1,215:1,229:1,230:1,231:1,232:1,233:1,234:1,235:3,244:1,252:2,257:1,261:1,271:1,273:4,274:2,275:2,276:2,277:3,278:3,279:1,280:3,281:3,282:3,283:1,284:1,285:2,286:4,287:3,288:2,289:4,290:3,291:3,292:3,293:4,294:1,295:3,296:1,297:3,298:1,299:2,300:3,301:3,302:4,303:2,304:2,305:2,306:2,307:2,308:2,309:3,310:2,311:2,312:2,313:2,314:2,315:2,316:4,325:2,326:2,327:2,328:2,331:2,332:2,337:2,342:1,343:1,346:2,347:1,350:4,351:3,352:1,353:2,360:1,368:1,369:1,370:1,371:1,372:1,373:1,374:1,375:1,376:1,377:1,378:1,65535:0};var XLSXFutureFunctions={\"_xlfn.ACOT\":\"ACOT\",\"_xlfn.ACOTH\":\"ACOTH\",\"_xlfn.AGGREGATE\":\"AGGREGATE\",\"_xlfn.ARABIC\":\"ARABIC\",\"_xlfn.AVERAGEIF\":\"AVERAGEIF\",\"_xlfn.AVERAGEIFS\":\"AVERAGEIFS\",\"_xlfn.BASE\":\"BASE\",\"_xlfn.BETA.DIST\":\"BETA.DIST\",\"_xlfn.BETA.INV\":\"BETA.INV\",\"_xlfn.BINOM.DIST\":\"BINOM.DIST\",\"_xlfn.BINOM.DIST.RANGE\":\"BINOM.DIST.RANGE\",\"_xlfn.BINOM.INV\":\"BINOM.INV\",\"_xlfn.BITAND\":\"BITAND\",\"_xlfn.BITLSHIFT\":\"BITLSHIFT\",\"_xlfn.BITOR\":\"BITOR\",\"_xlfn.BITRSHIFT\":\"BITRSHIFT\",\"_xlfn.BITXOR\":\"BITXOR\",\"_xlfn.CEILING.MATH\":\"CEILING.MATH\",\"_xlfn.CEILING.PRECISE\":\"CEILING.PRECISE\",\"_xlfn.CHISQ.DIST\":\"CHISQ.DIST\",\"_xlfn.CHISQ.DIST.RT\":\"CHISQ.DIST.RT\",\"_xlfn.CHISQ.INV\":\"CHISQ.INV\",\"_xlfn.CHISQ.INV.RT\":\"CHISQ.INV.RT\",\"_xlfn.CHISQ.TEST\":\"CHISQ.TEST\",\"_xlfn.COMBINA\":\"COMBINA\",\"_xlfn.CONFIDENCE.NORM\":\"CONFIDENCE.NORM\",\"_xlfn.CONFIDENCE.T\":\"CONFIDENCE.T\",\"_xlfn.COT\":\"COT\",\"_xlfn.COTH\":\"COTH\",\"_xlfn.COUNTIFS\":\"COUNTIFS\",\"_xlfn.COVARIANCE.P\":\"COVARIANCE.P\",\"_xlfn.COVARIANCE.S\":\"COVARIANCE.S\",\"_xlfn.CSC\":\"CSC\",\"_xlfn.CSCH\":\"CSCH\",\"_xlfn.DAYS\":\"DAYS\",\"_xlfn.DECIMAL\":\"DECIMAL\",\"_xlfn.ECMA.CEILING\":\"ECMA.CEILING\",\"_xlfn.ERF.PRECISE\":\"ERF.PRECISE\",\"_xlfn.ERFC.PRECISE\":\"ERFC.PRECISE\",\"_xlfn.EXPON.DIST\":\"EXPON.DIST\",\"_xlfn.F.DIST\":\"F.DIST\",\"_xlfn.F.DIST.RT\":\"F.DIST.RT\",\"_xlfn.F.INV\":\"F.INV\",\"_xlfn.F.INV.RT\":\"F.INV.RT\",\"_xlfn.F.TEST\":\"F.TEST\",\"_xlfn.FILTERXML\":\"FILTERXML\",\"_xlfn.FLOOR.MATH\":\"FLOOR.MATH\",\"_xlfn.FLOOR.PRECISE\":\"FLOOR.PRECISE\",\"_xlfn.FORMULATEXT\":\"FORMULATEXT\",\"_xlfn.GAMMA\":\"GAMMA\",\"_xlfn.GAMMA.DIST\":\"GAMMA.DIST\",\"_xlfn.GAMMA.INV\":\"GAMMA.INV\",\"_xlfn.GAMMALN.PRECISE\":\"GAMMALN.PRECISE\",\"_xlfn.GAUSS\":\"GAUSS\",\"_xlfn.HYPGEOM.DIST\":\"HYPGEOM.DIST\",\"_xlfn.IFNA\":\"IFNA\",\"_xlfn.IFERROR\":\"IFERROR\",\"_xlfn.IMCOSH\":\"IMCOSH\",\"_xlfn.IMCOT\":\"IMCOT\",\"_xlfn.IMCSC\":\"IMCSC\",\"_xlfn.IMCSCH\":\"IMCSCH\",\"_xlfn.IMSEC\":\"IMSEC\",\"_xlfn.IMSECH\":\"IMSECH\",\"_xlfn.IMSINH\":\"IMSINH\",\"_xlfn.IMTAN\":\"IMTAN\",\"_xlfn.ISFORMULA\":\"ISFORMULA\",\"_xlfn.ISO.CEILING\":\"ISO.CEILING\",\"_xlfn.ISOWEEKNUM\":\"ISOWEEKNUM\",\"_xlfn.LOGNORM.DIST\":\"LOGNORM.DIST\",\"_xlfn.LOGNORM.INV\":\"LOGNORM.INV\",\"_xlfn.MODE.MULT\":\"MODE.MULT\",\"_xlfn.MODE.SNGL\":\"MODE.SNGL\",\"_xlfn.MUNIT\":\"MUNIT\",\"_xlfn.NEGBINOM.DIST\":\"NEGBINOM.DIST\",\"_xlfn.NETWORKDAYS.INTL\":\"NETWORKDAYS.INTL\",\"_xlfn.NIGBINOM\":\"NIGBINOM\",\"_xlfn.NORM.DIST\":\"NORM.DIST\",\"_xlfn.NORM.INV\":\"NORM.INV\",\"_xlfn.NORM.S.DIST\":\"NORM.S.DIST\",\"_xlfn.NORM.S.INV\":\"NORM.S.INV\",\"_xlfn.NUMBERVALUE\":\"NUMBERVALUE\",\"_xlfn.PDURATION\":\"PDURATION\",\"_xlfn.PERCENTILE.EXC\":\"PERCENTILE.EXC\",\"_xlfn.PERCENTILE.INC\":\"PERCENTILE.INC\",\"_xlfn.PERCENTRANK.EXC\":\"PERCENTRANK.EXC\",\"_xlfn.PERCENTRANK.INC\":\"PERCENTRANK.INC\",\"_xlfn.PERMUTATIONA\":\"PERMUTATIONA\",\"_xlfn.PHI\":\"PHI\",\"_xlfn.POISSON.DIST\":\"POISSON.DIST\",\"_xlfn.QUARTILE.EXC\":\"QUARTILE.EXC\",\"_xlfn.QUARTILE.INC\":\"QUARTILE.INC\",\"_xlfn.QUERYSTRING\":\"QUERYSTRING\",\"_xlfn.RANK.AVG\":\"RANK.AVG\",\"_xlfn.RANK.EQ\":\"RANK.EQ\",\"_xlfn.RRI\":\"RRI\",\"_xlfn.SEC\":\"SEC\",\"_xlfn.SECH\":\"SECH\",\"_xlfn.SHEET\":\"SHEET\",\"_xlfn.SHEETS\":\"SHEETS\",\"_xlfn.SKEW.P\":\"SKEW.P\",\"_xlfn.STDEV.P\":\"STDEV.P\",\"_xlfn.STDEV.S\":\"STDEV.S\",\"_xlfn.SUMIFS\":\"SUMIFS\",\"_xlfn.T.DIST\":\"T.DIST\",\"_xlfn.T.DIST.2T\":\"T.DIST.2T\",\"_xlfn.T.DIST.RT\":\"T.DIST.RT\",\"_xlfn.T.INV\":\"T.INV\",\"_xlfn.T.INV.2T\":\"T.INV.2T\",\"_xlfn.T.TEST\":\"T.TEST\",\"_xlfn.UNICHAR\":\"UNICHAR\",\"_xlfn.UNICODE\":\"UNICODE\",\"_xlfn.VAR.P\":\"VAR.P\",\"_xlfn.VAR.S\":\"VAR.S\",\"_xlfn.WEBSERVICE\":\"WEBSERVICE\",\"_xlfn.WEIBULL.DIST\":\"WEIBULL.DIST\",\"_xlfn.WORKDAY.INTL\":\"WORKDAY.INTL\",\"_xlfn.XOR\":\"XOR\",\"_xlfn.Z.TEST\":\"Z.TEST\"};var strs={};var _ssfopts={};RELS.WS=\"http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet\";function get_sst_id(sst,str){for(var i=0,len=sst.length;i<len;++i)if(sst[i].t===str){sst.Count++;return i}sst[len]={t:str};sst.Count++;sst.Unique++;return len}function get_cell_style(styles,cell,opts){if(typeof style_builder!=\"undefined\"){if(/^\\d+$/.exec(cell.s)){return cell.s}if(cell.s&&cell.s==+cell.s){return cell.s}var s=cell.s||{};if(cell.z)s.numFmt=cell.z;return style_builder.addStyle(s)}else{var z=opts.revssf[cell.z!=null?cell.z:\"General\"];for(var i=0,len=styles.length;i!=len;++i)if(styles[i].numFmtId===z)return i;styles[len]={numFmtId:z,fontId:0,fillId:0,borderId:0,xfId:0,applyNumberFormat:1};return len}}function get_cell_style_csf(cellXf){if(cellXf){var s={};if(typeof cellXf.numFmtId!=undefined){s.numFmt=SSF._table[cellXf.numFmtId]}if(cellXf.fillId){s.fill=styles.Fills[cellXf.fillId]}if(cellXf.fontId){s.font=styles.Fonts[cellXf.fontId]}if(cellXf.borderId){s.border=styles.Borders[cellXf.borderId];\r\n}if(cellXf.applyAlignment==1){s.alignment=cellXf.alignment}return JSON.parse(JSON.stringify(s))}return null}function safe_format(p,fmtid,fillid,opts){try{if(p.t===\"e\")p.w=p.w||BErr[p.v];else if(fmtid===0){if(p.t===\"n\"){if((p.v|0)===p.v)p.w=SSF._general_int(p.v,_ssfopts);else p.w=SSF._general_num(p.v,_ssfopts)}else if(p.t===\"d\"){var dd=datenum(p.v);if((dd|0)===dd)p.w=SSF._general_int(dd,_ssfopts);else p.w=SSF._general_num(dd,_ssfopts)}else if(p.v===undefined)return\"\";else p.w=SSF._general(p.v,_ssfopts)}else if(p.t===\"d\")p.w=SSF.format(fmtid,datenum(p.v),_ssfopts);else p.w=SSF.format(fmtid,p.v,_ssfopts);if(opts.cellNF)p.z=SSF._table[fmtid]}catch(e){if(opts.WTF)throw e}}function parse_ws_xml_dim(ws,s){var d=safe_decode_range(s);if(d.s.r<=d.e.r&&d.s.c<=d.e.c&&d.s.r>=0&&d.s.c>=0)ws[\"!ref\"]=encode_range(d)}var mergecregex=/<mergeCell ref=\"[A-Z0-9:]+\"\\s*\\/>/g;var sheetdataregex=/<(?:\\w+:)?sheetData>([^\\u2603]*)<\\/(?:\\w+:)?sheetData>/;var hlinkregex=/<hyperlink[^>]*\\/>/g;var dimregex=/\"(\\w*:\\w*)\"/;var colregex=/<col[^>]*\\/>/g;function parse_ws_xml(data,opts,rels){if(!data)return data;var s={};var ridx=data.indexOf(\"<dimension\");if(ridx>0){var ref=data.substr(ridx,50).match(dimregex);if(ref!=null)parse_ws_xml_dim(s,ref[1])}var mergecells=[];if(data.indexOf(\"</mergeCells>\")!==-1){var merges=data.match(mergecregex);for(ridx=0;ridx!=merges.length;++ridx)mergecells[ridx]=safe_decode_range(merges[ridx].substr(merges[ridx].indexOf('\"')+1))}var columns=[];if(opts.cellStyles&&data.indexOf(\"</cols>\")!==-1){var cols=data.match(colregex);parse_ws_xml_cols(columns,cols)}var refguess={s:{r:1e6,c:1e6},e:{r:0,c:0}};var mtch=data.match(sheetdataregex);if(mtch)parse_ws_xml_data(mtch[1],s,opts,refguess);if(data.indexOf(\"</hyperlinks>\")!==-1)parse_ws_xml_hlinks(s,data.match(hlinkregex),rels);if(!s[\"!ref\"]&&refguess.e.c>=refguess.s.c&&refguess.e.r>=refguess.s.r)s[\"!ref\"]=encode_range(refguess);if(opts.sheetRows>0&&s[\"!ref\"]){var tmpref=safe_decode_range(s[\"!ref\"]);if(opts.sheetRows<+tmpref.e.r){tmpref.e.r=opts.sheetRows-1;if(tmpref.e.r>refguess.e.r)tmpref.e.r=refguess.e.r;if(tmpref.e.r<tmpref.s.r)tmpref.s.r=tmpref.e.r;if(tmpref.e.c>refguess.e.c)tmpref.e.c=refguess.e.c;if(tmpref.e.c<tmpref.s.c)tmpref.s.c=tmpref.e.c;s[\"!fullref\"]=s[\"!ref\"];s[\"!ref\"]=encode_range(tmpref)}}if(mergecells.length>0)s[\"!merges\"]=mergecells;if(columns.length>0)s[\"!cols\"]=columns;return s}function write_ws_xml_merges(merges){if(merges.length==0)return\"\";var o='<mergeCells count=\"'+merges.length+'\">';for(var i=0;i!=merges.length;++i)o+='<mergeCell ref=\"'+encode_range(merges[i])+'\"/>';return o+\"</mergeCells>\"}function write_ws_xml_pagesetup(setup){var pageSetup=writextag(\"pageSetup\",null,{scale:setup.scale||\"100\",orientation:setup.orientation||\"portrait\",horizontalDpi:setup.horizontalDpi||\"4294967292\",verticalDpi:setup.verticalDpi||\"4294967292\"});return pageSetup}function parse_ws_xml_hlinks(s,data,rels){for(var i=0;i!=data.length;++i){var val=parsexmltag(data[i],true);if(!val.ref)return;var rel=rels?rels[\"!id\"][val.id]:null;if(rel){val.Target=rel.Target;if(val.location)val.Target+=\"#\"+val.location;val.Rel=rel}else{val.Target=val.location;rel={Target:val.location,TargetMode:\"Internal\"};val.Rel=rel}var rng=safe_decode_range(val.ref);for(var R=rng.s.r;R<=rng.e.r;++R)for(var C=rng.s.c;C<=rng.e.c;++C){var addr=encode_cell({c:C,r:R});if(!s[addr])s[addr]={t:\"stub\",v:undefined};s[addr].l=val}}}function parse_ws_xml_cols(columns,cols){var seencol=false;for(var coli=0;coli!=cols.length;++coli){var coll=parsexmltag(cols[coli],true);var colm=parseInt(coll.min,10)-1,colM=parseInt(coll.max,10)-1;delete coll.min;delete coll.max;if(!seencol&&coll.width){seencol=true;find_mdw(+coll.width,coll)}if(coll.width){coll.wpx=width2px(+coll.width);coll.wch=px2char(coll.wpx);coll.MDW=MDW}while(colm<=colM)columns[colm++]=coll}}function write_ws_xml_cols(ws,cols){var o=[\"<cols>\"],col,width;for(var i=0;i!=cols.length;++i){if(!(col=cols[i]))continue;var p={min:i+1,max:i+1};width=-1;if(col.wpx)width=px2char(col.wpx);else if(col.wch)width=col.wch;if(width>-1){p.width=char2width(width);p.customWidth=1}o[o.length]=writextag(\"col\",null,p)}o[o.length]=\"</cols>\";return o.join(\"\")}function write_ws_xml_cell(cell,ref,ws,opts,idx,wb){if(cell.v===undefined&&cell.s===undefined)return\"\";var vv=\"\";var oldt=cell.t,oldv=cell.v;switch(cell.t){case\"b\":vv=cell.v?\"1\":\"0\";break;case\"n\":vv=\"\"+cell.v;break;case\"e\":vv=BErr[cell.v];break;case\"d\":if(opts.cellDates)vv=new Date(cell.v).toISOString();else{cell.t=\"n\";vv=\"\"+(cell.v=datenum(cell.v));if(typeof cell.z===\"undefined\")cell.z=SSF._table[14]}break;default:vv=cell.v;break}var v=writetag(\"v\",escapexml(vv)),o={r:ref};var os=get_cell_style(opts.cellXfs,cell,opts);if(os!==0)o.s=os;switch(cell.t){case\"n\":break;case\"d\":o.t=\"d\";break;case\"b\":o.t=\"b\";break;case\"e\":o.t=\"e\";break;default:if(opts.bookSST){v=writetag(\"v\",\"\"+get_sst_id(opts.Strings,cell.v));o.t=\"s\";break}o.t=\"str\";break}if(cell.t!=oldt){cell.t=oldt;cell.v=oldv}return writextag(\"c\",v,o)}var parse_ws_xml_data=function parse_ws_xml_data_factory(){var cellregex=/<(?:\\w+:)?c[ >]/,rowregex=/<\\/(?:\\w+:)?row>/;var rregex=/r=[\"']([^\"']*)[\"']/,isregex=/<is>([\\S\\s]*?)<\\/is>/;var match_v=matchtag(\"v\"),match_f=matchtag(\"f\");return function parse_ws_xml_data(sdata,s,opts,guess){var ri=0,x=\"\",cells=[],cref=[],idx=0,i=0,cc=0,d=\"\",p;var tag,tagr=0,tagc=0;var sstr;var fmtid=0,fillid=0,do_format=Array.isArray(styles.CellXf),cf;for(var marr=sdata.split(rowregex),mt=0,marrlen=marr.length;mt!=marrlen;++mt){x=marr[mt].trim();var xlen=x.length;if(xlen===0)continue;for(ri=0;ri<xlen;++ri)if(x.charCodeAt(ri)===62)break;++ri;tag=parsexmltag(x.substr(0,ri),true);tagr=typeof tag.r!==\"undefined\"?parseInt(tag.r,10):tagr+1;tagc=-1;if(opts.sheetRows&&opts.sheetRows<tagr)continue;if(guess.s.r>tagr-1)guess.s.r=tagr-1;if(guess.e.r<tagr-1)guess.e.r=tagr-1;cells=x.substr(ri).split(cellregex);for(ri=typeof tag.r===\"undefined\"?0:1;ri!=cells.length;++ri){x=cells[ri].trim();if(x.length===0)continue;cref=x.match(rregex);idx=ri;i=0;cc=0;x=\"<c \"+(x.substr(0,1)==\"<\"?\">\":\"\")+x;if(cref!==null&&cref.length===2){idx=0;d=cref[1];for(i=0;i!=d.length;++i){if((cc=d.charCodeAt(i)-64)<1||cc>26)break;idx=26*idx+cc}--idx;tagc=idx}else++tagc;for(i=0;i!=x.length;++i)if(x.charCodeAt(i)===62)break;++i;tag=parsexmltag(x.substr(0,i),true);if(!tag.r)tag.r=utils.encode_cell({r:tagr-1,c:tagc});d=x.substr(i);p={t:\"\"};if((cref=d.match(match_v))!==null&&cref[1]!==\"\")p.v=unescapexml(cref[1]);if(opts.cellFormula&&(cref=d.match(match_f))!==null)p.f=unescapexml(cref[1]);if(tag.t===undefined&&tag.s===undefined&&p.v===undefined){if(!opts.sheetStubs)continue;p.t=\"stub\"}else p.t=tag.t||\"n\";if(guess.s.c>idx)guess.s.c=idx;if(guess.e.c<idx)guess.e.c=idx;switch(p.t){case\"n\":p.v=parseFloat(p.v);if(isNaN(p.v))p.v=\"\";break;case\"s\":sstr=strs[parseInt(p.v,10)];p.v=sstr.t;p.r=sstr.r;if(opts.cellHTML)p.h=sstr.h;break;case\"str\":p.t=\"s\";p.v=p.v!=null?utf8read(p.v):\"\";if(opts.cellHTML)p.h=p.v;break;case\"inlineStr\":cref=d.match(isregex);p.t=\"s\";if(cref!==null){sstr=parse_si(cref[1]);p.v=sstr.t}else p.v=\"\";break;case\"b\":p.v=parsexmlbool(p.v);break;case\"d\":if(!opts.cellDates){p.v=datenum(p.v);p.t=\"n\"}break;case\"e\":p.w=p.v;p.v=RBErr[p.v];break}fmtid=fillid=0;if(do_format&&tag.s!==undefined){cf=styles.CellXf[tag.s];if(opts.cellStyles){p.s=get_cell_style_csf(cf)}if(cf!=null){if(cf.numFmtId!=null)fmtid=cf.numFmtId;if(opts.cellStyles&&cf.fillId!=null)fillid=cf.fillId}}safe_format(p,fmtid,fillid,opts);s[tag.r]=p}}}}();function write_ws_xml_data(ws,opts,idx,wb){var o=[],r=[],range=safe_decode_range(ws[\"!ref\"]),cell,ref,rr=\"\",cols=[],R,C;for(C=range.s.c;C<=range.e.c;++C)cols[C]=encode_col(C);for(R=range.s.r;R<=range.e.r;++R){r=[];rr=encode_row(R);for(C=range.s.c;C<=range.e.c;++C){ref=cols[C]+rr;if(ws[ref]===undefined)continue;if((cell=write_ws_xml_cell(ws[ref],ref,ws,opts,idx,wb))!=null)r.push(cell)}if(r.length>0)o[o.length]=writextag(\"row\",r.join(\"\"),{r:rr})}return o.join(\"\")}var WS_XML_ROOT=writextag(\"worksheet\",null,{xmlns:XMLNS.main[0],\"xmlns:r\":XMLNS.r});function write_ws_xml(idx,opts,wb){var o=[XML_HEADER,WS_XML_ROOT];var s=wb.SheetNames[idx],sidx=0,rdata=\"\";var ws=wb.Sheets[s];if(ws===undefined)ws={};var ref=ws[\"!ref\"];if(ref===undefined)ref=\"A1\";o[o.length]=writextag(\"dimension\",null,{ref:ref});var sheetView=writextag(\"sheetView\",null,{showGridLines:opts.showGridLines==false?\"0\":\"1\",tabSelected:opts.tabSelected===undefined?\"0\":opts.tabSelected,workbookViewId:opts.workbookViewId===undefined?\"0\":opts.workbookViewId});o[o.length]=writextag(\"sheetViews\",sheetView);if(ws[\"!cols\"]!==undefined&&ws[\"!cols\"].length>0)o[o.length]=write_ws_xml_cols(ws,ws[\"!cols\"]);o[sidx=o.length]=\"<sheetData/>\";if(ws[\"!ref\"]!==undefined){rdata=write_ws_xml_data(ws,opts,idx,wb);if(rdata.length>0)o[o.length]=rdata}if(o.length>sidx+1){o[o.length]=\"</sheetData>\";o[sidx]=o[sidx].replace(\"/>\",\">\")}if(ws[\"!merges\"]!==undefined&&ws[\"!merges\"].length>0)o[o.length]=write_ws_xml_merges(ws[\"!merges\"]);if(ws[\"!pageSetup\"]!==undefined)o[o.length]=write_ws_xml_pagesetup(ws[\"!pageSetup\"]);if(ws[\"!rowBreaks\"]!==undefined)o[o.length]=write_ws_xml_row_breaks(ws[\"!rowBreaks\"]);if(ws[\"!colBreaks\"]!==undefined)o[o.length]=write_ws_xml_col_breaks(ws[\"!colBreaks\"]);if(o.length>2){o[o.length]=\"</worksheet>\";o[1]=o[1].replace(\"/>\",\">\")}return o.join(\"\")}function write_ws_xml_row_breaks(breaks){console.log(\"Writing breaks\");var brk=[];for(var i=0;i<breaks.length;i++){var thisBreak=\"\"+breaks[i];var nextBreak=\"\"+(breaks[i+1]||\"16383\");brk.push(writextag(\"brk\",null,{id:thisBreak,max:nextBreak,man:\"1\"}))}return writextag(\"rowBreaks\",brk.join(\" \"),{count:brk.length,manualBreakCount:brk.length})}function write_ws_xml_col_breaks(breaks){console.log(\"Writing breaks\");var brk=[];for(var i=0;i<breaks.length;i++){var thisBreak=\"\"+breaks[i];var nextBreak=\"\"+(breaks[i+1]||\"1048575\");brk.push(writextag(\"brk\",null,{id:thisBreak,max:nextBreak,man:\"1\"}))}return writextag(\"colBreaks\",brk.join(\" \"),{count:brk.length,manualBreakCount:brk.length})}function parse_BrtRowHdr(data,length){var z=[];z.r=data.read_shift(4);data.l+=length-4;return z}var parse_BrtWsDim=parse_UncheckedRfX;var write_BrtWsDim=write_UncheckedRfX;function parse_BrtWsProp(data,length){var z={};data.l+=19;z.name=parse_XLSBCodeName(data,length-19);return z}function parse_BrtCellBlank(data,length){var cell=parse_XLSBCell(data);return[cell]}function write_BrtCellBlank(cell,val,o){if(o==null)o=new_buf(8);return write_XLSBCell(val,o)}function parse_BrtCellBool(data,length){var cell=parse_XLSBCell(data);var fBool=data.read_shift(1);return[cell,fBool,\"b\"]}function parse_BrtCellError(data,length){var cell=parse_XLSBCell(data);var fBool=data.read_shift(1);return[cell,fBool,\"e\"]}function parse_BrtCellIsst(data,length){var cell=parse_XLSBCell(data);var isst=data.read_shift(4);return[cell,isst,\"s\"]}function parse_BrtCellReal(data,length){var cell=parse_XLSBCell(data);var value=parse_Xnum(data);return[cell,value,\"n\"]}function parse_BrtCellRk(data,length){var cell=parse_XLSBCell(data);var value=parse_RkNumber(data);return[cell,value,\"n\"]}function parse_BrtCellSt(data,length){var cell=parse_XLSBCell(data);var value=parse_XLWideString(data);return[cell,value,\"str\"]}function parse_BrtFmlaBool(data,length,opts){var cell=parse_XLSBCell(data);var value=data.read_shift(1);var o=[cell,value,\"b\"];if(opts.cellFormula){var formula=parse_XLSBCellParsedFormula(data,length-9);o[3]=\"\"}else data.l+=length-9;return o}function parse_BrtFmlaError(data,length,opts){var cell=parse_XLSBCell(data);var value=data.read_shift(1);var o=[cell,value,\"e\"];if(opts.cellFormula){var formula=parse_XLSBCellParsedFormula(data,length-9);o[3]=\"\"}else data.l+=length-9;return o}function parse_BrtFmlaNum(data,length,opts){var cell=parse_XLSBCell(data);var value=parse_Xnum(data);var o=[cell,value,\"n\"];if(opts.cellFormula){var formula=parse_XLSBCellParsedFormula(data,length-16);o[3]=\"\"}else data.l+=length-16;return o}function parse_BrtFmlaString(data,length,opts){var start=data.l;var cell=parse_XLSBCell(data);var value=parse_XLWideString(data);var o=[cell,value,\"str\"];if(opts.cellFormula){var formula=parse_XLSBCellParsedFormula(data,start+length-data.l)}else data.l=start+length;return o}var parse_BrtMergeCell=parse_UncheckedRfX;function parse_BrtHLink(data,length,opts){var end=data.l+length;var rfx=parse_UncheckedRfX(data,16);var relId=parse_XLNullableWideString(data);var loc=parse_XLWideString(data);var tooltip=parse_XLWideString(data);var display=parse_XLWideString(data);data.l=end;return{rfx:rfx,relId:relId,loc:loc,tooltip:tooltip,display:display}}function parse_ws_bin(data,opts,rels){if(!data)return data;if(!rels)rels={\"!id\":{}};var s={};var ref;var refguess={s:{r:1e6,c:1e6},e:{r:0,c:0}};var pass=false,end=false;var row,p,cf,R,C,addr,sstr,rr;var mergecells=[];recordhopper(data,function ws_parse(val,R){if(end)return;switch(R.n){case\"BrtWsDim\":ref=val;break;case\"BrtRowHdr\":row=val;if(opts.sheetRows&&opts.sheetRows<=row.r)end=true;rr=encode_row(row.r);break;case\"BrtFmlaBool\":case\"BrtFmlaError\":case\"BrtFmlaNum\":case\"BrtFmlaString\":case\"BrtCellBool\":case\"BrtCellError\":case\"BrtCellIsst\":case\"BrtCellReal\":case\"BrtCellRk\":case\"BrtCellSt\":p={t:val[2]};switch(val[2]){case\"n\":p.v=val[1];break;case\"s\":sstr=strs[val[1]];p.v=sstr.t;p.r=sstr.r;break;case\"b\":p.v=val[1]?true:false;break;case\"e\":p.v=val[1];p.w=BErr[p.v];break;case\"str\":p.t=\"s\";p.v=utf8read(val[1]);break}if(opts.cellFormula&&val.length>3)p.f=val[3];if(cf=styles.CellXf[val[0].iStyleRef])safe_format(p,cf.ifmt,null,opts);s[encode_col(C=val[0].c)+rr]=p;if(refguess.s.r>row.r)refguess.s.r=row.r;if(refguess.s.c>C)refguess.s.c=C;if(refguess.e.r<row.r)refguess.e.r=row.r;if(refguess.e.c<C)refguess.e.c=C;break;case\"BrtCellBlank\":if(!opts.sheetStubs)break;p={t:\"s\",v:undefined};s[encode_col(C=val[0].c)+rr]=p;if(refguess.s.r>row.r)refguess.s.r=row.r;if(refguess.s.c>C)refguess.s.c=C;if(refguess.e.r<row.r)refguess.e.r=row.r;if(refguess.e.c<C)refguess.e.c=C;break;case\"BrtBeginMergeCells\":break;case\"BrtEndMergeCells\":break;case\"BrtMergeCell\":mergecells.push(val);break;case\"BrtHLink\":var rel=rels[\"!id\"][val.relId];if(rel){val.Target=rel.Target;if(val.loc)val.Target+=\"#\"+val.loc;val.Rel=rel}for(R=val.rfx.s.r;R<=val.rfx.e.r;++R)for(C=val.rfx.s.c;C<=val.rfx.e.c;++C){addr=encode_cell({c:C,r:R});if(!s[addr])s[addr]={t:\"s\",v:undefined};s[addr].l=val}break;case\"BrtArrFmla\":break;case\"BrtShrFmla\":break;case\"BrtBeginSheet\":break;case\"BrtWsProp\":break;case\"BrtSheetCalcProp\":break;case\"BrtBeginWsViews\":break;case\"BrtBeginWsView\":break;case\"BrtPane\":break;case\"BrtSel\":break;case\"BrtEndWsView\":break;case\"BrtEndWsViews\":break;case\"BrtACBegin\":break;case\"BrtRwDescent\":break;case\"BrtACEnd\":break;case\"BrtWsFmtInfoEx14\":break;case\"BrtWsFmtInfo\":break;case\"BrtBeginColInfos\":break;case\"BrtColInfo\":break;case\"BrtEndColInfos\":break;case\"BrtBeginSheetData\":break;case\"BrtEndSheetData\":break;case\"BrtSheetProtection\":break;case\"BrtPrintOptions\":break;case\"BrtMargins\":break;case\"BrtPageSetup\":break;case\"BrtFRTBegin\":pass=true;break;case\"BrtFRTEnd\":pass=false;break;case\"BrtEndSheet\":break;case\"BrtDrawing\":break;case\"BrtLegacyDrawing\":break;case\"BrtLegacyDrawingHF\":break;case\"BrtPhoneticInfo\":break;case\"BrtBeginHeaderFooter\":break;case\"BrtEndHeaderFooter\":break;case\"BrtBrk\":break;case\"BrtBeginRwBrk\":break;case\"BrtEndRwBrk\":break;case\"BrtBeginColBrk\":break;case\"BrtEndColBrk\":break;case\"BrtBeginUserShViews\":break;case\"BrtBeginUserShView\":break;case\"BrtEndUserShView\":break;case\"BrtEndUserShViews\":break;case\"BrtBkHim\":break;case\"BrtBeginOleObjects\":break;case\"BrtOleObject\":break;case\"BrtEndOleObjects\":break;case\"BrtBeginListParts\":break;case\"BrtListPart\":break;case\"BrtEndListParts\":break;case\"BrtBeginSortState\":break;case\"BrtBeginSortCond\":break;case\"BrtEndSortCond\":break;case\"BrtEndSortState\":break;case\"BrtBeginConditionalFormatting\":break;case\"BrtEndConditionalFormatting\":break;case\"BrtBeginCFRule\":break;case\"BrtEndCFRule\":break;case\"BrtBeginDVals\":break;case\"BrtDVal\":break;case\"BrtEndDVals\":break;case\"BrtRangeProtection\":break;case\"BrtBeginDCon\":break;case\"BrtEndDCon\":break;case\"BrtBeginDRefs\":break;case\"BrtDRef\":break;case\"BrtEndDRefs\":break;case\"BrtBeginActiveXControls\":break;case\"BrtActiveX\":break;case\"BrtEndActiveXControls\":break;case\"BrtBeginAFilter\":break;case\"BrtEndAFilter\":break;case\"BrtBeginFilterColumn\":break;case\"BrtBeginFilters\":break;case\"BrtFilter\":break;case\"BrtEndFilters\":break;case\"BrtEndFilterColumn\":break;case\"BrtDynamicFilter\":break;case\"BrtTop10Filter\":break;case\"BrtBeginCustomFilters\":break;case\"BrtCustomFilter\":break;case\"BrtEndCustomFilters\":break;case\"BrtBeginSmartTags\":break;case\"BrtBeginCellSmartTags\":break;case\"BrtBeginCellSmartTag\":break;case\"BrtCellSmartTagProperty\":break;case\"BrtEndCellSmartTag\":break;case\"BrtEndCellSmartTags\":break;case\"BrtEndSmartTags\":break;case\"BrtBeginCellWatches\":break;case\"BrtCellWatch\":break;case\"BrtEndCellWatches\":break;case\"BrtTable\":break;case\"BrtBeginCellIgnoreECs\":break;case\"BrtCellIgnoreEC\":break;case\"BrtEndCellIgnoreECs\":break;default:if(!pass||opts.WTF)throw new Error(\"Unexpected record \"+R.n)}},opts);if(!s[\"!ref\"]&&(refguess.s.r<1e6||ref.e.r>0||ref.e.c>0||ref.s.r>0||ref.s.c>0))s[\"!ref\"]=encode_range(ref);if(opts.sheetRows&&s[\"!ref\"]){var tmpref=safe_decode_range(s[\"!ref\"]);if(opts.sheetRows<+tmpref.e.r){tmpref.e.r=opts.sheetRows-1;if(tmpref.e.r>refguess.e.r)tmpref.e.r=refguess.e.r;if(tmpref.e.r<tmpref.s.r)tmpref.s.r=tmpref.e.r;if(tmpref.e.c>refguess.e.c)tmpref.e.c=refguess.e.c;if(tmpref.e.c<tmpref.s.c)tmpref.s.c=tmpref.e.c;s[\"!fullref\"]=s[\"!ref\"];s[\"!ref\"]=encode_range(tmpref)}}if(mergecells.length>0)s[\"!merges\"]=mergecells;return s}function write_ws_bin_cell(ba,cell,R,C,opts){if(cell.v===undefined)return\"\";var vv=\"\";switch(cell.t){case\"b\":vv=cell.v?\"1\":\"0\";break;case\"n\":case\"e\":vv=\"\"+cell.v;break;default:vv=cell.v;break}var o={r:R,c:C};o.s=get_cell_style(opts.cellXfs,cell,opts);switch(cell.t){case\"s\":case\"str\":if(opts.bookSST){vv=get_sst_id(opts.Strings,cell.v);o.t=\"s\";break}o.t=\"str\";break;case\"n\":break;case\"b\":o.t=\"b\";break;case\"e\":o.t=\"e\";break}write_record(ba,\"BrtCellBlank\",write_BrtCellBlank(cell,o))}function write_CELLTABLE(ba,ws,idx,opts,wb){var range=safe_decode_range(ws[\"!ref\"]||\"A1\"),ref,rr=\"\",cols=[];write_record(ba,\"BrtBeginSheetData\");for(var R=range.s.r;R<=range.e.r;++R){rr=encode_row(R);for(var C=range.s.c;C<=range.e.c;++C){if(R===range.s.r)cols[C]=encode_col(C);ref=cols[C]+rr;if(!ws[ref])continue;write_ws_bin_cell(ba,ws[ref],R,C,opts)}}write_record(ba,\"BrtEndSheetData\")}function write_ws_bin(idx,opts,wb){var ba=buf_array();var s=wb.SheetNames[idx],ws=wb.Sheets[s]||{};var r=safe_decode_range(ws[\"!ref\"]||\"A1\");write_record(ba,\"BrtBeginSheet\");write_record(ba,\"BrtWsDim\",write_BrtWsDim(r));write_CELLTABLE(ba,ws,idx,opts,wb);write_record(ba,\"BrtEndSheet\");return ba.end()}var WBPropsDef=[[\"allowRefreshQuery\",\"0\"],[\"autoCompressPictures\",\"1\"],[\"backupFile\",\"0\"],[\"checkCompatibility\",\"0\"],[\"codeName\",\"\"],[\"date1904\",\"0\"],[\"dateCompatibility\",\"1\"],[\"filterPrivacy\",\"0\"],[\"hidePivotFieldList\",\"0\"],[\"promptedSolutions\",\"0\"],[\"publishItems\",\"0\"],[\"refreshAllConnections\",false],[\"saveExternalLinkValues\",\"1\"],[\"showBorderUnselectedTables\",\"1\"],[\"showInkAnnotation\",\"1\"],[\"showObjects\",\"all\"],[\"showPivotChartFilter\",\"0\"]];var WBViewDef=[[\"activeTab\",\"0\"],[\"autoFilterDateGrouping\",\"1\"],[\"firstSheet\",\"0\"],[\"minimized\",\"0\"],[\"showHorizontalScroll\",\"1\"],[\"showSheetTabs\",\"1\"],[\"showVerticalScroll\",\"1\"],[\"tabRatio\",\"600\"],[\"visibility\",\"visible\"]];var SheetDef=[[\"state\",\"visible\"]];var CalcPrDef=[[\"calcCompleted\",\"true\"],[\"calcMode\",\"auto\"],[\"calcOnSave\",\"true\"],[\"concurrentCalc\",\"true\"],[\"fullCalcOnLoad\",\"false\"],[\"fullPrecision\",\"true\"],[\"iterate\",\"false\"],[\"iterateCount\",\"100\"],[\"iterateDelta\",\"0.001\"],[\"refMode\",\"A1\"]];var CustomWBViewDef=[[\"autoUpdate\",\"false\"],[\"changesSavedWin\",\"false\"],[\"includeHiddenRowCol\",\"true\"],[\"includePrintSettings\",\"true\"],[\"maximized\",\"false\"],[\"minimized\",\"false\"],[\"onlySync\",\"false\"],[\"personalView\",\"false\"],[\"showComments\",\"commIndicator\"],[\"showFormulaBar\",\"true\"],[\"showHorizontalScroll\",\"true\"],[\"showObjects\",\"all\"],[\"showSheetTabs\",\"true\"],[\"showStatusbar\",\"true\"],[\"showVerticalScroll\",\"true\"],[\"tabRatio\",\"600\"],[\"xWindow\",\"0\"],[\"yWindow\",\"0\"]];function push_defaults_array(target,defaults){for(var j=0;j!=target.length;++j){var w=target[j];for(var i=0;i!=defaults.length;++i){var z=defaults[i];if(w[z[0]]==null)w[z[0]]=z[1]}}}function push_defaults(target,defaults){for(var i=0;i!=defaults.length;++i){var z=defaults[i];if(target[z[0]]==null)target[z[0]]=z[1]}}function parse_wb_defaults(wb){push_defaults(wb.WBProps,WBPropsDef);push_defaults(wb.CalcPr,CalcPrDef);push_defaults_array(wb.WBView,WBViewDef);push_defaults_array(wb.Sheets,SheetDef);_ssfopts.date1904=parsexmlbool(wb.WBProps.date1904,\"date1904\")}var wbnsregex=/<\\w+:workbook/;function parse_wb_xml(data,opts){var wb={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:\"\"};var pass=false,xmlns=\"xmlns\";data.match(tagregex).forEach(function xml_wb(x){var y=parsexmltag(x);switch(strip_ns(y[0])){case\"<?xml\":break;case\"<workbook\":if(x.match(wbnsregex))xmlns=\"xmlns\"+x.match(/<(\\w+):/)[1];wb.xmlns=y[xmlns];break;case\"</workbook>\":break;case\"<fileVersion\":delete y[0];wb.AppVersion=y;break;case\"<fileVersion/>\":break;case\"<fileSharing\":case\"<fileSharing/>\":break;case\"<workbookPr\":delete y[0];wb.WBProps=y;break;case\"<workbookPr/>\":delete y[0];wb.WBProps=y;break;case\"<workbookProtection\":break;case\"<workbookProtection/>\":break;case\"<bookViews>\":case\"</bookViews>\":break;case\"<workbookView\":delete y[0];wb.WBView.push(y);break;case\"<sheets>\":case\"</sheets>\":break;case\"<sheet\":delete y[0];y.name=utf8read(y.name);wb.Sheets.push(y);break;case\"<functionGroups\":case\"<functionGroups/>\":break;case\"<functionGroup\":break;case\"<externalReferences\":case\"</externalReferences>\":case\"<externalReferences>\":break;case\"<externalReference\":break;case\"<definedNames/>\":break;case\"<definedNames>\":case\"<definedNames\":pass=true;break;case\"</definedNames>\":pass=false;break;case\"<definedName\":case\"<definedName/>\":case\"</definedName>\":break;case\"<calcPr\":delete y[0];wb.CalcPr=y;break;case\"<calcPr/>\":delete y[0];wb.CalcPr=y;break;case\"<oleSize\":break;case\"<customWorkbookViews>\":case\"</customWorkbookViews>\":case\"<customWorkbookViews\":break;case\"<customWorkbookView\":case\"</customWorkbookView>\":break;case\"<pivotCaches>\":case\"</pivotCaches>\":case\"<pivotCaches\":break;case\"<pivotCache\":break;case\"<smartTagPr\":case\"<smartTagPr/>\":break;case\"<smartTagTypes\":case\"<smartTagTypes>\":case\"</smartTagTypes>\":break;case\"<smartTagType\":break;case\"<webPublishing\":case\"<webPublishing/>\":break;case\"<fileRecoveryPr\":case\"<fileRecoveryPr/>\":break;case\"<webPublishObjects>\":case\"<webPublishObjects\":case\"</webPublishObjects>\":break;case\"<webPublishObject\":break;case\"<extLst>\":case\"</extLst>\":case\"<extLst/>\":break;case\"<ext\":pass=true;break;case\"</ext>\":pass=false;break;case\"<ArchID\":break;case\"<AlternateContent\":pass=true;break;case\"</AlternateContent>\":pass=false;break;default:if(!pass&&opts.WTF)throw\"unrecognized \"+y[0]+\" in workbook\"}});if(XMLNS.main.indexOf(wb.xmlns)===-1)throw new Error(\"Unknown Namespace: \"+wb.xmlns);parse_wb_defaults(wb);return wb}var WB_XML_ROOT=writextag(\"workbook\",null,{xmlns:XMLNS.main[0],\"xmlns:r\":XMLNS.r});function safe1904(wb){try{return parsexmlbool(wb.Workbook.WBProps.date1904)?\"true\":\"false\"}catch(e){return\"false\"}}function write_wb_xml(wb,opts){var o=[XML_HEADER];o[o.length]=WB_XML_ROOT;o[o.length]=writextag(\"workbookPr\",null,{date1904:safe1904(wb)});o[o.length]=\"<sheets>\";for(var i=0;i!=wb.SheetNames.length;++i)o[o.length]=writextag(\"sheet\",null,{name:wb.SheetNames[i].substr(0,31),sheetId:\"\"+(i+1),\"r:id\":\"rId\"+(i+1)});o[o.length]=\"</sheets>\";var hasPrintHeaders=false;for(var i=0;i!=wb.SheetNames.length;++i){var sheetName=wb.SheetNames[i];var sheet=wb.Sheets[sheetName];if(sheet[\"!printHeader\"]){if(sheet[\"!printHeader\"].length!==2){throw\"!printHeaders must be an array of length 2: \"+sheet[\"!printHeader\"]}hasPrintHeaders=true}}if(hasPrintHeaders){o[o.length]=\"<definedNames>\";for(var i=0;i!=wb.SheetNames.length;++i){var sheetName=wb.SheetNames[i];var sheet=wb.Sheets[sheetName];if(sheet[\"!printHeader\"])var range=\"'\"+sheetName+\"'!\"+sheet[\"!printHeader\"];console.log(\"!!!!\"+range);o[o.length]=writextag(\"definedName\",range,{name:\"_xlnm.Print_Titles\",localSheetId:\"\"+i})}o[o.length]=\"</definedNames>\"}if(o.length>2){o[o.length]=\"</workbook>\";o[1]=o[1].replace(\"/>\",\">\")}return o.join(\"\")}function parse_BrtBundleSh(data,length){var z={};z.hsState=data.read_shift(4);z.iTabID=data.read_shift(4);z.strRelID=parse_RelID(data,length-8);z.name=parse_XLWideString(data);return z}function write_BrtBundleSh(data,o){if(!o)o=new_buf(127);o.write_shift(4,data.hsState);o.write_shift(4,data.iTabID);write_RelID(data.strRelID,o);write_XLWideString(data.name.substr(0,31),o);return o}function parse_BrtWbProp(data,length){data.read_shift(4);var dwThemeVersion=data.read_shift(4);var strName=length>8?parse_XLWideString(data):\"\";return[dwThemeVersion,strName]}function write_BrtWbProp(data,o){if(!o)o=new_buf(8);o.write_shift(4,0);o.write_shift(4,0);return o}function parse_BrtFRTArchID$(data,length){var o={};data.read_shift(4);o.ArchID=data.read_shift(4);data.l+=length-8;return o}function parse_wb_bin(data,opts){var wb={AppVersion:{},WBProps:{},WBView:[],Sheets:[],CalcPr:{},xmlns:\"\"};var pass=false,z;recordhopper(data,function hopper_wb(val,R){switch(R.n){case\"BrtBundleSh\":wb.Sheets.push(val);break;case\"BrtBeginBook\":break;case\"BrtFileVersion\":break;case\"BrtWbProp\":break;case\"BrtACBegin\":break;case\"BrtAbsPath15\":break;case\"BrtACEnd\":break;case\"BrtWbFactoid\":break;case\"BrtBookProtection\":break;case\"BrtBeginBookViews\":break;case\"BrtBookView\":break;case\"BrtEndBookViews\":break;case\"BrtBeginBundleShs\":break;case\"BrtEndBundleShs\":break;case\"BrtBeginFnGroup\":break;case\"BrtEndFnGroup\":break;case\"BrtBeginExternals\":break;case\"BrtSupSelf\":break;case\"BrtSupBookSrc\":break;case\"BrtExternSheet\":break;case\"BrtEndExternals\":break;case\"BrtName\":break;case\"BrtCalcProp\":break;case\"BrtUserBookView\":break;case\"BrtBeginPivotCacheIDs\":break;case\"BrtBeginPivotCacheID\":break;case\"BrtEndPivotCacheID\":break;case\"BrtEndPivotCacheIDs\":break;case\"BrtWebOpt\":break;case\"BrtFileRecover\":break;case\"BrtFileSharing\":break;case\"BrtBeginSmartTagTypes\":break;case\"BrtSmartTagType\":break;case\"BrtEndSmartTagTypes\":break;case\"BrtFRTBegin\":pass=true;break;case\"BrtFRTArchID$\":break;case\"BrtWorkBookPr15\":break;case\"BrtFRTEnd\":pass=false;break;case\"BrtEndBook\":break;default:if(!pass||opts.WTF)throw new Error(\"Unexpected record \"+R.n)}});parse_wb_defaults(wb);return wb}function write_BUNDLESHS(ba,wb,opts){write_record(ba,\"BrtBeginBundleShs\");for(var idx=0;idx!=wb.SheetNames.length;++idx){var d={hsState:0,iTabID:idx+1,strRelID:\"rId\"+(idx+1),name:wb.SheetNames[idx]};write_record(ba,\"BrtBundleSh\",write_BrtBundleSh(d))}write_record(ba,\"BrtEndBundleShs\")}function write_BrtFileVersion(data,o){if(!o)o=new_buf(127);for(var i=0;i!=4;++i)o.write_shift(4,0);write_XLWideString(\"SheetJS\",o);write_XLWideString(XLSX.version,o);write_XLWideString(XLSX.version,o);write_XLWideString(\"7262\",o);o.length=o.l;return o}function write_BOOKVIEWS(ba,wb,opts){write_record(ba,\"BrtBeginBookViews\");write_record(ba,\"BrtEndBookViews\")}function write_BrtCalcProp(data,o){if(!o)o=new_buf(26);o.write_shift(4,0);o.write_shift(4,1);o.write_shift(4,0);write_Xnum(0,o);o.write_shift(-4,1023);o.write_shift(1,51);o.write_shift(1,0);return o}function write_BrtFileRecover(data,o){if(!o)o=new_buf(1);o.write_shift(1,0);return o}function write_wb_bin(wb,opts){var ba=buf_array();write_record(ba,\"BrtBeginBook\");write_record(ba,\"BrtFileVersion\",write_BrtFileVersion());write_record(ba,\"BrtWbProp\",write_BrtWbProp());write_BOOKVIEWS(ba,wb,opts);write_BUNDLESHS(ba,wb,opts);write_record(ba,\"BrtCalcProp\",write_BrtCalcProp());write_record(ba,\"BrtFileRecover\",write_BrtFileRecover());write_record(ba,\"BrtEndBook\");return ba.end()}function parse_wb(data,name,opts){return(name.substr(-4)===\".bin\"?parse_wb_bin:parse_wb_xml)(data,opts)}function parse_ws(data,name,opts,rels){return(name.substr(-4)===\".bin\"?parse_ws_bin:parse_ws_xml)(data,opts,rels)}function parse_sty(data,name,opts){return(name.substr(-4)===\".bin\"?parse_sty_bin:parse_sty_xml)(data,opts)}function parse_theme(data,name,opts){return parse_theme_xml(data,opts)}function parse_sst(data,name,opts){return(name.substr(-4)===\".bin\"?parse_sst_bin:parse_sst_xml)(data,opts)}function parse_cmnt(data,name,opts){return(name.substr(-4)===\".bin\"?parse_comments_bin:parse_comments_xml)(data,opts)}function parse_cc(data,name,opts){return(name.substr(-4)===\".bin\"?parse_cc_bin:parse_cc_xml)(data,opts)}function write_wb(wb,name,opts){return(name.substr(-4)===\".bin\"?write_wb_bin:write_wb_xml)(wb,opts)}function write_ws(data,name,opts,wb){return(name.substr(-4)===\".bin\"?write_ws_bin:write_ws_xml)(data,opts,wb)}function write_sty(data,name,opts){return(name.substr(-4)===\".bin\"?write_sty_bin:write_sty_xml)(data,opts)}function write_sst(data,name,opts){return(name.substr(-4)===\".bin\"?write_sst_bin:write_sst_xml)(data,opts)}var attregexg2=/([\\w:]+)=((?:\")([^\"]*)(?:\")|(?:')([^']*)(?:'))/g;var attregex2=/([\\w:]+)=((?:\")(?:[^\"]*)(?:\")|(?:')(?:[^']*)(?:'))/;var _chr=function(c){return String.fromCharCode(c)};function xlml_parsexmltag(tag,skip_root){var words=tag.split(/\\s+/);var z=[];if(!skip_root)z[0]=words[0];if(words.length===1)return z;var m=tag.match(attregexg2),y,j,w,i;if(m)for(i=0;i!=m.length;++i){y=m[i].match(attregex2);if((j=y[1].indexOf(\":\"))===-1)z[y[1]]=y[2].substr(1,y[2].length-2);else{if(y[1].substr(0,6)===\"xmlns:\")w=\"xmlns\"+y[1].substr(6);else w=y[1].substr(j+1);z[w]=y[2].substr(1,y[2].length-2)}}return z}function xlml_parsexmltagobj(tag){var words=tag.split(/\\s+/);var z={};if(words.length===1)return z;var m=tag.match(attregexg2),y,j,w,i;if(m)for(i=0;i!=m.length;++i){y=m[i].match(attregex2);if((j=y[1].indexOf(\":\"))===-1)z[y[1]]=y[2].substr(1,y[2].length-2);else{if(y[1].substr(0,6)===\"xmlns:\")w=\"xmlns\"+y[1].substr(6);else w=y[1].substr(j+1);z[w]=y[2].substr(1,y[2].length-2)}}return z}function xlml_format(format,value){var fmt=XLMLFormatMap[format]||unescapexml(format);if(fmt===\"General\")return SSF._general(value);return SSF.format(fmt,value)}function xlml_set_custprop(Custprops,Rn,cp,val){switch((cp[0].match(/dt:dt=\"([\\w.]+)\"/)||[\"\",\"\"])[1]){case\"boolean\":val=parsexmlbool(val);break;case\"i2\":case\"int\":val=parseInt(val,10);break;case\"r4\":case\"float\":val=parseFloat(val);break;case\"date\":case\"dateTime.tz\":val=new Date(val);break;case\"i8\":case\"string\":case\"fixed\":case\"uuid\":case\"bin.base64\":break;default:throw\"bad custprop:\"+cp[0]}Custprops[unescapexml(Rn[3])]=val}function safe_format_xlml(cell,nf,o){try{if(cell.t===\"e\"){cell.w=cell.w||BErr[cell.v]}else if(nf===\"General\"){if(cell.t===\"n\"){if((cell.v|0)===cell.v)cell.w=SSF._general_int(cell.v);else cell.w=SSF._general_num(cell.v)}else cell.w=SSF._general(cell.v)}else cell.w=xlml_format(nf||\"General\",cell.v);if(o.cellNF)cell.z=XLMLFormatMap[nf]||nf||\"General\"}catch(e){if(o.WTF)throw e}}function process_style_xlml(styles,stag,opts){if(opts.cellStyles){if(stag.Interior){var I=stag.Interior;if(I.Pattern)I.patternType=XLMLPatternTypeMap[I.Pattern]||I.Pattern}}styles[stag.ID]=stag}function parse_xlml_data(xml,ss,data,cell,base,styles,csty,row,o){var nf=\"General\",sid=cell.StyleID,S={};o=o||{};var interiors=[];if(sid===undefined&&row)sid=row.StyleID;if(sid===undefined&&csty)sid=csty.StyleID;while(styles[sid]!==undefined){if(styles[sid].nf)nf=styles[sid].nf;if(styles[sid].Interior)interiors.push(styles[sid].Interior);if(!styles[sid].Parent)break;sid=styles[sid].Parent}switch(data.Type){case\"Boolean\":cell.t=\"b\";cell.v=parsexmlbool(xml);break;case\"String\":cell.t=\"s\";cell.r=xlml_fixstr(unescapexml(xml));cell.v=xml.indexOf(\"<\")>-1?ss:cell.r;break;case\"DateTime\":cell.v=(Date.parse(xml)-new Date(Date.UTC(1899,11,30)))/(24*60*60*1e3);if(cell.v!==cell.v)cell.v=unescapexml(xml);else if(cell.v>=1&&cell.v<60)cell.v=cell.v-1;if(!nf||nf==\"General\")nf=\"yyyy-mm-dd\";case\"Number\":if(cell.v===undefined)cell.v=+xml;\r\nif(!cell.t)cell.t=\"n\";break;case\"Error\":cell.t=\"e\";cell.v=RBErr[xml];cell.w=xml;break;default:cell.t=\"s\";cell.v=xlml_fixstr(ss);break}safe_format_xlml(cell,nf,o);if(o.cellFormula!=null&&cell.Formula){cell.f=rc_to_a1(unescapexml(cell.Formula),base);cell.Formula=undefined}if(o.cellStyles){interiors.forEach(function(x){if(!S.patternType&&x.patternType)S.patternType=x.patternType});cell.s=S}cell.ixfe=cell.StyleID!==undefined?cell.StyleID:\"Default\"}function xlml_clean_comment(comment){comment.t=comment.v;comment.v=comment.w=comment.ixfe=undefined}function xlml_normalize(d){if(has_buf&&Buffer.isBuffer(d))return d.toString(\"utf8\");if(typeof d===\"string\")return d;throw\"badf\"}var xlmlregex=/<(\\/?)([a-z0-9]*:|)(\\w+)[^>]*>/gm;function parse_xlml_xml(d,opts){var str=xlml_normalize(d);var Rn;var state=[],tmp;var sheets={},sheetnames=[],cursheet={},sheetname=\"\";var table={},cell={},row={},dtag,didx;var c=0,r=0;var refguess={s:{r:1e6,c:1e6},e:{r:0,c:0}};var styles={},stag={};var ss=\"\",fidx=0;var mergecells=[];var Props={},Custprops={},pidx=0,cp={};var comments=[],comment={};var cstys=[],csty;xlmlregex.lastIndex=0;while(Rn=xlmlregex.exec(str))switch(Rn[3]){case\"Data\":if(state[state.length-1][1])break;if(Rn[1]===\"/\")parse_xlml_data(str.slice(didx,Rn.index),ss,dtag,state[state.length-1][0]==\"Comment\"?comment:cell,{c:c,r:r},styles,cstys[c],row,opts);else{ss=\"\";dtag=xlml_parsexmltag(Rn[0]);didx=Rn.index+Rn[0].length}break;case\"Cell\":if(Rn[1]===\"/\"){if(comments.length>0)cell.c=comments;if((!opts.sheetRows||opts.sheetRows>r)&&cell.v!==undefined)cursheet[encode_col(c)+encode_row(r)]=cell;if(cell.HRef){cell.l={Target:cell.HRef,tooltip:cell.HRefScreenTip};cell.HRef=cell.HRefScreenTip=undefined}if(cell.MergeAcross||cell.MergeDown){var cc=c+(parseInt(cell.MergeAcross,10)|0);var rr=r+(parseInt(cell.MergeDown,10)|0);mergecells.push({s:{c:c,r:r},e:{c:cc,r:rr}})}++c;if(cell.MergeAcross)c+=+cell.MergeAcross}else{cell=xlml_parsexmltagobj(Rn[0]);if(cell.Index)c=+cell.Index-1;if(c<refguess.s.c)refguess.s.c=c;if(c>refguess.e.c)refguess.e.c=c;if(Rn[0].substr(-2)===\"/>\")++c;comments=[]}break;case\"Row\":if(Rn[1]===\"/\"||Rn[0].substr(-2)===\"/>\"){if(r<refguess.s.r)refguess.s.r=r;if(r>refguess.e.r)refguess.e.r=r;if(Rn[0].substr(-2)===\"/>\"){row=xlml_parsexmltag(Rn[0]);if(row.Index)r=+row.Index-1}c=0;++r}else{row=xlml_parsexmltag(Rn[0]);if(row.Index)r=+row.Index-1}break;case\"Worksheet\":if(Rn[1]===\"/\"){if((tmp=state.pop())[0]!==Rn[3])throw\"Bad state: \"+tmp;sheetnames.push(sheetname);if(refguess.s.r<=refguess.e.r&&refguess.s.c<=refguess.e.c)cursheet[\"!ref\"]=encode_range(refguess);if(mergecells.length)cursheet[\"!merges\"]=mergecells;sheets[sheetname]=cursheet}else{refguess={s:{r:1e6,c:1e6},e:{r:0,c:0}};r=c=0;state.push([Rn[3],false]);tmp=xlml_parsexmltag(Rn[0]);sheetname=tmp.Name;cursheet={};mergecells=[]}break;case\"Table\":if(Rn[1]===\"/\"){if((tmp=state.pop())[0]!==Rn[3])throw\"Bad state: \"+tmp}else if(Rn[0].slice(-2)==\"/>\")break;else{table=xlml_parsexmltag(Rn[0]);state.push([Rn[3],false]);cstys=[]}break;case\"Style\":if(Rn[1]===\"/\")process_style_xlml(styles,stag,opts);else stag=xlml_parsexmltag(Rn[0]);break;case\"NumberFormat\":stag.nf=xlml_parsexmltag(Rn[0]).Format||\"General\";break;case\"Column\":if(state[state.length-1][0]!==\"Table\")break;csty=xlml_parsexmltag(Rn[0]);cstys[csty.Index-1||cstys.length]=csty;for(var i=0;i<+csty.Span;++i)cstys[cstys.length]=csty;break;case\"NamedRange\":break;case\"NamedCell\":break;case\"B\":break;case\"I\":break;case\"U\":break;case\"S\":break;case\"Sub\":break;case\"Sup\":break;case\"Span\":break;case\"Border\":break;case\"Alignment\":break;case\"Borders\":break;case\"Font\":if(Rn[0].substr(-2)===\"/>\")break;else if(Rn[1]===\"/\")ss+=str.slice(fidx,Rn.index);else fidx=Rn.index+Rn[0].length;break;case\"Interior\":if(!opts.cellStyles)break;stag.Interior=xlml_parsexmltag(Rn[0]);break;case\"Protection\":break;case\"Author\":case\"Title\":case\"Description\":case\"Created\":case\"Keywords\":case\"Subject\":case\"Category\":case\"Company\":case\"LastAuthor\":case\"LastSaved\":case\"LastPrinted\":case\"Version\":case\"Revision\":case\"TotalTime\":case\"HyperlinkBase\":case\"Manager\":if(Rn[0].substr(-2)===\"/>\")break;else if(Rn[1]===\"/\")xlml_set_prop(Props,Rn[3],str.slice(pidx,Rn.index));else pidx=Rn.index+Rn[0].length;break;case\"Paragraphs\":break;case\"Styles\":case\"Workbook\":if(Rn[1]===\"/\"){if((tmp=state.pop())[0]!==Rn[3])throw\"Bad state: \"+tmp}else state.push([Rn[3],false]);break;case\"Comment\":if(Rn[1]===\"/\"){if((tmp=state.pop())[0]!==Rn[3])throw\"Bad state: \"+tmp;xlml_clean_comment(comment);comments.push(comment)}else{state.push([Rn[3],false]);tmp=xlml_parsexmltag(Rn[0]);comment={a:tmp.Author}}break;case\"Name\":break;case\"ComponentOptions\":case\"DocumentProperties\":case\"CustomDocumentProperties\":case\"OfficeDocumentSettings\":case\"PivotTable\":case\"PivotCache\":case\"Names\":case\"MapInfo\":case\"PageBreaks\":case\"QueryTable\":case\"DataValidation\":case\"AutoFilter\":case\"Sorting\":case\"Schema\":case\"data\":case\"ConditionalFormatting\":case\"SmartTagType\":case\"SmartTags\":case\"ExcelWorkbook\":case\"WorkbookOptions\":case\"WorksheetOptions\":if(Rn[1]===\"/\"){if((tmp=state.pop())[0]!==Rn[3])throw\"Bad state: \"+tmp}else if(Rn[0].charAt(Rn[0].length-2)!==\"/\")state.push([Rn[3],true]);break;default:var seen=true;switch(state[state.length-1][0]){case\"OfficeDocumentSettings\":switch(Rn[3]){case\"AllowPNG\":break;case\"RemovePersonalInformation\":break;case\"DownloadComponents\":break;case\"LocationOfComponents\":break;case\"Colors\":break;case\"Color\":break;case\"Index\":break;case\"RGB\":break;case\"PixelsPerInch\":break;case\"TargetScreenSize\":break;case\"ReadOnlyRecommended\":break;default:seen=false}break;case\"ComponentOptions\":switch(Rn[3]){case\"Toolbar\":break;case\"HideOfficeLogo\":break;case\"SpreadsheetAutoFit\":break;case\"Label\":break;case\"Caption\":break;case\"MaxHeight\":break;case\"MaxWidth\":break;case\"NextSheetNumber\":break;default:seen=false}break;case\"ExcelWorkbook\":switch(Rn[3]){case\"WindowHeight\":break;case\"WindowWidth\":break;case\"WindowTopX\":break;case\"WindowTopY\":break;case\"TabRatio\":break;case\"ProtectStructure\":break;case\"ProtectWindows\":break;case\"ActiveSheet\":break;case\"DisplayInkNotes\":break;case\"FirstVisibleSheet\":break;case\"SupBook\":break;case\"SheetName\":break;case\"SheetIndex\":break;case\"SheetIndexFirst\":break;case\"SheetIndexLast\":break;case\"Dll\":break;case\"AcceptLabelsInFormulas\":break;case\"DoNotSaveLinkValues\":break;case\"Date1904\":break;case\"Iteration\":break;case\"MaxIterations\":break;case\"MaxChange\":break;case\"Path\":break;case\"Xct\":break;case\"Count\":break;case\"SelectedSheets\":break;case\"Calculation\":break;case\"Uncalced\":break;case\"StartupPrompt\":break;case\"Crn\":break;case\"ExternName\":break;case\"Formula\":break;case\"ColFirst\":break;case\"ColLast\":break;case\"WantAdvise\":break;case\"Boolean\":break;case\"Error\":break;case\"Text\":break;case\"OLE\":break;case\"NoAutoRecover\":break;case\"PublishObjects\":break;case\"DoNotCalculateBeforeSave\":break;case\"Number\":break;case\"RefModeR1C1\":break;case\"EmbedSaveSmartTags\":break;default:seen=false}break;case\"WorkbookOptions\":switch(Rn[3]){case\"OWCVersion\":break;case\"Height\":break;case\"Width\":break;default:seen=false}break;case\"WorksheetOptions\":switch(Rn[3]){case\"Unsynced\":break;case\"Visible\":break;case\"Print\":break;case\"Panes\":break;case\"Scale\":break;case\"Pane\":break;case\"Number\":break;case\"Layout\":break;case\"Header\":break;case\"Footer\":break;case\"PageSetup\":break;case\"PageMargins\":break;case\"Selected\":break;case\"ProtectObjects\":break;case\"EnableSelection\":break;case\"ProtectScenarios\":break;case\"ValidPrinterInfo\":break;case\"HorizontalResolution\":break;case\"VerticalResolution\":break;case\"NumberofCopies\":break;case\"ActiveRow\":break;case\"ActiveCol\":break;case\"ActivePane\":break;case\"TopRowVisible\":break;case\"TopRowBottomPane\":break;case\"LeftColumnVisible\":break;case\"LeftColumnRightPane\":break;case\"FitToPage\":break;case\"RangeSelection\":break;case\"PaperSizeIndex\":break;case\"PageLayoutZoom\":break;case\"PageBreakZoom\":break;case\"FilterOn\":break;case\"DoNotDisplayGridlines\":break;case\"SplitHorizontal\":break;case\"SplitVertical\":break;case\"FreezePanes\":break;case\"FrozenNoSplit\":break;case\"FitWidth\":break;case\"FitHeight\":break;case\"CommentsLayout\":break;case\"Zoom\":break;case\"LeftToRight\":break;case\"Gridlines\":break;case\"AllowSort\":break;case\"AllowFilter\":break;case\"AllowInsertRows\":break;case\"AllowDeleteRows\":break;case\"AllowInsertCols\":break;case\"AllowDeleteCols\":break;case\"AllowInsertHyperlinks\":break;case\"AllowFormatCells\":break;case\"AllowSizeCols\":break;case\"AllowSizeRows\":break;case\"NoSummaryRowsBelowDetail\":break;case\"TabColorIndex\":break;case\"DoNotDisplayHeadings\":break;case\"ShowPageLayoutZoom\":break;case\"NoSummaryColumnsRightDetail\":break;case\"BlackAndWhite\":break;case\"DoNotDisplayZeros\":break;case\"DisplayPageBreak\":break;case\"RowColHeadings\":break;case\"DoNotDisplayOutline\":break;case\"NoOrientation\":break;case\"AllowUsePivotTables\":break;case\"ZeroHeight\":break;case\"ViewableRange\":break;case\"Selection\":break;case\"ProtectContents\":break;default:seen=false}break;case\"PivotTable\":case\"PivotCache\":switch(Rn[3]){case\"ImmediateItemsOnDrop\":break;case\"ShowPageMultipleItemLabel\":break;case\"CompactRowIndent\":break;case\"Location\":break;case\"PivotField\":break;case\"Orientation\":break;case\"LayoutForm\":break;case\"LayoutSubtotalLocation\":break;case\"LayoutCompactRow\":break;case\"Position\":break;case\"PivotItem\":break;case\"DataType\":break;case\"DataField\":break;case\"SourceName\":break;case\"ParentField\":break;case\"PTLineItems\":break;case\"PTLineItem\":break;case\"CountOfSameItems\":break;case\"Item\":break;case\"ItemType\":break;case\"PTSource\":break;case\"CacheIndex\":break;case\"ConsolidationReference\":break;case\"FileName\":break;case\"Reference\":break;case\"NoColumnGrand\":break;case\"NoRowGrand\":break;case\"BlankLineAfterItems\":break;case\"Hidden\":break;case\"Subtotal\":break;case\"BaseField\":break;case\"MapChildItems\":break;case\"Function\":break;case\"RefreshOnFileOpen\":break;case\"PrintSetTitles\":break;case\"MergeLabels\":break;case\"DefaultVersion\":break;case\"RefreshName\":break;case\"RefreshDate\":break;case\"RefreshDateCopy\":break;case\"VersionLastRefresh\":break;case\"VersionLastUpdate\":break;case\"VersionUpdateableMin\":break;case\"VersionRefreshableMin\":break;case\"Calculation\":break;default:seen=false}break;case\"PageBreaks\":switch(Rn[3]){case\"ColBreaks\":break;case\"ColBreak\":break;case\"RowBreaks\":break;case\"RowBreak\":break;case\"ColStart\":break;case\"ColEnd\":break;case\"RowEnd\":break;default:seen=false}break;case\"AutoFilter\":switch(Rn[3]){case\"AutoFilterColumn\":break;case\"AutoFilterCondition\":break;case\"AutoFilterAnd\":break;case\"AutoFilterOr\":break;default:seen=false}break;case\"QueryTable\":switch(Rn[3]){case\"Id\":break;case\"AutoFormatFont\":break;case\"AutoFormatPattern\":break;case\"QuerySource\":break;case\"QueryType\":break;case\"EnableRedirections\":break;case\"RefreshedInXl9\":break;case\"URLString\":break;case\"HTMLTables\":break;case\"Connection\":break;case\"CommandText\":break;case\"RefreshInfo\":break;case\"NoTitles\":break;case\"NextId\":break;case\"ColumnInfo\":break;case\"OverwriteCells\":break;case\"DoNotPromptForFile\":break;case\"TextWizardSettings\":break;case\"Source\":break;case\"Number\":break;case\"Decimal\":break;case\"ThousandSeparator\":break;case\"TrailingMinusNumbers\":break;case\"FormatSettings\":break;case\"FieldType\":break;case\"Delimiters\":break;case\"Tab\":break;case\"Comma\":break;case\"AutoFormatName\":break;case\"VersionLastEdit\":break;case\"VersionLastRefresh\":break;default:seen=false}break;case\"Sorting\":case\"ConditionalFormatting\":case\"DataValidation\":switch(Rn[3]){case\"Range\":break;case\"Type\":break;case\"Min\":break;case\"Max\":break;case\"Sort\":break;case\"Descending\":break;case\"Order\":break;case\"CaseSensitive\":break;case\"Value\":break;case\"ErrorStyle\":break;case\"ErrorMessage\":break;case\"ErrorTitle\":break;case\"CellRangeList\":break;case\"InputMessage\":break;case\"InputTitle\":break;case\"ComboHide\":break;case\"InputHide\":break;case\"Condition\":break;case\"Qualifier\":break;case\"UseBlank\":break;case\"Value1\":break;case\"Value2\":break;case\"Format\":break;default:seen=false}break;case\"MapInfo\":case\"Schema\":case\"data\":switch(Rn[3]){case\"Map\":break;case\"Entry\":break;case\"Range\":break;case\"XPath\":break;case\"Field\":break;case\"XSDType\":break;case\"FilterOn\":break;case\"Aggregate\":break;case\"ElementType\":break;case\"AttributeType\":break;case\"schema\":case\"element\":case\"complexType\":case\"datatype\":case\"all\":case\"attribute\":case\"extends\":break;case\"row\":break;default:seen=false}break;case\"SmartTags\":break;default:seen=false;break}if(seen)break;if(!state[state.length-1][1])throw\"Unrecognized tag: \"+Rn[3]+\"|\"+state.join(\"|\");if(state[state.length-1][0]===\"CustomDocumentProperties\"){if(Rn[0].substr(-2)===\"/>\")break;else if(Rn[1]===\"/\")xlml_set_custprop(Custprops,Rn,cp,str.slice(pidx,Rn.index));else{cp=Rn;pidx=Rn.index+Rn[0].length}break}if(opts.WTF)throw\"Unrecognized tag: \"+Rn[3]+\"|\"+state.join(\"|\")}var out={};if(!opts.bookSheets&&!opts.bookProps)out.Sheets=sheets;out.SheetNames=sheetnames;out.SSF=SSF.get_table();out.Props=Props;out.Custprops=Custprops;return out}function parse_xlml(data,opts){fix_read_opts(opts=opts||{});switch(opts.type||\"base64\"){case\"base64\":return parse_xlml_xml(Base64.decode(data),opts);case\"binary\":case\"buffer\":case\"file\":return parse_xlml_xml(data,opts);case\"array\":return parse_xlml_xml(data.map(_chr).join(\"\"),opts)}}function write_xlml(wb,opts){}function parse_compobj(obj){var v={};var o=obj.content;var l=28,m;m=__lpstr(o,l);l+=4+__readUInt32LE(o,l);v.UserType=m;m=__readUInt32LE(o,l);l+=4;switch(m){case 0:break;case 4294967295:case 4294967294:l+=4;break;default:if(m>400)throw new Error(\"Unsupported Clipboard: \"+m.toString(16));l+=m}m=__lpstr(o,l);l+=m.length===0?0:5+m.length;v.Reserved1=m;if((m=__readUInt32LE(o,l))!==1907550708)return v;throw\"Unsupported Unicode Extension\"}function slurp(R,blob,length,opts){var l=length;var bufs=[];var d=blob.slice(blob.l,blob.l+l);if(opts&&opts.enc&&opts.enc.insitu_decrypt)switch(R.n){case\"BOF\":case\"FilePass\":case\"FileLock\":case\"InterfaceHdr\":case\"RRDInfo\":case\"RRDHead\":case\"UsrExcl\":break;default:if(d.length===0)break;opts.enc.insitu_decrypt(d)}bufs.push(d);blob.l+=l;var next=XLSRecordEnum[__readUInt16LE(blob,blob.l)];while(next!=null&&next.n===\"Continue\"){l=__readUInt16LE(blob,blob.l+2);bufs.push(blob.slice(blob.l+4,blob.l+4+l));blob.l+=4+l;next=XLSRecordEnum[__readUInt16LE(blob,blob.l)]}var b=bconcat(bufs);prep_blob(b,0);var ll=0;b.lens=[];for(var j=0;j<bufs.length;++j){b.lens.push(ll);ll+=bufs[j].length}return R.f(b,b.length,opts)}function safe_format_xf(p,opts,date1904){if(!p.XF)return;try{var fmtid=p.XF.ifmt||0;if(p.t===\"e\"){p.w=p.w||BErr[p.v]}else if(fmtid===0){if(p.t===\"n\"){if((p.v|0)===p.v)p.w=SSF._general_int(p.v);else p.w=SSF._general_num(p.v)}else p.w=SSF._general(p.v)}else p.w=SSF.format(fmtid,p.v,{date1904:date1904||false});if(opts.cellNF)p.z=SSF._table[fmtid]}catch(e){if(opts.WTF)throw e}}function make_cell(val,ixfe,t){return{v:val,ixfe:ixfe,t:t}}function parse_workbook(blob,options){var wb={opts:{}};var Sheets={};var out={};var Directory={};var found_sheet=false;var range={};var last_formula=null;var sst=[];var cur_sheet=\"\";var Preamble={};var lastcell,last_cell,cc,cmnt,rng,rngC,rngR;var shared_formulae={};var array_formulae=[];var temp_val;var country;var cell_valid=true;var XFs=[];var palette=[];var get_rgb=function getrgb(icv){if(icv<8)return XLSIcv[icv];if(icv<64)return palette[icv-8]||XLSIcv[icv];return XLSIcv[icv]};var process_cell_style=function pcs(cell,line){var xfd=line.XF.data;if(!xfd||!xfd.patternType)return;line.s={};line.s.patternType=xfd.patternType;var t;if(t=rgb2Hex(get_rgb(xfd.icvFore))){line.s.fgColor={rgb:t}}if(t=rgb2Hex(get_rgb(xfd.icvBack))){line.s.bgColor={rgb:t}}};var addcell=function addcell(cell,line,options){if(!cell_valid)return;if(options.cellStyles&&line.XF&&line.XF.data)process_cell_style(cell,line);lastcell=cell;last_cell=encode_cell(cell);if(range.s){if(cell.r<range.s.r)range.s.r=cell.r;if(cell.c<range.s.c)range.s.c=cell.c}if(range.e){if(cell.r+1>range.e.r)range.e.r=cell.r+1;if(cell.c+1>range.e.c)range.e.c=cell.c+1}if(options.sheetRows&&lastcell.r>=options.sheetRows)cell_valid=false;else out[last_cell]=line};var opts={enc:false,sbcch:0,snames:[],sharedf:shared_formulae,arrayf:array_formulae,rrtabid:[],lastuser:\"\",biff:8,codepage:0,winlocked:0,wtf:false};if(options.password)opts.password=options.password;var mergecells=[];var objects=[];var supbooks=[[]];var sbc=0,sbci=0,sbcli=0;supbooks.SheetNames=opts.snames;supbooks.sharedf=opts.sharedf;supbooks.arrayf=opts.arrayf;var last_Rn=\"\";var file_depth=0;opts.codepage=1200;set_cp(1200);while(blob.l<blob.length-1){var s=blob.l;var RecordType=blob.read_shift(2);if(RecordType===0&&last_Rn===\"EOF\")break;var length=blob.l===blob.length?0:blob.read_shift(2),y;var R=XLSRecordEnum[RecordType];if(R&&R.f){if(options.bookSheets){if(last_Rn===\"BoundSheet8\"&&R.n!==\"BoundSheet8\")break}last_Rn=R.n;if(R.r===2||R.r==12){var rt=blob.read_shift(2);length-=2;if(!opts.enc&&rt!==RecordType)throw\"rt mismatch\";if(R.r==12){blob.l+=10;length-=10}}var val;if(R.n===\"EOF\")val=R.f(blob,length,opts);else val=slurp(R,blob,length,opts);var Rn=R.n;if(opts.biff===5||opts.biff===2)switch(Rn){case\"Lbl\":Rn=\"Label\";break}switch(Rn){case\"Date1904\":wb.opts.Date1904=val;break;case\"WriteProtect\":wb.opts.WriteProtect=true;break;case\"FilePass\":if(!opts.enc)blob.l=0;opts.enc=val;if(opts.WTF)console.error(val);if(!options.password)throw new Error(\"File is password-protected\");if(val.Type!==0)throw new Error(\"Encryption scheme unsupported\");if(!val.valid)throw new Error(\"Password is incorrect\");break;case\"WriteAccess\":opts.lastuser=val;break;case\"FileSharing\":break;case\"CodePage\":if(val===21010)val=1200;else if(val===32769)val=1252;opts.codepage=val;set_cp(val);break;case\"RRTabId\":opts.rrtabid=val;break;case\"WinProtect\":opts.winlocked=val;break;case\"Template\":break;case\"RefreshAll\":wb.opts.RefreshAll=val;break;case\"BookBool\":break;case\"UsesELFs\":break;case\"MTRSettings\":{if(val[0]&&val[1])throw\"Unsupported threads: \"+val}break;case\"CalcCount\":wb.opts.CalcCount=val;break;case\"CalcDelta\":wb.opts.CalcDelta=val;break;case\"CalcIter\":wb.opts.CalcIter=val;break;case\"CalcMode\":wb.opts.CalcMode=val;break;case\"CalcPrecision\":wb.opts.CalcPrecision=val;break;case\"CalcSaveRecalc\":wb.opts.CalcSaveRecalc=val;break;case\"CalcRefMode\":opts.CalcRefMode=val;break;case\"Uncalced\":break;case\"ForceFullCalculation\":wb.opts.FullCalc=val;break;case\"WsBool\":break;case\"XF\":XFs.push(val);break;case\"ExtSST\":break;case\"BookExt\":break;case\"RichTextStream\":break;case\"BkHim\":break;case\"SupBook\":supbooks[++sbc]=[val];sbci=0;break;case\"ExternName\":supbooks[sbc][++sbci]=val;break;case\"Index\":break;case\"Lbl\":supbooks[0][++sbcli]=val;break;case\"ExternSheet\":supbooks[sbc]=supbooks[sbc].concat(val);sbci+=val.length;break;case\"Protect\":out[\"!protect\"]=val;break;case\"Password\":if(val!==0&&opts.WTF)console.error(\"Password verifier: \"+val);break;case\"Prot4Rev\":case\"Prot4RevPass\":break;case\"BoundSheet8\":{Directory[val.pos]=val;opts.snames.push(val.name)}break;case\"EOF\":{if(--file_depth)break;if(range.e){out[\"!range\"]=range;if(range.e.r>0&&range.e.c>0){range.e.r--;range.e.c--;out[\"!ref\"]=encode_range(range);range.e.r++;range.e.c++}if(mergecells.length>0)out[\"!merges\"]=mergecells;if(objects.length>0)out[\"!objects\"]=objects}if(cur_sheet===\"\")Preamble=out;else Sheets[cur_sheet]=out;out={}}break;case\"BOF\":{if(opts.biff!==8);else if(val.BIFFVer===1280)opts.biff=5;else if(val.BIFFVer===2)opts.biff=2;else if(val.BIFFVer===7)opts.biff=2;if(file_depth++)break;cell_valid=true;out={};if(opts.biff===2){if(cur_sheet===\"\")cur_sheet=\"Sheet1\";range={s:{r:0,c:0},e:{r:0,c:0}}}else cur_sheet=(Directory[s]||{name:\"\"}).name;mergecells=[];objects=[]}break;case\"Number\":case\"BIFF2NUM\":{temp_val={ixfe:val.ixfe,XF:XFs[val.ixfe],v:val.val,t:\"n\"};if(temp_val.XF)safe_format_xf(temp_val,options,wb.opts.Date1904);addcell({c:val.c,r:val.r},temp_val,options)}break;case\"BoolErr\":{temp_val={ixfe:val.ixfe,XF:XFs[val.ixfe],v:val.val,t:val.t};if(temp_val.XF)safe_format_xf(temp_val,options,wb.opts.Date1904);addcell({c:val.c,r:val.r},temp_val,options)}break;case\"RK\":{temp_val={ixfe:val.ixfe,XF:XFs[val.ixfe],v:val.rknum,t:\"n\"};if(temp_val.XF)safe_format_xf(temp_val,options,wb.opts.Date1904);addcell({c:val.c,r:val.r},temp_val,options)}break;case\"MulRk\":{for(var j=val.c;j<=val.C;++j){var ixfe=val.rkrec[j-val.c][0];temp_val={ixfe:ixfe,XF:XFs[ixfe],v:val.rkrec[j-val.c][1],t:\"n\"};if(temp_val.XF)safe_format_xf(temp_val,options,wb.opts.Date1904);addcell({c:j,r:val.r},temp_val,options)}}break;case\"Formula\":{switch(val.val){case\"String\":last_formula=val;break;case\"Array Formula\":throw\"Array Formula unsupported\";default:temp_val={v:val.val,ixfe:val.cell.ixfe,t:val.tt};temp_val.XF=XFs[temp_val.ixfe];if(options.cellFormula)temp_val.f=\"=\"+stringify_formula(val.formula,range,val.cell,supbooks,opts);if(temp_val.XF)safe_format_xf(temp_val,options,wb.opts.Date1904);addcell(val.cell,temp_val,options);last_formula=val}}break;case\"String\":{if(last_formula){last_formula.val=val;temp_val={v:last_formula.val,ixfe:last_formula.cell.ixfe,t:\"s\"};temp_val.XF=XFs[temp_val.ixfe];if(options.cellFormula)temp_val.f=\"=\"+stringify_formula(last_formula.formula,range,last_formula.cell,supbooks,opts);if(temp_val.XF)safe_format_xf(temp_val,options,wb.opts.Date1904);addcell(last_formula.cell,temp_val,options);last_formula=null}}break;case\"Array\":{array_formulae.push(val)}break;case\"ShrFmla\":{if(!cell_valid)break;shared_formulae[encode_cell(last_formula.cell)]=val[0]}break;case\"LabelSst\":temp_val=make_cell(sst[val.isst].t,val.ixfe,\"s\");temp_val.XF=XFs[temp_val.ixfe];if(temp_val.XF)safe_format_xf(temp_val,options,wb.opts.Date1904);addcell({c:val.c,r:val.r},temp_val,options);break;case\"Label\":case\"BIFF2STR\":temp_val=make_cell(val.val,val.ixfe,\"s\");temp_val.XF=XFs[temp_val.ixfe];if(temp_val.XF)safe_format_xf(temp_val,options,wb.opts.Date1904);addcell({c:val.c,r:val.r},temp_val,options);break;case\"Dimensions\":{if(file_depth===1)range=val}break;case\"SST\":{sst=val}break;case\"Format\":{SSF.load(val[1],val[0])}break;case\"MergeCells\":mergecells=mergecells.concat(val);break;case\"Obj\":objects[val.cmo[0]]=opts.lastobj=val;break;case\"TxO\":opts.lastobj.TxO=val;break;case\"HLink\":{for(rngR=val[0].s.r;rngR<=val[0].e.r;++rngR)for(rngC=val[0].s.c;rngC<=val[0].e.c;++rngC)if(out[encode_cell({c:rngC,r:rngR})])out[encode_cell({c:rngC,r:rngR})].l=val[1]}break;case\"HLinkTooltip\":{for(rngR=val[0].s.r;rngR<=val[0].e.r;++rngR)for(rngC=val[0].s.c;rngC<=val[0].e.c;++rngC)if(out[encode_cell({c:rngC,r:rngR})])out[encode_cell({c:rngC,r:rngR})].l.tooltip=val[1]}break;case\"Note\":{if(opts.biff<=5&&opts.biff>=2)break;cc=out[encode_cell(val[0])];var noteobj=objects[val[2]];if(!cc)break;if(!cc.c)cc.c=[];cmnt={a:val[1],t:noteobj.TxO.t};cc.c.push(cmnt)}break;default:switch(R.n){case\"ClrtClient\":break;case\"XFExt\":update_xfext(XFs[val.ixfe],val.ext);break;case\"NameCmt\":break;case\"Header\":break;case\"Footer\":break;case\"HCenter\":break;case\"VCenter\":break;case\"Pls\":break;case\"Setup\":break;case\"DefColWidth\":break;case\"GCW\":break;case\"LHRecord\":break;case\"ColInfo\":break;case\"Row\":break;case\"DBCell\":break;case\"MulBlank\":break;case\"EntExU2\":break;case\"SxView\":break;case\"Sxvd\":break;case\"SXVI\":break;case\"SXVDEx\":break;case\"SxIvd\":break;case\"SXDI\":break;case\"SXLI\":break;case\"SXEx\":break;case\"QsiSXTag\":break;case\"Selection\":break;case\"Feat\":break;case\"FeatHdr\":case\"FeatHdr11\":break;case\"Feature11\":case\"Feature12\":case\"List12\":break;case\"Blank\":break;case\"Country\":country=val;break;case\"RecalcId\":break;case\"DefaultRowHeight\":case\"DxGCol\":break;case\"Fbi\":case\"Fbi2\":case\"GelFrame\":break;case\"Font\":break;case\"XFCRC\":break;case\"Style\":break;case\"StyleExt\":break;case\"Palette\":palette=val;break;case\"Theme\":break;case\"ScenarioProtect\":break;case\"ObjProtect\":break;case\"CondFmt12\":break;case\"Table\":break;case\"TableStyles\":break;case\"TableStyle\":break;case\"TableStyleElement\":break;case\"SXStreamID\":break;case\"SXVS\":break;case\"DConRef\":break;case\"SXAddl\":break;case\"DConBin\":break;case\"DConName\":break;case\"SXPI\":break;case\"SxFormat\":break;case\"SxSelect\":break;case\"SxRule\":break;case\"SxFilt\":break;case\"SxItm\":break;case\"SxDXF\":break;case\"ScenMan\":break;case\"DCon\":break;case\"CellWatch\":break;case\"PrintRowCol\":break;case\"PrintGrid\":break;case\"PrintSize\":break;case\"XCT\":break;case\"CRN\":break;case\"Scl\":{}break;case\"SheetExt\":{}break;case\"SheetExtOptional\":{}break;case\"ObNoMacros\":{}break;case\"ObProj\":{}break;case\"CodeName\":{}break;case\"GUIDTypeLib\":{}break;case\"WOpt\":break;case\"PhoneticInfo\":break;case\"OleObjectSize\":break;case\"DXF\":case\"DXFN\":case\"DXFN12\":case\"DXFN12List\":case\"DXFN12NoCB\":break;case\"Dv\":case\"DVal\":break;case\"BRAI\":case\"Series\":case\"SeriesText\":break;case\"DConn\":break;case\"DbOrParamQry\":break;case\"DBQueryExt\":break;case\"IFmtRecord\":break;case\"CondFmt\":case\"CF\":case\"CF12\":case\"CFEx\":break;case\"Excel9File\":break;case\"Units\":break;case\"InterfaceHdr\":case\"Mms\":case\"InterfaceEnd\":case\"DSF\":case\"BuiltInFnGroupCount\":case\"Window1\":case\"Window2\":case\"HideObj\":case\"GridSet\":case\"Guts\":case\"UserBView\":case\"UserSViewBegin\":case\"UserSViewEnd\":case\"Pane\":break;default:switch(R.n){case\"Dat\":case\"Begin\":case\"End\":case\"StartBlock\":case\"EndBlock\":case\"Frame\":case\"Area\":case\"Axis\":case\"AxisLine\":case\"Tick\":break;case\"AxesUsed\":case\"CrtLayout12\":case\"CrtLayout12A\":case\"CrtLink\":case\"CrtLine\":case\"CrtMlFrt\":case\"CrtMlFrtContinue\":break;case\"LineFormat\":case\"AreaFormat\":case\"Chart\":case\"Chart3d\":case\"Chart3DBarShape\":case\"ChartFormat\":case\"ChartFrtInfo\":break;case\"PlotArea\":case\"PlotGrowth\":break;case\"SeriesList\":case\"SerParent\":case\"SerAuxTrend\":break;case\"DataFormat\":case\"SerToCrt\":case\"FontX\":break;case\"CatSerRange\":case\"AxcExt\":case\"SerFmt\":break;case\"ShtProps\":break;case\"DefaultText\":case\"Text\":case\"CatLab\":break;case\"DataLabExtContents\":break;case\"Legend\":case\"LegendException\":break;case\"Pie\":case\"Scatter\":break;case\"PieFormat\":case\"MarkerFormat\":break;case\"StartObject\":case\"EndObject\":break;case\"AlRuns\":case\"ObjectLink\":break;case\"SIIndex\":break;case\"AttachedLabel\":case\"YMult\":break;case\"Line\":case\"Bar\":break;case\"Surf\":break;case\"AxisParent\":break;case\"Pos\":break;case\"ValueRange\":break;case\"SXViewEx9\":break;case\"SXViewLink\":break;case\"PivotChartBits\":break;case\"SBaseRef\":break;case\"TextPropsStream\":break;case\"LnExt\":break;case\"MkrExt\":break;case\"CrtCoopt\":break;case\"Qsi\":case\"Qsif\":case\"Qsir\":case\"QsiSXTag\":break;case\"TxtQry\":break;case\"FilterMode\":break;case\"AutoFilter\":case\"AutoFilterInfo\":break;case\"AutoFilter12\":break;case\"DropDownObjIds\":break;case\"Sort\":break;case\"SortData\":break;case\"ShapePropsStream\":break;case\"MsoDrawing\":case\"MsoDrawingGroup\":case\"MsoDrawingSelection\":break;case\"ImData\":break;case\"WebPub\":case\"AutoWebPub\":case\"RightMargin\":case\"LeftMargin\":case\"TopMargin\":case\"BottomMargin\":case\"HeaderFooter\":case\"HFPicture\":case\"PLV\":case\"HorizontalPageBreaks\":case\"VerticalPageBreaks\":case\"Backup\":case\"CompressPictures\":case\"Compat12\":break;case\"Continue\":case\"ContinueFrt12\":break;case\"FrtFontList\":case\"FrtWrapper\":break;case\"ExternCount\":break;case\"RString\":break;case\"TabIdConf\":case\"Radar\":case\"RadarArea\":case\"DropBar\":case\"Intl\":case\"CoordList\":case\"SerAuxErrBar\":break;default:switch(R.n){case\"SCENARIO\":case\"DConBin\":case\"PicF\":case\"DataLabExt\":case\"Lel\":case\"BopPop\":case\"BopPopCustom\":case\"RealTimeData\":case\"Name\":break;default:if(options.WTF)throw\"Unrecognized Record \"+R.n}}}}}else blob.l+=length}var sheetnamesraw=opts.biff===2?[\"Sheet1\"]:Object.keys(Directory).sort(function(a,b){return Number(a)-Number(b)}).map(function(x){return Directory[x].name});var sheetnames=sheetnamesraw.slice();wb.Directory=sheetnamesraw;wb.SheetNames=sheetnamesraw;if(!options.bookSheets)wb.Sheets=Sheets;wb.Preamble=Preamble;wb.Strings=sst;wb.SSF=SSF.get_table();if(opts.enc)wb.Encryption=opts.enc;wb.Metadata={};if(country!==undefined)wb.Metadata.Country=country;return wb}function parse_xlscfb(cfb,options){if(!options)options={};fix_read_opts(options);reset_cp();var CompObj,Summary,Workbook;if(cfb.find){CompObj=cfb.find(\"!CompObj\");Summary=cfb.find(\"!SummaryInformation\");Workbook=cfb.find(\"/Workbook\")}else{prep_blob(cfb,0);Workbook={content:cfb}}if(!Workbook)Workbook=cfb.find(\"/Book\");var CompObjP,SummaryP,WorkbookP;if(CompObj)CompObjP=parse_compobj(CompObj);if(options.bookProps&&!options.bookSheets)WorkbookP={};else{if(Workbook)WorkbookP=parse_workbook(Workbook.content,options,!!Workbook.find);else throw new Error(\"Cannot find Workbook stream\")}if(cfb.find)parse_props(cfb);var props={};for(var y in cfb.Summary)props[y]=cfb.Summary[y];for(y in cfb.DocSummary)props[y]=cfb.DocSummary[y];WorkbookP.Props=WorkbookP.Custprops=props;if(options.bookFiles)WorkbookP.cfb=cfb;WorkbookP.CompObjP=CompObjP;return WorkbookP}function parse_props(cfb){var DSI=cfb.find(\"!DocumentSummaryInformation\");if(DSI)try{cfb.DocSummary=parse_PropertySetStream(DSI,DocSummaryPIDDSI)}catch(e){}var SI=cfb.find(\"!SummaryInformation\");if(SI)try{cfb.Summary=parse_PropertySetStream(SI,SummaryPIDSI)}catch(e){}}var XLSBRecordEnum={0:{n:\"BrtRowHdr\",f:parse_BrtRowHdr},1:{n:\"BrtCellBlank\",f:parse_BrtCellBlank},2:{n:\"BrtCellRk\",f:parse_BrtCellRk},3:{n:\"BrtCellError\",f:parse_BrtCellError},4:{n:\"BrtCellBool\",f:parse_BrtCellBool},5:{n:\"BrtCellReal\",f:parse_BrtCellReal},6:{n:\"BrtCellSt\",f:parse_BrtCellSt},7:{n:\"BrtCellIsst\",f:parse_BrtCellIsst},8:{n:\"BrtFmlaString\",f:parse_BrtFmlaString},9:{n:\"BrtFmlaNum\",f:parse_BrtFmlaNum},10:{n:\"BrtFmlaBool\",f:parse_BrtFmlaBool},11:{n:\"BrtFmlaError\",f:parse_BrtFmlaError},16:{n:\"BrtFRTArchID$\",f:parse_BrtFRTArchID$},19:{n:\"BrtSSTItem\",f:parse_RichStr},20:{n:\"BrtPCDIMissing\",f:parsenoop},21:{n:\"BrtPCDINumber\",f:parsenoop},22:{n:\"BrtPCDIBoolean\",f:parsenoop},23:{n:\"BrtPCDIError\",f:parsenoop},24:{n:\"BrtPCDIString\",f:parsenoop},25:{n:\"BrtPCDIDatetime\",f:parsenoop},26:{n:\"BrtPCDIIndex\",f:parsenoop},27:{n:\"BrtPCDIAMissing\",f:parsenoop},28:{n:\"BrtPCDIANumber\",f:parsenoop},29:{n:\"BrtPCDIABoolean\",f:parsenoop},30:{n:\"BrtPCDIAError\",f:parsenoop},31:{n:\"BrtPCDIAString\",f:parsenoop},32:{n:\"BrtPCDIADatetime\",f:parsenoop},33:{n:\"BrtPCRRecord\",f:parsenoop},34:{n:\"BrtPCRRecordDt\",f:parsenoop},35:{n:\"BrtFRTBegin\",f:parsenoop},36:{n:\"BrtFRTEnd\",f:parsenoop},37:{n:\"BrtACBegin\",f:parsenoop},38:{n:\"BrtACEnd\",f:parsenoop},39:{n:\"BrtName\",f:parsenoop},40:{n:\"BrtIndexRowBlock\",f:parsenoop},42:{n:\"BrtIndexBlock\",f:parsenoop},43:{n:\"BrtFont\",f:parse_BrtFont},44:{n:\"BrtFmt\",f:parse_BrtFmt},45:{n:\"BrtFill\",f:parsenoop},46:{n:\"BrtBorder\",f:parsenoop},47:{n:\"BrtXF\",f:parse_BrtXF},48:{n:\"BrtStyle\",f:parsenoop},49:{n:\"BrtCellMeta\",f:parsenoop},50:{n:\"BrtValueMeta\",f:parsenoop},51:{n:\"BrtMdb\",f:parsenoop},52:{n:\"BrtBeginFmd\",f:parsenoop},53:{n:\"BrtEndFmd\",f:parsenoop},54:{n:\"BrtBeginMdx\",f:parsenoop},55:{n:\"BrtEndMdx\",f:parsenoop},56:{n:\"BrtBeginMdxTuple\",f:parsenoop},57:{n:\"BrtEndMdxTuple\",f:parsenoop},58:{n:\"BrtMdxMbrIstr\",f:parsenoop},59:{n:\"BrtStr\",f:parsenoop},60:{n:\"BrtColInfo\",f:parsenoop},62:{n:\"BrtCellRString\",f:parsenoop},63:{n:\"BrtCalcChainItem$\",f:parse_BrtCalcChainItem$},64:{n:\"BrtDVal\",f:parsenoop},65:{n:\"BrtSxvcellNum\",f:parsenoop},66:{n:\"BrtSxvcellStr\",f:parsenoop},67:{n:\"BrtSxvcellBool\",f:parsenoop},68:{n:\"BrtSxvcellErr\",f:parsenoop},69:{n:\"BrtSxvcellDate\",f:parsenoop},70:{n:\"BrtSxvcellNil\",f:parsenoop},128:{n:\"BrtFileVersion\",f:parsenoop},129:{n:\"BrtBeginSheet\",f:parsenoop},130:{n:\"BrtEndSheet\",f:parsenoop},131:{n:\"BrtBeginBook\",f:parsenoop,p:0},132:{n:\"BrtEndBook\",f:parsenoop},133:{n:\"BrtBeginWsViews\",f:parsenoop},134:{n:\"BrtEndWsViews\",f:parsenoop},135:{n:\"BrtBeginBookViews\",f:parsenoop},136:{n:\"BrtEndBookViews\",f:parsenoop},137:{n:\"BrtBeginWsView\",f:parsenoop},138:{n:\"BrtEndWsView\",f:parsenoop},139:{n:\"BrtBeginCsViews\",f:parsenoop},140:{n:\"BrtEndCsViews\",f:parsenoop},141:{n:\"BrtBeginCsView\",f:parsenoop},142:{n:\"BrtEndCsView\",f:parsenoop},143:{n:\"BrtBeginBundleShs\",f:parsenoop},144:{n:\"BrtEndBundleShs\",f:parsenoop},145:{n:\"BrtBeginSheetData\",f:parsenoop},146:{n:\"BrtEndSheetData\",f:parsenoop},147:{n:\"BrtWsProp\",f:parse_BrtWsProp},148:{n:\"BrtWsDim\",f:parse_BrtWsDim,p:16},151:{n:\"BrtPane\",f:parsenoop},152:{n:\"BrtSel\",f:parsenoop},153:{n:\"BrtWbProp\",f:parse_BrtWbProp},154:{n:\"BrtWbFactoid\",f:parsenoop},155:{n:\"BrtFileRecover\",f:parsenoop\r\n},156:{n:\"BrtBundleSh\",f:parse_BrtBundleSh},157:{n:\"BrtCalcProp\",f:parsenoop},158:{n:\"BrtBookView\",f:parsenoop},159:{n:\"BrtBeginSst\",f:parse_BrtBeginSst},160:{n:\"BrtEndSst\",f:parsenoop},161:{n:\"BrtBeginAFilter\",f:parsenoop},162:{n:\"BrtEndAFilter\",f:parsenoop},163:{n:\"BrtBeginFilterColumn\",f:parsenoop},164:{n:\"BrtEndFilterColumn\",f:parsenoop},165:{n:\"BrtBeginFilters\",f:parsenoop},166:{n:\"BrtEndFilters\",f:parsenoop},167:{n:\"BrtFilter\",f:parsenoop},168:{n:\"BrtColorFilter\",f:parsenoop},169:{n:\"BrtIconFilter\",f:parsenoop},170:{n:\"BrtTop10Filter\",f:parsenoop},171:{n:\"BrtDynamicFilter\",f:parsenoop},172:{n:\"BrtBeginCustomFilters\",f:parsenoop},173:{n:\"BrtEndCustomFilters\",f:parsenoop},174:{n:\"BrtCustomFilter\",f:parsenoop},175:{n:\"BrtAFilterDateGroupItem\",f:parsenoop},176:{n:\"BrtMergeCell\",f:parse_BrtMergeCell},177:{n:\"BrtBeginMergeCells\",f:parsenoop},178:{n:\"BrtEndMergeCells\",f:parsenoop},179:{n:\"BrtBeginPivotCacheDef\",f:parsenoop},180:{n:\"BrtEndPivotCacheDef\",f:parsenoop},181:{n:\"BrtBeginPCDFields\",f:parsenoop},182:{n:\"BrtEndPCDFields\",f:parsenoop},183:{n:\"BrtBeginPCDField\",f:parsenoop},184:{n:\"BrtEndPCDField\",f:parsenoop},185:{n:\"BrtBeginPCDSource\",f:parsenoop},186:{n:\"BrtEndPCDSource\",f:parsenoop},187:{n:\"BrtBeginPCDSRange\",f:parsenoop},188:{n:\"BrtEndPCDSRange\",f:parsenoop},189:{n:\"BrtBeginPCDFAtbl\",f:parsenoop},190:{n:\"BrtEndPCDFAtbl\",f:parsenoop},191:{n:\"BrtBeginPCDIRun\",f:parsenoop},192:{n:\"BrtEndPCDIRun\",f:parsenoop},193:{n:\"BrtBeginPivotCacheRecords\",f:parsenoop},194:{n:\"BrtEndPivotCacheRecords\",f:parsenoop},195:{n:\"BrtBeginPCDHierarchies\",f:parsenoop},196:{n:\"BrtEndPCDHierarchies\",f:parsenoop},197:{n:\"BrtBeginPCDHierarchy\",f:parsenoop},198:{n:\"BrtEndPCDHierarchy\",f:parsenoop},199:{n:\"BrtBeginPCDHFieldsUsage\",f:parsenoop},200:{n:\"BrtEndPCDHFieldsUsage\",f:parsenoop},201:{n:\"BrtBeginExtConnection\",f:parsenoop},202:{n:\"BrtEndExtConnection\",f:parsenoop},203:{n:\"BrtBeginECDbProps\",f:parsenoop},204:{n:\"BrtEndECDbProps\",f:parsenoop},205:{n:\"BrtBeginECOlapProps\",f:parsenoop},206:{n:\"BrtEndECOlapProps\",f:parsenoop},207:{n:\"BrtBeginPCDSConsol\",f:parsenoop},208:{n:\"BrtEndPCDSConsol\",f:parsenoop},209:{n:\"BrtBeginPCDSCPages\",f:parsenoop},210:{n:\"BrtEndPCDSCPages\",f:parsenoop},211:{n:\"BrtBeginPCDSCPage\",f:parsenoop},212:{n:\"BrtEndPCDSCPage\",f:parsenoop},213:{n:\"BrtBeginPCDSCPItem\",f:parsenoop},214:{n:\"BrtEndPCDSCPItem\",f:parsenoop},215:{n:\"BrtBeginPCDSCSets\",f:parsenoop},216:{n:\"BrtEndPCDSCSets\",f:parsenoop},217:{n:\"BrtBeginPCDSCSet\",f:parsenoop},218:{n:\"BrtEndPCDSCSet\",f:parsenoop},219:{n:\"BrtBeginPCDFGroup\",f:parsenoop},220:{n:\"BrtEndPCDFGroup\",f:parsenoop},221:{n:\"BrtBeginPCDFGItems\",f:parsenoop},222:{n:\"BrtEndPCDFGItems\",f:parsenoop},223:{n:\"BrtBeginPCDFGRange\",f:parsenoop},224:{n:\"BrtEndPCDFGRange\",f:parsenoop},225:{n:\"BrtBeginPCDFGDiscrete\",f:parsenoop},226:{n:\"BrtEndPCDFGDiscrete\",f:parsenoop},227:{n:\"BrtBeginPCDSDTupleCache\",f:parsenoop},228:{n:\"BrtEndPCDSDTupleCache\",f:parsenoop},229:{n:\"BrtBeginPCDSDTCEntries\",f:parsenoop},230:{n:\"BrtEndPCDSDTCEntries\",f:parsenoop},231:{n:\"BrtBeginPCDSDTCEMembers\",f:parsenoop},232:{n:\"BrtEndPCDSDTCEMembers\",f:parsenoop},233:{n:\"BrtBeginPCDSDTCEMember\",f:parsenoop},234:{n:\"BrtEndPCDSDTCEMember\",f:parsenoop},235:{n:\"BrtBeginPCDSDTCQueries\",f:parsenoop},236:{n:\"BrtEndPCDSDTCQueries\",f:parsenoop},237:{n:\"BrtBeginPCDSDTCQuery\",f:parsenoop},238:{n:\"BrtEndPCDSDTCQuery\",f:parsenoop},239:{n:\"BrtBeginPCDSDTCSets\",f:parsenoop},240:{n:\"BrtEndPCDSDTCSets\",f:parsenoop},241:{n:\"BrtBeginPCDSDTCSet\",f:parsenoop},242:{n:\"BrtEndPCDSDTCSet\",f:parsenoop},243:{n:\"BrtBeginPCDCalcItems\",f:parsenoop},244:{n:\"BrtEndPCDCalcItems\",f:parsenoop},245:{n:\"BrtBeginPCDCalcItem\",f:parsenoop},246:{n:\"BrtEndPCDCalcItem\",f:parsenoop},247:{n:\"BrtBeginPRule\",f:parsenoop},248:{n:\"BrtEndPRule\",f:parsenoop},249:{n:\"BrtBeginPRFilters\",f:parsenoop},250:{n:\"BrtEndPRFilters\",f:parsenoop},251:{n:\"BrtBeginPRFilter\",f:parsenoop},252:{n:\"BrtEndPRFilter\",f:parsenoop},253:{n:\"BrtBeginPNames\",f:parsenoop},254:{n:\"BrtEndPNames\",f:parsenoop},255:{n:\"BrtBeginPName\",f:parsenoop},256:{n:\"BrtEndPName\",f:parsenoop},257:{n:\"BrtBeginPNPairs\",f:parsenoop},258:{n:\"BrtEndPNPairs\",f:parsenoop},259:{n:\"BrtBeginPNPair\",f:parsenoop},260:{n:\"BrtEndPNPair\",f:parsenoop},261:{n:\"BrtBeginECWebProps\",f:parsenoop},262:{n:\"BrtEndECWebProps\",f:parsenoop},263:{n:\"BrtBeginEcWpTables\",f:parsenoop},264:{n:\"BrtEndECWPTables\",f:parsenoop},265:{n:\"BrtBeginECParams\",f:parsenoop},266:{n:\"BrtEndECParams\",f:parsenoop},267:{n:\"BrtBeginECParam\",f:parsenoop},268:{n:\"BrtEndECParam\",f:parsenoop},269:{n:\"BrtBeginPCDKPIs\",f:parsenoop},270:{n:\"BrtEndPCDKPIs\",f:parsenoop},271:{n:\"BrtBeginPCDKPI\",f:parsenoop},272:{n:\"BrtEndPCDKPI\",f:parsenoop},273:{n:\"BrtBeginDims\",f:parsenoop},274:{n:\"BrtEndDims\",f:parsenoop},275:{n:\"BrtBeginDim\",f:parsenoop},276:{n:\"BrtEndDim\",f:parsenoop},277:{n:\"BrtIndexPartEnd\",f:parsenoop},278:{n:\"BrtBeginStyleSheet\",f:parsenoop},279:{n:\"BrtEndStyleSheet\",f:parsenoop},280:{n:\"BrtBeginSXView\",f:parsenoop},281:{n:\"BrtEndSXVI\",f:parsenoop},282:{n:\"BrtBeginSXVI\",f:parsenoop},283:{n:\"BrtBeginSXVIs\",f:parsenoop},284:{n:\"BrtEndSXVIs\",f:parsenoop},285:{n:\"BrtBeginSXVD\",f:parsenoop},286:{n:\"BrtEndSXVD\",f:parsenoop},287:{n:\"BrtBeginSXVDs\",f:parsenoop},288:{n:\"BrtEndSXVDs\",f:parsenoop},289:{n:\"BrtBeginSXPI\",f:parsenoop},290:{n:\"BrtEndSXPI\",f:parsenoop},291:{n:\"BrtBeginSXPIs\",f:parsenoop},292:{n:\"BrtEndSXPIs\",f:parsenoop},293:{n:\"BrtBeginSXDI\",f:parsenoop},294:{n:\"BrtEndSXDI\",f:parsenoop},295:{n:\"BrtBeginSXDIs\",f:parsenoop},296:{n:\"BrtEndSXDIs\",f:parsenoop},297:{n:\"BrtBeginSXLI\",f:parsenoop},298:{n:\"BrtEndSXLI\",f:parsenoop},299:{n:\"BrtBeginSXLIRws\",f:parsenoop},300:{n:\"BrtEndSXLIRws\",f:parsenoop},301:{n:\"BrtBeginSXLICols\",f:parsenoop},302:{n:\"BrtEndSXLICols\",f:parsenoop},303:{n:\"BrtBeginSXFormat\",f:parsenoop},304:{n:\"BrtEndSXFormat\",f:parsenoop},305:{n:\"BrtBeginSXFormats\",f:parsenoop},306:{n:\"BrtEndSxFormats\",f:parsenoop},307:{n:\"BrtBeginSxSelect\",f:parsenoop},308:{n:\"BrtEndSxSelect\",f:parsenoop},309:{n:\"BrtBeginISXVDRws\",f:parsenoop},310:{n:\"BrtEndISXVDRws\",f:parsenoop},311:{n:\"BrtBeginISXVDCols\",f:parsenoop},312:{n:\"BrtEndISXVDCols\",f:parsenoop},313:{n:\"BrtEndSXLocation\",f:parsenoop},314:{n:\"BrtBeginSXLocation\",f:parsenoop},315:{n:\"BrtEndSXView\",f:parsenoop},316:{n:\"BrtBeginSXTHs\",f:parsenoop},317:{n:\"BrtEndSXTHs\",f:parsenoop},318:{n:\"BrtBeginSXTH\",f:parsenoop},319:{n:\"BrtEndSXTH\",f:parsenoop},320:{n:\"BrtBeginISXTHRws\",f:parsenoop},321:{n:\"BrtEndISXTHRws\",f:parsenoop},322:{n:\"BrtBeginISXTHCols\",f:parsenoop},323:{n:\"BrtEndISXTHCols\",f:parsenoop},324:{n:\"BrtBeginSXTDMPS\",f:parsenoop},325:{n:\"BrtEndSXTDMPs\",f:parsenoop},326:{n:\"BrtBeginSXTDMP\",f:parsenoop},327:{n:\"BrtEndSXTDMP\",f:parsenoop},328:{n:\"BrtBeginSXTHItems\",f:parsenoop},329:{n:\"BrtEndSXTHItems\",f:parsenoop},330:{n:\"BrtBeginSXTHItem\",f:parsenoop},331:{n:\"BrtEndSXTHItem\",f:parsenoop},332:{n:\"BrtBeginMetadata\",f:parsenoop},333:{n:\"BrtEndMetadata\",f:parsenoop},334:{n:\"BrtBeginEsmdtinfo\",f:parsenoop},335:{n:\"BrtMdtinfo\",f:parsenoop},336:{n:\"BrtEndEsmdtinfo\",f:parsenoop},337:{n:\"BrtBeginEsmdb\",f:parsenoop},338:{n:\"BrtEndEsmdb\",f:parsenoop},339:{n:\"BrtBeginEsfmd\",f:parsenoop},340:{n:\"BrtEndEsfmd\",f:parsenoop},341:{n:\"BrtBeginSingleCells\",f:parsenoop},342:{n:\"BrtEndSingleCells\",f:parsenoop},343:{n:\"BrtBeginList\",f:parsenoop},344:{n:\"BrtEndList\",f:parsenoop},345:{n:\"BrtBeginListCols\",f:parsenoop},346:{n:\"BrtEndListCols\",f:parsenoop},347:{n:\"BrtBeginListCol\",f:parsenoop},348:{n:\"BrtEndListCol\",f:parsenoop},349:{n:\"BrtBeginListXmlCPr\",f:parsenoop},350:{n:\"BrtEndListXmlCPr\",f:parsenoop},351:{n:\"BrtListCCFmla\",f:parsenoop},352:{n:\"BrtListTrFmla\",f:parsenoop},353:{n:\"BrtBeginExternals\",f:parsenoop},354:{n:\"BrtEndExternals\",f:parsenoop},355:{n:\"BrtSupBookSrc\",f:parsenoop},357:{n:\"BrtSupSelf\",f:parsenoop},358:{n:\"BrtSupSame\",f:parsenoop},359:{n:\"BrtSupTabs\",f:parsenoop},360:{n:\"BrtBeginSupBook\",f:parsenoop},361:{n:\"BrtPlaceholderName\",f:parsenoop},362:{n:\"BrtExternSheet\",f:parsenoop},363:{n:\"BrtExternTableStart\",f:parsenoop},364:{n:\"BrtExternTableEnd\",f:parsenoop},366:{n:\"BrtExternRowHdr\",f:parsenoop},367:{n:\"BrtExternCellBlank\",f:parsenoop},368:{n:\"BrtExternCellReal\",f:parsenoop},369:{n:\"BrtExternCellBool\",f:parsenoop},370:{n:\"BrtExternCellError\",f:parsenoop},371:{n:\"BrtExternCellString\",f:parsenoop},372:{n:\"BrtBeginEsmdx\",f:parsenoop},373:{n:\"BrtEndEsmdx\",f:parsenoop},374:{n:\"BrtBeginMdxSet\",f:parsenoop},375:{n:\"BrtEndMdxSet\",f:parsenoop},376:{n:\"BrtBeginMdxMbrProp\",f:parsenoop},377:{n:\"BrtEndMdxMbrProp\",f:parsenoop},378:{n:\"BrtBeginMdxKPI\",f:parsenoop},379:{n:\"BrtEndMdxKPI\",f:parsenoop},380:{n:\"BrtBeginEsstr\",f:parsenoop},381:{n:\"BrtEndEsstr\",f:parsenoop},382:{n:\"BrtBeginPRFItem\",f:parsenoop},383:{n:\"BrtEndPRFItem\",f:parsenoop},384:{n:\"BrtBeginPivotCacheIDs\",f:parsenoop},385:{n:\"BrtEndPivotCacheIDs\",f:parsenoop},386:{n:\"BrtBeginPivotCacheID\",f:parsenoop},387:{n:\"BrtEndPivotCacheID\",f:parsenoop},388:{n:\"BrtBeginISXVIs\",f:parsenoop},389:{n:\"BrtEndISXVIs\",f:parsenoop},390:{n:\"BrtBeginColInfos\",f:parsenoop},391:{n:\"BrtEndColInfos\",f:parsenoop},392:{n:\"BrtBeginRwBrk\",f:parsenoop},393:{n:\"BrtEndRwBrk\",f:parsenoop},394:{n:\"BrtBeginColBrk\",f:parsenoop},395:{n:\"BrtEndColBrk\",f:parsenoop},396:{n:\"BrtBrk\",f:parsenoop},397:{n:\"BrtUserBookView\",f:parsenoop},398:{n:\"BrtInfo\",f:parsenoop},399:{n:\"BrtCUsr\",f:parsenoop},400:{n:\"BrtUsr\",f:parsenoop},401:{n:\"BrtBeginUsers\",f:parsenoop},403:{n:\"BrtEOF\",f:parsenoop},404:{n:\"BrtUCR\",f:parsenoop},405:{n:\"BrtRRInsDel\",f:parsenoop},406:{n:\"BrtRREndInsDel\",f:parsenoop},407:{n:\"BrtRRMove\",f:parsenoop},408:{n:\"BrtRREndMove\",f:parsenoop},409:{n:\"BrtRRChgCell\",f:parsenoop},410:{n:\"BrtRREndChgCell\",f:parsenoop},411:{n:\"BrtRRHeader\",f:parsenoop},412:{n:\"BrtRRUserView\",f:parsenoop},413:{n:\"BrtRRRenSheet\",f:parsenoop},414:{n:\"BrtRRInsertSh\",f:parsenoop},415:{n:\"BrtRRDefName\",f:parsenoop},416:{n:\"BrtRRNote\",f:parsenoop},417:{n:\"BrtRRConflict\",f:parsenoop},418:{n:\"BrtRRTQSIF\",f:parsenoop},419:{n:\"BrtRRFormat\",f:parsenoop},420:{n:\"BrtRREndFormat\",f:parsenoop},421:{n:\"BrtRRAutoFmt\",f:parsenoop},422:{n:\"BrtBeginUserShViews\",f:parsenoop},423:{n:\"BrtBeginUserShView\",f:parsenoop},424:{n:\"BrtEndUserShView\",f:parsenoop},425:{n:\"BrtEndUserShViews\",f:parsenoop},426:{n:\"BrtArrFmla\",f:parsenoop},427:{n:\"BrtShrFmla\",f:parsenoop},428:{n:\"BrtTable\",f:parsenoop},429:{n:\"BrtBeginExtConnections\",f:parsenoop},430:{n:\"BrtEndExtConnections\",f:parsenoop},431:{n:\"BrtBeginPCDCalcMems\",f:parsenoop},432:{n:\"BrtEndPCDCalcMems\",f:parsenoop},433:{n:\"BrtBeginPCDCalcMem\",f:parsenoop},434:{n:\"BrtEndPCDCalcMem\",f:parsenoop},435:{n:\"BrtBeginPCDHGLevels\",f:parsenoop},436:{n:\"BrtEndPCDHGLevels\",f:parsenoop},437:{n:\"BrtBeginPCDHGLevel\",f:parsenoop},438:{n:\"BrtEndPCDHGLevel\",f:parsenoop},439:{n:\"BrtBeginPCDHGLGroups\",f:parsenoop},440:{n:\"BrtEndPCDHGLGroups\",f:parsenoop},441:{n:\"BrtBeginPCDHGLGroup\",f:parsenoop},442:{n:\"BrtEndPCDHGLGroup\",f:parsenoop},443:{n:\"BrtBeginPCDHGLGMembers\",f:parsenoop},444:{n:\"BrtEndPCDHGLGMembers\",f:parsenoop},445:{n:\"BrtBeginPCDHGLGMember\",f:parsenoop},446:{n:\"BrtEndPCDHGLGMember\",f:parsenoop},447:{n:\"BrtBeginQSI\",f:parsenoop},448:{n:\"BrtEndQSI\",f:parsenoop},449:{n:\"BrtBeginQSIR\",f:parsenoop},450:{n:\"BrtEndQSIR\",f:parsenoop},451:{n:\"BrtBeginDeletedNames\",f:parsenoop},452:{n:\"BrtEndDeletedNames\",f:parsenoop},453:{n:\"BrtBeginDeletedName\",f:parsenoop},454:{n:\"BrtEndDeletedName\",f:parsenoop},455:{n:\"BrtBeginQSIFs\",f:parsenoop},456:{n:\"BrtEndQSIFs\",f:parsenoop},457:{n:\"BrtBeginQSIF\",f:parsenoop},458:{n:\"BrtEndQSIF\",f:parsenoop},459:{n:\"BrtBeginAutoSortScope\",f:parsenoop},460:{n:\"BrtEndAutoSortScope\",f:parsenoop},461:{n:\"BrtBeginConditionalFormatting\",f:parsenoop},462:{n:\"BrtEndConditionalFormatting\",f:parsenoop},463:{n:\"BrtBeginCFRule\",f:parsenoop},464:{n:\"BrtEndCFRule\",f:parsenoop},465:{n:\"BrtBeginIconSet\",f:parsenoop},466:{n:\"BrtEndIconSet\",f:parsenoop},467:{n:\"BrtBeginDatabar\",f:parsenoop},468:{n:\"BrtEndDatabar\",f:parsenoop},469:{n:\"BrtBeginColorScale\",f:parsenoop},470:{n:\"BrtEndColorScale\",f:parsenoop},471:{n:\"BrtCFVO\",f:parsenoop},472:{n:\"BrtExternValueMeta\",f:parsenoop},473:{n:\"BrtBeginColorPalette\",f:parsenoop},474:{n:\"BrtEndColorPalette\",f:parsenoop},475:{n:\"BrtIndexedColor\",f:parsenoop},476:{n:\"BrtMargins\",f:parsenoop},477:{n:\"BrtPrintOptions\",f:parsenoop},478:{n:\"BrtPageSetup\",f:parsenoop},479:{n:\"BrtBeginHeaderFooter\",f:parsenoop},480:{n:\"BrtEndHeaderFooter\",f:parsenoop},481:{n:\"BrtBeginSXCrtFormat\",f:parsenoop},482:{n:\"BrtEndSXCrtFormat\",f:parsenoop},483:{n:\"BrtBeginSXCrtFormats\",f:parsenoop},484:{n:\"BrtEndSXCrtFormats\",f:parsenoop},485:{n:\"BrtWsFmtInfo\",f:parsenoop},486:{n:\"BrtBeginMgs\",f:parsenoop},487:{n:\"BrtEndMGs\",f:parsenoop},488:{n:\"BrtBeginMGMaps\",f:parsenoop},489:{n:\"BrtEndMGMaps\",f:parsenoop},490:{n:\"BrtBeginMG\",f:parsenoop},491:{n:\"BrtEndMG\",f:parsenoop},492:{n:\"BrtBeginMap\",f:parsenoop},493:{n:\"BrtEndMap\",f:parsenoop},494:{n:\"BrtHLink\",f:parse_BrtHLink},495:{n:\"BrtBeginDCon\",f:parsenoop},496:{n:\"BrtEndDCon\",f:parsenoop},497:{n:\"BrtBeginDRefs\",f:parsenoop},498:{n:\"BrtEndDRefs\",f:parsenoop},499:{n:\"BrtDRef\",f:parsenoop},500:{n:\"BrtBeginScenMan\",f:parsenoop},501:{n:\"BrtEndScenMan\",f:parsenoop},502:{n:\"BrtBeginSct\",f:parsenoop},503:{n:\"BrtEndSct\",f:parsenoop},504:{n:\"BrtSlc\",f:parsenoop},505:{n:\"BrtBeginDXFs\",f:parsenoop},506:{n:\"BrtEndDXFs\",f:parsenoop},507:{n:\"BrtDXF\",f:parsenoop},508:{n:\"BrtBeginTableStyles\",f:parsenoop},509:{n:\"BrtEndTableStyles\",f:parsenoop},510:{n:\"BrtBeginTableStyle\",f:parsenoop},511:{n:\"BrtEndTableStyle\",f:parsenoop},512:{n:\"BrtTableStyleElement\",f:parsenoop},513:{n:\"BrtTableStyleClient\",f:parsenoop},514:{n:\"BrtBeginVolDeps\",f:parsenoop},515:{n:\"BrtEndVolDeps\",f:parsenoop},516:{n:\"BrtBeginVolType\",f:parsenoop},517:{n:\"BrtEndVolType\",f:parsenoop},518:{n:\"BrtBeginVolMain\",f:parsenoop},519:{n:\"BrtEndVolMain\",f:parsenoop},520:{n:\"BrtBeginVolTopic\",f:parsenoop},521:{n:\"BrtEndVolTopic\",f:parsenoop},522:{n:\"BrtVolSubtopic\",f:parsenoop},523:{n:\"BrtVolRef\",f:parsenoop},524:{n:\"BrtVolNum\",f:parsenoop},525:{n:\"BrtVolErr\",f:parsenoop},526:{n:\"BrtVolStr\",f:parsenoop},527:{n:\"BrtVolBool\",f:parsenoop},528:{n:\"BrtBeginCalcChain$\",f:parsenoop},529:{n:\"BrtEndCalcChain$\",f:parsenoop},530:{n:\"BrtBeginSortState\",f:parsenoop},531:{n:\"BrtEndSortState\",f:parsenoop},532:{n:\"BrtBeginSortCond\",f:parsenoop},533:{n:\"BrtEndSortCond\",f:parsenoop},534:{n:\"BrtBookProtection\",f:parsenoop},535:{n:\"BrtSheetProtection\",f:parsenoop},536:{n:\"BrtRangeProtection\",f:parsenoop},537:{n:\"BrtPhoneticInfo\",f:parsenoop},538:{n:\"BrtBeginECTxtWiz\",f:parsenoop},539:{n:\"BrtEndECTxtWiz\",f:parsenoop},540:{n:\"BrtBeginECTWFldInfoLst\",f:parsenoop},541:{n:\"BrtEndECTWFldInfoLst\",f:parsenoop},542:{n:\"BrtBeginECTwFldInfo\",f:parsenoop},548:{n:\"BrtFileSharing\",f:parsenoop},549:{n:\"BrtOleSize\",f:parsenoop},550:{n:\"BrtDrawing\",f:parsenoop},551:{n:\"BrtLegacyDrawing\",f:parsenoop},552:{n:\"BrtLegacyDrawingHF\",f:parsenoop},553:{n:\"BrtWebOpt\",f:parsenoop},554:{n:\"BrtBeginWebPubItems\",f:parsenoop},555:{n:\"BrtEndWebPubItems\",f:parsenoop},556:{n:\"BrtBeginWebPubItem\",f:parsenoop},557:{n:\"BrtEndWebPubItem\",f:parsenoop},558:{n:\"BrtBeginSXCondFmt\",f:parsenoop},559:{n:\"BrtEndSXCondFmt\",f:parsenoop},560:{n:\"BrtBeginSXCondFmts\",f:parsenoop},561:{n:\"BrtEndSXCondFmts\",f:parsenoop},562:{n:\"BrtBkHim\",f:parsenoop},564:{n:\"BrtColor\",f:parsenoop},565:{n:\"BrtBeginIndexedColors\",f:parsenoop},566:{n:\"BrtEndIndexedColors\",f:parsenoop},569:{n:\"BrtBeginMRUColors\",f:parsenoop},570:{n:\"BrtEndMRUColors\",f:parsenoop},572:{n:\"BrtMRUColor\",f:parsenoop},573:{n:\"BrtBeginDVals\",f:parsenoop},574:{n:\"BrtEndDVals\",f:parsenoop},577:{n:\"BrtSupNameStart\",f:parsenoop},578:{n:\"BrtSupNameValueStart\",f:parsenoop},579:{n:\"BrtSupNameValueEnd\",f:parsenoop},580:{n:\"BrtSupNameNum\",f:parsenoop},581:{n:\"BrtSupNameErr\",f:parsenoop},582:{n:\"BrtSupNameSt\",f:parsenoop},583:{n:\"BrtSupNameNil\",f:parsenoop},584:{n:\"BrtSupNameBool\",f:parsenoop},585:{n:\"BrtSupNameFmla\",f:parsenoop},586:{n:\"BrtSupNameBits\",f:parsenoop},587:{n:\"BrtSupNameEnd\",f:parsenoop},588:{n:\"BrtEndSupBook\",f:parsenoop},589:{n:\"BrtCellSmartTagProperty\",f:parsenoop},590:{n:\"BrtBeginCellSmartTag\",f:parsenoop},591:{n:\"BrtEndCellSmartTag\",f:parsenoop},592:{n:\"BrtBeginCellSmartTags\",f:parsenoop},593:{n:\"BrtEndCellSmartTags\",f:parsenoop},594:{n:\"BrtBeginSmartTags\",f:parsenoop},595:{n:\"BrtEndSmartTags\",f:parsenoop},596:{n:\"BrtSmartTagType\",f:parsenoop},597:{n:\"BrtBeginSmartTagTypes\",f:parsenoop},598:{n:\"BrtEndSmartTagTypes\",f:parsenoop},599:{n:\"BrtBeginSXFilters\",f:parsenoop},600:{n:\"BrtEndSXFilters\",f:parsenoop},601:{n:\"BrtBeginSXFILTER\",f:parsenoop},602:{n:\"BrtEndSXFilter\",f:parsenoop},603:{n:\"BrtBeginFills\",f:parsenoop},604:{n:\"BrtEndFills\",f:parsenoop},605:{n:\"BrtBeginCellWatches\",f:parsenoop},606:{n:\"BrtEndCellWatches\",f:parsenoop},607:{n:\"BrtCellWatch\",f:parsenoop},608:{n:\"BrtBeginCRErrs\",f:parsenoop},609:{n:\"BrtEndCRErrs\",f:parsenoop},610:{n:\"BrtCrashRecErr\",f:parsenoop},611:{n:\"BrtBeginFonts\",f:parsenoop},612:{n:\"BrtEndFonts\",f:parsenoop},613:{n:\"BrtBeginBorders\",f:parsenoop},614:{n:\"BrtEndBorders\",f:parsenoop},615:{n:\"BrtBeginFmts\",f:parsenoop},616:{n:\"BrtEndFmts\",f:parsenoop},617:{n:\"BrtBeginCellXFs\",f:parsenoop},618:{n:\"BrtEndCellXFs\",f:parsenoop},619:{n:\"BrtBeginStyles\",f:parsenoop},620:{n:\"BrtEndStyles\",f:parsenoop},625:{n:\"BrtBigName\",f:parsenoop},626:{n:\"BrtBeginCellStyleXFs\",f:parsenoop},627:{n:\"BrtEndCellStyleXFs\",f:parsenoop},628:{n:\"BrtBeginComments\",f:parsenoop},629:{n:\"BrtEndComments\",f:parsenoop},630:{n:\"BrtBeginCommentAuthors\",f:parsenoop},631:{n:\"BrtEndCommentAuthors\",f:parsenoop},632:{n:\"BrtCommentAuthor\",f:parse_BrtCommentAuthor},633:{n:\"BrtBeginCommentList\",f:parsenoop},634:{n:\"BrtEndCommentList\",f:parsenoop},635:{n:\"BrtBeginComment\",f:parse_BrtBeginComment},636:{n:\"BrtEndComment\",f:parsenoop},637:{n:\"BrtCommentText\",f:parse_BrtCommentText},638:{n:\"BrtBeginOleObjects\",f:parsenoop},639:{n:\"BrtOleObject\",f:parsenoop},640:{n:\"BrtEndOleObjects\",f:parsenoop},641:{n:\"BrtBeginSxrules\",f:parsenoop},642:{n:\"BrtEndSxRules\",f:parsenoop},643:{n:\"BrtBeginActiveXControls\",f:parsenoop},644:{n:\"BrtActiveX\",f:parsenoop},645:{n:\"BrtEndActiveXControls\",f:parsenoop},646:{n:\"BrtBeginPCDSDTCEMembersSortBy\",f:parsenoop},648:{n:\"BrtBeginCellIgnoreECs\",f:parsenoop},649:{n:\"BrtCellIgnoreEC\",f:parsenoop},650:{n:\"BrtEndCellIgnoreECs\",f:parsenoop},651:{n:\"BrtCsProp\",f:parsenoop},652:{n:\"BrtCsPageSetup\",f:parsenoop},653:{n:\"BrtBeginUserCsViews\",f:parsenoop},654:{n:\"BrtEndUserCsViews\",f:parsenoop},655:{n:\"BrtBeginUserCsView\",f:parsenoop},656:{n:\"BrtEndUserCsView\",f:parsenoop},657:{n:\"BrtBeginPcdSFCIEntries\",f:parsenoop},658:{n:\"BrtEndPCDSFCIEntries\",f:parsenoop},659:{n:\"BrtPCDSFCIEntry\",f:parsenoop},660:{n:\"BrtBeginListParts\",f:parsenoop},661:{n:\"BrtListPart\",f:parsenoop},662:{n:\"BrtEndListParts\",f:parsenoop},663:{n:\"BrtSheetCalcProp\",f:parsenoop},664:{n:\"BrtBeginFnGroup\",f:parsenoop},665:{n:\"BrtFnGroup\",f:parsenoop},666:{n:\"BrtEndFnGroup\",f:parsenoop},667:{n:\"BrtSupAddin\",f:parsenoop},668:{n:\"BrtSXTDMPOrder\",f:parsenoop},669:{n:\"BrtCsProtection\",f:parsenoop},671:{n:\"BrtBeginWsSortMap\",f:parsenoop},672:{n:\"BrtEndWsSortMap\",f:parsenoop},673:{n:\"BrtBeginRRSort\",f:parsenoop},674:{n:\"BrtEndRRSort\",f:parsenoop},675:{n:\"BrtRRSortItem\",f:parsenoop},676:{n:\"BrtFileSharingIso\",f:parsenoop},677:{n:\"BrtBookProtectionIso\",f:parsenoop},678:{n:\"BrtSheetProtectionIso\",f:parsenoop},679:{n:\"BrtCsProtectionIso\",f:parsenoop},680:{n:\"BrtRangeProtectionIso\",f:parsenoop},1024:{n:\"BrtRwDescent\",f:parsenoop},1025:{n:\"BrtKnownFonts\",f:parsenoop},1026:{n:\"BrtBeginSXTupleSet\",f:parsenoop},1027:{n:\"BrtEndSXTupleSet\",f:parsenoop},1028:{n:\"BrtBeginSXTupleSetHeader\",f:parsenoop},1029:{n:\"BrtEndSXTupleSetHeader\",f:parsenoop},1030:{n:\"BrtSXTupleSetHeaderItem\",f:parsenoop},1031:{n:\"BrtBeginSXTupleSetData\",f:parsenoop},1032:{n:\"BrtEndSXTupleSetData\",f:parsenoop},1033:{n:\"BrtBeginSXTupleSetRow\",f:parsenoop},1034:{n:\"BrtEndSXTupleSetRow\",f:parsenoop},1035:{n:\"BrtSXTupleSetRowItem\",f:parsenoop},1036:{n:\"BrtNameExt\",f:parsenoop},1037:{n:\"BrtPCDH14\",f:parsenoop},1038:{n:\"BrtBeginPCDCalcMem14\",f:parsenoop},1039:{n:\"BrtEndPCDCalcMem14\",f:parsenoop},1040:{n:\"BrtSXTH14\",f:parsenoop},1041:{n:\"BrtBeginSparklineGroup\",f:parsenoop},1042:{n:\"BrtEndSparklineGroup\",f:parsenoop},1043:{n:\"BrtSparkline\",f:parsenoop},1044:{n:\"BrtSXDI14\",f:parsenoop},1045:{n:\"BrtWsFmtInfoEx14\",f:parsenoop},1046:{n:\"BrtBeginConditionalFormatting14\",f:parsenoop},1047:{n:\"BrtEndConditionalFormatting14\",f:parsenoop},1048:{n:\"BrtBeginCFRule14\",f:parsenoop},1049:{n:\"BrtEndCFRule14\",f:parsenoop},1050:{n:\"BrtCFVO14\",f:parsenoop},1051:{n:\"BrtBeginDatabar14\",f:parsenoop},1052:{n:\"BrtBeginIconSet14\",f:parsenoop},1053:{n:\"BrtDVal14\",f:parsenoop},1054:{n:\"BrtBeginDVals14\",f:parsenoop},1055:{n:\"BrtColor14\",f:parsenoop},1056:{n:\"BrtBeginSparklines\",f:parsenoop},1057:{n:\"BrtEndSparklines\",f:parsenoop},1058:{n:\"BrtBeginSparklineGroups\",f:parsenoop},1059:{n:\"BrtEndSparklineGroups\",f:parsenoop},1061:{n:\"BrtSXVD14\",f:parsenoop},1062:{n:\"BrtBeginSxview14\",f:parsenoop},1063:{n:\"BrtEndSxview14\",f:parsenoop},1066:{n:\"BrtBeginPCD14\",f:parsenoop},1067:{n:\"BrtEndPCD14\",f:parsenoop},1068:{n:\"BrtBeginExtConn14\",f:parsenoop},1069:{n:\"BrtEndExtConn14\",f:parsenoop},1070:{n:\"BrtBeginSlicerCacheIDs\",f:parsenoop},1071:{n:\"BrtEndSlicerCacheIDs\",f:parsenoop},1072:{n:\"BrtBeginSlicerCacheID\",f:parsenoop},1073:{n:\"BrtEndSlicerCacheID\",f:parsenoop},1075:{n:\"BrtBeginSlicerCache\",f:parsenoop},1076:{n:\"BrtEndSlicerCache\",f:parsenoop},1077:{n:\"BrtBeginSlicerCacheDef\",f:parsenoop},1078:{n:\"BrtEndSlicerCacheDef\",f:parsenoop},1079:{n:\"BrtBeginSlicersEx\",f:parsenoop},1080:{n:\"BrtEndSlicersEx\",f:parsenoop},1081:{n:\"BrtBeginSlicerEx\",f:parsenoop},1082:{n:\"BrtEndSlicerEx\",f:parsenoop},1083:{n:\"BrtBeginSlicer\",f:parsenoop},1084:{n:\"BrtEndSlicer\",f:parsenoop},1085:{n:\"BrtSlicerCachePivotTables\",f:parsenoop},1086:{n:\"BrtBeginSlicerCacheOlapImpl\",f:parsenoop},1087:{n:\"BrtEndSlicerCacheOlapImpl\",f:parsenoop},1088:{n:\"BrtBeginSlicerCacheLevelsData\",f:parsenoop},1089:{n:\"BrtEndSlicerCacheLevelsData\",f:parsenoop},1090:{n:\"BrtBeginSlicerCacheLevelData\",f:parsenoop},1091:{n:\"BrtEndSlicerCacheLevelData\",f:parsenoop},1092:{n:\"BrtBeginSlicerCacheSiRanges\",f:parsenoop},1093:{n:\"BrtEndSlicerCacheSiRanges\",f:parsenoop},1094:{n:\"BrtBeginSlicerCacheSiRange\",f:parsenoop},1095:{n:\"BrtEndSlicerCacheSiRange\",f:parsenoop},1096:{n:\"BrtSlicerCacheOlapItem\",f:parsenoop},1097:{n:\"BrtBeginSlicerCacheSelections\",f:parsenoop},1098:{n:\"BrtSlicerCacheSelection\",f:parsenoop},1099:{n:\"BrtEndSlicerCacheSelections\",f:parsenoop},1100:{n:\"BrtBeginSlicerCacheNative\",f:parsenoop},1101:{n:\"BrtEndSlicerCacheNative\",f:parsenoop},1102:{n:\"BrtSlicerCacheNativeItem\",f:parsenoop},1103:{n:\"BrtRangeProtection14\",f:parsenoop},1104:{n:\"BrtRangeProtectionIso14\",f:parsenoop},1105:{n:\"BrtCellIgnoreEC14\",f:parsenoop},1111:{n:\"BrtList14\",f:parsenoop},1112:{n:\"BrtCFIcon\",f:parsenoop},1113:{n:\"BrtBeginSlicerCachesPivotCacheIDs\",f:parsenoop},1114:{n:\"BrtEndSlicerCachesPivotCacheIDs\",f:parsenoop},1115:{n:\"BrtBeginSlicers\",f:parsenoop},1116:{n:\"BrtEndSlicers\",f:parsenoop},1117:{n:\"BrtWbProp14\",f:parsenoop},1118:{n:\"BrtBeginSXEdit\",f:parsenoop},1119:{n:\"BrtEndSXEdit\",f:parsenoop},1120:{n:\"BrtBeginSXEdits\",f:parsenoop},1121:{n:\"BrtEndSXEdits\",f:parsenoop},1122:{n:\"BrtBeginSXChange\",f:parsenoop},1123:{n:\"BrtEndSXChange\",f:parsenoop},1124:{n:\"BrtBeginSXChanges\",f:parsenoop},1125:{n:\"BrtEndSXChanges\",f:parsenoop},1126:{n:\"BrtSXTupleItems\",f:parsenoop},1128:{n:\"BrtBeginSlicerStyle\",f:parsenoop},1129:{n:\"BrtEndSlicerStyle\",f:parsenoop},1130:{n:\"BrtSlicerStyleElement\",f:parsenoop},1131:{n:\"BrtBeginStyleSheetExt14\",f:parsenoop},1132:{n:\"BrtEndStyleSheetExt14\",f:parsenoop},1133:{n:\"BrtBeginSlicerCachesPivotCacheID\",f:parsenoop},1134:{n:\"BrtEndSlicerCachesPivotCacheID\",f:parsenoop},1135:{n:\"BrtBeginConditionalFormattings\",f:parsenoop},1136:{n:\"BrtEndConditionalFormattings\",f:parsenoop},1137:{n:\"BrtBeginPCDCalcMemExt\",f:parsenoop},1138:{n:\"BrtEndPCDCalcMemExt\",f:parsenoop},1139:{n:\"BrtBeginPCDCalcMemsExt\",f:parsenoop},1140:{n:\"BrtEndPCDCalcMemsExt\",f:parsenoop},1141:{n:\"BrtPCDField14\",f:parsenoop},1142:{n:\"BrtBeginSlicerStyles\",f:parsenoop},1143:{n:\"BrtEndSlicerStyles\",f:parsenoop},1144:{n:\"BrtBeginSlicerStyleElements\",f:parsenoop},1145:{n:\"BrtEndSlicerStyleElements\",f:parsenoop},1146:{n:\"BrtCFRuleExt\",f:parsenoop},1147:{n:\"BrtBeginSXCondFmt14\",f:parsenoop},1148:{n:\"BrtEndSXCondFmt14\",f:parsenoop},1149:{n:\"BrtBeginSXCondFmts14\",f:parsenoop},1150:{n:\"BrtEndSXCondFmts14\",f:parsenoop},1152:{n:\"BrtBeginSortCond14\",f:parsenoop},1153:{n:\"BrtEndSortCond14\",f:parsenoop},1154:{n:\"BrtEndDVals14\",f:parsenoop},1155:{n:\"BrtEndIconSet14\",f:parsenoop},1156:{n:\"BrtEndDatabar14\",f:parsenoop},1157:{n:\"BrtBeginColorScale14\",f:parsenoop},1158:{n:\"BrtEndColorScale14\",f:parsenoop},1159:{n:\"BrtBeginSxrules14\",f:parsenoop},1160:{n:\"BrtEndSxrules14\",f:parsenoop},1161:{n:\"BrtBeginPRule14\",f:parsenoop},1162:{n:\"BrtEndPRule14\",f:parsenoop},1163:{n:\"BrtBeginPRFilters14\",f:parsenoop},1164:{n:\"BrtEndPRFilters14\",f:parsenoop},1165:{n:\"BrtBeginPRFilter14\",f:parsenoop},1166:{n:\"BrtEndPRFilter14\",f:parsenoop},1167:{n:\"BrtBeginPRFItem14\",f:parsenoop},1168:{n:\"BrtEndPRFItem14\",f:parsenoop},1169:{n:\"BrtBeginCellIgnoreECs14\",f:parsenoop},1170:{n:\"BrtEndCellIgnoreECs14\",f:parsenoop},1171:{n:\"BrtDxf14\",f:parsenoop},1172:{n:\"BrtBeginDxF14s\",f:parsenoop},1173:{n:\"BrtEndDxf14s\",f:parsenoop},1177:{n:\"BrtFilter14\",f:parsenoop},1178:{n:\"BrtBeginCustomFilters14\",f:parsenoop},1180:{n:\"BrtCustomFilter14\",f:parsenoop},1181:{n:\"BrtIconFilter14\",f:parsenoop},1182:{n:\"BrtPivotCacheConnectionName\",f:parsenoop},2048:{n:\"BrtBeginDecoupledPivotCacheIDs\",f:parsenoop},2049:{n:\"BrtEndDecoupledPivotCacheIDs\",f:parsenoop},2050:{n:\"BrtDecoupledPivotCacheID\",f:parsenoop},2051:{n:\"BrtBeginPivotTableRefs\",f:parsenoop},2052:{n:\"BrtEndPivotTableRefs\",f:parsenoop},2053:{n:\"BrtPivotTableRef\",f:parsenoop},2054:{n:\"BrtSlicerCacheBookPivotTables\",f:parsenoop},2055:{n:\"BrtBeginSxvcells\",f:parsenoop},2056:{n:\"BrtEndSxvcells\",f:parsenoop},2057:{n:\"BrtBeginSxRow\",f:parsenoop},2058:{n:\"BrtEndSxRow\",f:parsenoop},2060:{n:\"BrtPcdCalcMem15\",f:parsenoop},2067:{n:\"BrtQsi15\",f:parsenoop},2068:{n:\"BrtBeginWebExtensions\",f:parsenoop},2069:{n:\"BrtEndWebExtensions\",f:parsenoop},2070:{n:\"BrtWebExtension\",f:parsenoop},2071:{n:\"BrtAbsPath15\",f:parsenoop},2072:{n:\"BrtBeginPivotTableUISettings\",f:parsenoop},2073:{n:\"BrtEndPivotTableUISettings\",f:parsenoop},2075:{n:\"BrtTableSlicerCacheIDs\",f:parsenoop},2076:{n:\"BrtTableSlicerCacheID\",f:parsenoop},2077:{n:\"BrtBeginTableSlicerCache\",f:parsenoop},2078:{n:\"BrtEndTableSlicerCache\",f:parsenoop},2079:{n:\"BrtSxFilter15\",f:parsenoop},2080:{n:\"BrtBeginTimelineCachePivotCacheIDs\",f:parsenoop},2081:{n:\"BrtEndTimelineCachePivotCacheIDs\",f:parsenoop},2082:{n:\"BrtTimelineCachePivotCacheID\",f:parsenoop},2083:{n:\"BrtBeginTimelineCacheIDs\",f:parsenoop},2084:{n:\"BrtEndTimelineCacheIDs\",f:parsenoop},2085:{n:\"BrtBeginTimelineCacheID\",f:parsenoop},2086:{n:\"BrtEndTimelineCacheID\",f:parsenoop},2087:{n:\"BrtBeginTimelinesEx\",f:parsenoop},2088:{n:\"BrtEndTimelinesEx\",f:parsenoop},2089:{n:\"BrtBeginTimelineEx\",f:parsenoop},2090:{n:\"BrtEndTimelineEx\",f:parsenoop},2091:{n:\"BrtWorkBookPr15\",f:parsenoop},2092:{n:\"BrtPCDH15\",f:parsenoop},2093:{n:\"BrtBeginTimelineStyle\",f:parsenoop},2094:{n:\"BrtEndTimelineStyle\",f:parsenoop},2095:{n:\"BrtTimelineStyleElement\",f:parsenoop},2096:{n:\"BrtBeginTimelineStylesheetExt15\",f:parsenoop},2097:{n:\"BrtEndTimelineStylesheetExt15\",f:parsenoop},2098:{n:\"BrtBeginTimelineStyles\",f:parsenoop},2099:{n:\"BrtEndTimelineStyles\",f:parsenoop},2100:{n:\"BrtBeginTimelineStyleElements\",f:parsenoop},2101:{n:\"BrtEndTimelineStyleElements\",f:parsenoop},2102:{n:\"BrtDxf15\",f:parsenoop},2103:{n:\"BrtBeginDxfs15\",f:parsenoop},2104:{n:\"brtEndDxfs15\",f:parsenoop},2105:{n:\"BrtSlicerCacheHideItemsWithNoData\",f:parsenoop},2106:{n:\"BrtBeginItemUniqueNames\",f:parsenoop},2107:{n:\"BrtEndItemUniqueNames\",f:parsenoop},2108:{n:\"BrtItemUniqueName\",f:parsenoop},2109:{n:\"BrtBeginExtConn15\",f:parsenoop},2110:{n:\"BrtEndExtConn15\",f:parsenoop},2111:{n:\"BrtBeginOledbPr15\",f:parsenoop},2112:{n:\"BrtEndOledbPr15\",f:parsenoop},2113:{n:\"BrtBeginDataFeedPr15\",f:parsenoop},2114:{n:\"BrtEndDataFeedPr15\",f:parsenoop},2115:{n:\"BrtTextPr15\",f:parsenoop},2116:{n:\"BrtRangePr15\",f:parsenoop},2117:{n:\"BrtDbCommand15\",f:parsenoop},2118:{n:\"BrtBeginDbTables15\",f:parsenoop},2119:{n:\"BrtEndDbTables15\",f:parsenoop},2120:{n:\"BrtDbTable15\",f:parsenoop},2121:{n:\"BrtBeginDataModel\",f:parsenoop},2122:{n:\"BrtEndDataModel\",f:parsenoop},2123:{n:\"BrtBeginModelTables\",f:parsenoop},2124:{n:\"BrtEndModelTables\",f:parsenoop},2125:{n:\"BrtModelTable\",f:parsenoop},2126:{n:\"BrtBeginModelRelationships\",f:parsenoop},2127:{n:\"BrtEndModelRelationships\",f:parsenoop},2128:{n:\"BrtModelRelationship\",f:parsenoop},2129:{n:\"BrtBeginECTxtWiz15\",f:parsenoop},2130:{n:\"BrtEndECTxtWiz15\",f:parsenoop},2131:{n:\"BrtBeginECTWFldInfoLst15\",f:parsenoop},2132:{n:\"BrtEndECTWFldInfoLst15\",f:parsenoop},2133:{n:\"BrtBeginECTWFldInfo15\",f:parsenoop},2134:{n:\"BrtFieldListActiveItem\",f:parsenoop},2135:{n:\"BrtPivotCacheIdVersion\",f:parsenoop},2136:{n:\"BrtSXDI15\",f:parsenoop},65535:{n:\"\",f:parsenoop}};var evert_RE=evert_key(XLSBRecordEnum,\"n\");var XLSRecordEnum={3:{n:\"BIFF2NUM\",f:parse_BIFF2NUM},4:{n:\"BIFF2STR\",f:parse_BIFF2STR},6:{n:\"Formula\",f:parse_Formula},9:{n:\"BOF\",f:parse_BOF},10:{n:\"EOF\",f:parse_EOF},12:{n:\"CalcCount\",f:parse_CalcCount},13:{n:\"CalcMode\",f:parse_CalcMode},14:{n:\"CalcPrecision\",f:parse_CalcPrecision},15:{n:\"CalcRefMode\",f:parse_CalcRefMode},16:{n:\"CalcDelta\",f:parse_CalcDelta},17:{n:\"CalcIter\",f:parse_CalcIter},18:{n:\"Protect\",f:parse_Protect},19:{n:\"Password\",f:parse_Password},20:{n:\"Header\",f:parse_Header},21:{n:\"Footer\",f:parse_Footer},23:{n:\"ExternSheet\",f:parse_ExternSheet},24:{n:\"Lbl\",f:parse_Lbl},25:{n:\"WinProtect\",f:parse_WinProtect},26:{n:\"VerticalPageBreaks\",f:parse_VerticalPageBreaks},27:{n:\"HorizontalPageBreaks\",f:parse_HorizontalPageBreaks},28:{n:\"Note\",f:parse_Note},29:{n:\"Selection\",f:parse_Selection},34:{n:\"Date1904\",f:parse_Date1904},35:{n:\"ExternName\",f:parse_ExternName},38:{n:\"LeftMargin\",f:parse_LeftMargin},39:{n:\"RightMargin\",f:parse_RightMargin},40:{n:\"TopMargin\",f:parse_TopMargin},41:{n:\"BottomMargin\",f:parse_BottomMargin},42:{n:\"PrintRowCol\",f:parse_PrintRowCol},43:{n:\"PrintGrid\",f:parse_PrintGrid},47:{n:\"FilePass\",f:parse_FilePass},49:{n:\"Font\",f:parse_Font},51:{n:\"PrintSize\",f:parse_PrintSize},60:{n:\"Continue\",f:parse_Continue},61:{n:\"Window1\",f:parse_Window1},64:{n:\"Backup\",f:parse_Backup},65:{n:\"Pane\",f:parse_Pane},66:{n:\"CodePage\",f:parse_CodePage},77:{n:\"Pls\",f:parse_Pls},80:{n:\"DCon\",f:parse_DCon},81:{n:\"DConRef\",f:parse_DConRef},82:{n:\"DConName\",f:parse_DConName},85:{n:\"DefColWidth\",f:parse_DefColWidth},89:{n:\"XCT\",f:parse_XCT},90:{n:\"CRN\",f:parse_CRN},91:{n:\"FileSharing\",f:parse_FileSharing},92:{n:\"WriteAccess\",f:parse_WriteAccess},93:{n:\"Obj\",f:parse_Obj},94:{n:\"Uncalced\",f:parse_Uncalced},95:{n:\"CalcSaveRecalc\",f:parse_CalcSaveRecalc},96:{n:\"Template\",f:parse_Template},97:{n:\"Intl\",f:parse_Intl},99:{n:\"ObjProtect\",f:parse_ObjProtect},125:{n:\"ColInfo\",f:parse_ColInfo},128:{n:\"Guts\",f:parse_Guts},129:{n:\"WsBool\",f:parse_WsBool},130:{n:\"GridSet\",f:parse_GridSet},131:{n:\"HCenter\",f:parse_HCenter},132:{n:\"VCenter\",f:parse_VCenter},133:{n:\"BoundSheet8\",f:parse_BoundSheet8},134:{n:\"WriteProtect\",f:parse_WriteProtect},140:{n:\"Country\",f:parse_Country},141:{n:\"HideObj\",f:parse_HideObj},144:{n:\"Sort\",f:parse_Sort},146:{n:\"Palette\",f:parse_Palette},151:{n:\"Sync\",f:parse_Sync},152:{n:\"LPr\",f:parse_LPr},153:{n:\"DxGCol\",f:parse_DxGCol},154:{n:\"FnGroupName\",f:parse_FnGroupName},155:{n:\"FilterMode\",f:parse_FilterMode},156:{n:\"BuiltInFnGroupCount\",f:parse_BuiltInFnGroupCount},157:{n:\"AutoFilterInfo\",f:parse_AutoFilterInfo},158:{n:\"AutoFilter\",f:parse_AutoFilter},160:{n:\"Scl\",f:parse_Scl},161:{n:\"Setup\",f:parse_Setup},174:{n:\"ScenMan\",f:parse_ScenMan},175:{n:\"SCENARIO\",f:parse_SCENARIO},176:{n:\"SxView\",f:parse_SxView},177:{n:\"Sxvd\",f:parse_Sxvd},178:{n:\"SXVI\",f:parse_SXVI},180:{n:\"SxIvd\",f:parse_SxIvd},181:{n:\"SXLI\",f:parse_SXLI},182:{n:\"SXPI\",f:parse_SXPI},184:{n:\"DocRoute\",f:parse_DocRoute},185:{n:\"RecipName\",f:parse_RecipName},\r\n189:{n:\"MulRk\",f:parse_MulRk},190:{n:\"MulBlank\",f:parse_MulBlank},193:{n:\"Mms\",f:parse_Mms},197:{n:\"SXDI\",f:parse_SXDI},198:{n:\"SXDB\",f:parse_SXDB},199:{n:\"SXFDB\",f:parse_SXFDB},200:{n:\"SXDBB\",f:parse_SXDBB},201:{n:\"SXNum\",f:parse_SXNum},202:{n:\"SxBool\",f:parse_SxBool},203:{n:\"SxErr\",f:parse_SxErr},204:{n:\"SXInt\",f:parse_SXInt},205:{n:\"SXString\",f:parse_SXString},206:{n:\"SXDtr\",f:parse_SXDtr},207:{n:\"SxNil\",f:parse_SxNil},208:{n:\"SXTbl\",f:parse_SXTbl},209:{n:\"SXTBRGIITM\",f:parse_SXTBRGIITM},210:{n:\"SxTbpg\",f:parse_SxTbpg},211:{n:\"ObProj\",f:parse_ObProj},213:{n:\"SXStreamID\",f:parse_SXStreamID},215:{n:\"DBCell\",f:parse_DBCell},216:{n:\"SXRng\",f:parse_SXRng},217:{n:\"SxIsxoper\",f:parse_SxIsxoper},218:{n:\"BookBool\",f:parse_BookBool},220:{n:\"DbOrParamQry\",f:parse_DbOrParamQry},221:{n:\"ScenarioProtect\",f:parse_ScenarioProtect},222:{n:\"OleObjectSize\",f:parse_OleObjectSize},224:{n:\"XF\",f:parse_XF},225:{n:\"InterfaceHdr\",f:parse_InterfaceHdr},226:{n:\"InterfaceEnd\",f:parse_InterfaceEnd},227:{n:\"SXVS\",f:parse_SXVS},229:{n:\"MergeCells\",f:parse_MergeCells},233:{n:\"BkHim\",f:parse_BkHim},235:{n:\"MsoDrawingGroup\",f:parse_MsoDrawingGroup},236:{n:\"MsoDrawing\",f:parse_MsoDrawing},237:{n:\"MsoDrawingSelection\",f:parse_MsoDrawingSelection},239:{n:\"PhoneticInfo\",f:parse_PhoneticInfo},240:{n:\"SxRule\",f:parse_SxRule},241:{n:\"SXEx\",f:parse_SXEx},242:{n:\"SxFilt\",f:parse_SxFilt},244:{n:\"SxDXF\",f:parse_SxDXF},245:{n:\"SxItm\",f:parse_SxItm},246:{n:\"SxName\",f:parse_SxName},247:{n:\"SxSelect\",f:parse_SxSelect},248:{n:\"SXPair\",f:parse_SXPair},249:{n:\"SxFmla\",f:parse_SxFmla},251:{n:\"SxFormat\",f:parse_SxFormat},252:{n:\"SST\",f:parse_SST},253:{n:\"LabelSst\",f:parse_LabelSst},255:{n:\"ExtSST\",f:parse_ExtSST},256:{n:\"SXVDEx\",f:parse_SXVDEx},259:{n:\"SXFormula\",f:parse_SXFormula},290:{n:\"SXDBEx\",f:parse_SXDBEx},311:{n:\"RRDInsDel\",f:parse_RRDInsDel},312:{n:\"RRDHead\",f:parse_RRDHead},315:{n:\"RRDChgCell\",f:parse_RRDChgCell},317:{n:\"RRTabId\",f:parse_RRTabId},318:{n:\"RRDRenSheet\",f:parse_RRDRenSheet},319:{n:\"RRSort\",f:parse_RRSort},320:{n:\"RRDMove\",f:parse_RRDMove},330:{n:\"RRFormat\",f:parse_RRFormat},331:{n:\"RRAutoFmt\",f:parse_RRAutoFmt},333:{n:\"RRInsertSh\",f:parse_RRInsertSh},334:{n:\"RRDMoveBegin\",f:parse_RRDMoveBegin},335:{n:\"RRDMoveEnd\",f:parse_RRDMoveEnd},336:{n:\"RRDInsDelBegin\",f:parse_RRDInsDelBegin},337:{n:\"RRDInsDelEnd\",f:parse_RRDInsDelEnd},338:{n:\"RRDConflict\",f:parse_RRDConflict},339:{n:\"RRDDefName\",f:parse_RRDDefName},340:{n:\"RRDRstEtxp\",f:parse_RRDRstEtxp},351:{n:\"LRng\",f:parse_LRng},352:{n:\"UsesELFs\",f:parse_UsesELFs},353:{n:\"DSF\",f:parse_DSF},401:{n:\"CUsr\",f:parse_CUsr},402:{n:\"CbUsr\",f:parse_CbUsr},403:{n:\"UsrInfo\",f:parse_UsrInfo},404:{n:\"UsrExcl\",f:parse_UsrExcl},405:{n:\"FileLock\",f:parse_FileLock},406:{n:\"RRDInfo\",f:parse_RRDInfo},407:{n:\"BCUsrs\",f:parse_BCUsrs},408:{n:\"UsrChk\",f:parse_UsrChk},425:{n:\"UserBView\",f:parse_UserBView},426:{n:\"UserSViewBegin\",f:parse_UserSViewBegin},427:{n:\"UserSViewEnd\",f:parse_UserSViewEnd},428:{n:\"RRDUserView\",f:parse_RRDUserView},429:{n:\"Qsi\",f:parse_Qsi},430:{n:\"SupBook\",f:parse_SupBook},431:{n:\"Prot4Rev\",f:parse_Prot4Rev},432:{n:\"CondFmt\",f:parse_CondFmt},433:{n:\"CF\",f:parse_CF},434:{n:\"DVal\",f:parse_DVal},437:{n:\"DConBin\",f:parse_DConBin},438:{n:\"TxO\",f:parse_TxO},439:{n:\"RefreshAll\",f:parse_RefreshAll},440:{n:\"HLink\",f:parse_HLink},441:{n:\"Lel\",f:parse_Lel},442:{n:\"CodeName\",f:parse_XLSCodeName},443:{n:\"SXFDBType\",f:parse_SXFDBType},444:{n:\"Prot4RevPass\",f:parse_Prot4RevPass},445:{n:\"ObNoMacros\",f:parse_ObNoMacros},446:{n:\"Dv\",f:parse_Dv},448:{n:\"Excel9File\",f:parse_Excel9File},449:{n:\"RecalcId\",f:parse_RecalcId,r:2},450:{n:\"EntExU2\",f:parse_EntExU2},512:{n:\"Dimensions\",f:parse_Dimensions},513:{n:\"Blank\",f:parse_Blank},515:{n:\"Number\",f:parse_Number},516:{n:\"Label\",f:parse_Label},517:{n:\"BoolErr\",f:parse_BoolErr},519:{n:\"String\",f:parse_String},520:{n:\"Row\",f:parse_Row},523:{n:\"Index\",f:parse_Index},545:{n:\"Array\",f:parse_Array},549:{n:\"DefaultRowHeight\",f:parse_DefaultRowHeight},566:{n:\"Table\",f:parse_Table},574:{n:\"Window2\",f:parse_Window2},638:{n:\"RK\",f:parse_RK},659:{n:\"Style\",f:parse_Style},1048:{n:\"BigName\",f:parse_BigName},1054:{n:\"Format\",f:parse_Format},1084:{n:\"ContinueBigName\",f:parse_ContinueBigName},1212:{n:\"ShrFmla\",f:parse_ShrFmla},2048:{n:\"HLinkTooltip\",f:parse_HLinkTooltip},2049:{n:\"WebPub\",f:parse_WebPub},2050:{n:\"QsiSXTag\",f:parse_QsiSXTag},2051:{n:\"DBQueryExt\",f:parse_DBQueryExt},2052:{n:\"ExtString\",f:parse_ExtString},2053:{n:\"TxtQry\",f:parse_TxtQry},2054:{n:\"Qsir\",f:parse_Qsir},2055:{n:\"Qsif\",f:parse_Qsif},2056:{n:\"RRDTQSIF\",f:parse_RRDTQSIF},2057:{n:\"BOF\",f:parse_BOF},2058:{n:\"OleDbConn\",f:parse_OleDbConn},2059:{n:\"WOpt\",f:parse_WOpt},2060:{n:\"SXViewEx\",f:parse_SXViewEx},2061:{n:\"SXTH\",f:parse_SXTH},2062:{n:\"SXPIEx\",f:parse_SXPIEx},2063:{n:\"SXVDTEx\",f:parse_SXVDTEx},2064:{n:\"SXViewEx9\",f:parse_SXViewEx9},2066:{n:\"ContinueFrt\",f:parse_ContinueFrt},2067:{n:\"RealTimeData\",f:parse_RealTimeData},2128:{n:\"ChartFrtInfo\",f:parse_ChartFrtInfo},2129:{n:\"FrtWrapper\",f:parse_FrtWrapper},2130:{n:\"StartBlock\",f:parse_StartBlock},2131:{n:\"EndBlock\",f:parse_EndBlock},2132:{n:\"StartObject\",f:parse_StartObject},2133:{n:\"EndObject\",f:parse_EndObject},2134:{n:\"CatLab\",f:parse_CatLab},2135:{n:\"YMult\",f:parse_YMult},2136:{n:\"SXViewLink\",f:parse_SXViewLink},2137:{n:\"PivotChartBits\",f:parse_PivotChartBits},2138:{n:\"FrtFontList\",f:parse_FrtFontList},2146:{n:\"SheetExt\",f:parse_SheetExt},2147:{n:\"BookExt\",f:parse_BookExt,r:12},2148:{n:\"SXAddl\",f:parse_SXAddl},2149:{n:\"CrErr\",f:parse_CrErr},2150:{n:\"HFPicture\",f:parse_HFPicture},2151:{n:\"FeatHdr\",f:parse_FeatHdr},2152:{n:\"Feat\",f:parse_Feat},2154:{n:\"DataLabExt\",f:parse_DataLabExt},2155:{n:\"DataLabExtContents\",f:parse_DataLabExtContents},2156:{n:\"CellWatch\",f:parse_CellWatch},2161:{n:\"FeatHdr11\",f:parse_FeatHdr11},2162:{n:\"Feature11\",f:parse_Feature11},2164:{n:\"DropDownObjIds\",f:parse_DropDownObjIds},2165:{n:\"ContinueFrt11\",f:parse_ContinueFrt11},2166:{n:\"DConn\",f:parse_DConn},2167:{n:\"List12\",f:parse_List12},2168:{n:\"Feature12\",f:parse_Feature12},2169:{n:\"CondFmt12\",f:parse_CondFmt12},2170:{n:\"CF12\",f:parse_CF12},2171:{n:\"CFEx\",f:parse_CFEx},2172:{n:\"XFCRC\",f:parse_XFCRC,r:12},2173:{n:\"XFExt\",f:parse_XFExt,r:12},2174:{n:\"AutoFilter12\",f:parse_AutoFilter12},2175:{n:\"ContinueFrt12\",f:parse_ContinueFrt12},2180:{n:\"MDTInfo\",f:parse_MDTInfo},2181:{n:\"MDXStr\",f:parse_MDXStr},2182:{n:\"MDXTuple\",f:parse_MDXTuple},2183:{n:\"MDXSet\",f:parse_MDXSet},2184:{n:\"MDXProp\",f:parse_MDXProp},2185:{n:\"MDXKPI\",f:parse_MDXKPI},2186:{n:\"MDB\",f:parse_MDB},2187:{n:\"PLV\",f:parse_PLV},2188:{n:\"Compat12\",f:parse_Compat12,r:12},2189:{n:\"DXF\",f:parse_DXF},2190:{n:\"TableStyles\",f:parse_TableStyles,r:12},2191:{n:\"TableStyle\",f:parse_TableStyle},2192:{n:\"TableStyleElement\",f:parse_TableStyleElement},2194:{n:\"StyleExt\",f:parse_StyleExt},2195:{n:\"NamePublish\",f:parse_NamePublish},2196:{n:\"NameCmt\",f:parse_NameCmt},2197:{n:\"SortData\",f:parse_SortData},2198:{n:\"Theme\",f:parse_Theme,r:12},2199:{n:\"GUIDTypeLib\",f:parse_GUIDTypeLib},2200:{n:\"FnGrp12\",f:parse_FnGrp12},2201:{n:\"NameFnGrp12\",f:parse_NameFnGrp12},2202:{n:\"MTRSettings\",f:parse_MTRSettings,r:12},2203:{n:\"CompressPictures\",f:parse_CompressPictures},2204:{n:\"HeaderFooter\",f:parse_HeaderFooter},2205:{n:\"CrtLayout12\",f:parse_CrtLayout12},2206:{n:\"CrtMlFrt\",f:parse_CrtMlFrt},2207:{n:\"CrtMlFrtContinue\",f:parse_CrtMlFrtContinue},2211:{n:\"ForceFullCalculation\",f:parse_ForceFullCalculation},2212:{n:\"ShapePropsStream\",f:parse_ShapePropsStream},2213:{n:\"TextPropsStream\",f:parse_TextPropsStream},2214:{n:\"RichTextStream\",f:parse_RichTextStream},2215:{n:\"CrtLayout12A\",f:parse_CrtLayout12A},4097:{n:\"Units\",f:parse_Units},4098:{n:\"Chart\",f:parse_Chart},4099:{n:\"Series\",f:parse_Series},4102:{n:\"DataFormat\",f:parse_DataFormat},4103:{n:\"LineFormat\",f:parse_LineFormat},4105:{n:\"MarkerFormat\",f:parse_MarkerFormat},4106:{n:\"AreaFormat\",f:parse_AreaFormat},4107:{n:\"PieFormat\",f:parse_PieFormat},4108:{n:\"AttachedLabel\",f:parse_AttachedLabel},4109:{n:\"SeriesText\",f:parse_SeriesText},4116:{n:\"ChartFormat\",f:parse_ChartFormat},4117:{n:\"Legend\",f:parse_Legend},4118:{n:\"SeriesList\",f:parse_SeriesList},4119:{n:\"Bar\",f:parse_Bar},4120:{n:\"Line\",f:parse_Line},4121:{n:\"Pie\",f:parse_Pie},4122:{n:\"Area\",f:parse_Area},4123:{n:\"Scatter\",f:parse_Scatter},4124:{n:\"CrtLine\",f:parse_CrtLine},4125:{n:\"Axis\",f:parse_Axis},4126:{n:\"Tick\",f:parse_Tick},4127:{n:\"ValueRange\",f:parse_ValueRange},4128:{n:\"CatSerRange\",f:parse_CatSerRange},4129:{n:\"AxisLine\",f:parse_AxisLine},4130:{n:\"CrtLink\",f:parse_CrtLink},4132:{n:\"DefaultText\",f:parse_DefaultText},4133:{n:\"Text\",f:parse_Text},4134:{n:\"FontX\",f:parse_FontX},4135:{n:\"ObjectLink\",f:parse_ObjectLink},4146:{n:\"Frame\",f:parse_Frame},4147:{n:\"Begin\",f:parse_Begin},4148:{n:\"End\",f:parse_End},4149:{n:\"PlotArea\",f:parse_PlotArea},4154:{n:\"Chart3d\",f:parse_Chart3d},4156:{n:\"PicF\",f:parse_PicF},4157:{n:\"DropBar\",f:parse_DropBar},4158:{n:\"Radar\",f:parse_Radar},4159:{n:\"Surf\",f:parse_Surf},4160:{n:\"RadarArea\",f:parse_RadarArea},4161:{n:\"AxisParent\",f:parse_AxisParent},4163:{n:\"LegendException\",f:parse_LegendException},4164:{n:\"ShtProps\",f:parse_ShtProps},4165:{n:\"SerToCrt\",f:parse_SerToCrt},4166:{n:\"AxesUsed\",f:parse_AxesUsed},4168:{n:\"SBaseRef\",f:parse_SBaseRef},4170:{n:\"SerParent\",f:parse_SerParent},4171:{n:\"SerAuxTrend\",f:parse_SerAuxTrend},4174:{n:\"IFmtRecord\",f:parse_IFmtRecord},4175:{n:\"Pos\",f:parse_Pos},4176:{n:\"AlRuns\",f:parse_AlRuns},4177:{n:\"BRAI\",f:parse_BRAI},4187:{n:\"SerAuxErrBar\",f:parse_SerAuxErrBar},4188:{n:\"ClrtClient\",f:parse_ClrtClient},4189:{n:\"SerFmt\",f:parse_SerFmt},4191:{n:\"Chart3DBarShape\",f:parse_Chart3DBarShape},4192:{n:\"Fbi\",f:parse_Fbi},4193:{n:\"BopPop\",f:parse_BopPop},4194:{n:\"AxcExt\",f:parse_AxcExt},4195:{n:\"Dat\",f:parse_Dat},4196:{n:\"PlotGrowth\",f:parse_PlotGrowth},4197:{n:\"SIIndex\",f:parse_SIIndex},4198:{n:\"GelFrame\",f:parse_GelFrame},4199:{n:\"BopPopCustom\",f:parse_BopPopCustom},4200:{n:\"Fbi2\",f:parse_Fbi2},22:{n:\"ExternCount\",f:parsenoop},126:{n:\"RK\",f:parsenoop},127:{n:\"ImData\",f:parsenoop},135:{n:\"Addin\",f:parsenoop},136:{n:\"Edg\",f:parsenoop},137:{n:\"Pub\",f:parsenoop},145:{n:\"Sub\",f:parsenoop},148:{n:\"LHRecord\",f:parsenoop},149:{n:\"LHNGraph\",f:parsenoop},150:{n:\"Sound\",f:parsenoop},169:{n:\"CoordList\",f:parsenoop},171:{n:\"GCW\",f:parsenoop},188:{n:\"ShrFmla\",f:parsenoop},194:{n:\"AddMenu\",f:parsenoop},195:{n:\"DelMenu\",f:parsenoop},214:{n:\"RString\",f:parsenoop},223:{n:\"UDDesc\",f:parsenoop},234:{n:\"TabIdConf\",f:parsenoop},354:{n:\"XL5Modify\",f:parsenoop},421:{n:\"FileSharing2\",f:parsenoop},536:{n:\"Name\",f:parsenoop},547:{n:\"ExternName\",f:parse_ExternName},561:{n:\"Font\",f:parsenoop},1030:{n:\"Formula\",f:parse_Formula},2157:{n:\"FeatInfo\",f:parsenoop},2163:{n:\"FeatInfo11\",f:parsenoop},2177:{n:\"SXAddl12\",f:parsenoop},2240:{n:\"AutoWebPub\",f:parsenoop},2241:{n:\"ListObj\",f:parsenoop},2242:{n:\"ListField\",f:parsenoop},2243:{n:\"ListDV\",f:parsenoop},2244:{n:\"ListCondFmt\",f:parsenoop},2245:{n:\"ListCF\",f:parsenoop},2246:{n:\"FMQry\",f:parsenoop},2247:{n:\"FMSQry\",f:parsenoop},2248:{n:\"PLV\",f:parsenoop},2249:{n:\"LnExt\",f:parsenoop},2250:{n:\"MkrExt\",f:parsenoop},2251:{n:\"CrtCoopt\",f:parsenoop},0:{}};function parse_ods(zip,opts){if(typeof module!==\"undefined\"&&typeof require!==\"undefined\"&&typeof ODS===\"undefined\")ODS=require(\"./od\"+\"s\");if(typeof ODS===\"undefined\"||!ODS.parse_ods)throw new Error(\"Unsupported ODS\");return ODS.parse_ods(zip,opts)}function fix_opts_func(defaults){return function fix_opts(opts){for(var i=0;i!=defaults.length;++i){var d=defaults[i];if(opts[d[0]]===undefined)opts[d[0]]=d[1];if(d[2]===\"n\")opts[d[0]]=Number(opts[d[0]])}}}var fix_read_opts=fix_opts_func([[\"cellNF\",false],[\"cellHTML\",true],[\"cellFormula\",true],[\"cellStyles\",false],[\"cellDates\",false],[\"sheetStubs\",false],[\"sheetRows\",0,\"n\"],[\"bookDeps\",false],[\"bookSheets\",false],[\"bookProps\",false],[\"bookFiles\",false],[\"bookVBA\",false],[\"password\",\"\"],[\"WTF\",false]]);var fix_write_opts=fix_opts_func([[\"cellDates\",false],[\"bookSST\",false],[\"bookType\",\"xlsx\"],[\"WTF\",false]]);function safe_parse_wbrels(wbrels,sheets){if(!wbrels)return 0;try{wbrels=sheets.map(function pwbr(w){return[w.name,wbrels[\"!id\"][w.id].Target]})}catch(e){return null}return!wbrels||wbrels.length===0?null:wbrels}function safe_parse_ws(zip,path,relsPath,sheet,sheetRels,sheets,opts){try{sheetRels[sheet]=parse_rels(getzipdata(zip,relsPath,true),path);sheets[sheet]=parse_ws(getzipdata(zip,path),path,opts,sheetRels[sheet])}catch(e){if(opts.WTF)throw e}}var nodirs=function nodirs(x){return x.substr(-1)!=\"/\"};function parse_zip(zip,opts){make_ssf(SSF);opts=opts||{};fix_read_opts(opts);reset_cp();if(safegetzipfile(zip,\"META-INF/manifest.xml\"))return parse_ods(zip,opts);var entries=keys(zip.files).filter(nodirs).sort();var dir=parse_ct(getzipdata(zip,\"[Content_Types].xml\"),opts);var xlsb=false;var sheets,binname;if(dir.workbooks.length===0){binname=\"xl/workbook.xml\";if(getzipdata(zip,binname,true))dir.workbooks.push(binname)}if(dir.workbooks.length===0){binname=\"xl/workbook.bin\";if(!getzipfile(zip,binname,true))throw new Error(\"Could not find workbook\");dir.workbooks.push(binname);xlsb=true}if(dir.workbooks[0].substr(-3)==\"bin\")xlsb=true;if(xlsb)set_cp(1200);if(!opts.bookSheets&&!opts.bookProps){strs=[];if(dir.sst)strs=parse_sst(getzipdata(zip,dir.sst.replace(/^\\//,\"\")),dir.sst,opts);themes={};if(opts.cellStyles&&dir.themes.length)themes=parse_theme(getzipdata(zip,dir.themes[0].replace(/^\\//,\"\"),true),dir.themes[0],opts);styles={};if(dir.style)styles=parse_sty(getzipdata(zip,dir.style.replace(/^\\//,\"\")),dir.style,opts)}var wb=parse_wb(getzipdata(zip,dir.workbooks[0].replace(/^\\//,\"\")),dir.workbooks[0],opts);var props={},propdata=\"\";if(dir.coreprops.length!==0){propdata=getzipdata(zip,dir.coreprops[0].replace(/^\\//,\"\"),true);if(propdata)props=parse_core_props(propdata);if(dir.extprops.length!==0){propdata=getzipdata(zip,dir.extprops[0].replace(/^\\//,\"\"),true);if(propdata)parse_ext_props(propdata,props)}}var custprops={};if(!opts.bookSheets||opts.bookProps){if(dir.custprops.length!==0){propdata=getzipdata(zip,dir.custprops[0].replace(/^\\//,\"\"),true);if(propdata)custprops=parse_cust_props(propdata,opts)}}var out={};if(opts.bookSheets||opts.bookProps){if(props.Worksheets&&props.SheetNames.length>0)sheets=props.SheetNames;else if(wb.Sheets)sheets=wb.Sheets.map(function pluck(x){return x.name});if(opts.bookProps){out.Props=props;out.Custprops=custprops}if(typeof sheets!==\"undefined\")out.SheetNames=sheets;if(opts.bookSheets?out.SheetNames:opts.bookProps)return out}sheets={};var deps={};if(opts.bookDeps&&dir.calcchain)deps=parse_cc(getzipdata(zip,dir.calcchain.replace(/^\\//,\"\")),dir.calcchain,opts);var i=0;var sheetRels={};var path,relsPath;if(!props.Worksheets){var wbsheets=wb.Sheets;props.Worksheets=wbsheets.length;props.SheetNames=[];for(var j=0;j!=wbsheets.length;++j){props.SheetNames[j]=wbsheets[j].name}}var wbext=xlsb?\"bin\":\"xml\";var wbrelsfile=\"xl/_rels/workbook.\"+wbext+\".rels\";var wbrels=parse_rels(getzipdata(zip,wbrelsfile,true),wbrelsfile);if(wbrels)wbrels=safe_parse_wbrels(wbrels,wb.Sheets);var nmode=getzipdata(zip,\"xl/worksheets/sheet.xml\",true)?1:0;for(i=0;i!=props.Worksheets;++i){if(wbrels)path=\"xl/\"+wbrels[i][1].replace(/[\\/]?xl\\//,\"\");else{path=\"xl/worksheets/sheet\"+(i+1-nmode)+\".\"+wbext;path=path.replace(/sheet0\\./,\"sheet.\")}relsPath=path.replace(/^(.*)(\\/)([^\\/]*)$/,\"$1/_rels/$3.rels\");safe_parse_ws(zip,path,relsPath,props.SheetNames[i],sheetRels,sheets,opts)}if(dir.comments)parse_comments(zip,dir.comments,sheets,sheetRels,opts);out={Directory:dir,Workbook:wb,Props:props,Custprops:custprops,Deps:deps,Sheets:sheets,SheetNames:props.SheetNames,Strings:strs,Styles:styles,Themes:themes,SSF:SSF.get_table()};if(opts.bookFiles){out.keys=entries;out.files=zip.files}if(opts.bookVBA){if(dir.vba.length>0)out.vbaraw=getzipdata(zip,dir.vba[0],true);else if(dir.defaults.bin===\"application/vnd.ms-office.vbaProject\")out.vbaraw=getzipdata(zip,\"xl/vbaProject.bin\",true)}return out}function add_rels(rels,rId,f,type,relobj){if(!relobj)relobj={};if(!rels[\"!id\"])rels[\"!id\"]={};relobj.Id=\"rId\"+rId;relobj.Type=type;relobj.Target=f;if(rels[\"!id\"][relobj.Id])throw new Error(\"Cannot rewrite rId \"+rId);rels[\"!id\"][relobj.Id]=relobj;rels[(\"/\"+relobj.Target).replace(\"//\",\"/\")]=relobj}function write_zip(wb,opts){if(wb&&!wb.SSF){wb.SSF=SSF.get_table()}if(wb&&wb.SSF){make_ssf(SSF);SSF.load_table(wb.SSF);opts.revssf=evert_num(wb.SSF);opts.revssf[wb.SSF[65535]]=0}opts.rels={};opts.wbrels={};opts.Strings=[];opts.Strings.Count=0;opts.Strings.Unique=0;var wbext=opts.bookType==\"xlsb\"?\"bin\":\"xml\";var ct={workbooks:[],sheets:[],calcchains:[],themes:[],styles:[],coreprops:[],extprops:[],custprops:[],strs:[],comments:[],vba:[],TODO:[],rels:[],xmlns:\"\"};fix_write_opts(opts=opts||{});var zip=new jszip;var f=\"\",rId=0;opts.cellXfs=[];get_cell_style(opts.cellXfs,{},{revssf:{General:0}});f=\"docProps/core.xml\";zip.file(f,write_core_props(wb.Props,opts));ct.coreprops.push(f);add_rels(opts.rels,2,f,RELS.CORE_PROPS);f=\"docProps/app.xml\";if(!wb.Props)wb.Props={};wb.Props.SheetNames=wb.SheetNames;wb.Props.Worksheets=wb.SheetNames.length;zip.file(f,write_ext_props(wb.Props,opts));ct.extprops.push(f);add_rels(opts.rels,3,f,RELS.EXT_PROPS);if(wb.Custprops!==wb.Props&&keys(wb.Custprops||{}).length>0){f=\"docProps/custom.xml\";zip.file(f,write_cust_props(wb.Custprops,opts));ct.custprops.push(f);add_rels(opts.rels,4,f,RELS.CUST_PROPS)}f=\"xl/workbook.\"+wbext;zip.file(f,write_wb(wb,f,opts));ct.workbooks.push(f);add_rels(opts.rels,1,f,RELS.WB);for(rId=1;rId<=wb.SheetNames.length;++rId){f=\"xl/worksheets/sheet\"+rId+\".\"+wbext;zip.file(f,write_ws(rId-1,f,opts,wb));ct.sheets.push(f);add_rels(opts.wbrels,rId,\"worksheets/sheet\"+rId+\".\"+wbext,RELS.WS)}if(opts.Strings!=null&&opts.Strings.length>0){f=\"xl/sharedStrings.\"+wbext;zip.file(f,write_sst(opts.Strings,f,opts));ct.strs.push(f);add_rels(opts.wbrels,++rId,\"sharedStrings.\"+wbext,RELS.SST)}f=\"xl/theme/theme1.xml\";zip.file(f,write_theme(opts));ct.themes.push(f);add_rels(opts.wbrels,++rId,\"theme/theme1.xml\",RELS.THEME);f=\"xl/styles.\"+wbext;zip.file(f,write_sty(wb,f,opts));ct.styles.push(f);add_rels(opts.wbrels,++rId,\"styles.\"+wbext,RELS.STY);zip.file(\"[Content_Types].xml\",write_ct(ct,opts));zip.file(\"_rels/.rels\",write_rels(opts.rels));zip.file(\"xl/_rels/workbook.\"+wbext+\".rels\",write_rels(opts.wbrels));return zip}function firstbyte(f,o){switch((o||{}).type||\"base64\"){case\"buffer\":return f[0];case\"base64\":return Base64.decode(f.substr(0,12)).charCodeAt(0);case\"binary\":return f.charCodeAt(0);case\"array\":return f[0];default:throw new Error(\"Unrecognized type \"+o.type)}}function read_zip(data,opts){var zip,d=data;var o=opts||{};if(!o.type)o.type=has_buf&&Buffer.isBuffer(data)?\"buffer\":\"base64\";switch(o.type){case\"base64\":zip=new jszip(d,{base64:true});break;case\"binary\":case\"array\":zip=new jszip(d,{base64:false});break;case\"buffer\":zip=new jszip(d);break;case\"file\":zip=new jszip(d=_fs.readFileSync(data));break;default:throw new Error(\"Unrecognized type \"+o.type)}return parse_zip(zip,o)}function readSync(data,opts){var zip,d=data,isfile=false,n;var o=opts||{};if(!o.type)o.type=has_buf&&Buffer.isBuffer(data)?\"buffer\":\"base64\";if(o.type==\"file\"){isfile=true;o.type=\"buffer\";d=_fs.readFileSync(data)}switch(n=firstbyte(d,o)){case 208:if(isfile)o.type=\"file\";return parse_xlscfb(CFB.read(data,o),o);case 9:return parse_xlscfb(s2a(o.type===\"base64\"?Base64.decode(data):data),o);case 60:return parse_xlml(d,o);case 80:if(isfile)o.type=\"file\";return read_zip(data,opts);default:throw new Error(\"Unsupported file \"+n)}}function readFileSync(data,opts){var o=opts||{};o.type=\"file\";var wb=readSync(data,o);wb.FILENAME=data;return wb}function write_zip_type(wb,opts){var o=opts||{};style_builder=new StyleBuilder(opts);var z=write_zip(wb,o);switch(o.type){case\"base64\":return z.generate({type:\"base64\"});case\"binary\":return z.generate({type:\"string\"});case\"buffer\":return z.generate({type:\"nodebuffer\"});case\"file\":return _fs.writeFileSync(o.file,z.generate({type:\"nodebuffer\"}));default:throw new Error(\"Unrecognized type \"+o.type)}}function writeSync(wb,opts){var o=opts||{};switch(o.bookType){case\"xml\":return write_xlml(wb,o);default:return write_zip_type(wb,o)}}function writeFileSync(wb,filename,opts){var o=opts||{};o.type=\"file\";o.file=filename;switch(o.file.substr(-5).toLowerCase()){case\".xlsx\":o.bookType=\"xlsx\";break;case\".xlsm\":o.bookType=\"xlsm\";break;case\".xlsb\":o.bookType=\"xlsb\";break;default:switch(o.file.substr(-4).toLowerCase()){case\".xls\":o.bookType=\"xls\";break;case\".xml\":o.bookType=\"xml\";break}}return writeSync(wb,o)}function decode_row(rowstr){return parseInt(unfix_row(rowstr),10)-1}function encode_row(row){return\"\"+(row+1)}function fix_row(cstr){return cstr.replace(/([A-Z]|^)(\\d+)$/,\"$1$$$2\")}function unfix_row(cstr){return cstr.replace(/\\$(\\d+)$/,\"$1\")}function decode_col(colstr){var c=unfix_col(colstr),d=0,i=0;for(;i!==c.length;++i)d=26*d+c.charCodeAt(i)-64;return d-1}function encode_col(col){var s=\"\";for(++col;col;col=Math.floor((col-1)/26))s=String.fromCharCode((col-1)%26+65)+s;return s}function fix_col(cstr){return cstr.replace(/^([A-Z])/,\"$$$1\")}function unfix_col(cstr){return cstr.replace(/^\\$([A-Z])/,\"$1\")}function split_cell(cstr){return cstr.replace(/(\\$?[A-Z]*)(\\$?\\d*)/,\"$1,$2\").split(\",\")}function decode_cell(cstr){var splt=split_cell(cstr);return{c:decode_col(splt[0]),r:decode_row(splt[1])}}function encode_cell(cell){return encode_col(cell.c)+encode_row(cell.r)}function fix_cell(cstr){return fix_col(fix_row(cstr))}function unfix_cell(cstr){return unfix_col(unfix_row(cstr))}function decode_range(range){var x=range.split(\":\").map(decode_cell);return{s:x[0],e:x[x.length-1]}}function encode_range(cs,ce){if(ce===undefined||typeof ce===\"number\")return encode_range(cs.s,cs.e);if(typeof cs!==\"string\")cs=encode_cell(cs);if(typeof ce!==\"string\")ce=encode_cell(ce);return cs==ce?cs:cs+\":\"+ce}function safe_decode_range(range){var o={s:{c:0,r:0},e:{c:0,r:0}};var idx=0,i=0,cc=0;var len=range.length;for(idx=0;i<len;++i){if((cc=range.charCodeAt(i)-64)<1||cc>26)break;idx=26*idx+cc}o.s.c=--idx;for(idx=0;i<len;++i){if((cc=range.charCodeAt(i)-48)<0||cc>9)break;idx=10*idx+cc}o.s.r=--idx;if(i===len||range.charCodeAt(++i)===58){o.e.c=o.s.c;o.e.r=o.s.r;return o}for(idx=0;i!=len;++i){if((cc=range.charCodeAt(i)-64)<1||cc>26)break;idx=26*idx+cc}o.e.c=--idx;for(idx=0;i!=len;++i){if((cc=range.charCodeAt(i)-48)<0||cc>9)break;idx=10*idx+cc}o.e.r=--idx;return o}function safe_format_cell(cell,v){if(cell.z!==undefined)try{return cell.w=SSF.format(cell.z,v)}catch(e){}if(!cell.XF)return v;try{return cell.w=SSF.format(cell.XF.ifmt||0,v)}catch(e){return\"\"+v}}function format_cell(cell,v){if(cell==null||cell.t==null)return\"\";if(cell.w!==undefined)return cell.w;if(v===undefined)return safe_format_cell(cell,cell.v);return safe_format_cell(cell,v)}function sheet_to_json(sheet,opts){var val,row,range,header=0,offset=1,r,hdr=[],isempty,R,C,v;var o=opts!=null?opts:{};var raw=o.raw;if(sheet==null||sheet[\"!ref\"]==null)return[];range=o.range!==undefined?o.range:sheet[\"!ref\"];if(o.header===1)header=1;else if(o.header===\"A\")header=2;else if(Array.isArray(o.header))header=3;switch(typeof range){case\"string\":r=safe_decode_range(range);break;case\"number\":r=safe_decode_range(sheet[\"!ref\"]);r.s.r=range;break;default:r=range}if(header>0)offset=0;var rr=encode_row(r.s.r);var cols=new Array(r.e.c-r.s.c+1);var out=new Array(r.e.r-r.s.r-offset+1);var outi=0;for(C=r.s.c;C<=r.e.c;++C){cols[C]=encode_col(C);val=sheet[cols[C]+rr];switch(header){case 1:hdr[C]=C;break;case 2:hdr[C]=cols[C];break;case 3:hdr[C]=o.header[C-r.s.c];break;default:if(val===undefined)continue;hdr[C]=format_cell(val)}}for(R=r.s.r+offset;R<=r.e.r;++R){rr=encode_row(R);isempty=true;if(header===1)row=[];else{row={};if(Object.defineProperty)Object.defineProperty(row,\"__rowNum__\",{value:R,enumerable:false});else row.__rowNum__=R}for(C=r.s.c;C<=r.e.c;++C){val=sheet[cols[C]+rr];if(val===undefined||val.t===undefined)continue;v=val.v;switch(val.t){case\"e\":continue;case\"s\":break;case\"b\":case\"n\":break;default:throw\"unrecognized type \"+val.t}if(v!==undefined){row[hdr[C]]=raw?v:format_cell(val,v);isempty=false}}if(isempty===false||header===1)out[outi++]=row}out.length=outi;return out}function sheet_to_row_object_array(sheet,opts){return sheet_to_json(sheet,opts!=null?opts:{})}function sheet_to_csv(sheet,opts){var out=\"\",txt=\"\",qreg=/\"/g;var o=opts==null?{}:opts;if(sheet==null||sheet[\"!ref\"]==null)return\"\";var r=safe_decode_range(sheet[\"!ref\"]);var FS=o.FS!==undefined?o.FS:\",\",fs=FS.charCodeAt(0);var RS=o.RS!==undefined?o.RS:\"\\n\",rs=RS.charCodeAt(0);var row=\"\",rr=\"\",cols=[];var i=0,cc=0,val;var R=0,C=0;for(C=r.s.c;C<=r.e.c;++C)cols[C]=encode_col(C);for(R=r.s.r;R<=r.e.r;++R){row=\"\";rr=encode_row(R);for(C=r.s.c;C<=r.e.c;++C){val=sheet[cols[C]+rr];txt=val!==undefined?\"\"+format_cell(val):\"\";for(i=0,cc=0;i!==txt.length;++i)if((cc=txt.charCodeAt(i))===fs||cc===rs||cc===34){txt='\"'+txt.replace(qreg,'\"\"')+'\"';break}row+=(C===r.s.c?\"\":FS)+txt}out+=row+RS}return out}var make_csv=sheet_to_csv;function sheet_to_formulae(sheet){var cmds,y=\"\",x,val=\"\";if(sheet==null||sheet[\"!ref\"]==null)return\"\";var r=safe_decode_range(sheet[\"!ref\"]),rr=\"\",cols=[],C;cmds=new Array((r.e.r-r.s.r+1)*(r.e.c-r.s.c+1));var i=0;for(C=r.s.c;C<=r.e.c;++C)cols[C]=encode_col(C);for(var R=r.s.r;R<=r.e.r;++R){rr=encode_row(R);for(C=r.s.c;C<=r.e.c;++C){y=cols[C]+rr;x=sheet[y];val=\"\";if(x===undefined)continue;if(x.f!=null)val=x.f;else if(x.w!==undefined)val=\"'\"+x.w;else if(x.v===undefined)continue;else val=\"\"+x.v;cmds[i++]=y+\"=\"+val}}cmds.length=i;return cmds}var utils={encode_col:encode_col,encode_row:encode_row,encode_cell:encode_cell,encode_range:encode_range,decode_col:decode_col,decode_row:decode_row,split_cell:split_cell,decode_cell:decode_cell,decode_range:decode_range,format_cell:format_cell,get_formulae:sheet_to_formulae,make_csv:sheet_to_csv,make_json:sheet_to_json,make_formulae:sheet_to_formulae,sheet_to_csv:sheet_to_csv,sheet_to_json:sheet_to_json,sheet_to_formulae:sheet_to_formulae,sheet_to_row_object_array:sheet_to_row_object_array};var XmlNode=function(){function XmlNode(tagName,attributes,children){if(!(this instanceof XmlNode)){return new XmlNode(tagName,attributes,children)}this.tagName=tagName;this._attributes=attributes||{};this._children=children||[];this._prefix=\"\";return this}XmlNode.prototype.createElement=function(){return new XmlNode(arguments)};XmlNode.prototype.children=function(){return this._children};XmlNode.prototype.append=function(node){this._children.push(node);return this};XmlNode.prototype.prefix=function(prefix){if(arguments.length==0){return this._prefix}this._prefix=prefix;return this};XmlNode.prototype.attr=function(attr,value){if(value==undefined){delete this._attributes[attr];return this}if(arguments.length==0){return this._attributes}else if(typeof attr==\"string\"&&arguments.length==1){return this._attributes.attr[attr]}if(typeof attr==\"object\"&&arguments.length==1){for(var key in attr){this._attributes[key]=attr[key]}}else if(arguments.length==2&&typeof attr==\"string\"){this._attributes[attr]=value}return this};var APOS=\"'\";QUOTE='\"';var ESCAPED_QUOTE={};ESCAPED_QUOTE[QUOTE]=\""\";ESCAPED_QUOTE[APOS]=\"'\";XmlNode.prototype.escapeAttributeValue=function(att_value){return'\"'+att_value.replace(/\\\"/g,\""\")+'\"'};XmlNode.prototype.toXml=function(node){if(!node)node=this;var xml=node._prefix;xml+=\"<\"+node.tagName;if(node._attributes){for(var key in node._attributes){xml+=\" \"+key+\"=\"+this.escapeAttributeValue(\"\"+node._attributes[key])+\"\"}}if(node._children&&node._children.length>0){xml+=\">\";for(var i=0;i<node._children.length;i++){xml+=this.toXml(node._children[i])}xml+=\"</\"+node.tagName+\">\"}else{xml+=\"/>\"}return xml};return XmlNode}();var StyleBuilder=function(options){var customNumFmtId=164;var table_fmt={0:\"General\",1:\"0\",2:\"0.00\",3:\"#,##0\",4:\"#,##0.00\",9:\"0%\",10:\"0.00%\",11:\"0.00E+00\",12:\"# ?/?\",13:\"# ??/??\",14:\"m/d/yy\",15:\"d-mmm-yy\",16:\"d-mmm\",17:\"mmm-yy\",18:\"h:mm AM/PM\",19:\"h:mm:ss AM/PM\",20:\"h:mm\",21:\"h:mm:ss\",22:\"m/d/yy h:mm\",37:\"#,##0 ;(#,##0)\",38:\"#,##0 ;[Red](#,##0)\",39:\"#,##0.00;(#,##0.00)\",40:\"#,##0.00;[Red](#,##0.00)\",45:\"mm:ss\",46:\"[h]:mm:ss\",47:\"mmss.0\",48:\"##0.0E+0\",49:\"@\",56:'\"上午/下午 \"hh\"時\"mm\"分\"ss\"秒 \"'};var fmt_table={};for(var idx in table_fmt){fmt_table[table_fmt[idx]]=idx}_hashIndex={};_listIndex=[];return{initialize:function(options){this.$fonts=XmlNode(\"fonts\").attr(\"count\",0).attr(\"x14ac:knownFonts\",\"1\");this.$fills=XmlNode(\"fills\").attr(\"count\",0);this.$borders=XmlNode(\"borders\").attr(\"count\",0);this.$numFmts=XmlNode(\"numFmts\").attr(\"count\",0);this.$cellStyleXfs=XmlNode(\"cellStyleXfs\");this.$xf=XmlNode(\"xf\").attr(\"numFmtId\",0).attr(\"fontId\",0).attr(\"fillId\",0).attr(\"borderId\",0);this.$cellXfs=XmlNode(\"cellXfs\").attr(\"count\",0);this.$cellStyles=XmlNode(\"cellStyles\").append(XmlNode(\"cellStyle\").attr(\"name\",\"Normal\").attr(\"xfId\",0).attr(\"builtinId\",0));this.$dxfs=XmlNode(\"dxfs\").attr(\"count\",\"0\");this.$tableStyles=XmlNode(\"tableStyles\").attr(\"count\",\"0\").attr(\"defaultTableStyle\",\"TableStyleMedium9\").attr(\"defaultPivotStyle\",\"PivotStyleMedium4\");this.$styles=XmlNode(\"styleSheet\").attr(\"xmlns:mc\",\"http://schemas.openxmlformats.org/markup-compatibility/2006\").attr(\"xmlns:x14ac\",\"http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac\").attr(\"xmlns\",\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\").attr(\"mc:Ignorable\",\"x14ac\").prefix('<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>').append(this.$numFmts).append(this.$fonts).append(this.$fills).append(this.$borders).append(this.$cellStyleXfs.append(this.$xf)).append(this.$cellXfs).append(this.$cellStyles).append(this.$dxfs).append(this.$tableStyles);var defaultStyle=options.defaultCellStyle||{};if(!defaultStyle.font)defaultStyle.font={name:\"Calibri\",sz:\"12\"};if(!defaultStyle.font.name)defaultStyle.font.name=\"Calibri\";if(!defaultStyle.font.sz)defaultStyle.font.sz=11;if(!defaultStyle.fill)defaultStyle.fill={patternType:\"none\",fgColor:{}};if(!defaultStyle.border)defaultStyle.border={};if(!defaultStyle.numFmt)defaultStyle.numFmt=0;this.defaultStyle=defaultStyle;var gray125Style=JSON.parse(JSON.stringify(defaultStyle));gray125Style.fill={patternType:\"gray125\",fgColor:{}};this.addStyles([defaultStyle,gray125Style]);return this},addStyle:function(attributes){var hashKey=JSON.stringify(attributes);var index=_hashIndex[hashKey];if(index==undefined){index=this._addXf(attributes);_hashIndex[hashKey]=index}else{index=_hashIndex[hashKey]}return index},addStyles:function(styles){var self=this;return styles.map(function(style){return self.addStyle(style)})},_duckTypeStyle:function(attributes){if(typeof attributes==\"object\"&&(attributes.patternFill||attributes.fgColor)){return{fill:attributes}}else if(attributes.font||attributes.numFmt||attributes.border||attributes.fill){return attributes}else{return this._getStyleCSS(attributes)}},_getStyleCSS:function(css){return css},_addXf:function(attributes){var fontId=this._addFont(attributes.font);var fillId=this._addFill(attributes.fill);var borderId=this._addBorder(attributes.border);var numFmtId=this._addNumFmt(attributes.numFmt);var $xf=XmlNode(\"xf\").attr(\"numFmtId\",numFmtId).attr(\"fontId\",fontId).attr(\"fillId\",fillId).attr(\"borderId\",borderId).attr(\"xfId\",\"0\");if(fontId>0){$xf.attr(\"applyFont\",\"1\")}if(fillId>0){$xf.attr(\"applyFill\",\"1\")}if(borderId>0){$xf.attr(\"applyBorder\",\"1\")}if(numFmtId>0){$xf.attr(\"applyNumberFormat\",\"1\")}if(attributes.alignment){var $alignment=XmlNode(\"alignment\");if(attributes.alignment.horizontal){$alignment.attr(\"horizontal\",attributes.alignment.horizontal)}if(attributes.alignment.vertical){$alignment.attr(\"vertical\",attributes.alignment.vertical)}if(attributes.alignment.indent){$alignment.attr(\"indent\",attributes.alignment.indent)}if(attributes.alignment.readingOrder){$alignment.attr(\"readingOrder\",attributes.alignment.readingOrder)}if(attributes.alignment.wrapText){$alignment.attr(\"wrapText\",attributes.alignment.wrapText)}if(attributes.alignment.textRotation!=undefined){$alignment.attr(\"textRotation\",attributes.alignment.textRotation)}$xf.append($alignment).attr(\"applyAlignment\",1);\r\n}this.$cellXfs.append($xf);var count=+this.$cellXfs.children().length;this.$cellXfs.attr(\"count\",count);return count-1},_addFont:function(attributes){if(!attributes){return 0}var $font=XmlNode(\"font\").append(XmlNode(\"sz\").attr(\"val\",attributes.sz||this.defaultStyle.font.sz)).append(XmlNode(\"name\").attr(\"val\",attributes.name||this.defaultStyle.font.name));if(attributes.bold)$font.append(XmlNode(\"b\"));if(attributes.underline)$font.append(XmlNode(\"u\"));if(attributes.italic)$font.append(XmlNode(\"i\"));if(attributes.strike)$font.append(XmlNode(\"strike\"));if(attributes.outline)$font.append(XmlNode(\"outline\"));if(attributes.shadow)$font.append(XmlNode(\"shadow\"));if(attributes.vertAlign){$font.append(XmlNode(\"vertAlign\").attr(\"val\",attributes.vertAlign))}if(attributes.color){if(attributes.color.theme){$font.append(XmlNode(\"color\").attr(\"theme\",attributes.color.theme));if(attributes.color.tint){$font.append(XmlNode(\"tint\").attr(\"theme\",attributes.color.tint))}}else if(attributes.color.rgb){$font.append(XmlNode(\"color\").attr(\"rgb\",attributes.color.rgb))}}this.$fonts.append($font);var count=this.$fonts.children().length;this.$fonts.attr(\"count\",count);return count-1},_addNumFmt:function(numFmt){if(!numFmt){return 0}if(typeof numFmt==\"string\"){var numFmtIdx=fmt_table[numFmt];if(numFmtIdx>=0){return numFmtIdx}}if(/^[0-9]+$/.exec(numFmt)){return numFmt}numFmt=numFmt.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\").replace(/\"/g,\""\").replace(/'/g,\"'\");var $numFmt=XmlNode(\"numFmt\").attr(\"numFmtId\",++customNumFmtId).attr(\"formatCode\",numFmt);this.$numFmts.append($numFmt);var count=this.$numFmts.children().length;this.$numFmts.attr(\"count\",count);return customNumFmtId},_addFill:function(attributes){if(!attributes){return 0}var $patternFill=XmlNode(\"patternFill\").attr(\"patternType\",attributes.patternType||\"solid\");if(attributes.fgColor){var $fgColor=XmlNode(\"fgColor\");if(attributes.fgColor.rgb){if(attributes.fgColor.rgb.length==6){attributes.fgColor.rgb=\"FF\"+attributes.fgColor.rgb}$fgColor.attr(\"rgb\",attributes.fgColor.rgb);$patternFill.append($fgColor)}else if(attributes.fgColor.theme){$fgColor.attr(\"theme\",attributes.fgColor.theme);if(attributes.fgColor.tint){$fgColor.attr(\"tint\",attributes.fgColor.tint)}$patternFill.append($fgColor)}if(!attributes.bgColor){attributes.bgColor={indexed:\"64\"}}}if(attributes.bgColor){var $bgColor=XmlNode(\"bgColor\").attr(attributes.bgColor);$patternFill.append($bgColor)}var $fill=XmlNode(\"fill\").append($patternFill);this.$fills.append($fill);var count=this.$fills.children().length;this.$fills.attr(\"count\",count);return count-1},_getSubBorder:function(direction,spec){var $direction=XmlNode(direction);if(spec){if(spec.style)$direction.attr(\"style\",spec.style);if(spec.color){var $color=XmlNode(\"color\");if(spec.color.auto){$color.attr(\"auto\",spec.color.auto)}else if(spec.color.rgb){$color.attr(\"rgb\",spec.color.rgb)}else if(spec.color.theme||spec.color.tint){$color.attr(\"theme\",spec.color.theme||\"1\");$color.attr(\"tint\",spec.color.tint||\"0\")}$direction.append($color)}}return $direction},_addBorder:function(attributes){if(!attributes){return 0}var self=this;var $border=XmlNode(\"border\").attr(\"diagonalUp\",attributes.diagonalUp).attr(\"diagonalDown\",attributes.diagonalDown);var directions=[\"left\",\"right\",\"top\",\"bottom\",\"diagonal\"];directions.forEach(function(direction){$border.append(self._getSubBorder(direction,attributes[direction]))});this.$borders.append($border);var count=this.$borders.children().length;this.$borders.attr(\"count\",count);return count-1},toXml:function(){return this.$styles.toXml()}}.initialize(options||{})};XLSX.parse_xlscfb=parse_xlscfb;XLSX.parse_zip=parse_zip;XLSX.read=readSync;XLSX.readFile=readFileSync;XLSX.readFileSync=readFileSync;XLSX.write=writeSync;XLSX.writeFile=writeFileSync;XLSX.writeFileSync=writeFileSync;XLSX.utils=utils;XLSX.CFB=CFB;XLSX.SSF=SSF})(typeof exports!==\"undefined\"?exports:XLSX);var XLS=XLSX;\r\n\nangular.module(\"ngConstants\", [])\n\n.constant(\"api\", {\n\t\"url\": \"https://portal.craneww.com/api/v1\",\n\t\"url_v2\": \"https://c-view-api.craneww.com/api/v2\"\n})\n\n.constant(\"googleAnalytics\", {\n\t\"code\": \"UA-71674318-4\",\n\t\"domain\": \"c-view.craneww.com\"\n})\n\n.constant(\"downloadLink\", {\n\t\"url\": \"https://portal.craneww.com\",\n\t\"url_v2\": \"https://c-view-api.craneww.com/api/v2\"\n})\n\n.constant(\"AJAX\", {\n\t\"TIMEOUT\": \"120000\"\n})\n\n.constant(\"user_audit_emails\", {\n\t\"email\": [\n\t\t\"alberto.depena@craneww.com\"\n\t]\n})\n\n.constant(\"company_edit_emails\", {\n\t\"email\": [\n\t\t\"alberto.depena@craneww.com\",\n\t\t\"victor.stiteler@craneww.com\"\n\t]\n})\n\n.constant(\"google_api_url\", \"https://maps.googleapis.com/maps/api/js?v=3&key=AIzaSyDSFY576rmCtRVwImmCaf__B-XRPgnmLtI&libraries=drawing,geometry\")\n\n;\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .run(runBlock);\r\n\r\n /** @ngInject */\r\n function runBlock($rootScope, $translate, $log, UserService, $location, routerHelper, permissions, $auth, Idle) {\r\n\r\n moment.tz.setDefault(\"UTC\");\r\n /* Refresh translations as the user navigates the app */\r\n $rootScope\r\n .$on('$translatePartialLoaderStructureChanged', function () {\r\n $translate.refresh();\r\n });\r\n $rootScope.$on('auth:invalid', removeAuthInfo);\r\n $rootScope.$on('auth:validation-error', removeAuthInfo);\r\n $rootScope\r\n .$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams, options){\r\n var requireLogin = (toState.data) ? toState.data.requireLogin : false\r\n var requiredPermission = (toState.data || {}).requiredPermission ? toState.data.requiredPermission.split(\",\") : false;\r\n /* No checks if we are resetting the password */\r\n if ($location.path() === '/reset-password' || $location.path() === '/confirm-account'){\r\n return;\r\n }\r\n\r\n if ($location.path() === '/login') {\r\n if (UserService.isLoggedIn()){\r\n $location.path('dashboard');\r\n }\r\n return;\r\n }\r\n\r\n\r\n if($location.path().includes('lensgroups/')) {\r\n UserService.companyRouteChanged(true);\r\n }\r\n\r\n //---------------\r\n // Access Checks\r\n //---------------\r\n var loginCheckPassed = true,\r\n permissionCheckPassed = true;\r\n\r\n // required login check\r\n if (!UserService.isLoggedIn() && requireLogin){\r\n loginCheckPassed = false;\r\n }\r\n\r\n // required permission check\r\n if (requiredPermission) {\r\n permissionCheckPassed = requiredPermission.filter(UserService.canAccess).length != 0;\r\n }\r\n\r\n if (loginCheckPassed && permissionCheckPassed) {\r\n $log.debug('ACCESS GRANTED');\r\n }\r\n else if(loginCheckPassed && !permissionCheckPassed){ \r\n $location.url(\"/\");\r\n }\r\n else{\r\n removeAuthInfo();\r\n //setTimeout(function(){\r\n $log.debug('ACCESS DENIED');\r\n sessionStorage.fromPath = $location.url();\r\n localStorage.removeItem('auth_headers');\r\n localStorage.removeItem('user');\r\n localStorage.removeItem('dummyUser'); \r\n //sessionStorage.clear();\r\n $location.url(\"/login\");\r\n //},2500);\r\n }\r\n });\r\n\r\n addPolyfills();\r\n $log.debug('runBlock end');\r\n\r\n function removeAuthInfo() {\r\n\t\t\tUserService.logoutUser();\r\n }\r\n\r\n function addPolyfills() {\r\n addStringIncludes();\r\n }\r\n\r\n function addStringIncludes() {\r\n if (!String.prototype.includes) {\r\n String.prototype.includes = function(search, start) {\r\n 'use strict';\r\n if (typeof start !== 'number') {\r\n start = 0;\r\n }\r\n\r\n if (start + search.length > this.length) {\r\n return false;\r\n } else {\r\n return this.indexOf(search, start) !== -1;\r\n }\r\n };\r\n }\r\n }\r\n\r\n $rootScope.$on(\"$locationChangeStart\", function () { \r\n $(document).ready(function(e){ \r\n // stop Default scroll\r\n $('html,body').stop(); \r\n $('html, body').animate({ scrollTop: 0 }, 'fast');\r\n })\r\n });\r\n }\r\n\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .config(routerConfig);\r\n\r\n /** @ngInject */\r\n function routerConfig($stateProvider, $urlRouterProvider){\r\n $urlRouterProvider.otherwise(\"/\");\r\n // $stateProvider\r\n // .state('home', {\r\n // url: '/',\r\n // templateUrl: 'app/main/main.html',\r\n // controller: 'MainController',\r\n // controllerAs: 'main'\r\n // });\r\n }\r\n})();\r\n\n(function() {\r\n 'use strict';\r\n\r\n angular\r\n .module('app')\r\n .config(config);\r\n\r\n /** @ngInject */\r\n function config($logProvider, toastrConfig, $uiViewScrollProvider, $translateProvider, $translatePartialLoaderProvider, $mdThemingProvider, $analyticsProvider, $mdIconProvider, googleAnalytics, IdleProvider, KeepaliveProvider) {\r\n // Enable log\r\n $logProvider.debugEnabled(true);\r\n\r\n //Auto logout\r\n //IdleProvider.idle(1800); // in seconds\r\n //IdleProvider.timeout(60); // in seconds\r\n //KeepaliveProvider.interval(10); // in seconds\r\n\r\n // Set options third-party lib\r\n toastrConfig.allowHtml = true;\r\n toastrConfig.timeOut = 3000;\r\n toastrConfig.positionClass = 'toast-top-right';\r\n toastrConfig.preventDuplicates = true;\r\n toastrConfig.progressBar = true;\r\n\r\n /* Load Google Analytics */\r\n $analyticsProvider.firstPageview(true);\r\n $analyticsProvider.withBase(true);\r\n\r\n /* Scroll the view back to top on view changes */\r\n $uiViewScrollProvider.useAnchorScroll();\r\n\r\n /* Lazily Load Partial Translations as the user needs them */\r\n $translatePartialLoaderProvider.addPart('admin');\r\n $translatePartialLoaderProvider.addPart('components');\r\n $translatePartialLoaderProvider.addPart('general');\r\n $translatePartialLoaderProvider.addPart('layout');\r\n $translatePartialLoaderProvider.addPart('shipment');\r\n $translatePartialLoaderProvider.addPart('shippingdetails');\r\n $translatePartialLoaderProvider.addPart('tracktrace');\r\n $translatePartialLoaderProvider.addPart('user');\r\n $translatePartialLoaderProvider.addPart('company');\r\n $translatePartialLoaderProvider.addPart('widgets');\r\n $translatePartialLoaderProvider.addPart('bookshipment');\r\n\r\n $translateProvider.useLoader('$translatePartialLoader', {\r\n urlTemplate: '/app/i18n/{part}/{lang}.json'\r\n });\r\n $translateProvider.preferredLanguage('en');\r\n\r\n // Set up custom icons to use SVG files\r\n /*$mdIconProvider\r\n .defaultFontSet( 'Material Icons' )\r\n // .defaultIconSet('my/app/icons.svg') // Register a default set of SVG icons\r\n //.iconSet('social', 'my/app/social.svg') // Register a named icon set of SVGs\r\n .icon('icon-contact-mail', '../assets/images/icons/ic_compare_48px.svg'); // Register a specific icon (by name)\r\n //.icon('work:chair', 'my/app/chair.svg'); // Register icon in a specific set\r\n*/\r\n $mdThemingProvider.definePalette('cvaBluePalette', {\r\n '50': '6C8AC6',\r\n '100': '5D7EC0',\r\n '200': '4F73BA',\r\n '300': '3F60A2',\r\n '400': '395793',\r\n '500': '324C7F',\r\n '600': '2A416D',\r\n '700': '2A416D',\r\n '800': '283D67',\r\n '900': '1E233A',\r\n 'A100': '223458',\r\n 'A200': '1D2C49',\r\n 'A400': '17233B',\r\n 'A700': '111A2C',\r\n 'contrastDefaultColor': 'light', // whether, by default, text (contrast)\r\n // on this palette should be dark or light\r\n 'contrastDarkColors': ['50', '100', //hues which contrast should be 'dark' by default\r\n '200', '300', '400', 'A100'],\r\n 'contrastLightColors': undefined // could also specify this if default was 'dark'\r\n });\r\n\r\n $mdThemingProvider.definePalette('cvaAccentPalette', {\r\n '50': '6C8AC6',\r\n '100': '5D7EC0',\r\n '200': '4F73BA',\r\n '300': '3F60A2',\r\n '400': '395793',\r\n '500': '2D7D8F',\r\n '600': '2A416D',\r\n '700': '2A416D',\r\n '800': '283D67',\r\n '900': '1E233A',\r\n 'A100': '223458',\r\n 'A200': '2D7D8F',\r\n 'A400': '17233B',\r\n 'A700': '111A2C',\r\n 'contrastDefaultColor': 'light', // whether, by default, text (contrast)\r\n // on this palette should be dark or light\r\n 'contrastDarkColors': ['50', '100', //hues which contrast should be 'dark' by default\r\n '200', '300', '400', 'A100'],\r\n 'contrastLightColors': undefined // could also specify this if default was 'dark'\r\n });\r\n $mdThemingProvider.theme('default')\r\n .dark()\r\n .primaryPalette('cvaBluePalette')\r\n .accentPalette('cvaAccentPalette', {\r\n 'default': '500', // by default use shade 400 from the accent palette for primary intentions\r\n 'hue-1': '500', // use shade 100 for the <code>md-hue-1</code> class\r\n 'hue-2': '500', // use shade 600 for the <code>md-hue-2</code> class\r\n 'hue-3': '400' // use shade A100 for the <code>md-hue-3</code> class\r\n });\r\n\r\n }\r\n\r\n})();\r\n\n/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */\r\nvar saveAs=saveAs||function(e){\"use strict\";if(typeof e===\"undefined\"||typeof navigator!==\"undefined\"&&/MSIE [1-9]\\./.test(navigator.userAgent)){return}var t=e.document,n=function(){return e.URL||e.webkitURL||e},r=t.createElementNS(\"http://www.w3.org/1999/xhtml\",\"a\"),o=\"download\"in r,a=function(e){var t=new MouseEvent(\"click\");e.dispatchEvent(t)},i=/constructor/i.test(e.HTMLElement)||e.safari,f=/CriOS\\/[\\d]+/.test(navigator.userAgent),u=function(t){(e.setImmediate||e.setTimeout)(function(){throw t},0)},s=\"application/octet-stream\",d=1e3*40,c=function(e){var t=function(){if(typeof e===\"string\"){n().revokeObjectURL(e)}else{e.remove()}};setTimeout(t,d)},l=function(e,t,n){t=[].concat(t);var r=t.length;while(r--){var o=e[\"on\"+t[r]];if(typeof o===\"function\"){try{o.call(e,n||e)}catch(a){u(a)}}}},p=function(e){if(/^\\s*(?:text\\/\\S*|application\\/xml|\\S*\\/\\S*\\+xml)\\s*;.*charset\\s*=\\s*utf-8/i.test(e.type)){return new Blob([String.fromCharCode(65279),e],{type:e.type})}return e},v=function(t,u,d){if(!d){t=p(t)}var v=this,w=t.type,m=w===s,y,h=function(){l(v,\"writestart progress write writeend\".split(\" \"))},S=function(){if((f||m&&i)&&e.FileReader){var r=new FileReader;r.onloadend=function(){var t=f?r.result:r.result.replace(/^data:[^;]*;/,\"data:attachment/file;\");var n=e.open(t,\"_blank\");if(!n)e.location.href=t;t=undefined;v.readyState=v.DONE;h()};r.readAsDataURL(t);v.readyState=v.INIT;return}if(!y){y=n().createObjectURL(t)}if(m){e.location.href=y}else{var o=e.open(y,\"_blank\");if(!o){e.location.href=y}}v.readyState=v.DONE;h();c(y)};v.readyState=v.INIT;if(o){y=n().createObjectURL(t);setTimeout(function(){r.href=y;r.download=u;a(r);h();c(y);v.readyState=v.DONE});return}S()},w=v.prototype,m=function(e,t,n){return new v(e,t||e.name||\"download\",n)};if(typeof navigator!==\"undefined\"&&navigator.msSaveOrOpenBlob){return function(e,t,n){t=t||e.name||\"download\";if(!n){e=p(e)}return navigator.msSaveOrOpenBlob(e,t)}}w.abort=function(){};w.readyState=w.INIT=0;w.WRITING=1;w.DONE=2;w.error=w.onwritestart=w.onprogress=w.onwrite=w.onabort=w.onerror=w.onwriteend=null;return m}(typeof self!==\"undefined\"&&self||typeof window!==\"undefined\"&&window||this.content);if(typeof module!==\"undefined\"&&module.exports){module.exports.saveAs=saveAs}else if(typeof define!==\"undefined\"&&define!==null&&define.amd!==null){define(\"FileSaver.js\",function(){return saveAs})}\r\n\n/*global self, unescape */\r\n/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true,\r\n plusplus: true */\r\n\r\n\r\n(function (view) {\r\n\t\"use strict\";\r\n\r\n\tview.URL = view.URL || view.webkitURL;\r\n\r\n\tif (view.Blob && view.URL) {\r\n\t\ttry {\r\n\t\t\tnew Blob;\r\n\t\t\treturn;\r\n\t\t} catch (e) {}\r\n\t}\r\n\r\n\t// Internally we use a BlobBuilder implementation to base Blob off of\r\n\t// in order to support older browsers that only have BlobBuilder\r\n\tvar BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) {\r\n\t\tvar\r\n\t\t\t get_class = function(object) {\r\n\t\t\t\treturn Object.prototype.toString.call(object).match(/^\\[object\\s(.*)\\]$/)[1];\r\n\t\t\t}\r\n\t\t\t, FakeBlobBuilder = function BlobBuilder() {\r\n\t\t\t\tthis.data = [];\r\n\t\t\t}\r\n\t\t\t, FakeBlob = function Blob(data, type, encoding) {\r\n\t\t\t\tthis.data = data;\r\n\t\t\t\tthis.size = data.length;\r\n\t\t\t\tthis.type = type;\r\n\t\t\t\tthis.encoding = encoding;\r\n\t\t\t}\r\n\t\t\t, FBB_proto = FakeBlobBuilder.prototype\r\n\t\t\t, FB_proto = FakeBlob.prototype\r\n\t\t\t, FileReaderSync = view.FileReaderSync\r\n\t\t\t, FileException = function(type) {\r\n\t\t\t\tthis.code = this[this.name = type];\r\n\t\t\t}\r\n\t\t\t, file_ex_codes = (\r\n\t\t\t\t \"NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR \"\r\n\t\t\t\t+ \"NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR\"\r\n\t\t\t).split(\" \")\r\n\t\t\t, file_ex_code = file_ex_codes.length\r\n\t\t\t, real_URL = view.URL || view.webkitURL || view\r\n\t\t\t, real_create_object_URL = real_URL.createObjectURL\r\n\t\t\t, real_revoke_object_URL = real_URL.revokeObjectURL\r\n\t\t\t, URL = real_URL\r\n\t\t\t, btoa = view.btoa\r\n\t\t\t, atob = view.atob\r\n\t\t\t\r\n\t\t\t, ArrayBuffer = view.ArrayBuffer\r\n\t\t\t, Uint8Array = view.Uint8Array\r\n\t\t;\r\n\t\tFakeBlob.fake = FB_proto.fake = true;\r\n\t\twhile (file_ex_code--) {\r\n\t\t\tFileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1;\r\n\t\t}\r\n\t\tif (!real_URL.createObjectURL) {\r\n\t\t\tURL = view.URL = {};\r\n\t\t}\r\n\t\tURL.createObjectURL = function(blob) {\r\n\t\t\tvar\r\n\t\t\t\t type = blob.type\r\n\t\t\t\t, data_URI_header\r\n\t\t\t;\r\n\t\t\tif (type === null) {\r\n\t\t\t\ttype = \"application/octet-stream\";\r\n\t\t\t}\r\n\t\t\tif (blob instanceof FakeBlob) {\r\n\t\t\t\tdata_URI_header = \"data:\" + type;\r\n\t\t\t\tif (blob.encoding === \"base64\") {\r\n\t\t\t\t\treturn data_URI_header + \";base64,\" + blob.data;\r\n\t\t\t\t} else if (blob.encoding === \"URI\") {\r\n\t\t\t\t\treturn data_URI_header + \",\" + decodeURIComponent(blob.data);\r\n\t\t\t\t} if (btoa) {\r\n\t\t\t\t\treturn data_URI_header + \";base64,\" + btoa(blob.data);\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn data_URI_header + \",\" + encodeURIComponent(blob.data);\r\n\t\t\t\t}\r\n\t\t\t} else if (real_create_object_URL) {\r\n\t\t\t\treturn real_create_object_URL.call(real_URL, blob);\r\n\t\t\t}\r\n\t\t};\r\n\t\tURL.revokeObjectURL = function(object_URL) {\r\n\t\t\tif (object_URL.substring(0, 5) !== \"data:\" && real_revoke_object_URL) {\r\n\t\t\t\treal_revoke_object_URL.call(real_URL, object_URL);\r\n\t\t\t}\r\n\t\t};\r\n\t\tFBB_proto.append = function(data/*, endings*/) {\r\n\t\t\tvar bb = this.data;\r\n\t\t\t// decode data to a binary string\r\n\t\t\tif (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) {\r\n\t\t\t\tvar\r\n\t\t\t\t\t str = \"\"\r\n\t\t\t\t\t, buf = new Uint8Array(data)\r\n\t\t\t\t\t, i = 0\r\n\t\t\t\t\t, buf_len = buf.length\r\n\t\t\t\t;\r\n\t\t\t\tfor (; i < buf_len; i++) {\r\n\t\t\t\t\tstr += String.fromCharCode(buf[i]);\r\n\t\t\t\t}\r\n\t\t\t\tbb.push(str);\r\n\t\t\t} else if (get_class(data) === \"Blob\" || get_class(data) === \"File\") {\r\n\t\t\t\tif (FileReaderSync) {\r\n\t\t\t\t\tvar fr = new FileReaderSync;\r\n\t\t\t\t\tbb.push(fr.readAsBinaryString(data));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// async FileReader won't work as BlobBuilder is sync\r\n\t\t\t\t\tthrow new FileException(\"NOT_READABLE_ERR\");\r\n\t\t\t\t}\r\n\t\t\t} else if (data instanceof FakeBlob) {\r\n\t\t\t\tif (data.encoding === \"base64\" && atob) {\r\n\t\t\t\t\tbb.push(atob(data.data));\r\n\t\t\t\t} else if (data.encoding === \"URI\") {\r\n\t\t\t\t\tbb.push(decodeURIComponent(data.data));\r\n\t\t\t\t} else if (data.encoding === \"raw\") {\r\n\t\t\t\t\tbb.push(data.data);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tif (typeof data !== \"string\") {\r\n\t\t\t\t\tdata += \"\"; // convert unsupported types to strings\r\n\t\t\t\t}\r\n\t\t\t\t// decode UTF-16 to binary string\r\n\t\t\t\tbb.push(unescape(encodeURIComponent(data)));\r\n\t\t\t}\r\n\t\t};\r\n\t\tFBB_proto.getBlob = function(type) {\r\n\t\t\tif (!arguments.length) {\r\n\t\t\t\ttype = null;\r\n\t\t\t}\r\n\t\t\treturn new FakeBlob(this.data.join(\"\"), type, \"raw\");\r\n\t\t};\r\n\t\tFBB_proto.toString = function() {\r\n\t\t\treturn \"[object BlobBuilder]\";\r\n\t\t};\r\n\t\tFB_proto.slice = function(start, end, type) {\r\n\t\t\tvar args = arguments.length;\r\n\t\t\tif (args < 3) {\r\n\t\t\t\ttype = null;\r\n\t\t\t}\r\n\t\t\treturn new FakeBlob(\r\n\t\t\t\t this.data.slice(start, args > 1 ? end : this.data.length)\r\n\t\t\t\t, type\r\n\t\t\t\t, this.encoding\r\n\t\t\t);\r\n\t\t};\r\n\t\tFB_proto.toString = function() {\r\n\t\t\treturn \"[object Blob]\";\r\n\t\t};\r\n\t\tFB_proto.close = function() {\r\n\t\t\tthis.size = this.data.length = 0;\r\n\t\t};\r\n\t\treturn FakeBlobBuilder;\r\n\t}(view));\r\n\r\n\tview.Blob = function Blob(blobParts, options) {\r\n\t\tvar type = options ? (options.type || \"\") : \"\";\r\n\t\tvar builder = new BlobBuilder();\r\n\t\tif (blobParts) {\r\n\t\t\tfor (var i = 0, len = blobParts.length; i < len; i++) {\r\n\t\t\t\tbuilder.append(blobParts[i]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn builder.getBlob(type);\r\n\t};\r\n}(typeof self !== \"undefined\" && self || typeof window !== \"undefined\" && window || this.content || this));\r\n\nangular.module(\"app\").run([\"$templateCache\", function($templateCache) {$templateCache.put(\"/app/admin/Cprint.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Transportation></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">C-Print</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/Edocs.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Transportation></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">E-Docs</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/Invoice.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=\\\"Accounts Receivables\\\"></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">Invoice Report</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/WHSEShipmentTracking.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Warehousing></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">WHSE Shipment Tracking</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/accounts_receivables.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=\\\"Accounts Receivables\\\"></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">Accounts Receivables</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/admin-show.html\",\"<cva-shell><div ng-include=\\\"\\'/app/layout/shell.html\\'\\\"></div><div layout=row layout-align=\\\"center center\\\"><div flex-gt-sm=33 flex=75><md-card><md-toolbar class=md-primary><div class=md-toolbar-tools><h2 class=md-flex>User Info</h2></div></md-toolbar><md-card-content><br><div><p><span class=name>{{adminCtrl.user.name}}</span></p><p><span class=name>{{adminCtrl.user.user_name}}</span></p><p><span class=role>Role: {{adminCtrl.user.role}}</span></p></div></md-card-content></md-card></div></div><div layout=row layout-align=\\\"center center\\\"><admin-edit-account></admin-edit-account></div></cva-shell>\");\n$templateCache.put(\"/app/admin/bol-sli-cmr.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=\\\"Book Shipment\\\"></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">BOL-SLI-CMR</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/c-lables.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Transportation></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">C-Labels</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/c-reports.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Reporting></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">C-Reports</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/c-stock.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Warehousing></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">C-Stock</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/c2c.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=C2C></h2><span class=\\\"breadcrumb flat\\\"><!-- <a href=\\'/#\\' class=\\\"parent-link\\\"><span translate=\\\"USER.USERS\\\"></span></a> --></span></div></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=http://webtracking.craneww.com:8888/hal/main.do class=c-view-classic-iframe style=\\\"width:100%; height: 768px\\\"></iframe></div></div><!-- <md-card class=\\\"p-a-sm\\\" collapsible template-url=\\\"/app/admin/users/forms/search.html\\\"></md-card> --><!-- <crane-table title=\\\"USER.USERS\\\"\\r\\n icon=\\\"vm.icon\\\";\\r\\n is-loading=\\\"vm.isLoading.table\\\"\\r\\n is-no-results=\\\"vm.noResults\\\"\\r\\n buttons=\\\"vm.buttons\\\"\\r\\n menu=\\\"\\'/app/admin/users/forms/bulk-menu-actions.html\\'\\\"\\r\\n ctrl=\\\"UserManagementController\\\"></crane-table> --></div></cva-shell>\");\n$templateCache.put(\"/app/admin/carbon-cal.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Transportation></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">Carbon Footprint Calculator</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/carbon_footprint.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Transportation></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">Carbon Footprint</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/console.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Warehousing></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">C-Console</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/custom_clear.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n}</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Customs></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">C-Clear</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/custom_comp.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Customs></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">C - Compliance</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/cview_modal.html\",\"<md-dialog class=\\\"export-csv md-card-light\\\" ng-controller=\\\"SidebarController as sidebarCtrl\\\" style=\\\"background: white;margin-top: 104px;\\r\\n margin-left: -41px;\\r\\n width: 21%;\\r\\n height: 21%\\\" ng-cloak><md-dialog-content class=md-padding style=\\\"overflow-y: hidden;\\r\\n overflow-x: hidden\\\"><md-icon aria-label=\\\"Close dialog\\\" style=\\\"color:rgba(33, 29, 29, 0.87); margin-left: 198px; padding: 2%; margin-bottom: .33em\\\" ng-click=closeDialog()></md-icon><span translate={{sidebarCtrl.cviewpopupmsg}} style=\\\"padding: 2%\\\"></span></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/admin/cview_submenuModal.html\",\"<md-dialog class=\\\"export-csv md-card-light\\\" ng-controller=\\\"SidebarController as sidebarCtrl\\\" style=\\\"background: white;margin-top: 104px;\\r\\n margin-left: -41px;\\r\\n width: 21%;\\r\\n height: 28%\\\" ng-cloak><span><md-icon aria-label=\\\"Close dialog\\\" style=\\\"color:rgba(33, 29, 29, 0.87); margin-left: 208px; margin-top: 8px\\\"><span ng-click=closeDialog()></span></md-icon></span><md-dialog-content></md-dialog-content><md-dialog-content class=md-padding style=\\\"overflow-y: hidden;\\r\\n overflow-x: hidden; margin-bottom: .77em\\\"><span translate={{sidebarCtrl.cviewSubMenupmsg}} style=\\\"padding: 9%\\\"></span></md-dialog-content><md-dialog-content class=cview_circle style=\\\"padding: 2%\\\"><span style=\\\"padding: 15% 5% 10%;\\r\\n font-size: 27px;\\r\\n text-align: center;\\r\\n outline: none;\\r\\n color: #34e259\\\" ng-click=sidebarCtrl.cviewSubmenuPage()>OK</span></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/admin/cviewinvoive.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=\\\"C-View Invoice\\\"></h2><span class=\\\"breadcrumb flat\\\"><!-- <a href=\\'/#\\' class=\\\"parent-link\\\"><span translate=\\\"USER.USERS\\\"></span></a> --></span></div></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=https://cviewclassic.craneww.com:8443/portal/classic/Invoice/Invoices class=c-view-classic-iframe style=\\\"width:100%; height: 768px\\\"></iframe></div></div><!-- <md-card class=\\\"p-a-sm\\\" collapsible template-url=\\\"/app/admin/users/forms/search.html\\\"></md-card> --><!-- <crane-table title=\\\"USER.USERS\\\"\\r\\n icon=\\\"vm.icon\\\";\\r\\n is-loading=\\\"vm.isLoading.table\\\"\\r\\n is-no-results=\\\"vm.noResults\\\"\\r\\n buttons=\\\"vm.buttons\\\"\\r\\n menu=\\\"\\'/app/admin/users/forms/bulk-menu-actions.html\\'\\\"\\r\\n ctrl=\\\"UserManagementController\\\"></crane-table> --></div></cva-shell>\");\n$templateCache.put(\"/app/admin/dashboard.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Operations></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">Dashboard</a></span></div></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=https://cviewclassic.craneww.com:8443/portal/classic/KPIServices/Client_Dashboard class=c-view-classic-iframe style=\\\"width:100%; height: 768px\\\"></iframe></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/downstream-warehouse.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Downstream-Warehouse></h2><span class=\\\"breadcrumb flat\\\"></span></div></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=http://s1.web1.downstreamus.com class=c-view-classic-iframe style=\\\"width:100%; height: 768px\\\"></iframe></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/isf.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=ISF></h2><span class=\\\"breadcrumb flat\\\"></span></div></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=https://import2000.gln.com class=c-view-classic-iframe style=\\\"width:100%; height: 768px\\\"></iframe></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/kpi-services.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Operations></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">KPI Service</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/milestone.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Transportation></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">Milestone</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/reporting-sharepoint.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Reporting></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">Sharepoint</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/schedule-maintenance-report.html\",\"<style>shell-padding.content-max {\\r\\n max-width: 100%;\\r\\n }</style><cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=Reporting></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">Schedule Maintenance</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/shipment-tracking-C2C.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=\\\"Shipment Tracking (C2C)\\\"></h2><span class=\\\"breadcrumb flat\\\"></span></div></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=https://cviewclassic.craneww.com:8443/portal/classic/Warehouse/WHSEShipmentTracking class=c-view-classic-iframe style=\\\"width:100%; height: 768px\\\"></iframe></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/us_domestic_booking.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\" style=\\\"max-width: 100% !important\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=\\\"BOOK SHIPMENT\\\"></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">US Domestic Booking</a></span></div></div></div><div hide-xs hide-sm layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 180px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div><div hide-lg hide-md hide-gt-md layout-gt-sm=row layout-wrap style=\\\"vertical-align: middle;\\r\\n position: relative;\\r\\n text-align: center;\\r\\n top: 110px\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1><div flex=auto><span class=\\\"breadcrumb flat\\\"><b style=\\\"color:#7cc7eb; text-align: center\\\" class=\\\"text-info parent-link ng-binding\\\">This link is opened in new tab. Please switch tabs</b></span></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/advanced-search/adv-search-actions.html\",\"<md-bottom-sheet class=md-list ng-cloak hide-gt-xs><h3 class=m-b-0>Advanced Search Actions</h3><md-list><!-- <md-list-item ng-click=\\\"searchCtrl.resetForm()\\\"> --><md-list-item ng-click=\\\"searchCtrl.resetForm();searchCtrl.clearSearch();searchCtrl.resetSearch();searchCtrl.ttserchdataNew = \\'\\';searchCtrl.nextElem=\\'\\';searchCtrl.clearSearch();\\\">Clear</md-list-item><md-list-item ng-click=searchCtrl.saveToDefault()>Save Default Criteria</md-list-item><!-- <md-list-item ng-click=\\\"searchCtrl.loadDefault()\\\">\\r\\n Load Default Criteria\\r\\n </md-list-item> --></md-list></md-bottom-sheet>\");\n$templateCache.put(\"/app/advanced-search/adv-search-form.html\",\"<style>mdp-date-picker .md-button.md-icon-button{\\r\\n margin:10px 0px 0px 0px;\\r\\n }\\r\\n\\r\\n md-input-container{\\r\\n margin:10px 0px 10px 0px;\\r\\n }\\r\\n\\r\\n md-autocomplete-wrap{\\r\\n box-shadow: none !important;\\r\\n }\\r\\n\\r\\n md-autocomplete {\\r\\n background: none !important;\\r\\n }\\r\\n\\r\\n\\r\\n @media screen and (max-width: 1024px) and (min-width: 960px){\\r\\n\\r\\n div#second-div-block{\\r\\n max-width:23%;\\r\\n }\\r\\n div#invoice_total{\\r\\n max-width:18%;\\r\\n }\\r\\n div#gross_weight{\\r\\n max-width:18%;\\r\\n }\\r\\n div#total_pieces{\\r\\n max-width:18%;\\r\\n }\\r\\n }\\r\\n\\r\\n @media screen and (max-width: 768px) and (min-width: 320px){\\r\\n\\r\\n md-input-container{\\r\\n margin:5px 0px 5px 0px;\\r\\n }\\r\\n\\r\\n mdp-date-picker .md-button.md-icon-button{\\r\\n margin:0px !important;\\r\\n margin-top:5px !important;\\r\\n }\\r\\n\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Advanced Search Modal\\\" ng-controller=\\\"AdvSearchController as searchCtrl\\\" ng-cloak style=\\\"width: 1024px\\\"><form name=searchForm reset-directive=searchCtrl.searchFields class=light-form ng-keyup=\\\"$event.keyCode == 13 && searchCtrl.formClick($event)\\\"><md-toolbar><div class=md-toolbar-tools><h2 translate=TRACKTRACE.ADVANCE_SEARCH></h2><span flex=auto></span><md-button class=md-icon-button ng-click=searchCtrl.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=light-content layout=column><div layout-gt-sm=row><div flex-gt-sm=1 flex-sm=1 flex-xs=1><md-input-container class=\\\"md-block error-hidden\\\"><input class=adv-search-input readonly ng-model=\\\"searchCtrl.ttserchdataNew | capitalize\\\" id={{searchCtrl.searchFields.customer_name.field}} ng-keyup=searchCtrl.ttSearch(searchCtrl.ttserchdataNew)><div></div></md-input-container></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=15 flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\"><div class=adv-search-content><div><div ng-click=\\\"searchCtrl.clearFlags(1,\\'Shipment\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : searchCtrl.ttSearchFlag == 1 }\\\"><span>Shipment</span></div><div ng-click=\\\"searchCtrl.clearFlags(2,\\'Customer\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : searchCtrl.ttSearchFlag == 2 }\\\"><span>Customer</span></div><div ng-click=\\\"searchCtrl.clearFlags(3,\\'Shipper\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : searchCtrl.ttSearchFlag == 3 }\\\"><span>Shipper</span></div><div ng-click=\\\"searchCtrl.clearFlags(4,\\'Consignee\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : searchCtrl.ttSearchFlag == 4 }\\\"><span>Consignee</span></div></div></div></div><div id=second-div-block flex-gt-sm=20 flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\" ng-if=\\\"searchCtrl.ttSearchFlag != undefined\\\"><div class=adv-search-content><div ng-if=\\\"searchCtrl.ttSearchFlag == 1 \\\"><div ng-repeat=\\\"key in notSorted(searchCtrl.shipment)\\\" ng-class=\\\"{\\'text-warning-new\\' : searchCtrl.secondChildFlg == key }\\\" ng-click=\\\"searchCtrl.clearValues(key);searchCtrl.secondChildElem = key ;searchCtrl.ttserchdata = \\'Shipment \\' +key;searchCtrl.secondChildFlg = key;searchCtrl.ttSearch(searchCtrl.ttserchdata);\\r\\n searchCtrl.shipmentOpenInputFlag = (key != \\'status\\' && key !=\\'current_status\\' && key !=\\'mode\\' && key !=\\'service_level\\' && key !=\\'reason_code\\'\\r\\n && key !=\\'is_bookmarked\\') ? false : true;searchCtrl.openInputFlag= (checkValue(key) == null)?true:false;searchCtrl.dateItemOrNot(key);searchCtrl.thirdChildFlg = 100\\\" ng-if=\\\"key != \\'awb\\' && key != \\'bol\\'\\\" ng-hide=\\\"(key == \\'status\\' && !searchCtrl.status_advanced_search) || (key == \\'invoice_amount\\' &&\\r\\n ((searchCtrl.is_consignee_user == \\'true\\')?true:((!searchCtrl.hasFinancialPermissions)?true:false)))\\\"><span ng-if=\\\"key == \\'ship_date\\'\\\">Start Date</span> <span ng-if=\\\"key == \\'mode\\'\\\">Business Type</span> <span ng-if=\\\"key == \\'invoice_amount\\'\\\">Invoice Amount</span> <span ng-if=\\\"key == \\'reason_code\\'\\\">Exception</span> <span ng-if=\\\"key == \\'eta_date\\'\\\">POD ETA Date</span> <span ng-if=\\\"key == \\'etd_date\\'\\\">POL ETD Date</span> <span ng-if=\\\"key == \\'incoterm\\'\\\">IncoTerm</span> <span ng-if=\\\"key == \\'vesselname\\'\\\">Vessel Name</span> <span ng-if=\\\"key != \\'mode\\' && key != \\'invoice_amount\\' && key != \\'reason_code\\' && key != \\'ship_date\\' && key != \\'eta_date\\' &&\\r\\n key != \\'etd_date\\' && key != \\'incoterm\\' && key != \\'vesselname\\'\\\">{{key | underscoreless |capitalize}}</span></div></div><div ng-if=\\\"searchCtrl.ttSearchFlag == 2 \\\"><div ng-repeat=\\\"cust in searchCtrl.customer\\\" ng-class=\\\"{\\'text-warning-new\\' : searchCtrl.secondChildFlg == $index }\\\" ng-click=\\\"searchCtrl.ttserchdata = \\'Customer \\'+cust;searchCtrl.ttSearch(searchCtrl.ttserchdata);searchCtrl.openInputFlag=true;searchCtrl.clearValues();\\r\\n searchCtrl.shipmentOpenInputFlag=false;searchCtrl.secondChildFlg = $index;searchCtrl.secondChildElem = cust\\\" ng-hide=\\\"(searchCtrl.is_consignee_user == \\'true\\'?((cust == \\'party_id\\')?true:false):false)\\\"><span>{{cust | underscoreless | capitalize}}</span></div></div><div ng-if=\\\"searchCtrl.ttSearchFlag == 3 \\\"><div ng-repeat=\\\"ship in searchCtrl.shipper\\\" ng-class=\\\"{\\'text-warning-new\\' : searchCtrl.secondChildFlg == $index }\\\" ng-click=\\\"searchCtrl.ttserchdata = \\'Shipper \\'+ship;searchCtrl.ttSearch(searchCtrl.ttserchdata);searchCtrl.openInputFlag=true;searchCtrl.clearValues();\\r\\n searchCtrl.shipmentOpenInputFlag=false;searchCtrl.secondChildFlg = $index;searchCtrl.secondChildElem = ship\\\"><span>{{ship | underscoreless | capitalize}}</span></div></div><div ng-if=\\\"searchCtrl.ttSearchFlag == 4 \\\"><div ng-repeat=\\\"consignee in searchCtrl.consignee\\\" ng-class=\\\"{\\'text-warning-new\\' : searchCtrl.secondChildFlg == $index }\\\" ng-click=\\\"searchCtrl.ttserchdata = \\'Consignee \\'+consignee;searchCtrl.ttSearch(searchCtrl.ttserchdata);searchCtrl.openInputFlag=true;searchCtrl.clearValues();\\r\\n searchCtrl.shipmentOpenInputFlag=false;searchCtrl.secondChildFlg = $index;searchCtrl.secondChildElem = consignee\\\"><span>{{consignee | underscoreless | capitalize}}</span></div></div></div></div><div id={{searchCtrl.secondChildFlg}} flex-gt-sm=15 ng-class=\\\"{\\'flex-gt-sm-35\\':(searchCtrl.secondChildFlg == \\'reason_code\\' ||searchCtrl.secondChildFlg == \\'service_level\\') }\\\" flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\" ng-if=\\\"searchCtrl.ttSearchFlag == 1 && searchCtrl.shipment[searchCtrl.secondChildFlg] \\\"><div class=adv-search-content><div><div id=btn set-focus=text-field-focus ng-repeat=\\\"thirdChild in searchCtrl.shipment[searchCtrl.secondChildFlg] track by $index\\\" ng-class=\\\"{\\'text-warning-new\\' : searchCtrl.thirdChildFlg == $index }\\\" ng-click=\\\" searchCtrl.clearValues(thirdChild);searchCtrl.openInputFlag = true;searchCtrl.checkrangeOrNot(thirdChild);\\r\\n searchCtrl.ttserchdata = \\'Shipment \\'+searchCtrl.secondChildFlg+\\' \\'+thirdChild;searchCtrl.ttSearch(searchCtrl.ttserchdata);\\r\\n searchCtrl.thirdChildFlg=$index\\\"><span>{{thirdChild | underscoreless | capitalize}} </span></div></div></div></div><div layout=column flex=100 flex-gt-sm=\\\"( searchCtrl.ttSearchFlag == 1 && searchCtrl.shipment[searchCtrl.secondChildFlg]) ? 50 : 70 \\\" style=\\\"border:1px solid #CCC;padding-left:10px\\\"><div style=\\\"width: 100px;float: right;padding-right: 10px\\\"><md-button ng-show=addAllBtnShow class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-if=\\\"searchCtrl.secondChildFlg == \\'service_level\\' || searchCtrl.secondChildFlg == \\'reason_code\\'\\\" data-value=service_level_all ng-click=\\\"searchCtrl.newSearch(true);\\r\\n searchCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(searchCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (searchCtrl.searchValue) }\\\"><span style=\\\"color: #fff\\\">ADD ALL</span></md-button></div><div layout-gt-sm=row layout-wrap ng-if=searchCtrl.openInputFlag><div ng-if=\\\"searchCtrl.secondChildFlg == \\'origin\\' || searchCtrl.secondChildFlg == \\'destination\\'\\\"><div style=\\\"width: 190px;margin-top: -5px;float: left\\\"><auto-complete ng-if=\\\"searchCtrl.shipment[searchCtrl.secondChildFlg][searchCtrl.thirdChildFlg] == \\'city\\'\\\" flex-gt-sm=auto field={{searchCtrl.shipment[searchCtrl.secondChildFlg][searchCtrl.thirdChildFlg]}} search-field={{searchCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=searchCtrl.searchValue></auto-complete><auto-complete ng-if=\\\"searchCtrl.shipment[searchCtrl.secondChildFlg][searchCtrl.thirdChildFlg] == \\'country\\'\\\" flex-gt-sm=auto field=t_and_t_country search-field={{searchCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=searchCtrl.searchValue></auto-complete><auto-complete ng-if=\\\"searchCtrl.shipment[searchCtrl.secondChildFlg][searchCtrl.thirdChildFlg] == \\'state\\'\\\" flex-gt-sm=auto field=t_and_t_state search-field={{searchCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=searchCtrl.searchValue></auto-complete><auto-complete ng-if=\\\"searchCtrl.shipment[searchCtrl.secondChildFlg][searchCtrl.thirdChildFlg] == \\'city_code\\'\\\" flex-gt-sm=auto field=t_and_t_citycountry search-field={{searchCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=searchCtrl.searchValue></auto-complete></div><div style=\\\"width: 100px;float: left\\\"><md-button class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-click=\\\"searchCtrl.newSearch();\\r\\n searchCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(searchCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (searchCtrl.searchValue)}\\\"><span style=\\\"color: #fff\\\">ADD</span></md-button></div></div><div ng-if=\\\"searchCtrl.secondChildFlg != \\'origin\\' && searchCtrl.secondChildFlg != \\'destination\\'\\\"><div style=\\\"width: 190px;margin-top: -5px;float: left\\\" ng-if=\\\"!searchCtrl.shipmentOpenInputFlag && !searchCtrl.dateInputFlag && searchCtrl.secondChildFlg ==\\'lane_pair\\' \\\" ng-mousemove=\\\"searchCtrl.ttserchdataNew = (searchCtrl.nextElem | underscoreless) + \\' \\'+searchCtrl.searchValue \\\"><md-input-container style=\\\"margin: 0 !important\\\"><label translate=\\\"\\\"></label><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchCtrl.searchValue md-items=\\\"item in searchCtrl.getMatches(\\'lanepairs\\', searchCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"Enter data\\\"><md-item-template><span md-highlight-text=searchCtrl.searchValue>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-input-container></div><input id=text-field-focus ng-if=\\\"!searchCtrl.shipmentOpenInputFlag && !searchCtrl.dateInputFlag && searchCtrl.secondChildFlg !=\\'lane_pair\\' && searchCtrl.secondChildFlg !=\\'consol\\'\\r\\n && searchCtrl.secondChildElem !=\\'awb_bol\\' && searchCtrl.secondChildElem !=\\'container\\' && searchCtrl.secondChildElem !=\\'ref\\' &&\\r\\n searchCtrl.secondChildElem !=\\'country\\' && searchCtrl.secondChildElem !=\\'city\\' && searchCtrl.secondChildElem !=\\'state\\' &&\\r\\n searchCtrl.secondChildElem !=\\'port_of_discharge\\' && searchCtrl.secondChildElem !=\\'port_of_load\\' && searchCtrl.secondChildElem !=\\'incoterm\\' &&\\r\\n searchCtrl.secondChildElem !=\\'vesselname\\' && searchCtrl.secondChildElem !=\\'voyage\\'\\\" ng-model=searchCtrl.searchValue ng-pattern=\\\"searchCtrl.secondChildElem == \\'gross_weight\\' || searchCtrl.secondChildElem == \\'total_pieces\\' ||\\r\\n searchCtrl.secondChildElem == \\'invoice\\' ? \\'[0-9]*\\' : \\'\\'\\\" style=\\\"width: 150px;margin-top: 8px;float: left\\\"><div style=\\\"width: 190px;margin-top: -5px;float: left\\\" ng-if=\\\"!searchCtrl.shipmentOpenInputFlag && !searchCtrl.dateInputFlag && (searchCtrl.secondChildElem ==\\'city\\' ||\\r\\n searchCtrl.secondChildElem ==\\'state\\' || searchCtrl.secondChildElem ==\\'country\\'|| searchCtrl.secondChildElem ==\\'consol\\' ||\\r\\n searchCtrl.secondChildElem ==\\'awb_bol\\' || searchCtrl.secondChildElem ==\\'container\\' || searchCtrl.secondChildElem ==\\'ref\\' ||\\r\\n searchCtrl.secondChildElem ==\\'port_of_discharge\\' || searchCtrl.secondChildElem ==\\'port_of_load\\' || searchCtrl.secondChildElem ==\\'incoterm\\'\\r\\n || searchCtrl.secondChildElem ==\\'vesselname\\' || searchCtrl.secondChildElem ==\\'voyage\\')\\\" ng-mousemove=\\\"searchCtrl.ttserchdataNew = (searchCtrl.nextElem | underscoreless) + \\' \\'+searchCtrl.searchValue \\\"><auto-complete field={{searchCtrl.secondChildElem}} search-field={{searchCtrl.secondChildElem}} display-name=\\\"Enter data\\\" search-text=searchCtrl.searchValue></auto-complete></div><input ng-if=\\\"((!searchCtrl.shipmentOpenInputFlag && !searchCtrl.dateInputFlag) && searchCtrl.inputRangeFlag) \\\" ng-model=searchCtrl.searchValue2 style=\\\"width: 150px;margin-left: 2px;margin-top: 8px;float: left\\\" ng-pattern=\\\"searchCtrl.secondChildElem == \\'gross_weight\\' || searchCtrl.secondChildElem == \\'total_pieces\\' || searchCtrl.secondChildElem == \\'invoice\\' ? \\'[0-9]*\\' : \\'\\'\\\"><div class=date-picker-wrapper ng-if=\\\"!searchCtrl.shipmentOpenInputFlag && searchCtrl.dateInputFlag\\\" style=\\\"width: 185px;float: left\\\"><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=searchCtrl.minDate mdp-max-date=dateMax ng-change=\\\"searchCtrl.dateChanged();searchCtrl.addOneMoreDay(searchCtrl.searchValue); searchCtrl.ttserchdataNew = (searchCtrl.nextElem | underscoreless) + \\' \\'+(searchCtrl.searchValue | date: \\'MMM dd, yyyy\\')\\\" ng-model=searchCtrl.searchValue></mdp-date-picker></div><div class=date-picker-wrapper ng-if=\\\"!searchCtrl.shipmentOpenInputFlag && searchCtrl.dateInputFlag && searchCtrl.shipment[searchCtrl.secondChildFlg][searchCtrl.thirdChildFlg] == \\'range_to\\'\\\" style=\\\"width: 185px;float: left\\\"><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=dateMin ng-change=\\\"searchCtrl.dateChanged(); searchCtrl.subtractOneDay(searchCtrl.searchValue2); searchCtrl.ttserchdataNew = (searchCtrl.nextElem | underscoreless) + \\' \\'+(searchCtrl.searchValue| date: \\'MMM dd, yyyy\\') +\\' \\'+(searchCtrl.searchValue2 | date: \\'MMM dd, yyyy\\')\\\" ng-model=searchCtrl.searchValue2></mdp-date-picker></div><div id={{searchCtrl.shipment[searchCtrl.secondChildFlg][searchCtrl.thirdChildFlg]}} style=\\\"width: 100px;float: left\\\" ng-show=searchForm.$valid><md-button class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-click=\\\"searchCtrl.newSearch();\\r\\n searchCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(searchCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (searchCtrl.searchValue) }\\\"><span style=\\\"color: #fff\\\">ADD</span></md-button></div></div></div><span class=error ng-show=searchForm{{searchCtrl.searchValue}}.$error.pattern style=\\\"color : red\\\">Please enter numeric value.</span></div></div><div flex=100 layout=row style=\\\"min-height: 100px\\\"><div style=\\\"max-width: 100%\\\"><div style=\\\"margin-right: 10px\\\" class=adv-search-chip id={{searchCtrl.shipment[searchCtrl.secondChildFlg][searchCtrl.thirdChildFlg]}}_too><span><md-chips class=\\\"md-chips custom-chip no-border tt-chip mdChipsCloseMarkRemoval1\\\" ng-model=searchCtrl.chipData md-on-remove=searchCtrl.chipTempRemoved($chip)><md-chip-template><span><strong><span class=chips-key1 translate={{$chip.display}}></span><span>:</span></strong> <span ng-if=\\\"$chip.displayValue && $chip.value != \\'\\' \\\"><span class=chips-val1 ng-if=\\\"$chip.display.includes(\\'Date\\') || $chip.display.includes(\\'DATE\\')\\\">{{$chip.value | date : \\\"MMM dd yyyy\\\"}} </span><span class=chips-val1 ng-if=\\\"\\'false\\' && ($chip.display == \\'TRACKTRACE.ARRIVE_DATE_FROM\\')\\\">{{$chip.value | date : \\\"MMM dd yyyy\\\"}} </span><span class=chips-val1 ng-if=\\\"\\'false\\' && ($chip.display == \\'TRACKTRACE.ARRIVE_DATE_TO\\')\\\">{{$chip.value | date : \\\"MMM dd yyyy\\\"}} </span><span class=chips-val1 title=\\\"{{$chip.value | capitalize}}\\\" ng-if=\\\"$chip.display.includes(\\'AWB/BOL #\\') || $chip.display.includes(\\'Reference\\') || $chip.display.includes(\\'Consol\\')\\r\\n || $chip.display.includes(\\'TRACKTRACE.CONTAINER_NUM\\') || $chip.display.includes(\\'TRACKTRACE.AWB_BOL\\') ||\\r\\n $chip.display.includes(\\'TRACKTRACE.REFERENCE_NUM\\') || $chip.display.includes(\\'TRACKTRACE.PORT_OF_DISCHARGE\\') ||\\r\\n $chip.display.includes(\\'port_of_discharge\\') || $chip.display.includes(\\'port_of_load\\') ||\\r\\n $chip.display.includes(\\'TRACKTRACE.PORT_OF_LOAD\\') || $chip.display.includes(\\'incoterm\\') ||\\r\\n $chip.display.includes(\\'TRACKTRACE.INCOTERM\\') || $chip.display.includes(\\'vesselname\\') || $chip.display.includes(\\'voyage\\')\\\">{{$chip.value | uppercase}} </span><span class=chips-val1 title=\\\"{{$chip.value | capitalize}}\\\" ng-if=\\\"!$chip.display.includes(\\'DATE\\') && !$chip.display .includes(\\'Date\\') && !$chip.display.includes(\\'AWB/BOL #\\') && !$chip.display.includes(\\'Reference\\') && !$chip.display.includes(\\'Consol\\')\\r\\n && !$chip.display.includes(\\'TRACKTRACE.CONTAINER_NUM\\') && !$chip.display.includes(\\'TRACKTRACE.REFERENCE_NUM\\') && !$chip.display.includes(\\'TRACKTRACE.AWB_BOL\\') && !$chip.display.includes(\\'port_of_discharge\\') && !$chip.display.includes(\\'TRACKTRACE.PORT_OF_DISCHARGE\\') && !$chip.display.includes(\\'port_of_load\\') && !$chip.display.includes(\\'TRACKTRACE.PORT_OF_LOAD\\')\\r\\n && !$chip.display.includes(\\'incoterm\\') && !$chip.display.includes(\\'TRACKTRACE.INCOTERM\\') && !$chip.display.includes(\\'vesselname\\') && !$chip.display.includes(\\'voyage\\')\\\">{{$chip.value | uppercase}}</span></span></span></md-chip-template></md-chips></span></div></div></div></md-dialog-content><!-- <md-dialog-content class=\\\"light-content\\\">\\r\\n <div layout-gt-sm=\\\"row\\\">\\r\\n\\r\\n </div>\\r\\n </md-dialog-content> --><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button ng-click=\\\"searchCtrl.clearSearch();searchCtrl.resetSearch();searchCtrl.ttserchdataNew = \\'\\';searchCtrl.nextElem=\\'\\';searchCtrl.clearSearch();\\\" hide-xs><span translate=TRACKTRACE.CLEAR></span></md-button><md-button class=\\\"md-fab md-button md-mini bottom-fab\\\" ng-click=searchCtrl.showListBottomSheet() show-xs hide-gt-xs><md-icon></md-icon></md-button><span flex=auto></span><div ng-if=searchCtrl.isSavedSearch hide-xs><md-button ng-click=searchCtrl.loadDefault()><span translate=TRACKTRACE.LOAD_DEFAULT_CRITERIA></span></md-button></div><md-button ng-click=searchCtrl.saveToDefault() hide-xs><span translate=TRACKTRACE.SAVE_DEFAULT_CRITERIA></span></md-button><!-- ng-click=\\\"searchCtrl.search(ttserchdata)\\\" --><md-button class=\\\"md-raised md-accent\\\" type=submit ng-click=searchCtrl.advSearch($event) id=btnSearch style=\\\"padding: 0;margin: 0 0 0px 8px\\\"><span id=spSearch translate=TRACKTRACE.SEARCH style=\\\"padding: 10px 18px\\\"></span></md-button></md-dialog-actions></form><div ng-init=searchCtrl.attachFocusToAutoComplete()></div></md-dialog>\");\n$templateCache.put(\"/app/advanced-search/adv-search.html\",\"<!-- Advanced Search Dialog --><div ng-controller=\\\"AdvSearchController as searchCtrl\\\"><!-- show the pills --><div ng-if=\\\"(searchCtrl.chipSearchFields.length > 0) && (!searchCtrl.bookingMode) && (!searchCtrl.transitMode)\\\" layout-gt-xs=row><span translate=TRACKTRACE.CURRENT_SEARCH>:</span> <span flex=auto></span><md-button class=btn-link md-ink-ripple=false ng-click=searchCtrl.resetSearch()><span translate=TRACKTRACE.CLEAR_SEARCH></span></md-button></div><!-- md-on-select=\\\"searchCtrl.chipClicked($chip)\\\" --><md-chips class=\\\"md-chips custom-chip no-border mdChipsCloseMarkRemoval\\\" ng-model=searchCtrl.chipSearchFields md-on-remove=searchCtrl.chipRemoved($chip)><md-chip-template><span><strong><span class=chips-key translate={{$chip.display}}></span></strong> <span ng-if=\\\"$chip.displayValue \\\">: <span class=chips-val ng-if=\\\"$chip.display.includes(\\'Date\\') || $chip.display.includes(\\'DATE\\')\\\">{{$chip.searchField | date : \\\"MMM dd yyyy\\\"}} </span><span class=chips-val title=\\\"{{$chip.searchField | uppercase}}\\\" ng-if=\\\"$chip.display.includes(\\'AWB/BOL #\\') || $chip.display.includes(\\'Reference\\') || $chip.display.includes(\\'Consol\\') ||\\r\\n $chip.display.includes(\\'TRACKTRACE.CONTAINER_NUM\\') || $chip.display.includes(\\'TRACKTRACE.REFERENCE_NUM\\') ||\\r\\n $chip.display.includes(\\'TRACKTRACE.AWB_BOL\\') || $chip.display.includes(\\'TRACKTRACE.INCOTERM\\') || $chip.display.includes(\\'TRACKTRACE.VESSELNAME\\')\\r\\n || $chip.display.includes(\\'TRACKTRACE.VOYAGE\\')\\\">{{$chip.searchField | uppercase}} </span><span class=chips-val title=\\\"{{$chip.searchField | capitalize}}\\\" ng-if=\\\"!$chip.display.includes(\\'AWB/BOL #\\') && !$chip.display.includes(\\'Reference\\') && !$chip.display.includes(\\'Consol\\')\\r\\n && !$chip.display.includes(\\'TRACKTRACE.CONTAINER_NUM\\') && !$chip.display.includes(\\'TRACKTRACE.REFERENCE_NUM\\') &&\\r\\n !$chip.display.includes(\\'TRACKTRACE.AWB_BOL\\') && !$chip.display.includes(\\'DATE\\') && !$chip.display.includes(\\'Date\\')\\r\\n && !$chip.display.includes(\\'TRACKTRACE.INCOTERM\\') && !$chip.display.includes(\\'TRACKTRACE.VESSELNAME\\') && !$chip.display.includes(\\'TRACKTRACE.VOYAGE\\')\\\">{{$chip.searchField | capitalize}}</span></span></span></md-chip-template></md-chips></div>\");\n$templateCache.put(\"/app/advanced-search/advance-search-action-board.html\",\"<!-- Advanced Search Dialog --><div ng-controller=\\\"AdvSearchController as searchCtrl\\\"><div class=m-b ng-if=\\\"searchCtrl.chipSearchFields.length < 1\\\"><div ng-show=\\\"$location.path===\\'track-trace\\'\\\"><span translate=TRACKTRACE.OR></span></div>  <md-button class=btn-link md-ink-ripple=false ng-click=searchCtrl.showAdvSearch($event)><span translate=TRACKTRACE.ADVANCE_SEARCH></span></md-button></div><!-- show the pills --><div ng-if=\\\"(searchCtrl.chipSearchFields.length > 0) && (!searchCtrl.bookingMode) && (!searchCtrl.transitMode)\\\" layout-gt-xs=row><span translate=TRACKTRACE.CURRENT_SEARCH>:</span> <span flex=auto></span><md-button class=btn-link md-ink-ripple=false ng-click=searchCtrl.resetSearch()><span translate=TRACKTRACE.CLEAR_SEARCH></span></md-button></div><!-- md-on-select=\\\"searchCtrl.chipClicked($chip)\\\" --><md-chips class=\\\"md-chips custom-chip no-border mdChipsCloseMarkRemoval\\\" ng-model=searchCtrl.chipSearchFields md-on-remove=searchCtrl.chipRemoved($chip)><md-chip-template><span><strong><span class=chips-key translate={{$chip.display}}></span></strong> <span ng-if=\\\"$chip.displayValue \\\">: <span class=chips-val ng-if=\\\"$chip.display.includes(\\'Date\\') || $chip.display.includes(\\'DATE\\')\\\">{{$chip.searchField | date : \\\"MMM dd yyyy\\\"}} </span><span class=chips-val title=\\\"{{$chip.searchField | uppercase}}\\\" ng-if=\\\"$chip.display.includes(\\'AWB/BOL #\\') || $chip.display.includes(\\'Reference\\') || $chip.display.includes(\\'Consol\\') || $chip.display.includes(\\'TRACKTRACE.CONTAINER_NUM\\') || $chip.display.includes(\\'TRACKTRACE.REFERENCE_NUM\\') || $chip.display.includes(\\'TRACKTRACE.AWB_BOL\\')\\\">{{$chip.searchField | uppercase}} </span><span class=chips-val title=\\\"{{$chip.searchField | capitalize}}\\\" ng-if=\\\"!$chip.display.includes(\\'AWB/BOL #\\') && !$chip.display.includes(\\'Reference\\') && !$chip.display.includes(\\'Consol\\') && !$chip.display.includes(\\'TRACKTRACE.CONTAINER_NUM\\') && !$chip.display.includes(\\'TRACKTRACE.REFERENCE_NUM\\') && !$chip.display.includes(\\'TRACKTRACE.AWB_BOL\\') && !$chip.display.includes(\\'DATE\\') && !$chip.display.includes(\\'Date\\')\\\">{{$chip.searchField | capitalize}}</span></span></span></md-chip-template></md-chips><div ng-if=\\\"searchCtrl.chipSearchFields.length > 0\\\" class=m-t-sm><md-button class=btn-link md-ink-ripple=false ng-click=searchCtrl.showAdvSearch($event)><span translate=TRACKTRACE.MODIFY_SEARCH></span></md-button></div></div>\");\n$templateCache.put(\"/app/advanced-search/auto-complete-field.html\",\"<md-autocomplete md-selected-item=searchCtrl.selectedItem md-search-text-change=searchCtrl.searchTextChange(searchText) md-search-text=searchText md-selected-item-change=searchCtrl.selectedItemChange(item) md-input-id={{searchField}} md-items=\\\"item in searchCtrl.autocomplete(field, searchText, extraParamString)\\\" md-item-text=item.display md-min-length=2 md-floating-label=\\\"{{displayName | translate}}\\\" md-delay=300 class=\\\"md-block error-hidden\\\"><md-item-template><span md-highlight-text=searchText ng-if=\\\"field !=\\'citycountry\\'\\\">{{item.display}}</span> <span md-highlight-text=searchText ng-if=\\\"field ==\\'citycountry\\'\\\">{{item.display}}</span></md-item-template><md-not-found>No entries were found.</md-not-found></md-autocomplete>\");\n$templateCache.put(\"/app/advanced-search/quick-search.html\",\"<form id=quick_search_form ng-submit=\\\"trackTraceCtrl.quickSearch(query);query=\\'\\';\\\"><div layout-gt-xs=row layout-xs=column class=\\\"search-group {{trackTraceCtrl.searchType == \\'ship_date\\' || trackTraceCtrl.searchType == \\'due_date\\' ? \\'col-tablet-sm\\' : \\'\\'}}\\\"><div><!-- Search Options Menu --><md-menu md-position-mode=\\\"target target\\\" md-offset=\\\"0 60\\\"><md-button aria-label=\\\"Open demo menu\\\" class=\\\"md-raised search-type md-accent\\\" ng-click=$mdOpenMenu($event)><span ng-if=\\\"trackTraceCtrl.searchType == \\'reference_number\\'\\\"><span translate=TRACKTRACE.REFERENCE_NUM></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'bol_number\\'\\\"><span translate=TRACKTRACE.AWB_BOL></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'due_date\\'\\\"><span translate=TRACKTRACE.DUE_DATE></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'ship_date\\'\\\"><span translate=TRACKTRACE.SHIP_DATE></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'estimated_date\\'\\\"><span translate=TRACKTRACE.ESTIMATED_DATE></span></span><md-icon></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"trackTraceCtrl.searchType = \\'reference_number\\'\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.REFERENCE_NUM></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By AWB/BOL\\\" ng-click=\\\"trackTraceCtrl.searchType = \\'bol_number\\'\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.AWB_BOL></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Due Date\\\" ng-click=\\\"trackTraceCtrl.searchType = \\'due_date\\'\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.DUE_DATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By POD ETA\\\" ng-click=\\\"trackTraceCtrl.searchType = \\'pod_eta_date\\'\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.POD_DATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Start Date\\\" ng-click=\\\"trackTraceCtrl.searchType = \\'ship_date\\'\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.START_DATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Estimated Date\\\" ng-click=\\\"trackTraceCtrl.searchType = \\'estimated_date\\'\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.ESTIMATED_DATE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div><div flex=auto class=light-form><!-- Search Field --><div ng-show=\\\"trackTraceCtrl.searchType == \\'reference_number\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=query name=query maxlength=18 aria-label=\\\"Search By Reference Number\\\" placeholder=\\\"Search by {{\\'TRACKTRACE.REFERENCE_NUM\\' | translate}}\\\" class=form-control></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><div ng-show=\\\"trackTraceCtrl.searchType == \\'bol_number\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=query name=query maxlength=18 placeholder=\\\"Search by {{\\'TRACKTRACE.AWB_BOL\\' | translate}}\\\" class=form-control></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><div ng-show=\\\"trackTraceCtrl.searchType == \\'due_date\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"From Due Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.due_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"To Due Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.due_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCtrl.dueDateRangeSelect ng-change=trackTraceCtrl.selectRange() placeholder=\\\"or select a range\\\" aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCtrl.ranges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><div ng-show=\\\"trackTraceCtrl.searchType == \\'pod_eta_date\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"From POD ETA\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.eta_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"To Pod Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.eta_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCtrl.etaDateRangeSelect ng-change=trackTraceCtrl.selectRange() placeholder=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCtrl.ranges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><div ng-show=\\\"trackTraceCtrl.searchType == \\'ship_date\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"From Ship Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.ship_start_date></mdp-date-picker></div><div flex-gt-xs=31><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"To Ship Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.ship_end_date></mdp-date-picker></div><div flex-gt-xs=31><md-select ng-model=trackTraceCtrl.shipDateRangeSelect ng-change=trackTraceCtrl.selectRange() placeholder=\\\"or select a range\\\" aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCtrl.ranges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><div ng-show=\\\"trackTraceCtrl.searchType == \\'estimated_date\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"From Estimated Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.estimated_start_date></mdp-date-picker></div><div flex-gt-xs=31><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"To Estimated Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.estimated_end_date></mdp-date-picker></div><div flex-gt-xs=31><md-select ng-model=trackTraceCtrl.estimatedDateRangeSelect ng-change=trackTraceCtrl.selectRange() placeholder=\\\"or select a range\\\" aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCtrl.ranges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div></div></div></form>\");\n$templateCache.put(\"/app/book-shipment/auto-complete-field.html\",\"<md-autocomplete md-search-text=searchText md-search-text-change=bookCtrl.textChange(field) md-selected-item-change=\\\"bookCtrl.selectItemChange(item, field)\\\" md-input-id={{searchField}} md-input-name={{field}} md-items=\\\"item in bookCtrl.autocomplete(field, searchText)\\\" md-item-text=item.display md-min-length=2 md-floating-label=\\\"{{displayName | translate}}\\\" md-delay=100 class=\\\"md-block error-hidden\\\" ng-required=!isReview ng-disabled=isReview><md-item-template><span md-highlight-text=searchText>{{item.display}}</span></md-item-template><div ng-messages=form[field].$error ng-if=form[field].$touched><div ng-message=required><span translate=BOOKSHIPMENT.REQUIRED></span></div></div><md-not-found>No entries were found.</md-not-found></md-autocomplete>\");\n$templateCache.put(\"/app/book-shipment/book-shipment-sidebar.html\",\"<div sticky offset=90 disabled-sticky=vm.isTouchSupported() sticky-class=imSoSticky media-query=\\\"min-width: 992px\\\" stick-limit=true id=sticky-sidebar><md-card><md-toolbar><div class=md-toolbar-tools><h2 translate=BOOKSHIPMENT.ORDER_STATUS></h2></div></md-toolbar><md-card-content><div class=form-complete-list-item layout=row ng-repeat=\\\"form in vm.sideBarData\\\" layout-align=\\\"start center\\\"><div class=\\\"icon-wrapper {{form.isValid && !form.optional ? \\'form-completed\\' : \\'\\'}} {{form.optional ? \\'optional\\' : \\'\\'}}\\\" aria-label=\\\"Form Completed\\\"><md-icon class=icon-reset></md-icon></div><div flex><a class=btn-link href=#{{form.id}} du-smooth-scroll offset=80 duration=700><span class=uppercase translate={{form.display}}></span></a></div></div></md-card-content></md-card><div layout=row layout-align=\\\"center center\\\"><md-button class=\\\"md-raised small-margin\\\" ng-click=\\\"vm.showModal(ev, \\'clear-fields\\')\\\" flex><span translate=BOOKSHIPMENT.CLEAR></span></md-button><!--<md-button class=\\\"md-raised md-primary\\\"\\r\\n\t\t\t\t\t\t\t ng-click=\\\"vm.reviewOrder()\\\" flex>\\r\\n\t\t\t\t\t\t\t {{\\'BOOKSHIPMENT.REVIEW\\' | translate}}</md-button>--><md-button class=\\\"md-raised md-primary small-margin\\\" ng-disabled=!vm.isFormValid ng-click=vm.reviewOrder() flex><span translate=BOOKSHIPMENT.REVIEW></span></md-button></div><div class=top-padding layout=row layout-align=\\\"center center\\\"><md-button md-no-ink class=btn-link ng-click=vm.saveDraft()><md-progress-circular md-mode=indeterminate ng-if=vm.isSavingDraft class=md-hue-1 md-diameter=50px></md-progress-circular><span ng-hide=vm.isSavingDraft class=uppercase translate=BOOKSHIPMENT.SAVE_DRAFT></span></md-button></div></div>\");\n$templateCache.put(\"/app/book-shipment/book-shipment.html\",\"<cva-shell><div class=\\\"shell-padding book-shipment content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex><h2 class=md-display-1 translate=BOOKSHIPMENT.BOOK_SHIPMENT></h2><span class=\\\"breadcrumb flat\\\"><a href=/potential-exceptions class=parent-link><span translate=BOOKSHIPMENT.BOOK_SHIPMENT></span></a></span></div></div></div><span ng-controller=\\\"SearchPreviousController as searchCtrl\\\"><md-card class=\\\"p-a-sm loadmask-light\\\" loadmask=!isLoading collapsible template-url=/app/book-shipment/search-previous-shipments/search-previous-shipments.html></md-card></span><div layout-gt-sm=row><div flex-gt-sm=25><div ng-include=\\\"\\'/app/book-shipment/book-shipment-sidebar.html\\'\\\"></div></div><div flex-gt-sm=75><div class=\\\"card-group m-b\\\"><md-card id={{vm.sideBarData[0].id}} class=md-card-light ng-include=\\\"\\'/app/book-shipment/forms/customer-info.html\\'\\\"></md-card><md-card id={{vm.sideBarData[1].id}} class=md-card-light ng-include=\\\"\\'/app/book-shipment/forms/shipper-consignee.html\\'\\\"></md-card><md-card id={{vm.sideBarData[2].id}} class=md-card-light><form novalidate class=\\\"form-horizontal light-form\\\" name=vm.ShipmentOptionsForm><div ng-include=\\\"\\'/app/book-shipment/forms/shipment-options.html\\'\\\"></div></form></md-card><md-card id={{vm.sideBarData[3].id}} class=md-card-light><form novalidate class=\\\"form-horizontal light-form\\\" name=vm.ShipmentDetailsForm><div ng-include=\\\"\\'/app/book-shipment/forms/shipment-details.html\\'\\\"></div></form></md-card><md-card id={{vm.sideBarData[4].id}} class=md-card-light><form novalidate class=\\\"form-horizontal light-form\\\" name=vm.ReferenceNumbersForm><div ng-include=\\\"\\'/app/book-shipment/forms/reference-numbers.html\\'\\\"></div></form></md-card><md-card id={{vm.sideBarData[5].id}} class=md-card-light><form novalidate class=\\\"form-horizontal light-form\\\" name=vm.HazMatForm><div ng-include=\\\"\\'/app/book-shipment/forms/haz-mat.html\\'\\\"></div></form></md-card><md-card id={{vm.sideBarData[6].id}} class=md-card-light><form novalidate class=\\\"form-horizontal light-form\\\" name=vm.ItemDetailsForm><div ng-include=\\\"\\'/app/book-shipment/forms/item-details.html\\'\\\"></div></form></md-card><md-card id={{vm.sideBarData[7].id}} class=md-card-light><form novalidate class=\\\"form-horizontal light-form\\\" name=vm.CompleteShipmentForm><div ng-include=\\\"\\'/app/book-shipment/forms/complete-shipment.html\\'\\\"></div></form></md-card></div><div ng-if=vm.isTouchSupported() layout=row layout-align=\\\"end center\\\"><md-button class=\\\"md-raised md-primary\\\" ng-disabled=!vm.isFormValid ng-click=vm.reviewOrder()><span translate=BOOKSHIPMENT.REVIEW></span></md-button></div><div ng-if=!vm.isTouchSupported() hide-gt-sm layout=row layout-align=\\\"end center\\\"><md-button class=\\\"md-raised md-primary\\\" ng-disabled=!vm.isFormValid ng-click=vm.reviewOrder()><span translate=BOOKSHIPMENT.REVIEW></span></md-button></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/book-shipment/terms-and-conditions.html\",\"<div class=terms-conditions layout=row layout-align=\\\"center center\\\"><table width=75% height=0px border=1 cellpadding=20px><tr><td><p align=center><strong>TERMS & CONDITIONS</strong></p><ol><ul><li><strong>DEFINITIONS: </strong>As used herein, CWW refers to Crane Worldwide Logistics, LLC, its employees, agents, subcontractors, and independent contractors, including direct carriers, indirect carriers and motor carriers utilized by CWW to assist with transportation services. Shipper means the party shipping Goods pursuant hereto, and its employees and agents. Goods refers to cargo shipped hereunder including all pieces which are tendered to, and accepted by, CWW on a single air waybill. Domestic USA is defined as services within the 50 United States and its insular possessions, as well as Puerto Rico. International is defined as shipments other than Domestic USA shipments. This document is a nonnegotiable document of title under the terms of Article 7 of the Uniform Commercial Code as enacted in the state of Texas, USA.  The fact that this document is referred to (at times) as an air waybill shall not affect its status as a warehouseman’s receipt.</li><li><strong>AGREEMENT TO TERMS: </strong>If there is a conflict between these Terms and Conditions and the air waybill, these Terms and Conditions will apply.  Except as specifically noted herein, no agent or employee of either party may alter or waive any of the terms or conditions set forth herein.</li><li><strong>SHIPPER RESPONSIBILITIES:</strong></li></ul></ol><ol><li>Shipper warrants that it is the owner or the authorized agent of the owner of the Goods and accepts these terms and conditions for itself and/or as agent for, and on behalf of, the owner.  Shipper is responsible for adequately packaging the Goods so as to ensure safe transportation with ordinary care in handling. Proper packaging must accurately protect any articles susceptible to damage as a result of conditions encountered in transportation, including changes in temperature or atmospheric pressure. Each shipment must be accurately and legibly marked with name, completed address and phone numbers of the Shipper and consignee. Proper completion of this air waybill is the responsibility of the Shipper and necessary in executing your required service.  Shipper warrants that it is in compliance with all applicable laws relating to the carriage of goods, including but not limited to, those regarding dangerous or hazardous materials.</li><li>(i) With respect to imports, at a reasonable time prior to entry of the goods to the applicable import country, Shipper shall furnish to CWW invoices in proper form together with other documents necessary or useful in the preparation of the customs entry, and such further information as may be sufficient to establish the dutiable value, classification and admissibility of the goods pursuant to applicable law, regulation or ruling. If Shipper fails to timely furnish all of such information or documents, or if such information or documents is inaccurate or incomplete, CWW shall be obligated to use its best judgment in connection with the shipment. Where a bond is required by the customs authority of the applicable import country to be given for the production of any document or the performance of any act, Shipper shall be deemed bound by the terms of the bond notwithstanding the fact that the bond has been executed by CWW as principal, it being understood that CWW entered into such undertaking at the request and on behalf of Shipper, and Shipper shall indemnify and hold CWW harmless for the consequences of any breach of the terms of the bond. (ii) With respect to exports, at a reasonable time prior to the exportation of the shipment, Shipper shall furnish to CWW the commercial invoice in proper form and number, a proper consular declaration, weights, measures, values and other information in the language of and as may be required by the laws and regulations of the country of origin and the country of destination of the goods. (iii) With respect to both imports and exports, shall not in any way be liable for increased duty, penalty, fine or expense unless caused by the gross negligence or other fault of CWW, in which event its liability to Shipper shall be governed by the provisions of paragraph 4. Shipper shall be bound by and warrants the accuracy of all invoices, documents and information furnished to CWW by Shipper or its agents for export, entry or other purposes and Shipper agrees to indemnify and hold harmless CWW against any increased duty, penalty, liquidated damages, fine or expense, including attorneys fees, resulting from any inaccuracy or omission or any failure to make timely presentation, even if not due to any negligence or fault of Shipper.</li><li>CWW shall not be obliged to incur any expense, guarantee payment or advance any money in connection with the importing, forwarding, transporting, insuring, storing or coopering of the Goods, unless the same is previously provided to CWW by Shipper on demand. CWW shall be under no obligation to advance freight charges, customs duties or taxes on any shipment, nor shall any advance by CWW be construed as a waiver of the provisions hereof. Notwithstanding any payment instructions given to CWW, Shipper shall be responsible for all fees, costs, and charges of any kind hereunder if CWW is unable to collect such charges, which shall include special handling fees, duties or taxes which have been advanced, from consignee or other third party within 45 days of delivery.</li><li>In the event that a carrier, other person or any governmental agency makes a claim or institutes legal action against CWW for freight, duties, fines, penalties, liquidated damages or other money due arising from a shipment of Goods tendered by Shipper, Shipper agrees to indemnify and hold harmless CWW for any amount CWW may be required to pay such carrier, other person or governmental agency, together with reasonable expenses, including attorney fees, incurred by CWW in connection with defending such claim or legal action and obtaining reimbursement from Shipper. The confiscation or detention of the Goods by any governmental authority shall not affect or diminish the liability of Shipper to CWW to pay all charges or other money due promptly on demand.</li></ol><ul><li><strong>LIMITATION OF LIABILITY & DECLARED VALUE:</strong></li></ul><ol><li><strong>SHIPPER AGREES THAT (I) IN CONNECTION WITH DOMESTIC USA SHIPMENTS, CWW SHALL IN NO EVENT BE LIABLE FOR ANY LOSS, DAMAGE, EXPENSE OR DELAY TO THE GOODS FOR ANY REASON, INCLUDING AS A RESULT OF THE GROSS NEGLIGENCE OR OTHER FAULT OF CWW, FOR ANY AMOUNT IN EXCESS OF $.50/POUND, $50 PER SHIPMENT, OR THE INVOICE VALUE, WHICHEVER IS LESS; (II)  IN CONNECTION WITH INTERNATIONAL SHIPMENTS,</strong><strong> CWW’S LIABILITY SHALL BE LIMITED IN ACCORDANCE WITH ANY APPLICABLE INTERNATIONAL CARRIAGE OF GOODS CONVENTION, AND IN THE EVENT THAT NO SUCH INTERNATIONAL CONVENTION IS APPLICABLE, CWW’S LIABILITY PER INTERNATIONAL SHIPMENT SHALL BE LIMITED TO $50 PER UNIT OR $20 PER KILOGRAM, WHICHEVER IS GREATER; AND (III) AS TO ANY SHIPMENTS UNDER THESE TERMS AND CONDITIONS, SHIPPER HAS THE OPTION OF PAYING SPECIAL COMPENSATION TO INCREASE THE LIABILITY FOR THE SHIPMENT IN EXCESS OF THE ABOVE STATED AMOUNTS IN CASE OF ANY LOSS, DAMAGE, EXPENSE OR DELAY, AS DESCRIBED BELOW. ANY PARTIAL LOSS OR DAMAGE FOR WHICH CWW MAY BE LIABLE SHALL BE ADJUSTED PRO RATA ON THE BASIS OF SUCH VALUATION. CWW SHALL NOT IN ANY CIRCUMSTANCES BE LIABLE FOR CONSEQUENTIAL OR INDIRECT DAMAGES, INCLUDING WITHOUT LIMITATION, DAMAGES ARISING FROM LOSS OF PROFIT, EVEN IF NOTICE WAS GIVEN OF THE POSSIBILITY OF SUCH DAMAGES AND EVEN IF SUCH DAMAGES WERE REASONABLY FORESEEABLE. CWW SHALL NOT IN ANY CIRCUMSTANCES BE LIABLE FOR CONCEALED DAMAGES. PAYMENT OF CLAIMS SHALL BE SUBJECT TO PROOF OF ACTUAL DAMAGES SUFFERED.</strong></li><li>If the sum entered on the face of the air waybill (or other shipper’s document such as an SLI) as Declared Value for Carriage represents an amount in excess of the applicable limits of liability referred to above, and if the Shipper has paid any supplementary charge that may be required by applicable tariffs, conditions of carriage or regulations, this shall constitute a special declaration of value and in this case the limit of liability shall be the lesser of the actual value of the Goods or the sum so declared; however, in no event shall such sum exceed $25,000.  CWW will not insure the Goods unless provided written instructions from Shipper to do so prior to shipment, in which case insurance coverage will be effective upon acceptance by the insurance company and underwriter. Insurance premiums and any charge for CWW to arrange such insurance shall be at Shipper’s expense. Insurance shall be assessed at a rate of $.50 per $100 of value of the Goods insured.  Insured value shall not exceed the actual value of the Goods. Such insurance shall be effected by insurance companies and underwriters selected by CWW and shall be governed by the certificate or policy issued in connection therewith. CWW does not warrant or represent that such insurance can or will be placed.  Should the insurer or underwriter dispute coverage or liability for any reason, Shipper shall have recourse against the insurer or underwriter only, and CWW shall not be under any responsibility or liability in relation thereto.</li><li>CWW will not be liable for loss, damage, expense or delay with respect to the Goods caused by events beyond its control (including but not limited to Acts of God, perils of the air, weather conditions, mechanical delays, acts of public enemies, war, terrorist acts or threats, strikes, civil commotions, or acts or omissions of public authorities, including custom and quarantine officials, with actual or apparent authority).</li><li>Notwithstanding any provision to the contrary, CWW does not accept for shipment (i) antiques containing glass, (ii) articles which may endanger aircraft, persons or property, (iii) china, glassware and other similar fragile articles, (iv) cigarettes, (v) coins of any type, (vi) collectable items with a value over $10,000.00, (vii) cotton, (viii) eggs, flowers, or fresh foods, (ix) grandfather clocks, (x) human remains, (xi) improperly packed/crated items, (xii) jewelry, (xiii) live animals (other than laboratory animals with preapproval), (xiv) marble, stone, granite, or limestone in any form, (xv) architectural models with value over $5,000.00, (xvi) negotiable securities, (xvii) neon signs or bulbs, (xviii) currency, precious gems, or precious metals, (xix) used items, or (xx) any material prohibited from transport by any law, regulation, or statute of any country in which the shipment may be carried. Any of the aforementioned items tendered to CWW are at Shipper’s sole risk and CWW assumes no liability for any damage thereto.</li></ol><ul><li><strong>FILING A CLAIM: </strong></li></ul><ol><li>As to all shipments, claims for loss, damage, delay or non-delivery must be made within two hundred seventy (270) days of the shipping date, or such claims shall be deemed to be waived. Original shipping carton and contents must be retained by consignee for inspection.  Acceptance of Goods by recipient without noting damage on the delivery notice shall be conclusive evidence that such Goods were delivered in good condition and without damage.<strong></strong></li><li>As to all International shipments, in no event shall CWW be liable for any act, omission or default by it in connection with an exportation or importation, unless a claim therefore shall be presented to CWW within one hundred eighty (180) days from date of exportation or importation of the Goods in a written statement to which sworn proof of claim shall be attached. <strong></strong></li><li>All claims for overcharge shall be deemed waived if not presented to CWW within 180 days of the original invoice date.  Notwithstanding the foregoing, if an account is more than 60 days past due, CWW may apply overpayments, or other credits owed to Shipper, against the oldest dated invoices.<strong></strong></li><li>All claims are to be submitted in writing by certified mail to the following physical and/or email address: Crane Worldwide Logistics, LLC, 16680 Central Green Blvd., Houston, Texas 77032, Attn: Claims Department <a href=mailto:claims@craneww.com>claims@craneww.com</a><strong></strong></li></ol><ul><li><strong>RIGHT TO INSPECT: </strong>CWW may, at its sole discretion, open and inspect your shipment at any time prior to delivery.</li><li><strong>LIENS: </strong>CWW shall have a general lien on any and all Goods and other property (and documents relating thereto) of Shipper in CWW’s possession, custody or control or en route, for all claims for charges, expenses or advances incurred by CWW in connection with any shipments of Shipper and if such claim remains unsatisfied for thirty (30) days after demand for its payment is made, CWW may sell at public auction or private sale, upon ten (10) days written notice, sent certified or registered mail with return receipt requested from Shipper, the goods, wares and/or merchandise, or so much thereof as may be necessary to satisfy such lien, and apply the net proceeds of such sale to the payment of the amount due to CWW.  Any surplus from such sale shall be transmitted to Shipper, and Shipper shall be liable for any deficiency in the sale.</li><li><strong>PROOF OF DELIVERY: </strong>CWW will endeavor to provide a copy of the signed delivery receipt as proof of delivery when requested by the Shipper, consignee, consignor, or any other third party including third party payee. CWW assumes no liability for being unable to provide a copy of the actual signed delivery receipt. Shipper agrees that digitized signature or computer record of delivery receipt is acceptable as proof of delivery of any shipment hereunder.</li><li><strong>CASH ON DELIVERY (C.O.D.) SHIPMENTS: </strong>CWW provides C.O.D. services at a fee of 5% of the C.O.D. value (plus handling) stated on the air waybill or such other amount as may be agreed upon by the parties in writing. Shipper must enter the amount of any shipper\\'s C.O.D. on CWW’s waybill, which shall be collected subject to additional fees and rules. If no declared value is listed on such waybill, the C.O.D. amount shall be deemed the declared value for carriage and the appropriate valuation charge will be applicable. C.O.D. amounts must be paid to CWW in certified funds or cashier\\'s check made out to CWW. CWW’s responsibility, described above, shall be fully satisfied when the funds are deposited for overnight delivery or when funds are sent by alternate means as specified by Shipper. CWW is not liable for the validity of the financial instrument tendered by Consignee as payment for the C.O.D. or freight charges.</li><li><strong>APPLICABLE ROUTING: </strong>CWW is authorized to select and engage carriers, truckers, forwarders, customhouse brokers, agents, warehousemen and others as may be required, to transport, store, deal with and deliver the Goods, all of whom shall be considered as agents of Shipper. The Goods may be entrusted to such parties subject to all conditions as to limitations of liability for loss, damage, expense or delay and to all rules, regulations, requirements and conditions, whether printed, written or stamped, appearing in bills of lading, receipts or tariffs issued by such carriers, truckers, forwarders, customhouse brokers, agents, warehousemen and others. Shipper hereby authorizes CWW to use any alternative mode of transport for any reason in order to attempt to meet the service level requested by Shipper. Transportation by air of this or any shipment is subject to availability of equipment and the space therein. CWW shall have the right to (i) substitute alternative carriers or other means of transportation and (ii) select the routing or deviate from that shown on the face of the waybill or requested in any other means by Shipper.</li><li><strong>RESPONSIBILITY FOR PAYMENT: </strong>CWW payment terms are Net Due upon Receipt unless otherwise stated in a separate written agreement. Payments shall be made in the applicable currency presented on CWW’s invoice. All invoices shall be paid in full, without reduction or set-off. Although Shipper may give CWW alternate payment instructions, Shipper will always be primarily responsible for all shipping and delivery costs, as well as any other costs we may incur in either returning your shipment to Shipper or storing it in a warehouse pending disposition.  Any unpaid obligation shall bear interest from the date due at the lesser of 1.5% per month or the maximum rate allowed by applicable law. Should CWW, in its sole discretion, find it necessary to employ an attorney to enforce these Terms and Conditions, CWW shall be entitled to recover all reasonable attorneys’ fees.</li><li><strong>QUALIFIED ACCEPTANCE OF SHIPMENT: </strong>CWW reserves the right to reject a shipment at any time when such shipment is from an unknown Shipper, such shipment may cause damage to or delay other shipments, equipment or personnel, if transportation of such shipment is prohibited by law or violates of any rule stated by the Transportation Security Administration, or such shipment does not comply with the terms of the CWW air waybill or CWW Terms & Conditions.</li><li><strong>SHIPPER CERTIFICATION: </strong>By tendering a shipment to CWW, Shipper certifies to CWW that it has properly classified, described, packaged, marked, and labeled the named articles and such are in proper condition for transportation according to the applicable regulations of the Transportation Security Administration.</li><li><strong>DIMENSIONAL WEIGHT: </strong>Shipment weight is calculated as the higher of actual weight or dimensional weight. Dimensional weight on Domestic USA shipments is calculated by multiplying the shipment’s length times width times height (all in inches) and dividing the product thereof by 194. Dimensional weight on all International shipments is calculated in the same way as for Domestic USA shipments, except the denominator is 166.</li><li><strong>FUEL SURCHAGE: </strong>CWW’s fuel surcharge, along with the method of calculation, is set forth at <a href=http://www.craneww.com><strong>www.craneww.com</strong></a><strong>.</strong>  The fuel surcharge and/or method of calculation are subject to change without notice. Fuel surcharge will be applied against all transportation and transportation handling related charges.</li><li><strong>LAW APPLICABLE: </strong>Except where superseded by federal or international law, these Terms and Conditions shall be governed by the laws of the state of Texas, USA, without regard to its conflicts of law provisions. The exclusive jurisdiction and venue for any litigation arising in connection with these Terms and Conditions, Goods transported hereunder or any charges related thereto shall be in the State or Federal Courts located in Harris County, Texas.</li><li><strong>MISCELLANEOUS: </strong>The failure of either party to enforce any of the rights given to it under these Terms and Conditions shall not be construed as a waiver of the right of such party to exercise any such right as to any subsequent violations of these Terms and Conditions. If any provision of these Terms and Conditions is found by a court of competent jurisdiction to be unenforceable for any reason, the remainder of these Terms and Conditions shall continue in full force and effect. These Terms and Conditions constitute the entire agreement between the parties hereto with respect to the matters set forth herein  Any change, addition, deletion or other modification to these Terms and Conditions shall be null and void unless in writing and signed by both parties hereto.</li></ul></td></tr></table></div>\");\n$templateCache.put(\"/app/core/404.html\",\"<section id=dashboard-view class=mainbar><section class=matter><div class=container><div class=row><div class=col-md-12><ul class=today-datas><li class=bred><div class=pull-left><i class=\\\"fa fa-warning\\\"></i></div><div class=\\\"datas-text pull-right\\\"><a><span class=bold>404</span></a>Page Not Found</div><div class=clearfix></div></li></ul></div></div><div class=row><div class=\\\"widget wblue\\\"><div ht-widget-header title=\\\"Page Not Found\\\" allow-collapse=true></div><div class=\\\"widget-content text-center text-info\\\"><div class=container>No soup for you!</div></div><div class=widget-foot><div class=clearfix></div></div></div></div></div></section></section>\");\n$templateCache.put(\"/app/dashboard/dashboard.html\",\"<cva-shell ng-controller=\\\"WidgetsController as widgetsCtrl\\\"><div class=shell-padding multiple-key-press=vm.keyHandler(keyEvent)><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=https://cviewclassic.craneww.com:8443/portal/dologin class=c-view-classic-iframe style=\\\"width:0;height:0;border:0; border:none\\\"></iframe><div ng-include=vm.getDashboard()></div></div></cva-shell>\");\n$templateCache.put(\"/app/dashboard/viz.html\",\"<cva-shell ng-controller=\\\"WidgetsController as widgetsCtrl\\\"><div class=shell-padding><!-- Primary View Header --><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>Visualization</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href={{vm.backLink}} class=parent-link>Track & Trace</a> / Visualization</span></div><md-card class=\\\"contact-card md-card-light\\\" ng-include=\\\"\\'/app/components/widgets/user-rep.html\\'\\\" ng-show=false></md-card></div></div><md-card><md-card-content ng-include=\\\"\\'/app/advanced-search/adv-search.html\\'\\\"></md-card-content></md-card><div layout-xs=column layout-sm=column layout-gt-sm=row layout-fill><!-- hide the html if you are loading and show the loading animation instead --><div flex-xs flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/total-shipments.html\\'\\\" ng-show=vm.showLoading></div><!-- CURRENT EXCEPTIONS --><div flex-xs flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/current-exceptions.html\\'\\\" ng-show=vm.showLoading></div><!-- POTENTIAL EXCEPTIONS --><div flex-xs flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/potential-exceptions.html\\'\\\" ng-show=vm.showLoading></div></div><div layout-xs=column layout-sm=column layout-gt-sm=row><!--SPENDING OVER TIME --><div flex-xs flex-gt-xs=33 layout=row><div flex=auto ng-include=\\\"\\'/app/dashboard/on-time/otp.html\\'\\\"></div><div flex=auto ng-include=\\\"\\'/app/components/widgets/spending-over-time.html\\'\\\"></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/kitchen-sink/kitchen-sink-toast.html\",\"<md-toast><div layout=row><md-icon class=text-success></md-icon><span flex><p>Form Has Been Submitted</p></span><md-button class=\\\"md-accent md-hue-1\\\">Undo</md-button></div></md-toast>\");\n$templateCache.put(\"/app/kitchen-sink/kitchen-sink.html\",\"<cva-shell><div id=kitchen_sink loadmask=pageLoaded loadmask-fixed-center=true loadmask-background-color=rgba(0,0,0,0) class=loadmask-dark><div class=\\\"page-loaded-{{pageLoaded}} page-loader\\\" cascade={{pageLoaded}}><div class=shell-padding id=toast-parent><md-button class=md-raised ng-click=kitchenSinkCtrl.resetPageLoad()>Reset Page Load</md-button><section id=anchor-loading-animations ng-include=\\\"\\'/app/kitchen-sink/sections/loading-animations.html\\'\\\"></section><section id=anchor-tables ng-include=\\\"\\'/app/kitchen-sink/sections/tables.html\\'\\\"></section><section id=anchor-colors ng-include=\\\"\\'/app/kitchen-sink/sections/colors.html\\'\\\"></section><section id=anchor-typography ng-include=\\\"\\'/app/kitchen-sink/sections/typography.html\\'\\\"></section><section id=anchor-icons ng-include=\\\"\\'/app/kitchen-sink/sections/icons.html\\'\\\"></section><section id=anchor-ui-widgets ng-include=\\\"\\'/app/kitchen-sink/sections/widgets.html\\'\\\"></section><section id=anchor-charts ng-include=\\\"\\'/app/kitchen-sink/sections/charts.html\\'\\\"></section><section id=anchor-forms ng-include=\\\"\\'/app/kitchen-sink/sections/forms.html\\'\\\">></section><section id=anchor-toolbars ng-include=\\\"\\'/app/kitchen-sink/sections/admin-toolbars.html\\'\\\">></section><section id=anchor-miscellaneous ng-include=\\\"\\'/app/kitchen-sink/sections/miscellaneous.html\\'\\\">></section></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/layout/Accounts_Receivables.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=C-Clear></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">Net CHB</a></span></div></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=1 flex-sm=1 flex-xs=1><!-- <iframe src=\\\"https://www.netchb.com/app/\\\" style=\\\"width:100%; height: 768px\\\"></iframe> --><!-- <iframe src=\\\"http://s1.web1.downstreamus.com/\\\" style=\\\"width:100%; height: 768px\\\"></iframe> --><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=https://cviewclassic.craneww.com:8443/portal/classic/Invoice/Accounts_Receivables class=c-view-classic-iframe style=\\\"width:100%; height: 768px\\\"></iframe></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/layout/console.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=C-Clear></h2><span class=\\\"breadcrumb flat\\\"><a href=\\\"\\\" class=\\\"parent-link ng-binding\\\">Console</a></span></div></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=1 flex-sm=1 flex-xs=1><!-- <iframe src=\\\"https://www.netchb.com/app/\\\" style=\\\"width:100%; height: 768px\\\"></iframe> --><!-- <iframe src=\\\"https://www.netchb.com/app/\\\" style=\\\"width:100%; height: 768px\\\"></iframe> --><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=http://webtracking.craneww.com:8585/hal/logon.do class=c-view-classic-iframe style=\\\"width:100%; height: 768px\\\"></iframe></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/layout/navbar.html\",\"<style>@media only screen and (max-width: 960px) {\\r\\n .alerts-btn span {\\r\\n display : none;\\r\\n }\\r\\n}\\r\\n.md-button{\\r\\n margin: 6px 6px;\\r\\n}\\r\\n@media only screen and (max-width: 568px) {\\r\\n.spotlight-icon{\\r\\n margin-bottom: 10px;\\r\\n}\\r\\n}\\r\\n@media only screen and (min-width: 768px) and (max-width: 960px){\\r\\n.spotlight-icon{\\r\\n margin-bottom: 11px;\\r\\n}\\r\\n}\\r\\n\\r\\n/*@media screen and (max-width: 1286px) and (min-width: 769px){\\r\\n .menu-icon{\\r\\n margin:4px 4px 4px 70px !important;\\r\\n }\\r\\n } */\\r\\n\\r\\n@media screen and (max-width: 768px) and (min-width: 320px){\\r\\n .menu-icon{\\r\\n margin:4px 4px 4px 70px !important;\\r\\n }\\r\\n }\\r\\n @media screen and (max-width: 400px) and (min-width: 320px){\\r\\n .menu-icon{\\r\\n margin:4px 4px 4px 70px !important;\\r\\n }\\r\\n }\\r\\n @media screen and (max-width: 368px) and (min-width: 320px){\\r\\n .menu-icon{\\r\\n margin:4px 4px 4px 70px !important;\\r\\n }\\r\\n }\\r\\n\\r\\n @media (max-width: 1279px) and (min-width: 960px){\\r\\n\\r\\n .menu-icon{\\r\\n display: block !important;\\r\\n }\\r\\n }</style><div ng-controller=\\\"UserController as userCtrl\\\"><md-toolbar class=topnav layout=row layout-align=\\\"center center\\\" style=\\\"z-index: 500 !important\\\"><md-button class=\\\"icon-button btn-menu\\\" ng-class=\\\"vm.menutogglebtn == true ? \\'menu-icon\\' : \\'\\'\\\" ng-click=vm.openLeftMenu() hide-gt-sm ng-hide=\\\"isExpanded && mobileExpanded\\\" ng-if=vm.isLoggedIn><md-icon>{{vm.isSidenavOpen ? \\'\\' : \\'\\' }}</md-icon></md-button><!-- <span ng-if=\\\"!reskin_logo && !magnointl\\\" class=\\\"navbar-logo\\\" flex-xs=\\\"auto\\\" flex-sm=\\\"auto\\\" ng-hide=\\\"isExpanded && mobileExpanded\\\"> --> <span ng-if=cranewwLogo class=navbar-logo flex-xs=auto flex-sm=auto ng-hide=\\\"isExpanded && mobileExpanded\\\"><a href=\\\"{{vm.isLoggedIn ? \\'/\\' : \\'/login\\'}}\\\"><img ng-if=\\\"!csl && !cfs && !cmts\\\" src=/assets/images/logo-crane-white.png> <img ng-if=csl src=/assets/images/logo-crane-white.png> <img ng-if=cfs src=/assets/images/logo-crane-white.png> <img ng-if=cmts src=/assets/images/logo-crane-white.png> </a></span><span ng-if=magnointl_Logo class=navbar-logo flex-xs=auto flex-sm=auto ng-hide=\\\"isExpanded && mobileExpanded\\\"><a href=\\\"{{vm.isLoggedIn ? \\'/\\' : \\'/login\\'}}\\\"><img class=magno-img src=/assets/images/logo_magno.png></a></span><div ng-if=vm.isLoggedIn ng-include=\\\"\\'/app/components/crane-search/crane-search.html\\'\\\" ng-class=\\\"{expanded: isExpanded && mobileExpanded}\\\"></div><div ng-if=vm.isLoggedIn style=\\\"padding-top: 5px\\\"><md-button class=\\\"icon-button btn-menu\\\" ng-click=vm.openLeftMenu() hide show-md><md-icon></md-icon></md-button></div><span flex=auto hide-xs hide-sm></span> <span flex=auto ng-show=!vm.isLoggedIn></span><contacts></contacts><section layout=row layout-align=right><alerts ng-hide=\\\"isExpanded && mobileExpanded\\\" ng-if=vm.isLoggedIn></alerts><md-menu md-position-mode=\\\"target-right target\\\" md-offset=\\\"0 57\\\" ng-if=vm.isLoggedIn hide-xs hide-sm hide-md ng-hide=\\\"isExpanded && mobileExpanded\\\"><md-button class=nav-user md-ink-ripple=false aria-label=\\\"Open user menu\\\" ng-click=$mdOpenMenu($event)>{{vm.getUser()}}<md-icon></md-icon></md-button><md-menu-content width=4 class=\\\"md-menu-content-light fixed-position\\\"><md-menu-item ng-show=vm.editaccountvisible><div class=\\\"md-button md-ink-ripple\\\"><div layout=row><a href=/user flex=auto><span translate=WIDGETS.EDIT_ACCOUNT></span></a></div></div></md-menu-item><md-menu-item ng-show=true ng-if=vm.isLoggedIn><div class=\\\"md-button md-ink-ripple\\\"><div layout=row><a href=# ng-click=userCtrl.getActiveSpotlights(); flex=auto><span translate=ADMIN.FEATURE.FEATURE_SPOTLIGHT></span></a></div></div></md-menu-item><md-menu-item ng-show=true ng-if=vm.isLoggedIn><div class=\\\"md-button md-ink-ripple\\\"><div layout=row><a href=# ng-click=\\\"userCtrl.sendMail(\\'cviewsupport@craneww.com\\', \\'Bugs to Submit\\')\\\" flex=auto><span translate=WIDGETS.SUBMIT_BUGS></span></a></div></div></md-menu-item><md-menu-item><div class=\\\"md-button md-ink-ripple\\\" ng-click=userCtrl.logout() md-prevent-menu-close=md-prevent-menu-close><div layout=row><span ng-hide=userCtrl.isLoadingLogOut><p flex=auto><span translate=WIDGETS.LOGOUT></span></p></span><md-progress-circular md-mode=indeterminate ng-hide=!userCtrl.isLoadingLogOut class=md-hue-1 md-diameter=40px></md-progress-circular></div></div></md-menu-item></md-menu-content></md-menu><div ng-if=\\\"vm.isLoggedIn && !userCtrl.switchEmail\\\" style=\\\"border-left: 1px solid #ccc\\\"><lensview ng-hide=\\\"isExpanded && mobileExpanded\\\"></lensview><!-- <md-button class=\\\"icon-button btn-menu\\\" ng-click=\\\"vm.showLensView()\\\" hide show-md >\\r\\n <md-icon></md-icon>\\r\\n </md-button> --></div><a href=/login ng-if=!vm.isLoggedIn><md-button class=nav-user><span translate=WIDGETS.LOGIN></span></md-button></a></section><section layout=row layout-align=right ng-if=userCtrl.switchEmail style=\\\"background:#39c;padding:9px;height:65px;margin-right: 9px; margin-right: -29px;\\r\\n margin-left: -10px\\\"><div ng-if=vm.isLoggedIn><lensview ng-hide=\\\"isExpanded && mobileExpanded\\\"></lensview></div></section></md-toolbar></div>\");\n$templateCache.put(\"/app/layout/shell.html\",\"<div ng-controller=\\\"ShellController as vm\\\" id=cva-shell layout=column><header flex=auto class=clearfix><ht-top-nav navline=vm.navline></ht-top-nav></header><section id=content class=content layout=row flex=auto><div class=md-sidenav-left hide-xs hide-sm hide-md></div><md-sidenav class=\\\"md-sidenav-left sidebar md-whiteframe-z2\\\" md-component-id=left md-is-locked-open=\\\"$mdMedia(\\'gt-md\\')\\\"><div ng-include=\\\"\\'/app/layout/sidebar.html\\'\\\"></div></md-sidenav><md-content flex ng-transclude class=shell-inner id=content-scroller></md-content></section></div>\");\n$templateCache.put(\"/app/layout/sidebar.html\",\"<!-- <script src=\\\"https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.js\\\"></script> --><style>.showSubmenuLink{\\r\\n background: #1e2339 !important;\\r\\n }\\r\\n .maninManuIcon.active{\\r\\n color: white !important;\\r\\n }\\r\\n\\r\\n .maninManuIcon{\\r\\n background: #263044 !important;\\r\\n }\\r\\n .iconcolor{\\r\\n color:#45AFE3 !important;\\r\\n }\\r\\n .md-sidenav-left md-list-item:last-child {\\r\\n border-bottom: 0px solid #252544;\\r\\n }\\r\\n\\r\\n .collapsable_icon{\\r\\n color: white !important;\\r\\n }\\r\\n\\r\\n .collapsable_exp{\\r\\n color: #45AFE3 !important;\\r\\n }\\r\\n .CviewMenuToggole {\\r\\n color: #45AFE3;\\r\\n }\\r\\n .md-subheader-inner{\\r\\n padding-top: 7px !important;\\r\\n padding-bottom: 7px !important;\\r\\n }\\r\\n .hide-link{\\r\\n pointer-events: none;\\r\\n background-image: repeating-linear-gradient(45deg, transparent 11px, transparent -2px, transparent 26px, rgba(46, 101, 103, 52.39) 28px);\\r\\n z-index: 1000 !important;\\r\\n }\\r\\n .show-link{\\r\\n pointer-events: all;\\r\\n }\\r\\n .discussion-count-sidenav{\\r\\n border-radius: 50px;\\r\\n background-color: #43a59a;\\r\\n padding: 3px 5px;\\r\\n color: #fff;\\r\\n bottom: 10px;\\r\\n position: relative;\\r\\n right: 20px;\\r\\n font-size: 10px;\\r\\n font-weight: 700;\\r\\n}\\r\\n.left-class{\\r\\n margin-left: 15px;margin-top: 0px;\\r\\n}</style><md-content ng-controller=\\\"SidebarController as sidebarCtrl\\\" style=\\\"overflow: hidden !important\\\"><div ng-if=sidebarCtrl.isLoggedIn><!-- background-color:#324c7e --><md-list ng-repeat=\\\"item in sidebarCtrl.dashboardTypes\\\" class=dashboardItemMenu style=\\\"padding: 0px 0px 0px 0px\\\"><md-list-item style=\\\"border-bottom: 1px solid #252544;height:auto\\\" ng-init=\\\"item.active=false;item.itemflag=false\\\" layout=column layout-align=\\\"center center\\\"><!-- ng-click=\\\"sidebarCtrl.showDashboardTypes(item,item.index)\\\" --> <a href={{item.url}} id=menuDisplay{{item.index}} ng-click=sidebarCtrl.toggleMenu(item,item.index) style=\\\"padding-left:15px;border-bottom: 1px solid #263044\\\" ng-attr-class=\\\"CviewMainMenu menuItems activeDashboardMenu menuItems{{$index}}\\\"><div ng-class=\\\"\\\" flex=auto style=\\\"outline: none;padding-top: 18px;font-weight: 700;text-transform: uppercase\\\">{{item.title}}</div><div><img ng-if=!item.isHighlight class=arr-toggle src=/assets/images/icon-main-nav-triangle-collapsed.svg> <img ng-if=item.isHighlight class=arr-toggle src=/assets/images/icon-main-nav-triangle-expanded.svg></div></a><md-list-item class=submenuDashboardList ng-attr-class=\\\"{{(item.isHighlight)?\\'hidden open\\':\\'hidden\\'}}\\\" id=subMenuDashboard{{item.index}} ng-attr-style=\\\"display:{{(item.isHighlight)?\\'block\\':\\'none\\'}};\\\"><md-list-item ng-repeat=\\\"subitem in item.dashboardTypesSubMenu\\\" ng-if=subitem.title style=\\\"margin-left: -17px;margin-top: 0px; border-bottom: .05px solid #252544\\\" class=dashboardSubItemMenu><md-list-item class=tooltiptextsub_Menuhover ng-class=\\\"((subitem.title == \\'Discussions\\' && sidebarCtrl.dataswitchEnable)) ? \\'hide-link\\' : \\'show-link\\'\\\"><a href={{subitem.url}} ng-attr-style=\\\"padding-left:{{subitem.paddingLeft?\\'13px;\\':\\'0px;\\'}} top: 0;width: 100%;\\\" ng-attr-class=\\\"{{(subitem.active)?\\'dashboardSubMenu active\\':\\'\\'}}\\\" ng-click=sidebarCtrl.showDashboardTypes(subitem,id);><md-icon class=md-avatar-icon ng-class=\\\"(subitem.title == \\'In-Transit\\') ? \\'sidebar-in-transit\\' : \\'\\'\\\" ng-bind-html=subitem.icon></md-icon><span ng-if=\\\"(subitem.title == \\'Discussions\\' && !sidebarCtrl.cww_discussion_count > 0 && subitem.type == \\'cww\\')\\\" style=\\\"width: 8px;height: 8px;border-radius: 5px;\\r\\n border: 1px solid #050b25;top:13px;left: 60px;background-color: #43a59a;position: absolute\\\"></span> <span ng-if=\\\"(subitem.title == \\'Discussions\\' && sidebarCtrl.cww_discussion_count > 0 && subitem.type == \\'cww\\')\\\" class=discussion-count-sidenav>{{sidebarCtrl.cww_discussion_count > 9 ? \\'9+\\' : sidebarCtrl.cww_discussion_count}}</span> <span ng-if=\\\"(subitem.title == \\'Discussions\\' && !sidebarCtrl.csl_discussion_count > 0 && subitem.type == \\'csl\\')\\\" style=\\\"width: 8px;height: 8px;border-radius: 5px;\\r\\n border: 1px solid #050b25;top:13px;left: 60px;background-color: #43a59a;position: absolute\\\"></span> <span ng-if=\\\"(subitem.title == \\'Discussions\\' && sidebarCtrl.csl_discussion_count > 0 && subitem.type == \\'csl\\')\\\" class=discussion-count-sidenav>{{sidebarCtrl.csl_discussion_count > 9 ? \\'9+\\' : sidebarCtrl.csl_discussion_count}}</span> <span ng-if=\\\"(subitem.title == \\'Discussions\\' && !sidebarCtrl.cfs_discussion_count > 0 && subitem.type == \\'cfs\\')\\\" style=\\\"width: 8px;height: 8px;border-radius: 5px;\\r\\n border: 1px solid #050b25;top:13px;left: 60px;background-color: #43a59a;position: absolute\\\"></span> <span ng-if=\\\"(subitem.title == \\'Discussions\\' && sidebarCtrl.cfs_discussion_count > 0 && subitem.type == \\'cfs\\')\\\" class=discussion-count-sidenav>{{sidebarCtrl.cfs_discussion_count > 9 ? \\'9+\\' : sidebarCtrl.cfs_discussion_count}}</span> <span ng-if=\\\"(subitem.title == \\'Discussions\\' && !sidebarCtrl.cmts_discussion_count > 0 && subitem.type == \\'cmts\\')\\\" style=\\\"width: 8px;height: 8px;border-radius: 5px;\\r\\n border: 1px solid #050b25;top:13px;left: 60px;background-color: #43a59a;position: absolute\\\"></span> <span ng-if=\\\"(subitem.title == \\'Discussions\\' && sidebarCtrl.cmts_discussion_count > 0 && subitem.type == \\'cmts\\')\\\" class=discussion-count-sidenav>{{sidebarCtrl.cmts_discussion_count > 9 ? \\'9+\\' : sidebarCtrl.cmts_discussion_count}}</span> <span ng-class=\\\"\\\" flex=auto style=\\\"width: calc(100% - 95px);overflow: hidden;text-overflow: ellipsis;display: inline-block;font-weight: 700;font-size: 14px;text-transform: capitalize\\\">{{subitem.title}}</span></a></md-list-item></md-list-item></md-list-item></md-list-item></md-list><md-list><md-list-item ng-if=sidebarCtrl.menuItems.length ng-repeat=\\\"item in sidebarCtrl.menuItems\\\"><md-list-item class=tooltiptextsub_Menuhover ng-class=\\\"((item.title == \\'Discussions\\' || item.title == \\'In-Transit\\' ||\\r\\n item.title == \\'Booking\\')) ? \\'left-class\\' : \\'\\'\\\"><a href={{item.url}} ng-if=!sidebarCtrl.isKitchenSink ng-class=\\\"{active: item.active}\\\" ng-click=sidebarCtrl.showSubmenuLink(item); ng-class=\\\"{showSubmenuLink:sidebarCtrl.showSubmenuLinkval==item.url}\\\" title={{item.title}}><md-icon class=md-avatar-icon ng-class=\\\"(item.title == \\'In-Transit\\') ? \\'sidebar-in-transit\\' : \\'\\'\\\" ng-bind-html=item.icon></md-icon><span ng-if=\\\"(item.title == \\'Discussions\\' && !sidebarCtrl.cww_discussion_count > 0 && item.type == \\'cww\\')\\\" style=\\\"width: 8px;height: 8px;border-radius: 5px;\\r\\n border: 1px solid #050b25;top:13px;left: 48px;background-color: #43a59a;position: absolute\\\"></span> <span ng-if=\\\"(item.title == \\'Discussions\\' && sidebarCtrl.cww_discussion_count > 0 && item.type == \\'cww\\')\\\" class=discussion-count-sidenav>{{sidebarCtrl.cww_discussion_count > 9 ? \\'9+\\' : sidebarCtrl.cww_discussion_count}}</span> <span ng-if=\\\"(item.title == \\'Discussions\\' && !sidebarCtrl.csl_discussion_count > 0 && item.type == \\'csl\\')\\\" style=\\\"width: 8px;height: 8px;border-radius: 5px;\\r\\n border: 1px solid #050b25;top:13px;left: 48px;background-color: #43a59a;position: absolute\\\"></span> <span ng-if=\\\"(item.title == \\'Discussions\\' && sidebarCtrl.csl_discussion_count > 0 && item.type == \\'csl\\')\\\" class=discussion-count-sidenav>{{sidebarCtrl.csl_discussion_count > 9 ? \\'9+\\' : sidebarCtrl.csl_discussion_count}}</span> <span ng-if=\\\"(item.title == \\'Discussions\\' && !sidebarCtrl.cfs_discussion_count > 0 && item.type == \\'cfs\\')\\\" style=\\\"width: 8px;height: 8px;border-radius: 5px;\\r\\n border: 1px solid #050b25;top:13px;left: 48px;background-color: #43a59a;position: absolute\\\"></span> <span ng-if=\\\"(item.title == \\'Discussions\\' && sidebarCtrl.cfs_discussion_count > 0 && item.type == \\'cfs\\')\\\" class=discussion-count-sidenav>{{sidebarCtrl.cfs_discussion_count > 9 ? \\'9+\\' : sidebarCtrl.cfs_discussion_count}}</span> <span ng-if=\\\"(item.title == \\'Discussions\\' && !sidebarCtrl.cmts_discussion_count > 0 && item.type == \\'cmts\\')\\\" style=\\\"width: 8px;height: 8px;border-radius: 5px;\\r\\n border: 1px solid #050b25;top:13px;left: 48px;background-color: #43a59a;position: absolute\\\"></span> <span ng-if=\\\"(item.title == \\'Discussions\\' && sidebarCtrl.cmts_discussion_count > 0 && item.type == \\'cmts\\')\\\" class=discussion-count-sidenav>{{sidebarCtrl.cmts_discussion_count > 9 ? \\'9+\\' : sidebarCtrl.cmts_discussion_count}}</span> <span flex=auto>{{item.title}}</span> </a><a ng-if=sidebarCtrl.isKitchenSink ng-click=sidebarCtrl.gotoAnchor(item.url)><md-icon class=md-avatar-icon ng-bind-html=item.icon></md-icon><span flex=auto>{{item.title}}</span></a></md-list-item></md-list-item></md-list><hr style=\\\"-webkit-margin-after: 0.0em; color:white; -webkit-margin-before: 0.0em\\\" ng-if=\\\"sidebarCtrl.CviewMenuItems.length==0\\\"><div ng-if=\\\"sidebarCtrl.CviewMenuItems.length>0\\\"><hr style=\\\"-webkit-margin-after: 0.0em; -webkit-margin-before: 0.0em; color:white;margin:0px\\\"><md-list style=\\\"padding-top: 0px\\\" class=CviewHeaderhoverColor ng-class={CviewHeaderColor:sidebarCtrl.CviewMenuToggoleItems}><md-subheader style=\\\"padding: 10px;margin-bottom: -9px\\\"><md-icon class=\\\"material-icons Cview-submenu\\\" style=\\\"outline: none; font-size: 24px; cursor: pointer; margin: -2px 4px 0px -8px\\\" ng-class={CviewMenuToggole:sidebarCtrl.CviewMenuToggoleItems} ng-click=sidebarCtrl.CviewMenuToggole();></md-icon><span hide-sm hide-xs style=\\\"cursor: pointer;outline: none\\\" class=Cview-submenu ng-click=sidebarCtrl.CviewMenuToggole();>Pathway</span> <span hide-lg hide-md hide-gt-md><span class=Cview-submenu style=\\\"vertical-align: middle; margin-left: 9px;width: calc(100% - 95px);overflow: hidden;outline: none;text-overflow: ellipsis;display: inline-block; margin-top: 13px; margin-top: 1px;font-weight: 100; font-size: .80em\\\" ng-click=sidebarCtrl.CviewMenuToggole() hide-lg hide-md hide-gt-md>Pathway</span> </span><!-- <span hide-sm hide-xs>C-View Classic</span> --><div class=tooltipcview style=\\\"padding-bottom: .1rem\\\"><md-icon class=Cview-submenu style=\\\"margin-left: 35px; position: relative; margin-top: 0px; font-size:20px; cursor: pointer\\\" hide-sm hide-xs></md-icon><md-icon class=md-avatar-icon style=\\\"margin-left: 50px;padding-top: -25px;position: relative; margin-top: 3px; outline: none\\\" ng-click=\\\"sidebarCtrl.cviewpopup(sidebarCtrl.cviewModal=true)\\\" hide-lg hide-md hide-gt-md></md-icon><span class=tooltiptext hide-sm hide-xs>{{sidebarCtrl.cviewpopupmsg}}</span></div></md-subheader></md-list><hr style=\\\"-webkit-margin-after: 0.0em;-webkit-margin-before: 0.0em; color:white;margin:0px\\\"><md-list ng-if=sidebarCtrl.CviewMenuToggoleItems ng-repeat=\\\"item in sidebarCtrl.CviewMenuItems\\\" style=\\\"padding: 0px 0px 0px 0px;border-bottom: 1px solid #263044\\\"><md-list-item ng-init=\\\"item.active=false;item.itemflag=false\\\"><a ng-click=sidebarCtrl.CviewSubmenuToggole(item,item.index) ng-mouseover=sidebarCtrl.iconhover(item,true); ng-mouseleave=sidebarCtrl.iconhover(item,false); id=menuDisplay{{item.index}} class=CviewMainMenu style=\\\"position: absolute;top: 0;border-bottom: .05px solid #252544\\\" ng-class=\\\"{maninManuIcon: item.itemflag}\\\"><md-icon class=\\\"ng-scope material-icons\\\" style=\\\"outline: none;margin-top: 5px\\\"><span id=iconDisplay{{item.index}} style=\\\"position: absolute;outline: none;padding-top: 12px;color:#3c3434\\\" ng-class=\\\"{active: item.active, collapsable_exp:item.itemflag, collapsable_icon:item.active}\\\">expand_more</span></md-icon><span ng-class=\\\"{active: item.active}\\\" flex=auto style=\\\"position: absolute; outline: none;padding-top: 20px;font-weight: 700;font-size: 11px;margin-left: 4px\\\">{{item.title}}</span></a><md-list-item class=submenuList id=subMenuList{{item.index}} ng-class=\\\"{active: item.active}\\\" style=\\\"margin-left: 18px;margin-top:35px; padding: 15px 0px 0px 0px;display:none\\\" ng-class=\\\"{active: item.active}\\\"><md-list-item ng-repeat=\\\"subitem in item.CviewMenuItemsSubMenu\\\" style=\\\"margin-left: -17px;margin-top: 0px; border-bottom: .05px solid #252544\\\" ng-class=\\\"{active: item.active}\\\"><md-list-item ng-class=\\\"{active: item.active}\\\" class=tooltiptextsub_Menuhover><a href={{subitem.url}} style=\\\"top: 0;width: 100%\\\" class=CviewMainMenu ng-mouseover=sidebarCtrl.iconhover(subitem,true); ng-mouseleave=sidebarCtrl.iconhover(subitem,false); ng-click=sidebarCtrl.showSubmenuLink(subitem,id); ng-class=\\\"{showSubmenuLink:sidebarCtrl.showSubmenuLinkval==subitem.url}\\\" hide-sm hide-xs><span ng-class=\\\"{active: subitem.active}\\\" flex=auto style=\\\"vertical-align: middle; margin-left: 46px;width: calc(100% - 95px);overflow: hidden;text-overflow: ellipsis;display: inline-block; margin-top: 20px; font-weight: 500; font-size: 11px\\\">{{subitem.title}} </span><span ng-class=\\\"{active: subitem.active}\\\" class=tooltipsubmenu flex=auto style=\\\"vertical-align: middle;width: 46px\\\"><md-icon class=tooltiptextsub_Menuhover ng-class=\\\"{active: subitem.active, active:sidebarCtrl.showSubmenuLinkval==subitem.url}\\\" style=\\\"margin-top: 3px; font-size: 16px;margin-left: 0px; margin-top: 20px\\\"></md-icon><span class=tooltiptextsubmenu ng-show=sidebarCtrl.hovering style=\\\"font-weight: 100;\\r\\n font-size: 13px\\\"><span style=\\\"word-wrap: break-word\\\">{{sidebarCtrl.cviewSubMenupmsg}}</span> </span></span></a><!-- cview mobile view --> <a href={{subitem.url}} style=\\\"top: 0;width: 100%\\\" class=CviewMainMenu ng-mouseover=sidebarCtrl.iconhover(subitem,true); ng-mouseleave=sidebarCtrl.iconhover(subitem,false); ng-click=sidebarCtrl.submenuLink(subitem.url) ng-class=\\\"{showSubmenuLink:sidebarCtrl.showSubmenuLinkval==subitem.url}\\\" hide-lg hide-md hide-gt-md><span ng-class=\\\"{active: subitem.active}\\\" flex=auto style=\\\"vertical-align: middle; margin-left: 46px;width: calc(100% - 95px);overflow: hidden;text-overflow: ellipsis;display: inline-block; margin-top: 13px;font-weight: 500; font-size: 11px\\\">{{subitem.title}} </span><span ng-class=\\\"{active: subitem.active}\\\" class=tooltipsubmenu flex=auto style=\\\"vertical-align: middle;\\r\\n width: 46px\\\"><md-icon class=tooltiptextsub_Menuhover ng-class=\\\"{active: subitem.active, active:sidebarCtrl.showSubmenuLinkval==subitem.url}\\\" style=\\\"margin-top: 3px; font-size: 16px; margin-top: 15px\\\"></md-icon></span></a></md-list-item></md-list-item></md-list-item></md-list-item></md-list></div><!-- <md-list hide-lg>\\r\\n <md-subheader style=\\\"word-wrap: break-word;\\\" class=\\\"md-no-sticky\\\">{{sidebarCtrl.getUser()}}</md-subheader> --><!--end C-view classic changes --><!-- <hr ng-if=\\\"sidebarCtrl.adminMenuItems.length > 0\\\"> --><div ng-if=\\\"sidebarCtrl.adminMenuItems.length > 0\\\" ng-init=\\\"sidebarCtrl.activeFlage = 0\\\"><md-list><md-subheader class=md-no-sticky><span class=Cview-submenu translate=WIDGETS.ADMIN></span></md-subheader><md-list-item ng-repeat=\\\"item in sidebarCtrl.adminMenuItems\\\"><a href={{item.url}} ng-class=\\\"{active: item.active}\\\" ng-if=!sidebarCtrl.isKitchenSink ng-click=sidebarCtrl.showSubmenuLink(item); ng-class=\\\"{showSubmenuLink:sidebarCtrl.showSubmenuLinkval==item.url}\\\" ng-class=\\\"{active: item.active}\\\" title={{item.title}}><md-icon class=md-avatar-icon ng-bind-html=item.icon></md-icon><span flex=auto class=admin-submenu translate={{item.title}}></span> </a><a ng-if=sidebarCtrl.isKitchenSink ng-click=sidebarCtrl.gotoAnchor(item.url)><md-icon class=md-avatar-icon ng-bind-html=item.icon></md-icon><span flex=auto class=admin-submenu>{{item.title}}</span></a></md-list-item><!-- <md-list-item ng-if=\\\"sidebarCtrl.user.permissions[\\'LensGroup\\'][0] ==\\'manage\\' \\\">\\r\\n\\r\\n <a href=\\\"/lensgroups\\\">\\r\\n <md-icon class=\\\"md-avatar-icon\\\" ></md-icon>\\r\\n <span flex=\\\"auto\\\">Lens Groups</span>\\r\\n </a>\\r\\n </md-list-item> --><!-- <md-list-item ng-click=\\\"sidebarCtrl.activeFlage = 1\\\" >\\r\\n <a href=\\\"/c2c\\\" ng-class=\\\"{active: (sidebarCtrl.activeFlage == 1)}\\\">\\r\\n <md-icon class=\\\"md-avatar-icon\\\" ></md-icon>\\r\\n <span flex=\\\"auto\\\" translate=\\\"C2C\\\"></span>\\r\\n </a>\\r\\n\\r\\n </md-list-item> --><!-- <md-list-item ng-click=\\\"sidebarCtrl.activeFlage = 2\\\">\\r\\n <a href=\\\"/cviewinvoive\\\" ng-class=\\\"{active: (sidebarCtrl.activeFlage == 2)}\\\">\\r\\n <md-icon class=\\\"md-avatar-icon\\\" ></md-icon>\\r\\n <span flex=\\\"auto\\\" translate=\\\" C-View Invoices\\\"></span>\\r\\n </a>\\r\\n\\r\\n\\r\\n </md-list-item> --></md-list></div><hr hide-lg ng-if=\\\"sidebarCtrl.adminMenuItems.length>0\\\"><md-list hide-lg><md-subheader style=\\\"word-wrap: break-word\\\" class=md-no-sticky>{{sidebarCtrl.getUser()}}</md-subheader><md-list-item ng-controller=\\\"UserController as userCtrl\\\" hide-md hide-lg hide-gt-md><a href=# aria-label=\\\"submit bugs\\\" ng-click=\\\"userCtrl.sendMail(\\'cviewsupport@craneww.com\\', \\'Bugs to Submit\\')\\\"><md-icon class=md-avatar-icon aria-label=\\\"submit bugs\\\"></md-icon><span translate=WIDGETS.SUBMIT_BUGS></span></a></md-list-item><!-- <md-list-item>\\r\\n test\\r\\n <a\\r\\n href=\\\"/user\\\" ng-click=\\\"sidebarCtrl.showSubmenuLink(\\'/user\\');\\\"\\r\\n ng-class=\\\"{showSubmenuLink:sidebarCtrl.showSubmenuLinkval==/user}\\\">\\r\\n <md-icon class=\\\"md-avatar-icon\\\"></md-icon>\\r\\n <span flex=\\\"auto\\\" translate=\\\"WIDGETS.EDIT_ACCOUNT\\\"></span>\\r\\n\\r\\n </a>\\r\\n </md-list-item> --><md-list-item><a href=/user ng-click=\\\"sidebarCtrl.showSubmenuLink(\\'/user\\');\\\"><md-icon class=md-avatar-icon></md-icon><span flex=auto translate=WIDGETS.EDIT_ACCOUNT></span></a></md-list-item><md-list-item ng-controller=\\\"UserController as userCtrl\\\"><a href=# ng-click=userCtrl.logout()><md-icon ng-hide=userCtrl.isLoadingLogOut class=md-avatar-icon></md-icon><md-icon class=md-avatar-icon ng-show=userCtrl.isLoadingLogOut><md-progress-circular md-mode=indeterminate class=md-hue-1 md-diameter=30px></md-progress-circular></md-icon><span flex=auto ng-hide=userCtrl.isLoadingLogOut translate=WIDGETS.LOGOUT></span> <span flex=auto ng-show=userCtrl.isLoadingLogOut translate=WIDGETS.LOGGING_OUT></span></a></md-list-item></md-list></div></md-content>\");\n$templateCache.put(\"/app/shipping-details/shipping-details.html\",\"<style type=text/css>.discussion-box{\\r\\n height: 85px;\\r\\n margin-right: 25px;\\r\\n border: 1px solid #43a59a;\\r\\n background: #43a59a;\\r\\n border-radius: 5px;\\r\\n min-width: 90px;\\r\\n max-width: 90px;\\r\\n position: relative;\\r\\n cursor: pointer;\\r\\n }\\r\\n\\r\\n.box-count {\\r\\n border-radius: 25px;\\r\\n background-color: #43a59a;\\r\\n padding: 5px 7px;\\r\\n color: #fff;\\r\\n bottom: 50px;\\r\\n position: relative;\\r\\n right: -25px;\\r\\n font-size: 10px;\\r\\n border: 1px solid #333;\\r\\n font-weight: 700;\\r\\n}\\r\\n\\r\\n.box-count-less {\\r\\n border-radius: 25px;\\r\\n background-color: #43a59a;\\r\\n padding: 5px 9px;\\r\\n color: #fff;\\r\\n bottom: 50px;\\r\\n position: relative;\\r\\n right: -25px;\\r\\n font-size: 10px;\\r\\n border: 1px solid #333;\\r\\n font-weight: 700;\\r\\n}\\r\\n\\r\\n.discussion-text{\\r\\n font-size: 11px;\\r\\n font-weight: 600;\\r\\n position: relative;\\r\\n bottom: 18px;\\r\\n left: 12px;\\r\\n}\\r\\n.margin-btm-10px{\\r\\n margin-bottom: 10px;\\r\\n}</style><cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 translate=SHIPPINGDETAILS.SHIPPING_DETAILS></span><br><!-- <span class=\\\"breadcrumbs md-subhead\\\" ng-include=\\\"\\'/app/components/breadcrumbs/breadcrumbs.html\\'\\\"></span> --></span></h2></div><span ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\"><div class=discussion-box ng-if=vm.discussion_visibility><span ng-click=vm.markRead(); href=#reference-area du-smooth-scroll offset=80 duration=700><div style=\\\"padding: 20px 24px 0px 24px\\\"><i style=\\\"color:#FFFFFF;font-size: 35px\\\" class=material-icons>chat</i> <span ng-attr-style=\\\"visibility:{{(vm.unseen_discussion_count > 0)?\\'\\':\\'hidden\\'}}\\\" ng-class=\\\"((vm.unseen_discussion_count <= 9)) ? \\'box-count-less\\' : \\'box-count\\'\\\">{{vm.unseen_discussion_count > 9 ? \\'9+\\' : vm.unseen_discussion_count}}</span></div><div class=discussion-text>DISCUSSION</div></span></div></span></div></div><!-- Details Header --><md-card class=m-b><md-card-content><div layout-gt-xs=row layout-xs=column><div flex-gt-xs=50 flex-xs=100 class=m-b-xs><div layout-gt-xs=row ng-show=\\\"vm.data.isdelivered != \\'true\\'\\\"><div class=shiment-top-left flex-gt-sm=65 flex-xs=100><md-icon></md-icon><span class=text-upper translate=SHIPPINGDETAILS.ESTIMATED_DELIVERY></span></div><div flex-gt-sm=35 class=\\\"hide-xs shipment-day-remaining\\\" ng-if=\\\"vm.data.duedatenew >= vm.data.currentDate\\\">{{vm.data.daysRemainingNew}} {{(vm.data.daysRemainingNew > 1 || vm.data.daysRemainingNew == 0)? (\\'SHIPPINGDETAILS.SHIPMENT_DAYS\\' | translate ) : (\\'SHIPPINGDETAILS.SHIPMENT_DAY\\' | translate )}} {{\\'SHIPPINGDETAILS.SHIPMENT_REMAINING\\' | translate }}</div><div flex-gt-sm=35 class=\\\"hide-xs shipment-day-remaining\\\" ng-if=\\\"vm.data.duedatenew < vm.data.currentDate\\\">{{ (\\'SHIPPINGDETAILS.DUE_IMMEDIATELY\\' | translate ) }}</div></div><div layout-gt-xs=row ng-show=\\\"vm.data.isdelivered == \\'true\\'\\\"><div class=shiment-top-left flex-gt-sm=65 flex-xs=100><md-icon></md-icon><span class=text-upper translate=SHIPPINGDETAILS.SHIPMENT_DELIVERED></span></div></div><div layout-gt-xs=row><div flex-gt-sm=100 flex-xs=100 class=shipment-main-caption>{{vm.data.shipment_display_date | date:\\'EEE - MMM d, y\\'}}</div><div flex-xs=100 class=\\\"hide-gt-xs shipment-day-remaining\\\" ng-if=\\\"vm.data.duedatenew >= vm.data.currentDate\\\">{{vm.data.daysRemainingNew}} {{(vm.data.daysRemainingNew > 1 || vm.data.daysRemainingNew == 0)? (\\'SHIPPINGDETAILS.SHIPMENT_DAYS\\' | translate ) : (\\'SHIPPINGDETAILS.SHIPMENT_DAY\\' | translate )}} {{\\'SHIPPINGDETAILS.SHIPMENT_REMAINING\\' | translate }}</div><div flex-xs=100 class=\\\"hide-gt-xs shipment-day-remaining\\\" ng-if=\\\"vm.data.duedatenew < vm.data.currentDate\\\">{{ (\\'SHIPPINGDETAILS.DUE_IMMEDIATELY\\' | translate ) }}</div></div><div class=bookmark-toolbar ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\"><md-button class=\\\"btn-outline btn-icon-l\\\" ng-click=\\\"vm.bookmarkShipment(\\'normal\\')\\\" ng-disabled=vm.isBookmarking><span class=\\\"fade {{vm.isBookmarking ? \\'fade-out\\' : \\'\\'}}\\\">{{vm.bookmarkButtonText | translate}}<md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarked}\\\"></md-icon></span><md-progress-circular md-mode=indeterminate ng-show=vm.isBookmarking class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><md-button class=\\\"btn-outline btn-gray\\\" ng-click=\\\"vm.showModal(ev, \\'bookmark/bookmarks-list\\')\\\"><span translate=SHIPPINGDETAILS.VIEW_BOOKMARKS></span></md-button><md-button style=\\\"margin-top: 5px\\\" class=\\\"btn-outline btn-icon-l\\\" ng-click=\\\"vm.bookmarkShipmentDiscussion(\\'discussion\\')\\\" ng-disabled=vm.isBookmarkingDiscussion ng-if=vm.discussion_visibility><span class=\\\"fade {{vm.isBookmarkingDiscussion ? \\'fade-out\\' : \\'\\'}}\\\">{{vm.bookmarkButtonTextDiscussion | translate}}<md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarkedDiscussion}\\\"></md-icon></span><md-progress-circular md-mode=indeterminate ng-show=vm.isBookmarkingDiscussion class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div></div><div flex-gt-xs=50 flex-xs=100 class=m-b-xs><div layout-gt-xs=row hide-xs><div flex-gt-sm=100 flex-xs=100><div><a ng-click=vm.gotoMilestome() class=\\\"shipment-view-milestone text-upper\\\" translate=SHIPPINGDETAILS.VIEWALLMILESTONE style=\\\"height: 30px; float: right; cursor: pointer\\\"></a></div></div></div><div layout-gt-xs=row><div flex-gt-sm=50 flex-xs=100 style=\\\"z-index: 55\\\"><div layout-gt-xs=row><div flex-gt-sm=80 flex-xs=100 ng-show=\\\"vm.data.lastmilestone && vm.data.nextmilestone\\\"><div class=\\\"shipment-lastmilestone-box shipment-lastmilestone-box1\\\"><div class=\\\"shipment-lst-mile-txt uppercase\\\">Last Milestone</div><div class=shipment-lst-mile-name ng-style=\\\"vm.data.lastmilestone.reasoncode ? {\\'color\\': \\'red\\'} : \\'\\'\\\" title={{vm.data.lastmilestone.milestonedescription}}>{{vm.data.lastmilestone.milestonedescription}}</div><div style=\\\"font-size: 13px\\\">{{(vm.data.lastmilestone.actualdate != nil) ? (vm.convertDate(vm.data.lastmilestone.actualdate) | date:\\'dd-MMM-yyyy\\') : (vm.convertDate(vm.data.lastmilestone.estimateddate) | date:\\'dd-MMM-yyyy\\')}}</div></div></div><div flex-gt-sm=20 class=hide-xs><div flex-xs=20 ng-show=\\\"vm.data.lastmilestone && vm.data.nextmilestone\\\" class=shipment-lastmilestone-arrow></div></div></div></div><div flex-gt-sm=50 flex-xs=100 style=\\\"z-index: 55\\\" ng-show=\\\"vm.data.lastmilestone && !vm.data.nextmilestone\\\"><div layout-gt-xs=row><div flex-gt-sm=80 flex-xs=100><div class=\\\"shipment-lastmilestone-box shipment-lastmilestone-box2\\\"><div class=\\\"uppercase shipment-lst-mile-txt\\\">Last Milestone</div><div class=shipment-lst-mile-name ng-style=\\\"vm.data.lastmilestone.reasoncode ? {\\'color\\': \\'red\\'} : \\'\\'\\\" title={{vm.data.lastmilestone.milestonedescription}}>{{vm.data.lastmilestone.milestonedescription}}</div><div style=\\\"font-size: 13px\\\" ng-style=\\\"{\\'color\\' : !vm.data.nextmilestone ? \\' #126b28\\' : \\'\\' }\\\">{{(vm.data.lastmilestone.actualdate != nil) ? (vm.convertDate(vm.data.lastmilestone.actualdate) | date:\\'dd-MMM-yyyy\\') : (vm.convertDate(vm.data.lastmilestone.estimateddate) | date:\\'dd-MMM-yyyy\\')}}</div></div></div><div flex-gt-sm=20 class=hide-xs><div class=shipment-lastmilestone-arrow2></div></div></div></div><div flex-gt-sm=50 flex-xs=100 style=\\\"z-index: 50;margin-left: -10px\\\" ng-show=vm.data.nextmilestone><div layout-gt-xs=row><div flex-gt-sm=80 flex-xs=100><div class=\\\"shipment-nextmilestone-box shipment-nextmilestone-box1\\\"><div class=\\\"uppercase shipment-nxt-mile-txt\\\">Next Milestone</div><div class=shipment-lst-mile-name ng-style=\\\"vm.data.nextmilestone.reasoncode ? {\\'color\\': \\'red\\'} : \\'\\'\\\" title={{vm.data.nextmilestone.milestonedescription}}>{{vm.data.nextmilestone.milestonedescription}}</div><div style=\\\"color: #908b92;font-size: 13px\\\">{{vm.convertDate(vm.data.nextmilestone.estimateddate) | date:\\'dd-MMM-yyyy\\'}}</div></div></div><div flex-gt-sm=20 class=hide-xs><div class=shipment-nextmilestone-arrow1 style=\\\"margin-left: 30px\\\"></div><div class=shipment-nextmilestone-arrow2 style=\\\"margin-left: 29px\\\"></div></div></div></div></div><div class=hide-gt-xs class=m-b><div flex-xs=100><div ng-click=vm.gotoMilestome() class=\\\"shipment-view-milestone text-upper\\\" translate=SHIPPINGDETAILS.VIEWALLMILESTONE></div></div></div></div></div><span layout=row style=\\\"margin-bottom: 10px\\\"><hr flex=auto></span><div layout-gt-xs=row layout-xs=column><div flex-gt-xs=50 flex-xs=100 class=\\\"m-b-xs shipping-origin-dest-top\\\"><div flex=85 ng-if=vm.data.under_exception class=exceptions><div class=\\\"current notice\\\" ng-repeat=\\\"exception in vm.data.exceptions\\\"><div layout=row layout-align=\\\"start center\\\" style=\\\"font-weight: 600;color: #FDEEEC\\\"><md-icon></md-icon><div flex=auto class=uppercase><span style=\\\"font-size: 15px\\\" translate=SHIPPINGDETAILS.EXCEPTION></span> : {{ exception.description }}</div><div style=\\\"float: right\\\">{{vm.convertDate(exception.estimateddate) | date:\\'dd-MMM-yyyy\\'}}</div></div></div><div class=\\\"potential notice\\\" ng-repeat=\\\"exception in vm.data.potential_exceptions\\\"><div layout=row layout-align=\\\"start center\\\" style=\\\"font-weight: 600;color: #FDEEEC\\\"><span><md-icon></md-icon></span><div class=uppercase><span style=\\\"font-size: 15px\\\" translate=SHIPPINGDETAILS.POTENTIAL_EXCEPTION></span> : {{ exception.title }}</div><div style=\\\"float: right\\\">{{vm.convertDate(exception.estimateddate) | date:\\'dd-MMM-yyyy\\'}}</div></div></div></div><div flex-gt-sm=85 flex-xs=100 layout-gt-xs=row class=\\\"m-b shipment-origin-dest\\\"><div flex-gt-sm=65 flex-xs=100><div style=\\\"float: left\\\"><md-icon class=shipment-origin-dest-icons></md-icon></div><div class=shipment-origin-dest-content><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span translate=SHIPPINGDETAILS.ORIGIN></span></h4><span style=font-weight:bold>{{vm.data.origin != null && vm.data.origincountrycode != null ? (vm.data.origin + \\\", \\\" + vm.data.origincountrycode) : \\\"-\\\"}}</span></div><div class=shipment-origin-dest-content><h4 class=\\\"text-upper text-light m-b-xs m-t-1\\\"><span>Port of Export</span></h4><span>{{vm.data.polname != null && vm.data.origincountrycode != null ? (vm.data.polname + \\\", \\\" + vm.data.origincountrycode) : \\'-\\'}}</span></div></div><!-- <br show-xs show-sm> --><div flex-gt-sm=30 flex-xs=100 class=shpping-origin-dest-date-content><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span>Start date</span></h4><span class=shipment-date-txt>{{vm.data.shipdate | date:\\'dd-MMM-yyyy\\' : \\'UTC\\'}}</span><h4 class=\\\"text-upper text-light m-b-xs m-t-1\\\"><span>POL/ETD date</span></h4><span class=shipment-date-txt>{{vm.data.poletd | date:\\'dd-MMM-yyyy\\' : \\'UTC\\'}}</span></div></div><div flex-gt-sm=85 flex-xs=100 layout-gt-xs=row class=\\\"m-b shipment-origin-dest\\\"><div flex-gt-sm=65 flex-xs=100><div class=shipment-origin-dest-content><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span>Port of Destination</span></h4><span>{{vm.data.podname != null && vm.data.destinationcountrycode != null ? (vm.data.podname + \\\", \\\" + vm.data.destinationcountrycode) : \\'-\\'}}</span></div><div style=\\\"float: left\\\"><md-icon style=\\\"margin-top: 20px\\\" class=shipment-origin-dest-icons></md-icon></div><div class=shipment-origin-dest-content><h4 class=\\\"text-upper text-light m-b-xs m-t-1\\\"><span translate=SHIPPINGDETAILS.DESTINATION></span></h4><span style=font-weight:bold>{{vm.data.destination != null && vm.data.destinationcountrycode != null ? (vm.data.destination + \\\", \\\" + vm.data.destinationcountrycode) : \\\"-\\\"}}</span></div></div><!-- <br show-xs show-sm> --><div flex-gt-sm=30 flex-xs=100 class=shpping-origin-dest-date-content><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span>POD/ETA date</span></h4><span class=shipment-date-txt>{{vm.data.podeta | date:\\'dd-MMM-yyyy\\' : \\'UTC\\'}}</span><h4 class=\\\"text-upper text-light m-b-xs m-t-1\\\"><span>Due date</span></h4><span class=shipment-date-txt>{{vm.data.duedate | date:\\'dd-MMM-yyyy\\' : \\'UTC\\'}}</span></div></div><div class=m-b><span class=\\\"outline-group outline-group-sm m-b\\\"><span class=\\\"item text-upper\\\"><span translate=\\\"SHIPPINGDETAILS.TRANSPORT_MODE \\\" class=shipment-transport-mode></span> </span><span class=\\\"item item-bg\\\" style=\\\"background: transparent\\\"><span ng-if=\\\"(vm.data.derivedbusinesstype === \\'AIR\\')\\\"><md-icon aria-label=air-shipment class=shipment-transport-icon></md-icon></span><span ng-if=\\\"(vm.data.derivedbusinesstype === \\'SEA\\')\\\"><md-icon aria-label=sea-shipment class=shipment-transport-icon></md-icon></span><span ng-if=\\\"(vm.data.derivedbusinesstype === \\'GROUND\\')\\\"><md-icon aria-label=ground-shipment class=shipment-transport-icon></md-icon></span></span></span></div><!-- <div flex-gt-xs=\\\"85\\\">\\r\\n <md-progress-linear class=\\\"custom-bar\\\" md-mode=\\\"determinate\\\" value=\\\"{{vm.barPercentage}}\\\"></md-progress-linear>\\r\\n </br>\\r\\n <div layout=\\\"row\\\" layout-align=\\\"end end\\\" class=\\\"m-t-sm\\\">\\r\\n <span>{{vm.progressStatus}}</span>\\r\\n </div>\\r\\n </div> --></div><!-- Include the map --><!--<div ng-controller=\\\"SDMapController\\\" flex-gt-xs=\\\"50\\\" flex-xs=\\\"100\\\" >\\r\\n <div ng-include=\\\"\\'/app/components/widgets/lane-pairs-map.html\\'\\\" class=\\\"shipping-details-map\\\" style=\\\"margin-top: -40px; \\\"></div>\\r\\n </div>--><div class=shipping-details-map flex-gt-xs=50 flex-xs=100><shipping-details-map land=land boundary=boundary data=vm.pins arcs=vm.topLanePairs settings=vm.settings></shipping-details-map></div></div><div layout-gt-xs=row class=shipment-customer-info-box><div flex=50 flex-xs=100><p><span class=\\\"text-sub text-upper\\\"><span translate=Customer></span></span><br><span class=shipment-invoice-det-txt>{{vm.data.customername}}</span></p></div><div flex=25 flex-xs=100><p><span class=\\\"text-sub text-upper\\\"><span translate=SHIPPINGDETAILS.AWB_BOL></span></span><br><span class=shipment-invoice-det-txt>{{vm.data.awb}}</span></p></div><!-- ((vm.is_consignee_user == \\'true\\')?true:((!vm.hasFinancialPermissions)?true:false)) --><div flex=25 flex-xs=100 ng-hide=\\\"(vm.is_consignee_user == \\'true\\' || !vm.hasFinancialPermissions)\\\"><p ng-hide=!vm.hasFinancialPermissions><span class=\\\"text-sub text-upper\\\"><span translate=SHIPPINGDETAILS.INVOICE_NUM></span></span><br><span ng-repeat=\\\"invoice in (vm.data.shipment_invoices_without_credit_note | limitTo : 3 : 0)\\\"><span class=shipment-invoice-det-txt>{{ invoice.invoicenumber }}<span ng-if=!$last>, </span></span></span><a ng-if=\\\"vm.data.shipment_invoices_without_credit_note.length > 3\\\" href=/shipping-details/{{vm.ref_num}}#accordion-invoices ng-click=\\\"\\\">+ {{vm.data.shipment_invoices_without_credit_note.length - 3}} others</a></p></div></div></md-card-content></md-card><!-- Milestones Section --><div class=m-b style=padding:15px id=milestones-area><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>{{\\'SHIPPINGDETAILS.MILESTONES\\' | translate | uppercase}}</span></h2></div></md-toolbar><div ng-include=\\\"\\'/app/shipping-details/milestones/milestones.html\\'\\\"></div></div><!-- Shipping Details Core Content --><cva-accordion-group class=\\\"accordion-group-light m-b\\\"><!-- Container Details located here --><cva-accordion id=containerDetails ng-if=!vm.defaultContainer data-title=\\\"Container Details\\\" data-icon=><div layout=row layout-xs=column layout-align=\\\"end center\\\" class=\\\"light-form margin-btm-10px\\\"><md-checkbox class=md-primary aria-label=\\\"keep Container open\\\" ng-model=vm.IsContainerVisible ng-change=vm.setContainerExpanded(vm.IsContainerVisible) ng-disabled=vm.dataswitchEnable>Keep Container Details Open</md-checkbox></div><div class=scrollable ng-include=\\\"\\'/app/shipping-details/containers/container-list.html\\'\\\"></div></cva-accordion><cva-accordion id=containerDetails ng-if=vm.defaultContainer data-title=\\\"Container Details\\\" data-icon= data-saved-expanded=true><div layout=row layout-xs=column layout-align=\\\"end center\\\" class=\\\"light-form margin-btm-10px\\\"><md-checkbox class=md-primary aria-label=\\\"keep Container open\\\" ng-model=vm.IsContainerVisible ng-change=vm.setContainerExpanded(vm.IsContainerVisible) ng-disabled=vm.dataswitchEnable>Keep Container Details Open</md-checkbox></div><div class=scrollable ng-include=\\\"\\'/app/shipping-details/containers/container-list.html\\'\\\"></div></cva-accordion><!-- container ends --><cva-accordion data-title=\\\"More Shipping Details\\\" data-icon= data-saved-expanded={{vm.expandedShippingDetails}}><div layout=row layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedShippingDetails ng-change=vm.setShippingDetailsExpanded() aria-label=\\\"keep shipping details open\\\">Keep Shipping Details Open</md-checkbox></div><div layout-gt-xs=row layout-xs=column class=m-t-sm><div flex=40 flex-xs=100><div class=group><strong>{{\\'SHIPPINGDETAILS.SHIPPER\\' | translate | uppercase}}</strong> <span class=line ng-if=\\\"vm.data.shippername != \\'\\'\\\">{{vm.data.shippername}}</span><div ng-repeat=\\\"address_line in vm.getShipperAddress(vm.data) track by $index\\\"><span class=line>{{address_line}}</span></div></div><div class=group><strong>{{\\'SHIPPINGDETAILS.CONSIGNEE\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.consigneename}}</span><div ng-repeat=\\\"address_line in vm.getConsigneeAddress(vm.data) track by $index\\\"><span class=line>{{address_line}}</span></div></div></div><div flex=20 flex-xs=100><div class=group><strong>{{\\'SHIPPINGDETAILS.BOOKING_NUM\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.bookingnumber}}</span></div><div class=group><strong>{{\\'SHIPPINGDETAILS.WEIGHT\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.totalgrossweight}}</span></div><div class=group><strong>{{\\'SHIPPINGDETAILS.CUSTOMER_GROUP\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.customergroup}}</span></div><div class=group><strong>{{\\'SHIPPINGDETAILS.INCOTERM\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.incoterm}}</span></div><div class=group><strong>{{\\'SHIPPINGDETAILS.VESSEL\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.vesselname}}</span></div><div class=group><strong>{{\\'SHIPPINGDETAILS.VOYAGE\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.voyage}}</span></div></div><div flex=20 flex-xs=100><div class=group><strong>{{\\'SHIPPINGDETAILS.SERVICE_TYPE\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.servicetype != \\'\\' ? vm.data.servicetype : \\'n/a\\'}}</span></div><div class=group><strong>{{\\'SHIPPINGDETAILS.CHARGEABLE_WEIGHT\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.totalchargeableweight}}</span></div><!-- <div class=\\\"group\\\">\\r\\n <strong>{{\\'SHIPPINGDETAILS.STATION\\' | translate | uppercase}}</strong>\\r\\n <span class=\\\"line\\\">TODO station</span>\\r\\n </div> --></div><div flex=20><div class=group><strong>{{\\'SHIPPINGDETAILS.SERVICE_LEVEL\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.servicelevel}}</span></div><div class=group><strong>{{\\'SHIPPINGDETAILS.TOTAL_PIECES\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.totalpieces}}</span></div><div class=group><strong>{{\\'SHIPPINGDETAILS.BUSINESS_TYPE\\' | translate | uppercase}}</strong> <span class=line>{{vm.data.businesstype}}</span></div></div></div></cva-accordion><!-- INVOICE --><cva-accordion ng-hide=\\\"(vm.is_consignee_user == \\'true\\' || !vm.hasFinancialPermissions)\\\" data-title=\\\"Invoice Details\\\" data-icon= id=accordion-invoices data-saved-expanded={{vm.expandedInvoices}}><div layout=row layout-xs=column layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedInvoices ng-change=vm.setInvoicesExpanded() aria-label=\\\"keep invoices open\\\">Keep Invoices Open</md-checkbox></div><div ng-include=\\\"\\'/app/shipping-details/invoices/invoice-list.html\\'\\\"></div></cva-accordion><cva-accordion data-title=\\\"Reference Numbers\\\" data-icon= data-saved-expanded={{vm.expandedRefNumbers}}><div layout=row layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedRefNumbers ng-change=vm.setRefNumbersExpanded() aria-label=\\\"keep reference numbers open\\\">Keep Reference Numbers Open</md-checkbox></div><div ng-include=\\\"\\'/app/shipping-details/reference-numbers/reference-numbers-list.html\\'\\\" class=m-t-sm></div></cva-accordion></cva-accordion-group><div layout-gt-sm=row layout-sm=column layout-xs=column><!-- Include Potential Exceptions --><md-card flex-gt-sm=\\\"(vm.is_consignee_user == \\'true\\')?100:50\\\" flex-lt-md=1 class=m-b ng-include=\\\"\\'/app/shipping-details/potential-exceptions/potential-exceptions.html\\'\\\"></md-card><!-- Include Documents --><md-card ng-hide=\\\"(vm.is_consignee_user == \\'true\\')\\\" flex-gt-sm=50 flex-lt-md=1 class=m-b ng-include=\\\"\\'/app/shipping-details/documents/documents.html\\'\\\"></md-card></div><!--Shipment Discussion Chat--><div id=reference-area layout-gt-sm=row layout-sm=column layout-xs=column class=shipment_discussion_chat ng-if=vm.discussion_visibility><md-card flex-gt-sm=100 flex-lt-md=1 class=m-b ng-include=\\\"\\'/app/shipping-details/discussion/index.html\\'\\\"></md-card></div><div layout-gt-sm=row layout-sm=column layout-xs=column ng-if=false><!-- Activity Log Section --><!-- <md-card class=\\\"\\\" flex-gt-xs=\\\"50\\\" flex-xs=\\\"1\\\" ng-include=\\\"\\'/app/shipping-details/activity-log/activity-log.html\\'\\\"></md-card> --><!-- Marks & Numbers --><!-- <md-card flex=\\\"50\\\" ng-include=\\\"\\'/app/shipping-details/marks-numbers/marks-numbers.html\\'\\\"></md-card> --></div></div><div ng-if=vm.failedToRetrieveData class=\\\"m-t m-b\\\" layout=row layout-align=\\\"center center\\\"><h2><span translate=SHIPPINGDETAILS.FAILED_TO_RETRIEVE_DATA></span> {{vm.failedToRetrieveData}}</h2></div></cva-shell>\");\n$templateCache.put(\"/app/track-trace/quick-filters.html\",\"<md-card-content class=collapsible-exceptions-wrapper><div layout-xs=column layout-sm=column layout-gt-sm=row class=\\\"collapsible-exceptions {{widgetsCtrl.collapseState}}\\\" ng-controller=\\\"WidgetsController as widgetsCtrl\\\"><div flex-gt-sm=\\\"{{widgetsCtrl.collapsed ? \\'75\\' : \\'56\\'}}\\\" class=flex-transition style=\\\"max-width: 70%\\\"><div layout-gt-sm=row layout-sm=column><div flex=33 layout={{widgetsCtrl.collapsibleLayout}} layout-align-gt-xs=\\\"center center\\\" layout-align-xs=\\\"start center\\\" class=flex-transition ng-class=\\\"{\\'filter-active\\': trackTraceCtrl.isFilterActive.active}\\\"><div class=\\\"{{trackTraceCtrl.isFilteredOut.active ? \\'text-success-faded\\' : \\'text-success\\' }} shipment-number md-display-{{widgetsCtrl.collapsed ? \\'1\\' : \\'3\\'}}\\\">{{trackTraceCtrl.data.active_count}}</div><div class=count>{{\\'WIDGETS.ACTIVE_SHIPMENTS\\' | translate}}<div class=not-shown><span ng-if=\\\"trackTraceCtrl.data.unfiltered_counts.active - trackTraceCtrl.data.active_count > 0\\\">{{ trackTraceCtrl.data.unfiltered_counts.active - trackTraceCtrl.data.active_count }} not shown</span></div></div><div class=filter-shipments ng-hide=widgetsCtrl.collapsed><md-button class=\\\"btn-outline btn-loader\\\" ng-click=\\\"trackTraceCtrl.filter(\\'active\\')\\\" ng-disabled=trackTraceCtrl.loadingState.loading analytics-on analytics-category=Dashboard analytics-event=FilterShipments-Active><span ng-hide=trackTraceCtrl.queryState.isFilterLoading.loading.active>{{trackTraceCtrl.filterLabels.active | translate}}</span><md-progress-circular md-mode=indeterminate ng-hide=!trackTraceCtrl.queryState.isFilterLoading.loading.active class=md-hue-1 md-diameter=36px></md-progress-circular></md-button></div></div><div flex=33 layout={{widgetsCtrl.collapsibleLayout}} layout-align-gt-xs=\\\"center center\\\" layout-align-xs=\\\"start center\\\" class=flex-transition ng-class=\\\"{\\'filter-active\\': trackTraceCtrl.isFilterActive.exception}\\\"><div class=\\\"{{ trackTraceCtrl.isFilteredOut.exception ? \\'text-danger-faded\\' : \\'text-danger\\' }} shipment-number md-display-{{widgetsCtrl.collapsed ? \\'1\\' : \\'3\\'}}\\\">{{trackTraceCtrl.data.exception_count}}</div><div class=count><span translate=WIDGETS.SHIPMENTS_WITH_EXCEPTIONS></span><div class=not-shown><span ng-if=\\\"trackTraceCtrl.data.unfiltered_counts.exception - trackTraceCtrl.data.exception_count > 0\\\">{{ trackTraceCtrl.data.unfiltered_counts.exception - trackTraceCtrl.data.exception_count }} not shown</span></div></div><div class=filter-shipments ng-hide=widgetsCtrl.collapsed><md-button class=\\\"btn-outline btn-loader\\\" ng-click=\\\"trackTraceCtrl.filter(\\'exception\\')\\\" ng-disabled=trackTraceCtrl.loadingState.loading analytics-on analytics-category=Dashboard analytics-event=FilterShipments-Exception><span ng-hide=trackTraceCtrl.queryState.isFilterLoading.loading.exception>{{trackTraceCtrl.filterLabels.exception | translate}}</span><md-progress-circular md-mode=indeterminate ng-hide=!trackTraceCtrl.queryState.isFilterLoading.loading.exception class=md-hue-1 md-diameter=36px></md-progress-circular></md-button></div></div><div flex=33 layout={{widgetsCtrl.collapsibleLayout}} layout-align-gt-xs=\\\"center center\\\" layout-align-xs=\\\"start center\\\" class=flex-transition ng-class=\\\"{\\'filter-active\\': trackTraceCtrl.isFilterActive.potential}\\\"><div class=\\\"{{trackTraceCtrl.isFilteredOut.potential ? \\'text-warning-faded\\' : \\'text-warning\\'}} shipment-number md-display-{{widgetsCtrl.collapsed ? \\'1\\' : \\'3\\'}}\\\">{{trackTraceCtrl.data.potential_exception_count}}</div><div class=count><span translate=WIDGETS.POTENTIAL_EXCEPTIONS></span><div class=not-shown><span ng-if=\\\"trackTraceCtrl.data.unfiltered_counts.potential_exception - trackTraceCtrl.data.potential_exception_count > 0\\\">{{ trackTraceCtrl.data.unfiltered_counts.potential_exception - trackTraceCtrl.data.potential_exception_count }} not shown</span></div></div><div class=filter-shipments ng-hide=widgetsCtrl.collapsed><md-button class=\\\"btn-outline btn-loader\\\" ng-click=\\\"trackTraceCtrl.filter(\\'potential\\')\\\" ng-disabled=trackTraceCtrl.loadingState.loading analytics-on analytics-category=Dashboard analytics-event=FilterShipments-Potention><span ng-hide=trackTraceCtrl.queryState.isFilterLoading.loading.potential>{{trackTraceCtrl.filterLabels.potential | translate}}</span><md-progress-circular md-mode=indeterminate ng-hide=!trackTraceCtrl.queryState.isFilterLoading.loading.potential class=md-hue-1 md-diameter=36px></md-progress-circular></md-button></div></div></div></div><!-- Lane Pairs Map ng-hide=\\\"widgetsCtrl.collapsed\\\" --><div ng-hide=widgetsCtrl.collapsed class=map-container style=\\\"max-width: 31%\\\"><div ng-include=\\\"\\'/app/components/widgets/lane-pairs-map.html\\'\\\" id=shipments-map flex=33></div></div><md-button class=\\\"md-fab md-mini btn-collapse\\\" aria-label=Open/Close ng-click=widgetsCtrl.toggleCollapse($event) analytics-on analytics-category=Dashboard analytics-event=CollapseLanePairs><md-icon>{{widgetsCtrl.collapsed ? \\'\\' : \\'\\'}}</md-icon></md-button></div></md-card-content>\");\n$templateCache.put(\"/app/track-trace/track-trace.html\",\"<cva-shell><div class=shell-padding multiple-key-press=trackTraceCtrl.hardRefresh(keyEvent)><!-- ng-keydown=\\\"trackTraceCtrl.hardRefresh($event)\\\" tabindex=\\\"0\\\" --><!-- Primary View Header --><md-card><md-card-content><div ng-include=\\\"\\'/app/track-trace/quick-search/quick-search.html\\'\\\"></div><!-- Advanced Search Dialog --><div ng-include=\\\"\\'/app/advanced-search/adv-search.html\\'\\\"></div></md-card-content></md-card><div ng-controller=ExceptionMapController class=m-b ng-hide=trackTraceCtrl.bookingMode><md-card ng-include=\\\"\\'/app/track-trace/quick-filters.html\\'\\\" style=\\\"position:relative; z-index:3\\\" ng-controller=\\\"WidgetsController as widgetsCtrl\\\"></md-card></div><!-- SHIPMENTS RESULTS CARD --><div class=track-trace-results><div layout-gt-sm=row class=p-l-sm><h3 class=\\\"md-headline text-upper\\\">{{\\'TRACKTRACE.SHIPMENTS\\' | translate}} <small class=\\\"text-warning text-xs text-lower text-strong\\\">({{trackTraceCtrl.data.total}})<!--{{trackTraceCtrl.data.results_filtered ? \\'TRACKTRACE.CURRENTLY_FILTERED\\' : \\'TRACKTRACE.TOTAL\\' | translate}}--> </small><span><md-button id=shipment-filter class=\\\"md-fab md-mini btn-collapse\\\" show-xs show-sm hide-gt-sm layout-align=\\\"end center\\\" aria-label=Open/Close ng-click=\\\"showList = ! showList\\\"><md-icon>{{!showList ? \\'\\' : \\'\\'}}</md-icon></md-button></span></h3><span flex=auto></span><div hide show-gt-sm><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCtrl.refresh() ng-disabled=trackTraceCtrl.queryState.displayNoResults ng-disabled=trackTraceCtrl.showLoading><span ng-hide=trackTraceCtrl.showLoading>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span> <span class=btn-load-wrapper ng-show=trackTraceCtrl.showLoading><md-progress-circular md-mode=indeterminate class=md-hue-1 md-diameter=30px></md-progress-circular></span></md-button><!-- the ng-click is just for a test right now --><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCtrl.showExportCSV($event) ng-disabled=trackTraceCtrl.queryState.displayNoResults ng-if=trackTraceCtrl.hasExportPermissions>{{\\'TRACKTRACE.EXPORT\\' | translate}}</md-button></div><div ng-show=showList hide-gt-sm><md-button style=\\\"margin-left: 0\\\" id=refresh-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCtrl.refresh() ng-disabled=trackTraceCtrl.showLoading><span ng-hide=trackTraceCtrl.showLoading>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span> <span class=btn-load-wrapper ng-show=trackTraceCtrl.showLoading><md-progress-circular md-mode=indeterminate class=md-hue-1 md-diameter=30px></md-progress-circular></span></md-button><!-- the ng-click is just for a test right now --><md-button id=export-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCtrl.showExportCSV($event)>{{\\'TRACKTRACE.EXPORT\\' | translate}}</md-button></div></div><br hide-gt-sm><!-- Server Table Inclusion --><div layout=row class=track-trace-table><div flex=100 ng-include=\\\"\\'/app/track-trace/server-table/server-table.html\\'\\\" class=\\\"loadmask-light loadmask-opaque track-trace-table\\\"></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/user/audit-log.html\",\"<cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true></div><div class=\\\"shell-padding loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1>AUDIT LOG</h2><span class=\\\"breadcrumb flat\\\"><a href=/auditlog class=parent-link><span>Audit Log</span></a></span></div></div></div><md-card><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex><md-icon class=material-icons>business</md-icon><span>AUDIT LOG DETAILS</span></h2><span flex=auto></span><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.exportAuditlog() ng-disabled=\\\"vm.isLoad.save || vm.formDetails.$pristine || vm.formDetails.$invalid\\\" type=submit class=\\\"btn btn-default\\\" ng-show=!vm.isCreate><!-- <md-icon>save</md-icon> --> <span ng-hide=vm.isLoad.save>Export CSV</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=row><div flex-gt-sm=50><mdp-date-picker mdp-placeholder=\\\"Start Date\\\" mdp-format=MM/DD/YYYY mdp-min-date=vm.minDate ng-model=vm.start_date required></mdp-date-picker></div></div><div layout-gt-sm=row><div flex-gt-sm=50><mdp-date-picker mdp-placeholder=\\\"End Date\\\" mdp-format=MM/DD/YYYY mdp-min-date=vm.minDate ng-model=vm.end_date required></mdp-date-picker></div></div></md-card-content><!--<md-card-actions layout=\\\"row\\\" layout-align=\\\"end center\\\">\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <div ng-include=\\\"\\'app/admin/companies/forms/action-buttons.html\\'\\\"></div>\\r\\n <span flex=\\\"0\\\"></span>\\r\\n </md-card-actions>--></form></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/user/change-password.html\",\"<md-card><form ng-submit=userCtrl.changePasswordSaml(resetPassword) role=form ng-init=\\\"resetPassword={}\\\" class=light-form name=resetPasswordForm><md-toolbar class=md-primary><div class=md-toolbar-tools><h2 class=md-flex><md-icon>account_circle</md-icon><span translate=USER.EDIT_PASSWORD></span></h2></div></md-toolbar><md-card-content><!-- <div layout-gt-sm=\\\"row\\\">\\r\\n <md-input-container class=\\\"md-block\\\" flex-gt-sm=\\\"auto\\\">\\r\\n <label translate=\\\"USER.CURRENT_PASSWORD\\\"></label>\\r\\n <input data-ng-model=\\'changePasswordForm.current_password\\'\\r\\n type=\\\"password\\\"\\r\\n name=\\'current_password\\'\\r\\n required=\\\"required\\\"\\r\\n >\\r\\n </md-input-container>\\r\\n </div> --><div layout-gt-sm=row><input type=password name=password style=\\\"display: none\\\"><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.NEW_PASSWORD></label><input data-ng-model=resetPassword.password type=password autocomplete=off name=password ng-minlength=8 ng-pattern=passwordPattern required ng-blur=userCtrl.checkPassWithEmail(resetPassword.password)><div ng-show=\\\"resetPasswordForm.password.$dirty && resetPasswordForm.password.$invalid || resetPasswordForm.password.$error.pattern || userCtrl.passValid\\\"><span class=text-danger>Password must have minimum of 8 characters, must contain 1 lower case letter, 1 upper case letter, 1 number, does not contain part of email.</span></div></md-input-container></div><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.CONFIRM_PASSWORD></label><input ng-model=resetPassword.password_confirmation type=password name=password_confirmation required data-password-verify=resetPassword.password><div ng-show=resetPasswordForm.password_confirmation.$error.passwordVerify><span translate=USER.ERROR_PASSWORD_MATCH></span></div></md-input-container></div></md-card-content><md-card-actions layout=row layout-align=\\\"end center\\\"><md-button class=\\\"md-raised md-primary\\\" type=submit ng-disabled=resetPasswordForm.$invalid class=\\\"btn btn-default\\\"><span ng-if=!userCtrl.isResetPasswordLoading translate=USER.UPDATE_PASSWORD></span><md-progress-circular md-mode=indeterminate ng-if=userCtrl.isResetPasswordLoading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></md-card-actions></form></md-card>\");\n$templateCache.put(\"/app/user/change-question.html\",\"<md-card><form ng-submit=userCtrl.changeQuestionSaml(resetQuestion) role=form ng-init=\\\"resetQuestion={}\\\" class=light-form name=resetQuestionForm><md-toolbar class=md-primary><div class=md-toolbar-tools><h2 class=md-flex><md-icon>account_circle</md-icon><span translate=USER.EDIT_QUESTION></span></h2></div></md-toolbar><md-card-content><!-- <div layout-gt-sm=\\\"row\\\">\\r\\n <md-input-container class=\\\"md-block\\\" flex-gt-sm=\\\"auto\\\">\\r\\n <label translate=\\\"USER.CURRENT_PASSWORD\\\"></label>\\r\\n <input data-ng-model=\\'changePasswordForm.current_password\\'\\r\\n type=\\\"password\\\"\\r\\n name=\\'current_password\\'\\r\\n required=\\\"required\\\"\\r\\n >\\r\\n </md-input-container>\\r\\n </div> --><div layout-gt-sm=row><input type=password name=password style=\\\"display: none\\\"><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.CURRENT_PASSWORD></label><input data-ng-model=resetQuestion.password type=password name=password ng-minlength=8 autocomplete=off ng-pattern=passwordPattern required ng-required=true ng-blur=userCtrl.checkPassWithEmail(resetQuestion.password)><div ng-show=\\\"resetQuestionForm.password.$dirty && resetQuestionForm.password.$invalid || resetQuestionForm.password.$error.pattern || userCtrl.passValid\\\"><span class=text-danger>Password must have minimum of 8 characters, must contain 1 lower case letter, 1 upper case letter, 1 number, does not contain part of email.</span></div></md-input-container></div><span><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm=auto><label>Select Question</label><md-select data-ng-model=resetQuestion.question name=question aria-label=question required ng-required=true md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=question.questionText ng-repeat=\\\"question in octaQuestions\\\">{{ question.questionText }}</md-option></md-select><div ng-messages=resetQuestionForm.question.$error><div id=confirmation-required ng-message=required><span>Question field is required !</span></div></div></md-input-container></div></span><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm=auto><label>Answer</label><input ng-model=resetQuestion.answer type=text name=answer required ng-blur=\\\"userCtrl.checkOktaAnswer(resetQuestion.question, resetQuestion.answer)\\\" ng-disabled=!resetQuestion.question ng-blur=userCtrl.checkSecurityAnswer(resetQuestion.question,resetPassword.answer)><!--<div ng-messages=\\\"resetQuestionForm.answer.$error\\\">--><!--<div id=\\\"confirmation-required\\\" ng-message=\\\"required\\\">--><!--<span>Answer field is required.!</span>--><!--</div>--><!--</div>--><!-- dsfsd --><div ng-show=userCtrl.answerValid><span class=text-danger>Answer must have minimum of 4 characters.</span></div><div ng-show=userCtrl.securityAnswerInvalid><span class=text-danger>Security answer cannot contain any part of the question.</span></div><!-- dsfsd --></md-input-container></div></md-card-content><md-card-actions layout=row layout-align=\\\"end center\\\"><md-button class=\\\"md-raised md-primary\\\" type=submit ng-disabled=resetQuestionForm.$invalid class=\\\"btn btn-default\\\"><span ng-if=!userCtrl.isResetQuestionLoading translate=USER.UPDATE_QUESTION></span><md-progress-circular md-mode=indeterminate ng-if=userCtrl.isResetQuestionLoading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></md-card-actions></form></md-card>\");\n$templateCache.put(\"/app/user/confirm-account.html\",\"<!-- <header class=\\\"clearfix\\\">\\r\\n <ht-top-nav navline=\\\"vm.navline\\\"></ht-top-nav>\\r\\n</header> --><section id=content class=\\\"content full-height\\\" layout=row flex=auto flex-fill><md-content flex=auto class=shell-inner flex-fill><div class=shell-padding><div class=view-header><div layout-xs=column layout-gt-xs=row><!-- <md-card class=\\\"contact-card md-card-light\\\" ng-include=\\\"\\'/app/components/widgets/user-rep.html\\'\\\" ng-if=\\\"false\\\"></md-card> --></div></div><md-card><form ng-submit=userCtrl.confirmPassword(confirmPasswordForm) role=form ng-init=\\\"confirmPasswordForm={}\\\" name=updatePasswordForm><md-toolbar class=md-primary><div class=md-toolbar-tools><h2 class=md-flex translate=USER.CONFIRMSET_PASSWORD></h2></div></md-toolbar><md-card-content><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.PASSWORD></label><input ng-model=confirmPasswordForm.password type=password name=password ng-minlength=8 required><ng-messages for=updatePasswordForm.password.$error role=alert><ng-message when=required><span translate=USER.PASSWORD_REQUIRED></span></ng-message><ng-message when=minlength><span translate=USER.PASSWORD_MINLENGTH></span></ng-message></ng-messages></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.CONFIRM_PASSWORD></label><input ng-model=confirmPasswordForm.password_confirmation type=password name=password_confirmation required ng-minlength=8 data-password-verify=confirmPasswordForm.password><div ng-messages=updatePasswordForm.password_confirmation.$error><div id=confirmation-required ng-message=required><span translate=USER.PASSWORD_CONFIRMATION_REQUIRED></span></div><div id=confirmation-minlength ng-message=minlength><span translate=USER.PASSWORD_MINLENGTH></span></div><div id=confirmation-match ng-message=passwordVerify><span translate=USER.ERROR_PASSWORD_MATCH></span></div></div></md-input-container></div></md-card-content><md-card-actions layout=row layout-align=\\\"end center\\\"><md-button class=\\\"md-raised md-primary\\\" type=submit ng-disabled=updatePasswordForm.$invalid class=\\\"btn btn-default\\\"><span ng-if=!userCtrl.isConfirmPasswordLoading translate=USER.CONFIRMSET_PASSWORD></span><md-progress-circular md-mode=indeterminate ng-if=userCtrl.isConfirmPasswordLoading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></md-card-actions></form></md-card></div></md-content></section>\");\n$templateCache.put(\"/app/user/dashboard-custom.html\",\"<cva-shell ng-controller=\\\"WidgetsController as widgetsCtrl\\\"><div class=shell-padding multiple-key-press=vm.keyHandler(keyEvent)><!-- Primary View Header --><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>Dashboard</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=# class=parent-link>You have no access to Shipment View</a></span></div><!-- --></div></div><!-- <div ng-include=\\\"vm.getDashboard()\\\">\\r\\n </div> --><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=https://cviewclassic.craneww.com:8443/portal/dologin class=c-view-classic-iframe style=\\\"width:0;height:0;border:0; border:none\\\"></iframe></div></cva-shell>\");\n$templateCache.put(\"/app/user/edit-account.html\",\"<md-card><form name=userCtrl.userForm novalidate class=light-form><md-toolbar class=md-primary><div class=md-toolbar-tools><h2 class=md-flex><md-icon>account_circle</md-icon><span translate=USER.EDIT_ACCOUNT></span></h2></div></md-toolbar><md-card-content><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.FIRST_NAME></label><input type=text ng-model=userCtrl.user.first_name name=first-name ng-disabled=!userCtrl.isEditable></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.LAST_NAME></label><input type=text ng-model=userCtrl.user.last_name name=last-name ng-disabled=!userCtrl.isEditable></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.EMAIL></label><input type=email ng-model=userCtrl.user.email name=email ng-minlength=5 required ng-disabled=true><br><div ng-messages=userCtrl.userForm.email.$error><div ng-message=email><span translate=USER.ERROR_EMAIL></span></div><div ng-message=required><span translate=USER.EMAIL_REQUIRED></span></div><div ng-message=minlength><span translate=USER.EMAIL_MINLENGTH></span></div></div></md-input-container></div><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.COMPANY></label><input type=text ng-model=userCtrl.user.company.name name=Company ng-disabled=true></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.TITLE></label><input type=text ng-model=userCtrl.user.title name=Title ng-disabled=!userCtrl.isEditable></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.PHONE></label><input type=text ng-model=userCtrl.user.phone name=Phone ng-disabled=!userCtrl.isEditable></md-input-container></div><div layout-gt-sm=row><div flex=50><h4 translate=USER.NOTIFICATION_SETTINGS.TITLE></h4><span translate=USER.NOTIFICATION_SETTINGS.DESCRIPTION></span><md-input-container class=md-block flex-gt-sm=auto><md-checkbox class=md-primary ng-model=userCtrl.user.notification_setting.milestone_delivered aria-label=notification_setting><span translate=USER.NOTIFICATION_SETTINGS.MILESTONE_DELIVERED></span></md-checkbox></md-input-container><md-input-container class=md-block flex-gt-sm=auto><md-checkbox class=md-primary ng-model=userCtrl.user.notification_setting.potential_exceptions aria-label=notification_setting><span translate=USER.NOTIFICATION_SETTINGS.POTENTIAL_EXCEPTIONS></span></md-checkbox></md-input-container><md-input-container class=md-block flex-gt-sm=auto><md-checkbox class=md-primary ng-model=userCtrl.user.notification_setting.exceptions aria-label=notification_setting><span translate=USER.NOTIFICATION_SETTINGS.EXCEPTIONS></span></md-checkbox></md-input-container></div><div flex=45 flex-offset-gt-sm=5><h4 translate=USER.TABLE_SETTINGS_HEADER></h4><span translate=USER.TABLE_SETTINGS_DESCRIPTION></span><md-radio-group ng-model=userCtrl.user.settings.table_settings><md-radio-button class=md-primary value=10>10 Records</md-radio-button><md-radio-button class=md-primary value=25>25 Records</md-radio-button><md-radio-button class=md-primary value=50>50 Records</md-radio-button><md-radio-button class=md-primary value=100>100 Records</md-radio-button></md-radio-group></div></div><div layout-gt-sm=row></div></md-card-content><md-card-actions layout=row layout-align=\\\"end center\\\"><!-- TODO: check ngChange for password dirty update --><md-button class=\\\"md-raised md-primary\\\" ng-click=userCtrl.updateAccount() ng-disabled=\\\"userCtrl.userForm.$invalid || userCtrl.isUpdateAccountLoading\\\" type=submit class=\\\"btn btn-default\\\"><span ng-if=!userCtrl.isUpdateAccountLoading translate=USER.UPDATE_ACCOUNT></span><md-progress-circular md-mode=indeterminate ng-if=userCtrl.isUpdateAccountLoading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></md-card-actions></form></md-card>\");\n$templateCache.put(\"/app/user/log-in.html\",\"<header class=clearfix><ht-top-nav navline=vm.navline></ht-top-nav></header><section id=content class=\\\"content full-height\\\" layout=row flex=auto flex-fill><md-content flex=auto class=shell-inner flex-fill><div class=shell-padding><!-- Primary View Header --><div class=view-header><div layout-xs=column layout-gt-xs=row><div class=text-center flex=auto><h2><span><span class=md-display-1 translate=USER.WELCOME_MESSAGE></span><br></span></h2></div><md-card class=\\\"contact-card md-card-light\\\" ng-include=\\\"\\'/app/components/widgets/user-rep.html\\'\\\" ng-if=false></md-card></div></div><md-card class=max-sm><md-toolbar class=md-primary><div class=md-toolbar-tools><h2 class=md-flex translate=USER.LOGIN></h2></div></md-toolbar><form novalidate name=log-in-form class=dark-form><md-card-content><div ng-repeat=\\\"error in userCtrl.errors\\\"><div class=\\\"notice notice-danger\\\">{{error}}</div></div><div layout-gt-sm=column><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm=auto><label translate=USER.EMAIL></label><input style=\\\"margin-bottom: 10px\\\" type=text ng-model=username name=email required><div ng-show=\\\"log-in-form.$submitted || log-in-form.email.$touched\\\"><span ng-show=log-in-form.email.$error.email translate=USER.ERROR_EMAIL></span></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm=auto><label translate=USER.PASSWORD></label><input type=password ng-model=password focus-me=\\\"password ? true: false \\\" ng-keyup=\\\"onEnterKeyPress($event,username, password)\\\" required> <span ng-show=log-in-form.password.$error.password translate=USER.ERROR_PASSWORD></span></md-input-container></div></md-card-content><!--https://cranewwb2c.b2clogin.com/cranewwb2c.onmicrosoft.com/oauth2/v2.0/authorize?p=B2C_1_C-ViewPasswordReset&client_id=bd0000b8-e20a-4c7f-9a43-c3cd4eab6df3&nonce=defaultNonce&redirect_uri=https%3A%2F%2Fportal-test.craneww.com%2Flogin&scope=openid&response_type=id_token&response_mode=form_post&prompt=login--><md-card-actions layout=row layout-align=\\\"start center\\\" class=p-a-sm><p class=m-t-0><a id=forgot-password href=/request-password-reset class=btn-link><span translate=USER.FORGOT_PASSWORD></span></a></p><span flex=auto></span><md-button id=login class=\\\"md-raised md-primary\\\" type=submit aria-label=userLogin ng-click=\\\"userCtrl.login(username, password)\\\" ng-disabled=userCtrl.isLoggingIn><span ng-hide=userCtrl.isLoggingIn translate=USER.LOGIN></span><md-progress-circular md-mode=indeterminate ng-show=userCtrl.isLoggingIn class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></md-card-actions></form></md-card></div></md-content></section>\");\n$templateCache.put(\"/app/user/reports.html\",\"<style type=text/css>.tabsdemoDynamicHeight md-content h1:first-child {\\r\\n margin-top: 0; }\\r\\n\\r\\n md-tabs md-tab-item.md-tab.md-active {\\r\\n background-color: #324c7d;\\r\\n padding-right: 25px;\\r\\n padding-left: 25px;\\r\\n border-right: 1px solid #fff;\\r\\n }\\r\\n\\r\\n md-tabs[md-border-bottom] md-tabs-wrapper {\\r\\n border-bottom-width: 1px;\\r\\n border-bottom-color: #050b25;\\r\\n }\\r\\n\\r\\n md-tabs md-pagination-wrapper {\\r\\n height: 44px;\\r\\n width: auto !important;\\r\\n }\\r\\n md-tabs md-tabs-canvas{\\r\\n height: 42px;\\r\\n }\\r\\n md-tabs{\\r\\n padding: 16px;\\r\\n }\\r\\n\\r\\n md-tabs md-tab-item.md-tab {\\r\\n padding-right: 25px;\\r\\n padding-left: 25px;\\r\\n border-right: 1px solid #fff;\\r\\n }\\r\\n md-autocomplete-wrap{\\r\\n box-shadow: none !important;\\r\\n }\\r\\n\\r\\n .md-card-light md-card-content md-icon, md-content.light-content md-icon, .light-content md-icon {\\r\\n color: #5E6163 !important;\\r\\n }\\r\\n\\r\\n #custType .newRecords {\\r\\n width: 100%;\\r\\n }\\r\\n\\r\\n #custType .newRecords p {\\r\\n width: 33%;\\r\\n display: inline;\\r\\n }\\r\\n .custType ul{\\r\\n display: flex;\\r\\n list-style-type: none;\\r\\n padding: 0px;\\r\\n border:1px solid #ccc;\\r\\n }\\r\\n .custType li{\\r\\n flex: 1 0 0px;\\r\\n }\\r\\n .custType li md-select{\\r\\n padding: 0px 50px 0px 0px;\\r\\n }\\r\\n .userDiv{\\r\\n margin-top:-5px;\\r\\n }\\r\\n .userType{\\r\\n display: flex;\\r\\n list-style-type: none;\\r\\n border: 1px solid #ccc;\\r\\n padding: 15px;\\r\\n }\\r\\n .userType li{\\r\\n flex: 1 0 0px;\\r\\n }\\r\\n\\r\\n.remove-btm-margin{\\r\\n margin-bottom: 0px;\\r\\n}\\r\\n.cust-Padding{\\r\\n padding:0px 0px 0px 20px;\\r\\n margin: 20px 0px 0px 0px;\\r\\n}\\r\\n.cust-Padding-switch{\\r\\n margin:0px;\\r\\n}\\r\\n.custType ul li{\\r\\n padding: 20px 0px 20px 0px;\\r\\n}</style><cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true></div><div class=\\\"shell-padding loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1>Reports</h2><span class=\\\"breadcrumb flat\\\"><a href=/reports class=parent-link><span>Generate Reports</span></a></span></div></div></div><md-card><md-card-content style=\\\"padding: 0;border-radius: 4px\\\"><md-tabs md-dynamic-height md-border-bottom><md-tab label=\\\"User Activity\\\" md-on-select=userActivityTab()><form name=vm.formDetails class=light-form role=form novalidate><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3 style=\\\"visibility: hidden\\\">Company</h3><md-input-container class=\\\"md-block error-hidden\\\"><label>Company *</label><md-autocomplete id=company style=\\\"background: none\\\" md-delay=300 ng-model=vm.company_name md-selected-item-change=vm.selectedCompanyChange(items) md-search-text=vm.searchText1 md-selected-text-change=null md-items=\\\"items in vm.getMatchesCompanies(\\'company_name\\', vm.searchText1,\\'userActivity\\')\\\" md-item-text=items.display md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectCompanyClose() placeholder=\\\"\\\"><md-item-template><span md-highlight-text=vm.searchText1>{{items.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=isCompanyRequired><span translate=COMPANY.NAME_REQUIRED></span></span></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin-top: 60px\\\"><label>Users *</label><md-autocomplete id=user style=\\\"background: none\\\" md-delay=300 ng-model=vm.user_name md-selected-item-change=vm.selectedUserChange(item) md-search-text=vm.searchText2 md-items=\\\"item in vm.getMatchesUsers(\\'company_users\\', vm.searchText2)\\\" md-item-text=\\\"item | usernameautocomplete\\\" md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() ng-disabled=vm.userDisabled placeholder=\\\"\\\"><md-item-template><span ng-if=!item.email md-highlight-text=vm.searchText2>{{item.first_name}} {{item.last_name}} </span><span ng-if=item.email md-highlight-text=vm.searchText2>{{item.first_name}} {{item.last_name}} ({{item.email}})</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=isUserRequired><span>Please enter user name</span></span></md-input-container></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Date Range</h3><md-input-container class=\\\"md-block error-hidden\\\"><mdp-date-picker mdp-placeholder=\\\"From Date\\\" mdp-format=MM/DD/YYYY mdp-min-date=vm.minDate mdp-max-date=vm.to_date ng-model=vm.from_date ng-change=ShowFromDate(vm) required></mdp-date-picker><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=isFromDateRequired><span>Please select from date</span></span></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin-top: 60px\\\"><mdp-date-picker mdp-placeholder=\\\"To Date\\\" mdp-format=MM/DD/YYYY mdp-min-date=vm.from_date ng-model=vm.to_date ng-change=ShowToDate(vm) required></mdp-date-picker><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=isToDateRequired><span>Please select to date</span></span></md-input-container></div></div><div layout-gt-sm=row style=\\\"margin:auto 10px;float: right\\\"><md-button ng-click=vm.exportAuditReports() style=\\\"color: #294F7B;margin:0\\\" class=\\\"md-raised md-primary\\\"><span ng-if=!vm.isReportLoading style=\\\"color: #fff\\\">Submit</span> <span ng-if=vm.isReportLoading style=\\\"color: none\\\">Submit</span><md-progress-circular md-mode=indeterminate ng-if=vm.isReportLoading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div></form></md-tab><md-tab label=User md-on-select=userReportTab(userRecord)><div><form name=userRecord ng-submit=userExport(userRecord) class=light-form role=form novalidate><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3 style=\\\"visibility: hidden\\\">Company</h3><md-input-container class=\\\"md-block error-hidden remove-btm-margin\\\"><div class=padding-top-20px><label>Company *</label><md-autocomplete style=\\\"background: none\\\" md-delay=300 ng-model=vm.company_name md-selected-item-change=vm.selectedCompanyRecord(item) md-search-text=vm.searchText3 md-items=\\\"item in vm.getMatchesCompanies(\\'company_name\\', vm.searchText3,\\'user\\')\\\" md-item-text=item.display md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() placeholder=\\\"\\\"><md-item-template><span md-highlight-text=vm.searchText3>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=isUserCompanyRequired><span translate=COMPANY.NAME_REQUIRED></span></span></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container style=\\\"padding: 0 15px\\\" class=\\\"md-block error-hidden remove-btm-margin\\\"><h4>User Type   </h4><div class=userDiv><ul class=userType><li><md-checkbox class=md-primary ng-model=userRecord.adUser aria-label=adUser>AD-User</md-checkbox></li><li><md-checkbox class=md-primary ng-model=userRecord.nonAduser aria-label=nonAduser>Non-AD-User</md-checkbox></li><li><md-checkbox class=md-primary ng-model=userRecord.active aria-label=active>Active</md-checkbox></li></ul></div></md-input-container></div></div><div id=custType class=row><h4>Customer Type   </h4><div class=custType><ul><li><md-input-container class=\\\"md-block error-hidden cust-Padding\\\"><md-checkbox ng-disabled=vm.cww_visibility ng-model=userRecord.is_cww class=md-primary aria-label=is_cww ng-change=onCwwChecked(userRecord)>CWW</md-checkbox><md-select placeholder=\\\"CWW User Roles\\\" aria-label=\\\"CWW User Roles\\\" ng-if=userRecord.is_cww ng-model=userRecord.cww_roles md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles\\\">{{role.display}}</md-option></md-select></md-input-container><div class=classic-opt><md-input-container class=\\\"md-block error-hidden cust-Padding\\\"><md-select ng-if=userRecord.is_cww placeholder=\\\"Pathway User Roles\\\" aria-label=\\\"Pathway User Roles\\\" ng-model=userRecord.Classic_roles md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_classic\\\">{{role.display}}</md-option></md-select></md-input-container></div></li><li><md-input-container class=\\\"md-block error-hidden cust-Padding\\\"><md-checkbox ng-disabled=vm.csl_visibility aria-label=is_csl ng-model=userRecord.is_csl class=md-primary ng-change=onCslChecked(userRecord)>CSL</md-checkbox><md-select placeholder=\\\"CSL User Roles\\\" aria-label=\\\"CSL User Roles\\\" ng-if=userRecord.is_csl ng-model=userRecord.csl_roles md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_csl\\\">{{role.display}}</md-option></md-select></md-input-container></li><li><md-input-container class=\\\"md-block error-hidden cust-Padding\\\"><md-checkbox ng-disabled=vm.cfs_visibility aria-label=is_cfs ng-model=userRecord.is_cfs class=md-primary ng-change=onCfsChecked(userRecord)>CFS</md-checkbox><md-select placeholder=\\\"CFS User Roles\\\" aria-label=\\\"CFS User Roles\\\" ng-if=userRecord.is_cfs ng-model=userRecord.cfs_roles md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_cfs\\\">{{role.display}}</md-option></md-select></md-input-container></li><li><md-input-container class=\\\"md-block error-hidden cust-Padding-switch\\\"><md-switch ng-model=userRecord.filter_only><span>Turn on <b>Only</b> for specific search criteria.</span></md-switch></md-input-container></li></ul></div></div><div layout-gt-sm=row style=\\\"margin:auto 10px;float: right\\\"><md-button type=submit style=\\\"color: #294F7B;margin:0\\\" class=\\\"md-raised md-primary\\\"><span ng-if=!vm.isReportLoading style=\\\"color: #fff\\\">Submit</span> <span ng-if=vm.isReportLoading style=\\\"color: none\\\"></span><md-progress-circular md-mode=indeterminate ng-if=vm.isReportLoading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div></form></div></md-tab><!-- <md-tab label=\\\"two\\\">\\r\\n <md-content class=\\\"md-padding\\\">\\r\\n <h1 class=\\\"md-display-2\\\">Tab Two</h1>\\r\\n\\r\\n </md-content>\\r\\n </md-tab>\\r\\n <md-tab label=\\\"three\\\">\\r\\n <md-content class=\\\"md-padding\\\">\\r\\n <h1 class=\\\"md-display-2\\\">Tab Three</h1>\\r\\n\\r\\n </md-content>\\r\\n </md-tab> --></md-tabs></md-card-content></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/user/request-password-reset.html\",\"<section id=content class=\\\"content full-height\\\" layout=row flex=auto flex-fill><md-content flex=auto class=shell-inner flex-fill><div class=shell-padding><div class=view-header><div layout-xs=column layout-gt-xs=row><div class=text-center flex=auto><h2><span class=md-display-1 translate=USER.WELCOME_MESSAGE></span></h2><h4 ng-if=userstatus><span translate=USER.RESET_PASSWORD_ALERT></span></h4></div><md-card class=\\\"contact-card md-card-light\\\" ng-include=\\\"\\'/app/components/widgets/user-rep.html\\'\\\" ng-if=false></md-card></div></div><md-card class=max-sm><form role=form name=resetForm class=dark-form ng-submit=userCtrl.requestPasswordReset(passwordResetForm) ng-init=\\\"passwordResetForm = {email}\\\"><md-toolbar class=md-primary><div class=md-toolbar-tools><h2 class=md-flex translate=USER.RESET_PASSWORD></h2></div></md-toolbar><md-card-content><div layout-gt-sm=row><p><span translate=USER.RESET_PASSWORD_STRING></span></p><br></div><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.EMAIL></label><input type=email ng-model=passwordResetForm.email name=email required><br><div ng-show=\\\"resetForm.$submitted || resetForm.email.$touched\\\"><span ng-show=resetForm.email.$error.email translate=USER.ERROR_EMAIL></span></div></md-input-container></div></md-card-content><md-card-actions layout=row layout-align=\\\"start center\\\" class=p-a-sm><p class=m-t-0><a href=/login class=btn-link><span translate=USER.BACK_TO_LOGIN></span></a></p><span flex=auto></span><md-button class=\\\"md-raised md-primary\\\" type=submit><span ng-if=!userCtrl.isResetPasswordRequestLoading translate=USER.SEND_EMAIL></span><md-progress-circular md-mode=indeterminate ng-if=userCtrl.isResetPasswordRequestLoading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></md-card-actions></form></md-card></div></md-content></section>\");\n$templateCache.put(\"/app/user/reset-password.html\",\"<section id=content class=\\\"content full-height\\\" layout=row flex=auto flex-fill><md-content flex=auto class=shell-inner flex-fill><div class=shell-padding><div class=view-header><div layout-xs=column layout-gt-xs=row><!-- <md-card class=\\\"contact-card md-card-light\\\" ng-include=\\\"\\'/app/components/widgets/user-rep.html\\'\\\" ng-if=\\\"false\\\"></md-card> --></div></div><md-card><form ng-submit=userCtrl.resetPasswordSaml(resetPassword) role=form ng-init=\\\"resetPassword={}\\\" novalidate name=resetPasswordForm><md-toolbar class=md-primary><div class=md-toolbar-tools><h2 class=md-flex translate=USER.RESET_PASSWORD></h2></div></md-toolbar><md-card-content><div layout-gt-sm=row><input type=password name=password style=\\\"display: none\\\"><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.PASSWORD></label><input ng-model=resetPassword.password type=password autocomplete=off name=password ng-minlength=8 ng-pattern=passwordPattern required ng-blur=userCtrl.checkPassWithEmail(resetPassword.password)><div ng-show=\\\"resetPasswordForm.password.$dirty && resetPasswordForm.password.$invalid || resetPasswordForm.password.$error.pattern || userCtrl.passInValid\\\"><span class=text-danger>Password must have minimum of 8 characters, must contain 1 lower case letter, 1 upper case letter, 1 number, does not contain part of email.</span></div><!-- <div ng-messages=\\\"resetPasswordForm.password.$error\\\">\\r\\n <div id=\\\"password-required\\\" ng-message=\\\"required\\\">\\r\\n <span translate=\\\"USER.PASSWORD_REQUIRED\\\"></span>\\r\\n </div>\\r\\n <div id=\\\"password-minlength\\\" ng-message=\\\"minlength\\\">\\r\\n <span translate=\\\"USER.PASSWORD_MINLENGTH\\\"></span>\\r\\n </div>\\r\\n </div> --></md-input-container></div><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm=auto><label translate=USER.CONFIRM_PASSWORD></label><input ng-model=resetPassword.password_confirmation type=password name=password_confirmation required ng-minlength=8 data-password-verify=resetPassword.password><div ng-messages=resetPasswordForm.password_confirmation.$error><div id=confirmation-required ng-message=required><span translate=USER.PASSWORD_CONFIRMATION_REQUIRED></span></div><div id=confirmation-minlength ng-message=minlength><span translate=USER.PASSWORD_MINLENGTH></span></div><div id=confirmation-match ng-message=passwordVerify><span translate=USER.ERROR_PASSWORD_MATCH></span></div></div></md-input-container></div></md-card-content><md-card-actions layout=row layout-align=\\\"end center\\\"><md-button id=reset-password class=\\\"md-raised md-primary\\\" type=submit ng-disabled=resetPasswordForm.$invalid class=\\\"btn btn-default\\\"><span ng-if=azureid><span ng-if=!userCtrl.isResetPasswordLoading translate=USER.SUBMIT></span></span><md-progress-circular md-mode=indeterminate ng-if=userCtrl.isResetPasswordLoading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></md-card-actions></form></md-card></div></md-content></section>\");\n$templateCache.put(\"/app/user/saml.html\",\"<section id=content class=\\\"content full-height\\\" layout=row flex=auto flex-fill><md-content flex=auto class=shell-inner flex-fill>{{userCtrl.redirectToSaml();}}</md-content></section>\");\n$templateCache.put(\"/app/user/samldata.html\",\"<section id=content class=\\\"content full-height\\\" layout=row flex=auto flex-fill><md-content flex=auto class=shell-inner flex-fill>{{userCtrl.showSamlData();}}</md-content></section>\");\n$templateCache.put(\"/app/user/settings.html\",\"<md-card><md-toolbar class=md-primary><div class=md-toolbar-tools><h2 class=md-flex translate=USER.SETTINGS></h2></div></md-toolbar><md-card-content><md-checkbox ng-model=user.email_notifications aria-label=\\\"{{\\'USER.EMAIL_NOTIFICATIONS\\' | translate}}\\\"><span translate=USER.EMAIL_NOTIFICATIONS></span></md-checkbox><md-checkbox ng-model=user.sms_notifications aria-label=\\\"{{\\'USER.SMS_NOTIFICATIONS\\' | translate}}\\\"><span translate=USER.SMS_NOTIFICATIONS></span></md-checkbox></md-card-content></md-card>\");\n$templateCache.put(\"/app/user/user-show.html\",\"<cva-shell><div class=shell-padding id=user_show><!-- Primary View Header --><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 translate=USER.EDIT_ACCOUNT></span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/user class=parent-link><span translate=USER.EDIT_ACCOUNT></span></a></span></div></div></div><div layout=row layout-align=\\\"left center\\\"><div flex-gt-sm=66 flex-sm=75 flex=100></div></div><div layout=row layout-align=\\\"left center\\\" ng-if=true><div flex-gt-sm=66 flex-sm=75 flex=100><edit-account></edit-account></div></div><div layout=row layout-align=\\\"left center\\\"><div flex-gt-sm=66 flex-sm=75 flex=100><change-password></change-password></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/companies/import-companies.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>{{\\'COMPANY.IMPORT_COMPANY\\' | translate}}</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/companies class=parent-link>{{\\'COMPANY.COMPANY\\' | translate}}</a></span></div></div></div><md-card id=hello class=\\\"md-card-light loadmask-light\\\" loadmask=!vm.file.isUploading><form novalidate class=\\\"form-horizontal light-form\\\" name=vm.ImportCompaniesForm><md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'COMPANY.IMPORT_COMPANY\\' | translate}}</span></h2><span flex=auto></span></div></md-toolbar><md-card-content><section layout=row layout-align=center><div ngf-drop ngf-select ng-model=vm.file class=drop-box ngf-drop-available=dropSupported ngf-drag-over-class=\\\"{pattern: \\'.xlsx\\', accept:\\'dragover\\', reject:\\'dragover\\', delay:100}\\\" ngf-multiple=false ngf-allow-dir=false accept=.xlsx ngf-pattern=\\\"\\'.xlsx\\'\\\" style=\\\"color: gray\\\">Drop XLSX or Click to Upload</div></section><div ngf-no-file-drop>File Drag/Drop is not supported for this browser</div><section layout=row layout-align=center><md-button class=\\\"md-raised md-primary\\\" ng-click=vm.downloadXLSXTemplate()>Download XLSX Template</md-button></section><p style=text-align:center ng-if=vm.isSafari()><span>Press \\\"CMD + s\\\" on the opened document to save and name it as template.xlsx<span></span></span></p></md-card-content></form></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/admin/companies/log.html\",\"<md-card class=m-t ng-if=vm.company.log.length><md-toolbar class=md-toolbar-tools><h2>{{\\'ADMIN.COMPANY.LOG\\' | translate}}</h2><span flex=auto></span><md-button class=md-raised ng-click=vm.logExportShowCSV(vm.company)>Export</md-button></md-toolbar><md-card-content class=light-form><div class=table-scroll><table class=\\\"card-table table-fixed table-static\\\"><thead><tr><th style=\\\"width: 25%\\\">User</th><th style=\\\"width: 15%\\\">Date</th><th style=\\\"width: 60%\\\">Actions</th></tr></thead><tbody><tr class=md-whiteframe-1dp ng-repeat=\\\"log_record in vm.company.log\\\"><td style=\\\"width: 25%\\\">{{log_record.username}}</td><td style=\\\"width: 15%\\\">{{log_record.created_at | date}}</td><td style=\\\"width: 60%\\\"><p ng-bind-html=processActions(log_record.actions)></p></td></tr></tbody></table></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/admin/companies/manage-companies.html\",\"<cva-shell><div class=\\\"shell-padding book-shipment content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span ng-if=\\\"vm.readAccess == false\\\" class=md-display-1 translate=COMPANY.MANAGE_COMPANIES></span><br><span ng-if=\\\"vm.readAccess == true\\\" class=md-display-1>VIEW COMPANIES</span></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/companies class=parent-link><span translate=COMPANY.COMPANIES></span></a></span></div></div></div><!-- abheesh vk (abheesh.vk@dreamorbit.com) --><md-card class=p-a-sm collapsible template-url=/app/admin/companies/forms/search.html></md-card><div id=company-customer-type style=\\\"display: inline-block;float: right;margin: 15px 35px 0\\\" flex=100 flex-gt-sm=row><md-checkbox ng-disabled=\\\"\\\" ng-click=vm.changeActiveStatus(vm.is_active_cehck) aria-label=is_active_cehck ng-model=vm.is_active_cehck class=md-primary></md-checkbox>  Active</div><div style=\\\"clear: both\\\"></div><crane-table title=COMPANY.COMPANIES icon=vm.icon ; is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons readaccess=vm.readAccess ctrl=CompanyManagementController></crane-table></div></cva-shell>\");\n$templateCache.put(\"/app/admin/companies/show-company.html\",\"<style>.hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }\\r\\n .space-customer-grid{\\r\\n margin-left: 2%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }\\r\\n .md-card-light md-card-content, md-content.light-content, .light-content{\\r\\n background-color: #ebebeb;\\r\\n}\\r\\n.invisible-class{\\r\\n padding: 20px 15px !important;\\r\\n margin-bottom: 10px;\\r\\n}\\r\\n.invisible-class-edit{\\r\\n margin-bottom: 10px;\\r\\n}\\r\\n.desc{\\r\\n font-style: italic;\\r\\n color:#a8a8a8;\\r\\n font-size: .85em;\\r\\n }\\r\\n.visible-class{\\r\\n padding: 20px 15px !important;\\r\\n margin-bottom: 10px;\\r\\n}\\r\\nmd-radio-group.md-default-theme[disabled] .md-container .md-off, md-radio-group[disabled] .md-container .md-off, md-radio-button.md-default-theme[disabled] .md-container .md-off, md-radio-button[disabled] .md-container .md-off {\\r\\n border-color: #a8a8a8;\\r\\n}\\r\\n.RefereshTime{\\r\\n margin:0px;\\r\\n}\\r\\n.RefereshTime md-input-container{\\r\\n margin:0px;\\r\\n}\\r\\n.RefereshTime md-input-container .inline li{\\r\\n list-style-type:none;\\r\\n display: inline-block;\\r\\n}</style><cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1 ng-show=vm.isCreate translate=COMPANY.CREATE_COMPANY></span> <span class=md-display-1 ng-show=\\\"!vm.isCreate && !vm.readAccess\\\" translate=COMPANY.EDIT_COMPANY></span> <span class=md-display-1 ng-show=\\\"!vm.isCreate && vm.readAccess\\\">View Company</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/companies class=parent-link><span translate=COMPANY.COMPANIES></span></a> / <span ng-show=!vm.isCreate>{{vm.company.name}}</span> <span ng-show=vm.isCreate>{{\\\"NEW\\\"}}</span></span></div></div></div></div><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons>business</md-icon><span translate=COMPANY.COMPANY_DETAILS></span></h2><span flex=auto></span><div ng-include=\\\"\\'/app/admin/companies/forms/action-buttons.html\\'\\\"></div><div ng-include=\\\"\\'/app/admin/companies/forms/menu-action-buttons.html\\'\\\"></div><span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=row class=fourth_column><div flex-gt-sm=47 class=\\\"md-card-div company_name\\\" style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company translate=COMPANY.COMPANY_NAME></label><input type=text ng-disabled=vm.readAccess ng-model=vm.company.name ng-change=checkNameField(vm.company.name) name=first_name required><div ng-messages=vm.formDetails.first_name.$error><div ng-message=required><span translate=COMPANY.NAME_REQUIRED></span></div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" ng-if=!vm.isCreate layout=row layout-align=\\\"start center\\\"><md-checkbox ng-disabled=vm.readAccess ng-model=vm.company.is_active aria-label=company class=md-primary><span translate=COMPANY.ACTIVE></span></md-checkbox></md-input-container></div><div flex-gt-sm=47 ng-class=\\\"vm.company.companyEnableCheck == true ? \\'visible-class\\' : \\'invisible-class\\'\\\" class=\\\"md-card-div space-customer-grid company_name\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><div style=\\\"margin-bottom: 20px\\\" ng-class=\\\"vm.company.companyEnableCheck == true ? \\'text\\' : \\'text-disable\\'\\\">Access Type <span ng-class=\\\"vm.company.companyEnableCheck == true ? \\'star\\' : \\'star-disable\\'\\\">*</span>   </div><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=!vm.company.companyEnableCheck aria-label=company ng-change=\\\"vm.accessType(\\'standard\\',vm.company.accessTypeStandard)\\\" ng-model=vm.company.accessTypeStandard class=md-primary><span ng-class=\\\"vm.company.companyEnableCheck == true ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">C-View Portal</span></md-checkbox></span><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=!vm.company.companyEnableCheck aria-label=company ng-change=\\\"vm.accessType(\\'classic\\',vm.company.accessTypeClassic)\\\" ng-model=vm.company.accessTypeClassic class=md-primary><span ng-class=\\\"vm.company.companyEnableCheck == true ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">Pathway</span></md-checkbox></span></md-input-container></div></div><br><div layout-gt-sm=row class=fourth_column><div flex-gt-sm=47 class=\\\"md-card-div company_name\\\" ng-if=\\\"vm.accessTypeEnableCheck && !vm.portaEditCheck\\\" style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><div style=\\\"margin-bottom: 20px\\\" ng-class=\\\"vm.accessTypeEnableCheck == true ? \\'text\\' : \\'text-disable\\'\\\">Portal Type <span ng-class=\\\"vm.accessTypeEnableCheck == true ? \\'star\\' : \\'star-disable\\'\\\">*</span>   </div><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-radio-group ng-model=vm.company.portalType><md-radio-button ng-disabled=\\\"\\\" style=\\\"display: inline-block\\\" ng-click=\\\"vm.portalChange(\\'customer\\')\\\" value=customer class=md-primary>Customer</md-radio-button>   <md-radio-button ng-disabled=\\\"\\\" style=\\\"display: inline-block\\\" ng-click=\\\"vm.portalChange(\\'consignee\\')\\\" value=consignee class=md-primary>Consignee</md-radio-button>   <md-radio-button ng-disabled=\\\"\\\" style=\\\"display: inline-block\\\" ng-click=\\\"vm.portalChange(\\'shipper\\')\\\" value=shipper class=md-primary>Shipper</md-radio-button></md-radio-group></span></md-input-container></div><div flex-gt-sm=47 class=\\\"md-card-div company_name invisible-class-edit\\\" ng-if=vm.portaEditCheck style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><div ng-if=!vm.userEmailActiveCheck style=\\\"margin-bottom: 20px\\\" class=text-disable>Portal Type <span class=star-disable>*</span>   </div><div ng-if=vm.userEmailActiveCheck style=\\\"margin-bottom: 20px\\\" class=text>Portal Type <span class=star-disable>*</span>   </div><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-radio-group ng-model=vm.company.portalType><md-radio-button ng-disabled=vm.defaultDisabled style=\\\"display: inline-block\\\" value=customer class=md-primary>Customer</md-radio-button>   <md-radio-button ng-disabled=vm.defaultDisabled style=\\\"display: inline-block\\\" value=consignee class=md-primary>Consignee</md-radio-button>   <md-radio-button ng-disabled=vm.defaultDisabled style=\\\"display: inline-block\\\" value=shipper class=md-primary>Shipper</md-radio-button></md-radio-group></span></md-input-container></div><div flex-gt-sm=47 ng-if=vm.accessTypeEnableCheck ng-class=\\\"vm.customerTypeEnableCheck == true ? \\'visible-class\\' : \\'invisible-class\\'\\\" class=\\\"md-card-div space-customer-grid company_name\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><div style=\\\"margin-bottom: 20px\\\" ng-class=\\\"vm.customerTypeEnableCheck == true ? \\'text\\' : \\'text-disable\\'\\\">Customer Type <span ng-class=\\\"vm.customerTypeEnableCheck == true ? \\'star\\' : \\'star-disable\\'\\\">*</span>   </div><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=\\\"(vm.checkboxCustType || vm.portaEditCheck)\\\" ng-change=vm.cww_setup(vm.company.is_cww) ng-model=vm.company.is_cww aria-label=company class=md-primary><span ng-class=\\\"(vm.customerTypeEnableCheck) ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">CWW</span></md-checkbox></span><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=\\\"(vm.checkboxCustType || vm.portaEditCheck || vm.consignee_check)\\\" ng-change=vm.csl_setup(vm.company.is_csl) ng-model=vm.company.is_csl aria-label=company class=md-primary><span ng-class=\\\"(vm.customerTypeEnableCheck) ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">CSL</span></md-checkbox></span><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=\\\"(vm.checkboxCustType || vm.portaEditCheck)\\\" ng-change=vm.cfs_setup(vm.company.is_cfs) ng-model=vm.company.is_cfs aria-label=company class=md-primary><span ng-class=\\\"(vm.customerTypeEnableCheck) ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">CFS</span></md-checkbox></span><span style=\\\"font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=\\\"(vm.checkboxCustType || vm.portaEditCheck)\\\" ng-change=vm.cmts_setup(vm.company.is_cmts) ng-model=vm.company.is_cmts aria-label=company class=md-primary><span ng-class=\\\"(vm.customerTypeEnableCheck) ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">CMTS</span></md-checkbox></span></md-input-container></div></div><br><div id=cww-setup-box ng-if=vm.company.is_cww><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CWW SETUP</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Contacts</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.DEFAULT_CRANE_CONTACT></label><md-select ng-class=\\\"vm.readAccess ? \\'hide-select-icon\\' : \\'\\'\\\" ng-model=vm.company.cww_default_contact_id name=default_contact_id required ng-disabled=vm.readAccess ng-required=true md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() aria-label=default_contact_id><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select><div ng-show=vm.primaryContactCheckCww ng-messages=vm.formDetails.default_contact_id.$error><div ng-message=required><span translate=COMPANY.PRIMARY_CONTACT_REQUIRED></span></div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"margin-top: 41px\\\"><label translate=COMPANY.DEFAULT_BCC></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cww_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Party IDs</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.DEFAULT_PARTY_ID></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cww_party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIdsCww(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'current_user_parties\\',searchText,vm.company.portalType)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cww_party_check>Party ID / Group ID either one is mandatory</span></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin-top: 60px\\\"><label translate=COMPANY.DEFAULT_GROUP_ID></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cww_related_party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIdsCww(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'current_user_related_parties\\', searchText,vm.company.portalType)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips style=margin-top:20px><div flex-gt-sm=65 style=margin-bottom:10px layout=row layout-align=\\\"start center\\\"><md-checkbox style=\\\"margin: 0px\\\" ng-disabled=vm.readAccess ng-model=vm.company.show_discussion_module aria-label=company class=md-primary></md-checkbox> <span style=\\\"min-width: 110px\\\">Discussion</span><md-checkbox style=\\\"margin: 0px\\\" ng-disabled=vm.readAccess ng-model=vm.company.show_booking_shipment class=md-primary aria-label=company></md-checkbox> <span style=\\\"min-width: 135px\\\">Show Bookings</span><md-checkbox style=\\\"margin: 0px\\\" ng-disabled=vm.readAccess aria-label=company ng-model=vm.company.is_reskin class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Magno Reskin</span><md-checkbox ng-model=vm.company.view_action_board aria-label=company ng-change=ViewActionBoard(vm.company.view_action_board) class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Action Board</span></div><div flex-gt-sm=30 flex-offset-gt-sm=5><div ng-if=\\\"actionTimeOut || vm.company.view_action_board\\\"><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin-top: 0px\\\"><label>Refresh Time(in mins)</label><input type=text min=0 numbers-only ng-model=vm.company.refresh_time onkeypress=\\\"if(this.value.length==4 ) return false\\\" ng-change=checkRefreshTimeField(vm.company.refresh_time); name=refresh_time required><!-- <input type=\\\"number\\\" min=\\\"0\\\" id=\\\"allownumericwithoutdecimal\\\" onkeypress=\\\"if(this.value.length==4 ) return false;\\\" ng-model=\\\"vm.company.refresh_time\\\"/>--><div ng-messages=vm.formDetails.refresh_time.$error><div ng-message=required>Invalid refresh time</div><div ng-message=refresh_time>Invalid refresh time</div></div></md-input-container></div></div></div></md-card-content></md-card></div><div id=csl-setup-box ng-if=vm.company.is_csl><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CSL SETUP</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=48 flex-offset-gt-sm=6 style=margin-bottom:0px layout=row layout-align=\\\"end center\\\"><!-- <md-checkbox style=\\\"margin: 0px;\\\" ng-disabled=\\\"vm.readAccess\\\" ng-model=\\\"vm.company.show_discussion_module_csl\\\"\\r\\n class=\\\"md-primary\\\">\\r\\n </md-checkbox> <span style=\\\"min-width: 110px;\\\">Discussion</span> --><md-checkbox style=\\\"margin-right: 0\\\" ng-disabled=vm.readAccess aria-label=company ng-model=vm.company.is_show_class class=md-primary></md-checkbox> <span style=\\\"min-width: 110px\\\">Show Class</span><md-checkbox ng-disabled=vm.readAccess aria-label=company ng-model=vm.company.is_send_exception_email class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Do Not Send Exception Emails</span></div></div><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Contacts</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.DEFAULT_CRANE_CONTACT></label><md-select ng-class=\\\"vm.readAccess ? \\'hide-select-icon\\' : \\'\\'\\\" ng-model=vm.company.csl_default_contact_id name=default_contact_id aria-label=default_contact_id required ng-disabled=vm.readAccess ng-required=true md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select><div ng-show=vm.primaryContactCheckCsl ng-messages=vm.formDetails.default_contact_id.$error><div ng-message=required><span translate=COMPANY.PRIMARY_CONTACT_REQUIRED></span></div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"margin-top: 41px\\\"><label translate=COMPANY.DEFAULT_BCC></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.csl_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Customer IDs</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">Default Customer IDs</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.csl_customer_ids md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIdsCsl(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCsl(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.csl_party_check>Customer ID is mandatory</span></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><h3>Exception Threshold</h3><div layout=row><div style=\\\"position: relative;margin-right: 35px\\\"><i style=\\\"position: absolute;top: 30px;color: black\\\" ng-if=!vm.company.is_threshold_default class=material-icons></i> <i style=\\\"position: absolute;top: 30px;color: #bbb\\\" ng-if=vm.company.is_threshold_default class=material-icons></i></div><div style=\\\"margin-right: 15px\\\"><p ng-attr-style=\\\"{{(vm.company.is_threshold_default)?(\\'color:#bbb;font-size: 10px;margin: 0;padding: 0 12px;\\'):(\\'color:black;font-size: 10px;margin: 0;padding: 0 12px;\\')}}\\\" translate=\\\"\\\">Hours</p><md-input-container style=\\\"margin: 5px 0\\\" class=\\\"md-block error-hidden\\\" layout=row layout-align=\\\"center center\\\"><input type=text ng-attr-style=\\\"{{(vm.company.is_threshold_default)?(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;padding: 0px 10px;font-size: 25px;color: #bbb !important;\\'):(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;font-size: 25px;padding: 0px 10px;color: #45AFE3 !important;\\')}}\\\" ng-disabled=\\\"vm.readAccess || vm.company.is_threshold_default\\\" ng-model=vm.company.csl_exception_hours name=csl_exception_hours ng-change=\\\"vm.thresholdChange(vm.company.csl_exception_hours,\\'hrs\\')\\\" ng-pattern=/^\\\\d+$/ maxlength=2 required></md-input-container></div><div style=\\\"position: relative;margin-right: 15px\\\"><span style=\\\"position: absolute;top: 30px;color: #45AFE3\\\" ng-if=!vm.company.is_threshold_default>:</span> <span style=\\\"position: absolute;top: 30px;color: #bbb\\\" ng-if=vm.company.is_threshold_default>:</span></div><div style=\\\"margin-left: 0px;margin-right: 30px\\\"><p ng-attr-style=\\\"{{(vm.company.is_threshold_default)?(\\'color:#bbb;font-size: 10px;margin: 0;padding: 0 8px;\\'):(\\'color:black;font-size: 10px;margin: 0;padding: 0 8px;\\')}}\\\" translate=\\\"\\\">Minutes</p><md-input-container style=\\\"margin: 5px 0\\\" class=\\\"md-block error-hidden\\\"><input type=text ng-attr-style=\\\"{{(vm.company.is_threshold_default)?(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;padding: 0px 10px;font-size: 25px;color: #bbb !important;\\'):(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;font-size: 25px;padding: 0px 10px;color: #45AFE3 !important;\\')}}\\\" ng-disabled=\\\"vm.readAccess || vm.company.is_threshold_default\\\" ng-model=vm.company.csl_exception_minutes name=csl_exception_minutes ng-change=\\\"vm.thresholdChange(vm.company.csl_exception_minutes,\\'mins\\')\\\" ng-pattern=/^[0-5]?[0-9]$/ maxlength=2 required></md-input-container></div><div style=\\\"margin: 30px\\\"><md-checkbox ng-change=vm.csl_threshold_default(vm.company.is_threshold_default,vm.company.csl_exception_hours_exist,vm.company.csl_exception_minutes_exist) ng-disabled=vm.readAccess aria-label=companyCsl ng-model=vm.company.is_threshold_default class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Default</span></div></div><div><span style=color:red ng-show=vm.formDetails.csl_exception_hours.$error.pattern>Enter only numbers</span> <span style=color:red ng-show=vm.formDetails.csl_exception_minutes.$error.pattern>Minutes between 0-59 (enter number only)</span></div><div ng-if=thresholdCheck ng-hide=\\\"vm.formDetails.csl_exception_hours.$error.pattern || vm.formDetails.csl_exception_minutes.$error.pattern\\\" style=\\\"box-shadow: 0px 5px 10px 0px grey;padding: 5px\\\"><span style=\\\"color: #fd7600;font-style: italic\\\">The new threshold will not be affected any existing Live exceptions.<br><span ng-if=\\\"exceptionCount > 1 || exceptionCount == 0\\\">There are {{exceptionCount}} Live Exceptions for this customer.</span> <span ng-if=\\\"exceptionCount == 1\\\">There is {{exceptionCount}} Live Exception for this customer.</span> {{vm.formDetails.csl_exception_hours.$error.pattern}}{{vm.formDetails.csl_exception_minutes.$error.pattern}}</span></div></div></div></md-card-content></md-card></div><div id=cfs-setup-box ng-if=vm.company.is_cfs><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CFS SETUP</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=48 flex-offset-gt-sm=6 style=margin-bottom:0px layout=row layout-align=\\\"end center\\\"><md-checkbox style=\\\"margin-right: 0\\\" ng-disabled=vm.readAccess aria-label=company ng-model=vm.company.is_cfs_show_class class=md-primary></md-checkbox> <span style=\\\"min-width: 110px\\\">Show Class</span><md-checkbox ng-disabled=vm.readAccess aria-label=company ng-model=vm.company.is_cfs_send_exception_email class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Do Not Send Exception Emails</span></div></div><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Contacts</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.DEFAULT_CRANE_CONTACT></label><md-select ng-class=\\\"vm.readAccess ? \\'hide-select-icon\\' : \\'\\'\\\" ng-model=vm.company.cfs_default_contact_id name=default_contact_id aria-label=default_contact_id required ng-disabled=vm.readAccess ng-required=true md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select><div ng-show=vm.primaryContactCheckCfs ng-messages=vm.formDetails.default_contact_id.$error><div ng-message=required><span translate=COMPANY.PRIMARY_CONTACT_REQUIRED></span></div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"margin-top: 41px\\\"><label translate=COMPANY.DEFAULT_BCC></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cfs_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Customer IDs</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">Default Customer IDs</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cfs_customer_ids md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCfs(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cfs_party_check>Customer ID is mandatory</span></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><h3>Exception Threshold</h3><div layout=row><div style=\\\"position: relative;margin-right: 35px\\\"><i style=\\\"position: absolute;top: 30px;color: black\\\" ng-if=!vm.company.is_cfs_threshold_default class=material-icons></i> <i style=\\\"position: absolute;top: 30px;color: #bbb\\\" ng-if=vm.company.is_cfs_threshold_default class=material-icons></i></div><div style=\\\"margin-right: 15px\\\"><p ng-attr-style=\\\"{{(vm.company.is_cfs_threshold_default)?(\\'color:#bbb;font-size: 10px;margin: 0;padding: 0 12px;\\'):(\\'color:black;font-size: 10px;margin: 0;padding: 0 12px;\\')}}\\\" translate=\\\"\\\">Hours</p><md-input-container style=\\\"margin: 5px 0\\\" class=\\\"md-block error-hidden\\\" layout=row layout-align=\\\"center center\\\"><input type=text ng-attr-style=\\\"{{(vm.company.is_cfs_threshold_default)?(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;padding: 0px 10px;font-size: 25px;color: #bbb !important;\\'):(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;font-size: 25px;padding: 0px 10px;color: #45AFE3 !important;\\')}}\\\" ng-disabled=\\\"vm.readAccess || vm.company.is_cfs_threshold_default\\\" ng-model=vm.company.cfs_exception_hours name=cfs_exception_hours ng-change=\\\"vm.threshold_cfs_Change(vm.company.cfs_exception_hours,\\'hrs\\')\\\" ng-pattern=/^\\\\d+$/ maxlength=2 required></md-input-container></div><div style=\\\"position: relative;margin-right: 15px\\\"><span style=\\\"position: absolute;top: 30px;color: #45AFE3\\\" ng-if=!vm.company.is_cfs_threshold_default>:</span> <span style=\\\"position: absolute;top: 30px;color: #bbb\\\" ng-if=vm.company.is_cfs_threshold_default>:</span></div><div style=\\\"margin-left: 0px;margin-right: 30px\\\"><p ng-attr-style=\\\"{{(vm.company.is_cfs_threshold_default)?(\\'color:#bbb;font-size: 10px;margin: 0;padding: 0 8px;\\'):(\\'color:black;font-size: 10px;margin: 0;padding: 0 8px;\\')}}\\\" translate=\\\"\\\">Minutes</p><md-input-container style=\\\"margin: 5px 0\\\" class=\\\"md-block error-hidden\\\"><input type=text ng-attr-style=\\\"{{(vm.company.is_cfs_threshold_default)?(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;padding: 0px 10px;font-size: 25px;color: #bbb !important;\\'):(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;font-size: 25px;padding: 0px 10px;color: #45AFE3 !important;\\')}}\\\" ng-disabled=\\\"vm.readAccess || vm.company.is_cfs_threshold_default\\\" ng-model=vm.company.cfs_exception_minutes name=cfs_exception_minutes ng-change=\\\"vm.threshold_cfs_Change(vm.company.cfs_exception_minutes,\\'mins\\')\\\" ng-pattern=/^[0-5]?[0-9]$/ maxlength=2 required></md-input-container></div><div style=\\\"margin: 30px\\\"><md-checkbox ng-change=vm.cfs_threshold_default(vm.company.is_cfs_threshold_default,vm.company.cfs_exception_hours_exist,vm.company.cfs_exception_minutes_exist) ng-disabled=vm.readAccess aria-label=companyCfs ng-model=vm.company.is_cfs_threshold_default class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Default</span></div></div><div><span style=color:red ng-show=vm.formDetails.cfs_exception_hours.$error.pattern>Enter only numbers</span> <span style=color:red ng-show=vm.formDetails.cfs_exception_minutes.$error.pattern>Minutes between 0-59 (enter number only)</span></div><div ng-if=cfs_thresholdCheck ng-hide=\\\"vm.formDetails.cfs_exception_hours.$error.pattern || vm.formDetails.cfs_exception_minutes.$error.pattern\\\" style=\\\"box-shadow: 0px 5px 10px 0px grey;padding: 5px\\\"><span style=\\\"color: #fd7600;font-style: italic\\\">The new threshold will not be affected any existing Live exceptions.<br><span ng-if=\\\"exceptionCount > 1 || exceptionCount == 0\\\">There are {{exceptionCount}} Live Exceptions for this customer.</span> <span ng-if=\\\"exceptionCount == 1\\\">There is {{exceptionCount}} Live Exception for this customer.</span> {{vm.formDetails.cfs_exception_hours.$error.pattern}}{{vm.formDetails.cfs_exception_minutes.$error.pattern}}</span></div></div></div></md-card-content></md-card></div><div id=cmts-setup-box ng-if=vm.company.is_cmts><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CMTS SETUP</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=48 flex-offset-gt-sm=6 style=margin-bottom:0px layout=row layout-align=\\\"end center\\\"><md-checkbox ng-disabled=vm.readAccess aria-label=company ng-model=vm.company.is_cmts_send_exception_email class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Do Not Send Exception Emails</span></div></div><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Contacts</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.DEFAULT_CRANE_CONTACT></label><md-select ng-class=\\\"vm.readAccess ? \\'hide-select-icon\\' : \\'\\'\\\" ng-model=vm.company.cmts_default_contact_id name=default_contact_id aria-label=default_contact_id required ng-disabled=vm.readAccess ng-required=true md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select><div ng-show=vm.primaryContactCheckCmts ng-messages=vm.formDetails.default_contact_id.$error><div ng-message=required><span translate=COMPANY.PRIMARY_CONTACT_REQUIRED></span></div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"margin-top: 41px\\\"><label translate=COMPANY.DEFAULT_BCC></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cmts_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Trading Partner IDs</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">Default Trading Partner IDs</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cmts_customer_ids md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCmts(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cmts_party_check>Trading Partner ID is mandatory</span></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><h3>Exception Threshold</h3><div layout=row><div style=\\\"position: relative;margin-right: 35px\\\"><i style=\\\"position: absolute;top: 30px;color: black\\\" ng-if=!vm.company.is_cmts_threshold_default class=material-icons></i> <i style=\\\"position: absolute;top: 30px;color: #bbb\\\" ng-if=vm.company.is_cmts_threshold_default class=material-icons></i></div><div style=\\\"margin-right: 15px\\\"><p ng-attr-style=\\\"{{(vm.company.is_cmts_threshold_default)?(\\'color:#bbb;font-size: 10px;margin: 0;padding: 0 12px;\\'):(\\'color:black;font-size: 10px;margin: 0;padding: 0 12px;\\')}}\\\" translate=\\\"\\\">Hours</p><md-input-container style=\\\"margin: 5px 0\\\" class=\\\"md-block error-hidden\\\" layout=row layout-align=\\\"center center\\\"><input type=text ng-attr-style=\\\"{{(vm.company.is_cmts_threshold_default)?(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;padding: 0px 10px;font-size: 25px;color: #bbb !important;\\'):(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;font-size: 25px;padding: 0px 10px;color: #45AFE3 !important;\\')}}\\\" ng-disabled=\\\"vm.readAccess || vm.company.is_cmts_threshold_default\\\" ng-model=vm.company.cmts_exception_hours name=cmts_exception_hours ng-change=\\\"vm.threshold_cmts_Change(vm.company.cmts_exception_hours,\\'hrs\\')\\\" ng-pattern=/^\\\\d+$/ maxlength=2 required></md-input-container></div><div style=\\\"position: relative;margin-right: 15px\\\"><span style=\\\"position: absolute;top: 30px;color: #45AFE3\\\" ng-if=!vm.company.is_cmts_threshold_default>:</span> <span style=\\\"position: absolute;top: 30px;color: #bbb\\\" ng-if=vm.company.is_cmts_threshold_default>:</span></div><div style=\\\"margin-left: 0px;margin-right: 30px\\\"><p ng-attr-style=\\\"{{(vm.company.is_cmts_threshold_default)?(\\'color:#bbb;font-size: 10px;margin: 0;padding: 0 8px;\\'):(\\'color:black;font-size: 10px;margin: 0;padding: 0 8px;\\')}}\\\" translate=\\\"\\\">Minutes</p><md-input-container style=\\\"margin: 5px 0\\\" class=\\\"md-block error-hidden\\\"><input type=text ng-attr-style=\\\"{{(vm.company.is_cmts_threshold_default)?(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;padding: 0px 10px;font-size: 25px;color: #bbb !important;\\'):(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;font-size: 25px;padding: 0px 10px;color: #45AFE3 !important;\\')}}\\\" ng-disabled=\\\"vm.readAccess || vm.company.is_cmts_threshold_default\\\" ng-model=vm.company.cmts_exception_minutes name=cmts_exception_minutes ng-change=\\\"vm.threshold_cmts_Change(vm.company.cmts_exception_minutes,\\'mins\\')\\\" ng-pattern=/^[0-5]?[0-9]$/ maxlength=2 required></md-input-container></div><div style=\\\"margin: 30px\\\"><md-checkbox ng-change=vm.cmts_threshold_default(vm.company.is_cmts_threshold_default,vm.company.cmts_exception_hours_exist,vm.company.cmts_exception_minutes_exist) ng-disabled=vm.readAccess aria-label=companyCmts ng-model=vm.company.is_cmts_threshold_default class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Default</span></div></div><div><span style=color:red ng-show=vm.formDetails.cmts_exception_hours.$error.pattern>Enter only numbers</span> <span style=color:red ng-show=vm.formDetails.cmts_exception_minutes.$error.pattern>Minutes between 0-59 (enter number only)</span></div><div ng-if=cmts_thresholdCheck ng-hide=\\\"vm.formDetails.cmts_exception_hours.$error.pattern || vm.formDetails.cmts_exception_minutes.$error.pattern\\\" style=\\\"box-shadow: 0px 5px 10px 0px grey;padding: 5px\\\"><span style=\\\"color: #fd7600;font-style: italic\\\">The new threshold will not be affected any existing Live exceptions.<br><span ng-if=\\\"exceptionCount > 1 || exceptionCount == 0\\\">There are {{exceptionCount}} Live Exceptions for this customer.</span> <span ng-if=\\\"exceptionCount == 1\\\">There is {{exceptionCount}} Live Exception for this customer.</span> {{vm.formDetails.cmts_exception_hours.$error.pattern}}{{vm.formDetails.cmts_exception_minutes.$error.pattern}}</span></div></div></div></md-card-content></md-card></div><div layout-gt-sm=row class=fourth_column><div flex-gt-sm=45 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-checkbox ng-disabled=vm.readAccess aria-label=companyIsdemo ng-model=vm.company.is_demo class=md-primary></md-checkbox>     <span style=\\\"font-weight: 700\\\">Demo Company</span></div></div><br></md-card-content></form></md-card><!--<section ng-if=\\\"vm.logsVisible()\\\">--><!--<log-company-record data=\\\"vm.company\\\"></log-record>--><!--</section>--><!-- <section class=\\\"md-card-light\\\" ng-controller=\\\"lensviewDepartmentsController as vm\\\">\\r\\n <div ng-include=\\\"\\'/app/admin/lensview/departments/lensview-departments.html\\'\\\"></div>\\r\\n </section> --><section ng-controller=\\\"lensviewDepartmentsController as lv\\\" ng-show=!vm.isCreate><crane-table title=DEPARTMENTS icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.departmenttitle is-loading=lv.isLoading.table is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag menu=\\\"\\'/app/admin/lensview/forms/department-actions.html\\'\\\" ctrl=lensviewDepartmentsController></crane-table></section><section ng-controller=\\\"lensviewController as lv\\\" ng-show=\\\"!vm.isCreate && !vm.page_from.hide_section\\\"><crane-table title=\\\"Lens Groups\\\" icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=lv.isLoading.table is-no-results=lv.noResults buttons=lv.lensGroupButtons searchflag=lv.searchflag menu=\\\"\\'/app/admin/lensview/forms/lensgroup-actions.html\\'\\\" ctrl=lensviewController></crane-table></section><section ng-controller=\\\"cslExceptionController as lv\\\" ng-show=\\\"!vm.isCreate && vm.company.is_csl && !vm.page_from.hide_section\\\"><crane-table title=\\\"CSL EXCEPTION APPROVERS\\\" icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=lv.isLoading.table is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag menu=\\\"\\'/app/admin/lensview/forms/exception-actions.html\\'\\\" ctrl=cslExceptionController></crane-table></section><section ng-controller=\\\"cfsExceptionController as lv\\\" ng-show=\\\"!vm.isCreate && vm.company.is_cfs && !vm.page_from.hide_section\\\"><crane-table title=\\\"CFS EXCEPTION APPROVERS\\\" icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=lv.isLoading.table is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag menu=\\\"\\'/app/admin/lensview/forms/exception-actions.html\\'\\\" ctrl=cfsExceptionController></crane-table></section><section class=md-card-light ng-controller=\\\"lensviewUsersController as lv\\\" ng-show=\\\"!vm.isCreate && !vm.page_from.hide_section\\\"><crane-table title=Users icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=lv.lensviewtitle is-loading=lv.isLoading.table is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag ctrl=lensviewUsersController></crane-table></section><section ng-if=vm.logs_visible><div ng-include=\\\"\\'/app/admin/companies/log.html\\'\\\"></div></section></div></cva-shell><script>$(document).ready(function(){\\r\\n $(\\\"#allownumericwithoutdecimal\\\").on(\\\"keypress keyup blur\\\",function (event) {\\r\\n $(this).val($(this).val().replace(/[^\\\\d].+/, \\\"\\\"));\\r\\n\\r\\n if ((event.which < 48 || event.which > 57)) {\\r\\n event.preventDefault();\\r\\n }\\r\\n });\\r\\n\\r\\n})</script>\");\n$templateCache.put(\"/app/admin/companies/verify-companies.html\",\"<cva-shell><style>.send-button :enabled :hover { \\r\\n cursor: pointer \\r\\n } \\r\\n .send-button :disabled:hover {\\r\\n cursor: no-drop;\\r\\n }\\r\\n\\r\\n .md-chips:not(.md-readonly) {\\r\\n cursor: text;\\r\\n border-bottom-color: #5E6163;\\r\\n}</style><form class=\\\"form-horizontal light-form\\\" name=vm.bulkCompaniesForm><div class=\\\"shell-padding shipping-details content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1><span translate=COMPANY.VERIFY_COMPANIES></span></span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/companies class=parent-link><span translate=COMPANY.COMPANY></span></a> / <a href=/companies/import-companies class=parent-link><span translate=COMPANY.IMPORT_COMPANY></span> </a>/ <span translate=COMPANY.VERIFY_COMPANIES></span></span></div></div></div><div layout-gt-sm=row layout-align=end class=p-a-sm><span class=\\\"btn-link btn-block-sm {{vm.bulkFilter.value == \\'all\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'all\\')\\\">View All<span class=text-sub>({{vm.counts.all}})</span> </span><span class=\\\"btn-link btn-block-sm {{vm.bulkFilter.value == \\'errors\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'errors\\')\\\">View Errors Only<span class=text-sub>({{ vm.counts.errors}})</span></span></div><md-card class=loadmask-light loadmask=!vm.isLoading><md-toolbar><div class=md-toolbar-tools><h2><span translate=COMPANY.IMPORT_COMPANIES></span></h2><span flex=auto></span><md-button class=md-raised ng-click=vm.addCompanyToBulk() ng-hide=true><span translate=COMPANY.ADD_COMPANY></span></md-button><!--<md-button\\r\\n class=\\'md-raised\\'\\r\\n ng-click=\\\"vm.add_company()\\\">\\r\\n <md-icon>add</md-icon>\\r\\n <span translate=\\\"COMPANY.COMPANY\\\"></span>\\r\\n </md-button>\\r\\n <md-button\\r\\n class=\\'md-raised\\'\\r\\n ng-click=\\\"vm.refreshCompanies()\\\">\\r\\n <md-icon>refresh</md-icon>\\r\\n <span translate=\\\"TRACKTRACE.REFRESH\\\"></span>\\r\\n </md-button>--><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event) ng-hide=true><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><!-- <md-menu-item>\\r\\n <md-button ng-click=\\\"vm.clearSection(\\'reference_numbers\\')\\\">\\r\\n <div layout=\\\"row\\\" flex>\\r\\n <p flex><span translate=USER.BULK.CLEAR_SECTION></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n <md-menu-item ng-show=\\\"!vm.showRefNumRemoveButton && vm.reference_numbers.length > 1\\\">\\r\\n <md-button ng-click=\\\"vm.editRefNumRows()\\\">\\r\\n <div layout=\\\"row\\\" flex>\\r\\n <p flex><span translate=“BOOKSHIPMENT.EDIT_ROWS”></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n <md-menu-item ng-show=\\\"vm.showRefNumRemoveButton && vm.reference_numbers.length > 1\\\">\\r\\n <md-button ng-click=\\\"vm.doneEditingRefNums()\\\">\\r\\n <div layout=\\\"row\\\" flex>\\r\\n <p flex><span translate=“BOOKSHIPMENT.DONE_EDITING”></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item> --></md-menu-content></md-menu></div></md-toolbar><md-card-content><md-card class=\\\"m-0 p-a-sm table-scroll\\\"><table class=card-content-table style=\\\"color: #FFF\\\"><thead><!--<div layout=\\\"row\\\">--><th><span style=\\\"font-weight: bold\\\"><input ng-model=vm.selectAllChecked ng-change=vm.selectAll() type=checkbox></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.NAME></span><span style=\\\"font-weight: bold;color: red\\\">*</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.ACCESS_TYPE></span><span style=\\\"font-weight: bold;color: red\\\">*</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.PORTAL_TYPE></span><span style=\\\"font-weight: bold;color: red\\\">*</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CUSTOMER_TYPE></span><span style=\\\"font-weight: bold;color: red\\\">*</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CWW_DEFAULT_CONTACT></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CWW_DEFAULT_BCCS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CWW_PARTY_IDS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CWW_GROUP_IDS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.ENABLE_DISCUSSION></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.ENABLE_SHOW_BOOKINGS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.ENABLE_MAGNO_SKIN></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.ENABLE_ACTION_BOARD></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.REFRESH_TIME></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CSL_DEFAULT_CONTACT></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CSL_DEFAULT_BCCS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CSL_CUSTOMER_IDS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CSL_SHOW_CLASS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CSL_EXCEPTION_EMAIL></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CSL_EXCEPTION_THRESHOLD></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CFS_DEFAULT_CONTACT></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CFS_DEFAULT_BCCS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CFS_CUSTOMER_IDS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CFS_SHOW_CLASS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CFS_EXCEPTION_EMAIL></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CFS_EXCEPTION_THRESHOLD></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CMTS_DEFAULT_CONTACT></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CMTS_DEFAULT_BCCS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CMTS_TRADING_PARTNER_IDS></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CMTS_EXCEPTION_EMAIL></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.CMTS_EXCEPTION_THRESHOLD></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=COMPANY.ENABLE_DEMO></span><span style=\\\"font-weight: bold;color: red\\\">*</span></th></thead><!--</div>--><!--</md-card>--><tbody ng-repeat=\\\"cmpy in vm.companies track by $index\\\" ng-show=\\\"(vm.rowHasErrors($index) && vm.bulkFilter === \\'errors\\') || (vm.bulkFilter === \\'all\\') \\\"><td class=td-5><md-input-container class=\\\"md-block error-hidden\\\"><label></label><input ng-model=cmpy.row ng-click=\\\"vm.selectCompany($event, $index)\\\" ng-change=\\\"vm.selectAllChecked = false\\\" name=\\\"{{\\'row-\\'+$index}}\\\" type=checkbox></md-input-container></td><!-- Name --><td class=td-30 style=min-width:200px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.NAME></label><input ng-model=cmpy.name ng-model-options=\\\"{ debounce: 200 }\\\" name=\\\"{{\\'name-\\'+$index}}\\\" required readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'name-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'name-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=name>This company is already in use</div></div></md-input-container></td><!-- Access Type --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.ACCESS_TYPE></label><input ng-model=cmpy.access_type name=\\\"{{\\'access_type-\\'+$index}}\\\" required readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'access_type-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'access_type-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=access_type>Invalid access type</div></div></md-input-container></td><!-- Portal Type --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.PORTAL_TYPE></label><input ng-model=cmpy.portal_type name=\\\"{{\\'portal_type-\\'+$index}}\\\" required readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'portal_type-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'portal_type-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=portal_type>Invalid portal type</div></div></md-input-container></td><!-- Customer Type --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CUSTOMER_TYPE></label><input ng-model=cmpy.customer_types name=\\\"{{\\'customer_types-\\'+$index}}\\\" required readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'customer_types-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'customer_types-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=customer_types>Invalid customer type</div></div></md-input-container></td><!-- Cww Default Contact --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CWW_DEFAULT_CONTACT></label><input ng-model=cmpy.cww_default_contact name=\\\"{{\\'cww_default_contact-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cww_default_contact-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cww_default_contact-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cww_default_contact>Invalid cww default contact</div></div></md-input-container></td><!-- Cww Default Bccs --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CWW_DEFAULT_BCCS></label><input ng-model=cmpy.cww_default_bccs name=\\\"{{\\'cww_default_bccs-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cww_default_bccs-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cww_default_bccs-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cww_default_bccs>Invalid cww default bccs</div></div></md-input-container></td><!-- Cww Party Ids--><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CWW_PARTY_IDS></label><input ng-model=cmpy.cww_party_ids name=\\\"{{\\'cww_party_ids-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cww_party_ids-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cww_party_ids-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cww_party_ids>Invalid cww party id\\'s</div></div></md-input-container></td><!-- Cww Group Ids--><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CWW_GROUP_IDS></label><input ng-model=cmpy.cww_group_ids name=\\\"{{\\'cww_group_ids-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cww_group_ids-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cww_group_ids-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cww_group_ids>Invalid cww group id\\'s</div></div></md-input-container></td><!-- Enable Discussion --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.ENABLE_DISCUSSION></label><input ng-model=cmpy.cww_enable_discussion name=\\\"{{\\'cww_enable_discussion-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cww_enable_discussion-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cww_enable_discussion-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cww_enable_discussion>Invalid cww enable discussion</div></div></md-input-container></td><!-- Enable Show Booking --><td class=td-30 style=min-width:180px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.ENABLE_SHOW_BOOKINGS></label><input ng-model=cmpy.cww_enable_show_bookings name=\\\"{{\\'cww_enable_show_bookings-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cww_enable_show_bookings-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cww_enable_show_bookings-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cww_enable_show_bookings>Invalid cww enable show bookings</div></div></md-input-container></td><!-- Enable Mango Skin --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.ENABLE_MAGNO_SKIN></label><input ng-model=cmpy.cww_enable_magno_skin name=\\\"{{\\'cww_enable_magno_skin-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cww_enable_magno_skin-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cww_enable_magno_skin-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cww_enable_magno_skin>Invalid cww enable magno skin</div></div></md-input-container></td><!-- Enable Action Board --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.ENABLE_ACTION_BOARD></label><input ng-model=cmpy.cww_enable_action_board name=\\\"{{\\'cww_enable_action_board-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cww_enable_action_board-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cww_enable_action_board-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cww_enable_action_board>Invalid cww enable action board</div></div></md-input-container></td><!--Refresh Time --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.REFRESH_TIME></label><input ng-model=cmpy.cww_refresh_time name=\\\"{{\\'cww_refresh_time-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cww_refresh_time-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cww_refresh_time-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cww_refresh_time>Invalid cww refresh time</div></div></md-input-container></td><!-- CSL Default Contact --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CSL_DEFAULT_CONTACT></label><input ng-model=cmpy.csl_default_contact name=\\\"{{\\'csl_default_contact-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'csl_default_contact-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'csl_default_contact-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=csl_default_contact>Invalid csl default contact</div></div></md-input-container></td><!-- CSL Default Bccs --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CSL_DEFAULT_BCCS></label><input ng-model=cmpy.csl_default_bccs name=\\\"{{\\'csl_default_bccs-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'csl_default_bccs-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'csl_default_bccs-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=csl_default_bccs>Invalid csl default bccs</div></div></md-input-container></td><!-- CSL Customer Ids --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CSL_CUSTOMER_IDS></label><input ng-model=cmpy.csl_customer_ids name=\\\"{{\\'csl_customer_ids-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'csl_customer_ids-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'csl_customer_ids-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=csl_customer_ids>Invalid csl customer id\\'s</div></div></md-input-container></td><!-- CSL Show Class --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CSL_SHOW_CLASS></label><input ng-model=cmpy.csl_show_class name=\\\"{{\\'csl_show_class-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'csl_show_class-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'csl_show_class-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=csl_show_class>Invalid csl show class</div></div></md-input-container></td><!-- CSL Exception Email --><td class=td-30 style=min-width:175px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CSL_EXCEPTION_EMAIL></label><input ng-model=cmpy.csl_send_exception_email name=\\\"{{\\'csl_send_exception_email-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'csl_send_exception_email-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'csl_send_exception_email-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=csl_send_exception_email>Invalid csl exception email</div></div></md-input-container></td><!-- CSL Exception Threshold --><td class=td-30 style=min-width:175px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CSL_EXCEPTION_THRESHOLD></label><input ng-model=cmpy.csl_exception_threshold name=\\\"{{\\'csl_exception_threshold-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'csl_exception_threshold-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'csl_exception_threshold-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=csl_exception_threshold>Invalid csl exception threshold</div></div></md-input-container></td><!-- CFS Default Contact --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CFS_DEFAULT_CONTACT></label><input ng-model=cmpy.cfs_default_contact name=\\\"{{\\'cfs_default_contact-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cfs_default_contact-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cfs_default_contact-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cfs_default_contact>Invalid cfs default contact</div></div></md-input-container></td><!-- CFS Default Bccs --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CFS_DEFAULT_BCCS></label><input ng-model=cmpy.cfs_default_bccs name=\\\"{{\\'cfs_default_bccs-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cfs_default_bccs-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cfs_default_bccs-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cfs_default_bccs>Invalid cfs default bccs</div></div></md-input-container></td><!-- CFS Customer Ids --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CFS_CUSTOMER_IDS></label><input ng-model=cmpy.cfs_customer_ids name=\\\"{{\\'cfs_customer_ids-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cfs_customer_ids-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cfs_customer_ids-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cfs_customer_ids>Invalid cfs customer id\\'s</div></div></md-input-container></td><!-- CFS Show Class --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CFS_SHOW_CLASS></label><input ng-model=cmpy.cfs_show_class name=\\\"{{\\'cfs_show_class-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cfs_show_class-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cfs_show_class-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cfs_show_class>Invalid cfs show class</div></div></md-input-container></td><!-- CFS Exception Email --><td class=td-30 style=min-width:175px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CFS_EXCEPTION_EMAIL></label><input ng-model=cmpy.cfs_send_exception_email name=\\\"{{\\'cfs_send_exception_email-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cfs_send_exception_email-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cfs_send_exception_email-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cfs_send_exception_email>Invalid cfs exception email</div></div></md-input-container></td><!-- CFS Exception Threshold --><td class=td-30 style=min-width:175px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CFS_EXCEPTION_THRESHOLD></label><input ng-model=cmpy.cfs_exception_threshold name=\\\"{{\\'cfs_exception_threshold-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cfs_exception_threshold-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cfs_exception_threshold-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cfs_exception_threshold>Invalid cfs exception threshold</div></div></md-input-container></td><!-- CMTS Default Contact --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CMTS_DEFAULT_CONTACT></label><input ng-model=cmpy.cmts_default_contact name=\\\"{{\\'cmts_default_contact-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cmts_default_contact-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cmts_default_contact-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cmts_default_contact>Invalid cmts default contact</div></div></md-input-container></td><!-- CMTS Default Bccs --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CMTS_DEFAULT_BCCS></label><input ng-model=cmpy.cmts_default_bccs name=\\\"{{\\'cmts_default_bccs-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cmts_default_bccs-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cmts_default_bccs-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cmts_default_bccs>Invalid cmts default bccs</div></div></md-input-container></td><!-- CMTS Trading Partner Ids --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CMTS_TRADING_PARTNER_IDS></label><input ng-model=cmpy.cmts_trading_partner_ids name=\\\"{{\\'cmts_trading_partner_ids-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cmts_trading_partner_ids-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cmts_trading_partner_ids-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cmts_trading_partner_ids>Invalid cmts trading partner id\\'s</div></div></md-input-container></td><!-- CMTS Exception Email --><td class=td-30 style=min-width:175px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CMTS_EXCEPTION_EMAIL></label><input ng-model=cmpy.cmts_send_exception_email name=\\\"{{\\'cmts_send_exception_email-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cmts_send_exception_email-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cmts_send_exception_email-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cmts_send_exception_email>Invalid cmts exception email</div></div></md-input-container></td><!-- CMTS Exception Threshold --><td class=td-30 style=min-width:175px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.CMTS_EXCEPTION_THRESHOLD></label><input ng-model=cmpy.cmts_exception_threshold name=\\\"{{\\'cmts_exception_threshold-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'cmts_exception_threshold-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'cmts_exception_threshold-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=cmts_exception_threshold>Invalid cmts exception threshold</div></div></md-input-container></td><!-- Enable Demo --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.ENABLE_DEMO></label><input ng-model=cmpy.enable_demo name=\\\"{{\\'enable_demo-\\'+$index}}\\\" readonly><div ng-messages=\\\"vm.bulkCompaniesForm[\\'enable_demo-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkCompaniesForm[\\'enable_demo-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=enable_demo>Invalid enable demo</div></div></md-input-container></td></tbody></table></md-card><div layout=row><div layout=row layout-align=start flex=auto class=m-t><md-button class=md-raised ng-click=vm.cancel()><span translate=COMPANY.CANCEL></span></md-button></div><div layout=row layout-align=end flex=auto class=m-t><md-button class=\\\"md-raised md-primary\\\" ng-disabled=\\\"!(vm.selectedRowsValid()) || !(vm.selectedCompanies(vm.companies).length > 0)\\\" ng-click=vm.postBulkCompanies() type=submit><span translate=COMPANY.SUBMIT></span></md-button></div></div></md-card-content></md-card></div></form><div class=\\\"shell-padding shipping-details content-max\\\" id=toast-parent ng-show=\\\"vm.counts.errors>0 \\\"><md-card class=loadmask-light loadmask=!vm.isSendEmailLoading><md-toolbar><div class=md-toolbar-tools><h2><span style=text-transform:uppercase>Send Email</span></h2></div></md-toolbar><md-card-content><div layout=row layout-align=center flex=auto class=m-t><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"text-transform:capitalize;font-size: 20px;color: #b4b5b5\\\">Enter email</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.emailList md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container><button class=\\\"md-raised md-primary md-button md-ink-ripple send-button\\\" ng-click=vm.sendErrorsToEmails() ng-disabled=\\\"vm.emailList.length === 0\\\" style=\\\"height: 12px;margin: 2%;background-color: rgb(35, 58, 105);color: #FFF\\\" type=button>Send</button></div></div></md-card-content></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/admin/create-account/create-user.html\",\"<cva-shell><md-content flex=auto layout-padding><md-toolbar class=\\\"md-tall md-accent\\\" style=\\\"margin-bottom: -42px\\\"><h2 class=md-toolbar-tools><span translate=ADMIN.CREATE_USER></span></h2></md-toolbar><div layout=row layout-align=\\\"center center\\\" style=\\\"position:relative; z-index:3\\\"><div flex=auto><md-card><md-card-content><form name=form reset-directive=adminCtrl.newUser novalidate><div layout=row layout-align=center><div flex=auto><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.FIRST_NAME></label><input data-ng-model=adminCtrl.newUser.first_name type=text name=first-name required></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.DISPLAY_NAME></label><input data-ng-model=adminCtrl.newUser.display_name type=text name=display-name></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.EMAIL_ADDRESS></label><input data-ng-model=adminCtrl.newUser.email_address type=text name=address placeholder=\\\"{{\\'ADMIN.REFERENCE_NUM\\' | translate}}\\\" required></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.CRANE_POC></label><input data-ng-model=adminCtrl.newUser.crane_poc type=text name=crane-poc placeholder=\\\"{{\\'ADMIN.REFERENCE_NUM\\' | translate}}\\\"></md-input-container></div><div flex=auto><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.LAST_NAME></label><input data-ng-model=adminCtrl.newUser.last_name type=text name=last-name placeholder=\\\"{{\\'ADMIN.BOOKING_NUM\\' | translate}}\\\" required></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.USER_GROUP></label><input data-ng-model=adminCtrl.newUser.user_group type=text name=user-group placeholder=\\\"{{\\'ADMIN.JOB_NUM\\' | translate}}\\\"></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.PHONE></label><input data-ng-model=adminCtrl.newUser.phone type=text name=phone placeholder=\\\"{{\\'ADMIN.MASTER_BILL\\' | translate}}\\\"></md-input-container></div></div><div layout=row layout-align=center><md-button type=reset value=Reset class=\\\"md-raised md-primary\\\"><span translate=ADMIN.CLEAR_BUTTON></span></md-button><md-button class=\\\"md-raised md-primary\\\" ng-click=adminCtrl.createUser()><span translate=ADMIN.CREATE_BUTTON></span></md-button></div></form></md-card-content></md-card></div></div></md-content></cva-shell>\");\n$templateCache.put(\"/app/admin/create-locations/add-locations-modal.html\",\"<!-- CreateLocationsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog light-form add-locations-modal\\\"><md-toolbar><div class=md-toolbar-tools><h2 translate=ADMIN.POTENTIAL.ADD_LOCATIONS></h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><div layout=row><md-autocomplete md-selected-item=selectedManualLocation md-search-text=manualLocationSearchText md-selected-item-change=selectedManualLocationChange(item) md-input-id={{searchField}} md-items=\\\"item in autocomplete(field, manualLocationSearchText)\\\" md-item-text=item.display md-min-length=2 md-floating-label=\\\"{{\\'ADMIN.POTENTIAL.SEARCH_LOCATIONS\\' | translate}}\\\" md-delay=300 class=\\\"md-block error-hidden\\\"><md-item-template><span md-highlight-text=manualLocationSearchText>{{item.display}}</span></md-item-template><md-not-found>No entries were found.</md-not-found></md-autocomplete></div><div layout=row flex=auto><md-chips ng-model=chipManualLocations md-on-select=\\\"\\\" md-on-remove=\\\"\\\" flex=auto flex-fill><md-chip-template flex=auto><div layout=row><div flex=80><strong class=long-chip>{{$chip.chipDisplay}}</strong></div><div flex=none>{{$chip.value}}</div></div></md-chip-template></md-chips></div><div layout=row><span flex=auto></span><div layout-align=\\\"end end\\\"><md-button ng-click=addManualLocations()><span translate=ADMIN.POTENTIAL.ADD_LOCATIONS></span></md-button></div></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/admin/create-locations/create-locations.html\",\"<div layout-gt-sm=row layout-align-gt-sm=\\\"start center\\\" flex=auto><div flex-gt-sm=25><form ng-if=\\\"vm.ports.length > 0\\\" ng-submit=vm.searchChips()><div class=search-input-group><input ng-model=vm.searchField name=searchField placeholder=\\\"{{\\'ADMIN.POTENTIAL.SEARCH_AFFECTED_PORTS\\' | translate}}\\\" class=\\\"form-control input-box\\\" ng-change=vm.searchChips()><md-button class=md-icon-button aria-label=search type=submit><md-icon></md-icon></md-button></div></form></div><div flex=auto></div><div><span ng-if=\\\"vm.portChips.length > 0\\\"><md-button class=btn-block-sm ng-click=vm.checkAllChips() aria-label=\\\"{{\\'ADMIN.POTENTIAL.CHECK_ALL\\' | translate}}\\\" ng-disabled=!vm.isEditable()><span translate=ADMIN.POTENTIAL.CHECK_ALL></span></md-button><md-button class=btn-block-sm ng-click=vm.uncheckAllChips() aria-label=\\\"{{\\'ADMIN.POTENTIAL.UNCHECK_ALL\\' | translate}}\\\" ng-disabled=!vm.isEditable()><span translate=ADMIN.POTENTIAL.UNCHECK_ALL></span></md-button></span><md-button class=btn-block-sm ng-click=vm.showAddLocations() aria-label=\\\"{{\\'ADMIN.POTENTIAL.ADD_LOCATIONS\\' | translate}}\\\" ng-disabled=!vm.isEditable()><span translate=ADMIN.POTENTIAL.ADD_LOCATIONS></span></md-button></div></div><div class=loadmask-light loadmask=!vm.chipsLoading><div ng-show=\\\"vm.portChips.length == 0\\\" layout=row layout-align=\\\"center center\\\"><h2>{{\\'ADMIN.POTENTIAL.NO_PORTS\\' | translate | filter | uppercase}}</h2></div><!-- CHIPS --><md-chips ng-model=vm.portChips class=\\\"md-chips custom-chip long-chip no-x dynamic-chips\\\"><md-chip-template ng-click=vm.checkChip($chip) class=\\\"{{$chip.checkbox ? \\'md-chip-selected\\' : \\'md-chip-unselected\\'}}\\\"><div layout=row><strong class=long-chip>{{$chip.description}}</strong> <span flex=auto></span> <span class=city-select>{{$chip.country_city_code}}<md-checkbox ng-model=$chip.checkbox class=no-margin aria-label=\\\"Include Selection\\\" ng-change=vm.checkChip($chip) ng-disabled=!vm.isEditable()></md-checkbox></span></div></md-chip-template></md-chips><!-- PAGINATION CONTROLS --><div ng-if=\\\"vm.portChips.length > 0\\\" layout-gt-xs=row layout-xs=column><div layout=row><!-- buttons for which page to show --> <button class=pagination-button ng-click=\\\"vm.changePage(vm.pageNum - 1)\\\"><</button> <button class=\\\"{{vm.pageNum == 1 ? \\'current-button\\' : \\'pagination-button\\'}}\\\" ng-show=\\\"vm.lastPage > 0\\\" ng-click=vm.changePage(1)>1</button><!-- repeat through pageRange --> <span ng-repeat=\\\"page in vm.pageRange\\\"><button class=\\\"{{vm.pageNum == page ? \\'current-button\\' : \\'pagination-button\\'}}\\\" ng-show=\\\"vm.lastPage > page && page > 1\\\" ng-click=vm.changePage(page)>{{page}}</button> </span><button class=\\\"{{vm.pageNum == vm.lastPage ? \\'current-button\\' : \\'pagination-button\\'}}\\\" ng-show=\\\"vm.lastPage > 1\\\" ng-click=vm.changePage(vm.lastPage)>{{vm.lastPage}}</button> <button class=pagination-button ng-click=\\\"vm.changePage(vm.pageNum + 1)\\\">></button></div><span flex=auto></span><br show-xs><div layout=row><!-- buttons for results per page --> <button class=\\\"{{vm.perPage == 30 ? \\'perPage-select\\' : \\'perPage-button\\'}}\\\" ng-click=vm.changePerPage(30)>30</button> <button class=\\\"{{vm.perPage == 60 ? \\'perPage-select\\' : \\'perPage-button\\'}}\\\" ng-click=vm.changePerPage(60)>60</button> <button class=\\\"{{vm.perPage == 90 ? \\'perPage-select\\' : \\'perPage-button\\'}}\\\" ng-click=vm.changePerPage(90)>90</button></div></div><br></div>\");\n$templateCache.put(\"/app/admin/create-map/create-map.html\",\"<md-card class=m-t><md-toolbar><div class=md-toolbar-tools><h2 translate=ADMIN.POTENTIAL.EXCEPTION_LOCATION></h2></div></md-toolbar><md-card-content class=p-md><h2 class=m-t-0 translate=ADMIN.POTENTIAL.IDENTIFY_LOCATION></h2><!--<div id=\\\"map2\\\" class=\\\"google-map\\\" lat=\\\"48.833\\\" long=\\\"2.333\\\"> --><div ng-controller=\\\"CreateMapController as vmMap\\\"><!-- deactivates map till it has been clicked --><div class=map-overlay onclick=\\\"style.pointerEvents=\\'none\\'\\\"></div><div id=googleMap load={{vmMap.initialize()}}><div id=map-overlay style=\\\"display: none\\\"></div></div></div><div class=m-b><span translate=ADMIN.POTENTIAL.SELECT_LOCATION></span></div><div ng-include=\\\"\\'/app/admin/create-locations/create-locations.html\\'\\\"></div><div ng-include=\\\"\\'/app/admin/create-potential-exceptions/action-buttons.html\\'\\\"></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/action-buttons.html\",\"<div layout-gt-xs=row layout-xs=column layout-align-gt-xs=\\\"end end\\\" layout-align-xs=\\\"start start\\\" flex=auto class=btn-row><!-- PEs in draft always have the same options : vm.isNew --><md-button class=\\\"md-raised search-type\\\" ng-if=vm.isNew ng-click=vm.saveAsDraft(ev) ng-disabled=vm.isActionDisabled><span ng-hide=vm.isActionLoading.saveDraft><span translate=ADMIN.POTENTIAL.SAVE_AS_DRAFT></span></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isActionLoading.saveDraft class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><md-button class=\\\"md-raised search-type md-accent remove-marginLeft-xs\\\" ng-if=vm.isNew ng-click=vm.submitButton(ev) ng-disabled=\\\"vm.isActionDisabled || !vm.formIsValid\\\"><span ng-hide=vm.isActionLoading.submit><span translate=ADMIN.POTENTIAL.SUBMIT></span></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isActionLoading.submit class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><!-- if the PE is a draft : vm.isDraft --><md-button class=\\\"remove-marginLeft-xs md-raised search-type btn-danger\\\" ng-if=\\\"vm.isDraft && !vm.isNew\\\" ng-click=\\\"vm.showModal(ev, \\'delete\\')\\\" ng-disabled=vm.isActionDisabled><span translate=ADMIN.POTENTIAL.DELETE></span></md-button><md-button class=\\\"remove-marginLeft-xs md-raised search-type\\\" ng-if=vm.isDraft ng-click=vm.saveAsDraft(ev) ng-disabled=vm.isActionDisabled><span ng-hide=vm.isActionLoading.saveDraft><span translate=ADMIN.POTENTIAL.SAVE_AS_DRAFT></span></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isActionLoading.saveDraft class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><md-button class=\\\"remove-marginLeft-xs md-raised search-type md-accent\\\" ng-if=vm.isDraft ng-click=vm.submitButton(ev) ng-disabled=\\\"vm.isActionDisabled || !vm.formIsValid\\\"><span ng-hide=vm.isActionLoading.submit><span translate=ADMIN.POTENTIAL.SUBMIT></span></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isActionLoading.submit class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><!-- If the PE has been published : vm.isPublished --><!-- edit mode : !vm.isEditable() && vm.isValidator --><md-button class=\\\"md-raised search-type\\\" ng-if=\\\"vm.isPublished && !vm.isEditable() && vm.isValidator\\\" ng-click=vm.editPotentialException(ev) ng-disabled=vm.isActionDisabled><span translate=ADMIN.POTENTIAL.EDIT></span></md-button><!-- vm.isEditable() || !vm.isValidator --><md-button class=\\\"md-raised search-type md-accent\\\" ng-if=\\\"vm.isPublished && vm.isEditable() || vm.isPublished && !vm.isValidator\\\" ng-click=vm.cancelEdits() ng-disabled=\\\"vm.isActionDisabled || !vm.formIsValid\\\"><span translate=ADMIN.POTENTIAL.CANCEL></span></md-button><md-button class=\\\"remove-marginLeft-xs md-raised search-type md-accent\\\" ng-if=\\\"vm.isPublished && vm.isEditable() || vm.isPublished && !vm.isValidator\\\" ng-click=vm.saveAsDraft(ev) ng-disabled=\\\"vm.isActionDisabled || !vm.formIsValid\\\"><span ng-hide=vm.isActionLoading.saveDraft><span translate=ADMIN.POTENTIAL.SAVE_UPDATE></span></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isActionLoading.saveDraft class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><md-button class=\\\"remove-marginLeft-xs md-raised search-type md-accent\\\" ng-if=\\\"vm.isPublished && vm.isEditable() || vm.isPublished && !vm.isValidator\\\" ng-click=\\\"vm.showModal(ev, \\'draft_and_submit\\')\\\" ng-disabled=\\\"vm.isActionDisabled || !vm.formIsValid\\\"><span translate=ADMIN.POTENTIAL.SUBMIT_UPDATE></span></md-button><!-- end --><md-button class=\\\"remove-marginLeft-xs md-raised search-type md-accent\\\" ng-if=\\\"vm.isPublished && !vm.isEditable()\\\" ng-click=\\\"vm.showModal(ev, \\'end\\')\\\" ng-disabled=\\\"vm.isActionDisabled || !vm.formIsValid\\\"><span translate=ADMIN.POTENTIAL.END></span></md-button><!-- If the PE is submitted : vm.isSubmitted --><!-- If the form isn\\'t editable : !vm.isEditable() --><md-button class=\\\"md-raised search-type btn-danger\\\" ng-click=\\\"vm.showModal(ev, \\'delete\\')\\\" ng-if=\\\"vm.isSubmitted && !vm.isEditable() && !vm.isValidator\\\" ng-disabled=vm.isActionDisabled><span translate=ADMIN.POTENTIAL.DELETE></span></md-button><md-button class=\\\"md-raised search-type\\\" ng-if=\\\"vm.isSubmitted && !vm.isEditable()\\\" ng-click=vm.editPotentialException(ev)><span translate=ADMIN.POTENTIAL.EDIT></span></md-button><!-- vm.isValidator --><md-button class=\\\"remove-marginLeft-xs md-raised btn-danger search-type\\\" ng-if=\\\"vm.isSubmitted && !vm.isEditable() && vm.isValidator\\\" ng-click=\\\"vm.showModal(ev, \\'reject\\')\\\"><span translate=ADMIN.POTENTIAL.REJECT></span></md-button><md-button class=\\\"remove-marginLeft-xs md-raised search-type md-accent\\\" ng-click=\\\"vm.showModal(ev, \\'publish\\')\\\" ng-if=\\\"!vm.isEditable() && vm.isValidator && vm.isSubmitted\\\" ng-disabled=!vm.formIsValid><span translate=ADMIN.POTENTIAL.PUBLISH></span></md-button><!-- If editing is enabled : vm.isEditable() --><md-button class=\\\"md-raised search-type\\\" ng-if=\\\"vm.isSubmitted && vm.isEditable()\\\" ng-click=vm.cancelEdits() ng-disabled=vm.isActionDisabled><span translate=ADMIN.POTENTIAL.CANCEL></span></md-button><md-button class=\\\"remove-marginLeft-xs md-raised md-accent search-type\\\" ng-if=\\\"vm.isSubmitted && vm.isEditable()\\\" ng-click=vm.saveEdits() ng-disabled=\\\"vm.isActionDisabled || !vm.formIsValid\\\"><span ng-hide=vm.isActionLoading.save><span translate=ADMIN.POTENTIAL.SAVE></span></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isActionLoading.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><!-- End is editable --><!-- End isValidator --></div>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/create-potential-exceptions.html\",\"<cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true class=loadmask-fullscreen></div><div class=\\\"shell-padding loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\"><div class=view-header><div layout-xs=column layout-sm=column layout-gt-sm=row><div flex=auto><h2><span><span class=md-display-1 translate=ADMIN.POTENTIAL.POTENTIAL_EXCEPTIONS></span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/potential-exceptions class=parent-link><span translate=ADMIN.POTENTIAL.POTENTIAL_EXCEPTIONS></span></a> / <a href=/potential-exceptions/{{vm.urlPath.path}} class=parent-link><span translate={{vm.urlPath.display}}></span></a></span></div><!-- <div class=\\\"m-t\\\" ng-include=\\\"\\'/app/admin/create-potential-exceptions/action-buttons.html\\'\\\"></div> --></div></div><!-- potential exception details --><md-card class=m-t><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 translate=ADMIN.POTENTIAL.EXCEPTION_DETAILS></h2><span flex=auto style=text-align:center><span ng-show=vm.isPublished><a href=\\\"/track-trace?potential_exception_id={{vm.peID}}\\\" target=_blank>VIEW AFFECTED SHIPMENTS</a> </span></span><span><md-icon ng-bind-html=vm.status.icon></md-icon>{{vm.status.state}}</span></div></md-toolbar><div ng-show=vm.isPublishEdit()><md-tabs md-selected=1 md-dynamic-height md-border-bottom md-stretch-tabs=always><md-tab><md-tab-label><md-icon></md-icon><span translate=ADMIN.POTENTIAL.PUBLISHED></span></md-tab-label><md-tab-body><exception-form ctrl=vm potential=vm.exceptionDetails.parent editable=false></exception-form></md-tab-body></md-tab><md-tab><md-tab-label><md-icon></md-icon>{{vm.status.state}}</md-tab-label><md-tab-body><exception-form ctrl=vm potential=vm.exceptionDetails editable=true updates=vm.updates></exception-form></md-tab-body></md-tab></md-tabs></div><div ng-show=!vm.isPublishEdit()><exception-form ctrl=vm potential=vm.exceptionDetails editable=true></exception-form></div><md-card-actions><div class=light-form ng-include=\\\"\\'/app/admin/create-potential-exceptions/action-buttons.html\\'\\\"></div></md-card-actions></md-card><section><div ng-controller=\\\"CreateMapController as vmMap\\\"><div ng-include=\\\"\\'/app/admin/create-map/create-map.html\\'\\\"></div></div></section><section ng-if=vm.isValidator><log-record data=vm.exceptionDetails.log></log-record></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/exception-form.html\",\"<md-content class=\\\"light-content p-md\\\"><form name=detailsForm class=light-form novalidate><div layout-gt-sm=row><div flex-gt-sm=45 flex-sm=1 flex-xs=1><md-input-container class=md-block ng-disabled=\\\"!editable || !vm.isEditable()\\\" ng-class=\\\"{\\'field-updated\\': updates.title}\\\"><label translate=ADMIN.POTENTIAL.EXCEPTION_TITLE></label><input ng-model=potential.title name=title ng-disabled=\\\"!editable || !vm.isEditable()\\\" required><div ng-messages=detailsForm.title.$error><div ng-message=required><span translate=ADMIN.POTENTIAL.TITLE_ERROR></span></div></div></md-input-container><md-input-container class=md-block ng-disabled=\\\"!editable || !vm.isEditable()\\\" ng-class=\\\"{\\'field-updated\\': updates.description}\\\"><label translate=ADMIN.POTENTIAL.DESCRIPTION></label><textarea ng-model=potential.description name=description md-maxlength=150 rows=5 ng-disabled=\\\"!editable || !editable || !vm.isEditable()\\\" md-select-on-focus required></textarea><div ng-messages=detailsForm.description.$error><div ng-message=required><span translate=ADMIN.POTENTIAL.DESCRIPTION_ERROR></span></div><div ng-message=md-maxlength><span translate=ADMIN.POTENTIAL.MAX_ERROR></span></div></div></md-input-container><md-input-container class=md-block ng-disabled=\\\"!editable || !vm.isEditable()\\\" ng-class=\\\"{\\'field-updated\\': updates.note}\\\"><label translate=ADMIN.POTENTIAL.NOTES></label><textarea ng-model=potential.note name=note md-maxlength=150 rows=5 ng-disabled=\\\"!editable || !vm.isEditable()\\\" md-select-on-focus></textarea><div ng-messages=detailsForm.note.$error><div ng-message=required><span translate=ADMIN.POTENTIAL.NOTES_ERROR></span></div></div></md-input-container><md-input-container class=md-block ng-disabled=\\\"!editable || !vm.isEditable()\\\" ng-class=\\\"{\\'field-updated\\': updates.source}\\\"><label translate=ADMIN.POTENTIAL.SOURCE></label><textarea ng-model=potential.source name=source md-maxlength=500 rows=17 ng-disabled=\\\"!editable || !vm.isEditable()\\\" md-select-on-focus required></textarea><div ng-messages=detailsForm.source.$error><div ng-message=required><span translate=ADMIN.POTENTIAL.SOURCE_ERROR></span></div></div></md-input-container><md-input-container class=md-block ng-if=vm.isValidator ng-disabled=\\\"!editable || !vm.isEditable()\\\"><label translate=ADMIN.POTENTIAL.EXCEPTION_AUTHOR></label><input ng-model=potential.author name=exceptionAuthor ng-disabled=true required><div ng-messages=detailsForm.exceptionAuthor.$error><div ng-message=required><span translate=ADMIN.POTENTIAL.AUTHOR_ERROR></span></div></div></md-input-container></div><div flex-gt-sm=45 flex-offset-gt-sm=10 flex-sm=1 flex-xs=1><div layout-gt-sm=row><div flex-gt-sm=47 ng-if=vm.isSubmittedExpire()><div class=\\\"field-updated submitted-expire\\\"><span translate=ADMIN.POTENTIAL.SUBMITTED_EXPIRE></span></div></div></div><div layout-gt-sm=row><div flex-gt-sm=47><mdp-date-picker mdp-placeholder=\\\"{{\\'ADMIN.POTENTIAL.START_DATE\\' | translate}}\\\" mdp-format=MM/DD/YYYY mdp-min-date=vm.minDate ng-model=potential.start_date mdp-disabled=\\\"!editable || !vm.isEditable()\\\" class=\\\"mb-0 {{!editable || !vm.isEditable() ? \\'is-disabled\\' : \\'\\'}} {{updates.start_date ? \\'field-updated\\' : \\'\\'}}\\\"></mdp-date-picker></div><!-- <div flex-gt-sm=\\\"47\\\" flex-offset-gt-sm=\\\"5\\\">\\r\\n <mdp-time-picker ng-model=\\\"potential.start_date\\\"\\r\\n mdp-disabled=\\\"!editable || !vm.isEditable()\\\"\\r\\n mdp-placeholder=\\\"{{\\'ADMIN.POTENTIAL.START_TIME\\' | translate}}\\\"\\r\\n class=\\\"mb-0 {{!editable || !vm.isEditable() ? \\'is-disabled\\' : \\'\\'}} {{updates.start_date ? \\'field-updated\\' : \\'\\'}}\\\"></mdp-time-picker>\\r\\n </div> --></div><div layout-gt-sm=row><div flex-gt-sm=47><mdp-date-picker mdp-placeholder=\\\"{{\\'ADMIN.POTENTIAL.END_DATE\\' | translate}}\\\" mdp-format=MM/DD/YYYY mdp-min-date=vm.minDate ng-model=potential.end_date mdp-disabled=\\\"!editable || !vm.isEditable() \\\" class=\\\"mb-0 {{!editable || !vm.isEditable() ? \\'is-disabled\\' : \\'\\'}} {{updates.end_date ? \\'field-updated\\' : \\'\\'}}\\\"></mdp-date-picker></div><!-- <div flex-gt-sm=\\\"47\\\" flex-offset-gt-sm=\\\"5\\\">\\r\\n <mdp-time-picker ng-model=\\\"potential.end_date\\\"\\r\\n mdp-placeholder=\\\"{{\\'ADMIN.POTENTIAL.END_TIME\\' | translate}}\\\"\\r\\n mdp-disabled=\\\"!editable || !vm.isEditable()\\\"\\r\\n class=\\\"mb-0 {{!editable || !vm.isEditable() ? \\'is-disabled\\' : \\'\\'}} {{updates.end_date ? \\'field-updated\\' : \\'\\'}}\\\"></mdp-time-picker>\\r\\n\\r\\n </div> --></div><span style=color:red ng-show=\\\"!!potential.end_date && potential.end_date < potential.start_date\\\"><span translate=ADMIN.POTENTIAL.TIME_ERROR></span></span> <span style=color:red ng-if=false ng-show=\\\"!!potential.end_date && potential.end_date < vm.dateNow\\\"><span translate=ADMIN.POTENTIAL.TIME_ERROR_END_BEFORE_TODAY></span></span> <span ng-show=potential.end_date.$error.endBeforeStart><span translate=ADMIN.POTENTIAL.TIME_ERROR></span></span><!-- <time-zones-select\\r\\n model=\\\"potential.time_zone\\\"\\r\\n disabled=\\\"!editable || !vm.isEditable()\\\">\\r\\n </time-zones-select> --><div class=\\\"m-b m-t\\\"><label><md-icon class=text-warning ng-if=\\\"updates.air || updates.sea\\\"></md-icon><span translate=ADMIN.POTENTIAL.SHIPPING_MODE></span></label><div class=m-t-sm><md-checkbox ng-model=potential.air ng-disabled=\\\"!editable || !vm.isEditable()\\\" aria-label=\\\"Mode Checkbox\\\" class=md-primary><span translate=ADMIN.POTENTIAL.AIR></span></md-checkbox><md-checkbox ng-model=potential.sea ng-disabled=\\\"!editable || !vm.isEditable()\\\" aria-label=\\\"Mode Checkbox\\\" class=md-primary><span translate=ADMIN.POTENTIAL.SEA></span></md-checkbox><md-checkbox ng-model=vm.isAll ng-click=vm.checkAllModes(vm.isAll) ng-disabled=\\\"!editable || !vm.isEditable()\\\" aria-label=\\\"Mode Checkbox\\\" class=md-primary><span translate=ADMIN.POTENTIAL.ALL></span></md-checkbox></div><!-- <div ng-messages=\\\"detailsForm.air.$error\\\" role=\\\"alert\\\"> --><div ng-if=vm.isMode><!-- ng-message-exp=\\\"[\\'required\\']\\\"> --> <span translate=ADMIN.MUST_SELECT_MODE></span></div><!-- </div> --></div><div class=m-b><label><md-icon class=text-warning ng-if=\\\"updates.arrivals || updates.departures\\\"></md-icon><span translate=ADMIN.POTENTIAL.EXCEPTION_ARRIVAL></span></label><div class=m-t-sm><md-checkbox ng-model=potential.arrivals ng-disabled=\\\"!editable || !vm.isEditable()\\\" aria-label=\\\"Mode Checkbox\\\" class=md-primary><span translate=ADMIN.POTENTIAL.ARRIVALS></span></md-checkbox><md-checkbox ng-model=potential.departures ng-disabled=\\\"!editable || !vm.isEditable()\\\" aria-label=\\\"Mode Checkbox\\\" class=md-primary><span translate=ADMIN.POTENTIAL.DEPARTURES></span></md-checkbox></div></div><div ng-include=\\\"\\'/app/admin/create-potential-exceptions/action-buttons.html\\'\\\"></div></div></div></form><!-- Handle rejection cases --><div><hr><div layout-gt-xs=row><div ng-if=potential.reviewer flex=50 class=p-md><h4><strong><span translate=ADMIN.POTENTIAL.REVIEWER></span></strong></h4><p>{{potential.reviewer.email}}</p></div><div ng-if=\\\"potential.rejection_note && potential.workflow_state !== \\'published\\'\\\" flex=50 class=p-md><h4><strong><span translate=ADMIN.POTENTIAL.REJECTION></span></strong></h4><p>{{potential.rejection_note}}</p></div></div></div><!-- Metadata --><p class=md-caption ng-if=potential.created_at><md-icon class=icon-reset></md-icon>Created: {{potential.created_at | date : \\\"MMM dd, yyyy h:mm a\\\"}}  <br show-xs hide-sm hide-md hide-lg hide-xl><md-icon class=icon-reset></md-icon>Last Activity: {{potential.updated_at | date : \\\"MMM dd, yyyy h:mm a\\\"}}</p></md-content>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/log.html\",\"<md-card class=m-t><md-toolbar class=md-toolbar-tools><h2 translate=ADMIN.POTENTIAL.LOG></h2></md-toolbar><md-card-content class=light-form><div class=table-scroll><table class=\\\"card-table table-fixed table-static\\\"><thead><tr><th style=width:25%>User</th><th style=width:15%>Date</th><th style=width:60%>Actions</th></tr></thead><tbody><tr class=md-whiteframe-1dp ng-repeat=\\\"log_record in $ctrl.data\\\"><td style=width:25%>{{log_record.username}}</td><td style=width:15%>{{log_record.created_at | date}}</td><td style=width:60%><p ng-bind-html=$ctrl.processActions(log_record.actions)></p></td></tr></tbody></table></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/admin/customize-results/customize-exception-results.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Customize Results Modal\\\" ng-controller=\\\"CustomizePotentialExceptionResultsController as customizeCtrl\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><span hide-gt-xs show-xs hide-gt-xs>Customize Results</span><div layout=row hide-xs show-gt-xs flex=1><div flex=50 layout-margin><h2 translate=TRACKTRACE.ACTIVE_DATA></h2></div><div flex=50 layout-margin><h2 translate=TRACKTRACE.AVAILABLE_DATA></h2></div></div><span flex hide-gt-xs show-xs></span><md-button class=md-icon-button ng-click=customizeCtrl.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content><div><div layout-gt-xs=row><div flex-gt-xs=50 flex-xs=1 class=\\\"active-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Active Columns</h3><!--<div layout=\\\"row\\\" ng-if=\\\"customizeCtrl.activeColumns.length > 11 || customizeCtrl.activeSearchField.length > 0\\\">\\r\\n <md-input-container flex=\\'90\\' class=\\\"md-block error-hidden\\\" flex-gt-sm>\\r\\n <label>{{\\'TRACKTRACE.SEARCH_ACTIVE_COLUMNS\\' | translate}}</label>\\r\\n <input type=\\\"text\\\" \\r\\n ng-model=\\\"customizeCtrl.activeSearchField\\\"\\r\\n ng-change=\\\"customizeCtrl.activeSearchChange()\\\"\\r\\n name=\\\"search\\\" />\\r\\n </md-input-container>\\r\\n <div flex=\\'10\\'>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"customizeCtrl.clickedActiveSearchX()\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n </div>--><div class=sortable-container as-sortable=customizeCtrl.dragListener() ng-model=customizeCtrl.activeColumns style=\\\"height: {{ customizeCtrl.activeColumns.length > 120 ? customizeCtrl.colHeight : (customizeCtrl.colHeight + 76) }}px\\\"><md-card ng-repeat=\\\"column in customizeCtrl.activeColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle ng-if=\\\"column.field != \\'workflow_state\\' && column.field != \\'id\\' && column.field !=\\'title\\'\\\"><div layout=row flex layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><span flex translate={{column.title}}></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Remove Field\\\" ng-click=customizeCtrl.remove(column)><span translate=TRACKTRACE.REMOVE_BUTT></span></md-button></div></md-card-content><md-card-content ng-if=\\\"column.field == \\'workflow_state\\' || column.field == \\'id\\' || column.field ==\\'title\\'\\\"><div layout=row flex layout-align=\\\"left center\\\"><md-button class=md-icon-button><!-- <md-icon></md-icon> --></md-button><span flex translate={{column.title}}></span><md-button ng-if=\\\"column.field != \\'workflow_state\\' && column.field != \\'id\\' && column.field !=\\'title\\'\\\" class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Remove Field\\\" ng-click=customizeCtrl.remove(column)><span translate=TRACKTRACE.REMOVE_BUTT></span></md-button></div></md-card-content></md-card></div></div><div flex-gt-xs=50 flex-xs=1 class=\\\"available-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Available Columns</h3><div layout=row><md-input-container flex=\\\"{{customizeCtrl.availableSearchField.length > 0 ? 90 : 100}}\\\" class=\\\"md-block error-hidden\\\" flex-gt-sm><label translate=TRACKTRACE.SEARCH_COLUMNS></label><input type=text ng-model=customizeCtrl.availableSearchField ng-change=customizeCtrl.availableSearchChange() name=search></md-input-container><div flex=10 ng-if=\\\"customizeCtrl.availableSearchField.length > 0\\\"><md-button class=\\\"md-icon-button btn-sm input-field-addon\\\" ng-click=customizeCtrl.clickedAvailableSearchX()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><div class=sortable-container as-sortable=customizeCtrl.dragListener() ng-model=customizeCtrl.availableColumns style=\\\"height: {{customizeCtrl.colHeight}}px\\\"><md-card ng-repeat=\\\"column in customizeCtrl.availableColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle><div layout=row flex layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><span flex translate={{column.title}}></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Add Column\\\" ng-click=customizeCtrl.add(column)><span translate=TRACKTRACE.ADD_BUTT></span></md-button></div></md-card-content></md-card></div></div></div></div></md-dialog-content><md-dialog-actions layout=row class=dialog-footer-border><md-button aria-label=\\\"Cancel Customization\\\" ng-click=customizeCtrl.cancel() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex></span><md-button aria-label=\\\"Save As Default\\\" ng-click=customizeCtrl.saveToDefault()><span translate=TRACKTRACE.SAVE_DEFAULT_CRITERIA></span></md-button><md-button class=\\\"md-raised md-accent\\\" aria-label=\\\"Submit Customization\\\" ng-click=customizeCtrl.submit()><span translate=TRACKTRACE.SUBMIT></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/discussion-shipments/discussion-shipments.html\",\"<cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true></div><div class=\\\"shell-padding loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>DISCUSSIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/shipment-discussions class=parent-link><span>Shipment Discussions</span></a></span></div><!-- <div class=\\\"m-t\\\"> --><!-- <a href=\\\"/potential-exceptions/new\\\" ng-if=\\\"vm.canCreate\\\">\\r\\n <md-button class=\\\"md-raised search-type md-accent\\\">{{\\'ADMIN.POTENTIAL.CREATE_BUTTON\\' | translate}}</md-button>\\r\\n </a> --><!-- </div> --></div></div><section ng-controller=\\\"DiscussionShipmentsController as lv\\\"><crane-table title=\\\"UNREAD SHIPMENT DISCUSSIONS\\\" icon=vm.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoading is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag ctrl=DiscussionShipmentsController></crane-table></section><section ng-controller=\\\"DiscussionShipmentsExistController as lv\\\"><crane-table title=\\\"BOOKMARKED SHIPMENT DISCUSSIONS\\\" icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoadingExist is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag ctrl=DiscussionShipmentsExistController></crane-table></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/discussion-shipments/view-discussion-shipments.html\",\"<style>.hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }\\r\\n .space-customer-grid{\\r\\n margin-left: 2%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }\\r\\n .top-status{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_one{\\r\\n background-color: #9b9b9b !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_two{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_three{\\r\\n background-color: #48c267 !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_four{\\r\\n background-color: #347c8f !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }</style><cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>MANAGE EXCEPTIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/csl-exceptions class=parent-link><span>View an Exception</span></a>/ <span ng-if=\\\"vm.exception.status == \\'pending\\'\\\">Exception Pending Approval</span> <span ng-if=\\\"vm.exception.status == \\'rejected\\'\\\">Exception Rejected</span> <span ng-if=\\\"vm.exception.status == \\'expired\\'\\\">Exception Expired</span> <span ng-if=\\\"vm.exception.status == \\'live\\'\\\">Exception is Live</span> <span ng-if=\\\"vm.exception.status == \\'ended\\'\\\">Exception Ended</span></span></div></div></div><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons>error_outline</md-icon><span>EXCEPTION DETAILS</span></h2><span flex=auto></span><div><md-button style=\\\"width: 145px\\\" class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.viewShipment(vm.exception.pronumber) ng-disabled=\\\"\\\" type=submit class=\\\"btn btn-default\\\" ng-show=true><!-- <md-icon>save</md-icon> --> <span ng-hide=\\\"\\\">VIEW SHIPMENT</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div><span flex=0></span></div></md-toolbar><md-card-content style=\\\"padding-bottom: 1px\\\"><div style=\\\"text-align: center;margin-bottom: 10px\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\'\\\" class=\\\"md-raised md-primary top-status\\\">PENDING APPROVAL</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\'\\\" class=\\\"md-raised md-primary top-status_one\\\">EXPIRED</md-button><md-button ng-if=\\\"vm.exception.status == \\'rejected\\'\\\" class=\\\"md-raised md-primary top-status_two\\\">REJECTED</md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\'\\\" class=\\\"md-raised md-primary top-status_three\\\">LIVE</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\'\\\" class=\\\"md-raised md-primary top-status_four\\\">ENDED</md-button></div><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">CUSTOMER</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;text-transform: uppercase\\\" ng-model=vm.exception.company_name name=company_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">PRO #</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pronumber name=pronumber readonly required></md-input-container></div></div><br><h3 style=\\\"color: black\\\">MILESTONE MISSED</h3><div layout-gt-sm=row class=newchips><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">MILESTONE</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pointname name=pointname readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ESTIMATED</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.estimated name=estimated readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ACTUAL</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;color: #ee533e !important\\\" ng-model=vm.exception.actual name=actual readonly required></md-input-container></div></div><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=33></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REASON DESCRIPTION</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REMARKS</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div></div></md-card-content></md-card></div></md-card-content><md-card-content style=\\\"padding-top: 0px\\\"><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">EXCEPTION APPROVER</label><md-input-container class=\\\"md-block error-hidden\\\"><!-- <input type=\\\"text\\\"\\r\\n style=\\\"border-bottom: 2px solid #e0e0e0;\\\"\\r\\n ng-model=\\\"vm.getUser()\\\"\\r\\n name=\\\"first_name\\\"\\r\\n readonly=\\\"true\\\"\\r\\n required=\\\"required\\\" /> --> <input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.userName name=first_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">REASON FOR REJECTION</label><md-input-container class=\\\"md-block error-hidden\\\"><input style=\\\"border-bottom: 2px solid #e0e0e0\\\" type=text ng-model=vm.exception.rejection_reason name=rejection_reason readonly required></md-input-container></div></div></md-card-content></md-card><br><div layout-gt-sm=row style=\\\"padding: 0 30px\\\"><i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Created:   </span>{{vm.exception.created_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.created_at | date : \\'h:mm\\'}}        <i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Last Activity:   </span>{{vm.exception.updated_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.updated_at | date : \\'h:mm\\'}}</div><br><section layout=row layout-sm=column layout-align=\\\"end center\\\" layout-wrap><div layout=row layout-align=\\\"start center\\\" flex><md-button ng-click=vm.cancelException() ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.status != \\'expired\\' && (vm.readAccess == false)\\\" style=\\\"width: 110px;border: 1px solid #9b9b9b\\\" class=md-raised>Cancel</md-button><span flex></span> <span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textCustType>* Are you sure you want to end this live exception?</span> </span><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textEndedType>* Are you sure you want to reopen this ended exception?</span></span></div><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && (vm.readAccess == false)\\\" ng-click=\\\"vm.showRejectModal(ev, \\'reject-exception\\')\\\" style=\\\"background-color: #347c8f;width: 110px\\\" class=\\\"md-raised md-primary\\\">Reject</md-button><md-button ng-if=\\\"(vm.exception.status == \\'rejected\\' || vm.exception.status == \\'live\\' || vm.exception.status == \\'ended\\') && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button><span ng-if=\\\"vm.exception.do_not_send_exception_mails == true && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\' || vm.exception.status == \\'rejected\\'\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\'\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'rejected\\'\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'reject\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelEndException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=\\\"vm.textEndedType && !vm.textCustType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelOpenException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeEndExceptionStatus(vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'end-live\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeOpenExceptionStatus(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.endException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">End</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.reOpenException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Reopen</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\' || (vm.readAccess == true)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button></section></div></md-card-content></form></md-card><section ng-if=vm.logs_visible><log-exception-record data=vm.exception></log-exception-record></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/discussion-shipments-cfs/discussion-shipments.html\",\"<cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true></div><div class=\\\"shell-padding loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>DISCUSSIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/shipment-discussions-cfs class=parent-link><span>Shipment Discussions</span></a></span></div><!-- <div class=\\\"m-t\\\"> --><!-- <a href=\\\"/potential-exceptions/new\\\" ng-if=\\\"vm.canCreate\\\">\\r\\n <md-button class=\\\"md-raised search-type md-accent\\\">{{\\'ADMIN.POTENTIAL.CREATE_BUTTON\\' | translate}}</md-button>\\r\\n </a> --><!-- </div> --></div></div><section ng-controller=\\\"DiscussionShipmentsCfsController as lv\\\"><crane-table title=\\\"UNREAD SHIPMENT DISCUSSIONS\\\" icon=vm.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoading is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag ctrl=DiscussionShipmentsCfsController></crane-table></section><section ng-controller=\\\"DiscussionShipmentsCfsExistController as lv\\\"><crane-table title=\\\"BOOKMARKED SHIPMENT DISCUSSIONS\\\" icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoadingExist is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag ctrl=DiscussionShipmentsCfsExistController></crane-table></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/discussion-shipments-cfs/view-discussion-shipments.html\",\"<style>.hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }\\r\\n .space-customer-grid{\\r\\n margin-left: 2%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }\\r\\n .top-status{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_one{\\r\\n background-color: #9b9b9b !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_two{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_three{\\r\\n background-color: #48c267 !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_four{\\r\\n background-color: #347c8f !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }</style><cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>MANAGE EXCEPTIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/cfs-exceptions class=parent-link><span>View an Exception</span></a>/ <span ng-if=\\\"vm.exception.status == \\'pending\\'\\\">Exception Pending Approval</span> <span ng-if=\\\"vm.exception.status == \\'rejected\\'\\\">Exception Rejected</span> <span ng-if=\\\"vm.exception.status == \\'expired\\'\\\">Exception Expired</span> <span ng-if=\\\"vm.exception.status == \\'live\\'\\\">Exception is Live</span> <span ng-if=\\\"vm.exception.status == \\'ended\\'\\\">Exception Ended</span></span></div></div></div><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons>error_outline</md-icon><span>EXCEPTION DETAILS</span></h2><span flex=auto></span><div><md-button style=\\\"width: 145px\\\" class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.viewShipment(vm.exception.pronumber) ng-disabled=\\\"\\\" type=submit class=\\\"btn btn-default\\\" ng-show=true><!-- <md-icon>save</md-icon> --> <span ng-hide=\\\"\\\">VIEW SHIPMENT</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div><span flex=0></span></div></md-toolbar><md-card-content style=\\\"padding-bottom: 1px\\\"><div style=\\\"text-align: center;margin-bottom: 10px\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\'\\\" class=\\\"md-raised md-primary top-status\\\">PENDING APPROVAL</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\'\\\" class=\\\"md-raised md-primary top-status_one\\\">EXPIRED</md-button><md-button ng-if=\\\"vm.exception.status == \\'rejected\\'\\\" class=\\\"md-raised md-primary top-status_two\\\">REJECTED</md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\'\\\" class=\\\"md-raised md-primary top-status_three\\\">LIVE</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\'\\\" class=\\\"md-raised md-primary top-status_four\\\">ENDED</md-button></div><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">CUSTOMER</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;text-transform: uppercase\\\" ng-model=vm.exception.company_name name=company_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">PRO #</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pronumber name=pronumber readonly required></md-input-container></div></div><br><h3 style=\\\"color: black\\\">MILESTONE MISSED</h3><div layout-gt-sm=row class=newchips><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">MILESTONE</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pointname name=pointname readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ESTIMATED</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.estimated name=estimated readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ACTUAL</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;color: #ee533e !important\\\" ng-model=vm.exception.actual name=actual readonly required></md-input-container></div></div><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=33></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REASON DESCRIPTION</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REMARKS</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div></div></md-card-content></md-card></div></md-card-content><md-card-content style=\\\"padding-top: 0px\\\"><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">EXCEPTION APPROVER</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.getUser() name=first_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">REASON FOR REJECTION</label><md-input-container class=\\\"md-block error-hidden\\\"><input style=\\\"border-bottom: 2px solid #e0e0e0\\\" type=text ng-model=vm.exception.rejection_reason name=rejection_reason readonly required></md-input-container></div></div></md-card-content></md-card><br><div layout-gt-sm=row style=\\\"padding: 0 30px\\\"><i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Created:   </span>{{vm.exception.created_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.created_at | date : \\'h:mm\\'}}        <i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Last Activity:   </span>{{vm.exception.updated_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.updated_at | date : \\'h:mm\\'}}</div><br><section layout=row layout-sm=column layout-align=\\\"end center\\\" layout-wrap><div layout=row layout-align=\\\"start center\\\" flex><md-button ng-click=vm.cancelException() ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.status != \\'expired\\' && (vm.readAccess == false)\\\" style=\\\"width: 110px;border: 1px solid #9b9b9b\\\" class=md-raised>Cancel</md-button><span flex></span> <span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textCustType>* Are you sure you want to end this live exception?</span> </span><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textEndedType>* Are you sure you want to reopen this ended exception?</span></span></div><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && (vm.readAccess == false)\\\" ng-click=\\\"vm.showRejectModal(ev, \\'reject-exception\\')\\\" style=\\\"background-color: #347c8f;width: 110px\\\" class=\\\"md-raised md-primary\\\">Reject</md-button><md-button ng-if=\\\"(vm.exception.status == \\'rejected\\' || vm.exception.status == \\'live\\' || vm.exception.status == \\'ended\\') && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button><span ng-if=\\\"vm.exception.do_not_send_exception_mails == true && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\' || vm.exception.status == \\'rejected\\'\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\'\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'rejected\\'\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'reject\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelEndException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=\\\"vm.textEndedType && !vm.textCustType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelOpenException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeEndExceptionStatus(vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'end-live\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeOpenExceptionStatus(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.endException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">End</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.reOpenException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Reopen</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\' || (vm.readAccess == true)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button></section></div></md-card-content></form></md-card><section ng-if=vm.logs_visible><log-exception-record data=vm.exception></log-exception-record></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/discussion-shipments-csl/discussion-shipments.html\",\"<cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true></div><div class=\\\"shell-padding loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>DISCUSSIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/shipment-discussions-csl class=parent-link><span>Shipment Discussions</span></a></span></div><!-- <div class=\\\"m-t\\\"> --><!-- <a href=\\\"/potential-exceptions/new\\\" ng-if=\\\"vm.canCreate\\\">\\r\\n <md-button class=\\\"md-raised search-type md-accent\\\">{{\\'ADMIN.POTENTIAL.CREATE_BUTTON\\' | translate}}</md-button>\\r\\n </a> --><!-- </div> --></div></div><section ng-controller=\\\"DiscussionShipmentsCslController as lv\\\"><crane-table title=\\\"UNREAD SHIPMENT DISCUSSIONS\\\" icon=vm.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoading is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag ctrl=DiscussionShipmentsCslController></crane-table></section><section ng-controller=\\\"DiscussionShipmentsCslExistController as lv\\\"><crane-table title=\\\"BOOKMARKED SHIPMENT DISCUSSIONS\\\" icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoadingExist is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag ctrl=DiscussionShipmentsCslExistController></crane-table></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/discussion-shipments-csl/view-discussion-shipments.html\",\"<style>.hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }\\r\\n .space-customer-grid{\\r\\n margin-left: 2%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }\\r\\n .top-status{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_one{\\r\\n background-color: #9b9b9b !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_two{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_three{\\r\\n background-color: #48c267 !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_four{\\r\\n background-color: #347c8f !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }</style><cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>MANAGE EXCEPTIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/csl-exceptions class=parent-link><span>View an Exception</span></a>/ <span ng-if=\\\"vm.exception.status == \\'pending\\'\\\">Exception Pending Approval</span> <span ng-if=\\\"vm.exception.status == \\'rejected\\'\\\">Exception Rejected</span> <span ng-if=\\\"vm.exception.status == \\'expired\\'\\\">Exception Expired</span> <span ng-if=\\\"vm.exception.status == \\'live\\'\\\">Exception is Live</span> <span ng-if=\\\"vm.exception.status == \\'ended\\'\\\">Exception Ended</span></span></div></div></div><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons>error_outline</md-icon><span>EXCEPTION DETAILS</span></h2><span flex=auto></span><div><md-button style=\\\"width: 145px\\\" class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.viewShipment(vm.exception.pronumber) ng-disabled=\\\"\\\" type=submit class=\\\"btn btn-default\\\" ng-show=true><!-- <md-icon>save</md-icon> --> <span ng-hide=\\\"\\\">VIEW SHIPMENT</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div><span flex=0></span></div></md-toolbar><md-card-content style=\\\"padding-bottom: 1px\\\"><div style=\\\"text-align: center;margin-bottom: 10px\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\'\\\" class=\\\"md-raised md-primary top-status\\\">PENDING APPROVAL</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\'\\\" class=\\\"md-raised md-primary top-status_one\\\">EXPIRED</md-button><md-button ng-if=\\\"vm.exception.status == \\'rejected\\'\\\" class=\\\"md-raised md-primary top-status_two\\\">REJECTED</md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\'\\\" class=\\\"md-raised md-primary top-status_three\\\">LIVE</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\'\\\" class=\\\"md-raised md-primary top-status_four\\\">ENDED</md-button></div><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">CUSTOMER</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;text-transform: uppercase\\\" ng-model=vm.exception.company_name name=company_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">PRO #</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pronumber name=pronumber readonly required></md-input-container></div></div><br><h3 style=\\\"color: black\\\">MILESTONE MISSED</h3><div layout-gt-sm=row class=newchips><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">MILESTONE</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pointname name=pointname readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ESTIMATED</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.estimated name=estimated readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ACTUAL</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;color: #ee533e !important\\\" ng-model=vm.exception.actual name=actual readonly required></md-input-container></div></div><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=33></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REASON DESCRIPTION</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REMARKS</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div></div></md-card-content></md-card></div></md-card-content><md-card-content style=\\\"padding-top: 0px\\\"><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">EXCEPTION APPROVER</label><md-input-container class=\\\"md-block error-hidden\\\"><!-- <input type=\\\"text\\\"\\r\\n style=\\\"border-bottom: 2px solid #e0e0e0;\\\"\\r\\n ng-model=\\\"vm.getUser()\\\"\\r\\n name=\\\"first_name\\\"\\r\\n readonly=\\\"true\\\"\\r\\n required=\\\"required\\\" /> --> <input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.userName name=first_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">REASON FOR REJECTION</label><md-input-container class=\\\"md-block error-hidden\\\"><input style=\\\"border-bottom: 2px solid #e0e0e0\\\" type=text ng-model=vm.exception.rejection_reason name=rejection_reason readonly required></md-input-container></div></div></md-card-content></md-card><br><div layout-gt-sm=row style=\\\"padding: 0 30px\\\"><i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Created:   </span>{{vm.exception.created_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.created_at | date : \\'h:mm\\'}}        <i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Last Activity:   </span>{{vm.exception.updated_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.updated_at | date : \\'h:mm\\'}}</div><br><section layout=row layout-sm=column layout-align=\\\"end center\\\" layout-wrap><div layout=row layout-align=\\\"start center\\\" flex><md-button ng-click=vm.cancelException() ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.status != \\'expired\\' && (vm.readAccess == false)\\\" style=\\\"width: 110px;border: 1px solid #9b9b9b\\\" class=md-raised>Cancel</md-button><span flex></span> <span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textCustType>* Are you sure you want to end this live exception?</span> </span><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textEndedType>* Are you sure you want to reopen this ended exception?</span></span></div><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && (vm.readAccess == false)\\\" ng-click=\\\"vm.showRejectModal(ev, \\'reject-exception\\')\\\" style=\\\"background-color: #347c8f;width: 110px\\\" class=\\\"md-raised md-primary\\\">Reject</md-button><md-button ng-if=\\\"(vm.exception.status == \\'rejected\\' || vm.exception.status == \\'live\\' || vm.exception.status == \\'ended\\') && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button><span ng-if=\\\"vm.exception.do_not_send_exception_mails == true && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\' || vm.exception.status == \\'rejected\\'\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\'\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'rejected\\'\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'reject\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelEndException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=\\\"vm.textEndedType && !vm.textCustType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelOpenException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeEndExceptionStatus(vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'end-live\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeOpenExceptionStatus(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.endException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">End</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.reOpenException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Reopen</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\' || (vm.readAccess == true)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button></section></div></md-card-content></form></md-card><section ng-if=vm.logs_visible><log-exception-record data=vm.exception></log-exception-record></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/edit-account/admin-edit-account.html\",\"<cva-shell><md-card><form name=form novalidate><md-toolbar class=md-primary><div class=md-toolbar-tools><h2 class=md-flex translate=ADMIN.EDIT_ACCOUNT></h2></div></md-toolbar><md-card-content><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.FIRST_NAME></label><input type=text ng-model=adminCtrl.firstName name=first-name required></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.LAST_NAME></label><input type=text ng-model=adminCtrl.lastName name=last-name required></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.EMAIL></label><input type=email ng-model=adminCtrl.username name=uEmail required><br><div ng-show=\\\"form.$submitted || form.uEmail.$touched\\\"><span ng-show=form.uEmail.$error.email translate=ADMIN.ERROR_EMAIL></span></div></md-input-container></div><p><span translate=ADMIN.EDIT_PASSWORD></span></p><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.CURRENT_PASSWORD></label><input data-ng-model=user.currPassword type=password name=password></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.NEW_PASSWORD></label><input data-ng-model=user.newPassword type=password name=newPassword></md-input-container><md-input-container class=md-block flex-gt-sm=auto><label translate=ADMIN.CONFIRM_PASSWORD></label><!--uses the same password check as user--> <input ng-model=user.confirmPassword type=password name=confirm_password data-password-verify=user.newPassword><div ng-show=form.confirm_password.$error.passwordVerify><span translate=ADMIN.ERROR_PASSWORD_MATCH></span></div></md-input-container></div></md-card-content><md-card-actions layout=row layout-align=\\\"end center\\\"><!-- TODO: check ngChange for password dirty update --><md-button class=\\\"md-raised md-primary\\\" ng-click=\\\"adminCtrl.updatePassword(user.currPassword, user.newPassword, user.confirmPassword); adminCtrl.updateNameEmail()\\\" ng-disabled=form.$invalid class=\\\"btn btn-default\\\"><span translate=USER.UPDATE_ACCOUNT></span></md-button></md-card-actions></form></md-card></cva-shell>\");\n$templateCache.put(\"/app/admin/equipment-type/company.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>Equipment Type</span><br><!-- <span class=\\\"breadcrumbs md-subhead\\\" ng-include=\\\"\\'/app/components/breadcrumbs/breadcrumbs.html\\'\\\"></span> --></span></h2><span class=\\\"breadcrumb flat\\\"><!--<a href=\\'/track-trace\\' class=\\\"parent-link\\\">345</a>--></span></div></div></div><div layout-gt-sm=row layout-align-gt-sm=\\\"end center\\\" class=p-a-sm><span class=\\\"btn-link btn-block-sm {{vm.exceptionFilter.value == \\'CSL\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'CSL\\')\\\">CSL <span class=text-sub>({{vm.counts.all[\\'CSL\\']}})</span></span> <span class=\\\"btn-link btn-block-sm {{vm.exceptionFilter.value == \\'CFS\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'CFS\\')\\\">CFS <span class=text-sub>({{vm.counts.all[\\'CFS\\']}})</span></span></div><crane-table title=Equipment icon=vm.icon ; is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons ctrl=equipmentTypeController></crane-table></div></cva-shell>\");\n$templateCache.put(\"/app/admin/exceptions-cfs/add-exception-approvers.html\",\"<style type=text/css>.btnwidth .md-button{\\r\\n width: 150px;\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"addApproverCfsPopUpController as vm\\\" ng-cloak style=top:100px><md-dialog-content class=light-content style=\\\"background: #F5F5F5;margin-top: 100px\\\"><crane-table title=USERS icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewAddTitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=vm.searchflag buttons=vm.buttons lensviewtablepopup=true ctrl=addApproverCfsPopUpController></crane-table></md-dialog-content><md-dialog-actions ng-if=!vm.noResults layout=row layout-align=\\\"center center\\\"><loading-button class=btnwidth style=\\\"margin: 15px 5px\\\" callfunction=vm.addSectedLensGroup(exceptionStatus) display=\\\"SEND EMAIL\\\" isloading=vm.isActionLoading.confirmDelete></loading-button><!--     --><!-- <loading-button\\r\\n class=\\\"btnwidth\\\"\\r\\n style=\\\"margin: 15px 5px;\\\"\\r\\n callfunction=\\\"vm.dontSendEmailException()\\\"\\r\\n display=\\\"DONT SEND EMAIL\\\">\\r\\n </loading-button> --></md-dialog-actions><md-dialog-actions ng-if=vm.noResults layout=row layout-align=\\\"center center\\\"><loading-button class=btnwidth style=\\\"margin: 15px 5px\\\" callfunction=vm.dontSendEmailException() display=OK></loading-button></md-dialog-actions><!-- </form> --></md-dialog>\");\n$templateCache.put(\"/app/admin/exceptions-cfs/end-exception.modal.html\",\"<style type=text/css>.text{\\r\\n text-transform: capitalize;\\r\\n font-weight: bold;\\r\\n }</style><!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\" style=\\\"top: 400px\\\"><md-toolbar><div class=md-toolbar-tools><span class=text>End Live Exception?</span> <span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><form name=rejectForm><md-dialog-content class=\\\"light-content md-padding\\\"><p style=\\\"font-style: normal\\\">Are you sure you want to end this live exception?</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"center center\\\"><loading-button style=\\\"margin: 15px 5px\\\" callfunction=\\\"vm.endExceptionSubmit(exception_id,\\'end\\')\\\" display=YES isloading=vm.isActionLoading.confirmDelete></loading-button>   <loading-button style=\\\"margin: 15px 5px\\\" callfunction=vm.closeModal() display=NO></loading-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/exceptions-cfs/exceptions-cfs.html\",\"<cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true></div><div class=\\\"shell-padding loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>MANAGE EXCEPTIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/cfs-exceptions class=parent-link><span>CFS Exceptions</span></a></span></div><!-- <div class=\\\"m-t\\\"> --><!-- <a href=\\\"/potential-exceptions/new\\\" ng-if=\\\"vm.canCreate\\\">\\r\\n <md-button class=\\\"md-raised search-type md-accent\\\">{{\\'ADMIN.POTENTIAL.CREATE_BUTTON\\' | translate}}</md-button>\\r\\n </a> --><!-- </div> --></div></div><section ng-controller=\\\"ExceptionsCfsController as cf\\\"><crane-table title=\\\"EXCEPTIONS PENDING APPROVAL\\\" icon=vm.icon lensviewtable=cf.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoading is-no-results=cf.noResults buttons=cf.buttons searchflag=cf.searchflag ctrl=ExceptionsCfsController></crane-table></section><div ng-controller=\\\"ExceptionsCfsExistController as cf\\\" layout-gt-sm=row layout-align-gt-sm=\\\"end center\\\" class=p-a-sm><span class=\\\"btn-link btn-block-sm {{cf.exceptionFilter.value == \\'all\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"cf.setFilter(\\'all\\', \\'all\\')\\\">All <span class=text-sub>({{all}})</span></span> <span class=\\\"btn-link btn-block-sm {{cf.exceptionFilter.value == \\'live\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"cf.setFilter(\\'live\\', \\'all\\')\\\">Live <span class=text-sub>({{live}})</span></span> <span class=\\\"btn-link btn-block-sm {{cf.exceptionFilter.value ==\\'expired\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"cf.setFilter(\\'expired\\', \\'all\\')\\\">Expired <span class=text-sub>({{expired}})</span></span> <span class=\\\"btn-link btn-block-sm {{cf.exceptionFilter.value == \\'ended\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"cf.setFilter(\\'ended\\', \\'all\\')\\\">Ended <span class=text-sub>({{ended}})</span></span> <span class=\\\"btn-link btn-block-sm {{cf.exceptionFilter.value == \\'rejected\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"cf.setFilter(\\'rejected\\', \\'all\\')\\\">Rejected <span class=text-sub>({{rejected}})</span></span></div><section ng-controller=\\\"ExceptionsCfsExistController as cf\\\"><crane-table title=\\\"EXISTING EXCEPTIONS\\\" icon=vm.icon lensviewtable=cf.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoadingExist is-no-results=cf.noResults buttons=cf.buttons searchflag=cf.searchflag ctrl=ExceptionsCfsExistController></crane-table></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/exceptions-cfs/log.html\",\"<md-card class=m-t ng-if=$ctrl.data.log.length><md-toolbar class=md-toolbar-tools><h2>{{\\'ADMIN.COMPANY.LOG\\' | translate}}</h2><span flex=auto></span><!-- <md-button class=\\\"md-raised\\\" ng-click=\\\"$ctrl.logExportShowCSV(data)\\\">\\r\\n Export\\r\\n </md-button> --></md-toolbar><md-card-content class=light-form><div class=table-scroll><table class=\\\"card-table table-fixed table-static\\\"><thead><tr><th style=\\\"width: 25%\\\">User</th><th style=\\\"width: 15%\\\">Created</th><th style=\\\"width: 60%\\\">Actions</th></tr></thead><tbody><tr class=md-whiteframe-1dp ng-repeat=\\\"log_record in $ctrl.data.log\\\"><td style=\\\"width: 25%\\\">{{log_record.username}}</td><td style=\\\"width: 15%\\\">{{log_record.created_at | date}}</td><td style=\\\"width: 60%\\\"><p ng-bind-html=$ctrl.processActions(log_record.actions)></p></td></tr></tbody></table></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/admin/exceptions-cfs/reject-exception.modal.html\",\"<style type=text/css>.text{\\r\\n text-transform: capitalize;\\r\\n font-weight: bold;\\r\\n }</style><!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\" style=\\\"top: 150px\\\"><md-toolbar><div class=md-toolbar-tools><span class=text>Reject This Pending Exception?</span> <span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><form name=rejectForm><md-dialog-content style=\\\"padding: 22px\\\" class=\\\"light-content md-padding\\\"><p style=\\\"font-style: normal\\\">Are you sure you want to reject this pending exception?<br>if YES, please provide a reason for rejection*</p><p style=\\\"color: black;font-weight: bold\\\">REASON FOR REJECTION*</p><md-input><textarea ng-model=reject_reason name=reject_reason required rows=5 cols=35></textarea><div ng-messages=rejectForm.reject_reason.$error><div ng-show=reject_reason_check ng-message=required style=\\\"color:red;font-style: italic\\\">Please provide a reason for rejection.</div></div></md-input></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"center center\\\"><loading-button style=\\\"margin: 15px 5px\\\" callfunction=\\\"vm.rejectSubmit(reject_reason,exception_id,\\'reject\\')\\\" display=YES isloading=vm.isActionLoading.confirmDelete></loading-button>   <loading-button style=\\\"margin: 15px 5px\\\" callfunction=vm.closeModal() display=NO></loading-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/exceptions-cfs/view-cfs-exceptions.html\",\"<style>.hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }\\r\\n .space-customer-grid{\\r\\n margin-left: 2%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }\\r\\n .top-status{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_one{\\r\\n background-color: #9b9b9b !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_two{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_three{\\r\\n background-color: #48c267 !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_four{\\r\\n background-color: #347c8f !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }</style><cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>MANAGE EXCEPTIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/cfs-exceptions class=parent-link><span>View an Exception</span></a>/ <span ng-if=\\\"vm.exception.status == \\'pending\\'\\\">Exception Pending Approval</span> <span ng-if=\\\"vm.exception.status == \\'rejected\\'\\\">Exception Rejected</span> <span ng-if=\\\"vm.exception.status == \\'expired\\'\\\">Exception Expired</span> <span ng-if=\\\"vm.exception.status == \\'live\\'\\\">Exception is Live</span> <span ng-if=\\\"vm.exception.status == \\'ended\\'\\\">Exception Ended</span></span></div></div></div><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons>error_outline</md-icon><span>EXCEPTION DETAILS</span></h2><span flex=auto></span><div><md-button style=\\\"width: 145px\\\" class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.viewShipment(vm.exception.pronumber) ng-disabled=\\\"\\\" type=submit class=\\\"btn btn-default\\\" ng-show=vm.exception.has_load><!-- <md-icon>save</md-icon> --> <span ng-hide=\\\"\\\">VIEW SHIPMENT</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div><span flex=0></span></div></md-toolbar><md-card-content style=\\\"padding-bottom: 1px\\\"><div style=\\\"text-align: center;margin-bottom: 10px\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\'\\\" class=\\\"md-raised md-primary top-status\\\">PENDING APPROVAL</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\'\\\" class=\\\"md-raised md-primary top-status_one\\\">EXPIRED</md-button><md-button ng-if=\\\"vm.exception.status == \\'rejected\\'\\\" class=\\\"md-raised md-primary top-status_two\\\">REJECTED</md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\'\\\" class=\\\"md-raised md-primary top-status_three\\\">LIVE</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\'\\\" class=\\\"md-raised md-primary top-status_four\\\">ENDED</md-button></div><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">CUSTOMER</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;text-transform: uppercase\\\" ng-model=vm.exception.company_name name=company_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">PRO #</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pronumber name=pronumber readonly required></md-input-container></div></div><br><h3 style=\\\"color: black\\\">MILESTONE MISSED</h3><div layout-gt-sm=row class=newchips><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">MILESTONE</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pointname name=pointname readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ESTIMATED</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.estimated name=estimated readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ACTUAL</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;color: #ee533e !important\\\" ng-model=vm.exception.actual name=actual readonly required></md-input-container></div></div><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=33></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REASON DESCRIPTION</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REMARKS</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div></div></md-card-content></md-card></div></md-card-content><md-card-content style=\\\"padding-top: 0px\\\"><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">EXCEPTION APPROVER</label><md-input-container class=\\\"md-block error-hidden\\\"><!-- <input type=\\\"text\\\"\\r\\n style=\\\"border-bottom: 2px solid #e0e0e0;\\\"\\r\\n ng-model=\\\"vm.getUser()\\\"\\r\\n name=\\\"first_name\\\"\\r\\n readonly=\\\"true\\\"\\r\\n required=\\\"required\\\" /> --> <input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.excAprover name=first_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">REASON FOR REJECTION</label><md-input-container class=\\\"md-block error-hidden\\\"><input style=\\\"border-bottom: 2px solid #e0e0e0\\\" type=text ng-model=vm.exception.rejection_reason name=rejection_reason readonly required></md-input-container></div></div></md-card-content></md-card><br><div layout-gt-sm=row style=\\\"padding: 0 30px\\\"><i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Created:   </span>{{vm.exception.created_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.created_at | date : \\'h:mm\\'}}        <i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Last Activity:   </span>{{vm.exception.updated_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.updated_at | date : \\'h:mm\\'}}</div><br><section layout=row layout-sm=column layout-align=\\\"end center\\\" layout-wrap><div layout=row layout-align=\\\"start center\\\" flex><md-button ng-click=vm.cancelException() ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.status != \\'expired\\' && (vm.readAccess == false)\\\" style=\\\"width: 110px;border: 1px solid #9b9b9b\\\" class=md-raised>Cancel</md-button><span flex></span> <span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textCustType>* Are you sure you want to end this live exception?</span> </span><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textEndedType>* Are you sure you want to reopen this ended exception?</span> </span><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.isdeliverdShipment>* You can approve the exception but since the shipment has<br>already been delivered it won\\'t show in the Current Exception widget.</span></span></div><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && (vm.readAccess == false) && !vm.isdeliverdShipment && vm.exception.has_load\\\" ng-click=\\\"vm.showRejectModal(ev, \\'reject-exception\\')\\\" style=\\\"background-color: #347c8f;width: 110px\\\" class=\\\"md-raised md-primary\\\">Reject</md-button><md-button ng-if=\\\"(vm.exception.status == \\'rejected\\' || vm.exception.status == \\'live\\' || vm.exception.status == \\'ended\\') && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.is_delivered_shipment == true\\r\\n && (vm.readAccess == false) && !vm.isdeliverdShipment && vm.exception.has_load\\\" ng-click=vm.deliverdException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button><span ng-if=\\\"vm.exception.do_not_send_exception_mails == true && (vm.readAccess == false) && vm.exception.is_delivered_shipment == false\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\' || vm.exception.status == \\'rejected\\' && vm.exception.has_load\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false) && vm.exception.is_delivered_shipment == false\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.has_load\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'rejected\\' && vm.exception.has_load\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'reject\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelEndException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=\\\"vm.textEndedType && !vm.textCustType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelOpenException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=vm.isdeliverdShipment class=\\\"md-raised md-primary\\\" ng-click=vm.cancelDeliverdException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">Cancel</span></md-button><md-button ng-if=\\\"vm.isdeliverdShipment\\r\\n && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">OK</span></md-button><md-button ng-if=\\\"vm.isdeliverdShipment\\r\\n && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">OK</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeEndExceptionStatus(vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'end-live\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeOpenExceptionStatus(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false) && vm.exception.has_load\\\" ng-click=vm.endException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">End</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false) && vm.exception.has_load\\\" ng-click=vm.reOpenException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Reopen</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\' || (vm.readAccess == true)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button></section></div></md-card-content></form></md-card><section ng-if=vm.logs_visible><log-exception-record data=vm.exception></log-exception-record></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/exceptions-cmts/add-exception-approvers.html\",\"<style type=text/css>.btnwidth .md-button{\\r\\n width: 150px;\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"addApproverCmtsPopUpController as vm\\\" ng-cloak style=top:100px><md-dialog-content class=light-content style=\\\"background: #F5F5F5;margin-top: 100px\\\"><crane-table title=USERS icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewAddTitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=vm.searchflag buttons=vm.buttons lensviewtablepopup=true ctrl=addApproverCmtsPopUpController></crane-table></md-dialog-content><md-dialog-actions ng-if=!vm.noResults layout=row layout-align=\\\"center center\\\"><loading-button class=btnwidth style=\\\"margin: 15px 5px\\\" callfunction=vm.addSectedLensGroup(exceptionStatus) display=\\\"SEND EMAIL\\\" isloading=vm.isActionLoading.confirmDelete></loading-button><!--     --><!-- <loading-button\\r\\n class=\\\"btnwidth\\\"\\r\\n style=\\\"margin: 15px 5px;\\\"\\r\\n callfunction=\\\"vm.dontSendEmailException()\\\"\\r\\n display=\\\"DONT SEND EMAIL\\\">\\r\\n </loading-button> --></md-dialog-actions><md-dialog-actions ng-if=vm.noResults layout=row layout-align=\\\"center center\\\"><loading-button class=btnwidth style=\\\"margin: 15px 5px\\\" callfunction=vm.dontSendEmailException() display=OK></loading-button></md-dialog-actions><!-- </form> --></md-dialog>\");\n$templateCache.put(\"/app/admin/exceptions-cmts/end-exception.modal.html\",\"<style type=text/css>.text{\\r\\n text-transform: capitalize;\\r\\n font-weight: bold;\\r\\n }</style><!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\" style=\\\"top: 400px\\\"><md-toolbar><div class=md-toolbar-tools><span class=text>End Live Exception?</span> <span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><form name=rejectForm><md-dialog-content class=\\\"light-content md-padding\\\"><p style=\\\"font-style: normal\\\">Are you sure you want to end this live exception?</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"center center\\\"><loading-button style=\\\"margin: 15px 5px\\\" callfunction=\\\"vm.endExceptionSubmit(exception_id,\\'end\\')\\\" display=YES isloading=vm.isActionLoading.confirmDelete></loading-button>   <loading-button style=\\\"margin: 15px 5px\\\" callfunction=vm.closeModal() display=NO></loading-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/exceptions-cmts/exceptions-cmts.html\",\"<cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true></div><div class=\\\"shell-padding loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>MANAGE EXCEPTIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/cmts-exceptions class=parent-link><span>CMTS Exceptions</span></a></span></div><!-- <div class=\\\"m-t\\\"> --><!-- <a href=\\\"/potential-exceptions/new\\\" ng-if=\\\"vm.canCreate\\\">\\r\\n <md-button class=\\\"md-raised search-type md-accent\\\">{{\\'ADMIN.POTENTIAL.CREATE_BUTTON\\' | translate}}</md-button>\\r\\n </a> --><!-- </div> --></div></div><section ng-controller=\\\"ExceptionsCmtsController as cf\\\"><crane-table title=\\\"EXCEPTIONS PENDING APPROVAL\\\" icon=vm.icon lensviewtable=cf.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoading is-no-results=cf.noResults buttons=cf.buttons searchflag=cf.searchflag ctrl=ExceptionsCmtsController></crane-table></section><div ng-controller=\\\"ExceptionsCmtsExistController as cf\\\" layout-gt-sm=row layout-align-gt-sm=\\\"end center\\\" class=p-a-sm><span class=\\\"btn-link btn-block-sm {{cf.exceptionFilter.value == \\'all\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"cf.setFilter(\\'all\\', \\'all\\')\\\">All <span class=text-sub>({{all}})</span></span> <span class=\\\"btn-link btn-block-sm {{cf.exceptionFilter.value == \\'live\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"cf.setFilter(\\'live\\', \\'all\\')\\\">Live <span class=text-sub>({{live}})</span></span> <span class=\\\"btn-link btn-block-sm {{cf.exceptionFilter.value ==\\'expired\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"cf.setFilter(\\'expired\\', \\'all\\')\\\">Expired <span class=text-sub>({{expired}})</span></span> <span class=\\\"btn-link btn-block-sm {{cf.exceptionFilter.value == \\'ended\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"cf.setFilter(\\'ended\\', \\'all\\')\\\">Ended <span class=text-sub>({{ended}})</span></span> <span class=\\\"btn-link btn-block-sm {{cf.exceptionFilter.value == \\'rejected\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"cf.setFilter(\\'rejected\\', \\'all\\')\\\">Rejected <span class=text-sub>({{rejected}})</span></span></div><section ng-controller=\\\"ExceptionsCmtsExistController as cf\\\"><crane-table title=\\\"EXISTING EXCEPTIONS\\\" icon=vm.icon lensviewtable=cf.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoadingExist is-no-results=cf.noResults buttons=cf.buttons searchflag=cf.searchflag ctrl=ExceptionsCmtsExistController></crane-table></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/exceptions-cmts/log.html\",\"<md-card class=m-t ng-if=$ctrl.data.log.length><md-toolbar class=md-toolbar-tools><h2>{{\\'ADMIN.COMPANY.LOG\\' | translate}}</h2><span flex=auto></span><!-- <md-button class=\\\"md-raised\\\" ng-click=\\\"$ctrl.logExportShowCSV(data)\\\">\\r\\n Export\\r\\n </md-button> --></md-toolbar><md-card-content class=light-form><div class=table-scroll><table class=\\\"card-table table-fixed table-static\\\"><thead><tr><th style=\\\"width: 25%\\\">User</th><th style=\\\"width: 15%\\\">Created</th><th style=\\\"width: 60%\\\">Actions</th></tr></thead><tbody><tr class=md-whiteframe-1dp ng-repeat=\\\"log_record in $ctrl.data.log\\\"><td style=\\\"width: 25%\\\">{{log_record.username}}</td><td style=\\\"width: 15%\\\">{{log_record.created_at | date}}</td><td style=\\\"width: 60%\\\"><p ng-bind-html=$ctrl.processActions(log_record.actions)></p></td></tr></tbody></table></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/admin/exceptions-cmts/reject-exception.modal.html\",\"<style type=text/css>.text{\\r\\n text-transform: capitalize;\\r\\n font-weight: bold;\\r\\n }</style><!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\" style=\\\"top: 150px\\\"><md-toolbar><div class=md-toolbar-tools><span class=text>Reject This Pending Exception?</span> <span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><form name=rejectForm><md-dialog-content style=\\\"padding: 22px\\\" class=\\\"light-content md-padding\\\"><p style=\\\"font-style: normal\\\">Are you sure you want to reject this pending exception?<br>if YES, please provide a reason for rejection*</p><p style=\\\"color: black;font-weight: bold\\\">REASON FOR REJECTION*</p><md-input><textarea ng-model=reject_reason name=reject_reason required rows=5 cols=35></textarea><div ng-messages=rejectForm.reject_reason.$error><div ng-show=reject_reason_check ng-message=required style=\\\"color:red;font-style: italic\\\">Please provide a reason for rejection.</div></div></md-input></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"center center\\\"><loading-button style=\\\"margin: 15px 5px\\\" callfunction=\\\"vm.rejectSubmit(reject_reason,exception_id,\\'reject\\')\\\" display=YES isloading=vm.isActionLoading.confirmDelete></loading-button>   <loading-button style=\\\"margin: 15px 5px\\\" callfunction=vm.closeModal() display=NO></loading-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/exceptions-cmts/view-3gtms-exceptions.html\",\"<style>.hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }\\r\\n .space-customer-grid{\\r\\n margin-left: 2%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }\\r\\n .top-status{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_one{\\r\\n background-color: #9b9b9b !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_two{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_three{\\r\\n background-color: #48c267 !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_four{\\r\\n background-color: #347c8f !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }</style><cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>MANAGE EXCEPTIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/cmts-exceptions class=parent-link><span>View an Exception</span></a>/ <span ng-if=\\\"vm.exception.status == \\'pending\\'\\\">Exception Pending Approval</span> <span ng-if=\\\"vm.exception.status == \\'rejected\\'\\\">Exception Rejected</span> <span ng-if=\\\"vm.exception.status == \\'expired\\'\\\">Exception Expired</span> <span ng-if=\\\"vm.exception.status == \\'live\\'\\\">Exception is Live</span> <span ng-if=\\\"vm.exception.status == \\'ended\\'\\\">Exception Ended</span></span></div></div></div><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons>error_outline</md-icon><span>EXCEPTION DETAILS</span></h2><span flex=auto></span><div><md-button style=\\\"width: 145px\\\" class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.viewShipment(vm.exception.pronumber) ng-disabled=\\\"\\\" type=submit class=\\\"btn btn-default\\\" ng-show=true><!-- <md-icon>save</md-icon> --> <span ng-hide=\\\"\\\">VIEW SHIPMENT</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div><span flex=0></span></div></md-toolbar><md-card-content style=\\\"padding-bottom: 1px\\\"><div style=\\\"text-align: center;margin-bottom: 10px\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\'\\\" class=\\\"md-raised md-primary top-status\\\">PENDING APPROVAL</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\'\\\" class=\\\"md-raised md-primary top-status_one\\\">EXPIRED</md-button><md-button ng-if=\\\"vm.exception.status == \\'rejected\\'\\\" class=\\\"md-raised md-primary top-status_two\\\">REJECTED</md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\'\\\" class=\\\"md-raised md-primary top-status_three\\\">LIVE</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\'\\\" class=\\\"md-raised md-primary top-status_four\\\">ENDED</md-button></div><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">CUSTOMER</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;text-transform: uppercase\\\" ng-model=vm.exception.company_name name=company_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">PRO #</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pronumber name=pronumber readonly required></md-input-container></div></div><br><h3 style=\\\"color: black\\\">MILESTONE MISSED</h3><div layout-gt-sm=row class=newchips><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">MILESTONE</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pointname name=pointname readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ESTIMATED</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.estimated name=estimated readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ACTUAL</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;color: #ee533e !important\\\" ng-model=vm.exception.actual name=actual readonly required></md-input-container></div></div><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=33></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REASON DESCRIPTION</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REMARKS</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div></div></md-card-content></md-card></div></md-card-content><md-card-content style=\\\"padding-top: 0px\\\"><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">EXCEPTION APPROVER</label><md-input-container class=\\\"md-block error-hidden\\\"><!-- <input type=\\\"text\\\"\\r\\n style=\\\"border-bottom: 2px solid #e0e0e0;\\\"\\r\\n ng-model=\\\"vm.getUser()\\\"\\r\\n name=\\\"first_name\\\"\\r\\n readonly=\\\"true\\\"\\r\\n required=\\\"required\\\" /> --> <input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.excAprover name=first_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">REASON FOR REJECTION</label><md-input-container class=\\\"md-block error-hidden\\\"><input style=\\\"border-bottom: 2px solid #e0e0e0\\\" type=text ng-model=vm.exception.rejection_reason name=rejection_reason readonly required></md-input-container></div></div></md-card-content></md-card><br><div layout-gt-sm=row style=\\\"padding: 0 30px\\\"><i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Created:   </span>{{vm.exception.created_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.created_at | date : \\'h:mm\\'}}        <i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Last Activity:   </span>{{vm.exception.updated_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.updated_at | date : \\'h:mm\\'}}</div><br><section layout=row layout-sm=column layout-align=\\\"end center\\\" layout-wrap><div layout=row layout-align=\\\"start center\\\" flex><md-button ng-click=vm.cancelException() ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.status != \\'expired\\' && (vm.readAccess == false)\\\" style=\\\"width: 110px;border: 1px solid #9b9b9b\\\" class=md-raised>Cancel</md-button><span flex></span> <span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textCustType>* Are you sure you want to end this live exception?</span> </span><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textEndedType>* Are you sure you want to reopen this ended exception?</span> </span><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.isdeliverdShipment>* You can approve the exception but since the shipment has<br>already been delivered it won\\'t show in the Current Exception widget.</span></span></div><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && (vm.readAccess == false) && !vm.isdeliverdShipment\\\" ng-click=\\\"vm.showRejectModal(ev, \\'reject-exception\\')\\\" style=\\\"background-color: #347c8f;width: 110px\\\" class=\\\"md-raised md-primary\\\">Reject</md-button><md-button ng-if=\\\"(vm.exception.status == \\'rejected\\' || vm.exception.status == \\'live\\' || vm.exception.status == \\'ended\\') && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.is_delivered_shipment == true\\r\\n && (vm.readAccess == false) && !vm.isdeliverdShipment\\\" ng-click=vm.deliverdException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button><span ng-if=\\\"vm.exception.do_not_send_exception_mails == true && (vm.readAccess == false) && vm.exception.is_delivered_shipment == false\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\' || vm.exception.status == \\'rejected\\'\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false) && vm.exception.is_delivered_shipment == false\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\'\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'rejected\\'\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'reject\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelEndException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=\\\"vm.textEndedType && !vm.textCustType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelOpenException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=vm.isdeliverdShipment class=\\\"md-raised md-primary\\\" ng-click=vm.cancelDeliverdException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">Cancel</span></md-button><md-button ng-if=\\\"vm.isdeliverdShipment\\r\\n && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">OK</span></md-button><md-button ng-if=\\\"vm.isdeliverdShipment\\r\\n && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">OK</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeEndExceptionStatus(vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'end-live\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeOpenExceptionStatus(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.endException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">End</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.reOpenException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Reopen</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\' || (vm.readAccess == true)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button></section></div></md-card-content></form></md-card><section ng-if=vm.logs_visible><log-exception-record data=vm.exception></log-exception-record></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/exceptions-csl/add-exception-approvers.html\",\"<style type=text/css>.btnwidth .md-button{\\r\\n width: 150px;\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"addApproverPopUpController as vm\\\" ng-cloak style=top:100px><md-dialog-content class=light-content style=\\\"background: #F5F5F5;margin-top: 100px\\\"><crane-table title=USERS icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewAddTitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=vm.searchflag buttons=vm.buttons lensviewtablepopup=true ctrl=addApproverPopUpController></crane-table></md-dialog-content><md-dialog-actions ng-if=!vm.noResults layout=row layout-align=\\\"center center\\\"><loading-button class=btnwidth style=\\\"margin: 15px 5px\\\" callfunction=vm.addSectedLensGroup(exceptionStatus) display=\\\"SEND EMAIL\\\" isloading=vm.isActionLoading.confirmDelete></loading-button><!--    \\r\\n <loading-button\\r\\n class=\\\"btnwidth\\\"\\r\\n style=\\\"margin: 15px 5px;\\\"\\r\\n callfunction=\\\"vm.dontSendEmailException()\\\"\\r\\n display=\\\"DONT SEND EMAIL\\\">\\r\\n </loading-button> --></md-dialog-actions><md-dialog-actions ng-if=vm.noResults layout=row layout-align=\\\"center center\\\"><loading-button class=btnwidth style=\\\"margin: 15px 5px\\\" callfunction=vm.dontSendEmailException() display=OK></loading-button></md-dialog-actions><!-- </form> --></md-dialog>\");\n$templateCache.put(\"/app/admin/exceptions-csl/end-exception.modal.html\",\"<style type=text/css>.text{\\r\\n text-transform: capitalize;\\r\\n font-weight: bold;\\r\\n }</style><!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\" style=\\\"top: 400px\\\"><md-toolbar><div class=md-toolbar-tools><span class=text>End Live Exception?</span> <span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><form name=rejectForm><md-dialog-content class=\\\"light-content md-padding\\\"><p style=\\\"font-style: normal\\\">Are you sure you want to end this live exception?</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"center center\\\"><loading-button style=\\\"margin: 15px 5px\\\" callfunction=\\\"vm.endExceptionSubmit(exception_id,\\'end\\')\\\" display=YES isloading=vm.isActionLoading.confirmDelete></loading-button>   <loading-button style=\\\"margin: 15px 5px\\\" callfunction=vm.closeModal() display=NO></loading-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/exceptions-csl/exceptions-csl.html\",\"<cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true></div><div class=\\\"shell-padding loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>MANAGE EXCEPTIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/csl-exceptions class=parent-link><span>CSL Exceptions</span></a></span></div><!-- <div class=\\\"m-t\\\"> --><!-- <a href=\\\"/potential-exceptions/new\\\" ng-if=\\\"vm.canCreate\\\">\\r\\n <md-button class=\\\"md-raised search-type md-accent\\\">{{\\'ADMIN.POTENTIAL.CREATE_BUTTON\\' | translate}}</md-button>\\r\\n </a> --><!-- </div> --></div></div><section ng-controller=\\\"ExceptionsCslController as lv\\\"><crane-table title=\\\"EXCEPTIONS PENDING APPROVAL\\\" icon=vm.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoading is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag ctrl=ExceptionsCslController></crane-table></section><div ng-controller=\\\"ExceptionsCslExistController as lv\\\" layout-gt-sm=row layout-align-gt-sm=\\\"end center\\\" class=p-a-sm><span class=\\\"btn-link btn-block-sm {{lv.exceptionFilter.value == \\'all\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"lv.setFilter(\\'all\\', \\'all\\')\\\">All <span class=text-sub>({{all}})</span></span> <span class=\\\"btn-link btn-block-sm {{lv.exceptionFilter.value == \\'live\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"lv.setFilter(\\'live\\', \\'all\\')\\\">Live <span class=text-sub>({{live}})</span></span> <span class=\\\"btn-link btn-block-sm {{lv.exceptionFilter.value ==\\'expired\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"lv.setFilter(\\'expired\\', \\'all\\')\\\">Expired <span class=text-sub>({{expired}})</span></span> <span class=\\\"btn-link btn-block-sm {{lv.exceptionFilter.value == \\'ended\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"lv.setFilter(\\'ended\\', \\'all\\')\\\">Ended <span class=text-sub>({{ended}})</span></span> <span class=\\\"btn-link btn-block-sm {{lv.exceptionFilter.value == \\'rejected\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"lv.setFilter(\\'rejected\\', \\'all\\')\\\">Rejected <span class=text-sub>({{rejected}})</span></span></div><section ng-controller=\\\"ExceptionsCslExistController as lv\\\"><crane-table title=\\\"EXISTING EXCEPTIONS\\\" icon=vm.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.exceptiontitle is-loading=isLoadingExist is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag ctrl=ExceptionsCslExistController></crane-table></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/exceptions-csl/log.html\",\"<md-card class=m-t ng-if=$ctrl.data.log.length><md-toolbar class=md-toolbar-tools><h2>{{\\'ADMIN.COMPANY.LOG\\' | translate}}</h2><span flex=auto></span><!-- <md-button class=\\\"md-raised\\\" ng-click=\\\"$ctrl.logExportShowCSV(data)\\\">\\r\\n Export\\r\\n </md-button> --></md-toolbar><md-card-content class=light-form><div class=table-scroll><table class=\\\"card-table table-fixed table-static\\\"><thead><tr><th style=\\\"width: 25%\\\">User</th><th style=\\\"width: 15%\\\">Created</th><th style=\\\"width: 60%\\\">Actions</th></tr></thead><tbody><tr class=md-whiteframe-1dp ng-repeat=\\\"log_record in $ctrl.data.log\\\"><td style=\\\"width: 25%\\\">{{log_record.username}}</td><td style=\\\"width: 15%\\\">{{log_record.created_at | date}}</td><td style=\\\"width: 60%\\\"><p ng-bind-html=$ctrl.processActions(log_record.actions)></p></td></tr></tbody></table></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/admin/exceptions-csl/reject-exception.modal.html\",\"<style type=text/css>.text{\\r\\n text-transform: capitalize;\\r\\n font-weight: bold;\\r\\n }</style><!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\" style=\\\"top: 150px\\\"><md-toolbar><div class=md-toolbar-tools><span class=text>Reject This Pending Exception?</span> <span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><form name=rejectForm><md-dialog-content style=\\\"padding: 22px\\\" class=\\\"light-content md-padding\\\"><p style=\\\"font-style: normal\\\">Are you sure you want to reject this pending exception?<br>if YES, please provide a reason for rejection*</p><p style=\\\"color: black;font-weight: bold\\\">REASON FOR REJECTION*</p><md-input><textarea ng-model=reject_reason name=reject_reason required rows=5 cols=35></textarea><div ng-messages=rejectForm.reject_reason.$error><div ng-show=reject_reason_check ng-message=required style=\\\"color:red;font-style: italic\\\">Please provide a reason for rejection.</div></div></md-input></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"center center\\\"><loading-button style=\\\"margin: 15px 5px\\\" callfunction=\\\"vm.rejectSubmit(reject_reason,exception_id,\\'reject\\')\\\" display=YES isloading=vm.isActionLoading.confirmDelete></loading-button>   <loading-button style=\\\"margin: 15px 5px\\\" callfunction=vm.closeModal() display=NO></loading-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/exceptions-csl/view-csl-exceptions.html\",\"<style>.hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }\\r\\n .space-customer-grid{\\r\\n margin-left: 2%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }\\r\\n .top-status{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_one{\\r\\n background-color: #9b9b9b !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_two{\\r\\n background-color: #ee533e !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_three{\\r\\n background-color: #48c267 !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }\\r\\n .top-status_four{\\r\\n background-color: #347c8f !important;\\r\\n width: 285px;\\r\\n height: 45px;\\r\\n font-weight: bold;\\r\\n color: white !important;\\r\\n font-size: 15px;\\r\\n border-radius: 5px !important;\\r\\n }</style><cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>MANAGE EXCEPTIONS</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/csl-exceptions class=parent-link><span>View an Exception</span></a>/ <span ng-if=\\\"vm.exception.status == \\'pending\\'\\\">Exception Pending Approval</span> <span ng-if=\\\"vm.exception.status == \\'rejected\\'\\\">Exception Rejected</span> <span ng-if=\\\"vm.exception.status == \\'expired\\'\\\">Exception Expired</span> <span ng-if=\\\"vm.exception.status == \\'live\\'\\\">Exception is Live</span> <span ng-if=\\\"vm.exception.status == \\'ended\\'\\\">Exception Ended</span></span></div></div></div><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons>error_outline</md-icon><span>EXCEPTION DETAILS</span></h2><span flex=auto></span><div><md-button style=\\\"width: 145px\\\" class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.viewShipment(vm.exception.pronumber) ng-disabled=\\\"\\\" type=submit class=\\\"btn btn-default\\\" ng-show=vm.exception.has_load><!-- <md-icon>save</md-icon> --> <span ng-hide=\\\"\\\">VIEW SHIPMENT</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div><span flex=0></span></div></md-toolbar><md-card-content style=\\\"padding-bottom: 1px\\\"><div style=\\\"text-align: center;margin-bottom: 10px\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\'\\\" class=\\\"md-raised md-primary top-status\\\">PENDING APPROVAL</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\'\\\" class=\\\"md-raised md-primary top-status_one\\\">EXPIRED</md-button><md-button ng-if=\\\"vm.exception.status == \\'rejected\\'\\\" class=\\\"md-raised md-primary top-status_two\\\">REJECTED</md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\'\\\" class=\\\"md-raised md-primary top-status_three\\\">LIVE</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\'\\\" class=\\\"md-raised md-primary top-status_four\\\">ENDED</md-button></div><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">CUSTOMER</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;text-transform: uppercase\\\" ng-model=vm.exception.company_name name=company_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">PRO #</label><md-input-container class=\\\"md-block error-hidden\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pronumber name=pronumber readonly required></md-input-container></div></div><br><h3 style=\\\"color: black\\\">MILESTONE MISSED</h3><div layout-gt-sm=row class=newchips><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">MILESTONE</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.pointname name=pointname readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ESTIMATED</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.estimated name=estimated readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">ACTUAL</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0;color: #ee533e !important\\\" ng-model=vm.exception.actual name=actual readonly required></md-input-container></div></div><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=33></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REASON DESCRIPTION</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div><div flex-gt-sm=33><label style=\\\"color: #9f9f9f\\\">REMARKS</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 90%\\\"><input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.exception.name name=first_name readonly required></md-input-container></div></div></md-card-content></md-card></div></md-card-content><md-card-content style=\\\"padding-top: 0px\\\"><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label style=\\\"color: #9f9f9f\\\">EXCEPTION APPROVER</label><md-input-container class=\\\"md-block error-hidden\\\"><!-- <input type=\\\"text\\\"\\r\\n style=\\\"border-bottom: 2px solid #e0e0e0;\\\"\\r\\n ng-model=\\\"vm.getUser()\\\"\\r\\n name=\\\"first_name\\\"\\r\\n readonly=\\\"true\\\"\\r\\n required=\\\"required\\\" /> --> <input type=text style=\\\"border-bottom: 2px solid #e0e0e0\\\" ng-model=vm.excAprover name=first_name readonly required></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label style=\\\"color: #9f9f9f\\\">REASON FOR REJECTION</label><md-input-container class=\\\"md-block error-hidden\\\"><input style=\\\"border-bottom: 2px solid #e0e0e0\\\" type=text ng-model=vm.exception.rejection_reason name=rejection_reason readonly required></md-input-container></div></div></md-card-content></md-card><br><div layout-gt-sm=row style=\\\"padding: 0 30px\\\"><i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Created:   </span>{{vm.exception.created_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.created_at | date : \\'h:mm\\'}}        <i style=\\\"font-size: 18px;color: black\\\" class=material-icons></i>    <span>Last Activity:   </span>{{vm.exception.updated_at | date : \\'dd-MMM-yyyy\\'}}     {{vm.exception.updated_at | date : \\'h:mm\\'}}</div><br><section layout=row layout-sm=column layout-align=\\\"end center\\\" layout-wrap><div layout=row layout-align=\\\"start center\\\" flex><md-button ng-click=vm.cancelException() ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.status != \\'expired\\' && (vm.readAccess == false)\\\" style=\\\"width: 110px;border: 1px solid #9b9b9b\\\" class=md-raised>Cancel</md-button><span flex></span> <span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textCustType>* Are you sure you want to end this live exception?</span> </span><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textEndedType>* Are you sure you want to reopen this ended exception?</span> </span><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.isdeliverdShipment>* You can approve the exception but since the shipment has<br>already been delivered it won\\'t show in the Current Exception widget.</span></span></div><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && (vm.readAccess == false) && !vm.isdeliverdShipment && vm.exception.has_load\\\" ng-click=\\\"vm.showRejectModal(ev, \\'reject-exception\\')\\\" style=\\\"background-color: #347c8f;width: 110px\\\" class=\\\"md-raised md-primary\\\">Reject</md-button><md-button ng-if=\\\"(vm.exception.status == \\'rejected\\' || vm.exception.status == \\'live\\' || vm.exception.status == \\'ended\\') && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.is_delivered_shipment == true\\r\\n && (vm.readAccess == false) && !vm.isdeliverdShipment && vm.exception.has_load\\\" ng-click=vm.deliverdException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button><span ng-if=\\\"vm.exception.do_not_send_exception_mails == true && (vm.readAccess == false) && vm.exception.is_delivered_shipment == false\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\' || vm.exception.status == \\'rejected\\' && vm.exception.has_load\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false) && vm.exception.is_delivered_shipment == false\\\"><md-button ng-if=\\\"vm.exception.status == \\'pending\\' && vm.exception.has_load\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><span ng-if=\\\"vm.exception.do_not_send_exception_mails == false && (vm.readAccess == false)\\\"><md-button ng-if=\\\"vm.exception.status == \\'rejected\\' && vm.exception.has_load\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'reject\\')\\\" style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Approve</md-button></span><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelEndException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=\\\"vm.textEndedType && !vm.textCustType\\\" class=\\\"md-raised md-primary\\\" ng-click=vm.cancelOpenException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">No</span></md-button><md-button ng-if=vm.isdeliverdShipment class=\\\"md-raised md-primary\\\" ng-click=vm.cancelDeliverdException() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\">Cancel</span></md-button><md-button ng-if=\\\"vm.isdeliverdShipment\\r\\n && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">OK</span></md-button><md-button ng-if=\\\"vm.isdeliverdShipment\\r\\n && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.approveException(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">OK</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.textCustType && !vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeEndExceptionStatus(vm.exception.id,\\'end\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == false\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.addExceptions(ev,vm.exception.id,\\'approve\\',\\'end-live\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"!vm.textCustType && vm.textEndedType && vm.exception.do_not_send_exception_mails == true\\\" class=\\\"md-raised md-primary\\\" ng-click=\\\"vm.changeOpenExceptionStatus(vm.exception.id,\\'approve\\')\\\" hide-xs><span style=\\\"padding: 10px 25px\\\">Yes</span></md-button><md-button ng-if=\\\"vm.exception.status == \\'live\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false) && vm.exception.has_load\\\" ng-click=vm.endException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">End</md-button><md-button ng-if=\\\"vm.exception.status == \\'ended\\' && !vm.textCustType && !vm.textEndedType && (vm.readAccess == false) && vm.exception.has_load\\\" ng-click=vm.reOpenException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Reopen</md-button><md-button ng-if=\\\"vm.exception.status == \\'expired\\' || (vm.readAccess == true)\\\" ng-click=vm.cancelException() style=\\\"background-color: #347c8f;width: 115px\\\" class=\\\"md-raised md-primary\\\">Close</md-button></section></div></md-card-content></form></md-card><section ng-if=vm.logs_visible><log-exception-record data=vm.exception></log-exception-record></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/feature-spotlight/add-feature-spotlight.html\",\"<cva-shell><div class=\\\"shell-padding book-shipment content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 ng-show=vm.isCreate translate=ADMIN.FEATURE.ADD_SPOTLIGHT_SLIDE></span><br><span class=md-display-1 ng-show=!vm.isCreate><span translate=ADMIN.FEATURE.EDIT_SPOTLIGHT_SLIDE></span></span></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/featureSpotlight class=parent-link><span translate=ADMIN.FEATURE.FEATURE_SPOTLIGHT></span>{{\\\"/\\\"}}</a> <span style=\\\"color:rgb(177, 167, 167)\\\" ng-show=vm.isCreate translate=ADMIN.FEATURE.ADD_SPOTLIGHT_SLIDE></span> <span style=\\\"color:rgb(177, 167, 167)\\\" ng-show=!vm.isCreate translate=ADMIN.FEATURE.EDIT_SPOTLIGHT_SLIDE></span></span></div></div></div><md-card><form name=vm.SpotlightForm reset-directive=vm.newSlide class=light-form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=\\\"md-toolbar-tools inline-table\\\"><h2 class=md-flex layout=row><md-icon class=material-icons></md-icon><span translate=ADMIN.FEATURE.SLIDE_CONTENT></span> <label class=heading-sub-text translate=ADMIN.FEATURE.GROUPS_COMPANY_DATA></label></h2><span flex=auto></span><md-button class=\\\"md-raised md-accent btn-block-xs\\\" class=\\\"btn btn-default\\\" ng-click=\\\"vm.showModal(ev, \\'preview-slide\\')\\\"><span ng-hide=vm.isLoad.contact translate=ADMIN.FEATURE.PREVIEW></span></md-button><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-disabled=\\\"vm.isLoad.account || vm.SpotlightForm.$pristine || vm.SpotlightForm.$invalid || vm.SpotlightForm.publish_date.$error.minDate || vm.isSaveDisabled\\\" type=submit ng-click=vm.createSlide(vm.newSlide) class=\\\"btn btn-default\\\"><span ng-hide=vm.isLoad.contact translate=ADMIN.FEATURE.SAVE></span></md-button><span ng-if=vm.isCreate>  </span><md-menu ng-if=!vm.isCreate><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4 id=spotlightEditMenu><md-menu-item ng-if=vm.newSlide><md-button class=md-primary ng-disabled=vm.isPublishedDisabled ng-click=\\\"vm.canDelete(vm.newSlide, ev, \\'delete-spotlight\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=ADMIN.FEATURE.DELETE_SLIDE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><div layout-gt-sm=row><div flex-gt-sm=90><h3><label translate=ADMIN.FEATURE.SLIDE_SETTINGS></label></h3></div></div><div layout-gt-sm=row><div flex-gt-sm=45><md-input-container class=\\\"md-block error-hidden m-b\\\"><label translate=ADMIN.FEATURE.FEATURE_NAME></label><input style=\\\"font-size:110%;color: #30353B\\\" data-ng-model=vm.newSlide.feature_name type=text name=feature_name required maxlength=100 ng-disabled=vm.isDisabled><div ng-messages=vm.SpotlightForm.feature_name.$error><div ng-message=required><span translate=ADMIN.FEATURE.ERROR.FEATURE_NAME_REQUIRED></span></div><div ng-message=maxlength><span translate=ADMIN.FEATURE.ERROR.FEATURE_NAME_MAXLENGTH></span></div></div></md-input-container></div><div flex-gt-sm=20 flex-offset-gt-sm=10 style=\\\"margin-top: -10px\\\"><label translate=ADMIN.FEATURE.CURRENT_STATUS style=\\\"font-size: 11px; color: #b4b5b5\\\"></label><md-input-container class=\\\"md-block error-hidden m-b\\\"><label translate=ADMIN.FEATURE.ACTIVE class=inline-elem></label><md-switch class=switch-opt ng-model=vm.newSlide.is_active name=slide_active ng-disabled=vm.isSlideActiveDisabled ng-if=\\\"vm.newSlide.is_active_grey == false || vm.isCreate\\\"></md-switch><md-switch class=\\\"switch-opt active_grey\\\" ng-model=vm.newSlide.active name=slide_active ng-disabled=vm.isSlideActiveDisabled ng-if=\\\"vm.newSlide.is_active_grey == true\\\"></md-switch></md-input-container></div></div><div layout=column layout-gt-sm=row><div flex=100 flex-gt-sm=50><md-input-container class=\\\"md-block error-hidden m-b\\\"><label translate=ADMIN.FEATURE.PUBLISH_OPTIONS></label><md-select style=\\\"font-size:110%;color: #30353B\\\" ng-model=vm.newSlide.slide_status name=publish_status aria-label=publish_status md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() ng-disabled=vm.isPublishedDisabled><md-option ng-value=opt ng-repeat=\\\"opt in vm.publishOptionsArr\\\">{{ opt }}</md-option></md-select></md-input-container></div><div flex=100 flex-gt-sm=50 flex-offset-gt-sm=10><div layout=column><div layout=row><label translate=ADMIN.FEATURE.PUBLISH_DATE_TIME_EST style=\\\"width: 100%; float:left;font-size: 11px; color: #b4b5b5\\\"></label></div><div layout=column layout-sm=row><div flex=50 flex-gt-sm=100><mdp-date-picker style=\\\"font-size:110%;color: #30353B\\\" name=publish_date mdp-format=MM/DD/YYYY mdp-min-date=vm.minDate ng-model=vm.slideDate mdp-disabled=vm.isDisabled></mdp-date-picker><div ng-messages=vm.SpotlightForm.publish_date.$error class=text-error-input style=\\\"margin-top: -35px;margin-left: 30px\\\"><div ng-message=required><span translate=ADMIN.FEATURE.ERROR.PUBLISH_DATE_REQUIRED></span></div><div ng-message=format><span translate=ADMIN.FEATURE.ERROR.PUBLISH_DATE_INVALID_FORMAT></span></div><div ng-message=minDate><span translate=ADMIN.FEATURE.ERROR.PUBLISH_DATE_INVALID_VALUE></span></div></div></div><div flex=50 flex-gt-sm=100><mdp-time-picker style=\\\"font-size:110%;color: #30353B\\\" name=publish_time ng-model=vm.slideTime mdp-format=\\\"hh:mm A\\\" mdp-disabled=vm.isDisabled></mdp-time-picker><div ng-messages=vm.SpotlightForm.publish_time.$error class=text-error-input style=\\\"margin-top: -35px;margin-left: 30px\\\"><div ng-message=required><span translate=ADMIN.FEATURE.ERROR.PUBLISH_TIME_REQUIRED></span></div><div ng-message=format><span translate=ADMIN.FEATURE.ERROR.PUBLISH_TIME_INVALID_FORMAT></span></div></div></div></div></div></div></div><div layout=row><div flex=100 flex-gt-sm=45><md-input-container class=\\\"md-block error-hidden m-b\\\"><h4 translate=ADMIN.FEATURE.PRIORITY_FEATURE class=inline-elem></h4><md-switch class=switch-opt ng-model=vm.newSlide.priority name=slide_priority ng-disabled=vm.isDisabled></md-switch><br><br><div class=\\\"heading-sub-text-small ng-scope\\\"><span translate=ADMIN.FEATURE.PRIORITY_MESSAGE></span></div><div ng-messages=vm.SpotlightForm.slide_priority.$error><div ng-message=required><span translate=ADMIN.FEATURE.ERROR.SLIDE_PRIORITY_REQUIRED></span></div></div></md-input-container></div><div flex-gt-sm=20 flex-offset-gt-sm=10 ng-if=vm.canSetNew><md-input-container class=\\\"md-block error-hidden m-b\\\"><md-checkbox ng-model=vm.newSlide.mark_as_new aria-label=isPublishedDisabled ng-disabled=vm.isPublishedDisabled name=mark_as_new class=md-primary><span translate=ADMIN.FEATURE.MARK_AS_NEW></span></md-checkbox></md-input-container></div></div><hr><div layout-gt-sm=row><div flex-gt-sm=90><h3><label translate=ADMIN.FEATURE.SLIDE_CONTENT></label></h3></div></div><div layout-gt-sm=row><div flex-gt-sm=90><md-input-container class=\\\"md-block error-hidden m-b\\\"><label translate=ADMIN.FEATURE.SLIDE_TITLE></label><input style=\\\"font-size:110%;color: #30353B\\\" data-ng-model=vm.newSlide.slide_title type=text name=slide_title maxlength=100 ng-required=vm.isRequired ng-disabled=vm.isDisabled><div ng-messages=vm.SpotlightForm.slide_title.$error><div ng-message=required><span translate=ADMIN.FEATURE.ERROR.SLIDE_TITLE_REQUIRED></span></div><div ng-message=maxlength><span translate=ADMIN.FEATURE.ERROR.SLIDE_TITLE_MAXLENGTH></span></div></div></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=90><label translate=ADMIN.FEATURE.SLIDE_SMALL_CONTENT style=\\\"font-size: 11px; color: #b4b5b5\\\"></label><md-input-container class=\\\"md-block error-hidden\\\"><text-angular name=slide_content ta-toolbar=\\\"[[\\'bold\\',\\'italics\\', \\'underline\\'], [\\'ul\\', \\'ol\\'] ,[\\'justifyLeft\\', \\'justifyCenter\\', \\'justifyRight\\']]\\\" ng-model=vm.newSlide.slide_content ng-required=vm.isRequired ta-max-text=1001 ta-disabled=vm.isDisabled></text-angular></md-input-container><div ng-messages=vm.SpotlightForm.slide_content.$error class=\\\"text-error-input m-b\\\"><div ng-if=vm.SpotlightForm.slide_content.$error.taMaxText class=small-font translate=ADMIN.FEATURE.ERROR.SLIDE_CONTENT_MAXLENGTH></div><div ng-message=required><span translate=ADMIN.FEATURE.ERROR.SLIDE_CONTENT_REQUIRED></span></div></div></div></div><div layout-gt-sm=row><div flex-gt-sm=90><span translate=ADMIN.FEATURE.SLIDE_IMAGE style=\\\"font-size: 11px; color: #b4b5b5\\\"></span><md-input-container class=\\\"md-block error-hidden\\\"><div style=font-size:100%;color:#498FE4 ngf-drop ngf-select ng-model=vm.newSlide.slide_image class=\\\"file-upload upload-text\\\" ngf-drop-available=dropSupported ngf-drag-over-class=\\\"{pattern: \\'image/*\\', accept:\\'dragover\\', reject:\\'dragover\\', delay:100}\\\" ngf-multiple=false ngf-allow-dir=false ngf-max-size=5MB ng-required=vm.isRequired ng-disabled=vm.isDisabled name=slide_img ngf-min-height=325 ngf-max-height=335 ngf-min-width=945 ngf-max-width=955 accept=image/*>{{\\\"ADMIN.FEATURE.BROWSE_FILES\\\" |translate }}<br><br></div><img title=\\\"No image selected\\\" class=preview ng-src={{vm.newSlide.slide_image.url}} style=\\\"font-size: 11px\\\"></md-input-container><div ng-messages=vm.SpotlightForm.slide_img.$error class=\\\"text-error-input m-b\\\"><div ng-message=maxSize><span translate=ADMIN.FEATURE.ERROR.SLIDE_IMAGE_MAX_SIZE></span></div><div ng-message=required><span translate=ADMIN.FEATURE.ERROR.SLIDE_IMAGE_REQUIRED></span></div><div ng-message=minHeight><span translate=ADMIN.FEATURE.ERROR.SLIDE_IMAGE_INVALID_SIZE></span></div><div ng-message=maxHeight><span translate=ADMIN.FEATURE.ERROR.SLIDE_IMAGE_INVALID_SIZE></span></div><div ng-message=minWidth><span translate=ADMIN.FEATURE.ERROR.SLIDE_IMAGE_INVALID_SIZE></span></div><div ng-message=maxWidth><span translate=ADMIN.FEATURE.ERROR.SLIDE_IMAGE_INVALID_SIZE></span></div></div></div></div></md-card-content></form></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/admin/feature-spotlight/feature-spotlight.html\",\"<cva-shell><div class=\\\"shell-padding book-shipment content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 translate=ADMIN.FEATURE.FEATURE_SPOTLIGHT></span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/featureSpotlight class=parent-link><span translate=ADMIN.FEATURE.FEATURE_SPOTLIGHT></span></a></span></div></div></div><section ng-controller=\\\"featureSpotlightController as vm\\\"><crane-table title=ADMIN.FEATURE.SPOTLIGHT_SLIDES is-loading=vm.isLoading.table buttons=vm.buttons lensviewtitle=vm.lensviewtitle lensviewtable=vm.lensviewtable spotlighttable=vm.spotlighttable icon=vm.icon searchflag=vm.searchFlag menu=\\\"\\'/app/admin/feature-spotlight/forms/spotlight-actions.html\\'\\\" ctrl=featureSpotlightController></crane-table></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/groups/groups-form.html\",\"<cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding groups-form content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1 ng-show=vm.isCreate translate=ADMIN.GROUPS.CREATE_GROUP></span> <span class=md-display-1 ng-show=!vm.isCreate translate=ADMIN.GROUPS.EDIT_GROUP></span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/groups class=parent-link><span translate=ADMIN.GROUPS.GROUPS></span></a> / <span ng-show=!vm.isCreate>{{vm.group.name}}</span> <span ng-show=vm.isCreate translate=ADMIN.GROUPS.NEW_GROUP></span></span></div></div></div></div><!-- ACCOUNT DETAILS --><form name=vm.form novalidate class=light-form><md-card><md-toolbar><div class=md-toolbar-tools><h2 class=md-flex><md-icon class=material-icons>business</md-icon><span translate=ADMIN.GROUPS.GROUP_DETAILS></span></h2><span flex=auto></span><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.save() ng-disabled=vm.isLoading type=submit class=\\\"btn btn-default\\\"><span ng-if=!vm.isSaving translate=SAVE></span><md-progress-circular md-mode=indeterminate ng-if=vm.isLoading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=column><div flex-gt-sm=45><md-input-container class=\\\"md-block error-hidden m-b\\\"><label translate=ADMIN.GROUPS.NAME></label><input type=text ng-model=vm.group.name name=name></md-input-container></div></div></md-card-content></md-card><md-card><md-toolbar><div class=md-toolbar-tools><h2 translate=ADMIN.GROUPS.DATA></h2><span flex=auto></span><md-button class=md-raised ng-click=vm.addData()><span translate=ADMIN.GROUPS.ADD_DATA></span></md-button><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item ng-show=\\\"!vm.showDataRemoveButton && vm.groupData.length > 0\\\"><md-button ng-click=vm.editDataRows()><div layout=row flex=auto><p flex=auto><span translate=ADMIN.GROUPS.EDIT_ROWS></span></p></div></md-button></md-menu-item><md-menu-item ng-show=vm.showDataRemoveButton><md-button ng-click=vm.doneEditingData()><div layout=row flex=auto><p flex=auto><span translate=ADMIN.GROUPS.DONE_EDITING></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><md-card class=\\\"m-0 p-a-sm\\\"><div layout=row><div flex=50 class=\\\"text-upper text-white\\\"><span translate=ADMIN.GROUPS.KEYS></span></div><div flex=50 class=\\\"text-upper text-white\\\"><span translate=ADMIN.GROUPS.VALUES></span></div></div></md-card><div layout=row ng-repeat=\\\"data in vm.groupData track by $index\\\"><div flex=50><md-input-container class=\\\"md-block error-hidden\\\"><label translate=ADMIN.GROUPS.KEY></label><input ng-model=data.key></md-input-container></div><div flex=50><md-input-container class=\\\"md-block error-hidden\\\"><label translate=ADMIN.GROUPS.VALUE></label><input ng-model=data.value></md-input-container></div><div ng-show=vm.showDataRemoveButton><md-button class=\\\"md-raised btn-danger\\\" ng-click=vm.removeData($index)><span translate=REMOVE></span></md-button></div></div><div layout=row layout-align=\\\"center start\\\" flex=90 class=m-t><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=vm.showDataRemoveButton ng-click=vm.doneEditingData()><span translate=DONE></span></md-button></div></md-card-content></md-card></form></div></cva-shell>\");\n$templateCache.put(\"/app/admin/groups/groups-index.html\",\"<cva-shell><div class=\\\"shell-padding groups-index content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 translate=ADMIN.GROUPS.MANAGE_GROUPS></span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/groups class=parent-link><span translate=ADMIN.GROUPS.GROUPS></span></a></span></div></div></div><crane-table title=ADMIN.GROUPS.GROUPS icon=vm.icon ; is-loading=vm.isLoading is-no-results=vm.noResults buttons=vm.buttons ctrl=GroupsIndexController></crane-table></div></cva-shell>\");\n$templateCache.put(\"/app/admin/lensview/add-lensgroup.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Advanced Search Modal\\\" ng-controller=\\\"lensviewController as vm\\\" ng-cloak><form name=searchForm reset-directive=searchCtrl.searchFields class=light-form ng-submit=searchCtrl.search()><md-toolbar><div class=md-toolbar-tools><md-icon aria-label=\\\"Lens Group\\\" style=\\\"color: rgb(35, 42, 51); font-size: 25px\\\"></md-icon><h2 class=uppercase style=\\\"margin-left: 15px\\\">Add Lens Group</h2><span style=\\\"font-size: 14px;\\r\\n font-style: italic;\\r\\n color: #8f9093;\\r\\n margin-left: 10px;\\r\\n text-transform: none\\\">Add New Lens Group</span> <span flex=auto></span><md-button class=md-icon-button ng-click=vm.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=light-content style=\\\"background: #F5F5F5\\\"><div layout-gt-sm=row><div flex-gt-sm=50 flex-sm=1 flex-xs=1 layout-margin><div><md-input-container class=\\\"md-block error-hidden\\\"><label>Lens Group Name</label><input ng-model=vm.newLensGroupName></md-input-container><!-- <md-input-container class=\\\"md-block error-hidden\\\">\\r\\n <label >Description</label>\\r\\n <input ng-model=\\\"vm.newLensGroupDescrip\\\">\\r\\n </md-input-container> --></div></div></div><div layout-gt-sm=row><div flex-gt-sm=100 flex-sm=1 flex-xs=1 layout-margin><div><md-input-container class=\\\"md-block error-hidden\\\"><label>Description</label><input ng-model=vm.newLensGroupDescrip></md-input-container></div></div></div></md-dialog-content><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\" style=\\\"background: #F5F5F5;border-top: 1px solid #C6C6C6\\\"><!-- reset is the clear directive--><md-button ng-click=vm.resetForm() hide-xs style=\\\"background: #FFF; border: 1px solid #E4E4E4\\\"><span style=\\\"color: #B5B5B5; font-weight: 600\\\">CANCEL</span></md-button><md-button class=\\\"md-fab md-button md-mini bottom-fab\\\" ng-click=searchCtrl.showListBottomSheet() show-xs hide-gt-xs><md-icon></md-icon></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" type=submit><span>ADD LENS GROUP</span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/demo-user.html\",\"<style>md-chips-wrap[class]{\\r\\n\t\tborder: 1px solid grey;background: #fff;margin-top: 18px;border-radius: 3px;padding:0px;\\r\\n\t}\\r\\n\tinput[class]{\\r\\n\t\ttext-indent: 15px;\\r\\n\t\tfont-size: 15px;\\r\\n\t\tfont-family: inherit !important;\\r\\n\t}\\r\\n\tmd-chips .md-chip {\\r\\n background: #fff;\\r\\n color: rgb(66,66,66);\\r\\n\t}\\r\\n\tmd-icon {\\r\\n color: black;\\r\\n\t}\\r\\n\t.md-select span {\\r\\n color: black;\\r\\n\t}\\r\\n\\r\\n\t.md-chip, .md-chip-input-container{\\r\\n\t\tmargin:4px 4px 4px 0px !important;\\r\\n\t}\\r\\n\\r\\n\t.md-chip-input-container{\\r\\n\t\tdisplay:inline !important;\\r\\n\t\twidth:auto !important;\\r\\n\t}\\r\\nmd-radio-button.md-default-theme.md-checked .md-off, md-radio-button.md-checked .md-off {\\r\\n border-color: #fff;\\r\\n}\\r\\n\\r\\nmd-radio-button.md-default-theme .md-on, md-radio-button .md-on {\\r\\n background-color: #fff;\\r\\n}</style><cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\"><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1>Demo</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=# class=parent-link><span>Generate Email Syntax</span></a></span></div></div></div></div><div layout-gt-sm=row style=\\\"margin:auto 10px\\\"><div layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><h4>Customer Type *    <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.customer_type_cehck>Customer Type is mandatory</span></h4><md-radio-group ng-model=vm.customer_type><md-radio-button style=\\\"display: inline-block\\\" ng-if=vm.demoCWW ng-click=\\\"vm.selectedCusTypeChange(\\'cww\\')\\\" value=cww selected>CWW</md-radio-button>      <md-radio-button style=\\\"display: inline-block\\\" ng-if=vm.demoCSL ng-click=\\\"vm.selectedCusTypeChange(\\'csl\\')\\\" value=csl>CSL</md-radio-button>      <md-radio-button style=\\\"display: inline-block\\\" ng-if=vm.demoCFS ng-click=\\\"vm.selectedCusTypeChange(\\'cfs\\')\\\" value=cfs>CFS</md-radio-button>      <md-radio-button style=\\\"display: inline-block\\\" ng-if=vm.demoCMTS ng-click=\\\"vm.selectedCusTypeChange(\\'cmts\\')\\\" value=cmts>CMTS</md-radio-button></md-radio-group></md-input-container></div></div><div layout-gt-sm=row style=\\\"margin:auto 10px\\\"><div flex-gt-sm=33 flex-sm=1 flex-xs=1><label>Company *</label><md-autocomplete md-delay=300 md-no-cache=true md-search-text=vm.searchText md-on-remove=vm.removeCompany(item) md-selected-item-change=vm.selectedCompanyChange(item) md-items=\\\"item in vm.getMatchesCompanies(\\'demo_companies\\', vm.searchText)\\\" md-item-text=item.display placeholder=\\\"\\\" ng-disabled=!vm.customer_type md-min-length=3><md-item-template><span md-highlight-text=vm.searchText>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete><section ng-if=\\\"vm.notValidDemoEmail && vm.searchText!= undefined && vm.searchText.length===0\\\" style=\\\"color: red\\\">Company is required.</section><section ng-if=\\\"vm.notValidDemoEmail && vm.searchText.length>0\\\" style=\\\"color: red\\\">Invalid company.</section></div>  <div flex-gt-sm=33 flex-sm=1 flex-xs=1 style=margin-top:-1px><label>Department</label><md-chips class=\\\"chips-class user-chips email-chips\\\" ng-model=vm.department_ids md-on-remove=vm.removeDepartments(vm.department_ids) md-on-add=vm.addDepartments(vm.department_ids) md-require-match=true md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"><md-autocomplete md-delay=300 md-search-text=vm.searchTextDepart md-no-cache=true md-items=\\\"depart in vm.getMatchesDepartments(\\'demo_departments\\', vm.searchTextDepart)\\\" md-item-text=depart class=demo-dept-progress placeholder=\\\"\\\" ng-disabled=!vm.company_name><md-item-template><span md-highlight-text=vm.searchTextDepart>{{depart}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></div>  <div flex-gt-sm=33 flex-sm=1 flex-xs=1 style=margin-top:-3px><label>User Role *</label><!-- <md-autocomplete\\r\\n\t\t ng-disabled=\\\"vm.isDisabled\\\"\\r\\n\t\t md-no-cache=\\\"vm.noCache\\\"\\r\\n\t\t md-selected-item-change=\\\"vm.selectedUserChange(item)\\\"\\r\\n\t\t md-selected-item=\\\"vm.selectedItem\\\"\\r\\n\t\t md-search-text=\\\"vm.searchText\\\"\\r\\n\t\t md-items=\\\"item in vm.roles\\\"\\r\\n\t\t md-item-text=\\\"item.display_name\\\"\\r\\n\t\t md-min-length=\\\"0\\\"\\r\\n\t\t placeholder=\\\"\\\">\\r\\n\t\t<md-item-template>\\r\\n\t\t <span md-highlight-text=\\\"vm.searchText\\\" md-highlight-flags=\\\"^i\\\">{{item.display_name}}</span>\\r\\n\t\t</md-item-template>\\r\\n\t\t</md-autocomplete> --><md-select class=md-select style=\\\"border: 1px solid gray;border-radius: 3px;height: 39px;text-indent: 10px;background: #fff\\\" ng-model=vm.user.role aria-label=vm.user.role ng-change=vm.selectedUserChange(vm.user.role) md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-selected=\\\"{{role.value == vm.defaultRole ? \\'true\\': \\'\\'}}\\\" ng-value=role.value ng-repeat=\\\"role in vm.roles\\\">{{role.display_name}}</md-option></md-select></div></div><br><div layout-gt-sm=row style=\\\"margin:auto 10px\\\"><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"width: 100%;height: 50px;text-indent: 15px\\\"><input placeholder=\\\"Email Syntax\\\" style=\\\"width: 100%;height: 50px;text-indent: 15px\\\" required type=email name=clientEmail ng-model=vm.demoEmail readonly required><section ng-if=\\\"vm.notValidDemoEmail && vm.demoEmail!= undefined && vm.demoEmail.length===0\\\" style=\\\"color: red\\\">Email is required.</section><section ng-if=\\\"vm.notValidDemoEmail && vm.demoEmail.length>0\\\" style=\\\"color: red\\\">Invalid email.</section></md-input-container>  <!-- <button style=\\\"padding: 10px;\\\" ngclipboard data-clipboard-text=\\\"{{vm.demoEmail}}\\\" class=\\\"md-raised md-accent md-button md-ink-ripple\\\">\\r\\n \t<span>Copy to clipboard</span></button> --><md-button style=\\\"color: #294F7B;margin:0;display: block;min-width: 20%\\\" class=\\\"md-raised md-primary\\\" ngclipboard data-clipboard-text={{vm.demoEmail}} ng-disabled=vm.notValidDemoEmail><span style=\\\"color: #fff\\\">Copy to clipboard</span></md-button></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/lensview/edit-lensgroup.html\",\"<cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\"><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1 ng-show=vm.isCreate>Add Lens Group</span> <span class=md-display-1 ng-show=!vm.isCreate>Edit Lens Groups</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/lensgroups class=parent-link><span translate=\\\"Lens Groups\\\"></span></a> / <span ng-show=!vm.isCreate>{{vm.lensgroupName}}</span> <span ng-show=vm.isCreate>{{\\\"New\\\"}}</span></span></div></div></div></div><!-- ACCOUNT DETAILS --><md-card><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons></md-icon><span>GROUP DETAILS</span></h2><span flex=auto></span><div ng-include=\\\"\\'/app/admin/lensview/lensgroup-actionbutton.html\\'\\\"></div><div ng-include=\\\"\\'/app/admin/companies/forms/menu-action-buttons.html\\'\\\"></div><span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=row><div flex-gt-sm=70><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>Lens Group Name</label><input type=text ng-model=vm.lensgroupName name=name required><div ng-messages=vm.formDetails.name.$error><div ng-message=required><span>Lens Group Name required</span></div></div></md-input-container></div><!-- <div flex-gt-sm=\\\"30\\\">\\r\\n <md-input-container class=\\\"md-block error-hidden m-b\\\" ng-if=\\\"!vm.isCreate\\\">\\r\\n <md-checkbox ng-model=\\\"vm.company.is_active\\\" class=\\\"md-primary\\\">\\r\\n <span translate=\\\"COMPANY.ACTIVE\\\"></span>\\r\\n\\r\\n </md-checkbox>\\r\\n </md-input-container>\\r\\n\t\t\t\t\t\t\t</div> --></div><div layout-gt-sm=row><div flex-gt-sm=100><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>Description</label><input type=text ng-model=vm.lensgroupDescription name=description><!-- <input type=\\\"text\\\"\\r\\n ng-model=\\\"vm.lensgroupDescription\\\"\\r\\n name=\\\"description\\\"\\r\\n required=\\\"required\\\" /> --><!-- <div ng-messages=\\\"vm.formDetails.description.$error\\\">\\r\\n <div ng-message=\\\"required\\\"><span >Lens Group Description required</span></div>\\r\\n </div> --></md-input-container></div></div></md-card-content><!--<md-card-actions layout=\\\"row\\\" layout-align=\\\"end center\\\">\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <div ng-include=\\\"\\'app/admin/companies/forms/action-buttons.html\\'\\\"></div>\\r\\n <span flex=\\\"0\\\"></span>\\r\\n </md-card-actions>--></form></md-card><section ng-if=vm.logsVisible()><log-company-record data=vm.company></log-company-record></section><section ng-if=!vm.isCreate class=md-card-light ng-controller=\\\"lensviewCompaniesController as vm\\\"><div ng-include=\\\"\\'/app/admin/lensview/companies/lensview-companies.html\\'\\\"></div></section><section ng-if=!vm.isCreate class=md-card-light ng-controller=\\\"lensviewUsersController as vm\\\"><crane-table title=Users icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewtitle2 is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons searchflag=vm.searchflag menu=\\\"\\'/app/admin/lensview/menuform/menu.html\\'\\\" ctrl=lensviewUsersController></crane-table></section><!-- <section ng-controller=\\\"lensviewController as lv\\\">\\r\\n <crane-table title=\\\"Lens Groups\\\"\\r\\n icon=\\\"lv.icon\\\"\\r\\n lensviewtable=\\\"lv.lensviewtable\\\"\\r\\n lensviewtitle=\\\"vm.lensviewtitle\\\"\\r\\n is-loading=\\\"lv.isLoading.table\\\"\\r\\n is-no-results=\\\"lv.noResults\\\"\\r\\n buttons=\\\"lv.buttons\\\"\\r\\n menu=\\\"\\'/app/admin/lensview/forms/action-buttons.html\\'\\\"\\r\\n ctrl=\\\"lensviewController\\\"></crane-table>\\r\\n </section> --></div></cva-shell><div ng-include=\\\"\\'/app/admin/lensview/viewlist.html\\'\\\" ng-if=\\\"(vm.readOnly == true) || (vm.readOnlyView == true)\\\"></div>\");\n$templateCache.put(\"/app/admin/lensview/lensgroup-actionbutton.html\",\"<span ng-if=!vm.saveBtnShow><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.updateAccount(false) ng-disabled=\\\"vm.isLoad.account || vm.formDetails.$pristine || vm.formDetails.$invalid\\\" type=submit class=\\\"btn btn-default\\\"><span ng-hide=vm.isLoad.contact translate=USER.SAVE></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.contact class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></span><span ng-if=vm.saveBtnShow><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.updateAccount(false) ng-disabled=!vm.saveBtnShow type=submit class=\\\"btn btn-default\\\"><span ng-hide=vm.isLoad.contact translate=USER.SAVE></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.contact class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></span><!-- <md-button class=\\\"md-raised md-accent btn-block-xs\\\" \\r\\n ng-click=\\\"vm.updateAccount(true)\\\" \\r\\n ng-disabled=\\\"vm.isLoad.account\\\"\\r\\n type=\\\"submit\\\" \\r\\n class=\\\"btn btn-default\\\"\\r\\n ng-show=\\\"vm.isCreate\\\">\\r\\n <span ng-hide=\\\"vm.isLoad.account\\\" translate=\\\"USER.SAVE_AND_NEW\\\"></span>\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" ng-hide=\\\"!vm.isLoad.account\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>\\r\\n</md-button> --> <!-- <md-button class=\\\"md-raised md-accent btn-block-xs\\\" \\r\\n ng-click=\\\"vm.showModal(ev, \\'resend-confirmation-check\\')\\\" \\r\\n ng-disabled=\\\"vm.isLoad.account\\\"\\r\\n type=\\\"submit\\\" \\r\\n class=\\\"btn btn-default\\\"\\r\\n ng-show=\\\"!vm.isCreate && !vm.user.confirmed\\\">\\r\\n <span ng-hide=\\\"vm.isLoad.account\\\" translate=\\\"Resend Confirmation\\\"> </span>\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" ng-hide=\\\"!vm.isLoad.account\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>\\r\\n</md-button> -->\");\n$templateCache.put(\"/app/admin/lensview/viewlensgroup.html\",\"<cva-shell><div class=\\\"shell-padding book-shipment content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 translate=\\\"MANAGE LENS GROUPS\\\"></span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/lensgroups class=parent-link><span translate=\\\"Lens Groups\\\"></span></a></span></div></div></div><!-- <md-card class=\\\"p-a-sm\\\" collapsible template-url=\\\"/app/admin/users/forms/search.html\\\"></md-card> --><!-- /app/admin/lensview/forms/menu-actions.html --><crane-table title=\\\"Lens Groups\\\" icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons searchflag=vm.searchFlag menu=\\\"\\'/app/admin/lensview/forms/lensgroup-actions.html\\'\\\" ctrl=lensviewController></crane-table></div></cva-shell>\");\n$templateCache.put(\"/app/admin/lensview/viewlist.html\",\"<cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><!-- <span class=\\\"md-display-1\\\" ng-show=\\\"vm.isCreate\\\" translate=\\\"COMPANY.CREATE_COMPANY\\\"></span> --> <span class=md-display-1>EDIT LENS GROUP</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/lensgroups class=parent-link><span translate=ADMIN.LENS.LENS_GROUP></span></a> / <span>{{vm.lensgroupName}}</span></span></div></div></div></div><!-- ACCOUNT DETAILS --><md-card><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons></md-icon><span>GROUP DETAILS</span></h2><span flex=auto></span><div ng-include=\\\"\\'/app/admin/lensview/lensgroup-actionbutton.html\\'\\\"></div><!-- <div ng-include=\\\"\\'/app/admin/companies/forms/menu-action-buttons.html\\'\\\"></div> --> <span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=row><div flex-gt-sm=70><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>Lens Group Name</label><input type=text ng-model=vm.lensgroupName name=name required readonly><div ng-messages=vm.formDetails.name.$error><div ng-message=required><span>Lens Group Name required</span></div></div></md-input-container></div><!-- <div flex-gt-sm=\\\"30\\\">\\r\\n <md-input-container class=\\\"md-block error-hidden m-b\\\" ng-if=\\\"!vm.isCreate\\\">\\r\\n <md-checkbox ng-model=\\\"vm.company.is_active\\\" class=\\\"md-primary\\\">\\r\\n <span translate=\\\"COMPANY.ACTIVE\\\"></span>\\r\\n\\r\\n </md-checkbox>\\r\\n </md-input-container>\\r\\n\t\t\t\t\t\t\t</div> --></div><div layout-gt-sm=row><div flex-gt-sm=100><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>Description</label><input type=text ng-model=vm.lensgroupDescription name=description readonly><!-- <div ng-messages=\\\"vm.formDetails.description.$error\\\">\\r\\n <div ng-message=\\\"required\\\"><span >Lens Group Description required</span></div>\\r\\n </div> --></md-input-container></div></div></md-card-content><!--<md-card-actions layout=\\\"row\\\" layout-align=\\\"end center\\\">\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <div ng-include=\\\"\\'app/admin/companies/forms/action-buttons.html\\'\\\"></div>\\r\\n <span flex=\\\"0\\\"></span>\\r\\n </md-card-actions>--></form></md-card><section ng-if=vm.logsVisible()><log-company-record data=vm.company></log-company-record></section><section class=md-card-light ng-controller=\\\"lensviewCompaniesController as vm\\\"><crane-table title=COMPANY icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=vm.searchflag ctrl=lensviewCompaniesController></crane-table></section><section class=md-card-light ng-controller=\\\"lensviewUsersController as vm\\\"><crane-table title=Users icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewtitle2 is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons searchflag=vm.searchflag menu=\\\"\\'/app/admin/lensview/menuform/menu.html\\'\\\" ctrl=lensviewUsersController></crane-table></section><!-- <section ng-controller=\\\"lensviewController as lv\\\">\\r\\n <crane-table title=\\\"Lens Groups\\\"\\r\\n icon=\\\"lv.icon\\\"\\r\\n lensviewtable=\\\"lv.lensviewtable\\\"\\r\\n lensviewtitle=\\\"vm.lensviewtitle\\\"\\r\\n is-loading=\\\"lv.isLoading.table\\\"\\r\\n is-no-results=\\\"lv.noResults\\\"\\r\\n buttons=\\\"lv.buttons\\\"\\r\\n menu=\\\"\\'/app/admin/lensview/forms/action-buttons.html\\'\\\"\\r\\n ctrl=\\\"lensviewController\\\"></crane-table>\\r\\n </section> --></div></cva-shell>\");\n$templateCache.put(\"/app/admin/potential-exceptions/potential-exceptions.html\",\"<cva-shell><div loadmask=!vm.isLoading loadmask-fixed-center=true></div><div class=\\\"shell-padding loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\"><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 translate=ADMIN.POTENTIAL.MANAGE_POTENTIAL_EXCEPTIONS></span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/potential-exceptions class=parent-link><span translate=ADMIN.POTENTIAL.POTENTIAL_EXCEPTIONS></span></a></span></div><!-- <div class=\\\"m-t\\\"> --><!-- <a href=\\\"/potential-exceptions/new\\\" ng-if=\\\"vm.canCreate\\\">\\r\\n <md-button class=\\\"md-raised search-type md-accent\\\">{{\\'ADMIN.POTENTIAL.CREATE_BUTTON\\' | translate}}</md-button>\\r\\n </a> --><!-- </div> --></div></div><div layout-gt-sm=row layout-align-gt-sm=\\\"end center\\\" class=p-a-sm ng-if=vm.canApprove><span class=\\\"btn-link btn-block-sm {{vm.awaitFilter.value == \\'all\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'all\\', \\'await\\')\\\">All <span class=text-sub>({{vm.counts.await.submitted}})</span></span> <span class=\\\"btn-link btn-block-sm {{vm.awaitFilter.value == \\'mine\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'mine\\', \\'await\\')\\\">Mine <span class=text-sub>({{vm.counts.await.mine}})</span></span><!-- <span class=\\\"btn-link btn-block-sm \\\" ng-click=\\\"vm.showCustomizeResults($event)\\\">Customize Results </span> --></div><crane-table title=ADMIN.POTENTIAL.AWAITING_APPROVALS content=await icon=\\\"\\'inbox\\'\\\" buttons=vm.awaitButtons is-loading=vm.isAwaitLoading is-no-results=vm.noResultsAwait ctrl=PotentialExceptionsController ng-if=vm.canApprove></crane-table><div layout-gt-sm=row layout-align-gt-sm=\\\"end center\\\" class=p-a-sm><span class=\\\"btn-link btn-block-sm {{vm.exceptionFilter.value == \\'all\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'all\\', \\'all\\')\\\">All <span class=text-sub>({{vm.counts.all.all}})</span></span> <span class=\\\"btn-link btn-block-sm {{vm.exceptionFilter.value == \\'draft\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'draft\\', \\'all\\')\\\">Drafts <span class=text-sub>({{vm.counts.all.draft}})</span></span> <span class=\\\"btn-link btn-block-sm {{vm.exceptionFilter.value == \\'submitted\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'submitted\\', \\'all\\')\\\">Submitted For Approval <span class=text-sub>({{vm.counts.all.submitted}})</span></span> <span class=\\\"btn-link btn-block-sm {{vm.exceptionFilter.value == \\'published\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'published\\', \\'all\\')\\\">Published <span class=text-sub>({{vm.counts.all.published}})</span></span> <span class=\\\"btn-link btn-block-sm {{vm.exceptionFilter.value ==\\'expired\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'expired\\', \\'all\\')\\\">Expired <span class=text-sub>({{vm.counts.all.expired}})</span></span></div><crane-table title=ADMIN.POTENTIAL.POTENTIAL_EXCEPTIONS content=all icon=\\\"\\'warning\\'\\\" buttons=vm.allButtons is-loading=vm.isAllLoading is-no-results=vm.noResultsAll ctrl=PotentialExceptionsController></crane-table></div></cva-shell>\");\n$templateCache.put(\"/app/admin/ship_link/shiplink.html\",\"<style>md-chips-wrap[class]{\\r\\n border: 1px solid grey;background: #fff;margin-top: 18px;border-radius: 3px;padding:0px;\\r\\n }\\r\\n\\r\\n input[class]{\\r\\n text-indent: 15px;\\r\\n font-size: 15px;\\r\\n font-family: inherit !important;\\r\\n }\\r\\n\\r\\n md-chips .md-chip {\\r\\n background: #fff;\\r\\n color: rgb(66,66,66);\\r\\n }\\r\\n\\r\\n md-icon {\\r\\n color: black;\\r\\n }\\r\\n\\r\\n .md-select span {\\r\\n color: black;\\r\\n }\\r\\n\\r\\n .md-chip, .md-chip-input-container{\\r\\n margin:4px 4px 4px 0px !important;\\r\\n }\\r\\n\\r\\n .md-chip-input-container{\\r\\n display:inline !important;\\r\\n width:auto !important;\\r\\n }\\r\\n .default-text{\\r\\n color: #45AFE3;font-size: 15px;font-weight: bold;cursor: pointer;\\r\\n }\\r\\n\\r\\n .default_btn {\\r\\n border: none;\\r\\n color: #ece6e6;\\r\\n font-size: 15px;\\r\\n padding: 13px 50px 13px 15px;\\r\\n background-color: #2f7d8e;\\r\\n border-radius: 5px; }\\r\\n\\r\\nmd-radio-button.md-default-theme.md-checked .md-off, md-radio-button.md-checked .md-off {\\r\\n border-color: #fff;\\r\\n}\\r\\n\\r\\nmd-radio-button.md-default-theme .md-on, md-radio-button .md-on {\\r\\n background-color: #fff;\\r\\n}\\r\\n\\r\\n.md-select-value .md-select-icon {\\r\\n display: none;\\r\\n }</style><cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\"><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1>SHIPLINK</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=# class=parent-link><span>Shiplink</span></a></span></div></div></div></div><div layout-gt-sm=row style=\\\"margin:auto 10px\\\"><div layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><h4>Customer Type *    <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.customer_type_cehck>Customer Type is mandatory</span></h4><md-radio-group ng-model=vm.customer_type><md-radio-button style=\\\"display: inline-block\\\" ng-if=vm.currentUser.permissions.cww ng-click=\\\"vm.selectedCusTypeChange(\\'cww\\')\\\" value=cww selected>CWW       </md-radio-button><md-radio-button style=\\\"display: inline-block\\\" ng-if=vm.currentUser.permissions.csl ng-click=\\\"vm.selectedCusTypeChange(\\'csl\\')\\\" value=csl>CSL       </md-radio-button><md-radio-button style=\\\"display: inline-block\\\" ng-if=vm.currentUser.permissions.cfs ng-click=\\\"vm.selectedCusTypeChange(\\'cfs\\')\\\" value=cfs>CFS       </md-radio-button><md-radio-button style=\\\"display: inline-block\\\" ng-if=vm.currentUser.permissions.cmts ng-click=\\\"vm.selectedCusTypeChange(\\'cmts\\')\\\" value=cmts>CMTS</md-radio-button></md-radio-group></md-input-container></div></div><div layout-gt-sm=row style=\\\"margin:auto 10px\\\"><div flex-gt-sm=33 flex-sm=1 flex-xs=1><label>Company *</label><md-autocomplete md-delay=300 ng-modal=vm.currentUser.company_name md-search-text=vm.searchText md-on-remove=vm.resetSelectionCompany() md-selected-item-change=vm.selectedCompanyChange(item) md-items=\\\"item in vm.getMatchesCompanies(\\'company_name\\', vm.searchText)\\\" md-item-text=item.display placeholder=\\\"\\\" ng-disabled=!vm.customer_type><md-item-template><span md-highlight-text=vm.searchText>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div>  <!-- AWB / BOL --><div ng-if=\\\"vm.customer_type.toLowerCase() == \\'cww\\'\\\" flex-gt-sm=33 flex-sm=1 flex-xs=1 style=margin-top:0px><label><span>AWB / BOL</span></label><md-autocomplete md-delay=300 md-search-text=vm.searchTextDepart md-no-cache=true md-items=\\\"item in vm.getShipmentLink(\\'awb_with_gspid\\', vm.searchTextDepart)\\\" md-search-text-change=vm.resetSelection(item) md-selected-item-change=vm.selectedLinkChanges(item) md-item-text=item class=demo-dept-progress placeholder=\\\"\\\" ng-disabled=!vm.company_name><md-item-template><span md-highlight-text=vm.searchTextDepart>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><!-- PRO --><div ng-if=\\\"vm.customer_type.toLowerCase() == \\'csl\\'\\\" flex-gt-sm=33 flex-sm=1 flex-xs=1 style=margin-top:0px><label><span>BOL</span></label><md-autocomplete md-delay=300 md-search-text=vm.searchTextDepart md-no-cache=true md-items=\\\"item in vm.getShipmentLink(\\'awb_with_gspid\\', vm.searchTextDepart)\\\" md-search-text-change=vm.resetSelection(item) md-selected-item-change=vm.selectedLinkChanges(item) md-item-text=item class=demo-dept-progress placeholder=\\\"\\\" ng-disabled=!vm.company_name><md-item-template><span md-highlight-text=vm.searchTextDepart>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div>  <div ng-if=vm.selected_awb_autocomplete.length flex-gt-sm=33 flex-sm=1 flex-xs=1 style=margin-top:-3px><label ng-if=\\\"vm.customer_type == \\'cww\\'\\\">GSHPID</label><label ng-if=\\\"vm.customer_type == \\'csl\\'\\\">PRONUMBER</label><md-select class=md-select style=\\\"border: 1px solid gray;border-radius: 3px;height: 39px;text-indent: 10px;background: #fff\\\" ng-model=vm.selectedGspid aria-label=vm.selectedGspid ng-change=vm.selectedUrlLinkChanges(vm.selectedGspid) md-on-open=vm.onSelectOpen() ng-readonly=true ng-disabled=true md-on-close=vm.onSelectClose()><md-option ng-selected=\\\"$index == 0\\\" ng-value=role ng-repeat=\\\"role in vm.selected_awb_autocomplete\\\">{{role}}</md-option></md-select></div></div><!-- SET DEFAULT --><div layout-gt-sm=row style=\\\"margin:auto 10px\\\"><div flex-gt-sm=66 flex-sm=1 flex-xs=1 style=margin-top:0px><span ng-if=vm.setDefaultText ng-click=vm.setDefaultCompany(true) class=default-text>SET AS DEFAULT</span>     <span ng-if=vm.clearText class=default-text ng-click=vm.clearDefaultCompany()>CLEAR</span>     <span ng-if=vm.defaultbtn><button style=\\\"position: relative\\\" class=default_btn>Default = {{vm.default_company_name}} <i ng-click=vm.clearDefaultCompany() style=\\\"position: absolute;top: 10px;right: 10px;cursor: pointer\\\" class=material-icons>clear</i></button></span></div></div><br><br><div layout-gt-sm=row style=\\\"margin:auto 10px\\\"><span style=\\\"width: 100%\\\" ng-click=vm.openShipLink(vm.shipLink)><input placeholder=\\\"Shipment Link\\\" readonly style=\\\"width: 100%;height: 50px;cursor: pointer;text-indent: 15px;text-decoration: underline;color: #50afe3\\\" required ng-model=vm.shipLink></span>  <!-- <button style=\\\"padding: 10px;\\\" ngclipboard data-clipboard-text=\\\"{{vm.demoEmail}}\\\" class=\\\"md-raised md-accent md-button md-ink-ripple\\\">\\r\\n <span>Copy to clipboard</span></button> --><md-button style=\\\"color: #294F7B;margin:0;display: block;min-width: 20%\\\" class=\\\"md-raised md-primary\\\" ngclipboard data-clipboard-text=\\\"{{vm.shiplinktext+ \\'\\\\n\\\\n\\' +vm.shipLink}}\\\"><span style=\\\"color: #fff\\\">COPY LINK WITH TEXT</span></md-button>  <md-button style=\\\"color: #294F7B;margin:0;display: block;min-width: 20%\\\" class=\\\"md-raised md-primary\\\" ngclipboard data-clipboard-text={{vm.shipLink}}><span style=\\\"color: #fff\\\">COPY LINK</span></md-button></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/ship_link/shiplinktext.html\",\"<style>md-chips-wrap[class]{\\r\\n border: 1px solid grey;background: #fff;margin-top: 18px;border-radius: 3px;padding:0px;\\r\\n }\\r\\n\\r\\n input[class]{\\r\\n text-indent: 15px;\\r\\n font-size: 15px;\\r\\n font-family: inherit !important;\\r\\n }\\r\\n\\r\\n md-chips .md-chip {\\r\\n background: #fff;\\r\\n color: rgb(66,66,66);\\r\\n }\\r\\n\\r\\n md-icon {\\r\\n color: black;\\r\\n }\\r\\n\\r\\n .md-select span {\\r\\n color: black;\\r\\n }\\r\\n\\r\\n .md-chip, .md-chip-input-container{\\r\\n margin:4px 4px 4px 0px !important;\\r\\n }\\r\\n\\r\\n .md-chip-input-container{\\r\\n display:inline !important;\\r\\n width:auto !important;\\r\\n }\\r\\n .default-text{\\r\\n color: #45AFE3;font-size: 15px;font-weight: bold;cursor: pointer;\\r\\n }\\r\\n\\r\\n .default_btn {\\r\\n border: none;\\r\\n color: #ece6e6;\\r\\n font-size: 15px;\\r\\n padding: 13px 50px 13px 15px;\\r\\n background-color: #2f7d8e;\\r\\n border-radius: 5px; }</style><cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\"><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1>SHIPLINK TEXT</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=# class=parent-link><span>Shiplink Text</span></a></span></div></div></div></div><md-card><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex><md-icon class=material-icons></md-icon><span>Shiplink Text</span></h2><span flex=auto></span><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.submitShiplinkText(vm.shiplinktext) ng-disabled=\\\"vm.formDetails.$pristine || vm.formDetails.$invalid\\\" type=submit class=\\\"btn btn-default\\\"><span ng-if=!vm.shiplnkTextDataVal>SUBMIT</span> <span ng-if=vm.shiplnkTextDataVal>UPDATE</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=row><div flex-gt-sm=50><p style=\\\"color: #30363b;font-size: 15px;font-weight: 600\\\">Shiplink Text  <span style=\\\"color: red\\\">*</span></p><md-input><textarea style=\\\"text-indent: 0.5em;width: 100%\\\" ng-model=vm.shiplinktext name=shiplinktext required rows=5 cols=55></textarea><div ng-messages=vm.formDetails.shiplinktext.$error><div ng-show=reject_reason_check ng-message=required style=\\\"color:red;font-style: italic\\\">Please provide shiplink text.</div></div></md-input></div></div></md-card-content><!--<md-card-actions layout=\\\"row\\\" layout-align=\\\"end center\\\">\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <div ng-include=\\\"\\'app/admin/companies/forms/action-buttons.html\\'\\\"></div>\\r\\n <span flex=\\\"0\\\"></span>\\r\\n </md-card-actions>--></form></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/admin/support-requests/company-support-preview.html\",\"<style>.title-text-font{\\r\\n font-size: 30px !important;\\r\\n color:#2f353b;\\r\\n font-weight:600;\\r\\n }\\r\\n .complete-btn{\\r\\n background-color: #4ac66c !important;\\r\\n border-radius: 5px !important;\\r\\n padding: 5px !important;\\r\\n min-width: 15% !important;\\r\\n min-height:46px;\\r\\n margin-left:10px !important;\\r\\n margin-bottom:5px !important;\\r\\n }\\r\\n .edit-btn{\\r\\n color: #50afe3 !important;\\r\\n background-color: #50afe3 !important;\\r\\n padding: 5px !important;\\r\\n border-radius: 5px !important;\\r\\n min-width: 15% !important;\\r\\n min-height:46px;\\r\\n margin-left:10px !important;\\r\\n margin-bottom:5px !important;\\r\\n }\\r\\n .delete-btn{\\r\\n background-color: #d0021b !important;\\r\\n padding: 5px !important;\\r\\n border-radius: 5px !important;\\r\\n min-width: 15% !important;\\r\\n min-height:46px;\\r\\n margin-left:10px !important;\\r\\n margin-bottom:5px !important;\\r\\n }\\r\\n .btn-text{\\r\\n color: #fff;\\r\\n text-transform: none;\\r\\n padding:0px 5px 0px 5px;\\r\\n }\\r\\n .open-text{\\r\\n font-size: 35px;color: #a8a8a8;font-style: italic;text-transform: capitalize;\\r\\n }\\r\\n\\r\\n .error-div{\\r\\n position: relative;;\\r\\n background-color: #d0021b;margin: 40px 15px 20px;\\r\\n min-height: 50px;border-radius: 5px;\\r\\n min-height: 65px;\\r\\n }\\r\\n .error-party{\\r\\n /*#2e7a59*/\\r\\n color: #d0021b;\\r\\n font-size: 16px;\\r\\n font-weight: 700;\\r\\n }\\r\\n\\r\\n .heading-text{\\r\\n color: #a8a8a8;font-size: 15px;margin: 0 0 5px;\\r\\n }\\r\\n .sub-heading-text{\\r\\n color: #505457;font-size: 15px;margin:0;text-transform: capitalize;\\r\\n }\\r\\n .desc{\\r\\n font-style: italic;\\r\\n color:#a8a8a8;\\r\\n font-size: .85em;\\r\\n }\\r\\n .user_add_div .table-scroll table thead.header-table th .label {\\r\\n color: #a8a8a8;font-size: 15px;margin: 0 0 5px;\\r\\n padding: 25px 0px 35px 0px;\\r\\n max-width: 100%;\\r\\n white-space: nowrap;\\r\\n overflow: hidden;\\r\\n text-overflow: ellipsis;\\r\\n border-bottom: 1px solid #d2d2d2;\\r\\n }\\r\\n\\r\\n .user-chips{\\r\\n background-color:#30c267;\\r\\n }</style><cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\"><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-light></div><div ng-if=!vm.failedToRetrieveData class=shell-padding id=toast-parent><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-sm=column layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\"><div layout=column style=margin-bottom:20px><h2><span ng-if=\\\"vm.supportrequestAdminCheck == \\'false\\'\\\" class=md-display-1>Company Request #{{vm.requestId}}</span> <span ng-if=\\\"vm.supportrequestAdminCheck == \\'true\\'\\\" class=md-display-1>Review Company Request #{{vm.requestId}}</span> <input type=hidden id=requestId value={{vm.requestId}}></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/supportRequests class=parent-link><span>Support Requests</span></a> / <span ng-if=\\\"vm.supportrequestAdminCheck == \\'false\\'\\\">Company Request #{{vm.requestId}}</span> <span ng-if=\\\"vm.supportrequestAdminCheck == \\'true\\'\\\">Review Company Request #{{vm.requestId}}</span></span></div></div><div flex=100 flex-gt-sm=50><div layout=column><div layout=column layout-gt-xs=row layout-align-gt-xs=\\\"end center\\\" ng-if=\\\"vm.supportrequestAdminCheck == \\'true\\'\\\"><md-button ng-disabled=\\\"\\\" ng-show=\\\"!vm.data_validated && vm.status == \\'awaiting_demo\\'\\\" ng-click=\\\"dataValidateCompanysupportStatus(\\'data_validated\\',vm.requestId)\\\" class=\\\"md-raised md-primary complete-btn\\\"><span class=btn-text ng-if=vm.data_validated>Data Validated</span> <span class=btn-text ng-if=!vm.data_validated>Validate Data</span></md-button><md-button ng-if=\\\"vm.usersExist && vm.data_validated\\\" ng-show=\\\"vm.status == \\'awaiting_demo\\' && vm.data_validated && !vm.users_created\\\" ng-click=\\\"dataValidateCompanysupportStatus(\\'users_created\\',vm.requestId)\\\" class=\\\"md-raised md-primary edit-btn\\\"><span class=btn-text ng-if=vm.users_created>User/s Created</span> <span class=btn-text ng-if=!vm.users_created>Create User/s</span></md-button><md-button ng-if=\\\"vm.status == \\'awaiting_demo\\' && vm.data_validated\\\" ng-disabled=\\\"((vm.showErrorDiv && vm.status == \\'in_review\\') || (!vm.users_created && vm.usersExist))\\\" ng-hide=\\\"vm.btnMarkCheck || vm.isLoading.account\\\" ng-click=changeCompanysupportStatus(vm.status,vm.requestId) class=\\\"md-raised md-primary complete-btn\\\"><span class=btn-text>{{vm.btnMark | capitalize}}</span></md-button><md-button ng-if=\\\"vm.status != \\'awaiting_demo\\'\\\" ng-disabled=\\\"vm.showErrorDiv && vm.status == \\'in_review\\'\\\" ng-hide=\\\"vm.btnMarkCheck || vm.isLoading.account\\\" ng-click=changeCompanysupportStatus(vm.status,vm.requestId) class=\\\"md-raised md-primary complete-btn\\\"><span class=btn-text>{{vm.btnMark | capitalize}}</span></md-button><!--<md-button\\r\\n ng-disabled=\\\"vm.data_validated\\\"\\r\\n ng-if=\\\"vm.status == \\'awaiting_demo\\'\\\"\\r\\n ng-hide=\\\"vm.isLoading.account\\\"\\r\\n ng-click=\\\"dataValidateCompanysupportStatus(\\'data_validated\\',vm.requestId)\\\"\\r\\n class=\\\"md-raised md-primary edit-btn\\\">\\r\\n <span class=\\\"btn-text\\\">Validate data</span>\\r\\n </md-button>--><md-button ng-click=editCompanyRequest(vm.requestId) ng-hide=\\\"vm.editCheckCompanyAdminuser || vm.isLoading.account\\\" class=\\\"md-raised md-primary edit-btn\\\"><span class=btn-text>Edit</span></md-button><md-button ng-hide=\\\"vm.rejectCheck || vm.isLoading.account\\\" ng-click=\\\"changeCompanysupportStatus(\\'reject\\',vm.requestId)\\\" class=\\\"md-raised md-primary delete-btn\\\"><span class=btn-text>Reject</span></md-button></div><div layout=column layout-gt-xs=row layout-align-gt-xs=\\\"end center\\\" ng-if=\\\"vm.supportrequestUserCheck == \\'true\\'\\\"><md-button ng-hide=\\\"vm.openCheck || vm.isLoading.account\\\" ng-click=editGeneralRequest(vm.requestId) class=\\\"md-raised md-primary edit-btn\\\"><span class=btn-text>Edit</span></md-button></div><div layout=column layout-gt-xs=row layout-align-gt-xs=\\\"end center\\\" ng-if=\\\"vm.validation_user == \\'true\\' && vm.supportrequestAdminCheck == \\'false\\' \\\"><md-button ng-disabled=vm.data_validated ng-hide=vm.isLoading.account ng-click=\\\"dataValidateCompanysupportStatus(\\'data_validated\\',vm.requestId)\\\" class=\\\"md-raised md-primary edit-btn\\\"><span class=btn-text ng-if=vm.data_validated>Data Validated</span> <span class=btn-text ng-if=!vm.data_validated>Validate Data</span></md-button></div><div layout=column layout-gt-xs=row layout-align-gt-xs=\\\"end center\\\" ng-if=\\\"vm.cview_classic_admin == \\'true\\' && vm.supportrequestAdminCheck == \\'false\\' \\\"><md-button ng-disabled=vm.users_created ng-hide=vm.isLoading.account ng-click=\\\"dataValidateCompanysupportStatus(\\'users_created\\',vm.requestId)\\\" class=\\\"md-raised md-primary edit-btn\\\"><span class=btn-text ng-if=vm.users_created>User/s Created</span> <span class=btn-text ng-if=!vm.users_created>Create User/s</span></md-button></div></div><div layout=column flex=100 ng-if=\\\"(vm.status == \\'awaiting_demo\\') && (vm.supportrequestAdminCheck == \\'true\\')\\\"><span ng-if=!vm.data_validated style=text-align:right>Pending Data Validation for request #{{vm.requestId}}</span> <span ng-if=vm.data_validated style=text-align:right>Data Validated</span> <span ng-if=!vm.users_created style=text-align:right>Users creation Pending</span> <span ng-if=\\\"(vm.users_created) && (vm.supportCompany.access_type.includes(\\'portal\\')) && (!vm.supportCompany.access_type.includes(\\'classic\\'))\\\" style=text-align:right>Users created on portal</span> <span ng-if=\\\"(vm.users_created) && (vm.supportCompany.access_type.includes(\\'classic\\')) && (!vm.supportCompany.access_type.includes(\\'portal\\'))\\\" style=text-align:right>Users created on Pathway</span> <span ng-if=\\\"(vm.users_created) && (vm.supportCompany.access_type.includes(\\'portal\\')) && (vm.supportCompany.access_type.includes(\\'classic\\'))\\\" style=text-align:right>Users created on portal as well as Pathway</span></div></div></div></div><!-- Errors Div --><div layout=row ng-if=\\\"vm.showErrorDiv && vm.status == \\'in_review\\'\\\" ng-attr-style=\\\"display:{{vm.errorDivCheck==false ? \\'\\' : \\'none\\'}}\\\" layout-wrap class=error-div><div flex=80 style=\\\"padding: 22px\\\"><span style=\\\"font-size: 16px\\\">{{vm.errorCount}} Errors Found. Please correct in order to proceed</span></div><div flex=20 style=\\\"padding: 10px;right: 0px;position: absolute\\\"><md-button class=md-icon-button ng-click=vm.closeErrorDiv()><md-icon style=\\\"font-size: 30px;color: #fff\\\" aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><!-- End Errors Div --><md-card><!-- \\'/app/admin/lensview/lensgroup-actionbutton.html\\' --><md-card-content class=\\\"background-color-ebebeb remove-padding-xs\\\"><md-card-content class=background-color-ebebeb><div layout-gt-sm=row layout-align=\\\"space-around start\\\" layout-align-gt-sm=\\\"space-between center\\\"><div ng-if=\\\"vm.status == \\'open\\'\\\"><h3 class=\\\"title-text-font margin-top-0\\\"><label>New Company Request</label></h3></div><div ng-if=\\\"vm.status == \\'approved\\'\\\"><h3 class=\\\"title-text-font margin-top-0\\\"><label>New Company Request</label></h3></div><div ng-if=\\\"vm.status == \\'awaiting_demo\\'\\\"><h3 class=\\\"title-text-font margin-top-0\\\"><label>New Company Request</label></h3></div><div ng-if=\\\"vm.status != \\'open\\' && vm.status != \\'approved\\' && vm.status != \\'awaiting_demo\\'\\\"><h3 class=\\\"title-text-font margin-top-0\\\"><label>New Company Request</label></h3></div><div ng-if=\\\"vm.status == \\'open\\'\\\"><span class=\\\"open-text margin-top-0\\\">{{vm.statusText}}</span></div><div ng-if=\\\"vm.status == \\'awaiting_demo\\'\\\"><span class=\\\"open-text margin-top-0\\\">{{vm.statusText}}</span></div><div ng-if=\\\"vm.status == \\'approved\\'\\\"><span class=\\\"open-text margin-top-0\\\" style=\\\"color: #f2a624\\\">{{vm.statusText}}</span></div><div ng-if=\\\"vm.status != \\'open\\' && vm.status != \\'approved\\' && vm.status != \\'awaiting_demo\\'\\\"><span class=\\\"open-text margin-top-0\\\" ng-attr-style=\\\"color:{{vm.statusText==\\'In Review\\'?\\'#e2a45d\\':\\'\\'}}\\\">{{vm.statusText}}</span></div></div><md-card style=box-shadow:none;margin:0px><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">REVIEW</span></h2><span flex=auto></span></div></md-toolbar><md-card-content style=\\\"border:2px solid #dddddd; border-top:0px\\\"><div class=company_section><div class=company_name layout=row layout-align=\\\"space-between center\\\"><div class=text>Company Info</div></div><div layout=row ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div flex=20><p class=heading-text>Company Name</p><p class=sub-heading-text>{{vm.supportCompany.name}}</p></div><div flex=30 ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><p class=heading-text>Access Type</p><p class=sub-heading-text ng-repeat=\\\"access_types in vm.supportCompany.access_type\\\">{{access_types}}</p></div><div flex=15 ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><p class=heading-text>Portal Type</p><p class=sub-heading-text>{{vm.supportCompany.portal_type}}</p></div><div flex=15 ng-if=vm.supportCompany.customer_configurations.cww ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><!-- <p class=\\\"heading-text\\\">Portal Theme</p>\\r\\n <p ng-if=\\\"!vm.supportCompany.customer_configurations.cww.is_reskin\\\" class=\\\"sub-heading-text\\\">C-View Portal</p>\\r\\n <p ng-if=\\\"vm.supportCompany.customer_configurations.cww.is_reskin\\\" class=\\\"sub-heading-text\\\">Magno Re-Skin</p> --><p class=heading-text>Customer Type</p><p class=sub-heading-text>{{((vm.supportCompany.customer_types).join()).toUpperCase();}}</p></div></div><br><br><div layout=row ng-if=vm.supportCompany.customer_configurations.cww style=\\\"padding-left: 50px\\\"><div flex=85 class=company_name><p class=text style=\\\"font-size: 12px\\\">CWW - DEFAULT PARTY & GROUP IDs</p><p></p><div ng-repeat=\\\"chipone in (vm.supportCompany.customer_configurations.cww.party_id_names)\\\" class=chips-exist><span>{{chipone}}</span></div><div ng-repeat=\\\"chipone in (vm.supportCompany.customer_configurations.cww.invalid_party_id_names)\\\" class=chips-notexist><span>{{chipone}}</span></div><br><div ng-repeat=\\\"chiptwo in vm.supportCompany.customer_configurations.cww.related_party_id_names\\\" class=chips-exist><span>{{chiptwo}}</span></div><div ng-repeat=\\\"chiptwo in vm.supportCompany.customer_configurations.cww.invalid_related_party_id_names\\\" class=chips-notexist><span>{{chiptwo}}</span></div><p></p></div><div flex=20 class=company_name><p class=heading-text>Magno Reskin</p><p><i ng-if=vm.supportCompany.customer_configurations.cww.is_reskin class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!vm.supportCompany.customer_configurations.cww.is_reskin class=material-icons style=\\\"color: red\\\">clear</i></p></div></div><div layout=row ng-if=vm.supportCompany.customer_configurations.csl style=\\\"padding-left: 50px\\\"><div flex=45 class=company_name><p class=text style=\\\"font-size: 12px\\\">CSL - CUSTOMER IDs</p><p></p><div ng-repeat=\\\"custcsl in (vm.supportCompany.customer_configurations.csl.customer_ids)\\\" class=chips-exist><span>{{custcsl}}</span></div><div ng-repeat=\\\"custcsl in (vm.supportCompany.customer_configurations.csl.invalid_customer_ids)\\\" class=chips-notexist><span>{{custcsl}}</span></div><p></p></div><div flex=20 class=company_name><p class=heading-text>Show Shipment Class</p><p><i ng-if=vm.supportCompany.customer_configurations.csl.show_shipment_class class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!vm.supportCompany.customer_configurations.csl.show_shipment_class class=material-icons style=\\\"color: red\\\">clear</i></p></div><div flex=20 class=company_name><p class=heading-text>Do Not Send Exception Emails</p><p><i ng-if=vm.supportCompany.customer_configurations.csl.do_not_send_exception_mails class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!vm.supportCompany.customer_configurations.csl.do_not_send_exception_mails class=material-icons style=\\\"color: red\\\">clear</i></p></div><div flex=20 class=company_name><p class=heading-text>Exception Threshold</p><p><i ng-if=vm.supportCompany.is_threshold_default class=material-icons style=\\\"color: #48c267\\\">check</i>  <span ng-if=vm.supportCompany.is_threshold_default style=\\\"cursor: pointer;position: relative;bottom: 7px\\\">Default (00:00)</span> <i ng-if=!vm.supportCompany.is_threshold_default class=material-icons style=\\\"color: red\\\">check</i>  <span ng-if=!vm.supportCompany.is_threshold_default style=\\\"cursor: pointer;position: relative;bottom: 7px\\\">({{vm.supportCompany.customer_configurations.csl.exception_threshold_hours}}:{{vm.supportCompany.customer_configurations.csl.exception_threshold_minutes}})</span></p></div></div><div layout=row ng-if=vm.supportCompany.customer_configurations.cfs style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CFS - CUSTOMER IDs</p><p></p><div ng-repeat=\\\"custcsl in (vm.supportCompany.customer_configurations.cfs.customer_ids)\\\" class=chips-exist><span>{{custcsl}}</span></div><div ng-repeat=\\\"custcsl in (vm.supportCompany.customer_configurations.cfs.invalid_customer_ids)\\\" class=chips-notexist><span>{{custcsl}}</span></div><p></p></div></div><span style=\\\"display: block;border-bottom: 2px solid #979797\\\"></span><br></div><!-- Contacts --><div class=contact_section ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=company_name layout=row layout-align=\\\"space-between center\\\"><div class=text>Contacts</div></div><!-- CWW CONTACTS --><div class=cww_contact><div layout=row ng-if=vm.supportCompany.customer_configurations.cww style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CWW - CONTACTS</p></div></div><div layout=row ng-if=vm.supportCompany.customer_configurations.cww style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\" ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><p class=heading-text>Crane Sales Rep</p><p class=sub-heading-text>{{vm.supportCompany.sales_rep.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Operations Contacts</p><p ng-repeat=\\\"contact in vm.supportCompany.customer_configurations.cww.operation_contacts\\\" class=sub-heading-text>{{contact.contact_name}}<br></p></div></div><div layout=row ng-if=vm.supportCompany.customer_configurations.cww style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Default Primary Contact</p><p class=sub-heading-text>{{vm.supportCompany.customer_configurations.cww.primary_crane_contact.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\" ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><p class=heading-text>Default BCCs</p><p ng-repeat=\\\"bcc in vm.supportCompany.customer_configurations.cww.default_bccs\\\" class=sub-heading-text>{{bcc}}<br></p></div></div></div><!-- CSL CONTACTS --><div class=csl_contact><div layout=row ng-if=vm.supportCompany.customer_configurations.csl style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CSL - CONTACTS</p></div></div><div layout=row ng-if=vm.supportCompany.customer_configurations.csl style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\" ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><p class=heading-text>Crane Sales Rep</p><p class=sub-heading-text>{{vm.supportCompany.sales_rep.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Operations Contacts</p><p ng-repeat=\\\"contact in vm.supportCompany.customer_configurations.csl.operation_contacts\\\" class=sub-heading-text>{{contact.contact_name}}<br></p></div></div><div layout=row ng-if=vm.supportCompany.customer_configurations.csl style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Default Primary Contact</p><p class=sub-heading-text>{{vm.supportCompany.customer_configurations.csl.primary_crane_contact.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\" ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><p class=heading-text>Default BCCs</p><p ng-repeat=\\\"bcc in vm.supportCompany.customer_configurations.csl.default_bccs\\\" class=sub-heading-text>{{bcc}}<br></p></div></div></div><!-- CFS CONTACTS --><div class=cfs_contact><div layout=row ng-if=vm.supportCompany.customer_configurations.cfs style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CFS - CONTACTS</p></div></div><div layout=row ng-if=vm.supportCompany.customer_configurations.cfs style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\" ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><p class=heading-text>Crane Sales Rep</p><p class=sub-heading-text>{{vm.supportCompany.sales_rep.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Operations Contacts</p><p ng-repeat=\\\"contact in vm.supportCompany.customer_configurations.cfs.operation_contacts\\\" class=sub-heading-text>{{contact.contact_name}}<br></p></div></div><div layout=row ng-if=vm.supportCompany.customer_configurations.cfs style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Default Primary Contact</p><p class=sub-heading-text>{{vm.supportCompany.customer_configurations.cfs.primary_crane_contact.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\" ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><p class=heading-text>Default BCCs</p><p ng-repeat=\\\"bcc in vm.supportCompany.customer_configurations.cfs.default_bccs\\\" class=sub-heading-text>{{bcc}}<br></p></div></div><span style=\\\"display: block;border-bottom: 2px solid #979797\\\"></span><br></div></div><!-- Departments --> <span ng-if=\\\"(vm.supportCompany.access_type.includes(\\'portal\\'))\\r\\n \\\"><div class=company_name layout=row layout-align=\\\"space-between center\\\"><div class=text>Departments</div></div><!-- CWW DEPARTMENTS --><div layout=row ng-if=vm.supportCompany.customer_configurations.cww style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CWW - DEPARTMENTS</p></div></div><div layout=row class=table-scroll ng-if=vm.supportCompany.customer_configurations.cww style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=heading-text>Department Name</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=heading-text>Primary Contact</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=heading-text>BCC Override</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Party & Group IDs</div></th></thead><tbody><tr ng-repeat=\\\"item in vm.supportCompany.customer_configurations.cww.departments\\\" class=user_list><td ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=sub-heading-text>{{item.name}}</div></td><td ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=sub-heading-text>{{item.primary_contact.email}}</div></td><td ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=sub-heading-text><p ng-repeat=\\\"bcc in item.bcc_override\\\" class=sub-heading-text>{{bcc}}<br></p></div></td><td><div class=company_name><div ng-repeat=\\\"departcww in (item.party_or_group_ids)\\\" class=chips-exist><span>{{departcww}}</span></div><div ng-repeat=\\\"departcww in (item.invalide_party_or_group_ids)\\\" class=chips-notexist><span>{{departcww}}</span></div></div></td></tr></tbody></table></div><br><!-- CSL DEPARTMENTS --><div layout=row ng-if=vm.supportCompany.customer_configurations.csl style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CSL - DEPARTMENTS</p></div></div><div layout=row class=table-scroll ng-if=vm.supportCompany.customer_configurations.csl style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=heading-text>Department Name</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=heading-text>Primary Contact</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=heading-text>BCC Override</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Party & Group IDs</div></th></thead><tbody><tr ng-repeat=\\\"item2 in vm.supportCompany.customer_configurations.csl.departments\\\" class=user_list><td ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=sub-heading-text>{{item2.name}}</div></td><td ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=sub-heading-text>{{item2.primary_contact.email}}</div></td><td ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=sub-heading-text><p ng-repeat=\\\"bcc in item2.bcc_override\\\" class=sub-heading-text>{{bcc}}<br></p></div></td><td><div class=company_name><div ng-repeat=\\\"departcww in (item2.customer_ids)\\\" class=chips-exist><span>{{departcww}}</span></div><div ng-repeat=\\\"departcww in (item2.invalide_customer_ids)\\\" class=chips-notexist><span>{{departcww}}</span></div></div></td></tr></tbody></table></div><br><!-- CFS DEPARTMENTS --><div layout=row ng-if=vm.supportCompany.customer_configurations.cfs style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CFS - DEPARTMENTS</p></div></div><div layout=row class=table-scroll ng-if=vm.supportCompany.customer_configurations.cfs style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=heading-text>Department Name</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=heading-text>Primary Contact</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=heading-text>BCC Override</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Party & Group IDs</div></th></thead><tbody><tr ng-repeat=\\\"item3 in vm.supportCompany.customer_configurations.cfs.departments\\\" class=user_list><td ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=sub-heading-text>{{item3.name}}</div></td><td ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=sub-heading-text>{{item3.primary_contact.email}}</div></td><td ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div class=sub-heading-text><p ng-repeat=\\\"bcc in item3.bcc_override\\\" class=sub-heading-text>{{bcc}}<br></p></div></td><td><div class=company_name><div ng-repeat=\\\"departcww in (item3.customer_ids)\\\" class=chips-exist><span>{{departcww}}</span></div><div ng-repeat=\\\"departcww in (item3.invalide_customer_ids)\\\" class=chips-notexist><span>{{departcww}}</span></div></div></td></tr></tbody></table></div><br><span style=\\\"display: block;border-bottom: 2px solid #979797\\\"></span><br></span><!-- User Section --><div class=user_section ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><div class=company_name layout=row layout-align=\\\"space-between center\\\" ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><div class=text>User Accounts</div></div><!-- USER ACCOUNTS --><div layout=row style=\\\"padding-left: 50px\\\" ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">USER ACCOUNTS</p></div></div><div class=user_add_div style=\\\"padding-left: 50px\\\"><div class=table-scroll><table class=table-static cellspacing=0 border=0 style=\\\"width: 95%; min-width:800px\\\"><thead class=header-table><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-5><div class=label>First Name</div></th><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-5><div class=label>Last Name</div></th><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-10><div class=label>Email</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px\\\">Pathway</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:35px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">ACCESS</span></div><div style=\\\"width:55px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">ROLE</span></div></div></div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20 ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px\\\">Customer Type</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CWW</span></div><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CSL</span></div><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CFS</span></div><div style=\\\"width:50px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">FINANCIAL</span></div></div></div></th><!-- <th style=\\\"text-align: center;padding-left: 0;font-size: 13px;\\\" class=\\\"td-10\\\"><div class=\\\"label\\\">Overrides</div></th> --></thead><tbody><tr class=user_list ng-repeat=\\\"item in vm.supportCompany.users\\\"><td style=\\\"height: 70px\\\">{{item.first_name}}</td><td style=\\\"height: 70px\\\">{{item.last_name}}</td><td style=\\\"height: 70px\\\">{{item.email}}</td><td style=\\\"height: 70px\\\" ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><div layout=column class=\\\"label cust_type\\\"><div layout=row layout-align=\\\"space-between center\\\" style=\\\"padding: 0px\\\"><div style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.classic_access class=material-icons style=\\\"color: #a8a8a8\\\">check</i> <i ng-if=!item.classic_access class=material-icons style=\\\"color: red\\\">clear</i></div><div style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span flex=100><span ng-if=\\\"(item.classic_role == \\'customer_classic\\')\\\">Customer</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_ops\\')\\\">Customer Ops</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_consignee\\')\\\">Consignee</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_shipper\\')\\\">Shipper</span> <span ng-if=\\\"(item.classic_role == \\'\\')\\\">N/A</span></span></div></div></div></td><td style=\\\"height: 70px\\\" ng-hide=\\\"vm.cview_classic_admin == \\'true\\'\\\"><span><div layout=row layout-align=\\\"space-between center\\\"><!-- CWW md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.cww_access class=material-icons style=\\\"color: #a8a8a8\\\">check</i> <i ng-if=!item.cww_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- CSL md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.csl_access class=material-icons style=\\\"color: #a8a8a8\\\">check</i> <i ng-if=!item.csl_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- CFS md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.cfs_access class=material-icons style=\\\"color: #a8a8a8\\\">check</i> <i ng-if=!item.cfs_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- FINACIAL md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.financial class=material-icons style=\\\"color: #a8a8a8\\\">check</i> <i ng-if=!item.financial class=material-icons style=\\\"color: red\\\">clear</i></div></div></span></td><!-- <td style=\\\"height: 70px;\\\">\\r\\n <div flex=\\\"100\\\">\\r\\n <span class=\\\"label\\\" style=\\\"font-weight: 600;font-size: 13px;\\\" flex=\\\"100\\\" layout=\\\"row\\\" layout-align=\\\"center center\\\">\\r\\n <span ng-if=\\\"(item.cww_overrides.primary_contact.id || item.cww_overrides.bccs.length || item.cww_overrides.party_group_ids.length || item.csl_overrides.primary_contact.id || item.csl_overrides.bccs.length || item.csl_overrides.customer_ids.length || item.cfs_overrides.primary_contact.id || item.cfs_overrides.bccs.length || item.cfs_overrides.customer_ids.length)\\\" class=\\\"override\\\" ng-click=\\\"vm.display_overrides(item)\\\" >\\r\\n {{ (item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length}}\\r\\n <span ng-if=\\\"((item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length == 1)\\\">Override</span>\\r\\n\\r\\n <span ng-if=\\\"((item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length > 1)\\\">Overrides</span>\\r\\n\\r\\n </span>\\r\\n <span ng-if=\\\"(!item.cww_overrides.primary_contact.id && !item.cww_overrides.bccs.length && !item.cww_overrides.party_group_ids.length && !item.csl_overrides.primary_contact.id && !item.csl_overrides.bccs.length && !item.csl_overrides.customer_ids.length && !item.cfs_overrides.primary_contact.id && !item.cfs_overrides.bccs.length && !item.cfs_overrides.customer_ids.length)\\\" class=\\\"no_override\\\">No overrides</span>\\r\\n </span>\\r\\n </div>\\r\\n </td> --></tr></tbody></table></div></div><br></div><br><span ng-hide=\\\"vm.validation_user == \\'true\\'\\\" style=\\\"display: block;border-bottom: 2px solid #979797\\\"></span><br><!-- Account Overrides --> <span ng-hide=\\\"vm.validation_user == \\'true\\'\\\"><div class=company_name layout=row layout-align=\\\"space-between center\\\"><div class=text>Account Overrides</div></div><!-- CWW ACCOUNT OVERRIDES --><div layout=row ng-if=\\\"vm.supportCompany.customer_types.includes(\\'cww\\')\\\" style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CWW - ACCOUNT OVERRIDES</p></div></div><div class=user_add_div ng-if=\\\"vm.supportCompany.customer_types.includes(\\'cww\\')\\\"><div layout=row class=table-scroll style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>User Account</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Primary Contact Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div class=heading-text>BCC Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Party & Group ID Overrides</div></th></thead><tbody><tr></tr><tr ng-repeat=\\\"overridecww in vm.supportCompany.users\\\" class=user_list><td><div class=sub-heading-text>{{overridecww.first_name}} {{overridecww.last_name}}</div></td><td><div class=sub-heading-text>{{overridecww.cww_overrides.primary_contact.email}}</div></td><td><div class=sub-heading-text><p ng-repeat=\\\"bcccww in overridecww.cww_overrides.bccs\\\" class=sub-heading-text>{{bcccww}}<br></p></div></td><td><div class=company_name><div ng-repeat=\\\"overidecww in (overridecww.cww_overrides.party_group_ids)\\\" class=chips-exist><span>{{overidecww}}</span></div></div></td></tr></tbody></table></div></div><br><!-- CSL ACCOUNT OVERRIDES --><div layout=row ng-if=\\\"vm.supportCompany.customer_types.includes(\\'csl\\')\\\" style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CSL - ACCOUNT OVERRIDES</p></div></div><div class=user_add_div ng-if=\\\"vm.supportCompany.customer_types.includes(\\'csl\\')\\\"><div layout=row class=table-scroll style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>User Account</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Primary Contact Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div class=heading-text>BCC Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Customer ID Overrides</div></th></thead><tbody><tr></tr><tr ng-repeat=\\\"overridecsl in vm.supportCompany.users\\\" class=user_list><td><div class=sub-heading-text>{{overridecsl.first_name}} {{overridecsl.last_name}}</div></td><td><div class=sub-heading-text>{{overridecsl.csl_overrides.primary_contact.email}}</div></td><td><div class=sub-heading-text><p ng-repeat=\\\"bcccsl in overridecsl.csl_overrides.bccs\\\" class=sub-heading-text>{{bcccsl}}<br></p></div></td><td><div class=company_name><div ng-repeat=\\\"overidecsl in (overridecsl.csl_overrides.customer_ids)\\\" class=chips-exist><span>{{overidecsl}}</span></div></div></td></tr></tbody></table></div></div><br><!-- CFS ACCOUNT OVERRIDES --><div layout=row ng-if=\\\"vm.supportCompany.customer_types.includes(\\'cfs\\')\\\" style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CFS - ACCOUNT OVERRIDES</p></div></div><div class=user_add_div ng-if=\\\"vm.supportCompany.customer_types.includes(\\'cfs\\')\\\"><div layout=row class=table-scroll style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>User Account</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Primary Contact Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div class=heading-text>BCC Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Customer ID Overrides</div></th></thead><tbody><tr></tr><tr ng-repeat=\\\"overridecfs in vm.supportCompany.users\\\" class=user_list><td><div class=sub-heading-text>{{overridecfs.first_name}} {{overridecfs.last_name}}</div></td><td><div class=sub-heading-text>{{overridecfs.cfs_overrides.primary_contact.email}}</div></td><td><div class=sub-heading-text><p ng-repeat=\\\"bcccsl in overridecfs.cfs_overrides.bccs\\\" class=sub-heading-text>{{bcccsl}}<br></p></div></td><td><div class=company_name><div ng-repeat=\\\"overidecfs in (overridecfs.cfs_overrides.customer_ids)\\\" class=chips-exist><span>{{overidecfs}}</span></div></div></td></tr></tbody></table></div></div><br></span></md-card-content></md-card></md-card-content></md-card-content></md-card><md-card class=discussion-chat ng-include=\\\"\\'/app/admin/support-requests/support-request-discussion-chat.html\\'\\\"></md-card><md-card class=support-request-log ng-include=\\\"\\'/app/admin/support-requests/support-request-log.html\\'\\\"></md-card></div><div ng-if=vm.failedToRetrieveData class=\\\"m-t m-b\\\" layout=row layout-align=\\\"center center\\\"><h2><span translate=\\\"Failed to retrive user details with error\\\"></span> {{vm.failedToRetrieveData}}</h2></div></cva-shell>\");\n$templateCache.put(\"/app/admin/support-requests/general-support-preview.html\",\"<style type=text/css>.complete-btn{\\r\\n background-color: #4ac66c !important;\\r\\n border-radius: 5px !important;\\r\\n display: block !important;\\r\\n padding: 5px !important;\\r\\n float: right !important;\\r\\n min-width: 15% !important;\\r\\n margin-right: 15px !important;\\r\\n}\\r\\n.edit-btn{\\r\\n color: #50afe3 !important;\\r\\n background-color: #50afe3 !important;\\r\\n padding: 5px !important;\\r\\n border-radius: 5px !important;\\r\\n display: block !important;\\r\\n float: right !important;\\r\\n min-width: 15% !important;\\r\\n}\\r\\n.delete-btn{\\r\\n background-color: #d0021b !important;\\r\\n padding: 5px !important;\\r\\n border-radius: 5px !important;\\r\\n display: block !important;\\r\\n float: right !important;\\r\\n min-width: 15% !important;\\r\\n}\\r\\n.btn-text{\\r\\n color: #fff;text-transform: none;\\r\\n}\\r\\n.open-text{\\r\\n font-size: 35px;color: #a8a8a8;font-style: italic;text-transform: capitalize;\\r\\n}\\r\\n.title-text-font{\\r\\n font-size: 25px;\\r\\n}\\r\\n.heading-text{\\r\\n color: #a8a8a8;font-size: 15px;font-weight: 700;\\r\\n}\\r\\n.sub-heading-text{\\r\\n color: #505457;font-size: 16px;word-break: break-all;\\r\\n}\\r\\n.sub-heading-text1{\\r\\n color: #505457;font-size: 15px;word-break: break-all;\\r\\n}\\r\\n.attachment-icon{\\r\\n color: #68b9ea;top: 5px;position: relative;\\r\\n}\\r\\n.attachment-text{\\r\\n cursor: pointer;color: #68b9ea;font-size: 16px;font-weight: 700;\\r\\n}\\r\\n.attachment-ul{\\r\\n margin: 0;padding: 0;\\r\\n}</style><cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\"><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1>Support Request #{{vm.requestId}}</span> <input type=hidden id=requestId value={{vm.requestId}}></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/supportRequests class=parent-link><span>Support Requests</span></a> / <span>Support Request #{{vm.requestId}}</span></span></div></div></div></div><span ng-if=\\\"vm.supportrequestAdminCheck == \\'true\\'\\\"><md-button ng-hide=vm.btnMarkCheck ng-click=changeGeneralsupportStatus(vm.status,vm.requestId) class=\\\"md-raised md-primary complete-btn\\\"><span class=btn-text>{{vm.btnMark}}</span></md-button><md-button ng-hide=vm.btnMarkCheck ng-click=editGeneralRequest(vm.requestId) class=\\\"md-raised md-primary edit-btn\\\"><span class=btn-text>Edit</span></md-button><md-button ng-show=\\\"vm.status == \\'in_review\\'\\\" ng-hide=\\\"vm.btnMarkCheck || vm.status != \\'in_review\\'\\\" ng-click=deleteGeneralsupportRequest(vm.requestId) class=\\\"md-raised md-primary delete-btn\\\"><span class=btn-text>Delete</span></md-button></span><span ng-if=\\\"vm.supportrequestAdminCheck == \\'false\\'\\\"><md-button ng-hide=vm.openCheck ng-click=editGeneralRequest(vm.requestId) class=\\\"md-raised md-primary edit-btn\\\"><span class=btn-text>Edit</span></md-button></span><br><br><div style=clear:both></div><md-card><md-card-content><div layout-gt-sm=row><div ng-if=\\\"vm.status == \\'open\\'\\\" flex-gt-sm=90><h3 class=title-text-font><label>New Support Request</label></h3></div><div ng-if=\\\"vm.status != \\'open\\'\\\" flex-gt-sm=80><h3 class=title-text-font><label>New Support Request</label></h3></div><div ng-if=\\\"vm.status == \\'open\\'\\\" flex-gt-sm=10><span class=open-text>{{vm.statusText}}</span></div><div ng-if=\\\"vm.status != \\'open\\'\\\" flex-gt-sm=20><span class=open-text ng-attr-style=\\\"color:{{vm.statusText==\\'In Review\\'?\\'#e2a45d\\':\\'\\'}}\\\">{{vm.statusText}}</span></div></div><div layout-gt-sm=row><div flex-gt-sm=45><p class=heading-text>Title</p><p class=sub-heading-text>{{vm.title}}</p></div></div><div layout-gt-sm=row><div flex-gt-sm=45><p class=heading-text>Associated Company</p><p class=sub-heading-text>{{vm.associateCompany}}</p></div></div><div layout-gt-sm=row><div flex-gt-sm=100><p class=heading-text>Description</p><p class=sub-heading-text1>{{vm.description}}</p></div></div><div layout-gt-sm=row><div flex-gt-sm=45><p class=heading-text>Attachments</p><p><ul class=attachment-ul type=none><li ng-repeat=\\\"file in vm.attachments\\\"><i class=\\\"material-icons attachment-icon\\\"></i> <label class=attachment-text><a target=_self download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href={{downloadlink}}{{file.url}}>{{file.url.substring((file.url.lastIndexOf(\\\"/\\\")) + 1)}}</a></label></li></ul></p></div></div></md-card-content></md-card><md-card class=discussion-chat ng-include=\\\"\\'/app/admin/support-requests/support-request-discussion-chat.html\\'\\\"></md-card><md-card class=support-request-log ng-include=\\\"\\'/app/admin/support-requests/support-request-log.html\\'\\\"></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/admin/support-requests/general-support-request.html\",\"<style>.heading-sub-text-small {\\r\\n font-size: 11px;\\r\\n font-style: italic;\\r\\n color: #8D9095;\\r\\n text-transform: none;\\r\\n margin-bottom: 20px;\\r\\n}\\r\\nmd-autocomplete-wrap{\\r\\n box-shadow: none !important;\\r\\n}</style><cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\"><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span ng-if=vm.support.requestId class=md-display-1>Edit General Support Request</span> <span ng-if=!vm.support.requestId class=md-display-1>General Support Request</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/supportRequests class=parent-link><span>Support Requests</span></a> / <span ng-if=!vm.support.requestId>General Support Request</span> <span ng-if=vm.support.requestId>Edit General Support Request</span></span></div></div></div></div><md-card><form name=vm.GeneralRequestForm class=light-form novalidate><md-card-content><div layout-gt-sm=row><div flex-gt-sm=90><h3 style=\\\"font-size: 25px\\\"><label ng-if=!vm.support.requestId>New Support Request</label><label ng-if=vm.support.requestId>Edit General Support Request</label></h3></div></div><div layout-gt-sm=row><div flex-gt-sm=45><h3 style=\\\"margin-bottom: 0px\\\"><label>Title*</label></h3><span class=heading-sub-text-small>Enter a title to breifly describe reason for request</span></div></div><div layout-gt-sm=row><div flex-gt-sm=45><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>Title</label><input style=\\\"font-size:110%;color: #30353B\\\" ng-model=vm.support.title type=text name=title ng-required=true><div ng-messages=vm.GeneralRequestForm.title.$error><div ng-message=required><span>Title field required</span></div></div></md-input-container></div></div><div layout=column layout-gt-sm=row><div flex=100 flex-gt-sm=45 layout=column><div flex=100><h3 style=\\\"margin-bottom: 0px\\\"><label>Associated Company(Optional)</label></h3><span class=heading-sub-text-small>Enter the company name if it is associated with the request</span></div><div flex=100><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>Company</label><!-- <input style=\\\"font-size:110%;color: #30353B;border-width: 0 0 2px 0;border-bottom-color: #a9a9a9;\\\" ng-model=\\'vm.support.company_name\\' type=\\\"text\\\" name=\\'company_name\\'> --><md-autocomplete style=\\\"background: none\\\" md-delay=300 ng-model=vm.support.company_name md-selected-item-change=vm.selectedCompanyChange(item) md-search-text=vm.searchText1 md-items=\\\"item in vm.getMatchesCompanies(\\'company_name\\', vm.searchText1)\\\" md-item-text=item.display md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() placeholder=\\\"\\\"><md-item-template><span md-highlight-text=vm.searchText1>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-input-container></div></div><div flex=100 flex-gt-sm=45 flex-offset-gt-sm=10><div flex=100><h3 style=\\\"margin-bottom: 0px\\\"><label>Adding New Departments?</label></h3><span class=heading-sub-text-small>Select Yes to show the Add Departments interface</span></div><div flex=100 layout=column><md-input-container class=\\\"md-block error-hidden m-b\\\"><md-checkbox ng-model=vm.support.is_department ng-change=vm.changeReskin(vm.support.is_department) aria-label=is_department class=md-primary></md-checkbox>  <span>Yes</span></md-input-container></div></div></div><div layout=column flex=100 ng-if=vm.support.is_department style=min-height:150px><div layout=column><h3 style=\\\"margin-bottom: 0px\\\"><label>New Departments</label></h3><span class=heading-sub-text-small>List of Departments used if Client needs groups of users with limited Party/Group iD access. Separate multiple Group and party ID\\'s by semicolon (ex. PARTY123;GROUP1234)</span></div><br><div layout=column layout-gt-sm=row><div flex=100 flex-gt-md=25><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Department Name</label><input style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0)\\\" type=text ng-disabled=\\\"\\\" ng-model=vm.support.department_name name=department_name ng-change=checkPartyField(vm.support.department_name) required><div ng-messages=vm.GeneralRequestForm.department_name.$error><div ng-hide=vm.GeneralRequestForm.department_name.$valid ng-message=required><!-- <span>Department name Required</span> --> <span style=color:red ng-show=vm.partyCheck>Department name Required</span></div></div></md-input-container></div> <div flex=100 flex-gt-md=30><md-input-container class=\\\"md-block error-hidden\\\"><label>Primary Contact</label><md-select style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0)\\\" ng-class=\\\"\\\" ng-model=vm.support.default_contact name=default_contact_id aria-label=default_contact_id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></md-input-container></div> <div flex=100 flex-gt-md=30><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><label class=company>BCC Override</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.support.default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div> <div flex=100 flex-gt-md=25><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Party & Group ID\\'s</label><input style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0)\\\" type=text ng-disabled=\\\"\\\" ng-change=checkPartyField(vm.support.party_group_ids) ng-model=vm.support.party_group_ids name=party_group_ids required><div><span style=color:red ng-show=vm.partyCheck1>Separate multiple Group and Party ID\\'s by semicolon only (ex. PARTY1234;GROUP1234)</span></div></md-input-container></div>    <div flex=100 flex-gt-md=20><md-input-container class=\\\"md-block error-hidden\\\"><md-checkbox ng-model=vm.support.is_magno aria-label=is_magno class=md-primary><span>Magno Re-Skin</span></md-checkbox></md-input-container></div><div flex=100 flex-gt-md=20><md-button ng-disabled=!vm.GeneralRequestForm.department_name.$valid ng-click=vm.addGeneralRequestDepartment(); class=\\\"md-raised md-primary\\\" style=\\\"background-color: #fff !important; border-radius: 10px !important;box-shadow: none !important;\\r\\n border: 1px solid #68b9ea !important\\\"><span style=\\\"color: #68b9ea;text-transform: none\\\">Add</span></md-button></div></div><div class=\\\"table-scroll m-t\\\" style=\\\"margin: 0\\\"><table class=card-content-table><thead><tr><th style=\\\"width:13%;font-size: 15px\\\"></th><th style=\\\"width:6%;font-size: 15px\\\"></th><th style=\\\"width:21%;font-size: 15px\\\"></th><th style=\\\"width:15%;font-size: 15px\\\"></th><th style=\\\"width:12%;font-size: 15px\\\"></th><th style=\\\"width:10%;font-size: 15px\\\"></th></tr></thead><tbody><tr ng-repeat=\\\"item in vm.departments\\\" class=savedDepartment{{$index}}><td style=\\\"word-break: break-all\\\">{{item.department_name}}</td><td>{{item.primary_contact.name}}</td><td style=\\\"word-break: break-all\\\">{{(item.bcc_override).join(\\', \\')}}</td><td style=\\\"word-break: break-all\\\">{{(item.party_or_group_id).join(\\', \\')}}</td><td><md-checkbox ng-model=item.magno_re_skin aria-label=is_magno class=md-primary ng-disabled=true></md-checkbox>Magno</td><td><span ng-click=vm.removeDepartment(item.id,$index) style=\\\"cursor: pointer;color: red\\\">Remove</span></td></tr></tbody></table></div></div><div layout-gt-sm=row><div flex-gt-sm=90><h3 style=\\\"margin-bottom: 0px\\\"><label>Description*</label></h3><span class=heading-sub-text-small>Please provide a detailed description of your request and any associated details or information</span></div></div><div layout-gt-sm=row><div flex-gt-sm=100><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>Description</label><input style=\\\"font-size:110%;color: #30353B\\\" ng-model=vm.support.description type=text name=description ng-required=true><div ng-messages=vm.GeneralRequestForm.description.$error><div ng-message=required><span>Description field required</span></div></div></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=90><h3 style=\\\"margin-bottom: 0px\\\"><label>Attach Files</label></h3><span class=heading-sub-text-small>Upload any associated files or screenshots</span></div></div><br><div layout-gt-sm=row><div flex-gt-sm=90><i class=material-icons style=\\\"color: #68b9ea;top: 5px;position: relative\\\"></i> <label for=file1 style=\\\"cursor: pointer;color: #68b9ea;font-size: 16px;font-weight: 700\\\">Attach Files</label><input style=\\\"visibility: hidden\\\" type=file ng-modal=vm.support.files id=file1 name=files custom-on-change=uploadFile multiple><ul><li class=savedFile{{$index}} ng-repeat=\\\"file in files\\\">{{file.name}}<span title=remove ng-click=vm.removeFile(file.name,$index) style=\\\"color: red;cursor: pointer;margin-left: 20px\\\"><i style=\\\"color: red;position: relative;top: 10px\\\" class=material-icons></i></span></li></ul></div></div><br><span style=\\\"display: block;margin: 15px;border-bottom: 1px solid #ccc\\\"></span><div layout-gt-sm=row style=\\\"display: inline\\\"><md-button ng-disabled=\\\"!vm.GeneralRequestForm.description.$valid || !vm.GeneralRequestForm.title.$valid\\\" ng-click=vm.submitGeneralRequest(vm.support.requestId); style=\\\"background-color: #48c269;float: right;min-width: 16%\\\" class=\\\"md-raised md-primary\\\"><span ng-if=vm.support.requestId style=\\\"color: #fff;text-transform: none\\\">Update</span> <span ng-if=!vm.support.requestId style=\\\"color: #fff;text-transform: none\\\">Submit</span></md-button></div><div layout-gt-sm=row><md-button ng-click=vm.goBackRequest(); style=\\\"background-color: #fff;border: 1px solid #b3b3b2;min-width: 16%;box-shadow: none\\\" class=\\\"md-raised md-primary\\\"><span style=\\\"color: #b3b3b2;text-transform: none\\\">Cancel</span></md-button></div></md-card-content></form></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/admin/support-requests/log.html\",\"<md-card class=m-t ng-if=$ctrl.data.log.length><md-toolbar class=md-toolbar-tools><h2>{{\\'ADMIN.COMPANY.LOG\\' | translate}}</h2><span flex=auto></span><md-button class=md-raised ng-click=$ctrl.logExportShowCSV(data)>Export</md-button></md-toolbar><md-card-content class=light-form><div class=table-scroll><table class=\\\"card-table table-fixed table-static\\\"><thead><tr><th style=\\\"width: 25%\\\">User</th><th style=\\\"width: 15%\\\">Date</th><th style=\\\"width: 60%\\\">Actions</th></tr></thead><tbody><tr class=md-whiteframe-1dp ng-repeat=\\\"log_record in $ctrl.data.log\\\"><td style=\\\"width: 25%\\\">{{log_record.username}}</td><td style=\\\"width: 15%\\\">{{log_record.created_at | date}}</td><td style=\\\"width: 60%\\\"><p ng-bind-html=$ctrl.processActions(log_record.actions)></p></td></tr></tbody></table></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/admin/support-requests/manage-companies.html\",\"<cva-shell><div class=\\\"shell-padding book-shipment content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span ng-if=\\\"vm.readAccess == false\\\" class=md-display-1 translate=COMPANY.MANAGE_COMPANIES></span><br><span ng-if=\\\"vm.readAccess == true\\\" class=md-display-1>VIEW COMPANIES</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/companies class=parent-link><span translate=COMPANY.COMPANIES></span></a></span></div></div></div><!-- abheesh vk (abheesh.vk@dreamorbit.com) --><md-card class=p-a-sm collapsible template-url=/app/admin/companies/forms/search.html></md-card><crane-table title=COMPANY.COMPANIES icon=vm.icon ; is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons readaccess=vm.readAccess ctrl=CompanyManagementController></crane-table></div></cva-shell>\");\n$templateCache.put(\"/app/admin/support-requests/support-request-discussion-chat.html\",\"<md-card-content class=discussion-content><div layout=row class=layout-row style=\\\"min-height: 65px\\\"><div flex-gt-sm=100><i class=\\\"material-icons discussion-icon\\\"></i>   <span class=\\\"uppercase ng-scope discussion-text\\\">DISCUSSION</span> <span flex=auto class=flex-auto></span></div></div></md-card-content><md-card-content style=\\\"background-color: #050B24\\\"><div layout=row class=layout-row><md-input-container style=\\\"margin-bottom: 0px\\\" class=\\\"md-block error-hidden m-b\\\" flex=100><input class=input-box ng-model=vm.supportChatComment type=text name=description ng-required=true style=padding-right:50px> <i ng-click=savesupportChatComment(vm.supportChatComment,vm.requestId) class=\\\"material-icons plus-icon\\\"></i></md-input-container><span flex=auto class=flex-auto></span></div></md-card-content><md-card-content ng-if=\\\"vm.supportChatComments.length > 0\\\" class=chat-content style=\\\"max-height:400px;overflow-y: scroll\\\"><div layout=column><!-- Chat boxes layout --><div ng-repeat=\\\"comment in vm.supportChatComments\\\" ng-class=\\\"comment.newComment ? \\'chat-new-div\\' : \\'chat-div\\'\\\" flex><p ng-if=!comment.newComment style=\\\"margin-left: 20px\\\"><span class=chat-title layout-xs=row>{{comment.comment_by.full_name}}</span> <span hide-xs>  </span> <span class=chat-sub-title layout-xs=row>{{comment.comment_by.email}}</span></p><p ng-if=comment.newComment style=\\\"margin-left: 20px;position: relative\\\"><span class=new-btn-span><button class=new-btn>NEW</button> </span><span class=chat-title>{{comment.comment_by.full_name}}</span>   <span class=chat-sub-title>{{comment.comment_by.email}}</span></p><p style=\\\"margin: 0px 20px 0px 20px\\\" layout=column layout-align=\\\"space-around start\\\" layout-gt-xs=row layout-align-gt-xs=\\\"space-between center\\\"><span class=chat-text flex=100 flex-gt-xs=70>{{comment.comment_text}}</span> <span class=chat-time flex=100 flex-gt-xs=30 layout-align-gt-xs=\\\"end end\\\">{{ comment.created_at | date:\\'yyyy-MM-dd hh:mm a\\' }}</span></p></div></div></md-card-content>\");\n$templateCache.put(\"/app/admin/support-requests/support-request-log.html\",\"<md-card-content ng-repeat=\\\"log in vm.requestsupportLogs\\\" style=padding-left:0px;padding-right:0px><div flex=100 flex-gt-sm=50 layout-xs=column layout-gt-xs=row layout-align=\\\"space-between start\\\" layout-align-gt-sm=\\\"space-between center\\\"><div flex=100 flex-gt-xs=50><span title={{log.action_by}} class=footer-text><span class=capitalize>{{log.action}}</span> by {{log.action_by}}</span></div><div flex=100 flex-gt-xs=40><span class=footer-date>{{ log.created_at | date:\\'dd-MM-yyyy\\'}} | {{ log.created_at | date:\\'HH:mm\\'}}</span></div><div flex=100 flex-gt-xs=10><span ng-if=\\\"log.action == \\'edited\\'\\\" ng-click=vm.viewSupportLog($index) class=footer-view-link>View</span> <span ng-if=\\\"log.action != \\'edited\\'\\\" style=\\\"visibility: hidden\\\" class=footer-view-link>View</span></div></div><md-card-content layout=row layout-wrap style=\\\"display: none;padding-left:0px;padding-right:0px\\\" id=requestLog{{$index}}><div class=table-scroll layout=row flex=100><table class=card-content-table><thead><tr><th class=title-text-font>Field</th><th class=title-text-font style=width:40%>Original Value</th><th class=title-text-font style=\\\"width:40%;position: relative\\\">New Value<md-button style=\\\"position: absolute;right: 0;top:0\\\" class=md-icon-button ng-click=vm.closeSuportLogDiv($index)><md-icon style=\\\"font-size: 24px;color: red\\\" aria-label=\\\"Close dialog\\\"></md-icon></md-button></th></tr></thead><tbody><tr ng-repeat=\\\"(key, data) in log.old_values\\\" class=showRequestLog{{$index}}><td ng-if=\\\"(key != \\'creator_id\\')\\\"><span class=capitalize>{{(key | strReplace:\\'_\\':\\' \\') }}</span></td><td ng-if=\\\"(key != \\'creator_id\\')\\\"><span ng-if=\\\"(key !=\\'party_or_group_ids\\' && key !=\\'bcc_contacts\\' && key !=\\'primary_crane_contact\\' && key !=\\'sales_rep\\')\\\">{{log.old_values[key]}}</span> <span ng-if=\\\"key ==\\'party_or_group_ids\\'\\\">{{(log.old_values[key]).join(\\',\\')}}</span> <span ng-if=\\\"key ==\\'bcc_contacts\\'\\\">{{(log.old_values[key]).join(\\',\\')}}</span> <span ng-if=\\\"key ==\\'sales_rep\\'\\\">{{(log.old_values[key]).email}}</span> <span ng-if=\\\"key ==\\'primary_crane_contact\\'\\\">{{(log.old_values[key]).email}}</span></td><td ng-if=\\\"(key != \\'creator_id\\')\\\"><span ng-if=\\\"(key !=\\'party_or_group_ids\\' && key !=\\'bcc_contacts\\' && key !=\\'primary_crane_contact\\' && key !=\\'sales_rep\\')\\\">{{log.changed_values[key]}}</span> <span ng-if=\\\"key ==\\'party_or_group_ids\\'\\\">{{(log.changed_values[key]).join(\\',\\')}}</span> <span ng-if=\\\"key ==\\'bcc_contacts\\'\\\">{{(log.changed_values[key]).join(\\',\\')}}</span> <span ng-if=\\\"key ==\\'sales_rep\\'\\\">{{(log.changed_values[key]).email}}</span> <span ng-if=\\\"key ==\\'primary_crane_contact\\'\\\">{{(log.changed_values[key]).email}}</span></td></tr></tbody></table></div></md-card-content></md-card-content>\");\n$templateCache.put(\"/app/admin/support-requests/support-requests.html\",\"<cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\" class=support_request_dashboard><div ng-if=!vm.failedToRetrieveData class=shell-padding id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1>Support Requests</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=# class=parent-link><span>Support Requests</span></a></span></div></div></div></div><div layout-gt-sm=row layout-align=\\\"end center\\\" style=\\\"margin:auto 20px\\\" class=layout-gt-sm-row><md-button ng-if=\\\"vm.supportrequestUserCheck == \\'true\\' || vm.supportrequestAdminCheck == \\'true\\'\\\" ng-click=\\\"vm.openPopup(ev, \\'support-requests\\');\\\" class=\\\"new_request_btn md-raised\\\"><span style=\\\"color: #fff;text-transform: none\\\"><i class=material-icons></i> NEW REQUEST</span></md-button></div><br><br><div style=clear:both></div><div layout-gt-sm=row style=\\\"margin:auto 10px\\\"><div layout=row layout-align=\\\"space-around center\\\" style=\\\"height: 75px;background-color: #f2a624;margin-right: 15px;margin-bottom:10px;border-radius: 5px;padding: 0 15px\\\" class=remove-margin-responsive flex=100 flex-gt-sm=33><div flex=15 layout=row layout-align=\\\"start center\\\"><i style=\\\"color: black;font-size: 30px\\\" class=material-icons>computer</i></div><div flex=70 layout=row layout-align=\\\"start center\\\" class=status_bar_text>AWAITING DEMO</div><div flex=15 class=status_bar_count layout=row layout-align=\\\"end center\\\">{{vm.awaiting_demo_count}}</div><!-- <label class=\\\"status_bar_text\\\"><i class=\\\"material-icons\\\"></i></label>\\r\\n <label class=\\\"status_bar_text\\\">AWAITING DEMO</label>\\r\\n <label class=\\\"status_bar_count\\\">{{vm.awaiting_demo_count}}</label> --></div><div layout=row layout-align=\\\"space-around center\\\" style=\\\"height: 75px;background-color: #347c8f;margin-right: 15px;margin-bottom:10px;border-radius: 5px;padding: 0 15px\\\" class=remove-margin-responsive flex=100 flex-gt-sm=33><!-- <label class=\\\"status_bar_text\\\">IN REVIEW</label>\\r\\n <label class=\\\"status_bar_count\\\">{{vm.in_review_count}}</label> --><div flex=15 layout=row layout-align=\\\"start center\\\"><i style=\\\"color: black;font-size: 30px\\\" class=material-icons>assignment</i></div><div flex=70 layout=row layout-align=\\\"start center\\\" class=status_bar_text>IN REVIEW</div><div flex=15 class=status_bar_count layout=row layout-align=\\\"end center\\\">{{vm.in_review_count}}</div></div><div layout=row layout-align=\\\"space-around center\\\" style=\\\"height: 75px;background-color: #979797;margin-right: 15px;margin-bottom:10px;border-radius: 5px;padding: 0 15px\\\" class=remove-margin-responsive flex=100 flex-gt-sm=33><!-- <label class=\\\"status_bar_text\\\">OPEN REQUESTS</label>\\r\\n <label class=\\\"status_bar_count\\\">{{vm.open_status_count}}</label> --><div flex=15 layout=row layout-align=\\\"start center\\\"><i style=\\\"color: black;font-size: 30px\\\" class=material-icons>inbox</i></div><div flex=70 layout=row layout-align=\\\"start center\\\" class=status_bar_text>OPEN REQUESTS</div><div flex=15 class=status_bar_count layout=row layout-align=\\\"end center\\\">{{vm.open_status_count}}</div></div></div><div class=\\\"m-a-sm track-trace-results\\\"><div layout-gt-sm=row class=p-l-sm><h3 class=\\\"md-headline text-upper\\\" style=height:20px><span><md-button id=shipment-filter class=\\\"md-fab md-mini btn-collapse\\\" show-xs show-sm hide-gt-sm layout-align=\\\"end center\\\" aria-label=Open/Close ng-click=\\\"showList = ! showList\\\"><md-icon>{{!showList ? \\'\\' : \\'\\'}}</md-icon></md-button></span></h3><span flex=auto></span><div hide show-gt-sm><!-- the ng-click is just for a test right now --><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=vm.showExportCSV($event) ng-disabled=\\\"\\\">{{\\'TRACKTRACE.EXPORT\\' | translate}}</md-button><md-button ng-disabled=true class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false>{{\\'TRACKTRACE.CUSTOMIZE_RESULTS\\' | translate}}</md-button><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=\\\"supportRequestfiltersVisible = !supportRequestfiltersVisible\\\" analytics-on=click analytics-category=User analytics-event=TandT-Filter>{{\\'TRACKTRACE.FILTER\\' | translate}}</md-button></div><div ng-show=showList hide-gt-sm><!-- the ng-click is just for a test right now --><md-button id=export-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=vm.showExportCSV($event) style=margin-left:0px>{{\\'TRACKTRACE.EXPORT\\' | translate}}</md-button><md-button id=customize-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=\\\"\\\">{{\\'TRACKTRACE.CUSTOMIZE_RESULTS\\' | translate}}</md-button><md-button id=filter-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=\\\"vm.filtersVisible = !vm.filtersVisible\\\">{{\\'TRACKTRACE.FILTER\\' | translate}}</md-button></div></div><br hide-gt-sm><div layout-gt-sm=row><div class=supportRequestTabs ng-click=\\\"vm.support_requests_tab(\\'company_tickets\\')\\\" flex-gt-sm=33 flex-sm=1 flex-xs=1><span class=mainpage-icon><i class=material-icons ng-style=\\\"supportRequestTab != \\'company_tickets\\'?{ \\'color\\':\\'#1f3054\\' }:\\'\\'\\\"></i> </span><span class=mainpage-title ng-click=\\\"\\\">Company Requests</span><label class=mainpage-count>{{vm.total_company_tickets}}</label></div><div class=supportRequestTabs ng-click=\\\"vm.support_requests_tab(\\'account_tickets\\')\\\" flex-gt-sm=33 flex-sm=1 flex-xs=1><span class=mainpage-icon><i class=\\\"material-icons mainpage-icon-title\\\" ng-style=\\\"supportRequestTab != \\'account_tickets\\'?{ \\'color\\':\\'#1f3054\\' }:\\'\\'\\\"></i> </span><span class=mainpage-title ng-click=\\\"\\\">Account Creation</span><label class=mainpage-count>{{vm.total_account_tickets}}</label></div><div class=supportRequestTabs ng-click=\\\"vm.support_requests_tab(\\'general_tickets\\')\\\" flex-gt-sm=33 flex-sm=1 flex-xs=1><span class=mainpage-icon><i class=\\\"material-icons mainpage-icon-title\\\" ng-style=\\\"supportRequestTab != \\'general_tickets\\'?{ \\'color\\':\\'#1f3054\\' }:\\'\\'\\\"></i> </span><span class=mainpage-title ng-click=\\\"\\\">General Support</span><label class=mainpage-count>{{vm.total_general_tickets}}</label></div></div><!-- Server Table Inclusion --><div layout=row class=track-trace-table><div flex=100 ng-include=\\\"\\'/app/admin/support-requests/server-table/server-table.html\\'\\\" class=track-trace-table></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/admin/users/account-settings.html\",\"<md-card><form name=vm.formDetails novalidate class=light-form><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 layout=row class=md-flex><md-icon class=material-icons style=float:left>account_circle</md-icon><span translate=USER.ACCOUNT_DETAILS></span></h2><span flex=auto></span><div ng-include=\\\"\\'/app/admin/users/forms/action-buttons.html\\'\\\"></div><div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div></div></md-toolbar><md-card-content><div layout-gt-sm=row><div flex-gt-sm=45><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>First Name<span class=text-danger> *</span></label><input type=text ng-model=vm.user.first_name name=first-name></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>Last Name<span class=text-danger> *</span></label><input type=text ng-model=vm.user.last_name name=last-name></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><md-input-container class=\\\"md-block error-hidden m-b\\\"><label translate=USER.TITLE></label><input type=text ng-model=vm.user.title name=title></md-input-container></div><!--User group is not used at all--><!-- <div flex-gt-sm=\\\"48\\\" flex-offset-gt-sm=\\\"5\\\">\\r\\n <md-input-container class=\\\"md-block error-hidden m-b\\\">\\r\\n <label translate=\\\"USER.GROUP\\\"></label>\\r\\n <md-select\\r\\n ng-model=\\\"vm.user.group_ids\\\"\\r\\n aria-label=\\\"vm.user.group_ids\\\"\\r\\n md-on-open=\\\"vm.onSelectOpen()\\\"\\r\\n md-on-close=\\\"vm.onSelectClose()\\\"\\r\\n multiple=\\\"true\\\">\\r\\n <md-option ng-value=\\\"group.id\\\" ng-repeat=\\\"group in vm.groups\\\" multiple>{{ group.name }}</md-option>\\r\\n </md-select>\\r\\n </md-input-container>\\r\\n </div> --></div><div layout-gt-sm=row><div flex-gt-sm=45><md-input-container class=\\\"md-block error-hidden m-b\\\" flex-gt-sm md-is-error=\\\"vm.checkError(vm.formDetails, \\'email\\')\\\"><label>Email<span class=text-danger> *</span></label><input type=email ng-model=vm.user.email name=email ng-minlength=5 required><br><div ng-messages=vm.formDetails.email.$error><div ng-message=email><span translate=USER.ERROR_EMAIL></span></div><div ng-message=required><span translate=USER.EMAIL_REQUIRED></span></div><div ng-message=minlength><span translate=USER.EMAIL_MINLENGTH></span></div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden m-b\\\" flex-gt-sm md-is-error=\\\"vm.checkError(vm.formDetails, \\'phone\\')\\\"><md-icon></md-icon><label style=\\\"margin-bottom: 20px\\\" translate=USER.PHONE></label><input style=\\\"text-indent: 30px\\\" type=text ng-model=vm.user.phone name=phone ng-pattern=\\\"/^(\\\\(?\\\\+?[0-9]*\\\\)?)?[0-9_\\\\- \\\\(\\\\)]*$/\\\"><div ng-messages=vm.formDetails.phone.$error ng-hide=showHints><div ng-message=pattern>(###) ###-#### - Please enter a valid phone number.</div></div></md-input-container></div></div><!-- <div layout-gt-sm=\\\"row\\\">\\r\\n <div flex-gt-sm=\\\"45\\\">\\r\\n\\r\\n <md-input-container class=\\\"md-block error-hidden m-b\\\">\\r\\n <label translate=\\\"USER.GROUP\\\"></label>\\r\\n <md-select\\r\\n ng-model=\\\"vm.user.group_ids\\\"\\r\\n md-on-open=\\\"vm.onSelectOpen()\\\"\\r\\n md-on-close=\\\"vm.onSelectClose()\\\"\\r\\n multiple=\\\"true\\\">\\r\\n <md-option ng-value=\\\"group.id\\\" ng-repeat=\\\"group in vm.groups\\\" multiple>{{ group.name }}</md-option>\\r\\n </md-select>\\r\\n </md-input-container>\\r\\n\\r\\n </div>\\r\\n <div flex-gt-sm=\\\"48\\\" flex-offset-gt-sm=\\\"5\\\"></div>\\r\\n </div> --><!-- <hr> --><div layout-gt-sm=row><div flex-gt-sm=45><!-- <md-input-container class=\\\"md-block\\\" flex-gt-sm\\r\\n md-is-error=\\\"vm.checkError(vm.formDetails, \\'password\\')\\\">\\r\\n <label translate=\\\"USER.NEW_PASSWORD\\\"></label>\\r\\n <input data-ng-model=\\'vm.user.password\\'\\r\\n type=\\\"password\\\"\\r\\n name=\\'password\\'\\r\\n ng-minlength=\\\"8\\\">\\r\\n <div ng-messages=\\\"vm.formDetails.password.$error\\\">\\r\\n <div ng-message=\\\"required\\\"><span translate=\\\"USER.PASSWORD_REQUIRED\\\"></span></div>\\r\\n <div ng-message=\\\"minlength\\\"><span translate=\\\"USER.PASSWORD_MINLENGTH\\\"></span></div>\\r\\n <div ng-message=\\\"passwordVerify\\\"><span translate=\\\"USER.ERROR_PASSWORD_MATCH\\\"></span></div>\\r\\n </div>\\r\\n </md-input-container>\\r\\n\\r\\n </div>\\r\\n <div flex-gt-sm=\\\"48\\\" flex-offset-gt-sm=\\\"5\\\">\\r\\n <md-input-container class=\\\"md-block\\\" flex-gt-sm\\r\\n md-is-error=\\\"vm.checkError(vm.formDetails, \\'password_confirmation\\')\\\">\\r\\n <label translate=\\\"USER.CONFIRM_PASSWORD\\\"></label>\\r\\n <input ng-model=\\'vm.user.password_confirmation\\'\\r\\n type=\\\"password\\\"\\r\\n name=\\'password_confirmation\\'\\r\\n ng-required=\\\"vm.user.password\\\"\\r\\n data-password-verify=\\\"vm.user.password\\\">\\r\\n <div ng-messages=\\\"vm.formDetails.password_confirmation.$error\\\">\\r\\n <div ng-message=\\\"required\\\"><span translate=\\\"USER.PASSWORD_REQUIRED\\\"></span></div>\\r\\n <div ng-message=\\\"passwordVerify\\\"><span translate=\\\"USER.ERROR_PASSWORD_MATCH\\\"></span></div>\\r\\n </div>\\r\\n </md-input-container> --><div><span style=\\\"float: left;width: 70%;padding-top: 2px;text-indent: 5px;font-weight: 700\\\">AD User</span> <span ng-if=\\\"vm.user.is_ad_user && stateName == \\'showUser\\'\\\"><md-switch style=\\\"display: block;margin:0 !important\\\" ng-model=vm.switchTrue ng-disabled=\\\"vm.user.is_ad_user && stateName == \\'showUser\\'\\\"></md-switch></span><span ng-if=\\\"!vm.user.is_ad_user && stateName == \\'showUser\\'\\\"><md-switch style=\\\"display: block;margin:0 !important\\\" ng-model=vm.switchFalse ng-disabled=\\\"vm.user.is_ad_user && stateName == \\'showUser\\'\\\"></md-switch></span><span ng-if=\\\"stateName == \\'createUser\\'\\\"><md-switch style=\\\"display: block;margin:0 !important\\\" ng-model=vm.switchFalse></md-switch></span></div></div><div ng-if=\\\"vm.user.is_ad_user && !vm.user.synced_with_ad\\\" flex-gt-sm=48 flex-offset-gt-sm=5><span style=\\\"color: red\\\">* The AD user is not in sync, local edit has been applied.</span></div></div></md-card-content></form></md-card>\");\n$templateCache.put(\"/app/admin/users/bulk-edit.html\",\"<style type=text/css>.reskin-chip{\\r\\n cursor: default;\\r\\n border-radius: 16px;\\r\\n display: block;\\r\\n height: 32px;\\r\\n line-height: 32px;\\r\\n margin: 8px 8px 0 0;\\r\\n padding: 0 12px 0 12px;\\r\\n float: left;\\r\\n box-sizing: border-box;\\r\\n max-width: 100%;\\r\\n position: relative;\\r\\n background: rgb(224,224,224);\\r\\n color: rgb(66,66,66);\\r\\n font-family: Roboto, \\\"Helvetica Neue\\\", sans-serif;\\r\\n }\\r\\n .capitalize {\\r\\n text-transform: uppercase;\\r\\n}\\r\\n.md-checkbox-size-apperance{\\r\\n width: 12px;\\r\\n height: 12px;\\r\\n appearance: none;\\r\\n display: inline-block;\\r\\n border-radius: 5px;\\r\\n margin-bottom: 16px;\\r\\n padding-left: 3%;\\r\\n padding-right: 1%;\\r\\n }\\r\\n\\r\\n.space-customer-grid{\\r\\n margin-left: 2%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }\\r\\n .disable-class{\\r\\n\\r\\n }\\r\\n .enable-class{\\r\\n\\r\\n }\\r\\n .hide-class{\\r\\n visibility: hidden;\\r\\n }\\r\\n .show-class{\\r\\n visibility: none;\\r\\n }\\r\\n .disable-role-class{\\r\\n\\r\\n }\\r\\n .enable-role-class{\\r\\n }\\r\\n .md-checkbox-class{\\r\\n display: inline-block;margin: 0;\\r\\n }\\r\\n md-checkbox[disabled] .md-bar {\\r\\n background-color: #dbdbdb; /* set disabled bar color */\\r\\n }\\r\\n md-checkbox[disabled] .md-ink-ripple {\\r\\n background-color: #e7e7e7; /* not selected switch ripple color */\\r\\n }\\r\\n\\r\\n .md-card-div {\\r\\n background-color: #fff;\\r\\n border-radius: 5px;\\r\\n margin-bottom: 20px;\\r\\n padding-left: 3%;\\r\\n padding-right: 1%;\\r\\n min-height: 75px;\\r\\n }\\r\\n .md-card-div .heading {\\r\\n display: block;\\r\\n font-size: 1.17em;\\r\\n -webkit-margin-before: 1em;\\r\\n -webkit-margin-start: 0px;\\r\\n -webkit-margin-end: 0px;\\r\\n font-weight: bold;\\r\\n }\\r\\n .md-card-div md-input-container label {\\r\\n position: relative;\\r\\n }\\r\\n .approver-csl{\\r\\n position: absolute;width: 15px;\\r\\n height: 25px;border-bottom: 1px dotted #7d7d83;\\r\\n border-left: 1px dotted #7d7d83;\\r\\n top: -12px;left: 5px;\\r\\n }</style><cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2 class=md-display-1 translate=USER.BULK.EDIT></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/users class=parent-link><span translate=USER.USERS></span></a> / <span translate=USER.BULK.EDIT></span></span></div></div></div></div><md-card><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex><md-icon class=material-icons>settings</md-icon><span translate=USER.USERS></span></h2><span flex=auto></span> <span flex=0></span></div></md-toolbar><md-card-content class=\\\"loadmask-light loadmask-opaque\\\" loadmask=!vm.isLoading><form name=vm.bulkEditForm novalidate class=light-form><div layout-gt-sm=row><div flex-gt-sm=25><h4><span translate=USER.BULK.SELECTED></span>: <span>{{vm.users.length}}</span></h4><md-chips class=\\\"md-chips custom-chip round-border\\\" ng-model=vm.users md-on-remove=vm.chipRemoved($chip)><md-chip-template><span><strong><span translate={{$chip.email}}></span></strong> <span>{{$chip.searchField}}</span></span></md-chip-template></md-chips></div><div flex-gt-sm=5></div><div flex-gt-sm=70><h4 translate=USER.EDITABLE_FIELDS></h4><!--User group is not used at all--><!-- GROUPS --><!--\\r\\n <div layout=\\\"row\\\">\\r\\n <md-input-container\\r\\n flex=\\\"90\\\"\\r\\n class=\\\"md-block error-hidden m-b\\\"\\r\\n md-is-error=\\\"vm.checkError(vm.formDetails, \\'group_id\\')\\\">\\r\\n <label translate=\\\"USER.GROUP\\\"><span class=\\\"text-danger\\\"> *</span></label>\\r\\n <md-select\\r\\n ng-disabled=\\\"\\\"\\r\\n ng-model=\\\"vm.params.group_id\\\"\\r\\n name=\\\"group_id\\\"\\r\\n aria-label=\\\"Select Group\\\"\\r\\n md-on-open=\\\"vm.onSelectOpen()\\\"\\r\\n md-on-close=\\\"vm.onSelectClose()\\\">\\r\\n <md-option ng-value=\\\"group.id\\\"\\r\\n ng-repeat=\\\"group in vm.groups\\\"\\r\\n >\\r\\n {{ group.name }}\\r\\n </md-option>\\r\\n </md-select>\\r\\n <div ng-messages=\\\"vm.formDetails.group_id.$error\\\">\\r\\n <div ng-message=\\\"required\\\"><span translate=\\\"USER.GROUP_REQUIRED\\\"></span></div>\\r\\n </div>\\r\\n </md-input-container>\\r\\n </div>\\r\\n --><div layout=row><!-- <md-checkbox\\r\\n flex=\\\"10\\\"\\r\\n class=\\\"md-primary\\\"\\r\\n aria-label=\\\"Include Company\\\"\\r\\n ng-model=\\\"vm.include.company\\\"></md-checkbox> --><!-- <md-input-container\\r\\n flex=\\\"95\\\"\\r\\n class=\\\"md-block error-hidden m-b\\\"\\r\\n md-is-error=\\\"vm.checkError(vm.formDetails, \\'company_id\\')\\\">\\r\\n <label translate=\\\"USER.COMPANY\\\"><span class=\\\"text-danger\\\"> *</span></label>\\r\\n <md-select\\r\\n ng-disabled=\\\"!vm.include.company\\\"\\r\\n ng-model=\\\"vm.params.company_id\\\"\\r\\n ng-change=\\\"vm.isCompanySelected(vm.params.company_id)\\\"\\r\\n name=\\\"company_id\\\"\\r\\n aria-label=\\\"Select Company\\\"\\r\\n md-on-open=\\\"vm.onSelectOpen()\\\"\\r\\n md-on-close=\\\"vm.onSelectClose()\\\">\\r\\n <md-option ng-value=\\\"company.id\\\"\\r\\n ng-repeat=\\\"company in vm.companies\\\"\\r\\n >\\r\\n {{ company.name }}\\r\\n </md-option>\\r\\n </md-select>\\r\\n <div ng-messages=\\\"vm.formDetails.company_id.$error\\\">\\r\\n <div ng-message=\\\"required\\\"><span translate=\\\"USER.COMPANY_REQUIRED\\\"></span></div>\\r\\n </div>\\r\\n </md-input-container> --><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden m-b\\\" md-is-error=\\\"vm.checkError(vm.companyDetails, \\'company_id\\')\\\"><label>Company<span class=text-danger> *</span></label><md-select required style=\\\"margin-top: 19px\\\" ng-model=vm.params.company_id name=company_id aria-label=company_id ng-change=vm.onCompanyChange(vm.params.company_id) md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=company.id ng-repeat=\\\"company in vm.companies\\\">{{ company.name }}</md-option></md-select><div ng-messages=vm.companyDetails.company_id.$error><div ng-message=required><span translate=USER.COMPANY_REQUIRED></span></div></div></md-input-container></div><div layout=row><div ng-class=\\\"(vm.customerCheck == false) ? \\'disable-class\\' : \\'enable-class\\'\\\" flex=90 layout-align=\\\"\\\"><md-input-container style=\\\"padding: 0 15px\\\" class=\\\"md-block error-hidden\\\"><h4>Customer Type*    <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.customer_type_cehck>Customer Type is mandatory</span></h4><span style=\\\"margin-right: 60px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.cww_visibility ng-change=vm.cww_setup(vm.params.is_cww) aria-label=cww ng-model=vm.params.is_cww class=md-primary>CWW</md-checkbox></span><span style=\\\"margin-right: 60px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.csl_visibility ng-change=vm.csl_setup(vm.params.is_csl) aria-label=csl ng-model=vm.params.is_csl class=md-primary>CSL</md-checkbox></span><span style=\\\"margin-right: 60px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.cfs_visibility ng-change=vm.cfs_setup(vm.params.is_cfs) ng-model=vm.params.is_cfs class=md-primary aria-label=cfs>CFS</md-checkbox></span><span style=\\\"font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.cmts_visibility ng-change=vm.cmts_setup(vm.params.is_cmts) ng-model=vm.params.is_cmts class=md-primary aria-label=cmts>CMTS</md-checkbox></span></md-input-container></div></div><br><div id=cww-setup-box ng-if=vm.params.is_cww><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CWW SETTINGS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label>Department</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.department_ids_cww md-on-remove=\\\"vm.removeDepartments(vm.params.department_ids_cww,\\'CWW\\')\\\" md-on-add=\\\"vm.addDepartments(vm.params.department_ids_cww,\\'CWW\\')\\\" md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchs(\\'current_user_parties\\', searchText,vm.params.company_id, \\'CWW\\')\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label>Default Company Party ID\\'s / Group ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=party_id_names_exist_cww md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Default Department Party ID\\'s / Group ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=related_party_id_names_exist_cww md-require-match=true ng-attr-readonly=true md-separator-keys=vm.keys md-removable=false placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=45 class=uppercase><h4>Group/Party Id overrides</h4></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label class=md-input-container-label>Override Default Party ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.party_id_names_cww md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Override Default Group ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.related_party_id_names md-require-match=true md-separator-keys=vm.keys readonly placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Group ID\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'current_user_related_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label translate=ADMIN.PRIMARY_CONTACT></label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=vm.params.primary_contact_cww name=primary_contact aria-label=primary_contact md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts track by contact.id\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label translate=ADMIN.BCCS class=md-input-container-label></label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.default_bccs_cww md-require-match=!vm.canSetSuperAdmin() md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><br><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=50 style=\\\"margin: 15px 0\\\"><!-- <label style=\\\"font-weight: 700;\\\">RESKIN VALUE :     </label> --><br><span ng-if=vm.params.reskin_logo class=\\\"reskin-chip capitalize\\\">{{vm.params.reskin_logo}}</span></div><div flex-gt-sm=50 style=\\\"margin: 15px 0\\\"><div style=\\\"display: inline-block\\\"><label style=\\\"font-weight: 700\\\">Reskin :     </label><md-checkbox ng-model=vm.params.is_reskin ng-change=vm.changeReskin(vm.params.is_reskin) class=md-primary aria-label=is_reskin></md-checkbox></div><div ng-show=vm.params.is_reskin style=\\\"display: inline-block;position: relative;top: -5px\\\"><md-input-container style=\\\"margin:0;padding: 0\\\" class=\\\"md-block error-hidden m-b\\\"><md-select style=\\\"margin: 0px 0 0px 20px\\\" ng-disabled=vm.reskin_check ng-model=vm.params.reskin_type aria-label=vm.params.reskin_type><md-option value=default>Default</md-option><md-option value=magno>Magno</md-option></md-select></md-input-container></div></div></div></md-card-content></md-card></div><div id=csl-setup-box ng-if=vm.params.is_csl><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CSL SETTINGS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label>Department</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.department_ids_csl md-on-remove=\\\"vm.removeDepartments(vm.params.department_ids_csl,\\'CSL\\')\\\" md-on-add=\\\"vm.addDepartments(vm.params.department_ids_csl,\\'CSL\\')\\\" md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchs(\\'current_user_parties\\', searchText,vm.params.company_id,\\'CSL\\')\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label>Default Company Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=party_id_names_exist_csl md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Default Department Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=related_party_id_names_exist_csl md-require-match=true ng-attr-readonly=true md-separator-keys=vm.keys md-removable=false placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=45 class=uppercase><h4>Customer Id override</h4></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label class=md-input-container-label>Override Default Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.party_id_names_csl md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchCsl(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label translate=ADMIN.PRIMARY_CONTACT></label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=vm.params.primary_contact_csl name=primary_contact aria-label=primary_contact md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><!-- <md-option ng-selected=\\\"vm.params.default_primary_contact\\\" value=\\\"\\\"></md-option> --><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts track by contact.id\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label translate=ADMIN.BCCS class=md-input-container-label></label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.default_bccs_csl md-require-match=!vm.canSetSuperAdmin() md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></md-card-content></md-card></div><div id=cfs-setup-box ng-if=vm.params.is_cfs><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CFS SETTINGS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label>Department</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.department_ids_cfs md-on-remove=\\\"vm.removeDepartments(vm.params.department_ids_cfs,\\'CFS\\')\\\" md-on-add=\\\"vm.addDepartments(vm.params.department_ids_cfs,\\'CFS\\')\\\" md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchs(\\'current_user_parties\\', searchText,vm.params.company_id, \\'CFS\\')\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label>Default Company Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=party_id_names_exist_cfs md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Default Department Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=related_party_id_names_exist_cfs md-require-match=true ng-attr-readonly=true md-separator-keys=vm.keys md-removable=false placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=45 class=uppercase><h4>Customer Id override</h4></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label class=md-input-container-label>Override Default Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.party_id_names_cfs md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchCfs(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label translate=ADMIN.PRIMARY_CONTACT></label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=vm.params.primary_contact_cfs name=primary_contact aria-label=primary_contact md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><!-- <md-option ng-selected=\\\"vm.params.default_primary_contact\\\" value=\\\"\\\"></md-option> --><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts track by contact.id\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label translate=ADMIN.BCCS class=md-input-container-label></label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.default_bccs_cfs md-require-match=!vm.canSetSuperAdmin() md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></md-card-content></md-card></div><!--testing cmts--><div id=cmts-setup-box ng-if=vm.params.is_cmts><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CMTS SETTINGS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label>Department</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.department_ids_cmts md-on-remove=\\\"vm.removeDepartments(vm.params.department_ids_cmts,\\'CMTS\\')\\\" md-on-add=\\\"vm.addDepartments(vm.params.department_ids_cmts,\\'CMTS\\')\\\" md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchs(\\'current_user_parties\\', searchText,vm.params.company_id, \\'CMTS\\')\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label>Default Company Trading Partner ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=party_id_names_exist_cmts md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Default Department Trading Partner ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=related_party_id_names_exist_cmts md-require-match=true ng-attr-readonly=true md-separator-keys=vm.keys md-removable=false placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=45 class=uppercase><h4>Trading Partner ID override</h4></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label class=md-input-container-label>Override Default Trading Partner ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.party_id_names_cmts md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchCmts(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label translate=ADMIN.PRIMARY_CONTACT></label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=vm.params.primary_contact_cmts name=primary_contact aria-label=primary_contact md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><!-- <md-option ng-selected=\\\"vm.params.default_primary_contact\\\" value=\\\"\\\"></md-option> --><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts track by contact.id\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label translate=ADMIN.BCCS class=md-input-container-label></label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.params.default_bccs_cmts md-require-match=!vm.canSetSuperAdmin() md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></md-card-content></md-card></div><!--testing cmts--><md-card-content style=\\\"padding: 0 16px 0 0;margin-left: -3%\\\"><div layout-gt-sm=row class=\\\"fourth_column newchips\\\"><div flex-gt-sm=33 ng-class=\\\"(vm.cww_check == true || vm.cwwUserCheck == true) ? \\'disable-role-class\\' : \\'enable-role-class\\'\\\" class=md-card-div style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%;margin-left: -12%\\\" class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">CWW User Roles</label><md-select ng-model=vm.params.role aria-label=vm.params.role ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" ng-change=vm.onRoleChange() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles\\\">{{role.display}}</md-option></md-select></md-input-container></div><div flex-gt-sm=33 ng-class=\\\"(vm.csl_check == true) ? \\'disable-role-class\\' : \\'enable-role-class\\'\\\" class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=\\\"margin-bottom:0px;margin-left: -5%\\\" layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%;margin-left: -12%\\\" class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">CSL User Roles</label><md-select ng-model=vm.params.role_csl aria-label=vm.params.role_csl ng-disabled=vm.csl_check ng-change=vm.onRoleChangeCSL() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_csl\\\">{{role.display}}</md-option></md-select></md-input-container></div><div flex-gt-sm=33 ng-class=\\\"(vm.cfs_check == true) ? \\'disable-role-class\\' : \\'enable-role-class\\'\\\" class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=\\\"margin-bottom:0px;margin-left: -5%\\\" layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%;margin-left: -12%\\\" class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">CFS User Roles</label><md-select ng-model=vm.params.role_cfs aria-label=vm.params.role_cfs ng-disabled=vm.cfs_check ng-change=vm.onRoleChangeCFS() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_cfs\\\">{{role.display}}</md-option></md-select></md-input-container></div><div flex-gt-sm=33 ng-class=\\\"(vm.cmts_check == true) ? \\'disable-role-class\\' : \\'enable-role-class\\'\\\" class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=\\\"margin-bottom:0px;margin-left: -5%\\\" layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%;margin-left: -12%\\\" class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">CMTS User Roles</label><md-select ng-model=vm.params.role_cmts aria-label=vm.params.role_cmts ng-disabled=vm.cmts_check ng-change=vm.onRoleChangeCMTS() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_cmts\\\">{{role.display}}</md-option></md-select></md-input-container></div></div><br><div ng-if=vm.classicDivCheck layout-gt-sm=row class=\\\"fourth_column newchips\\\"><div flex-gt-sm=33 ng-class=\\\"(vm.cww_check == true) ? \\'disable-role-class\\' : \\'enable-role-class\\'\\\" class=md-card-div style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%;margin-left: -12%\\\" class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">Pathway User Roles</label><md-select ng-model=vm.params.role_classic aria-label=vm.params.role_classic ng-disabled=vm.cww_check ng-change=vm.onRoleChangeClassic() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_classic\\\">{{role.display}}</md-option></md-select></md-input-container></div><div flex-gt-sm=33 class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"></md-input-container></div><div flex-gt-sm=33 class=space-customer-grid flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"></md-input-container></div></div><br></md-card-content><md-card-content style=\\\"padding: 0px\\\"><div layout=column layout-gt-sm=row layout-wrap><div layout=column layout-gt-sm=row flex=100><div flex=50 flex-md=50 flex-gt-md=25><div style=\\\"margin-left: 10px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">Admin settings</h5><div layout=row style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div flex=50></div><div flex=50><span class=md-checkbox-class>CWW</span> <span style=\\\"display: inline-block;margin: 0 6px\\\">CSL</span> <span style=\\\"display: inline-block;margin: 0 6px\\\">CFS</span> <span class=md-checkbox-class style=\\\"margin: 0 0px\\\">CMTS</span></div></div><div layout=row><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">Super Admin</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Admin\\'][\\'options\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Admin\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Admin\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Admin\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">Company Admin</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'Group\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">Group</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Group\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Group\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Group\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'LensGroup\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions,option.name)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'LensGroup\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions,option.name)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'LensGroup\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions,option.name)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'LensGroup\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions,option.name)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'Spotlight\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px\\\">Manage Spotlight</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Spotlight\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Spotlight\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Spotlight\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'User\\'].options track by $index\\\"><div flex=50 ng-if=\\\"[\\'demo\\'].includes(option.group[0])\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 ng-if=\\\"[\\'demo\\'].includes(option.group[0])\\\" style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_csl\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cfs\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cmts\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'SupportRequestAdmin\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'CviewClassicAdmin\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox></div></div></div></div><div flex=50 flex-md=50 flex-gt-md=25><div style=\\\"margin-left: 10px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">User Management</h5><div layout=row style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div flex=50></div><div flex=50><span class=md-checkbox-class>CWW</span> <span style=\\\"display: inline-block;margin: 0 6px\\\">CSL</span> <span style=\\\"display: inline-block;margin: 0 6px\\\">CFS</span> <span class=md-checkbox-class>CMTS</span></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'User\\'].options track by $index\\\"><div flex=50 ng-if=\\\"![\\'lensmode\\',\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\', \\'demo\\'].includes(option.group[0])\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\" ng-if=\\\"![\\'lensmode\\',\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\', \\'demo\\'].includes(option.group[0])\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'User\\'].options track by $index\\\"><div flex=50 ng-if=\\\"![\\'manage\\',\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\', \\'demo\\'].includes(option.group[0])\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\" ng-if=\\\"![\\'manage\\',\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\', \\'demo\\'].includes(option.group[0])\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_csl\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cfs\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cmts\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'Company\\'].options track by $index\\\"><div flex=50 ng-if=\\\"option.name !=\\'Admin\\' && option.name !=\\'Read Only Access\\'\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\" ng-if=\\\"option.name !=\\'Admin\\' && option.name !=\\'Read Only Access\\'\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_csl\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cfs\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cmts\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div></div><div style=\\\"margin-left: 10px\\\" layout=row ng-repeat=\\\"option in vm.permissions[\\'Shipment\\'].options track by $index\\\"><div flex=50 ng-if=\\\"option.name !=\\'T&T Export\\' && option.name !=\\'Financial\\'\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name == \\\"View\\\" ? \\\"Shipment View\\\" : option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\" ng-if=\\\"option.name !=\\'T&T Export\\' && option.name !=\\'Financial\\'\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Load\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Load\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Load\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div style=\\\"margin-left: 10px\\\" layout=row ng-repeat=\\\"option in vm.permissions[\\'Shipment\\'].options track by $index\\\"><div flex=50 ng-if=\\\"option.name !=\\'View\\' && option.name !=\\'Financial\\'\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name == \\\"View\\\" ? \\\"Shipment View\\\" : option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\" ng-if=\\\"option.name !=\\'View\\' && option.name !=\\'Financial\\'\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_csl\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_cfs\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_cmts\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div style=\\\"margin-left: 10px\\\" layout=row ng-repeat=\\\"option in vm.permissions[\\'Shipment\\'].options track by $index\\\"><div flex=50 ng-if=\\\"option.name !=\\'T&T Export\\' && option.name !=\\'View\\'\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name == \\\"View\\\" ? \\\"Shipment View\\\" : option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\" ng-if=\\\"option.name !=\\'T&T Export\\' && option.name !=\\'View\\'\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_csl\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_cfs\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_cmts\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div style=\\\"margin-left: 10px\\\" layout=row ng-repeat=\\\"option in vm.permissions[\\'SupportRequestUser\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox></div></div><div style=\\\"margin-left: 10px\\\" layout=row ng-repeat=\\\"option in vm.permissions[\\'SupportRequestValidator\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox></div></div></div></div><div layout=column layout-gt-sm=row flex=100><div flex=50 flex-md=50 flex-gt-md=25><div style=\\\"margin-left: 10px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">Company</h5><div layout=row style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div flex=50></div><div flex=50><span class=md-checkbox-class>CWW</span> <span style=\\\"display: inline-block;margin: 0 6px\\\">CSL</span> <span style=\\\"display: inline-block;margin: 0 6px\\\">CFS</span> <span class=md-checkbox-class>CMTS</span></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'Company\\'].options track by $index\\\" ng-if=\\\"option.name !=\\'Admin\\' && option.name !=\\'Access Company Lens Data\\'\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_csl\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cfs\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cmts\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div></div><div style=\\\"margin-left: 10px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">EXCEPTIONS</h5><div layout=row style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div flex=50></div><div flex=50><div layout=row style=\\\"margin-left: 3%\\\"><span flex=50>CSL</span> <span flex=50 style=\\\"margin-left: -31%\\\">CFS</span> <span flex=50 style=\\\"margin-left: -32%\\\">CMTS</span></div></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'CslException\\'].options_csl track by $index\\\"><div flex=50 style=\\\"position: relative;text-indent: 25px\\\" ng-if=\\\"option.name == \\'All Clients\\' && option.name != \\'Create Only\\'\\\"><div class=approver-csl></div><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 ng-if=\\\"option.name != \\'All Clients\\' && option.name != \\'Create Only\\'\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=15 style=\\\"margin-left: 21%\\\"><md-checkbox ng-if=\\\"option.name == \\'All Clients\\' && option.name != \\'Create Only\\'\\\" ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=\\\"vm.onPermissionsChangeCSL(vm.permissions);vm.changeCslAllClients(ev,option.value,\\'CLS\\')\\\"></md-checkbox><md-checkbox ng-if=\\\"option.name != \\'All Clients\\' && option.name != \\'Create Only\\'\\\" ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox></div><div flex=15 style=\\\"margin-left: 10%\\\"><md-checkbox ng-if=\\\"vm.permissions[\\'CslException\\'].options_cfs !== undefined && vm.permissions[\\'CslException\\'].options_cfs[$index].name == \\'All Clients\\' && vm.permissions[\\'CslException\\'].options_cfs[$index].name != \\'Create Only\\'\\\" ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'CslException\\'].options_cfs[$index].value\\\" ng-change=\\\"vm.onPermissionsChangeCFS(vm.permissions);vm.changeCslAllClients(ev,vm.permissions[\\'CslException\\'].options_cfs[$index].value,\\'CFS\\')\\\" style=margin-left:-100%></md-checkbox><md-checkbox ng-if=\\\"vm.permissions[\\'CslException\\'].options_cfs !== undefined && vm.permissions[\\'CslException\\'].options_cfs[$index].name != \\'All Clients\\' && vm.permissions[\\'CslException\\'].options_cfs[$index].name != \\'Create Only\\'\\\" ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'CslException\\'].options_cfs[$index].value\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions) style=margin-left:-100%></md-checkbox></div><div flex=15 style=\\\"margin-left: 10%\\\"><md-checkbox ng-if=\\\"vm.permissions[\\'CslException\\'].options_cmts !== undefined && vm.permissions[\\'CslException\\'].options_cmts[$index].name == \\'All Clients\\' && vm.permissions[\\'CslException\\'].options_cmts[$index].name != \\'Create Only\\'\\\" ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'CslException\\'].options_cmts[$index].value\\\" ng-change=\\\"vm.onPermissionsChangeCMTS(vm.permissions);vm.changeCslAllClients(ev,vm.permissions[\\'CslException\\'].options_cmts[$index].value,\\'CMTS\\')\\\" style=margin-left:-200%></md-checkbox><md-checkbox ng-if=\\\"vm.permissions[\\'CslException\\'].options_cmts !== undefined && vm.permissions[\\'CslException\\'].options_cmts[$index].name != \\'All Clients\\' && vm.permissions[\\'CslException\\'].options_cmts[$index].name != \\'Create Only\\'\\\" ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'CslException\\'].options_cmts[$index].value\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions) style=margin-left:-200%></md-checkbox></div></div></div></div><div flex=50 flex-md=50 flex-gt-md=25><div style=\\\"margin-left: 10px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">POTENTIAL EXCEPTIONS</h5><div layout=row style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div flex=50></div><div flex=50><span class=md-checkbox-class>CWW</span></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'PotentialException\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50 style=\\\"margin-left: 5%\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox></div></div></div></div></div><!-- C-View Classic settings layout Hide in Mobile --><div ng-if=vm.classicDivCheck flex=50 flex-gt-sm=100><h5 class=uppercase style=\\\"color: rgb(55, 153, 175);margin-left: 10px\\\">Pathway Settings</h5><div layout=row layout-align=\\\"center center\\\" style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div class=md-checkbox-class>CWW</div></div><div ng-repeat=\\\"option in vm.permissions[\\'User\\'].options_classic track by $index\\\" style=\\\"float:left;width:25%;min-width: 200px\\\"><div ng-if=\\\"[\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\'].includes(option.group[0])\\\"><div style=\\\"margin-left: 10px\\\" class=grid-view><span style=\\\"float: left;width: 70%;padding-top: 2px;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span><md-checkbox ng-disabled=true class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChangeClassic(vm.permissions)></md-checkbox></div></div></div></div></div><br><br></md-card-content></div></div><!-- End Layout --><div layout=row><md-button layout-align=start class=\\\"md-raised btn-block-xs\\\" ng-click=vm.cancel() aria-label=Cancel class=\\\"btn btn-default\\\"><span translate=ADMIN.POTENTIAL.CANCEL></span></md-button><span flex=auto></span><md-button layout-align=end class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.save() ng-disabled=\\\"vm.isLoad.account || vm.users.length == 0\\\" aria-label=Submit type=submit class=\\\"btn btn-default\\\"><span translate=USER.SAVE></span></md-button></div></form></md-card-content></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/admin/users/company-settings-new.html\",\"<style type=text/css>.reskin-chip{\\r\\n cursor: default;\\r\\n border-radius: 16px;\\r\\n display: block;\\r\\n height: 32px;\\r\\n line-height: 32px;\\r\\n margin: 8px 8px 0 0;\\r\\n padding: 0 12px 0 12px;\\r\\n float: left;\\r\\n box-sizing: border-box;\\r\\n max-width: 100%;\\r\\n position: relative;\\r\\n background: rgb(224,224,224);\\r\\n color: rgb(66,66,66);\\r\\n font-family: Roboto, \\\"Helvetica Neue\\\", sans-serif;\\r\\n }\\r\\n .capitalize {\\r\\n text-transform: uppercase;\\r\\n}\\r\\n.space-customer-grid{\\r\\n margin-left: -2.4%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }\\r\\n\\r\\n .hide-class{\\r\\n visibility: hidden;\\r\\n }\\r\\n .show-class{\\r\\n visibility: none;\\r\\n }\\r\\n .md-checkbox-size{\\r\\n width: 12px;\\r\\n height: 12px;\\r\\n }</style><md-card id=company_details><form name=vm.companyDetails novalidate class=light-form><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons></md-icon><span class=uppercase>Company Settings</span></h2><span flex=auto></span><div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div></div></md-toolbar><md-card-content><div layout-gt-sm=row class=\\\"fourth_column newchips\\\"><div flex-gt-sm=45 class=md-card-div style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden m-b\\\" md-is-error=\\\"vm.checkError(vm.companyDetails, \\'company_id\\')\\\"><label>Company<span class=text-danger> *</span></label><md-select required style=\\\"margin-top: 19px\\\" ng-model=vm.user.company_id name=company_id aria-label=company_id ng-change=vm.onCompanyChange(vm.user.company_id) md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=company.id ng-repeat=\\\"company in vm.companies\\\">{{ company.name }}</md-option></md-select><div ng-messages=vm.companyDetails.company_id.$error><div ng-message=required><span translate=USER.COMPANY_REQUIRED></span></div></div></md-input-container></div><div ng-class=\\\"(vm.customerCheck == false) ? \\'disable-class\\' : \\'enable-class\\'\\\" flex-gt-sm=48 class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><h4>Customer Type*    <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.customer_type_cehck>Customer Type is mandatory</span></h4><span style=\\\"margin-right: 60px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.cww_visibility ng-change=vm.cww_setup(vm.user.is_cww) ng-model=vm.user.is_cww aria-label=cww class=\\\"md-primary md-checkbox-size\\\">CWW</md-checkbox></span><span style=\\\"margin-right: 60px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.csl_visibility ng-change=vm.csl_setup(vm.user.is_csl) ng-model=vm.user.is_csl aria-label=csl class=\\\"md-primary md-checkbox-size\\\">CSL</md-checkbox></span><span style=\\\"margin-right: 60px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.cfs_visibility ng-change=vm.cfs_setup(vm.user.is_cfs) ng-model=vm.user.is_cfs aria-label=cfs class=\\\"md-primary md-checkbox-size\\\">CFS</md-checkbox></span><span style=\\\"font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.cmts_visibility ng-change=vm.cmts_setup(vm.user.is_cmts) ng-model=vm.user.is_cmts aria-label=cmts class=\\\"md-primary md-checkbox-size\\\">CMTS</md-checkbox></span></md-input-container></div></div><br><div id=cww-setup-box ng-if=vm.user.is_cww><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CWW SETTINGS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label>Department</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.department_ids_cww md-on-remove=\\\"vm.removeDepartments(vm.user.department_ids_cww,\\'CWW\\')\\\" md-on-add=\\\"vm.addDepartments(vm.user.department_ids_cww,\\'CWW\\')\\\" md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchs(\\'current_user_parties\\', searchText,vm.user.company_id, \\'CWW\\')\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label>Default Company Party ID\\'s / Group ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=party_id_names_exist_cww md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Default Department Party ID\\'s / Group ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=related_party_id_names_exist_cww md-require-match=true ng-attr-readonly=true md-separator-keys=vm.keys md-removable=false placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=45 class=uppercase><h4>Group/Party Id overrides</h4></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label class=md-input-container-label>Override Default Party ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.party_id_names_cww md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Override Default Group ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.related_party_id_names md-require-match=true md-separator-keys=vm.keys readonly placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Group ID\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'current_user_related_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label translate=ADMIN.PRIMARY_CONTACT></label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=vm.user.primary_contact_cww name=primary_contact aria-label=primary_contact md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts track by contact.id\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label translate=ADMIN.BCCS class=md-input-container-label></label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.default_bccs_cww md-require-match=!vm.canSetSuperAdmin() md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><br><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=50 style=\\\"margin: 15px 0\\\"><label style=\\\"font-weight: 700\\\">RESKIN VALUE :     </label><br><span ng-if=vm.user.reskin_logo class=\\\"reskin-chip capitalize\\\">{{vm.user.reskin_logo}}</span></div><div flex-gt-sm=50 style=\\\"margin: 15px 0\\\"><div style=\\\"display: inline-block\\\"><label style=\\\"font-weight: 700\\\">Reskin :             </label><md-checkbox style=\\\"margin-left: 1px\\\" ng-model=vm.user.is_reskin ng-change=vm.changeReskin(vm.user.is_reskin) aria-label=is_reskin class=md-primary></md-checkbox></div><div ng-show=vm.user.is_reskin style=\\\"display: inline-block;position: relative;top: -5px\\\"><md-input-container style=\\\"margin:0;padding: 0\\\" class=\\\"md-block error-hidden m-b\\\"><md-select style=\\\"margin: 0px 0 0px 20px\\\" ng-disabled=vm.reskin_check ng-model=vm.user.reskin_type aria-label=vm.user.reskin_type><md-option value=default>Default</md-option><md-option value=magno>Magno</md-option></md-select></md-input-container></div><br><br><div ng-show=vm.discussion_visibility style=\\\"display: inline-block\\\"><label style=\\\"font-weight: 700\\\">Discussion :      </label><md-checkbox ng-model=vm.user.is_discussion aria-label=is_discussion class=md-primary></md-checkbox></div><br><br><div style=\\\"display: inline-block; margin: 5px 0\\\"><label style=\\\"font-weight: 700\\\">View Air Shipments :      </label><md-checkbox ng-model=vm.user.view_air_shipments_cww aria-label=view_air_shipments_cww class=md-primary></md-checkbox></div><br><div style=\\\"display: inline-block; margin: 5px 0\\\"><label style=\\\"font-weight: 700\\\">View Ground Shipments :      </label><md-checkbox ng-model=vm.user.view_ground_shipments_cww aria-label=view_ground_shipments_cww class=md-primary></md-checkbox></div><br><div style=\\\"display: inline-block; margin: 5px 0\\\"><label style=\\\"font-weight: 700\\\">View Sea Shipments :      </label><md-checkbox ng-model=vm.user.view_sea_shipments_cww aria-label=view_sea_shipments_cww class=md-primary></md-checkbox></div></div></div></md-card-content></md-card></div><div id=csl-setup-box ng-if=vm.user.is_csl><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CSL SETTINGS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label>Department</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.department_ids_csl md-on-remove=\\\"vm.removeDepartments(vm.user.department_ids_csl,\\'CSL\\')\\\" md-on-add=\\\"vm.addDepartments(vm.user.department_ids_csl,\\'CSL\\')\\\" md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchs(\\'current_user_parties\\', searchText,vm.user.company_id,\\'CSL\\')\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label>Default Company Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=party_id_names_exist_csl md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Default Department Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=related_party_id_names_exist_csl md-require-match=true ng-attr-readonly=true md-separator-keys=vm.keys md-removable=false placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=45 class=uppercase><h4>Customer Id override</h4></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label class=md-input-container-label>Override Default Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.party_id_names_csl md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchCsl(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label translate=ADMIN.PRIMARY_CONTACT></label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=vm.user.primary_contact_csl name=primary_contact aria-label=primary_contact md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><!-- <md-option ng-selected=\\\"vm.user.default_primary_contact\\\" value=\\\"\\\"></md-option> --><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts track by contact.id\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label translate=ADMIN.BCCS class=md-input-container-label></label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.default_bccs_csl md-require-match=!vm.canSetSuperAdmin() md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=50 style=\\\"margin: 15px 0\\\"></div><!-- <div flex-gt-sm=\\\"50\\\" style=\\\"margin: 15px 0;\\\">\\r\\n <div ng-show=\\\"vm.discussion_visibility_csl\\\" style=\\\"display: inline-block;\\\">\\r\\n <label style=\\\"font-weight: 700;\\\">Discussion :      </label>\\r\\n <md-checkbox ng-model=\\\"vm.user.is_discussion_csl\\\" class=\\\"md-primary\\\">\\r\\n </md-checkbox>\\r\\n </div>\\r\\n\\r\\n </div> --></div></md-card-content></md-card></div><div id=cfs-setup-box ng-if=vm.user.is_cfs><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CFS SETTINGS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label>Department</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.department_ids_cfs md-on-remove=\\\"vm.removeDepartments(vm.user.department_ids_cfs,\\'CFS\\')\\\" md-on-add=\\\"vm.addDepartments(vm.user.department_ids_cfs,\\'CFS\\')\\\" md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchs(\\'current_user_parties\\', searchText,vm.user.company_id, \\'CFS\\')\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label>Default Company Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=party_id_names_exist_cfs md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Default Department Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=related_party_id_names_exist_cfs md-require-match=true ng-attr-readonly=true md-separator-keys=vm.keys md-removable=false placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=45 class=uppercase><h4>Customer Id override</h4></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label class=md-input-container-label>Override Default Customer ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.party_id_names_cfs md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchCfs(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label translate=ADMIN.PRIMARY_CONTACT></label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=vm.user.primary_contact_cfs aria-label=primary_contact name=primary_contact md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><!-- <md-option ng-selected=\\\"vm.user.default_primary_contact\\\" value=\\\"\\\"></md-option> --><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts track by contact.id\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label translate=ADMIN.BCCS class=md-input-container-label></label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.default_bccs_cfs md-require-match=!vm.canSetSuperAdmin() md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=50 style=\\\"margin: 15px 0\\\"></div><!-- <div flex-gt-sm=\\\"50\\\" style=\\\"margin: 15px 0;\\\">\\r\\n <div ng-show=\\\"vm.discussion_visibility_cfs\\\" style=\\\"display: inline-block;\\\">\\r\\n <label style=\\\"font-weight: 700;\\\">Discussion :      </label>\\r\\n <md-checkbox ng-model=\\\"vm.user.is_discussion_cfs\\\" class=\\\"md-primary\\\">\\r\\n </md-checkbox>\\r\\n </div>\\r\\n\\r\\n </div> --></div></md-card-content></md-card></div><div id=cmts-setup-box ng-if=vm.user.is_cmts><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CMTS SETTINGS</span></h2><!--<span flex=\\\"auto\\\"></span>--></div></md-toolbar><md-card-content><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45></div><!-- Change from here cfs to cmts--><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label>Department</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.department_ids_cmts md-on-remove=\\\"vm.removeDepartments(vm.user.department_ids_cmts,\\'CMTS\\')\\\" md-on-add=\\\"vm.addDepartments(vm.user.department_ids_cmts,\\'CMTS\\')\\\" md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchs(\\'current_user_parties\\', searchText,vm.user.company_id, \\'CMTS\\')\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label>Default Company Trading Partner ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=party_id_names_exist_cmts md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Default Department Trading Partner ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=related_party_id_names_exist_cmts md-require-match=true ng-attr-readonly=true md-separator-keys=vm.keys md-removable=false placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=45 class=uppercase><h4>Trading Partner ID override</h4></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label class=md-input-container-label>Override Default Trading Partner ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.party_id_names_cmts md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchCmts(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label translate=ADMIN.PRIMARY_CONTACT></label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=vm.user.primary_contact_cmts aria-label=primary_contact name=primary_contact md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><!-- <md-option ng-selected=\\\"vm.user.default_primary_contact\\\" value=\\\"\\\"></md-option> --><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts track by contact.id\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label translate=ADMIN.BCCS class=md-input-container-label></label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.default_bccs_cmts md-require-match=!vm.canSetSuperAdmin() md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=50 style=\\\"margin: 15px 0\\\"></div></div></md-card-content></md-card></div></md-card-content></form></md-card>\");\n$templateCache.put(\"/app/admin/users/company-settings.html\",\"<style type=text/css>.reskin-chip{\\r\\n cursor: default;\\r\\n border-radius: 16px;\\r\\n display: block;\\r\\n height: 32px;\\r\\n line-height: 32px;\\r\\n margin: 8px 8px 0 0;\\r\\n padding: 0 12px 0 12px;\\r\\n float: left;\\r\\n box-sizing: border-box;\\r\\n max-width: 100%;\\r\\n position: relative;\\r\\n background: rgb(224,224,224);\\r\\n color: rgb(66,66,66);\\r\\n font-family: Roboto, \\\"Helvetica Neue\\\", sans-serif;\\r\\n }\\r\\n .capitalize {\\r\\n text-transform: uppercase;\\r\\n}</style><md-card><form name=vm.companyDetails novalidate class=light-form><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons></md-icon><span class=uppercase>Company Settings</span></h2><span flex=auto></span><div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><md-input-container class=\\\"md-block error-hidden m-b\\\" md-is-error=\\\"vm.checkError(vm.companyDetails, \\'company_id\\')\\\"><label translate=USER.COMPANY><span class=text-danger>*</span></label><md-select required style=\\\"margin-top: 19px\\\" ng-model=vm.user.company_id name=company_id aria-label=company_id ng-change=vm.onCompanyChange(vm.user.company_id) md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=company.id ng-repeat=\\\"company in vm.companies\\\">{{ company.name }}</md-option></md-select><div ng-messages=vm.companyDetails.company_id.$error><div ng-message=required><span translate=USER.COMPANY_REQUIRED></span></div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label>Department</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.department_ids md-on-remove=vm.removeDepartments(vm.user.department_ids) md-on-add=vm.addDepartments(vm.user.department_ids) md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatchs(\\'current_user_parties\\', searchText,vm.user.company_id)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label>Default Company Party ID\\'s / Group ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=party_id_names_exist md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"><!-- <md-autocomplete md-selected-item=\\\"selectedItem\\\"\\r\\n md-delay=\\\"300\\\"\\r\\n ng-disabled=\\\"!vm.canSetPermissions()\\\"\\r\\n md-search-text=\\\"searchText\\\"\\r\\n md-items=\\\"item in vm.getMatch(\\'current_user_parties\\', searchText)\\\"\\r\\n md-item-text=\\\"item\\\">\\r\\n <md-item-template>\\r\\n <span md-highlight-text=\\\"searchText\\\">{{item}}</span>\\r\\n </md-item-template>\\r\\n <md-not-found>\\r\\n No matches found.\\r\\n </md-not-found>\\r\\n </md-autocomplete> --></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Default Department Party ID\\'s / Group ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=related_party_id_names_exist md-require-match=true ng-attr-readonly=true md-separator-keys=vm.keys md-removable=false placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"><!-- <md-autocomplete md-selected-item=\\\"selectedItem\\\"\\r\\n md-delay=\\\"300\\\"\\r\\n ng-disabled=\\\"!vm.canSetPermissions()\\\"\\r\\n md-search-text=\\\"searchText\\\"\\r\\n md-items=\\\"item in vm.getMatch(\\'current_user_related_parties\\', searchText)\\\"\\r\\n md-item-text=\\\"item\\\">\\r\\n <md-item-template>\\r\\n <span md-highlight-text=\\\"searchText\\\">{{item}}</span>\\r\\n </md-item-template>\\r\\n <md-not-found>\\r\\n No matches found.\\r\\n </md-not-found>\\r\\n </md-autocomplete> --></md-chips></md-input-container></div></div><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=45 class=uppercase><h4>Group/Party Id overrides</h4></div><div flex-gt-sm=48 flex-offset-gt-sm=5></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><label class=md-input-container-label>Override Default Party ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.party_id_names md-require-match=true readonly md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label class=md-input-container-label>Override Default Group ID\\'s</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.related_party_id_names md-require-match=true md-separator-keys=vm.keys readonly placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Enter a Party Group ID\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'current_user_related_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=45><label class=md-input-container-label translate=ADMIN.PRIMARY_CONTACT></label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=vm.user.contact.primary_contact name=primary_contact aria-label=primary_contact md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-selected=vm.user.default_primary_contact value=\\\"\\\"></md-option><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts track by contact.id\\\" ng-selected=\\\"vm.user.contact.primary_contact == contact.id && !vm.user.default_primary_contact\\\">{{ contact.email }}</md-option></md-select><!-- <span >test {{vm.user.contact.primary_contact}}</span> --><!-- <small><span translate=\\\"ADMIN.DEFAULT_BLANK\\\"></span> {{ vm.getDefaultContact() }}</small> --></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><label translate=ADMIN.BCCS class=md-input-container-label></label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.user.bccs.values md-require-match=!vm.canSetSuperAdmin() md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=!vm.canSetPermissions() md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><!-- <small><span translate=\\\"ADMIN.DEFAULT_BLANK\\\"></span> {{ vm.getDefaultBCCs() }}</small> --></md-input-container></div></div><br><hr style=\\\"border-color: #e8e8e8\\\"><div layout-gt-sm=row><div flex-gt-sm=50 style=\\\"margin: 15px 0\\\"><label style=\\\"font-weight: 700\\\">RESKIN VALUE :     </label><br><span ng-if=vm.user.reskin_logo class=\\\"reskin-chip capitalize\\\">{{vm.user.reskin_logo}}</span></div><!-- ng-change=\\\"vm.onReskinChange(vm.user.company_reskin_type)\\\" --><!-- <div flex-gt-sm=\\\"50\\\" style=\\\"margin: 15px 0;\\\">\\r\\n <label style=\\\"font-weight: 700;\\\">Reskin Override :     </label>\\r\\n <md-checkbox ng-model=\\\"vm.user.is_reskin_company\\\" ng-change=\\\"vm.changeReskin(vm.user.is_reskin_company)\\\" class=\\\"md-primary\\\">\\r\\n </md-checkbox>     \\r\\n <md-input-container ng-show=\\\"vm.user.is_reskin_company\\\" style=\\\"margin: 40px 0;bottom: 7px;\\\">\\r\\n <md-select\\r\\n ng-disabled = \\\"vm.reskin_check\\\"\\r\\n ng-model=\\\"vm.user.company_reskin_type\\\">\\r\\n <md-option value=\\\"default\\\">Default</md-option>\\r\\n <md-option value=\\\"magno\\\">Magno</md-option>\\r\\n </md-select>\\r\\n </md-input-container>\\r\\n </span>\\r\\n </div> --><div flex-gt-sm=50 style=\\\"margin: 15px 0\\\"><div style=\\\"display: inline-block\\\"><label style=\\\"font-weight: 700\\\">Reskin :     </label><md-checkbox ng-model=vm.user.is_reskin_company ng-change=vm.changeReskin(vm.user.is_reskin_company) aria-label=is_reskin_company class=md-primary></md-checkbox></div><div ng-show=vm.user.is_reskin_company style=\\\"display: inline-block;position: relative;top: -5px\\\"><md-input-container style=\\\"margin:0;padding: 0\\\" class=\\\"md-block error-hidden m-b\\\"><md-select style=\\\"margin: 0px 0 0px 20px\\\" ng-disabled=vm.reskin_check ng-model=vm.user.company_reskin_type aria-label=vm.user.company_reskin_type><md-option value=default>Default</md-option><md-option value=magno>Magno</md-option></md-select></md-input-container></div></div></div></md-card-content></form></md-card>\");\n$templateCache.put(\"/app/admin/users/contact-settings.html\",\"<!--CONTACT SETTINGS CARD --><md-card><form name=vm.formSettings novalidate class=light-form ng-if=vm.canSetIsCraneContact()><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex><md-icon class=material-icons>contacts</md-icon><span translate=USER.CONTACT_SETTINGS></span></h2><span flex=auto></span><div><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=vm.resetPrimary()><div layout=row flex=auto><p flex=auto><span translate=USER.RESET_PRIMARY></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-click=vm.resetBCCS()><div layout=row flex=auto><p flex=auto><span translate=USER.RESET_BCCS></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-click=vm.resetAll()><div layout=row flex=auto><p flex=auto><span translate=USER.RESET_ALL></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></div></md-toolbar><md-card-content><div layout-gt-sm=row><div flex-gt-sm=40><!-- <md-input-container class=\\\"md-block\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.user.is_crane_contact\\\">\\r\\n <span translate=\\\"USER.IS_CRANE_CONTACT\\\"></span>\\r\\n </md-checkbox>\\r\\n </md-input-container> --><div><span style=\\\"float: left;width: 70%;padding-top: 2px; font-weight: 700\\\" translate=USER.IS_CRANE_CONTACT></span><md-switch ng-model=vm.user.is_crane_contact></md-switch></div></div><!-- <div flex-gt-sm=\\\"10\\\">\\r\\n <div flex=\\\"auto\\\" flex-offset-gt-sm=\\\"15\\\" ng-if=\\\"vm.user.is_crane_contact\\\" layout-align=\\\"start center\\\" layout-align-xs=\\\"center center\\\" layout=\\\"row\\\">\\r\\n <div class=\\\"photo-container\\\" style=\\\"width:75px;height: 75px;\\\">\\r\\n <div ng-if=\\\"!vm.user.photo_url\\\" class=\\\"photo-placeholder\\\">No Photo Selected</div>\\r\\n <img ng-if=\\\"vm.user.photo_url\\\" style=\\\"width: 75px;height: 75px\\\" src=\\\"{{vm.user.photo_url}}\\\" />\\r\\n </div>\\r\\n </div>\\r\\n </div> --><!-- <div flex-gt-sm=\\\"30\\\">\\r\\n <md-input-container ng-show=\\\"vm.user.is_crane_contact\\\" class=\\\"md-block\\\">\\r\\n <label class=\\\"uppercase\\\">Choose a Photo</label>\\r\\n <md-autocomplete style=\\\"margin-top:12px\\\"\\r\\n placeholder=\\\"{{\\'USER.CLICK_SELECT_PHOTO\\' | translate}}\\\"\\r\\n md-selected-item=\\\"vm.user.photo_url\\\"\\r\\n md-search-text=\\\"vm.searchText\\\"\\r\\n md-items=\\\"item in vm.contactPhotos.photos | filter:vm.searchText\\\"\\r\\n md-item-text=\\\"vm.parseFilename(item)\\\"\\r\\n md-min-length=\\\"0\\\">\\r\\n <md-item-template>\\r\\n <span md-highlight-text=\\\"vm.searchText\\\" md-highlight-flags=\\\"^i\\\">{{vm.parseFilename(item)}}</span>\\r\\n </md-item-template>\\r\\n </md-autocomplete>\\r\\n </md-input-container>\\r\\n </div> --></div><!-- <div layout-gt-sm=\\\"row\\\">\\r\\n <div flex-gt-sm=\\\"45\\\">\\r\\n <md-input-container class=\\\"md-block error-hidden\\\">\\r\\n <label translate=\\\"ADMIN.PRIMARY_CONTACT\\\"></label>\\r\\n\\r\\n <md-select\\r\\n ng-model=\\\"vm.user.contact.primary_contact\\\" md-on-open=\\\"vm.onSelectOpen()\\\"\\r\\n md-on-close=\\\"vm.onSelectClose()\\\"\\r\\n >\\r\\n <md-option ng-value=\\\"contact.id\\\" ng-repeat=\\\"contact in vm.possibleContacts track by contact.id\\\"\\r\\n ng-selected=\\\"vm.user.contact.primary_contact == contact.id\\\" >{{ contact.email }}</md-option>\\r\\n </md-select>\\r\\n\\r\\n <small><span translate=\\\"ADMIN.DEFAULT_BLANK\\\"></span> {{ vm.getDefaultContact() }}</small>\\r\\n </md-input-container>\\r\\n\\r\\n <md-input-container class=\\\"md-block error-hidden\\\">\\r\\n <label translate=\\\"ADMIN.BCCS\\\"></label>\\r\\n <md-chips\\r\\n class=\\\"user-chips email-chips\\\"\\r\\n ng-model=\\\"vm.user.bccs.values\\\"\\r\\n md-require-match=\\\"!vm.canSetSuperAdmin()\\\"\\r\\n md-separator-keys=\\\"vm.keys\\\"\\r\\n placeholder=\\\"Enter email\\\"\\r\\n secondary-placeholder=\\\"Comma separated emails\\\">\\r\\n <md-autocomplete md-selected-item=\\\"selectedItem\\\"\\r\\n md-delay=\\\"300\\\"\\r\\n ng-disabled=\\\"!vm.canSetPermissions()\\\"\\r\\n md-search-text=\\\"searchText\\\"\\r\\n md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\"\\r\\n md-item-text=\\\"item\\\">\\r\\n <md-item-template>\\r\\n <span md-highlight-text=\\\"searchText\\\">{{item}}</span>\\r\\n </md-item-template>\\r\\n <md-not-found>\\r\\n No matches found.\\r\\n </md-not-found>\\r\\n </md-autocomplete>\\r\\n </md-chips>\\r\\n\\r\\n <small><span translate=\\\"ADMIN.DEFAULT_BLANK\\\"></span> {{ vm.getDefaultBCCs() }}</small>\\r\\n </md-input-container>\\r\\n </div>\\r\\n </div> --></md-card-content></form></md-card>\");\n$templateCache.put(\"/app/admin/users/fresh.html\",\"<!-- Redirecting -->\");\n$templateCache.put(\"/app/admin/users/import-users.html\",\"<cva-shell><div class=\\\"shell-padding content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>{{\\'USER.BULK.IMPORT_USERS\\' | translate}}</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/users class=parent-link>{{\\'USER.USERS\\' | translate}}</a></span></div></div></div><md-card id=hello class=\\\"md-card-light loadmask-light\\\" loadmask=!vm.file.isUploading><form novalidate class=\\\"form-horizontal light-form\\\" name=vm.ImportUsersForm><md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'USER.BULK.IMPORT_USERS\\' | translate}}</span></h2><span flex=auto></span></div></md-toolbar><md-card-content><section layout=row layout-align=center><div ngf-drop ngf-select ng-model=vm.file class=drop-box ngf-drop-available=dropSupported ngf-drag-over-class=\\\"{pattern: \\'.xlsx\\', accept:\\'dragover\\', reject:\\'dragover\\', delay:100}\\\" ngf-multiple=false ngf-allow-dir=false accept=.xlsx ngf-pattern=\\\"\\'.xlsx\\'\\\" style=\\\"color: gray\\\">Drop XLSX or Click to Upload</div></section><div ngf-no-file-drop>File Drag/Drop is not supported for this browser</div><section layout=row layout-align=center><md-button class=\\\"md-raised md-primary\\\" ng-click=vm.downloadXLSXTemplate()>Download XLSX Template</md-button></section><p style=text-align:center ng-if=vm.isSafari()><span>Press \\\"CMD + s\\\" on the opened document to save and name it as template.csv<span></span></span></p></md-card-content></form></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/admin/users/log.html\",\"<md-card class=m-t><md-toolbar class=md-toolbar-tools><h2>{{\\'ADMIN.USER.LOG\\' | translate}}</h2><span flex=auto></span><md-button class=md-raised ng-click=$ctrl.logExportShowCSV()>Export</md-button></md-toolbar><md-card-content class=light-form><div class=table-scroll><table class=\\\"card-table table-fixed table-static\\\"><thead><tr><th style=\\\"width: 25%\\\">User</th><th style=\\\"width: 15%\\\">Date</th><th style=\\\"width: 60%\\\">Actions</th></tr></thead><tbody><tr class=md-whiteframe-1dp ng-repeat=\\\"log_record in $ctrl.data.log\\\"><td style=\\\"width: 25%\\\">{{log_record.username}}</td><td style=\\\"width: 15%\\\">{{log_record.created_at | date}}</td><td style=\\\"width: 60%\\\"><p ng-bind-html=$ctrl.processActions(log_record.actions)></p></td></tr></tbody></table></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/admin/users/manage-users.html\",\"<cva-shell><div class=\\\"shell-padding book-shipment content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 translate=USER.MANAGE_USERS></span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/users class=parent-link><span translate=USER.USERS></span></a></span></div></div></div><md-card class=p-a-sm collapsible template-url=/app/admin/users/forms/search.html></md-card><div layout-gt-sm=row layout-align-gt-sm=\\\"end center\\\" class=p-a-sm><span class=\\\"btn-link btn-block-sm {{vm.exceptionFilter.value == \\'all\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'all\\', \\'all\\',vm.is_active_cehck)\\\">All <span class=text-sub>({{allUsers}})</span></span> <span class=\\\"btn-link btn-block-sm {{vm.exceptionFilter.value == \\'ad\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'ad\\', \\'all\\',vm.is_active_cehck)\\\">AD-Users <span class=text-sub>({{allAdUsers}})</span></span> <span class=\\\"btn-link btn-block-sm {{vm.exceptionFilter.value == \\'nonad\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'nonad\\', \\'all\\',vm.is_active_cehck)\\\">Non AD-Users <span class=text-sub>({{allNonadUsers}})</span></span> <span id=company-customer-type style=\\\"margin-left: 1.5rem;margin-right: 1.5rem\\\"><md-checkbox ng-disabled=\\\"\\\" ng-click=vm.changeActiveStatus(vm.is_active_cehck) ng-model=vm.is_active_cehck aria-label=is_active_cehck class=md-primary></md-checkbox>  Active</span></div><div style=\\\"clear: both\\\"></div><crane-table title=USER.USERS icon=vm.icon ; is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons menu=\\\"\\'/app/admin/users/forms/bulk-menu-actions.html\\'\\\" ctrl=UserManagementController></crane-table></div></cva-shell>\");\n$templateCache.put(\"/app/admin/users/roles-permissions-new.html\",\"<style type=text/css>.disable-role-class{\\r\\n \\r\\n }\\r\\n .enable-role-class{\\r\\n \\r\\n }\\r\\n .md-checkbox-class{\\r\\n display: inline-block;margin: 0 2px;\\r\\n font-size: .95em;\\r\\n }\\r\\n\\r\\n md-checkbox[disabled] .md-bar {\\r\\n background-color: #dbdbdb; /* set disabled bar color */\\r\\n }\\r\\n md-checkbox[disabled] .md-ink-ripple {\\r\\n background-color: #e7e7e7; /* not selected switch ripple color */\\r\\n }\\r\\n\\r\\n .md-checkbox-size-apperance{\\r\\n width: 12px;\\r\\n height: 12px;\\r\\n appearance: none;\\r\\n display: inline-block;\\r\\n border-radius: 5px;\\r\\n margin-bottom: 16px;\\r\\n padding-left: 3%;\\r\\n padding-right: 1%;\\r\\n }\\r\\n\\r\\n .md-checkbox-width{\\r\\n display: inline-block;margin: 0 5px;\\r\\n width: 12px;\\r\\n padding-right: 2px;\\r\\n padding-bottom: 5px;\\r\\n }\\r\\n\\r\\n .md-card-div {\\r\\n background-color: #fff;\\r\\n border-radius: 5px;\\r\\n margin-bottom: 20px;\\r\\n padding-left: 2px;\\r\\n padding-right: 2px;\\r\\n min-height: 75px;\\r\\n }\\r\\n .md-card-div .heading {\\r\\n display: block;\\r\\n font-size: 1.17em;\\r\\n -webkit-margin-before: 1em;\\r\\n -webkit-margin-start: 0px;\\r\\n -webkit-margin-end: 0px;\\r\\n font-weight: bold;\\r\\n }\\r\\n .md-card-div md-input-container label {\\r\\n position: relative;\\r\\n }\\r\\n .approver-csl{\\r\\n position: absolute;width: 15px;\\r\\n height: 25px;border-bottom: 1px dotted #7d7d83;\\r\\n border-left: 1px dotted #7d7d83;\\r\\n top: -12px;left: 5px;\\r\\n }\\r\\n .approver-cfs{\\r\\n position: absolute;width: 15px;\\r\\n height: 25px;border-bottom: 1px dotted #7d7d83;\\r\\n border-left: 1px dotted #7d7d83;\\r\\n top: -12px;left: 5px;\\r\\n }</style><!-- ROLES & PERMISSIONS CARD --><md-card><form name=vm.formRole novalidate class=light-form><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons>settings</md-icon><span translate=USER.ROLES_PERMISSIONS></span></h2><span flex=auto></span><div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div></div></md-toolbar><md-card-content><div layout-gt-sm=row class=\\\"fourth_column newchips\\\"><div flex-gt-sm=22 ng-class=\\\"(vm.cww_check == true || vm.cwwUserCheck == true) ? \\'disable-role-class\\' : \\'enable-role-class\\'\\\" class=md-card-div style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">CWW User Roles</label><md-select ng-model=vm.user.role aria-label=vm.user.role ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" ng-change=vm.onRoleChange() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles\\\">{{role.display}}</md-option></md-select></md-input-container></div><div flex-gt-sm=22 ng-class=\\\"(vm.csl_check == true) ? \\'disable-role-class\\' : \\'enable-role-class\\'\\\" class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">CSL User Roles</label><md-select ng-model=vm.user.role_csl aria-label=vm.user.role_csl ng-disabled=vm.csl_check ng-change=vm.onRoleChangeCSL() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_csl\\\">{{role.display}}</md-option></md-select></md-input-container></div><div flex-gt-sm=22 ng-class=\\\"(vm.cfs_check == true) ? \\'disable-role-class\\' : \\'enable-role-class\\'\\\" class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">CFS User Roles</label><md-select ng-model=vm.user.role_cfs aria-label=vm.user.role_cfs ng-disabled=vm.cfs_check ng-change=vm.onRoleChangeCFS() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_cfs\\\">{{role.display}}</md-option></md-select></md-input-container></div><div flex-gt-sm=22 ng-class=\\\"(vm.cmts_check == true) ? \\'disable-role-class\\' : \\'enable-role-class\\'\\\" class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">CMTS User Roles</label><md-select ng-model=vm.user.role_cmts aria-label=vm.user.role_cmts ng-disabled=vm.cmts_check ng-change=vm.onRoleChangeCMTS() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_cmts\\\">{{role.display}}</md-option></md-select></md-input-container></div></div><br><div ng-if=vm.classicDivCheck layout-gt-sm=row class=\\\"fourth_column newchips\\\"><div flex-gt-sm=22 ng-class=\\\"(vm.cww_check == true) ? \\'disable-role-class\\' : \\'enable-role-class\\'\\\" class=md-card-div style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">Pathway User Roles</label><md-select ng-model=vm.user.role_classic aria-label=vm.user.role_classic ng-disabled=vm.cww_check ng-change=vm.onRoleChangeClassic() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=none></md-option><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles_classic\\\">{{role.display}}</md-option></md-select></md-input-container></div><div flex-gt-sm=33 class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"></md-input-container></div><div flex-gt-sm=33 class=space-customer-grid flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"></md-input-container></div></div><br></md-card-content><md-card-content style=\\\"padding: 0px\\\"><div layout=column layout-gt-sm=row layout-wrap><div flex=50 flex-md=50 flex-gt-md=25><div style=\\\"margin-left: 10px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">Admin settings</h5><div layout=row style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div flex=50 style=\\\"padding: 5px\\\"></div><div flex=60><span class=md-checkbox-class>CWW</span> <span class=md-checkbox-class>CSL</span> <span class=md-checkbox-class>CFS</span> <span class=md-checkbox-class style=\\\"margin: 0 0px\\\">CMTS</span></div></div><div layout=row><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">Super Admin</span></div><div flex=60><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"mmd-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Admin\\'][\\'options\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Admin\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Admin\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check ng-change=vm.onPermissionsChangeCMTS(vm.permissions) ng-model=\\\"vm.permissions[\\'Admin\\'][\\'options_cmts\\'][0][\\'value\\']\\\" class=\\\"md-primary md-checkbox-size-apperance\\\"></md-checkbox></div></div><div layout=row><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">Company Admin</span></div><div flex=60><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions) ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cmts\\'][0][\\'value\\']\\\"></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'Group\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">Group</span></div><div flex=60><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Group\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Group\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Group\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'LensGroup\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=60><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions,option.name)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'LensGroup\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions,option.name)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'LensGroup\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions,option.name)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'LensGroup\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions,option.name)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'Spotlight\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px\\\">Manage Spotlight</span></div><div flex=60><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Spotlight\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Spotlight\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Spotlight\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'User\\'].options track by $index\\\"><div flex=50 ng-if=\\\"[\\'demo\\'].includes(option.group[0])\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=60 ng-if=\\\"[\\'demo\\'].includes(option.group[0])\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_csl\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cfs\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cmts\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'SupportRequestAdmin\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'CviewClassicAdmin\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox></div></div></div></div><div flex=50 flex-md=50 flex-gt-md=25><div style=\\\"margin-left: 10px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">User Management</h5><div layout=row style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div flex=50></div><div flex=60><span class=md-checkbox-class>CWW</span> <span class=md-checkbox-class>CSL</span> <span class=md-checkbox-class>CFS</span> <span class=md-checkbox-class>CMTS</span></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'User\\'].options track by $index\\\"><div flex=50 ng-if=\\\"![\\'lensmode\\',\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\', \\'demo\\'].includes(option.group[0])\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=60 ng-if=\\\"![\\'lensmode\\',\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\', \\'demo\\'].includes(option.group[0])\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'User\\'].options track by $index\\\"><div flex=50 ng-if=\\\"![\\'manage\\',\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\', \\'demo\\'].includes(option.group[0])\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=60 ng-if=\\\"![\\'manage\\',\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\', \\'demo\\'].includes(option.group[0])\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_csl\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cfs\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'User\\'][\\'options_cmts\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'Company\\'].options track by $index\\\"><div flex=50 ng-if=\\\"option.name !=\\'Admin\\' && option.name !=\\'Read Only Access\\'\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=60 ng-if=\\\"option.name !=\\'Admin\\' && option.name !=\\'Read Only Access\\'\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_csl\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cfs\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cmts\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div></div><div style=\\\"margin-left: 10px\\\" layout=row ng-repeat=\\\"option in vm.permissions[\\'Shipment\\'].options track by $index\\\"><div flex=50 ng-if=\\\"option.name !=\\'T&T Export\\' && option.name !=\\'Financial\\'\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name == \\\"View\\\" ? \\\"Shipment View\\\" : option.name}}</span></div><div flex=60 ng-if=\\\"option.name !=\\'T&T Export\\' && option.name !=\\'Financial\\'\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Load\\'][\\'options_csl\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Load\\'][\\'options_cfs\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Load\\'][\\'options_cmts\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div style=\\\"margin-left: 10px\\\" layout=row ng-repeat=\\\"option in vm.permissions[\\'Shipment\\'].options track by $index\\\"><div flex=50 ng-if=\\\"option.name !=\\'View\\' && option.name !=\\'Financial\\'\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name == \\\"View\\\" ? \\\"Shipment View\\\" : option.name}}</span></div><div flex=60 ng-if=\\\"option.name !=\\'View\\' && option.name !=\\'Financial\\'\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_csl\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_cfs\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_cmts\\'][1][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div style=\\\"margin-left: 10px\\\" layout=row ng-repeat=\\\"option in vm.permissions[\\'Shipment\\'].options track by $index\\\"><div flex=50 ng-if=\\\"option.name !=\\'T&T Export\\' && option.name !=\\'View\\'\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name == \\\"View\\\" ? \\\"Shipment View\\\" : option.name}}</span></div><div flex=60 ng-if=\\\"option.name !=\\'T&T Export\\' && option.name !=\\'View\\'\\\"><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_csl\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_cfs\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Shipment\\'][\\'options_cmts\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div><div style=\\\"margin-left: 10px\\\" layout=row ng-repeat=\\\"option in vm.permissions[\\'SupportRequestUser\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox></div></div><div style=\\\"margin-left: 10px\\\" layout=row ng-repeat=\\\"option in vm.permissions[\\'SupportRequestValidator\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=50><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox></div></div></div><div flex=50 flex-md=50 flex-gt-md=25 layout=column><div style=\\\"margin-left: 10px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">Company</h5><div layout=row style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div flex=50></div><div flex=60><span class=md-checkbox-class>CWW</span> <span class=md-checkbox-class>CSL</span> <span class=md-checkbox-class>CFS</span> <span class=md-checkbox-class>CMTS</span></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'Company\\'].options track by $index\\\" ng-if=\\\"option.name !=\\'Admin\\' && option.name !=\\'Access Company Lens Data\\'\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div flex=60><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_csl\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCSL(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cfs\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCFS(vm.permissions)></md-checkbox><md-checkbox ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=\\\"vm.permissions[\\'Company\\'][\\'options_cmts\\'][2][\\'value\\']\\\" ng-change=vm.onPermissionsChangeCMTS(vm.permissions)></md-checkbox></div></div></div><div style=\\\"margin-left: 10px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">Exceptions</h5><div layout=row style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div flex=50></div><div flex=50><div layout=row><span flex=50>CSL</span> <span flex=50 class=md-checkbox-class>CFS</span> <span flex=50 class=md-checkbox-class>CMTS</span></div></div></div><div layout=row><div flex=50><div layout=row ng-repeat=\\\"option in vm.permissions[\\'CslException\\'].options_csl track by $index\\\"><div style=\\\"position: relative;text-indent: 25px; padding-bottom: 10px\\\" ng-if=\\\"option.name == \\'All Clients\\' && option.name != \\'Create Only\\'\\\"><div class=approver-csl></div><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div><div ng-if=\\\"option.name != \\'All Clients\\' && option.name != \\'Create Only\\'\\\" style=\\\"padding-bottom: 10px\\\"><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span></div></div></div><div flex=50><div layout=row><div flex=50><div layout=row ng-repeat=\\\"option in vm.permissions[\\'CslException\\'].options_csl track by $index\\\"><md-checkbox ng-if=\\\"option.name == \\'All Clients\\' && option.name != \\'Create Only\\'\\\" ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=\\\"vm.onPermissionsChangeCSL(vm.permissions);vm.changeCslAllClients(ev,option.value,\\'CLS\\');vm.onCslToggle(ev,option)\\\"></md-checkbox><md-checkbox ng-if=\\\"option.name != \\'All Clients\\' && option.name != \\'Create Only\\'\\\" ng-disabled=vm.csl_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChangeCSL(vm.permissions);vm.onCslToggle(ev,option)></md-checkbox></div></div><div flex=50><div layout=row ng-repeat=\\\"option in vm.permissions[\\'CslException\\'].options_cfs track by $index\\\"><md-checkbox ng-if=\\\"option.name == \\'All Clients\\' && option.name != \\'Create Only\\'\\\" ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=\\\"vm.onPermissionsChangeCFS(vm.permissions);vm.changeCslAllClients(ev,option.value,\\'CFS\\');vm.onCfsToggle(ev,option)\\\"></md-checkbox><md-checkbox ng-if=\\\"option.name != \\'All Clients\\' && option.name != \\'Create Only\\'\\\" ng-disabled=vm.cfs_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChangeCFS(vm.permissions);vm.onCfsToggle(ev,option)></md-checkbox></div></div><div flex=50><div layout=row ng-repeat=\\\"option in vm.permissions[\\'CslException\\'].options_cmts track by $index\\\"><md-checkbox ng-if=\\\"option.name == \\'All Clients\\' && option.name != \\'Create Only\\'\\\" ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=\\\"vm.onPermissionsChangeCMTS(vm.permissions);vm.changeCslAllClients(ev,option.value,\\'CMTS\\');vm.onCmtsToggle(ev,option)\\\"></md-checkbox><md-checkbox ng-if=\\\"option.name != \\'All Clients\\' && option.name != \\'Create Only\\'\\\" ng-disabled=vm.cmts_check class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChangeCMTS(vm.permissions);vm.onCmtsToggle(ev,option)></md-checkbox></div></div></div></div></div></div><!-- <div style=\\\"margin-left: 10px;\\\">\\r\\n <h5 class=\\\"uppercase\\\" style=\\\"color: rgb(55, 153, 175);\\\">CSL EXCEPTIONS</h5>\\r\\n\\r\\n <div layout=\\\"row\\\" style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px;\\\">\\r\\n <div flex=\\\"50\\\"></div>\\r\\n <div flex=\\\"50\\\"></div>\\r\\n </div>\\r\\n\\r\\n <div layout=\\\"row\\\" ng-repeat=\\\"option in vm.permissions[\\'CslException\\'].options_csl track by $index\\\">\\r\\n\\r\\n <div flex=\\\"50\\\" style=\\\"position: relative;text-indent: 25px;\\\"\\r\\n ng-if=\\\"option.name == \\'All Clients\\' && option.name != \\'Create Only\\'\\\">\\r\\n <div class=\\\"approver-csl\\\"></div>\\r\\n <span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em;\\\">{{option.name}}</span></div>\\r\\n\\r\\n <div flex=\\\"50\\\" ng-if=\\\"option.name != \\'All Clients\\' && option.name != \\'Create Only\\'\\\">\\r\\n <span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em;\\\">{{option.name}}</span></div>\\r\\n <div flex=\\\"50\\\">\\r\\n <md-checkbox ng-if=\\\"option.name == \\'All Clients\\' && option.name != \\'Create Only\\'\\\"\\r\\n ng-disabled=\\\"vm.csl_check\\\" class=\\\"md-checkbox-class\\\" ng-model=\\\"option.value\\\"\\r\\n ng-change=\\\"vm.onPermissionsChangeCSL(vm.permissions);vm.changeCslAllClients(ev,option.value);vm.onCslToggle(ev,option)\\\"></md-checkbox>\\r\\n\\r\\n <md-checkbox ng-if=\\\"option.name != \\'All Clients\\' && option.name != \\'Create Only\\'\\\"\\r\\n ng-disabled=\\\"vm.csl_check\\\" class=\\\"md-checkbox-class\\\" ng-model=\\\"option.value\\\"\\r\\n ng-change=\\\"vm.onPermissionsChangeCSL(vm.permissions);vm.onCslToggle(ev,option)\\\"></md-checkbox>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n <div style=\\\"margin-left: 10px;\\\">\\r\\n <h5 class=\\\"uppercase\\\" style=\\\"color: rgb(55, 153, 175);\\\">CFS EXCEPTIONS</h5>\\r\\n\\r\\n <div layout=\\\"row\\\" style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px;\\\">\\r\\n <div flex=\\\"50\\\"></div>\\r\\n <div flex=\\\"50\\\"></div>\\r\\n </div>\\r\\n <div layout=\\\"row\\\" ng-repeat=\\\"option in vm.permissions[\\'CslException\\'].options_cfs track by $index\\\">\\r\\n\\r\\n <div flex=\\\"50\\\" style=\\\"position: relative;text-indent: 25px;\\\"\\r\\n ng-if=\\\"option.name == \\'All Clients\\' && option.name != \\'Create Only\\'\\\">\\r\\n <div class=\\\"approver-cfs\\\"></div>\\r\\n <span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em;\\\">{{option.name}}</span></div>\\r\\n\\r\\n <div flex=\\\"50\\\" ng-if=\\\"option.name != \\'All Clients\\' && option.name != \\'Create Only\\'\\\">\\r\\n <span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em;\\\">{{option.name}}</span></div>\\r\\n <div flex=\\\"50\\\">\\r\\n <md-checkbox ng-if=\\\"option.name == \\'All Clients\\' && option.name != \\'Create Only\\'\\\"\\r\\n ng-disabled=\\\"vm.cfs_check\\\" class=\\\"md-checkbox-class\\\" ng-model=\\\"option.value\\\"\\r\\n ng-change=\\\"vm.onPermissionsChangeCFS(vm.permissions);vm.changeCslAllClients(ev,option.value);vm.onCfsToggle(ev,option)\\\"></md-checkbox>\\r\\n\\r\\n <md-checkbox ng-if=\\\"option.name != \\'All Clients\\' && option.name != \\'Create Only\\'\\\"\\r\\n ng-disabled=\\\"vm.cfs_check\\\" class=\\\"md-checkbox-class\\\" ng-model=\\\"option.value\\\"\\r\\n ng-change=\\\"vm.onPermissionsChangeCFS(vm.permissions);vm.onCfsToggle(ev,option)\\\"></md-checkbox>\\r\\n </div>\\r\\n </div>\\r\\n </div> --></div><div flex=50 flex-md=50 flex-gt-md=25><div style=\\\"margin-left: 10px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">POTENTIAL EXCEPTIONS</h5><div layout=row style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div flex=50></div><div flex=50><span class=md-checkbox-class>CWW</span></div></div><div layout=row ng-repeat=\\\"option in vm.permissions[\\'PotentialException\\'].options track by $index\\\"><div flex=50><span style=\\\"float: left;width: 100%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\">{{option.name}}</span></div><div flex=50><md-checkbox ng-disabled=\\\"(vm.cww_check || vm.cwwUserCheck)\\\" class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-checkbox></div></div></div></div><!-- C-View Classic settings layout Hide in Mobile --><div ng-if=vm.classicDivCheck flex=50 flex-gt-sm=100><h5 class=uppercase style=\\\"color: rgb(55, 153, 175);margin-left: 10px\\\">Pathway Settings</h5><div layout=row layout-align=\\\"center center\\\" style=\\\"border-bottom: 1px dotted #7d7d83;margin-bottom: 5px\\\"><div class=md-checkbox-class>CWW</div></div><div ng-repeat=\\\"option in vm.permissions[\\'User\\'].options_classic track by $index\\\" style=\\\"float:left;width:25%;min-width: 200px\\\"><div ng-if=\\\"[\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\'].includes(option.group[0])\\\"><div style=\\\"margin-left: 10px\\\" class=grid-view><span style=\\\"float: left;width: 70%;padding-top: 2px;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span><md-checkbox ng-disabled=true class=\\\"md-primary md-checkbox-size-apperance\\\" ng-model=option.value ng-change=vm.onPermissionsChangeClassic(vm.permissions)></md-checkbox></div></div></div></div></div><br><br></md-card-content></form><div ng-controller=SidebarController></div></md-card>\");\n$templateCache.put(\"/app/admin/users/roles-permissions.html\",\"<!-- ROLES & PERMISSIONS CARD --><md-card><form name=vm.formRole novalidate class=light-form><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons>settings</md-icon><span translate=USER.ROLES_PERMISSIONS></span></h2><span flex=auto></span><div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div></div></md-toolbar><md-card-content><div layout-gt-sm=row><div flex-gt-sm=45><md-input-container class=\\\"md-block error-hidden\\\"><label translate=USER.USER_ROLE></label><md-select ng-model=vm.user.role aria-label=vm.user.role ng-disabled=!vm.canSetPermissions() ng-change=vm.onRoleChange() md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.roles\\\">{{role.display}}</md-option></md-select></md-input-container></div></div><!-- PERMISSIONS --><!-- <div layout=\\\"row\\\" layout-wrap>\\r\\n <div flex=\\\"50\\\" flex-gt-sm=\\\"33\\\" ng-repeat=\\\"pgroup in vm.permissions_display track by $index\\\">\\r\\n <h4 ng-show=\\\"vm.isPermissionsIn(pgroup)\\\">{{vm.permissions[pgroup].name | translate | uppercase}}</h4>\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"option.value\\\" ng-disabled=\\\"!vm.canSetPermissions()\\\" ng-repeat=\\\"option in vm.permissions[pgroup].options track by $index\\\" ng-if=\\\"option.display\\\" ng-change=\\\"vm.onPermissionsChange()\\\">\\r\\n {{option.name}}\\r\\n </md-checkbox>\\r\\n </div>\\r\\n <div flex-gt-sm=\\\"33\\\" ng-repeat=\\\"i in vm.getRemainingPermissionGroupsAmountArray(3)\\\"></div>\\r\\n </div> --><!-- <div flex-gt-sm=\\\"48\\\" >\\r\\n\\r\\n\\r\\n </div> --></md-card-content><md-card-content style=\\\"padding: 0px\\\"><div layout=column layout-gt-xs=row layout-wrap><div flex=50 flex-gt-sm=25><div style=\\\"margin-left: 10px;border-right: 1px solid #DDD;height: 225px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">Admin settings</h5><div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">Super Admin</span><md-switch ng-model=\\\"vm.permissions[\\'Admin\\'][\\'options\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div><div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">Company Admin</span><md-switch ng-model=\\\"vm.permissions[\\'Company\\'][\\'options\\'][0][\\'value\\']\\\" ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div><div ng-repeat=\\\"option in vm.permissions[\\'Group\\'].options track by $index\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">Group</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div><div ng-repeat=\\\"option in vm.permissions[\\'LensGroup\\'].options track by $index\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span><!-- <md-switch ng-model=\\\"option.value\\\" ng-change=\\\"vm.changePermissions(vm.permissions)\\\">hello..{{option.value}}\\r\\n </md-switch> --><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions,option.name)></md-switch></div><div ng-repeat=\\\"option in vm.permissions[\\'Spotlight\\'].options track by $index\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px\\\">Manage Spotlight</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div><div ng-repeat=\\\"option in vm.permissions[\\'User\\'].options track by $index\\\"><div ng-if=\\\"[\\'demo\\'].includes(option.group[0])\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div></div><div ng-repeat=\\\"option in vm.permissions[\\'SupportRequestAdmin\\'].options track by $index\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px\\\">Support request admin</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div><!-- <div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\\">Super Admin</span><md-switch ng-model=\\\"vm.user.super_admin\\\"></md-switch></div>\\r\\n <div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\\">Company Admin</span><md-switch ng-model=\\\"vm.user.company_admin\\\"></md-switch></div>\\r\\n <div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\\">Manage Lens Group</span><md-switch ng-model=\\\"vm.user.managelensgrp\\\"></md-switch></div> --><!-- <md-switch md-invert aria-label=\\\"Switch 7\\\">\\r\\n Switch (Inverted)\\r\\n </md-switch> --></div></div><div flex=50 flex-gt-sm=25><div style=\\\"margin-left: 10px;border-right: 1px solid #DDD;height: 225px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">User Management</h5><div ng-repeat=\\\"option in vm.permissions[\\'User\\'].options track by $index\\\"><div ng-if=\\\"![\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\', \\'demo\\'].includes(option.group[0])\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div></div><div ng-repeat=\\\"option in vm.permissions[\\'Shipment\\'].options track by $index\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name == \\\"View\\\" ? \\\"Shipment View\\\" : option.name}}</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div><div ng-repeat=\\\"option in vm.permissions[\\'SupportRequestUser\\'].options track by $index\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px\\\">Support request user</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div><!-- <div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\\">Add/Remove Users</span><md-switch ng-model=\\\"vm.add_remove_users\\\"></md-switch></div>\\r\\n <div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\\">C-View Lens Mode</span><md-switch ng-model=\\\"vm.lensmode\\\"></md-switch></div> --></div></div><div flex=50 flex-gt-sm=25><div style=\\\"margin-left: 10px;border-right: 1px solid #DDD;height: 163px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">Company</h5><div ng-repeat=\\\"option in vm.permissions[\\'Company\\'].options track by $index\\\" ng-if=\\\"option.name !=\\'Admin\\'\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div><!-- <div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\\">Add/Remove Users</span><md-switch ng-model=\\\"vm.add_remove_users\\\"></md-switch></div>\\r\\n <div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\\">C-View Lens Mode</span><md-switch ng-model=\\\"vm.lensmode\\\"></md-switch></div> --></div></div><div flex=50 flex-gt-sm=25><div style=\\\"margin-left: 10px;border-right: 1px solid #DDD;height: 163px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175)\\\">POTENTIAL EXCEPTIONS</h5><div ng-repeat=\\\"option in vm.permissions[\\'PotentialException\\'].options track by $index\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px;\\r\\n font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions)></md-switch></div><!-- <div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\\">Add/Remove Users</span><md-switch ng-model=\\\"vm.add_remove_users\\\"></md-switch></div>\\r\\n <div><span style=\\\"float: left;width: 70%;padding-top: 2px;\\\">C-View Lens Mode</span><md-switch ng-model=\\\"vm.lensmode\\\"></md-switch></div> --></div></div><!-- C-View Classic settings layout Hide in Mobile --><div flex=50 flex-gt-sm=100 hide show-gt-xs><h5 class=uppercase style=\\\"color: rgb(55, 153, 175);margin-left: 10px\\\">Pathway Settings</h5><div ng-repeat=\\\"option in vm.permissions[\\'User\\'].options track by $index\\\" style=\\\"float:left;width:25%;min-width: 200px\\\"><div ng-if=\\\"[\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\'].includes(option.group[0])\\\"><div style=\\\"margin-left: 10px\\\" class=grid-view><span style=\\\"float: left;width: 70%;padding-top: 2px;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions) style=\\\"margin: 6px 6px 10px 6px\\\"></md-switch></div></div></div></div><!-- C-View Classic settings layout Show in Mobile --><div hide-gt-xs flex=50 flex-gt-sm=100><div style=\\\"margin-left: 10px;border-right: 1px solid #DDD;min-height: 100px\\\"><h5 class=uppercase style=\\\"color: rgb(55, 153, 175);margin-left: 10px\\\">Pathway Settings</h5><div ng-repeat=\\\"option in vm.permissions[\\'User\\'].options track by $index\\\"><div ng-if=\\\"[\\'track_and_trace\\', \\'warehouse\\', \\'accounts_receivables\\', \\'book_shipment\\', \\'reporting\\', \\'operations_kpi\\', \\'operations_dashboard\\', \\'customs\\'].includes(option.group[0])\\\"><span style=\\\"float: left;width: 70%;padding-top: 2px;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif;font-size: .95em\\\">{{option.name}}</span><md-switch ng-model=option.value ng-change=vm.onPermissionsChange(vm.permissions) style=\\\"margin: 6px 6px 10px 6px\\\"></md-switch></div></div></div></div></div></md-card-content></form><div ng-controller=SidebarController></div></md-card>\");\n$templateCache.put(\"/app/admin/users/show-user.html\",\"<cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1 ng-show=vm.isCreate><span translate=USER.CREATE_USER></span></span> <span class=md-display-1 ng-show=!vm.isCreate><span translate=USER.EDIT_USER></span> <img class=hide-gt-xs hide-gt-md=\\\"\\\" ng-click=addToHomescreen() src=/assets/images/logo.png style=\\\"width: 72px;\\r\\n background: #fff;\\r\\n float: right;\\r\\n margin-top: 11px\\\"></span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/users class=parent-link><span translate=USER.USERS></span></a> / <span ng-show=!vm.isCreate>{{vm.user.email}}</span> <span ng-show=vm.isCreate>{{\\\"NEW\\\"}}</span></span></div><div ng-if=\\\"!vm.user.is_active && !vm.isCreate\\\"><p style=color:red><strong>Account Deactivated</strong></p></div></div></div></div><section ng-include=\\\"\\'/app/admin/users/account-settings.html\\'\\\"></section><section ng-include=\\\"\\'/app/admin/users/company-settings-new.html\\'\\\"></section><section ng-include=\\\"\\'/app/admin/users/roles-permissions-new.html\\'\\\"></section><!-- <section ng-include=\\\"\\'/app/admin/users/roles-permissions.html\\'\\\"></section> --><section ng-include=\\\"\\'/app/admin/users/contact-settings.html\\'\\\"></section><!-- <section ng-include=\\\"\\'/app/admin/users/company-settings.html\\'\\\">\\r\\n </section> --><section ng-if=\\\"vm.c_view_lens_mode_check == true\\\" ng-controller=\\\"lensviewController as lv\\\" ng-show=!vm.isCreate><crane-table title=\\\"Lens Groups\\\" icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=lv.isLoading.table is-no-results=lv.noResults buttons=\\\"vm.currentUser.lens_grp_manage? lv.lensGroupButtons : null \\\" searchflag=lv.searchflag menu=\\\"vm.currentUser.lens_grp_manage ? \\'/app/admin/lensview/menuform/menu.html\\' : \\'\\'\\\" ctrl=lensviewController></crane-table></section><section><div layout-xs=column layout-gt-xs=row><div flex=auto><div style=\\\"margin-left: 15px;margin-right: 15px\\\"><hr style=\\\"background-color: #fff\\\"></div><div style=\\\"float: right;margin:15px 8px 0px 8px\\\" ng-include=\\\"\\'/app/admin/users/forms/action-buttons.html\\'\\\"></div></div></div></section><section ng-if=vm.logsVisible()><log-user-record data=vm.user></log-user-record></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/users/test.html\",\"<cva-shell><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex><h2><span class=md-display-1 ng-show=vm.isCreate>{{\\'USER.CREATE_USER\\' | translate }}</span> <span class=md-display-1 ng-show=!vm.isCreate>{{\\'USER.EDIT_USER\\' | translate }}</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/users class=parent-link>{{\\'USER.USERS\\' | translate}}</a> / <span ng-show=!vm.isCreate>{{vm.user.email}}</span> <span ng-show=vm.isCreate>{{\\\"NEW\\\"}}</span></span></div><div ng-if=!vm.user.is_active><p style=color:red><strong>Account Deactivated</strong></p></div></div></div></div><!-- ACCOUNT DETAILS --><md-card><form name=vm.formDetails class=light-form><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex><md-icon class=material-icons>account_circle</md-icon>{{\\'USER.ACCOUNT_DETAILS\\' | translate}}</h2><span flex></span><div ng-include=\\\"\\'app/admin/users/forms/action-buttons.html\\'\\\"></div><div ng-include=\\\"\\'app/admin/users/forms/menu-action-buttons.html\\'\\\"></div><span flex=0></span></div></md-toolbar><md-card-content><ng-form name=timepicker><mdp-time-picker ng-model=example></mdp-time-picker></ng-form><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>{{\\'USER.FIRST_NAME\\' | translate}}</label><input type=text ng-model=vm.user.first_name name=first-name></md-input-container><!--User group is not used at all--><!--\\r\\n <md-input-container class=\\\"md-block error-hidden m-b\\\">\\r\\n <label>{{\\'USER.GROUP\\' | translate}}</label>\\r\\n <md-select ng-model=\\\"vm.user.group_ids\\\" aria-label=\\\"vm.user.group_ids\\\" multiple=\\\"true\\\">\\r\\n <md-option ng-value=\\\"group.id\\\" ng-repeat=\\\"group in vm.groups\\\" multiple>{{ group.name }}</md-option>\\r\\n </md-select>\\r\\n </md-input-container>\\r\\n --></md-card-content><!-- <md-card-actions layout=\\\"row\\\" layout-align=\\\"end center\\\">\\r\\n\\r\\n </md-card-actions> --></form></md-card><!-- ROLES & PERMISSIONS CARD --><md-card><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex><md-icon class=material-icons>settings</md-icon>{{\\'USER.ROLES_PERMISSIONS\\' | translate}}</h2><span flex></span><div ng-include=\\\"\\'app/admin/users/forms/action-buttons.html\\'\\\"></div><span flex=0></span></div></md-toolbar><md-card-content><form name=vm.formRole class=light-form><ng-form name=timepicker2><mdp-time-picker ng-model=example2></mdp-time-picker></ng-form><!-- <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.permissions.Shipment.options[key]\\\" ng-repeat=\\\"(key, value) in vm.permissions.Shipment.options\\\">\\r\\n {{key}}\\r\\n </md-checkbox> --><md-input-container class=\\\"md-block error-hidden\\\" ng-if=true><md-select ng-model=vm.userPermissions aria-label=vm.userPermissions><md-optgroup label=permission.type ng-repeat=\\\"permission in vm.permissions\\\"><md-option value=key ng-repeat=\\\"(key, value) in permission.options\\\" ng-selected=value>{{key}}</md-option></md-optgroup></md-select></md-input-container><ng-form></ng-form></form><!-- </div> --></md-card-content></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/admin/users/verify-users.html\",\"<cva-shell><style>.send-button :enabled :hover { \\r\\n cursor: pointer \\r\\n } \\r\\n .send-button :disabled:hover {\\r\\n cursor: no-drop;\\r\\n }\\r\\n\\r\\n .md-chips:not(.md-readonly) {\\r\\n cursor: text;\\r\\n border-bottom-color: #5E6163;\\r\\n}</style><form class=\\\"form-horizontal light-form\\\" name=vm.bulkUsersForm><div class=\\\"shell-padding shipping-details content-max\\\" id=toast-parent><div class=view-header><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1><span translate=USER.BULK.VERIFY_USERS></span></span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href=/users class=parent-link><span translate=USER.USERS></span></a> / <a href=/users/import-users class=parent-link><span translate=USER.BULK.IMPORT_USERS></span> </a>/ <span translate=USER.BULK.VERIFY_USERS></span></span></div></div></div><div layout-gt-sm=row layout-align=end class=p-a-sm><span class=\\\"btn-link btn-block-sm {{vm.bulkFilter.value == \\'all\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'all\\')\\\">View All<span class=text-sub>({{vm.counts.all}})</span> </span><span class=\\\"btn-link btn-block-sm {{vm.bulkFilter.value == \\'errors\\' ? \\'active\\' : \\'\\'}}\\\" ng-click=\\\"vm.setFilter(\\'errors\\')\\\">View Errors Only<span class=text-sub>({{ vm.counts.errors}})</span></span></div><md-card class=loadmask-light loadmask=!vm.isLoading><md-toolbar><div class=md-toolbar-tools><h2><span translate=USER.BULK.IMPORT_USERS></span></h2><span flex=auto></span><md-button class=md-raised ng-click=vm.addUserToBulk() ng-hide=true><span translate=USER.ADD_USER></span></md-button><!--<md-button\\r\\n class=\\'md-raised\\'\\r\\n ng-click=\\\"vm.add_company()\\\">\\r\\n <md-icon>add</md-icon>\\r\\n <span translate=\\\"COMPANY.COMPANY\\\"></span>\\r\\n </md-button>\\r\\n <md-button\\r\\n class=\\'md-raised\\'\\r\\n ng-click=\\\"vm.refreshCompanies()\\\">\\r\\n <md-icon>refresh</md-icon>\\r\\n <span translate=\\\"TRACKTRACE.REFRESH\\\"></span>\\r\\n </md-button>--><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event) ng-hide=true><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><!-- <md-menu-item>\\r\\n <md-button ng-click=\\\"vm.clearSection(\\'reference_numbers\\')\\\">\\r\\n <div layout=\\\"row\\\" flex>\\r\\n <p flex><span translate=USER.BULK.CLEAR_SECTION></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n <md-menu-item ng-show=\\\"!vm.showRefNumRemoveButton && vm.reference_numbers.length > 1\\\">\\r\\n <md-button ng-click=\\\"vm.editRefNumRows()\\\">\\r\\n <div layout=\\\"row\\\" flex>\\r\\n <p flex><span translate=“BOOKSHIPMENT.EDIT_ROWS”></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n <md-menu-item ng-show=\\\"vm.showRefNumRemoveButton && vm.reference_numbers.length > 1\\\">\\r\\n <md-button ng-click=\\\"vm.doneEditingRefNums()\\\">\\r\\n <div layout=\\\"row\\\" flex>\\r\\n <p flex><span translate=“BOOKSHIPMENT.DONE_EDITING”></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item> --></md-menu-content></md-menu></div></md-toolbar><md-card-content><md-card class=\\\"m-0 p-a-sm table-scroll\\\"><table class=card-content-table style=\\\"color: #FFF\\\"><thead><!--<div layout=\\\"row\\\">--><th><span style=\\\"font-weight: bold\\\"><input ng-model=vm.selectAllChecked ng-change=vm.selectAll() type=checkbox></span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=USER.FIRST_NAME></span><span style=\\\"font-weight: bold;color: red\\\">*</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=USER.LAST_NAME></span><span style=\\\"font-weight: bold;color: red\\\">*</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=USER.EMAIL></span><span style=\\\"font-weight: bold;color: red\\\">*</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\" translate=USER.COMPANY></span><span style=\\\"font-weight: bold;color: red\\\">*</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\">Customer Types</span><span style=\\\"font-weight: bold;color: red\\\">*</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\">Roles</span><span style=\\\"font-weight: bold;color: red\\\">*</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\">Pathway Role</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\">PartyID Overrides</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\">BCCs Overrides</span></th><th class=\\\"text-upper text-white\\\"><span style=\\\"font-weight: bold\\\">Primary Contact Overrides</span></th></thead><!--</div>--><!--</md-card>--><tbody ng-repeat=\\\"user in vm.users track by $index\\\" ng-show=\\\"(vm.rowHasErrors($index) && vm.bulkFilter === \\'errors\\') || (vm.bulkFilter === \\'all\\') \\\"><td class=td-5><md-input-container class=\\\"md-block error-hidden\\\"><label></label><input ng-model=user.row ng-click=\\\"vm.selectUser($event, $index)\\\" ng-change=\\\"vm.selectAllChecked = false\\\" name=\\\"{{\\'row-\\'+$index}}\\\" type=checkbox></md-input-container></td><!-- First Name --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=USER.FIRST_NAME></label><input ng-model=user.first_name name=\\\"{{\\'first_name-\\'+$index}}\\\" ng-change=vm.updateErrorCount(); required readonly> {{vm.asyncErrors(vm.bulkUsersForm[\\'first_name-\\'+ $index])}}<div ng-messages=\\\"vm.bulkUsersForm[\\'first_name-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkUsersForm[\\'first_name-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div></div></md-input-container></td><!-- Last Name --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=USER.LAST_NAME></label><input ng-model=user.last_name name=\\\"{{\\'last_name-\\'+$index}}\\\" ng-change=vm.updateErrorCount(); required readonly> {{vm.asyncErrors(vm.bulkUsersForm[\\'last_name-\\'+ $index])}}<div ng-messages=\\\"vm.bulkUsersForm[\\'last_name-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkUsersForm[\\'last_name-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div></div></md-input-container></td><!-- Email --><td class=td-30 style=min-width:200px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=USER.EMAIL></label><input ng-change=vm.updateErrorCount(); ng-model=user.email ng-model-options=\\\"{ debounce: 200 }\\\" name=\\\"{{\\'email-\\'+$index}}\\\" ng-pattern=\\'/^(([^<>()\\\\[\\\\]\\\\\\\\.,;:\\\\s@\\\"]+(\\\\.[^<>()\\\\[\\\\]\\\\\\\\.,;:\\\\s@\\\"]+)*)|(\\\".+\\\"))@((\\\\[[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}\\\\.[0-9]{1,3}])|(([a-zA-Z\\\\-0-9]+\\\\.)+[a-zA-Z]{2,}))$/\\' required readonly> {{vm.asyncErrors(vm.bulkUsersForm[\\'email-\\'+ $index])}}<div ng-messages=\\\"vm.bulkUsersForm[\\'email-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkUsersForm[\\'email-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message=pattern>Not a valid email address</div><div ng-message when=email>This email is already in use</div></div></md-input-container></td><!-- Company --><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label translate=USER.COMPANY></label><input ng-model=user.company_name ng-change=vm.updateErrorCount(); ng-model-options=\\\"{ debounce: 200 }\\\" name=\\\"{{\\'company-\\'+$index}}\\\" value={{user.company_name}} required readonly> {{vm.asyncErrors(vm.bulkUsersForm[\\'company-\\'+ $index])}}<div ng-messages=\\\"vm.bulkUsersForm[\\'company-\\'+$index].$error\\\" ng-if=\\\"vm.bulkUsersForm[\\'company-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=company>Company doesn\\'t exist</div></div></md-input-container><input type=hidden ng-model=user.company_id name=\\\"{{\\'company_id-\\'+$index}}\\\" value={{user.company_id}}></td><!-- Customer Type --><td class=td-30 style=min-width:150px><md-input-container class=\\\"md-block error-hidden\\\"><label>Customer Types</label><input ng-model=user.customer_types name=\\\"{{\\'customer_types-\\'+$index}}\\\" ng-change=vm.updateErrorCount(); required readonly> {{vm.asyncErrors(vm.bulkUsersForm[\\'customer_types-\\'+ $index])}}<div ng-messages=\\\"vm.bulkUsersForm[\\'customer_types-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkUsersForm[\\'customer_types-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=customer_types>Invalid customer type</div></div></md-input-container></td><!--Roles--><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label>Roles</label><input ng-model=user.roles name=\\\"{{\\'roles-\\'+$index}}\\\" ng-change=vm.updateErrorCount(); required readonly> {{vm.asyncErrors(vm.bulkUsersForm[\\'roles-\\'+ $index])}}<div ng-messages=\\\"vm.bulkUsersForm[\\'roles-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkUsersForm[\\'roles-\\' + $index ].$dirty\\\"><div ng-message=required>This field is required</div><div ng-message when=roles>Invalid roles</div></div></md-input-container></td><!--Pathway Role--><td class=td-30 style=min-width:100px><md-input-container class=\\\"md-block error-hidden\\\"><label>Pathway Role</label><input ng-model=user.pathway_role name=\\\"{{\\'pathway_role-\\'+$index}}\\\" ng-change=vm.updateErrorCount(); readonly> {{vm.asyncErrors(vm.bulkUsersForm[\\'pathway_role-\\'+ $index])}}<div ng-messages=\\\"vm.bulkUsersForm[\\'pathway_role-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkUsersForm[\\'pathway_role-\\' + $index ].$dirty\\\"><div ng-message when=pathway_role>Invalid pathway role</div></div></md-input-container></td><!--PartyID Overrides--><td class=td-30 style=min-width:150px><md-input-container class=\\\"md-block error-hidden\\\"><label>PartyID Overrides</label><input ng-model=user.party_id_overrides name=\\\"{{\\'party_id_overrides-\\'+$index}}\\\" ng-change=vm.updateErrorCount(); readonly> {{vm.asyncErrors(vm.bulkUsersForm[\\'party_id_overrides-\\'+ $index])}}<div ng-messages=\\\"vm.bulkUsersForm[\\'party_id_overrides-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkUsersForm[\\'party_id_overrides-\\' + $index ].$dirty\\\"><div ng-message when=party_id_overrides>Invalid partyid overrides</div></div></md-input-container></td><!--BCCs Overrides--><td class=td-30 style=min-width:150px><md-input-container class=\\\"md-block error-hidden\\\"><label>BCCs Overrides</label><input ng-change=vm.updateErrorCount(); ng-model=user.bccs_overrides ng-model-options=\\\"{ debounce: 200 }\\\" name=\\\"{{\\'bccs_overrides-\\'+$index}}\\\" readonly> {{vm.asyncErrors(vm.bulkUsersForm[\\'bccs_overrides-\\'+ $index])}}<div ng-messages=\\\"vm.bulkUsersForm[\\'bccs_overrides-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkUsersForm[\\'bccs_overrides-\\' + $index ].$dirty\\\"><div ng-message when=bccs_overrides>Invalid bccs overrides</div></div></md-input-container></td><!--Primary Contact Overrides--><td class=td-30 style=min-width:200px><md-input-container class=\\\"md-block error-hidden\\\"><label>Primary Contact Overrides</label><input ng-model=user.primary_contact_overrides name=\\\"{{\\'primary_contact_overrides-\\'+$index}}\\\" ng-change=vm.updateErrorCount(); readonly> {{vm.asyncErrors(vm.bulkUsersForm[\\'primary_contact_overrides-\\'+ $index])}}<div ng-messages=\\\"vm.bulkUsersForm[\\'primary_contact_overrides-\\' + $index ].$error\\\" ng-if=\\\"vm.bulkUsersForm[\\'primary_contact_overrides-\\' + $index ].$dirty\\\"><div ng-message when=primary_contact_overrides>Invalid primary contact overrides</div></div></md-input-container></td></tbody></table></md-card><div layout=row><div layout=row layout-align=start flex=auto class=m-t><md-button class=md-raised ng-click=vm.cancel()><span translate=USER.CANCEL></span></md-button></div><div layout=row layout-align=end flex=auto class=m-t><md-button class=\\\"md-raised md-primary\\\" ng-disabled=\\\"!(vm.selectedRowsValid()) || !(vm.selectedUsers(vm.users).length > 0)\\\" ng-click=vm.postBulkUsers() type=submit><span translate=USER.SUBMIT></span></md-button></div></div></md-card-content></md-card></div></form><div class=\\\"shell-padding shipping-details content-max\\\" id=toast-parent ng-show=\\\"vm.counts.errors>0 \\\"><md-card class=loadmask-light loadmask=!vm.isSendEmailLoading><md-toolbar><div class=md-toolbar-tools><h2><span style=text-transform:uppercase>Send Email</span></h2></div></md-toolbar><md-card-content><div layout=row layout-align=center flex=auto class=m-t><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"text-transform:capitalize;font-size: 20px;color: #b4b5b5\\\">Enter email</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.emailList md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem style=height:14px md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container><button class=\\\"md-raised md-primary md-button md-ink-ripple send-button\\\" ng-click=vm.sendErrorsToEmails() ng-disabled=\\\"vm.emailList.length === 0\\\" style=\\\"height: 12px;margin: 2%;background-color: rgb(35, 58, 105);color: #FFF\\\" type=button>Send</button></div></div></md-card-content></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/advanced-search/cfs/adv-search-form.html\",\"<style>mdp-date-picker .md-button.md-icon-button{\\r\\n margin:10px 0px 0px 0px;\\r\\n }\\r\\n\\r\\n md-input-container{\\r\\n margin:10px 0px 10px 0px;\\r\\n }\\r\\n\\r\\n @media screen and (max-width: 1024px) and (min-width: 960px){\\r\\n \\r\\n div#second-div-block{\\r\\n max-width:23%;\\r\\n }\\r\\n div#invoice_total{\\r\\n max-width:18%;\\r\\n }\\r\\n div#gross_weight{\\r\\n max-width:18%;\\r\\n }\\r\\n div#total_pieces{\\r\\n max-width:18%;\\r\\n }\\r\\n }\\r\\n\\r\\n @media screen and (max-width: 768px) and (min-width: 320px){\\r\\n \\r\\n md-input-container{\\r\\n margin:5px 0px 5px 0px;\\r\\n }\\r\\n\\r\\n mdp-date-picker .md-button.md-icon-button{\\r\\n margin:0px !important;\\r\\n margin-top:5px !important;\\r\\n }\\r\\n\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Advanced Search Modal\\\" ng-controller=\\\"AdvSearchCfsController as AdvSearchCfsCtrl\\\" ng-cloak style=\\\"width: 1024px\\\"><form name=searchForm reset-directive=AdvSearchCfsCtrl.searchFields class=light-form ng-keyup=\\\"$event.keyCode == 13 && AdvSearchCfsCtrl.formClick($event)\\\"><md-toolbar><div class=md-toolbar-tools><h2 translate=TRACKTRACE.ADVANCE_SEARCH></h2><span flex=auto></span><md-button class=md-icon-button ng-click=AdvSearchCfsCtrl.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=light-content layout=column><div layout-gt-sm=row><div flex-gt-sm=1 flex-sm=1 flex-xs=1><md-input-container class=\\\"md-block error-hidden\\\"><input class=adv-search-input readonly ng-model=\\\"AdvSearchCfsCtrl.ttserchdataNew | capitalize\\\" id={{AdvSearchCfsCtrl.searchFields.customername.field}} ng-keyup=AdvSearchCfsCtrl.ttSearch(AdvSearchCfsCtrl.ttserchdataNew)><div></div></md-input-container></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=15 flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\"><div class=adv-search-content><div><div ng-click=\\\"AdvSearchCfsCtrl.clearFlags(1,\\'Shipment\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCfsCtrl.ttSearchFlag == 1 }\\\"><span>SHIPMENT</span></div><div ng-click=\\\"AdvSearchCfsCtrl.clearFlags(2,\\'Pickup\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCfsCtrl.ttSearchFlag == 2 }\\\"><span>PICK UP</span></div><div ng-click=\\\"AdvSearchCfsCtrl.clearFlags(3,\\'Consignee\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCfsCtrl.ttSearchFlag == 3 }\\\"><span>CONSIGNEE</span></div></div></div></div><div id=second-div-block flex-gt-sm=20 flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\" ng-if=\\\"AdvSearchCfsCtrl.ttSearchFlag != undefined\\\"><div class=adv-search-content><div ng-if=\\\"AdvSearchCfsCtrl.ttSearchFlag == 1 \\\"><div ng-repeat=\\\"key in notSorted(AdvSearchCfsCtrl.shipment)\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCfsCtrl.secondChildFlg == key }\\\" ng-click=\\\"AdvSearchCfsCtrl.clearValues(key);AdvSearchCfsCtrl.secondChildElem = key ;AdvSearchCfsCtrl.ttserchdata = \\'Shipment \\' +key;AdvSearchCfsCtrl.secondChildFlg = key;AdvSearchCfsCtrl.ttSearch(AdvSearchCfsCtrl.ttserchdata);\\r\\n AdvSearchCfsCtrl.shipmentOpenInputFlag = (key != \\'status\\' && key !=\\'current_status\\' && key !=\\'mode\\' && key !=\\'service_level\\' && key !=\\'reason_code\\' && key !=\\'is_bookmarked\\') ? false : true;AdvSearchCfsCtrl.openInputFlag= (checkValue(key) == null)?true:false;AdvSearchCfsCtrl.dateItemOrNot(key);AdvSearchCfsCtrl.thirdChildFlg = 100\\\" ng-if=\\\"key != \\'awb\\' && (AdvSearchCfsCtrl.hasFinancialPermissions && key == \\'invoice_total\\' || key != \\'invoice_total\\')\\\"><span ng-if=\\\"key == \\'mode\\'\\\">Business Type</span> <span ng-if=\\\"key == \\'invoice_total\\'\\\">Invoice Total</span> <span ng-if=\\\"key == \\'equipment_type\\'\\\">Type of Equipment</span> <span ng-if=\\\"key == \\'type\\'\\\">Shipment Type</span> <span ng-if=\\\"key == \\'revenue_code\\'\\\">Revenue Code</span> <span ng-if=\\\"key == \\'is_bookmarked\\'\\\">isBookMarked</span> <span ng-if=\\\"key == \\'pickup_date\\'\\\">Pick Up Date</span> <span ng-if=\\\"key == \\'pickup_time\\'\\\">Pick Up Time</span> <span ng-if=\\\"key == \\'reason_code\\'\\\">Exception</span> <span ng-if=\\\"key == \\'estimateddelivery_date\\'\\\">Estimated Delivery</span> <span ng-if=\\\"key == \\'delivereddate_date\\'\\\">Delivery Date</span> <span ng-if=\\\"key == \\'duedate_date\\'\\\">Due Date</span> <span ng-if=\\\"key == \\'shipdate_date\\'\\\">Ship Date</span> <span ng-if=\\\"key == \\'consignee_reference\\'\\\">CONSIGNEE REF #</span> <span ng-if=\\\"key == \\'pro\\'\\\">PRO #</span> <span ng-if=\\\"key == \\'bol\\'\\\">BOL #</span> <span ng-if=\\\"key == \\'reference\\'\\\">REF #</span> <span ng-if=\\\"key == \\'origin\\'\\\">Pick Up</span> <span ng-if=\\\"key == \\'destination\\'\\\">Delivery</span> <span ng-if=\\\"key == \\'load\\'\\\">LOAD #</span> <span ng-if=\\\"key == \\'container\\'\\\">Container/Trailer #</span> <span ng-if=\\\"key == \\'deliveryeta_date\\'\\\">Delivery ETA Date</span> <span ng-if=\\\"key == \\'mustship_date\\'\\\">Must Ship Date</span> <span ng-if=\\\"key == \\'mustdeliver_date\\'\\\">Must Deliver Date</span> <span ng-if=\\\"key != \\'mode\\' && key != \\'invoice_total\\' && key != \\'equipment_type\\' && key != \\'type\\' && key != \\'revenue_code\\' && key != \\'is_bookmarked\\' && key != \\'pickup_date\\' && key != \\'pickup_time\\' && key != \\'reason_code\\' && key != \\'estimateddelivery_date\\' && key != \\'delivereddate_date\\' && key != \\'duedate_date\\' && key != \\'shipdate_date\\' && key != \\'consignee_reference\\' && key != \\'pro\\' && key != \\'bol\\' && key != \\'origin\\' && key != \\'destination\\' && key != \\'reference\\' && key != \\'load\\' && key != \\'container\\' && key != \\'deliveryeta_date\\' && key != \\'mustship_date\\' && key != \\'mustdeliver_date\\'\\\">{{key | underscoreless | capitalize}}</span></div></div><div ng-if=\\\"AdvSearchCfsCtrl.ttSearchFlag == 2 \\\"><div ng-repeat=\\\"pick in AdvSearchCfsCtrl.pickup\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCfsCtrl.secondChildFlg == $index }\\\" ng-click=\\\"AdvSearchCfsCtrl.ttserchdata = \\'Pickup \\'+pick;AdvSearchCfsCtrl.ttSearch(AdvSearchCfsCtrl.ttserchdata);AdvSearchCfsCtrl.openInputFlag=true;AdvSearchCfsCtrl.clearValues();AdvSearchCfsCtrl.shipmentOpenInputFlag=false;AdvSearchCfsCtrl.secondChildFlg = $index;AdvSearchCfsCtrl.secondChildElem = pick\\\"><span>{{pick | underscoreless | capitalize}}</span></div></div><div ng-if=\\\"AdvSearchCfsCtrl.ttSearchFlag == 3 \\\"><div ng-repeat=\\\"consignee in AdvSearchCfsCtrl.consignee\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCfsCtrl.secondChildFlg == $index }\\\" ng-click=\\\"AdvSearchCfsCtrl.ttserchdata = \\'Consignee \\'+consignee;AdvSearchCfsCtrl.ttSearch(AdvSearchCfsCtrl.ttserchdata);AdvSearchCfsCtrl.openInputFlag=true;AdvSearchCfsCtrl.clearValues();AdvSearchCfsCtrl.shipmentOpenInputFlag=false;AdvSearchCfsCtrl.secondChildFlg = $index;AdvSearchCfsCtrl.secondChildElem = consignee\\\"><span>{{consignee | underscoreless | capitalize}}</span></div></div></div></div><div id={{AdvSearchCfsCtrl.secondChildFlg}} flex-gt-sm=15 ng-class=\\\"{\\'flex-gt-sm-35\\':(AdvSearchCfsCtrl.secondChildFlg == \\'reason_code\\' ||AdvSearchCfsCtrl.secondChildFlg == \\'service_level\\') }\\\" flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\" ng-if=\\\"AdvSearchCfsCtrl.ttSearchFlag == 1 && AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg] \\\"><div class=adv-search-content><div><div id=btn set-focus=text-field-focus ng-repeat=\\\"thirdChild in AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg] track by $index\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCfsCtrl.thirdChildFlg == $index }\\\" ng-click=\\\" AdvSearchCfsCtrl.clearValues(thirdChild);AdvSearchCfsCtrl.openInputFlag = true;AdvSearchCfsCtrl.checkrangeOrNot(thirdChild);AdvSearchCfsCtrl.ttserchdata = \\'Shipment \\'+AdvSearchCfsCtrl.secondChildFlg+\\' \\'+thirdChild;AdvSearchCfsCtrl.ttSearch(AdvSearchCfsCtrl.ttserchdata);AdvSearchCfsCtrl.thirdChildFlg=$index\\\"><span ng-if=\\\"AdvSearchCfsCtrl.secondChildFlg == \\'status\\' || AdvSearchCfsCtrl.secondChildFlg == \\'equipment_type\\' || AdvSearchCfsCtrl.secondChildFlg == \\'type\\' || AdvSearchCfsCtrl.secondChildFlg == \\'revenue_code\\'\\\">{{thirdChild | underscoreless | uppercase}}</span> <span ng-if=\\\"AdvSearchCfsCtrl.secondChildFlg != \\'status\\' && AdvSearchCfsCtrl.secondChildFlg != \\'equipment_type\\' && AdvSearchCfsCtrl.secondChildFlg != \\'type\\' && AdvSearchCfsCtrl.secondChildFlg != \\'revenue_code\\'\\\">{{thirdChild | underscoreless | capitalize}}</span></div></div></div></div><div layout=column flex=100 flex-gt-sm=\\\"( AdvSearchCfsCtrl.ttSearchFlag == 1 && AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg]) ? 50 : 70\\\" style=\\\"border:1px solid #CCC;padding-left:10px\\\"><div style=\\\"width: 100px;float: right;padding-right: 10px\\\"><md-button ng-show=addAllBtnShow class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-if=\\\"AdvSearchCfsCtrl.secondChildFlg == \\'service_level\\' || AdvSearchCfsCtrl.secondChildFlg == \\'reason_code\\'\\\" data-value=service_level_all ng-click=\\\"AdvSearchCfsCtrl.newSearch(true);\\r\\n AdvSearchCfsCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(AdvSearchCfsCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (AdvSearchCfsCtrl.searchValue) }\\\"><span style=\\\"color: #fff\\\">ADD ALL</span></md-button></div><div layout-gt-sm=row layout-wrap ng-if=AdvSearchCfsCtrl.openInputFlag><div ng-if=\\\"AdvSearchCfsCtrl.secondChildFlg == \\'origin\\' || AdvSearchCfsCtrl.secondChildFlg == \\'destination\\'\\\"><div style=\\\"width: 190px;margin-top: -5px;float: left\\\"><cfs-auto-complete ng-if=\\\"AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg][AdvSearchCfsCtrl.thirdChildFlg] == \\'city\\'\\\" flex-gt-sm=auto field=t_and_t_city search-field={{AdvSearchCfsCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=AdvSearchCfsCtrl.searchValue></cfs-auto-complete><cfs-auto-complete ng-if=\\\"AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg][AdvSearchCfsCtrl.thirdChildFlg] == \\'country\\'\\\" flex-gt-sm=auto field=t_and_t_country search-field={{AdvSearchCfsCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=AdvSearchCfsCtrl.searchValue></cfs-auto-complete><cfs-auto-complete ng-if=\\\"AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg][AdvSearchCfsCtrl.thirdChildFlg] == \\'state\\'\\\" flex-gt-sm=auto field=t_and_t_state search-field={{AdvSearchCfsCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=AdvSearchCfsCtrl.searchValue></cfs-auto-complete><cfs-auto-complete ng-if=\\\"AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg][AdvSearchCfsCtrl.thirdChildFlg] == \\'city_code\\'\\\" flex-gt-sm=auto field=t_and_t_citycountry search-field={{AdvSearchCfsCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=AdvSearchCfsCtrl.searchValue></cfs-auto-complete></div><div style=\\\"width: 100px;float: left\\\"><md-button class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-click=\\\"AdvSearchCfsCtrl.newSearch();\\r\\n AdvSearchCfsCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(AdvSearchCfsCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (AdvSearchCfsCtrl.searchValue)}\\\"><span style=\\\"color: #fff\\\">ADD</span></md-button></div></div><div ng-if=\\\"AdvSearchCfsCtrl.secondChildFlg != \\'origin\\' && AdvSearchCfsCtrl.secondChildFlg != \\'destination\\'\\\"><div style=\\\"width: 190px;margin-top: -13px;float: left\\\" ng-if=\\\"!AdvSearchCfsCtrl.shipmentOpenInputFlag && !AdvSearchCfsCtrl.dateInputFlag && AdvSearchCfsCtrl.secondChildFlg ==\\'lane_pair\\' \\\" ng-mousemove=\\\"AdvSearchCfsCtrl.ttserchdataNew = (AdvSearchCfsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCfsCtrl.searchValue \\\"><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=AdvSearchCfsCtrl.searchValue md-items=\\\"item in AdvSearchCfsCtrl.getMatches(\\'lanepairs\\', AdvSearchCfsCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"\\\"><md-item-template><span md-highlight-text=AdvSearchCfsCtrl.searchValue>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><input id=text-field-focus ng-if=\\\"!AdvSearchCfsCtrl.shipmentOpenInputFlag && !AdvSearchCfsCtrl.dateInputFlag && !AdvSearchCfsCtrl.timeInputFlag && AdvSearchCfsCtrl.secondChildFlg !=\\'lane_pair\\' && AdvSearchCfsCtrl.secondChildFlg !=\\'consol\\' && AdvSearchCfsCtrl.secondChildElem !=\\'bol\\' && AdvSearchCfsCtrl.secondChildElem !=\\'container\\' && AdvSearchCfsCtrl.secondChildElem !=\\'consignee_reference\\' && AdvSearchCfsCtrl.secondChildElem !=\\'pro\\' && AdvSearchCfsCtrl.secondChildElem !=\\'reference\\' && AdvSearchCfsCtrl.secondChildElem !=\\'equipment_type\\' && AdvSearchCfsCtrl.secondChildElem !=\\'type\\' && AdvSearchCfsCtrl.secondChildElem !=\\'revenue_code\\' && AdvSearchCfsCtrl.secondChildElem !=\\'load\\' && AdvSearchCfsCtrl.secondChildElem !=\\'container\\' && AdvSearchCfsCtrl.secondChildElem !=\\'country\\' && AdvSearchCfsCtrl.secondChildElem !=\\'city\\' && AdvSearchCfsCtrl.secondChildElem !=\\'state\\' \\\" ng-model=AdvSearchCfsCtrl.searchValue ng-pattern=\\\"AdvSearchCfsCtrl.secondChildElem == \\'gross_weight\\' || AdvSearchCfsCtrl.secondChildElem == \\'total_pieces\\' || AdvSearchCfsCtrl.secondChildElem == \\'invoice\\' ? \\'^\\\\\\\\d+(\\\\\\\\.\\\\\\\\d+)?$\\' : \\'\\'\\\" style=\\\"width: 150px;margin-top: 8px;float: left\\\"><div style=\\\"width: 190px;margin-top: -5px;float: left\\\" ng-if=\\\"!AdvSearchCfsCtrl.shipmentOpenInputFlag && !AdvSearchCfsCtrl.dateInputFlag && (AdvSearchCfsCtrl.secondChildElem ==\\'city\\' || AdvSearchCfsCtrl.secondChildElem ==\\'state\\' || AdvSearchCfsCtrl.secondChildElem ==\\'country\\'|| AdvSearchCfsCtrl.secondChildElem ==\\'consol\\' || AdvSearchCfsCtrl.secondChildElem ==\\'bol\\' || AdvSearchCfsCtrl.secondChildElem ==\\'container\\' || AdvSearchCfsCtrl.secondChildElem ==\\'consignee_reference\\' || AdvSearchCfsCtrl.secondChildElem ==\\'pro\\' || AdvSearchCfsCtrl.secondChildElem ==\\'reference\\' || AdvSearchCfsCtrl.secondChildElem ==\\'load\\' || AdvSearchCfsCtrl.secondChildElem ==\\'container\\' ) \\\" ng-mousemove=\\\"AdvSearchCfsCtrl.ttserchdataNew = (AdvSearchCfsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCfsCtrl.searchValue \\\"><cfs-auto-complete ng-if=\\\"AdvSearchCfsCtrl.secondChildElem == \\'city\\'\\\" flex-gt-sm=auto field=t_and_t_city search-field={{AdvSearchCfsCtrl.secondChildElem}} display-name=\\\"Enter data\\\" search-text=AdvSearchCfsCtrl.searchValue></cfs-auto-complete><cfs-auto-complete ng-if=\\\"AdvSearchCfsCtrl.secondChildElem != \\'city\\'\\\" field={{AdvSearchCfsCtrl.secondChildElem}} search-field={{AdvSearchCfsCtrl.secondChildElem}} display-name=\\\"Enter data\\\" search-text=AdvSearchCfsCtrl.searchValue></cfs-auto-complete></div><input ng-if=\\\"((!AdvSearchCfsCtrl.shipmentOpenInputFlag && !AdvSearchCfsCtrl.dateInputFlag) && AdvSearchCfsCtrl.inputRangeFlag) \\\" ng-model=AdvSearchCfsCtrl.searchValue2 style=\\\"width: 150px;margin-left: 2px;margin-top: 8px;float: left\\\" ng-pattern=\\\"AdvSearchCfsCtrl.secondChildElem == \\'gross_weight\\' || AdvSearchCfsCtrl.secondChildElem == \\'total_pieces\\' || AdvSearchCfsCtrl.secondChildElem == \\'invoice\\' ? \\'^\\\\\\\\d+(\\\\\\\\.\\\\\\\\d+)?$\\' : \\'\\'\\\"><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCfsCtrl.shipmentOpenInputFlag && AdvSearchCfsCtrl.dateInputFlag\\\" style=\\\"width: 185px;float: left\\\"><mdp-date-picker mdp-min-date=AdvSearchCfsCtrl.minDate mdp-max-date=dateMax ng-change=\\\"AdvSearchCfsCtrl.dateChanged();AdvSearchCfsCtrl.addOneMoreDay(AdvSearchCfsCtrl.searchValue); AdvSearchCfsCtrl.ttserchdataNew = (AdvSearchCfsCtrl.nextElem | underscoreless) + \\' \\'+(AdvSearchCfsCtrl.searchValue | date: \\'MMM dd, yyyy\\')\\\" ng-model=AdvSearchCfsCtrl.searchValue></mdp-date-picker></div><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCfsCtrl.shipmentOpenInputFlag && AdvSearchCfsCtrl.dateInputFlag && AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg][AdvSearchCfsCtrl.thirdChildFlg] == \\'range_to\\'\\\" style=\\\"width: 185px;float: left\\\"><mdp-date-picker mdp-min-date=dateMin ng-change=\\\"AdvSearchCfsCtrl.dateChanged(); AdvSearchCfsCtrl.subtractOneDay(AdvSearchCfsCtrl.searchValue2); AdvSearchCfsCtrl.ttserchdataNew = (AdvSearchCfsCtrl.nextElem | underscoreless) + \\' \\'+(AdvSearchCfsCtrl.searchValue| date: \\'MMM dd, yyyy\\') +\\' \\'+(AdvSearchCfsCtrl.searchValue2 | date: \\'MMM dd, yyyy\\')\\\" ng-model=AdvSearchCfsCtrl.searchValue2></mdp-date-picker></div><!-- Time Picker --><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCfsCtrl.shipmentOpenInputFlag && AdvSearchCfsCtrl.timeInputFlag\\\" style=\\\"width: 185px;float: left\\\"><mdp-time-picker ng-model=AdvSearchCfsCtrl.searchValue></mdp-time-picker></div><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCfsCtrl.shipmentOpenInputFlag && AdvSearchCfsCtrl.timeInputFlag && AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg][AdvSearchCfsCtrl.thirdChildFlg] == \\'range_to\\'\\\" style=\\\"width: 185px;float: left\\\"><mdp-time-picker ng-model=AdvSearchCfsCtrl.searchValue2></mdp-time-picker></div><div id={{AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg][AdvSearchCfsCtrl.thirdChildFlg]}} style=\\\"width: 100px;float: left\\\" ng-show=searchForm.$valid><md-button class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-click=\\\"AdvSearchCfsCtrl.newSearch();\\r\\n AdvSearchCfsCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(AdvSearchCfsCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (AdvSearchCfsCtrl.searchValue) }\\\"><span style=\\\"color: #fff\\\">ADD</span></md-button></div></div></div><span class=error ng-show=searchForm{{AdvSearchCfsCtrl.searchValue}}.$error.pattern style=\\\"color : red\\\">Please enter numeric value.</span></div></div><div flex=100 layout=row style=\\\"min-height: 100px\\\"><div style=\\\"max-width: 100%\\\"><div style=\\\"margin-right: 10px\\\" class=adv-search-chip id={{AdvSearchCfsCtrl.shipment[AdvSearchCfsCtrl.secondChildFlg][AdvSearchCfsCtrl.thirdChildFlg]}}_too><md-chips class=\\\"md-chips custom-chip no-border tt-chip\\\" ng-model=AdvSearchCfsCtrl.chipData md-on-remove=AdvSearchCfsCtrl.chipTempRemoved($chip)><md-chip-template><span><strong><span translate={{$chip.display}}></span><span>:</span></strong> <span ng-if=\\\"$chip.displayValue && $chip.value != \\'\\' \\\"><span ng-if=\\\"$chip.display.includes(\\'Pick Up Time\\')\\\">{{ $chip.value | removeTimeZone }} </span><span ng-if=\\\"$chip.display.includes(\\'Date\\') || $chip.display.includes(\\'DATE\\')\\\">{{$chip.value | date : \\\"MMM dd yyyy\\\"}} </span><span title=$chip.value ng-if=\\\"$chip.display.includes(\\'State\\') || $chip.display.includes(\\'City\\')\\\">{{$chip.value}} </span><span title=\\\"{{$chip.value | advSearchSpaceRemove}}\\\" ng-if=\\\"$chip.display.includes(\\'Equipment Type\\') || $chip.display.includes(\\'Shipment Type\\') || $chip.display.includes(\\'Revenue Code\\') || $chip.display.includes(\\'CONSIGNEE REF #\\') || $chip.display.includes(\\'PRO #\\') || $chip.display.includes(\\'TRACKTRACE.PRO\\') || $chip.display.includes(\\'BOL #\\') || $chip.display.includes(\\'REF #\\') || $chip.display.includes(\\'Reference\\') || $chip.display.includes(\\'LOAD #\\') || $chip.display.includes(\\'Container/Trailer #\\')\\\">{{$chip.value | underscoreless | uppercase}}<!-- {{$chip.value | underscoreless | uppercase}} --> </span><span title=\\\"{{$chip.value | advSearchSpaceRemove}}\\\" ng-if=\\\"$chip.display == \\'TRACKTRACE.FILTER\\'\\\">{{$chip.value | capitalize}} </span><span title=\\\"{{$chip.value | advSearchSpaceRemove}}\\\" ng-if=\\\"!$chip.display.includes(\\'TRACKTRACE.FILTER\\') && !$chip.display.includes(\\'Equipment Type\\') && !$chip.display.includes(\\'Shipment Type\\') && !$chip.display.includes(\\'Revenue Code\\') && !$chip.display.includes(\\'Date\\') && !$chip.display.includes(\\'DATE\\') && !$chip.display.includes(\\'Time\\') && $chip.display != \\'Ship Date\\' && !$chip.display.includes(\\'State\\') && !$chip.display.includes(\\'City\\') && !$chip.display.includes(\\'CONSIGNEE REF #\\') && !$chip.display.includes(\\'Reference\\') && !$chip.display.includes(\\'PRO #\\') && !$chip.display.includes(\\'TRACKTRACE.PRO\\') && !$chip.display.includes(\\'BOL #\\') && !$chip.display.includes(\\'REF #\\') && !$chip.display.includes(\\'LOAD #\\') && !$chip.display.includes(\\'Container/Trailer #\\')\\\">{{$chip.value | underscoreless | capitalize}}<!-- {{$chip.value | underscoreless | capitalize}} --></span></span></span></md-chip-template></md-chips></div></div></div></md-dialog-content><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button ng-click=\\\"AdvSearchCfsCtrl.clearSearch();AdvSearchCfsCtrl.resetSearch();AdvSearchCfsCtrl.ttserchdataNew = \\'\\';AdvSearchCfsCtrl.nextElem=\\'\\';AdvSearchCfsCtrl.clearSearch();\\\" hide-xs><span translate=TRACKTRACE.CLEAR></span></md-button><md-button class=\\\"md-fab md-button md-mini bottom-fab\\\" ng-click=AdvSearchCfsCtrl.showListBottomSheet() show-xs hide-gt-xs><md-icon></md-icon></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" type=submit ng-click=AdvSearchCfsCtrl.advSearch($event) id=btnSearch style=\\\"padding: 0;margin: 0 0 0px 8px\\\"><span id=spSearch translate=TRACKTRACE.SEARCH style=\\\"padding: 10px 18px\\\"></span></md-button></md-dialog-actions></form><div ng-init=AdvSearchCfsCtrl.attachFocusToAutoComplete()></div></md-dialog>\");\n$templateCache.put(\"/app/advanced-search/cfs/adv-search.html\",\"<!-- Advanced Search Dialog --><div ng-controller=\\\"AdvSearchCfsController as AdvSearchCfsCtrl\\\"><!-- show the pills --><div ng-if=\\\"AdvSearchCfsCtrl.chipSearchFields.length > 0\\\" layout-gt-xs=row><span translate=TRACKTRACE.CURRENT_SEARCH>:</span> <span flex=auto></span><md-button class=btn-link md-ink-ripple=false ng-click=AdvSearchCfsCtrl.resetSearch()><span translate=TRACKTRACE.CLEAR_SEARCH></span></md-button></div><!-- md-on-select=\\\"AdvSearchCfsCtrl.chipClicked($chip)\\\" --><md-chips class=\\\"md-chips custom-chip no-border\\\" ng-model=AdvSearchCfsCtrl.chipSearchFields md-on-remove=AdvSearchCfsCtrl.chipRemoved($chip)><md-chip-template><span><strong><span translate={{$chip.display}}></span></strong> <span ng-if=\\\"$chip.displayValue \\\">: <span ng-if=\\\"$chip.display.includes(\\'Pick Up Time\\')\\\">{{ $chip.searchField | removeTimeZone }} </span><span ng-if=\\\"$chip.display.includes(\\'Date\\') || $chip.display.includes(\\'DATE\\')\\\">{{$chip.searchField | date : \\\"MMM dd yyyy\\\"}} </span><span ng-if=\\\"$chip.display.includes(\\'State\\') || $chip.display.includes(\\'City\\')\\\">{{$chip.searchField}} </span><span title=\\\"{{$chip.searchField | advSearchSpaceRemove}}\\\" ng-if=\\\"$chip.display.includes(\\'Equipment Type\\') || $chip.display.includes(\\'Shipment Type\\') || $chip.display.includes(\\'Revenue Code\\') || $chip.display.includes(\\'CONSIGNEE REF #\\') || $chip.display.includes(\\'PRO #\\') || $chip.display.includes(\\'TRACKTRACE.PRO\\') || $chip.display.includes(\\'BOL #\\') || $chip.display.includes(\\'REF #\\') || $chip.display.includes(\\'Reference\\') || $chip.display.includes(\\'LOAD #\\') || $chip.display.includes(\\'Container/Trailer #\\')\\\">{{$chip.searchField | underscoreless | uppercase}} </span><span title=\\\"{{$chip.searchField | advSearchSpaceRemove}}\\\" ng-if=\\\"!$chip.display.includes(\\'Equipment Type\\') && !$chip.display.includes(\\'Shipment Type\\') && !$chip.display.includes(\\'Revenue Code\\') && !$chip.display.includes(\\'DATE\\') && !$chip.display.includes(\\'Date\\') && !$chip.display.includes(\\'Time\\') && $chip.display != \\'Ship Date\\' && !$chip.display.includes(\\'State\\') && !$chip.display.includes(\\'City\\') && !$chip.display.includes(\\'CONSIGNEE REF #\\') && !$chip.display.includes(\\'PRO #\\') && !$chip.display.includes(\\'TRACKTRACE.PRO\\') && !$chip.display.includes(\\'BOL #\\') && !$chip.display.includes(\\'REF #\\') && !$chip.display.includes(\\'Reference\\') && !$chip.display.includes(\\'LOAD #\\') && !$chip.display.includes(\\'Container/Trailer #\\')\\\">{{$chip.searchField | underscoreless | capitalize}}</span></span></span></md-chip-template></md-chips></div>\");\n$templateCache.put(\"/app/advanced-search/cmts/adv-search-form.html\",\"<style>mdp-date-picker .md-button.md-icon-button{\\r\\n margin:10px 0px 0px 0px;\\r\\n }\\r\\n\\r\\n md-input-container{\\r\\n margin:10px 0px 10px 0px;\\r\\n }\\r\\n\\r\\n @media screen and (max-width: 1024px) and (min-width: 960px){\\r\\n \\r\\n div#second-div-block{\\r\\n max-width:23%;\\r\\n }\\r\\n div#invoice_total{\\r\\n max-width:18%;\\r\\n }\\r\\n div#gross_weight{\\r\\n max-width:18%;\\r\\n }\\r\\n div#total_pieces{\\r\\n max-width:18%;\\r\\n }\\r\\n }\\r\\n\\r\\n @media screen and (max-width: 768px) and (min-width: 320px){\\r\\n \\r\\n md-input-container{\\r\\n margin:5px 0px 5px 0px;\\r\\n }\\r\\n\\r\\n mdp-date-picker .md-button.md-icon-button{\\r\\n margin:0px !important;\\r\\n margin-top:5px !important;\\r\\n }\\r\\n\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Advanced Search Modal\\\" ng-controller=\\\"AdvSearchCmtsController as AdvSearchCmtsCtrl\\\" ng-cloak style=\\\"width: 1024px\\\"><form name=searchForm reset-directive=AdvSearchCmtsCtrl.searchFields class=light-form ng-keyup=\\\"$event.keyCode == 13 && AdvSearchCmtsCtrl.formClick($event)\\\"><md-toolbar><div class=md-toolbar-tools><h2 translate=TRACKTRACE.ADVANCE_SEARCH></h2><span flex=auto></span><md-button class=md-icon-button ng-click=AdvSearchCmtsCtrl.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=light-content layout=column><div layout-gt-sm=row><div flex-gt-sm=1 flex-sm=1 flex-xs=1><md-input-container class=\\\"md-block error-hidden\\\"><input class=adv-search-input readonly ng-model=\\\"AdvSearchCmtsCtrl.ttserchdataNew | capitalize\\\" id={{AdvSearchCmtsCtrl.searchFields.customername.field}} ng-keyup=AdvSearchCmtsCtrl.ttSearch(AdvSearchCmtsCtrl.ttserchdataNew)><div></div></md-input-container></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=15 flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\"><div class=adv-search-content><div><div ng-click=\\\"AdvSearchCmtsCtrl.clearFlags(1,\\'Shipment\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCmtsCtrl.ttSearchFlag == 1 }\\\"><span>SHIPMENT</span></div><!--<div ng-click=\\\"AdvSearchCmtsCtrl.clearFlags(2,\\'Pickup\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCmtsCtrl.ttSearchFlag == 2 }\\\"><span>PICK UP</span></div>\\r\\n <div ng-click=\\\"AdvSearchCmtsCtrl.clearFlags(3,\\'Consignee\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCmtsCtrl.ttSearchFlag == 3 }\\\"><span>CONSIGNEE</span></div>--></div></div></div><div id=second-div-block flex-gt-sm=20 flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\" ng-if=\\\"AdvSearchCmtsCtrl.ttSearchFlag != undefined\\\"><div class=adv-search-content><div ng-if=\\\"AdvSearchCmtsCtrl.ttSearchFlag == 1 \\\"><div ng-repeat=\\\"key in notSorted(AdvSearchCmtsCtrl.shipment)\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCmtsCtrl.secondChildFlg == key }\\\" ng-click=\\\"AdvSearchCmtsCtrl.clearValues(key);AdvSearchCmtsCtrl.secondChildElem = key ;AdvSearchCmtsCtrl.ttserchdata = \\'Shipment \\' +key;AdvSearchCmtsCtrl.secondChildFlg = key;AdvSearchCmtsCtrl.ttSearch(AdvSearchCmtsCtrl.ttserchdata);\\r\\n AdvSearchCmtsCtrl.shipmentOpenInputFlag = (key != \\'status\\' && key != \\'load_status\\' && key !=\\'current_status\\' && key !=\\'transport_mode_name\\' && key !=\\'service_level\\' && key !=\\'is_bookmarked\\') ? false : true;AdvSearchCmtsCtrl.openInputFlag= (checkValue(key) == null)?true:false;AdvSearchCmtsCtrl.dateItemOrNot(key);AdvSearchCmtsCtrl.thirdChildFlg = 100\\\" ng-if=\\\"key != \\'bol_number\\' && (AdvSearchCmtsCtrl.hasFinancialPermissions && key == \\'total_invoice_amount\\' || key != \\'total_invoice_amount\\')\\\"><span ng-if=\\\"key == \\'status\\'\\\">Status</span> <span ng-if=\\\"key == \\'load_status\\'\\\">Load Status</span> <span ng-if=\\\"key == \\'load_number\\'\\\">Load #</span> <span ng-if=\\\"key == \\'planned_start\\'\\\">Planned Start</span> <span ng-if=\\\"key == \\'planned_end\\'\\\">Planned End</span> <span ng-if=\\\"key == \\'pickup_location\\'\\\">Pick-up Location</span> <span ng-if=\\\"key == \\'delivery_location\\'\\\">Delivery Location</span> <span ng-if=\\\"key == \\'route_number\\'\\\">Route Number</span> <span ng-if=\\\"key == \\'total_gross_wt\\'\\\">Total Gross Weight</span> <span ng-if=\\\"key == \\'total_piece_count\\'\\\">Total Piece Count</span> <span ng-if=\\\"key == \\'bol_number\\'\\\">BOL #</span> <span ng-if=\\\"key == \\'pro_number\\'\\\">Pro #</span> <span ng-if=\\\"key == \\'load_billing_invoice_status\\'\\\">Billing Status</span> <span ng-if=\\\"key == \\'stop_count\\'\\\">Stop Count</span> <span ng-if=\\\"key == \\'order_count\\'\\\">Order Count</span> <span ng-if=\\\"key == \\'trading_partner_carrier_name\\'\\\">TP Carrier Name</span> <span ng-if=\\\"key == \\'trading_partner_carrier_number\\'\\\">TP Carrier Number</span> <span ng-if=\\\"key == \\'transport_mode_name\\'\\\">Transport Mode</span> <span ng-if=\\\"key == \\'equipment_name\\'\\\">Equipment Name</span> <span ng-if=\\\"key == \\'trading_partner_client_name\\'\\\">TP Client Name</span> <span ng-if=\\\"key == \\'trading_partner_client_number\\'\\\">TP Client Number</span> <span ng-if=\\\"key == \\'service_option_name\\'\\\">Service Option</span> <span ng-if=\\\"key == \\'total_invoice_amount\\'\\\">Total Invoice Amount</span> <span ng-if=\\\"key == \\'is_bookmarked\\'\\\">IsBookmarked</span> <span ng-if=\\\"key != \\'transport_mode_name\\' && key != \\'total_invoice_amount\\' && key != \\'equipment_name\\' && key != \\'load_billing_invoice_status\\' && key != \\'load_number\\' && key != \\'is_bookmarked\\' && key != \\'planned_start\\' && key != \\'planned_end\\' && key != \\'load_status\\' && key != \\'status\\' && key != \\'pickup_location\\' && key != \\'delivery_location\\' && key != \\'route_number\\' && key != \\'total_gross_wt\\' && key != \\'total_piece_count\\' && key != \\'bol_number\\' && key != \\'pro_number\\' && key != \\'stop_count\\' && key != \\'order_count\\' && key != \\'trading_partner_carrier_name\\' && key != \\'trading_partner_carrier_number\\' && key != \\'trading_partner_client_name\\' && key != \\'trading_partner_client_number\\' && key != \\'service_option_name\\' && key != \\'total_invoice_amount\\'\\\">{{key | underscoreless | capitalize}}</span></div></div></div></div><div id={{AdvSearchCmtsCtrl.secondChildFlg}} flex-gt-sm=15 ng-class=\\\"{\\'flex-gt-sm-35\\':(AdvSearchCfsCtrl.secondChildFlg.toLowerCase() == \\'load_status\\' ||AdvSearchCfsCtrl.secondChildFlg.toLowerCase() == \\'status\\') }\\\" flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\" ng-if=\\\"AdvSearchCmtsCtrl.ttSearchFlag == 1 && AdvSearchCmtsCtrl.shipment[AdvSearchCmtsCtrl.secondChildFlg] \\\"><div class=adv-search-content><div><div id=btn ng-repeat=\\\"thirdChild in AdvSearchCmtsCtrl.shipment[AdvSearchCmtsCtrl.secondChildFlg] track by $index\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCmtsCtrl.thirdChildFlg == $index }\\\" ng-click=\\\" AdvSearchCmtsCtrl.clearValues(thirdChild);AdvSearchCmtsCtrl.openInputFlag = true;AdvSearchCmtsCtrl.checkrangeOrNot(thirdChild);AdvSearchCmtsCtrl.ttserchdata = \\'Shipment \\'+AdvSearchCmtsCtrl.secondChildFlg+\\' \\'+thirdChild;AdvSearchCmtsCtrl.ttSearch(AdvSearchCmtsCtrl.ttserchdata);AdvSearchCmtsCtrl.thirdChildFlg=$index\\\"><span ng-if=\\\"AdvSearchCmtsCtrl.secondChildFlg.toLowerCase() == \\'load_status\\' ||\\r\\n AdvSearchCmtsCtrl.secondChildFlg.toLowerCase() == \\'status\\'\\r\\n || AdvSearchCmtsCtrl.secondChildFlg.toLowerCase() == \\'equipment_name\\' || AdvSearchCmtsCtrl.secondChildFlg.toLowerCase() == \\'load_billing_invoice_status\\' || AdvSearchCmtsCtrl.secondChildFlg.toLowerCase() == \\'service_option_name\\'\\\">{{thirdChild.toUpperCase() | underscoreless | capitalize}}</span> <span ng-if=\\\"AdvSearchCmtsCtrl.secondChildFlg.toLowerCase() != \\'status\\' && AdvSearchCmtsCtrl.secondChildFlg.toLowerCase() != \\'load_status\\' && AdvSearchCmtsCtrl.secondChildFlg.toLowerCase() != \\'equipment_name\\' && AdvSearchCmtsCtrl.secondChildFlg.toLowerCase() != \\'load_billing_invoice_status\\' && AdvSearchCmtsCtrl.secondChildFlg.toLowerCase() != \\'service_option_name\\'\\\">{{thirdChild.toUpperCase() | underscoreless | capitalize}}</span></div></div></div></div><div layout=column flex=100 flex-gt-sm=\\\"( AdvSearchCmtsCtrl.ttSearchFlag == 1 && AdvSearchCmtsCtrl.shipment[AdvSearchCmtsCtrl.secondChildFlg]) ? 50 : 70\\\" style=\\\"border:1px solid #CCC;padding-left:10px\\\"><div style=\\\"width: 100px;float: right;padding-right: 10px\\\"><md-button ng-show=addAllBtnShow class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-if=\\\"AdvSearchCmtsCtrl.secondChildFlg == \\'service_level\\' || AdvSearchCmtsCtrl.secondChildFlg == \\'load_status\\' || AdvSearchCmtsCtrl.secondChildFlg == \\'status\\'\\\" data-value=service_level_all ng-click=\\\"AdvSearchCmtsCtrl.newSearch(true);\\r\\n AdvSearchCmtsCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(AdvSearchCmtsCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (AdvSearchCmtsCtrl.searchValue) }\\\"><span style=\\\"color: #fff\\\">ADD ALL</span></md-button></div><div layout-gt-sm=row layout-wrap ng-if=AdvSearchCmtsCtrl.openInputFlag><div ng-if=\\\"AdvSearchCmtsCtrl.secondChildFlg.toLowerCase().includes(\\'status\\') || AdvSearchCmtsCtrl.secondChildFlg == \\'load_status\\'\\\"><div style=\\\"width: 100px;float: left\\\"><md-button class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-click=\\\"AdvSearchCmtsCtrl.newSearch();\\r\\n AdvSearchCmtsCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(AdvSearchCmtsCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (AdvSearchCmtsCtrl.searchValue)}\\\"><span style=\\\"color: #fff\\\">ADD</span></md-button></div></div><div ng-if=\\\"AdvSearchCmtsCtrl.secondChildFlg != \\'status\\' && AdvSearchCmtsCtrl.secondChildFlg != \\'load_status\\' && AdvSearchCmtsCtrl.secondChildFlg != \\'load_billing_invoice_status\\'\\\"><div style=\\\"width: 190px;margin-top: -13px;float: left\\\" ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag && AdvSearchCmtsCtrl.secondChildFlg ==\\'load_number\\' \\\" ng-mousemove=\\\"AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCmtsCtrl.searchValue \\\"><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=3 md-require-match=true md-search-text=AdvSearchCmtsCtrl.searchValue md-items=\\\"item in AdvSearchCmtsCtrl.getMatches(\\'load_number\\', AdvSearchCmtsCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"\\\"><md-item-template><span md-highlight-text=AdvSearchCmtsCtrl.searchValue>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><div style=\\\"width: 190px;margin-top: -13px;float: left\\\" ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag && AdvSearchCmtsCtrl.secondChildFlg ==\\'route_number\\' \\\" ng-mousemove=\\\"AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCmtsCtrl.searchValue \\\"><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=3 md-require-match=true md-search-text=AdvSearchCmtsCtrl.searchValue md-items=\\\"item in AdvSearchCmtsCtrl.getMatches(\\'route_number\\', AdvSearchCmtsCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"\\\"><md-item-template><span md-highlight-text=AdvSearchCmtsCtrl.searchValue>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><div style=\\\"width: 190px;margin-top: -13px;float: left\\\" ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag && AdvSearchCmtsCtrl.secondChildFlg ==\\'bol_number\\' \\\" ng-mousemove=\\\"AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCmtsCtrl.searchValue \\\"><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=3 md-require-match=true md-search-text=AdvSearchCmtsCtrl.searchValue md-items=\\\"item in AdvSearchCmtsCtrl.getMatches(\\'bol_number\\', AdvSearchCmtsCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"\\\"><md-item-template><span md-highlight-text=AdvSearchCmtsCtrl.searchValue>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><div style=\\\"width: 190px;margin-top: -13px;float: left\\\" ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag && AdvSearchCmtsCtrl.secondChildFlg ==\\'pro_number\\' \\\" ng-mousemove=\\\"AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCmtsCtrl.searchValue \\\"><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=3 md-require-match=true md-search-text=AdvSearchCmtsCtrl.searchValue md-items=\\\"item in AdvSearchCmtsCtrl.getMatches(\\'pro_number\\', AdvSearchCmtsCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"\\\"><md-item-template><span md-highlight-text=AdvSearchCmtsCtrl.searchValue>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><div style=\\\"width: 190px;margin-top: -13px;float: left\\\" ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag && AdvSearchCmtsCtrl.secondChildFlg ==\\'trading_partner_carrier_name\\' \\\" ng-mousemove=\\\"AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCmtsCtrl.searchValue \\\"><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=3 md-require-match=true md-search-text=AdvSearchCmtsCtrl.searchValue md-items=\\\"item in AdvSearchCmtsCtrl.getMatches(\\'trading_partner_carrier_name\\', AdvSearchCmtsCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"\\\"><md-item-template><span md-highlight-text=AdvSearchCmtsCtrl.searchValue>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><div style=\\\"width: 190px;margin-top: -13px;float: left\\\" ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag && AdvSearchCmtsCtrl.secondChildFlg ==\\'trading_partner_carrier_number\\' \\\" ng-mousemove=\\\"AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCmtsCtrl.searchValue \\\"><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=3 md-require-match=true md-search-text=AdvSearchCmtsCtrl.searchValue md-items=\\\"item in AdvSearchCmtsCtrl.getMatches(\\'trading_partner_carrier_number\\', AdvSearchCmtsCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"\\\"><md-item-template><span md-highlight-text=AdvSearchCmtsCtrl.searchValue>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><div style=\\\"width: 190px;margin-top: -13px;float: left\\\" ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag && AdvSearchCmtsCtrl.secondChildFlg ==\\'trading_partner_client_name\\' \\\" ng-mousemove=\\\"AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCmtsCtrl.searchValue \\\"><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=3 md-require-match=true md-search-text=AdvSearchCmtsCtrl.searchValue md-items=\\\"item in AdvSearchCmtsCtrl.getMatches(\\'trading_partner_client_name\\', AdvSearchCmtsCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"\\\"><md-item-template><span md-highlight-text=AdvSearchCmtsCtrl.searchValue>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><div style=\\\"width: 190px;margin-top: -13px;float: left\\\" ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag && AdvSearchCmtsCtrl.secondChildFlg ==\\'trading_partner_client_number\\' \\\" ng-mousemove=\\\"AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCmtsCtrl.searchValue \\\"><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=3 md-require-match=true md-search-text=AdvSearchCmtsCtrl.searchValue md-items=\\\"item in AdvSearchCmtsCtrl.getMatches(\\'trading_partner_client_number\\', AdvSearchCmtsCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"\\\"><md-item-template><span md-highlight-text=AdvSearchCmtsCtrl.searchValue>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><input id=text-field-focus ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag && !AdvSearchCmtsCtrl.timeInputFlag && AdvSearchCmtsCtrl.secondChildFlg !=\\'load_status\\' && AdvSearchCmtsCtrl.secondChildFlg !=\\'status\\' && AdvSearchCmtsCtrl.secondChildFlg !=\\'route_number\\' && AdvSearchCmtsCtrl.secondChildElem !=\\'bol_number\\' && AdvSearchCmtsCtrl.secondChildElem !=\\'pro_number\\' && AdvSearchCmtsCtrl.secondChildElem !=\\'load_number\\' && AdvSearchCmtsCtrl.secondChildElem !=\\'equipment_name\\' && AdvSearchCmtsCtrl.secondChildElem !=\\'load_billing_invoice_status\\'\\r\\n && AdvSearchCmtsCtrl.secondChildElem !=\\'trading_partner_carrier_name\\'\\r\\n && AdvSearchCmtsCtrl.secondChildElem !=\\'trading_partner_carrier_number\\'\\r\\n && AdvSearchCmtsCtrl.secondChildElem !=\\'trading_partner_client_name\\'\\r\\n && AdvSearchCmtsCtrl.secondChildElem !=\\'trading_partner_client_number\\'\\r\\n && AdvSearchCmtsCtrl.secondChildElem !=\\'transport_mode_name\\'\\r\\n && AdvSearchCmtsCtrl.secondChildElem !=\\'service_option_name\\'\\r\\n && AdvSearchCmtsCtrl.secondChildElem !=\\'Is_Bookmarked\\'\\\" ng-model=AdvSearchCmtsCtrl.searchValue ng-pattern=\\\"AdvSearchCmtsCtrl.secondChildElem == \\'total_invoice_amount\\' || AdvSearchCmtsCtrl.secondChildElem == \\'total_piece_count\\' || AdvSearchCmtsCtrl.secondChildElem == \\'total_gross_wt\\' ? \\'^\\\\\\\\d+(\\\\\\\\.\\\\\\\\d+)?$\\' : \\'\\'\\\" style=\\\"width: 150px;margin-top: 8px;float: left\\\"><div style=\\\"width: 190px;margin-top: -5px;float: left\\\" ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag && (AdvSearchCmtsCtrl.secondChildElem ==\\'total_invoice_amount\\' || AdvSearchCmtsCtrl.secondChildElem ==\\'total_piece_count\\' || AdvSearchCmtsCtrl.secondChildElem ==\\'total_gross_wt\\'|| AdvSearchCmtsCtrl.secondChildElem ==\\'stop_count\\' || AdvSearchCmtsCtrl.secondChildElem ==\\'order_count\\' || AdvSearchCmtsCtrl.secondChildElem ==\\'pickup_location\\' || AdvSearchCmtsCtrl.secondChildElem ==\\'delivery_location\\'\\\" ng-mousemove=\\\"AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCmtsCtrl.searchValue \\\"><cmts-auto-complete ng-if=\\\"AdvSearchCmtsCtrl.secondChildElem == \\'pickup_location\\'\\\" flex-gt-sm=auto field=t_and_t_pickup_location search-field={{AdvSearchCmtsCtrl.secondChildElem}} display-name=\\\"Enter data\\\" search-text=AdvSearchCmtsCtrl.searchValue></cmts-auto-complete><cmts-auto-complete ng-if=\\\"AdvSearchCmtsCtrl.secondChildElem != \\'pickup_location\\'\\\" field={{AdvSearchCmtsCtrl.secondChildElem}} search-field={{AdvSearchCmtsCtrl.secondChildElem}} display-name=\\\"Enter data\\\" search-text=AdvSearchCmtsCtrl.searchValue></cmts-auto-complete></div><input ng-if=\\\"((!AdvSearchCmtsCtrl.shipmentOpenInputFlag && !AdvSearchCmtsCtrl.dateInputFlag) && AdvSearchCmtsCtrl.inputRangeFlag) \\\" ng-model=AdvSearchCmtsCtrl.searchValue2 style=\\\"width: 150px;margin-left: 2px;margin-top: 8px;float: left\\\" ng-pattern=\\\"AdvSearchCmCtrl.secondChildElem == \\'total_gross_wt\\' || AdvSearchtCtrl.secondChildElem == \\'total_piece_count\\' || AdvSearchCmtsCtrl.secondChildElem == \\'total_invoice_amount\\' ? \\'^\\\\\\\\d+(\\\\\\\\.\\\\\\\\d+)?$\\' : \\'\\'\\\"><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && AdvSearchCmtsCtrl.dateInputFlag\\\" style=\\\"width: 185px;float: left\\\"><mdp-date-picker mdp-min-date=AdvSearchCmtsCtrl.minDate mdp-max-date=dateMax ng-change=\\\"AdvSearchCmtsCtrl.dateChanged();AdvSearchCmtsCtrl.addOneMoreDay(AdvSearchCmtsCtrl.searchValue); AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+(AdvSearchCmtsCtrl.searchValue | date: \\'MMM dd, yyyy\\')\\\" ng-model=AdvSearchCmtsCtrl.searchValue></mdp-date-picker></div><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && AdvSearchCmtsCtrl.dateInputFlag && AdvSearchCmtsCtrl.shipment[AdvSearchCmtsCtrl.secondChildFlg][AdvSearchCmtsCtrl.thirdChildFlg] == \\'range_to\\'\\\" style=\\\"width: 185px;float: left\\\"><mdp-date-picker mdp-min-date=dateMin ng-change=\\\"AdvSearchCmtsCtrl.dateChanged(); AdvSearchCmtsCtrl.subtractOneDay(AdvSearchCmtsCtrl.searchValue2); AdvSearchCmtsCtrl.ttserchdataNew = (AdvSearchCmtsCtrl.nextElem | underscoreless) + \\' \\'+(AdvSearchCmtsCtrl.searchValue| date: \\'MMM dd, yyyy\\') +\\' \\'+(AdvSearchCmtsCtrl.searchValue2 | date: \\'MMM dd, yyyy\\')\\\" ng-model=AdvSearchCmtsCtrl.searchValue2></mdp-date-picker></div><!-- Time Picker --><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && AdvSearchCmtsCtrl.timeInputFlag\\\" style=\\\"width: 185px;float: left\\\"><mdp-time-picker ng-model=AdvSearchCmtsCtrl.searchValue></mdp-time-picker></div><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCmtsCtrl.shipmentOpenInputFlag && AdvSearchCmtsCtrl.timeInputFlag && AdvSearchCmtsCtrl.shipment[AdvSearchCmtsCtrl.secondChildFlg][AdvSearchCmtsCtrl.thirdChildFlg] == \\'range_to\\'\\\" style=\\\"width: 185px;float: left\\\"><mdp-time-picker ng-model=AdvSearchCmtsCtrl.searchValue2></mdp-time-picker></div><div id={{AdvSearchCmtsCtrl.shipment[AdvSearchCmtsCtrl.secondChildFlg][AdvSearchCmtsCtrl.thirdChildFlg]}} style=\\\"width: 100px;float: left\\\" ng-show=searchForm.$valid><md-button class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-click=\\\"AdvSearchCmtsCtrl.newSearch();\\r\\n AdvSearchCmtsCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(AdvSearchCmtsCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (AdvSearchCmtsCtrl.searchValue) }\\\"><span style=\\\"color: #fff\\\">ADD</span></md-button></div></div></div><span class=error ng-show=searchForm{{AdvSearchCmtsCtrl.searchValue}}.$error.pattern style=\\\"color : red\\\">Please enter numeric value.</span></div></div><div flex=100 layout=row style=\\\"min-height: 100px\\\"><div style=\\\"max-width: 100%\\\"><div style=\\\"margin-right: 10px\\\" class=adv-search-chip id={{AdvSearchCmtsCtrl.shipment[AdvSearchCmtsCtrl.secondChildFlg][AdvSearchCmtsCtrl.thirdChildFlg]}}_too><md-chips class=\\\"md-chips custom-chip no-border tt-chip\\\" ng-model=AdvSearchCmtsCtrl.chipData md-on-remove=AdvSearchCmtsCtrl.chipTempRemoved($chip)><md-chip-template><span><strong><span translate={{$chip.display}}></span><span>:</span></strong> <span ng-if=\\\"$chip.displayValue && $chip.value != \\'\\' \\\"><span ng-if=\\\"$chip.display.includes(\\'Pick Up Time\\')\\\">{{ $chip.value | removeTimeZone }} </span><span ng-if=\\\"$chip.display.includes(\\'Date\\') || $chip.display.includes(\\'DATE\\')\\\">{{$chip.value | date : \\\"MMM dd yyyy\\\"}} </span><span title=$chip.value ng-if=\\\"$chip.display.includes(\\'State\\') || $chip.display.includes(\\'City\\')\\\">{{$chip.value}} </span><span title=\\\"{{$chip.value | advSearchSpaceRemove}}\\\" ng-if=\\\"$chip.display.includes(\\'Equipment Name\\') || $chip.display.includes(\\'Billing Status\\') || $chip.display.includes(\\'Status\\') || $chip.display.includes(\\'Load\\') || $chip.display.includes(\\'Planned Start\\') || $chip.display.includes(\\'Planned End\\') || $chip.display.includes(\\'PRO #\\') || $chip.display.includes(\\'BOL #\\') || $chip.display.includes(\\'LOAD #\\')\\\">{{$chip.value | underscoreless | uppercase}}<!-- {{$chip.value | underscoreless | uppercase}} --> </span><span title=\\\"{{$chip.value | advSearchSpaceRemove}}\\\" ng-if=\\\"$chip.display == \\'TRACKTRACE.FILTER\\'\\\">{{$chip.value | capitalize}} </span><span title=\\\"{{$chip.value | advSearchSpaceRemove}}\\\" ng-if=\\\"!$chip.display.includes(\\'TRACKTRACE.FILTER\\') && !$chip.display.includes(\\'Equipment Name\\') && !$chip.display.includes(\\'Billing Status\\') && !$chip.display.includes(\\'Status\\') && !$chip.display.includes(\\'Planned\\') && !$chip.display.includes(\\'Equipment Name\\') && !$chip.display.includes(\\'PRO #\\') && !$chip.display.includes(\\'BOL #\\') && !$chip.display.includes(\\'LOAD #\\')\\\">{{$chip.value | underscoreless | capitalize}}<!-- {{$chip.value | underscoreless | capitalize}} --></span></span></span></md-chip-template></md-chips></div></div></div></md-dialog-content><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button ng-click=\\\"AdvSearchCmtsCtrl.clearSearch();AdvSearchCmtsCtrl.resetSearch();AdvSearchCmtsCtrl.ttserchdataNew = \\'\\';AdvSearchCmtsCtrl.nextElem=\\'\\';AdvSearchCmtsCtrl.clearSearch();\\\" hide-xs><span translate=TRACKTRACE.CLEAR></span></md-button><md-button class=\\\"md-fab md-button md-mini bottom-fab\\\" ng-click=AdvSearchCmtsCtrl.showListBottomSheet() show-xs hide-gt-xs><md-icon></md-icon></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" type=submit ng-click=AdvSearchCmtsCtrl.advSearch($event) id=btnSearch style=\\\"padding: 0;margin: 0 0 0px 8px\\\"><span id=spSearch translate=TRACKTRACE.SEARCH style=\\\"padding: 10px 18px\\\"></span></md-button></md-dialog-actions></form><div ng-init=AdvSearchCmtsCtrl.attachFocusToAutoComplete()></div></md-dialog>\");\n$templateCache.put(\"/app/advanced-search/cmts/adv-search.html\",\"<!-- Advanced Search Dialog --><div ng-controller=\\\"AdvSearchCmtsController as AdvSearchCmtsCtrl\\\"><!-- show the pills --><div ng-if=\\\"AdvSearchCmtsCtrl.chipSearchFields.length > 0\\\" layout-gt-xs=row><span translate=TRACKTRACE.CURRENT_SEARCH>:</span> <span flex=auto></span><md-button class=btn-link md-ink-ripple=false ng-click=AdvSearchCmtsCtrl.resetSearch()><span translate=TRACKTRACE.CLEAR_SEARCH></span></md-button></div><!-- md-on-select=\\\"AdvSearchCmtsCtrl.chipClicked($chip)\\\" --><md-chips class=\\\"md-chips custom-chip no-border\\\" ng-model=AdvSearchCmtsCtrl.chipSearchFields md-on-remove=AdvSearchCmtsCtrl.chipRemoved($chip)><md-chip-template><span><strong><span translate={{$chip.display}}></span></strong> <span ng-if=\\\"$chip.displayValue \\\">: <span ng-if=\\\"$chip.display.includes(\\'Pick Up Time\\')\\\">{{ $chip.searchField | removeTimeZone }} </span><span ng-if=\\\"$chip.display.includes(\\'Date\\') || $chip.display.includes(\\'DATE\\')\\\">{{$chip.searchField | date : \\\"MMM dd yyyy\\\"}} </span><span ng-if=\\\"$chip.display.includes(\\'State\\') || $chip.display.includes(\\'City\\')\\\">{{$chip.searchField}} </span><span title=\\\"{{$chip.searchField | advSearchSpaceRemove}}\\\" ng-if=\\\"$chip.display.toLowerCase().includes(\\'equipment\\') || $chip.display.toLowerCase().includes(\\'status\\') || $chip.display.toLowerCase().includes(\\'load\\') || $chip.display.toLowerCase().includes(\\'Planned Start\\') || $chip.display.toLowerCase().includes(\\'pro\\') || $chip.display.toLowerCase().includes(\\'TP Carrier Number\\') || $chip.display.toLowerCase().includes(\\'bol\\') || $chip.display.toLowerCase().includes(\\'mode\\') || $chip.display.toLowerCase().includes(\\'number\\') || $chip.display.toLowerCase().includes(\\'client\\') || $chip.display.toLowerCase().includes(\\'option\\')\\r\\n || $chip.display.toLowerCase().includes(\\'total\\')\\r\\n || $chip.display.toLowerCase().includes(\\'isbookmarked\\')\\r\\n || $chip.display.toLowerCase().includes(\\'location\\')\\r\\n || $chip.display.toLowerCase().includes(\\'planned\\')\\r\\n || $chip.display.toLowerCase().includes(\\'delivery\\')\\r\\n || $chip.display.toLowerCase().includes(\\'route\\')\\r\\n || $chip.display.toLowerCase().includes(\\'gross\\')\\r\\n || $chip.display.toLowerCase().includes(\\'count\\')\\r\\n || $chip.display.toLowerCase().includes(\\'reference\\')\\r\\n || $chip.display.toLowerCase().includes(\\'billing\\')\\\">{{$chip.searchField | underscoreless }} </span><span title=\\\"{{$chip.searchField | advSearchSpaceRemove}}\\\" ng-if=\\\"!$chip.display.toLowerCase().includes(\\'equipment\\') && !$chip.display.toLowerCase().includes(\\'type\\') && !$chip.display.includes(\\'date\\') && !$chip.display.includes(\\'time\\')\\r\\n && !$chip.display.includes(\\'load\\') && !$chip.display.toLowerCase().includes(\\'pro\\') && $chip.display.toLowerCase().includes(\\'carrier\\') && !$chip.display.toLowerCase().includes(\\'bol\\') && $chip.display.toLowerCase().includes(\\'Tmode\\') && !$chip.display.toLowerCase().includes(\\'number\\') && !$chip.display.includes(\\'client\\') && !$chip.display.toLowerCase().includes(\\'option\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'Status\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'amount\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'isbookmarked\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'lcation\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'planned\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'delivery\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'route\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'gross\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'total\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'billing\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'reference\\')\\r\\n && !$chip.display.toLowerCase().includes(\\'count\\')\\\">{{$chip.searchField | underscoreless }}</span></span></span></md-chip-template></md-chips></div>\");\n$templateCache.put(\"/app/advanced-search/cmts/auto-complete-field.html\",\"<md-autocomplete md-selected-item=searchCtrl.selectedItem md-search-text-change=searchCtrl.searchTextChange(searchText) md-search-text=searchText md-selected-item-change=searchCtrl.selectedItemChange(item) md-input-id={{searchField}} md-items=\\\"item in searchCtrl.autocomplete(field, searchText, extraParamString)\\\" md-item-text=item.display md-min-length=2 md-floating-label=\\\"{{displayName | translate}}\\\" md-delay=300 class=\\\"md-block error-hidden\\\"><md-item-template><span md-highlight-text=searchText ng-if=\\\"field !=\\'citycountry\\'\\\">{{item.display}}</span> <span md-highlight-text=searchText ng-if=\\\"field ==\\'citycountry\\'\\\">{{item.display}}</span></md-item-template><md-not-found>No entries were found.</md-not-found></md-autocomplete>\");\n$templateCache.put(\"/app/advanced-search/csl/adv-search-form.html\",\"<style>mdp-date-picker .md-button.md-icon-button{\\r\\n margin:10px 0px 0px 0px;\\r\\n }\\r\\n\\r\\n md-input-container{\\r\\n margin:10px 0px 10px 0px;\\r\\n }\\r\\n\\r\\n @media screen and (max-width: 1024px) and (min-width: 960px){\\r\\n \\r\\n div#second-div-block{\\r\\n max-width:23%;\\r\\n }\\r\\n div#invoice_total{\\r\\n max-width:18%;\\r\\n }\\r\\n div#gross_weight{\\r\\n max-width:18%;\\r\\n }\\r\\n div#total_pieces{\\r\\n max-width:18%;\\r\\n }\\r\\n }\\r\\n\\r\\n @media screen and (max-width: 768px) and (min-width: 320px){\\r\\n \\r\\n md-input-container{\\r\\n margin:5px 0px 5px 0px;\\r\\n }\\r\\n\\r\\n mdp-date-picker .md-button.md-icon-button{\\r\\n margin:0px !important;\\r\\n margin-top:5px !important;\\r\\n }\\r\\n\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Advanced Search Modal\\\" ng-controller=\\\"AdvSearchCslController as AdvSearchCslCtrl\\\" ng-cloak style=\\\"width: 1024px\\\"><form name=searchForm reset-directive=AdvSearchCslCtrl.searchFields class=light-form ng-keyup=\\\"$event.keyCode == 13 && AdvSearchCslCtrl.formClick($event)\\\"><md-toolbar><div class=md-toolbar-tools><h2 translate=TRACKTRACE.ADVANCE_SEARCH></h2><span flex=auto></span><md-button class=md-icon-button ng-click=AdvSearchCslCtrl.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=light-content layout=column><div layout-gt-sm=row><div flex-gt-sm=1 flex-sm=1 flex-xs=1><md-input-container class=\\\"md-block error-hidden\\\"><input class=adv-search-input readonly ng-model=\\\"AdvSearchCslCtrl.ttserchdataNew | capitalize\\\" id={{AdvSearchCslCtrl.searchFields.customername.field}} ng-keyup=AdvSearchCslCtrl.ttSearch(AdvSearchCslCtrl.ttserchdataNew)><div></div></md-input-container></div></div><div layout-gt-sm=row layout-wrap><div flex-gt-sm=15 flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\"><div class=adv-search-content><div><div ng-click=\\\"AdvSearchCslCtrl.clearFlags(1,\\'Shipment\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCslCtrl.ttSearchFlag == 1 }\\\"><span>SHIPMENT</span></div><div ng-click=\\\"AdvSearchCslCtrl.clearFlags(2,\\'Pickup\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCslCtrl.ttSearchFlag == 2 }\\\"><span>PICK UP</span></div><div ng-click=\\\"AdvSearchCslCtrl.clearFlags(3,\\'Consignee\\')\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCslCtrl.ttSearchFlag == 3 }\\\"><span>CONSIGNEE</span></div></div></div></div><div id=second-div-block flex-gt-sm=20 flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\" ng-if=\\\"AdvSearchCslCtrl.ttSearchFlag != undefined\\\"><div class=adv-search-content><div ng-if=\\\"AdvSearchCslCtrl.ttSearchFlag == 1 \\\"><div ng-repeat=\\\"key in notSorted(AdvSearchCslCtrl.shipment)\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCslCtrl.secondChildFlg == key }\\\" ng-click=\\\"AdvSearchCslCtrl.clearValues(key);AdvSearchCslCtrl.secondChildElem = key ;AdvSearchCslCtrl.ttserchdata = \\'Shipment \\' +key;AdvSearchCslCtrl.secondChildFlg = key;AdvSearchCslCtrl.ttSearch(AdvSearchCslCtrl.ttserchdata);\\r\\n AdvSearchCslCtrl.shipmentOpenInputFlag = (key != \\'status\\' && key !=\\'current_status\\' && key !=\\'mode\\' && key !=\\'service_level\\' && key !=\\'reason_code\\' && key !=\\'is_bookmarked\\') ? false : true;AdvSearchCslCtrl.openInputFlag= (checkValue(key) == null)?true:false;AdvSearchCslCtrl.dateItemOrNot(key);AdvSearchCslCtrl.thirdChildFlg = 100\\\" ng-if=\\\"key != \\'awb\\' && (AdvSearchCslCtrl.hasFinancialPermissions && key == \\'invoice_total\\' || key != \\'invoice_total\\')\\\"><span ng-if=\\\"key == \\'mode\\'\\\">Business Type</span> <span ng-if=\\\"key == \\'invoice_total\\'\\\">Invoice Total</span> <span ng-if=\\\"key == \\'equipment_type\\'\\\">Type of Equipment</span> <span ng-if=\\\"key == \\'type\\'\\\">Shipment Type</span> <span ng-if=\\\"key == \\'is_bookmarked\\'\\\">isBookMarked</span> <span ng-if=\\\"key == \\'pickup_date\\'\\\">Pick Up Date</span> <span ng-if=\\\"key == \\'pickup_time\\'\\\">Pick Up Time</span> <span ng-if=\\\"key == \\'reason_code\\'\\\">Exception</span> <span ng-if=\\\"key == \\'estimateddelivery_date\\'\\\">Estimated Delivery</span> <span ng-if=\\\"key == \\'delivereddate_date\\'\\\">Delivery Date</span> <span ng-if=\\\"key == \\'duedate_date\\'\\\">Due Date</span> <span ng-if=\\\"key == \\'shipdate_date\\'\\\">Ship Date</span> <span ng-if=\\\"key == \\'consignee_reference\\'\\\">CONSIGNEE REF #</span> <span ng-if=\\\"key == \\'pro\\'\\\">PRO #</span> <span ng-if=\\\"key == \\'bol\\'\\\">BOL #</span> <span ng-if=\\\"key == \\'reference\\'\\\">REF #</span> <span ng-if=\\\"key == \\'origin\\'\\\">Pick Up</span> <span ng-if=\\\"key == \\'destination\\'\\\">Delivery</span> <span ng-if=\\\"key == \\'load\\'\\\">LOAD #</span> <span ng-if=\\\"key == \\'container\\'\\\">Container/Trailer #</span> <span ng-if=\\\"key == \\'deliveryeta_date\\'\\\">Delivery ETA Date</span> <span ng-if=\\\"key == \\'mustship_date\\'\\\">Must Ship Date</span> <span ng-if=\\\"key == \\'mustdeliver_date\\'\\\">Must Deliver Date</span> <span ng-if=\\\"key != \\'mode\\' && key != \\'invoice_total\\' && key != \\'equipment_type\\' && key != \\'type\\' && key != \\'is_bookmarked\\' && key != \\'pickup_date\\' && key != \\'pickup_time\\' && key != \\'reason_code\\' && key != \\'estimateddelivery_date\\' && key != \\'delivereddate_date\\' && key != \\'duedate_date\\' && key != \\'shipdate_date\\' && key != \\'consignee_reference\\' && key != \\'pro\\' && key != \\'bol\\' && key != \\'origin\\' && key != \\'destination\\' && key != \\'reference\\' && key != \\'load\\' && key != \\'container\\' && key != \\'deliveryeta_date\\' && key != \\'mustship_date\\' && key != \\'mustdeliver_date\\'\\\"><!-- {{key | underscoreless | capitalize}} --> {{key | underscoreless | uppercase}}</span></div></div><div ng-if=\\\"AdvSearchCslCtrl.ttSearchFlag == 2 \\\"><div ng-repeat=\\\"pick in AdvSearchCslCtrl.pickup\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCslCtrl.secondChildFlg == $index }\\\" ng-click=\\\"AdvSearchCslCtrl.ttserchdata = \\'Pickup \\'+pick;AdvSearchCslCtrl.ttSearch(AdvSearchCslCtrl.ttserchdata);AdvSearchCslCtrl.openInputFlag=true;AdvSearchCslCtrl.clearValues();AdvSearchCslCtrl.shipmentOpenInputFlag=false;AdvSearchCslCtrl.secondChildFlg = $index;AdvSearchCslCtrl.secondChildElem = pick\\\"><!-- <span>{{pick | underscoreless | capitalize}}</span> --> <span>{{pick | underscoreless | uppercase}}</span></div></div><div ng-if=\\\"AdvSearchCslCtrl.ttSearchFlag == 3 \\\"><div ng-repeat=\\\"consignee in AdvSearchCslCtrl.consignee\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCslCtrl.secondChildFlg == $index }\\\" ng-click=\\\"AdvSearchCslCtrl.ttserchdata = \\'Consignee \\'+consignee;AdvSearchCslCtrl.ttSearch(AdvSearchCslCtrl.ttserchdata);AdvSearchCslCtrl.openInputFlag=true;AdvSearchCslCtrl.clearValues();AdvSearchCslCtrl.shipmentOpenInputFlag=false;AdvSearchCslCtrl.secondChildFlg = $index;AdvSearchCslCtrl.secondChildElem = consignee\\\"><!-- <span>{{consignee | underscoreless | capitalize}}</span> --> <span>{{consignee | underscoreless | uppercase}}</span></div></div></div></div><div id={{AdvSearchCslCtrl.secondChildFlg}} flex-gt-sm=15 ng-class=\\\"{\\'flex-gt-sm-35\\':(AdvSearchCslCtrl.secondChildFlg == \\'reason_code\\' ||AdvSearchCslCtrl.secondChildFlg == \\'service_level\\') }\\\" flex-sm=1 flex-xs=1 style=\\\"border:1px solid #CCC\\\" ng-if=\\\"AdvSearchCslCtrl.ttSearchFlag == 1 && AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg] \\\"><div class=adv-search-content><div><div id=btn set-focus=text-field-focus ng-repeat=\\\"thirdChild in AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg] track by $index\\\" ng-class=\\\"{\\'text-warning-new\\' : AdvSearchCslCtrl.thirdChildFlg == $index }\\\" ng-click=\\\" AdvSearchCslCtrl.clearValues(thirdChild);AdvSearchCslCtrl.openInputFlag = true;AdvSearchCslCtrl.checkrangeOrNot(thirdChild);AdvSearchCslCtrl.ttserchdata = \\'Shipment \\'+AdvSearchCslCtrl.secondChildFlg+\\' \\'+thirdChild;AdvSearchCslCtrl.ttSearch(AdvSearchCslCtrl.ttserchdata);AdvSearchCslCtrl.thirdChildFlg=$index\\\"><span ng-if=\\\"AdvSearchCslCtrl.secondChildFlg == \\'status\\' || AdvSearchCslCtrl.secondChildFlg == \\'equipment_type\\' || AdvSearchCslCtrl.secondChildFlg == \\'type\\'\\\">{{thirdChild | underscoreless | uppercase}}</span> <span ng-if=\\\"AdvSearchCslCtrl.secondChildFlg != \\'status\\' && AdvSearchCslCtrl.secondChildFlg != \\'equipment_type\\' && AdvSearchCslCtrl.secondChildFlg != \\'type\\'\\\">{{thirdChild | underscoreless | capitalize}}</span></div></div></div></div><div layout=column flex=100 flex-gt-sm=\\\"( AdvSearchCslCtrl.ttSearchFlag == 1 && AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg]) ? 50 : 70\\\" style=\\\"border:1px solid #CCC;padding-left:10px\\\"><div style=\\\"width: 100px;float: right;padding-right: 10px\\\"><md-button ng-show=addAllBtnShow class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-if=\\\"AdvSearchCslCtrl.secondChildFlg == \\'service_level\\' || AdvSearchCslCtrl.secondChildFlg == \\'reason_code\\'\\\" data-value=service_level_all ng-click=\\\"AdvSearchCslCtrl.newSearch(true);\\r\\n AdvSearchCslCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(AdvSearchCslCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (AdvSearchCslCtrl.searchValue) }\\\"><span style=\\\"color: #fff\\\">ADD ALL</span></md-button></div><div layout-gt-sm=row layout-wrap ng-if=AdvSearchCslCtrl.openInputFlag><div ng-if=\\\"AdvSearchCslCtrl.secondChildFlg == \\'origin\\' || AdvSearchCslCtrl.secondChildFlg == \\'destination\\'\\\"><div style=\\\"width: 190px;margin-top: -5px;float: left\\\"><csl-auto-complete ng-if=\\\"AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg][AdvSearchCslCtrl.thirdChildFlg] == \\'city\\'\\\" flex-gt-sm=auto field=t_and_t_city search-field={{AdvSearchCslCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=AdvSearchCslCtrl.searchValue></csl-auto-complete><csl-auto-complete ng-if=\\\"AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg][AdvSearchCslCtrl.thirdChildFlg] == \\'country\\'\\\" flex-gt-sm=auto field=t_and_t_country search-field={{AdvSearchCslCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=AdvSearchCslCtrl.searchValue></csl-auto-complete><csl-auto-complete ng-if=\\\"AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg][AdvSearchCslCtrl.thirdChildFlg] == \\'state\\'\\\" flex-gt-sm=auto field=t_and_t_state search-field={{AdvSearchCslCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=AdvSearchCslCtrl.searchValue></csl-auto-complete><csl-auto-complete ng-if=\\\"AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg][AdvSearchCslCtrl.thirdChildFlg] == \\'city_code\\'\\\" flex-gt-sm=auto field=t_and_t_citycountry search-field={{AdvSearchCslCtrl.searchValue}} display-name=\\\"Enter data\\\" search-text=AdvSearchCslCtrl.searchValue></csl-auto-complete></div><div style=\\\"width: 100px;float: left\\\"><md-button class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-click=\\\"AdvSearchCslCtrl.newSearch();\\r\\n AdvSearchCslCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(AdvSearchCslCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (AdvSearchCslCtrl.searchValue)}\\\"><span style=\\\"color: #fff\\\">ADD</span></md-button></div></div><div ng-if=\\\"AdvSearchCslCtrl.secondChildFlg != \\'origin\\' && AdvSearchCslCtrl.secondChildFlg != \\'destination\\'\\\"><div style=\\\"width: 190px;margin-top: -13px;float: left\\\" ng-if=\\\"!AdvSearchCslCtrl.shipmentOpenInputFlag && !AdvSearchCslCtrl.dateInputFlag && AdvSearchCslCtrl.secondChildFlg ==\\'lane_pair\\' \\\" ng-mousemove=\\\"AdvSearchCslCtrl.ttserchdataNew = (AdvSearchCslCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCslCtrl.searchValue \\\"><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=AdvSearchCslCtrl.searchValue md-items=\\\"item in AdvSearchCslCtrl.getMatches(\\'lanepairs\\', AdvSearchCslCtrl.searchValue)\\\" md-item-text=item.value placeholder=\\\"\\\"><md-item-template><span md-highlight-text=AdvSearchCslCtrl.searchValue>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></div><input id=text-field-focus ng-if=\\\"!AdvSearchCslCtrl.shipmentOpenInputFlag && !AdvSearchCslCtrl.dateInputFlag && !AdvSearchCslCtrl.timeInputFlag && AdvSearchCslCtrl.secondChildFlg !=\\'lane_pair\\' && AdvSearchCslCtrl.secondChildFlg !=\\'consol\\' && AdvSearchCslCtrl.secondChildElem !=\\'bol\\' && AdvSearchCslCtrl.secondChildElem !=\\'container\\' && AdvSearchCslCtrl.secondChildElem !=\\'consignee_reference\\' && AdvSearchCslCtrl.secondChildElem !=\\'pro\\' && AdvSearchCslCtrl.secondChildElem !=\\'reference\\' && AdvSearchCslCtrl.secondChildElem !=\\'equipment_type\\' && AdvSearchCslCtrl.secondChildElem !=\\'type\\' && AdvSearchCslCtrl.secondChildElem !=\\'load\\' && AdvSearchCslCtrl.secondChildElem !=\\'container\\' && AdvSearchCslCtrl.secondChildElem !=\\'country\\' && AdvSearchCslCtrl.secondChildElem !=\\'city\\' && AdvSearchCslCtrl.secondChildElem !=\\'state\\' \\\" ng-model=AdvSearchCslCtrl.searchValue ng-pattern=\\\"AdvSearchCslCtrl.secondChildElem == \\'gross_weight\\' || AdvSearchCslCtrl.secondChildElem == \\'total_pieces\\' || AdvSearchCslCtrl.secondChildElem == \\'invoice\\' ? \\'[0-9]*\\' : \\'\\'\\\" style=\\\"width: 150px;margin-top: 8px;float: left\\\"><div style=\\\"width: 190px;margin-top: -5px;float: left\\\" ng-if=\\\"!AdvSearchCslCtrl.shipmentOpenInputFlag && !AdvSearchCslCtrl.dateInputFlag && (AdvSearchCslCtrl.secondChildElem ==\\'city\\' || AdvSearchCslCtrl.secondChildElem ==\\'state\\' || AdvSearchCslCtrl.secondChildElem ==\\'country\\'|| AdvSearchCslCtrl.secondChildElem ==\\'consol\\' || AdvSearchCslCtrl.secondChildElem ==\\'bol\\' || AdvSearchCslCtrl.secondChildElem ==\\'container\\' || AdvSearchCslCtrl.secondChildElem ==\\'consignee_reference\\' || AdvSearchCslCtrl.secondChildElem ==\\'pro\\' || AdvSearchCslCtrl.secondChildElem ==\\'reference\\' || AdvSearchCslCtrl.secondChildElem ==\\'load\\' || AdvSearchCslCtrl.secondChildElem ==\\'container\\' ) \\\" ng-mousemove=\\\"AdvSearchCslCtrl.ttserchdataNew = (AdvSearchCslCtrl.nextElem | underscoreless) + \\' \\'+AdvSearchCslCtrl.searchValue \\\"><csl-auto-complete ng-if=\\\"AdvSearchCslCtrl.secondChildElem == \\'city\\'\\\" flex-gt-sm=auto field=t_and_t_city search-field={{AdvSearchCslCtrl.secondChildElem}} display-name=\\\"Enter data\\\" search-text=AdvSearchCslCtrl.searchValue></csl-auto-complete><csl-auto-complete ng-if=\\\"AdvSearchCslCtrl.secondChildElem != \\'city\\'\\\" field={{AdvSearchCslCtrl.secondChildElem}} search-field={{AdvSearchCslCtrl.secondChildElem}} display-name=\\\"Enter data\\\" search-text=AdvSearchCslCtrl.searchValue></csl-auto-complete></div><input ng-if=\\\"((!AdvSearchCslCtrl.shipmentOpenInputFlag && !AdvSearchCslCtrl.dateInputFlag) && AdvSearchCslCtrl.inputRangeFlag) \\\" ng-model=AdvSearchCslCtrl.searchValue2 style=\\\"width: 150px;margin-left: 2px;margin-top: 8px;float: left\\\" ng-pattern=\\\"AdvSearchCslCtrl.secondChildElem == \\'gross_weight\\' || AdvSearchCslCtrl.secondChildElem == \\'total_pieces\\' || AdvSearchCslCtrl.secondChildElem == \\'invoice\\' ? \\'[0-9]*\\' : \\'\\'\\\"><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCslCtrl.shipmentOpenInputFlag && AdvSearchCslCtrl.dateInputFlag\\\" style=\\\"width: 185px;float: left\\\"><mdp-date-picker mdp-min-date=AdvSearchCslCtrl.minDate mdp-max-date=dateMax ng-change=\\\"AdvSearchCslCtrl.dateChanged();AdvSearchCslCtrl.addOneMoreDay(AdvSearchCslCtrl.searchValue); AdvSearchCslCtrl.ttserchdataNew = (AdvSearchCslCtrl.nextElem | underscoreless) + \\' \\'+(AdvSearchCslCtrl.searchValue | date: \\'MMM dd, yyyy\\')\\\" ng-model=AdvSearchCslCtrl.searchValue></mdp-date-picker></div><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCslCtrl.shipmentOpenInputFlag && AdvSearchCslCtrl.dateInputFlag && AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg][AdvSearchCslCtrl.thirdChildFlg] == \\'range_to\\'\\\" style=\\\"width: 185px;float: left\\\"><mdp-date-picker mdp-min-date=dateMin ng-change=\\\"AdvSearchCslCtrl.dateChanged(); AdvSearchCslCtrl.subtractOneDay(AdvSearchCslCtrl.searchValue2); AdvSearchCslCtrl.ttserchdataNew = (AdvSearchCslCtrl.nextElem | underscoreless) + \\' \\'+(AdvSearchCslCtrl.searchValue| date: \\'MMM dd, yyyy\\') +\\' \\'+(AdvSearchCslCtrl.searchValue2 | date: \\'MMM dd, yyyy\\')\\\" ng-model=AdvSearchCslCtrl.searchValue2></mdp-date-picker></div><!-- Time Picker --><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCslCtrl.shipmentOpenInputFlag && AdvSearchCslCtrl.timeInputFlag\\\" style=\\\"width: 185px;float: left\\\"><mdp-time-picker ng-model=AdvSearchCslCtrl.searchValue></mdp-time-picker></div><div class=date-picker-wrapper ng-if=\\\"!AdvSearchCslCtrl.shipmentOpenInputFlag && AdvSearchCslCtrl.timeInputFlag && AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg][AdvSearchCslCtrl.thirdChildFlg] == \\'range_to\\'\\\" style=\\\"width: 185px;float: left\\\"><mdp-time-picker ng-model=AdvSearchCslCtrl.searchValue2></mdp-time-picker></div><div id={{AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg][AdvSearchCslCtrl.thirdChildFlg]}} style=\\\"width: 100px;float: left\\\" ng-show=searchForm.$valid><md-button class=\\\"md-raised md-accent ttsearch-buttom\\\" ng-click=\\\"AdvSearchCslCtrl.newSearch();\\r\\n AdvSearchCslCtrl.clearFlags()\\\" ng-style=\\\"{\\'color\\' :(AdvSearchCslCtrl.searchValue) ? \\'#fff\\' : \\'#45afe3\\'}\\\" ng-class=\\\"{\\'ttsearch-buttom-active\\': (AdvSearchCslCtrl.searchValue) }\\\"><span style=\\\"color: #fff\\\">ADD</span></md-button></div></div></div><span class=error ng-show=searchForm{{AdvSearchCslCtrl.searchValue}}.$error.pattern style=\\\"color : red\\\">Please enter numeric value.</span></div></div><div flex=100 layout=row style=\\\"min-height: 100px\\\"><div style=\\\"max-width: 100%\\\"><div style=\\\"margin-right: 10px\\\" class=adv-search-chip id={{AdvSearchCslCtrl.shipment[AdvSearchCslCtrl.secondChildFlg][AdvSearchCslCtrl.thirdChildFlg]}}_too><md-chips class=\\\"md-chips custom-chip no-border tt-chip\\\" ng-model=AdvSearchCslCtrl.chipData md-on-remove=AdvSearchCslCtrl.chipTempRemoved($chip)><md-chip-template><span><strong><span translate={{$chip.display}}></span><span>:</span></strong> <span ng-if=\\\"$chip.displayValue && $chip.value != \\'\\' \\\"><span ng-if=\\\"$chip.display.includes(\\'Pick Up Time\\')\\\">{{ $chip.value | removeTimeZone }} </span><span ng-if=\\\"$chip.display.includes(\\'Date\\') || $chip.display.includes(\\'DATE\\')\\\">{{$chip.value | date : \\\"MMM dd yyyy\\\"}} </span><span title=$chip.value ng-if=\\\"$chip.display.includes(\\'State\\') || $chip.display.includes(\\'City\\')\\\"><!-- {{$chip.value}} --> {{$chip.value | uppercase}} </span><span title=\\\"{{$chip.value | advSearchSpaceRemove}}\\\" ng-if=\\\"$chip.display.includes(\\'Equipment Type\\') || $chip.display.includes(\\'Shipment Type\\') || $chip.display.includes(\\'CONSIGNEE REF #\\') || $chip.display.includes(\\'PRO #\\') || $chip.display.includes(\\'TRACKTRACE.PRO\\') || $chip.display.includes(\\'BOL #\\') || $chip.display.includes(\\'REF #\\') || $chip.display.includes(\\'Reference\\') || $chip.display.includes(\\'LOAD #\\') || $chip.display.includes(\\'Container/Trailer #\\')\\\">{{$chip.value | underscoreless | uppercase}}<!-- {{$chip.value | underscoreless | capitalize}} --> </span><span title=\\\"{{$chip.value | advSearchSpaceRemove}}\\\" ng-if=\\\"$chip.display == \\'TRACKTRACE.FILTER\\'\\\"><!-- {{$chip.value | capitalize}} --> {{$chip.value | uppercase}} </span><span title=\\\"{{$chip.value | advSearchSpaceRemove}}\\\" ng-if=\\\"!$chip.display.includes(\\'TRACKTRACE.FILTER\\') && !$chip.display.includes(\\'Equipment Type\\') && !$chip.display.includes(\\'Shipment Type\\') && !$chip.display.includes(\\'Date\\') && !$chip.display.includes(\\'DATE\\') && !$chip.display.includes(\\'Time\\') && $chip.display != \\'Ship Date\\' && !$chip.display.includes(\\'State\\') && !$chip.display.includes(\\'City\\') && !$chip.display.includes(\\'CONSIGNEE REF #\\') && !$chip.display.includes(\\'Reference\\') && !$chip.display.includes(\\'PRO #\\') && !$chip.display.includes(\\'TRACKTRACE.PRO\\') && !$chip.display.includes(\\'BOL #\\') && !$chip.display.includes(\\'REF #\\') && !$chip.display.includes(\\'LOAD #\\') && !$chip.display.includes(\\'Container/Trailer #\\')\\\">{{$chip.value | underscoreless | uppercase}}<!-- {{$chip.value | underscoreless | capitalize}} --></span></span></span></md-chip-template></md-chips></div></div></div></md-dialog-content><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button ng-click=\\\"AdvSearchCslCtrl.clearSearch();AdvSearchCslCtrl.resetSearch();AdvSearchCslCtrl.ttserchdataNew = \\'\\';AdvSearchCslCtrl.nextElem=\\'\\';AdvSearchCslCtrl.clearSearch();\\\" hide-xs><span translate=TRACKTRACE.CLEAR></span></md-button><md-button class=\\\"md-fab md-button md-mini bottom-fab\\\" ng-click=AdvSearchCslCtrl.showListBottomSheet() show-xs hide-gt-xs><md-icon></md-icon></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" type=submit ng-click=AdvSearchCslCtrl.advSearch($event) id=btnSearch style=\\\"padding: 0;margin: 0 0 0px 8px\\\"><span id=spSearch translate=TRACKTRACE.SEARCH style=\\\"padding: 10px 18px\\\"></span></md-button></md-dialog-actions></form><div ng-init=AdvSearchCslCtrl.attachFocusToAutoComplete()></div></md-dialog>\");\n$templateCache.put(\"/app/advanced-search/csl/adv-search.html\",\"<!-- Advanced Search Dialog --><div ng-controller=\\\"AdvSearchCslController as AdvSearchCslCtrl\\\"><!-- show the pills --><div ng-if=\\\"AdvSearchCslCtrl.chipSearchFields.length > 0\\\" layout-gt-xs=row><span translate=TRACKTRACE.CURRENT_SEARCH>:</span> <span flex=auto></span><md-button class=btn-link md-ink-ripple=false ng-click=AdvSearchCslCtrl.resetSearch()><span translate=TRACKTRACE.CLEAR_SEARCH></span></md-button></div><!-- md-on-select=\\\"AdvSearchCslCtrl.chipClicked($chip)\\\" --><md-chips class=\\\"md-chips custom-chip no-border\\\" ng-model=AdvSearchCslCtrl.chipSearchFields md-on-remove=AdvSearchCslCtrl.chipRemoved($chip)><md-chip-template><span><strong><span translate={{$chip.display}}></span></strong> <span ng-if=\\\"$chip.displayValue \\\">: <span ng-if=\\\"$chip.display.includes(\\'Pick Up Time\\')\\\">{{ $chip.searchField | removeTimeZone }} </span><span ng-if=\\\"$chip.display.includes(\\'Date\\') || $chip.display.includes(\\'DATE\\')\\\">{{$chip.searchField | date : \\\"MMM dd yyyy\\\"}} </span><span ng-if=\\\"$chip.display.includes(\\'State\\') || $chip.display.includes(\\'City\\')\\\">{{$chip.searchField}} </span><span title=\\\"{{$chip.searchField | advSearchSpaceRemove}}\\\" ng-if=\\\"$chip.display.includes(\\'Equipment Type\\') || $chip.display.includes(\\'Shipment Type\\') || $chip.display.includes(\\'CONSIGNEE REF #\\') || $chip.display.includes(\\'PRO #\\') || $chip.display.includes(\\'TRACKTRACE.PRO\\') || $chip.display.includes(\\'BOL #\\') || $chip.display.includes(\\'REF #\\') || $chip.display.includes(\\'Reference\\') || $chip.display.includes(\\'LOAD #\\') || $chip.display.includes(\\'Container/Trailer #\\')\\\">{{$chip.searchField | underscoreless | uppercase}} </span><span title=\\\"{{$chip.searchField | advSearchSpaceRemove}}\\\" ng-if=\\\"!$chip.display.includes(\\'Equipment Type\\') && !$chip.display.includes(\\'Shipment Type\\') && !$chip.display.includes(\\'DATE\\') && !$chip.display.includes(\\'Date\\') && !$chip.display.includes(\\'Time\\') && $chip.display != \\'Ship Date\\' && !$chip.display.includes(\\'State\\') && !$chip.display.includes(\\'City\\') && !$chip.display.includes(\\'CONSIGNEE REF #\\') && !$chip.display.includes(\\'PRO #\\') && !$chip.display.includes(\\'TRACKTRACE.PRO\\') && !$chip.display.includes(\\'BOL #\\') && !$chip.display.includes(\\'REF #\\') && !$chip.display.includes(\\'Reference\\') && !$chip.display.includes(\\'LOAD #\\') && !$chip.display.includes(\\'Container/Trailer #\\')\\\">{{$chip.searchField | underscoreless | capitalize}}</span></span></span></md-chip-template></md-chips></div>\");\n$templateCache.put(\"/app/book-shipment/forms/billing-party-info.html\",\"<div layout-gt-sm=row><div flex-gt-sm=48><auto-complete-bookment class=required-ast field=customer search-field={{vm.customer_info.customer}} display-name=BOOKSHIPMENT.CUSTOMER search-text=vm.customer_info.customer form=vm.CustomerInfoForm is-review=vm.isReview is-fields-locked=vm.isLocked.customer></auto-complete-bookment><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ADDRESS_1\\' | translate}}<span class=text-danger> *</span></label><input ng-model=vm.customer_info.customerAddress1 ng-required=!vm.isReview ng-disabled=\\\"vm.isReview || vm.isLocked.customer\\\"><div ng-messages=vm.CustomerInfoForm.customer_email.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.CITY\\' | translate}}</label><input ng-model=vm.customer_info.customerCityName ng-disabled=vm.isReview md-maxlength=45 name=city><div ng-messages=vm.CustomerInfoForm.city.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.COUNTRY\\' | translate}}</label><input ng-model=vm.customer_info.customerCountry ng-disabled=vm.isReview md-maxlength=45 name=country><div ng-messages=vm.CustomerInfoForm.country.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ACCOUNT_CODE\\' | translate}}<span ng-hide=vm.isReview class=text-danger> *</span></label><input ng-model=vm.customer_info.customerAccountCode ng-required=!vm.isReview ng-disabled=vm.isReview md-maxlength=45 name=account_code><div ng-messages=vm.CustomerInfoForm.account_code.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ADDRESS_2\\' | translate}}</label><input ng-model=vm.customer_info.customerAddress2 ng-disabled=\\\"vm.isLocked.customer || vm.isReview\\\"></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.STATE_PROV\\' | translate}}</label><input ng-model=vm.customer_info.customerStateProv ng-disabled=vm.isReview md-maxlength=45 name=state><div ng-messages=vm.CustomerInfoForm.state.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.POSTAL_CODE\\' | translate}}</label><input ng-model=vm.customer_info.customerPostalCode ng-disabled=vm.isReview md-maxlength=45 name=zip><div ng-messages=vm.CustomerInfoForm.zip.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></div></div><div><md-radio-group ng-model=vm.customer_info.paymentOptions layout-gt-sm=row class=m-b-sm ng-disabled=vm.isReview><md-radio-button value=prepaid ng-disabled=vm.isReview>{{\\'BOOKSHIPMENT.PREPAID\\' | translate}}</md-radio-button><md-radio-button value=collect ng-disabled=vm.isReview>{{\\'BOOKSHIPMENT.COLLECT\\' | translate}}</md-radio-button><md-radio-button value=third_party ng-disabled=vm.isReview>{{\\'BOOKSHIPMENT.THIRD_PARTY\\' | translate}}</md-radio-button></md-radio-group></div><h3 class=\\\"text-upper m-b-0\\\">{{\\'BOOKSHIPMENT.ORIGIN_DESTINATION\\' | translate }}</h3><div layout-gt-sm=row><div flex-gt-sm=48><md-autocomplete md-selected-item=vm.customer_info.origin md-delay=300 md-min-length=2 md-require-match=true md-floating-label=\\\"{{\\'Origin\\' || translate}}\\\" md-search-text=vm.searchOrigin ng-model-options=\\\"{debounce: 500}\\\" md-items=\\\"item in vm.getMatches(\\'citycountry\\', vm.searchOrigin)\\\" md-item-text=item.display><md-item-template><span md-highlight-text=vm.searchOrigin>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found><div ng-messages=vm.CustomerInfoForm.origin.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></md-autocomplete></div><div flex-gt-sm=48><md-autocomplete md-selected-item=vm.customer_info.destination md-delay=300 md-min-length=2 md-floating-label=\\\"{{\\'Destination\\' || translate}}\\\" md-require-match=true md-search-text=vm.searchDestination ng-model-options=\\\"{debounce: 500}\\\" md-items=\\\"item in vm.getMatches(\\'citycountry\\', vm.searchDestination)\\\" md-item-text=item.display><md-item-template><span md-highlight-text=vm.searchDestination>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found><div ng-messages=vm.CustomerInfoForm.destination.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></md-autocomplete></div></div>\");\n$templateCache.put(\"/app/book-shipment/forms/complete-shipment.html\",\"<md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.COMPLETE_SHIPMENT\\' | translate}}</span></h2><span flex></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.clearSection(\\'complete_shipment\\')\\\"><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.CLEAR_SECTION\\' | translate}}</p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><div><md-checkbox class=md-primary ng-model=vm.complete_shipment.generate_label aria-label=\\\"{{\\'BOOKSHIPMENT.GENERATE_LABEL\\' | translate}}\\\">{{\\'BOOKSHIPMENT.GENERATE_LABEL\\' | translate}}</md-checkbox></div><div layout-gt-sm=row><div flex=50><md-input-container class=md-block><label>{{\\'BOOKSHIPMENT.BOL_SLI_CMR\\' | translate}}</label><input ng-model=vm.complete_shipment.bol_sli_cmr md-maxlength=20 required name=BOL><div ng-messages=vm.CompleteShipmentForm.BOL.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR_BOL\\' | translate}}</div></div></md-input-container></div></div><!-- Attach Files --><div class=m-b><md-button class=md-raised ngf-select=\\\"vm.uploadFile($file, $invalidFiles)\\\" ngf-max-size=200MB>{{\\'BOOKSHIPMENT.ATTACH_DOCUMENT\\' | translate}}</md-button></div><md-card class=\\\"m-0 p-a-sm\\\"><div layout=row><div flex=30 class=\\\"text-upper text-white\\\">{{\\'BOOKSHIPMENT.FILES\\' | translate}}</div></div></md-card><div layout-gt-xs=row ng-repeat=\\\"file in vm.attachments track by $index\\\" class=m-t><div layout=column flex-gt-xs=30 layout-align=\\\"start center\\\"><p>{{file.filename}}</p><p class=text-danger ng-if=\\\"errFile.name || errFile.$error || errFile.$errorParam || errorMsg\\\">{{errFile.name}} {{errFile.$error}} {{errFile.$errorParam}} {{errorMsg}}</p></div><div layout=column flex-gt-xs=50 layout-align=\\\"center center\\\" style=\\\"min-height: 12px; width: 100%\\\"><md-progress-linear md-mode=indeterminate ng-show=file.isUploading[$index]></md-progress-linear><md-progress-linear md-mode=determinate ng-show=!file.isUploading[$index] value=100></md-progress-linear></div><div layout=column flex-gt-xs=20 layout-align=\\\"center center\\\"><md-button class=\\\"md-raised btn-danger\\\" ng-click=vm.removeFile($index)>{{\\'BOOKSHIPMENT.REMOVE\\' | translate}}</md-button></div></div><div layout=row ng-show=\\\"vm.files.length < 1\\\"><p>{{\\'BOOKSHIPMENT.NO_FILES\\' | translate}}</p></div></md-card-content>\");\n$templateCache.put(\"/app/book-shipment/forms/consignee-info.html\",\"<div layout-gt-sm=row><div flex-gt-sm=48><auto-complete-bookment class=required-ast field=consignee search-field={{vm.shipper_consignee_info.consignee}} display-name=BOOKSHIPMENT.CONSIGNEE_NAME search-text=vm.shipper_consignee_info.consignee form=vm.ShipperConsigneeForm is-review=vm.isReview is-fields-locked=vm.isConsigneeFieldLocked></auto-complete-bookment><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ADDRESS_1\\' | translate}}<span class=text-danger> *</span></label><input ng-model=vm.shipper_consignee_info.consigneeAddress1 name=consigneeAddress1 ng-required=!vm.isReview ng-disabled=\\\"vm.isReview || vm.isConsigneeFieldLocked\\\" md-maxlength=45><div ng-messages=vm.ShipperConsigneeForm.consigneeAddress1.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ADDRESS_2\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.consigneeAddress2 ng-disabled=\\\"vm.isReview || vm.isConsigneeFieldLocked\\\" md-maxlength=45 name=consigneeAddress2><div ng-messages=vm.ShipperConsigneeForm.consigneeAddress2.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ADDRESS_3\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.consigneeAddress3 ng-disabled=\\\"vm.isReview || vm.isConsigneeFieldLocked\\\" md-maxlength=45 name=consigneeAddress3><div ng-messages=vm.ShipperConsigneeForm.consigneeAddress3.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ADDRESS_4\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.consigneeAddress4 ng-disabled=\\\"vm.isReview || vm.isConsigneeFieldLocked\\\" md-maxlength=45 name=consigneeAddress4><div ng-messages=vm.ShipperConsigneeForm.consigneeAddress4.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.CITY\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.consigneeCity ng-disabled=\\\"vm.isReview || vm.isConsigneeFieldLocked\\\" md-maxlength=45 name=consigneeCity><div ng-messages=vm.ShipperConsigneeForm.consigneeCity.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.STATE_PROV\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.consigneeState ng-disabled=vm.isReview md-maxlength=45 name=consigneeState><div ng-messages=vm.ShipperConsigneeForm.consigneeState.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.POSTAL_CODE\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.consigneePostalCode ng-disabled=\\\"vm.isReview || vm.isConsigneeFieldLocked\\\" md-maxlength=45 name=consigneePostalCode><div ng-messages=vm.ShipperConsigneeForm.consigneePostalCode.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.COUNTRY\\' | translate}}<span class=text-danger> *</span></label><input ng-model=vm.shipper_consignee_info.consigneeCountry name=consigneeCountry ng-required=!vm.isReview ng-disabled=\\\"vm.isReview || vm.isConsigneeFieldLocked\\\" md-maxlength=45><div ng-messages=vm.ShipperConsigneeForm.consigneeCountry.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ACCOUNT_CODE\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.consigneeAccountCode ng-disabled=vm.isReview md-maxlength=45 name=consigneeAccountCode><div ng-messages=vm.ShipperConsigneeForm.consigneeAccountCode.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.CONTACT_NAME\\' | translate}}<span class=text-danger> *</span></label><input ng-model=vm.shipper_consignee_info.consigneeContactName name=consigneeContactName ng-required=!vm.isReview ng-disabled=\\\"vm.isReview || vm.isConsigneeFieldLocked\\\" md-maxlength=45><div ng-messages=vm.ShipperConsigneeForm.consigneeContactName.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.PHONE\\' | translate}}<span class=text-danger> *</span></label><input ng-model=vm.shipper_consignee_info.consigneePhone name=consigneePhone ng-pattern=/^.{10,}$/ ng-required=!vm.isReview ng-disabled=\\\"vm.isReview || vm.isConsigneeFieldLocked\\\" md-maxlength=45><div ng-messages=vm.ShipperConsigneeForm.consigneePhone.$error><div ng-message when=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message when=pattern>{{\\'BOOKSHIPMENT.NOT_VALID_PHONE\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></div></div>\");\n$templateCache.put(\"/app/book-shipment/forms/customer-info.html\",\"<form novalidate class=\\\"form-horizontal light-form\\\" name=vm.CustomerInfoForm><md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.CUSTOMER_INFO\\' | translate}}</span></h2><span flex></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.clearSection(\\'customer_info\\', vm.CustomerInfoForm)\\\"><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.CLEAR_SECTION\\' | translate}}</p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><div layout-gt-sm=row><div flex-gt-sm=48><md-time-picker ng-model=example></md-time-picker><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.CUSTOMER_EMAIL\\' | translate}}<span class=text-danger> *</span></label><input ng-model=vm.customer_info.customerEmail type=email name=customer_email ng-required=!vm.isReview md-maxlength=45><div ng-messages=vm.CustomerInfoForm.customer_email.$error ng-if=vm.CustomerInfoForm.customer_email.$touched><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=email>{{\\'BOOKSHIPMENT.EMAIL_ERROR\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.PHONE\\' | translate}}<span ng-hide=vm.isReview class=text-danger> *</span></label><input ng-model=vm.customer_info.customerPhone name=customer_phone ng-pattern=/^.{10,}$/ ng-required=!vm.isReview ng-disabled=vm.isCustomerFieldLocked md-maxlength=45><div ng-messages=vm.CustomerInfoForm.customer_phone.$error ng-if=vm.CustomerInfoForm.customer_phone.$touched>{{debugger;}}<div ng-message=pattern>{{\\'BOOKSHIPMENT.NOT_VALID_PHONE\\' | translate}}</div><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></div></div><h3 class=\\\"text-upper m-b-0\\\">{{\\'BOOKSHIPMENT.CUSTOMER_BILLING_PARTY\\' | translate }}</h3><div ng-include=\\\"\\'/app/book-shipment/forms/billing-party-info.html\\'\\\"></div></md-card-content></form>\");\n$templateCache.put(\"/app/book-shipment/forms/haz-mat.html\",\"<md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.HAZ_MAT\\' | translate}} ({{\\'OPTIONAL\\' | translate}})</span></h2><span flex></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event) ng-hide=vm.isReview><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.clearSection(\\'haz_mat\\')\\\"><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.CLEAR_SECTION\\' | translate}}</p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><md-checkbox class=md-primary ng-model=vm.haz_mat.agreement aria-label=\\\"{{\\'BOOKSHIPMENT.CONTAINS_DANGERS_GOODS\\' | translate}}\\\" ng-disabled=vm.isReview>{{\\'BOOKSHIPMENT.CONTAINS_DANGERS_GOODS\\' | translate}}</md-checkbox><div layout=row><div flex=50><md-input-container class=\\\"md-block error-hidden\\\" ng-show=vm.haz_mat.agreement flex-gt-sm><label>{{\\'BOOKSHIPMENT.UN_NUM\\' | translate}}</label><input ng-model=vm.haz_mat.unID ng-disabled=vm.isReview></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" ng-show=vm.haz_mat.agreement flex-gt-sm><label>{{\\'BOOKSHIPMENT.HAZ_CLASS\\' | translate}}</label><input ng-model=vm.haz_mat.classGroup ng-disabled=vm.isReview></md-input-container></div><div flex=50><md-input-container class=\\\"md-block error-hidden\\\" ng-show=vm.haz_mat.agreement flex-gt-sm><label>{{\\'BOOKSHIPMENT.PHONE\\' | translate}}<span ng-hide=vm.isReview class=text-danger> *</span></label><input ng-model=vm.haz_mat.contact name=contact ng-pattern=/^.{10,}$/ ><div ng-messages=vm.HazMatForm.contact.$error>{{debugger;}}<div ng-message=pattern>{{\\'BOOKSHIPMENT.NOT_VALID_PHONE\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" ng-show=vm.haz_mat.agreement flex-gt-sm><label>{{\\'BOOKSHIPMENT.PACKING_GROUP\\' | translate}}</label><input ng-model=vm.haz_mat.packingGroup ng-disabled=vm.isReview></md-input-container></div></div><div class=m-t-sm>{{\\'BOOKSHIPMENT.HAZARD_NOTIFICATION\\' | translate}}</div></md-card-content>\");\n$templateCache.put(\"/app/book-shipment/forms/item-details.html\",\"<md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.ITEM_DETAILS\\' | translate}}</span></h2><span flex></span><md-button class=md-raised ng-click=vm.addItemDetail() ng-hide=vm.isReview>{{\\'BOOKSHIPMENT.ADD_ROW\\' | translate}}</md-button><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event) ng-hide=vm.isReview><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.clearSection(\\'item_details\\')\\\"><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.CLEAR_SECTION\\' | translate}}</p></div></md-button></md-menu-item><md-menu-item ng-show=\\\"!vm.showItemDetailRemoveButton && vm.item_details.length > 1\\\"><md-button ng-click=vm.editItemDetailRows()><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.EDIT_ROWS\\' | translate}}</p></div></md-button></md-menu-item><md-menu-item ng-show=\\\"vm.showItemDetailRemoveButton && vm.item_details.length > 1\\\"><md-button ng-click=vm.doneEditingItemDetails()><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.DONE_EDITING\\' | translate}}</p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><div class=table-scroll><table class=\\\"table table-striped table-reduced-padding table-xs-nowrap book-shipment-item-details\\\"><thead><tr><th>{{\\'BOOKSHIPMENT.NUMBER_PIECES\\' | translate}}<span class=text-danger>*</span></th><th>{{\\'BOOKSHIPMENT.GROSS_WEIGHT\\' | translate}}<span class=text-danger>*</span></th><th>{{\\'BOOKSHIPMENT.UOM\\' | translate}}<span class=text-danger>*</span></th><th>{{\\'BOOKSHIPMENT.DESCRIPTION_OF_GOODS\\' | translate}}<span class=text-danger>*</span></th><th>{{\\'BOOKSHIPMENT.SCHEDULE_B\\' | translate}}</th><th>{{\\'BOOKSHIPMENT.LENGTH\\' | translate}}<span class=text-danger>*</span></th><th>{{\\'BOOKSHIPMENT.WIDTH\\' | translate}}<span class=text-danger>*</span></th><th>{{\\'BOOKSHIPMENT.HEIGHT\\' | translate}}<span class=text-danger>*</span></th><th>{{\\'BOOKSHIPMENT.UOM\\' | translate}}<span class=text-danger>*</span></th></tr></thead><tbody><tr ng-repeat=\\\"item in vm.item_details\\\"><td><md-input-container class=\\\"md-block error-hidden\\\"><input ng-model=item.noOfPieces type=number name=noOfPieces{{$index}} min=0 ng-min=0 ng-required=!vm.isReview ng-disabled=vm.isReview><div ng-messages=\\\"vm.ItemDetailsForm[\\'noOfPieces\\' + $index].$error\\\"><div ng-message=min>{{\\'BOOKSHIPMENT.GREATER_THAN_ZERO\\' | translate}}</div><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></td><td><md-input-container class=\\\"md-block error-hidden\\\"><input ng-model=item.grossWeight type=number name=grossWeight{{$index}} min=0 ng-min=0 ng-required=!vm.isReview ng-disabled=vm.isReview><div ng-messages=\\\"vm.ItemDetailsForm[\\'grossWeight\\' + $index].$error\\\"><div ng-message=min>{{\\'BOOKSHIPMENT.GREATER_THAN_ZERO\\' | translate}}</div><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></td><td><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=item.uom1 aria-label=uom1{{$index}} name=uom1{{$index}} ng-required=!vm.isReview ng-disabled=vm.isReview md-on-open=vm.onSelectOpen()><md-option value=KGS>kgs</md-option><md-option value=LB>lbs</md-option><!-- <md-option value=\\\"CBM\\\">CBM</md-option> --></md-select><div ng-messages=\\\"vm.ItemDetailsForm[\\'uom1\\' + $index].$error\\\"><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></md-input-container></td><td><md-input-container class=\\\"md-block error-hidden\\\"><input ng-model=item.descriptionOfGoods name=descriptionOfGoods{{$index}} ng-required=!vm.isReview ng-disabled=vm.isReview><div ng-messages=\\\"vm.ItemDetailsForm[\\'descriptionOfGoods\\' + $index].$error\\\"><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></md-input-container></td><td><md-input-container class=\\\"md-block error-hidden\\\"><input ng-model=item.scheduleBInternational ng-disabled=vm.isReview name=scheduleBInternational md-maxlength=45><div ng-messages=vm.ItemDetailsForm.scheduleBInternational.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></td><td><md-input-container class=\\\"md-block error-hidden\\\"><input ng-model=item.length type=number name=length{{$index}} min=0 ng-min=0 ng-required=!vm.isReview ng-disabled=vm.isReview><div ng-messages=\\\"vm.ItemDetailsForm[\\'length\\' + $index].$error\\\"><div ng-message=min>{{\\'BOOKSHIPMENT.GREATER_THAN_ZERO\\' | translate}}</div><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></td><td><md-input-container class=\\\"md-block error-hidden\\\"><input ng-model=item.width type=number name=width{{$index}} min=0 ng-min=0 ng-required=!vm.isReview ng-disabled=vm.isReview><div ng-messages=\\\"vm.ItemDetailsForm[\\'width\\' + $index].$error\\\"><div ng-message=min>{{\\'BOOKSHIPMENT.GREATER_THAN_ZERO\\' | translate}}</div><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></td><td><md-input-container class=\\\"md-block error-hidden\\\"><input ng-model=item.height type=number name=height{{$index}} min=0 ng-min=0 ng-required=!vm.isReview ng-disabled=vm.isReview><div ng-messages=\\\"vm.ItemDetailsForm[\\'height\\' + $index].$error\\\"><div ng-message=min>{{\\'BOOKSHIPMENT.GREATER_THAN_ZERO\\' | translate}}</div><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></td><td><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=item.uom2 name=uom2{{$index}} aria-label=uom2{{$index}} ng-required=!vm.isReview ng-disabled=vm.isReview md-on-open=vm.onSelectOpen()><md-option value=IN>Inch</md-option><md-option value=CM>CMs</md-option></md-select><div ng-messages=\\\"vm.ItemDetailsForm[\\'uom2\\' + $index].$error\\\"><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></md-input-container></td><td ng-show=vm.showItemDetailRemoveButton><md-button class=\\\"md-raised btn-danger\\\" ng-click=vm.removeItemDetail($index)>{{\\'BOOKSHIPMENT.REMOVE\\' | translate}}</md-button></td></tr></tbody></table></div><div layout=row layout-align=\\\"center start\\\" flex=90 class=m-t><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=vm.showItemDetailRemoveButton ng-click=vm.doneEditingItemDetails()>{{\\'BOOKSHIPMENT.DONE\\' | translate}}</md-button></div><div ng-show=\\\"vm.item_details.length > 0\\\" class=m-t-sm><div layout-gt-xs=row><div class=text-semi flex-gt-sm=15 flex-sm=50>{{vm.totalNumPieces }} {{\\'BOOKSHIPMENT.TOTAL_PIECES\\' | translate}}</div><div class=text-semi flex-sm=50>{{vm.totalGrossWeight }} {{vm.item_details[0].uom1}} {{\\'BOOKSHIPMENT.TOTAL_GROSS_WEIGHT\\' | translate}}</div></div></div></md-card-content>\");\n$templateCache.put(\"/app/book-shipment/forms/reference-numbers.html\",\"<md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.REFERENCE_NUMBERS\\' | translate}} ({{\\'OPTIONAL\\' | translate}})</span></h2><span flex></span><md-button class=md-raised ng-click=vm.addReferenceNumber() ng-hide=vm.isReview>{{\\'BOOKSHIPMENT.ADD_REFERENCE_NUMBER\\' | translate}}</md-button><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event) ng-hide=vm.isReview><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.clearSection(\\'reference_numbers\\', vm.ReferenceNumbersForm)\\\"><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.CLEAR_SECTION\\' | translate}}</p></div></md-button></md-menu-item><md-menu-item ng-show=\\\"!vm.showRefNumRemoveButton && vm.reference_numbers.length > 1\\\"><md-button ng-click=vm.editRefNumRows()><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.EDIT_ROWS\\' | translate}}</p></div></md-button></md-menu-item><md-menu-item ng-show=\\\"vm.showRefNumRemoveButton && vm.reference_numbers.length > 1\\\"><md-button ng-click=vm.doneEditingRefNums()><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.DONE_EDITING\\' | translate}}</p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><md-card class=\\\"m-0 p-a-sm\\\"><div layout=row><div flex=50 class=\\\"text-upper text-white\\\">{{\\'BOOKSHIPMENT.TYPE\\' | translate}}</div><div flex=50 class=\\\"text-upper text-white\\\">{{\\'BOOKSHIPMENT.REFERENCE\\' | translate}}</div></div></md-card><div layout=row ng-repeat=\\\"number in vm.reference_numbers track by $index\\\"><div flex=50><md-input-container class=\\\"md-block error-hidden\\\"><label>{{\\'BOOKSHIPMENT.TYPE\\' | translate}}</label><md-select ng-model=number.type ng-required=\\\"vm.reference_numbers[$index].reference != undefined && vm.reference_numbers[$index].reference != \\'\\'\\\" ng-disabled=vm.isReview name=\\\"{{\\'reference_type-\\'+$index}}\\\" aria-label=\\\"{{\\'reference_type-\\'+$index}}\\\" md-on-open=vm.onSelectOpen()><md-option ng-repeat=\\\"type in vm.referenceNumberTypes\\\" value={{type.code}}>{{type.description}}</md-option></md-select><div ng-messages=\\\"vm.ReferenceNumbersForm[\\'reference_type-\\'+$index].$error\\\" ng-if=\\\"vm.ReferenceNumbersForm[\\'reference_number-\\'+$index].$dirty\\\"><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></md-input-container></div><div flex=50><md-input-container class=\\\"md-block error-hidden\\\"><label>{{\\'BOOKSHIPMENT.REFERENCE\\' | translate}}</label><input ng-model=number.reference name=\\\"{{\\'reference_number-\\'+$index}}\\\" ng-required=\\\"vm.reference_numbers[$index].type != undefined && vm.reference_numbers[$index].type != \\'\\'\\\" ng-disabled=vm.isReview><div ng-messages=\\\"vm.ReferenceNumbersForm[\\'reference_number-\\'+$index].$error\\\" ng-if=\\\"vm.ReferenceNumbersForm[\\'reference_number-\\'+$index].$dirty\\\"><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></md-input-container></div><div ng-show=vm.showRefNumRemoveButton><md-button class=\\\"md-raised btn-danger\\\" ng-click=vm.removeRefNum($index)>{{\\'BOOKSHIPMENT.REMOVE\\' | translate}}</md-button></div></div><div layout=row layout-align=\\\"center start\\\" flex=90 class=m-t><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=vm.showRefNumRemoveButton ng-click=vm.doneEditingRefNums()>{{\\'BOOKSHIPMENT.DONE\\' | translate}}</md-button></div></md-card-content>\");\n$templateCache.put(\"/app/book-shipment/forms/shipment-details.html\",\"<md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.SHIPMENT_DETAILS\\' | translate}}</span></h2><span flex></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event) ng-hide=vm.isReview><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.clearSection(\\'shipment_details\\')\\\"><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.CLEAR_SECTION\\' | translate}}</p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><div ng-class=\\\"{\\'layout-gt-sm-row\\': !vm.isReview}\\\"><div ng-class=\\\"{\\'flex-gt-sm-30\\': !vm.isReview}\\\"><!--{{\\'BOOKSHIPMENT.PICKUP_DATE\\' | translate}}--><mdp-date-picker class=\\\"error-hidden required-ast\\\" mdp-format=MM/DD/YYYY mdp-placeholder=\\\"Pickup Date\\\" ng-model=vm.shipment_details.pickUpDate mdp-min-date=vm.minPickUpDate required name=pickUpDate mdp-disabled=vm.isReview><div ng-messages=vm.ShipmentDetailsForm.pickUpDate.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=minDate>{{\\'BOOKSHIPMENT.DATE_FUTURE_REQUIRED\\' | translate}}</div></div></mdp-date-picker></div><div ng-class=\\\"{\\'flex-offset-gt-sm-5 flex-gt-sm-30\\': !vm.isReview}\\\"><!--{{\\'BOOKSHIPMENT.SHIPMENT_AVAILABLE_TIME\\' | translate}}--><mdp-time-picker class=\\\"error-hidden required-ast\\\" mdp-placeholder=\\\"Shipment Available Time\\\" value=vm.shipment_details.shipmentAvailableTime ng-model=vm.shipment_details.shipmentAvailableTime ng-required=!vm.isReview name=shipmentAvailableTime mdp-disabled=vm.isReview><div ng-messages=vm.ShipmentDetailsForm.shipmentAvailableTime.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></mdp-time-picker></div><div ng-class=\\\"{\\'flex-offset-gt-sm-5 flex-gt-sm-30\\': !vm.isReview}\\\"><!-- {{\\'BOOKSHIPMENT.DOCK_CLOSE_TIME\\' | translate}} --><mdp-time-picker class=\\\"error-hidden required-ast\\\" mdp-placeholder=\\\"Dock Close Time\\\" ng-model=vm.shipment_details.dockTime required name=dockTime mdp-disabled=vm.isReview><div ng-messages=vm.ShipmentDetailsForm.dockTime.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></mdp-time-picker></div></div><div layout-gt-sm=row><div flex-gt-sm=48><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.CUSTOMS_VALUE\\' | translate}}</label><input ng-model=vm.shipment_details.customsValue ng-disabled=vm.isReview name=shipmentDetailsCustomsValue md-maxlength=45><div ng-messages=vm.ShipmentDetailsForm.shipmentDetailsCustomsValue.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.COD_AMOUNT\\' | translate}}</label><input ng-model=vm.shipment_details.codAmount ng-disabled=vm.isReview name=shipmentDetailsCODAmount md-maxlength=45><div ng-messages=vm.ShipmentDetailsForm.shipmentDetailsCODAmount.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=48><md-input-container class=\\\"md-block error-hidden\\\"><label>{{\\'BOOKSHIPMENT.AMOUNT_OF_INSURANCE\\' | translate}}</label><input ng-model=vm.shipment_details.amountInsurance ng-disabled=vm.isReview name=shipmentDetailsInsurance md-maxlength=45><div ng-messages=vm.ShipmentDetailsForm.shipmentDetailsInsurance.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><p class=\\\"md-caption p-a-sm\\\"><span class=text-upper>{{\\'BOOKSHIPMENT.INSURANCE\\' | translate}}</span> - {{\\'BOOKSHIPMENT.INSURANCE_DISCLAIMER\\' | translate}}</p></div><div flex=48 flex-offset-gt-sm=5 hide-sm hide-xs></div></div><md-input-container class=\\\"md-block error-hidden\\\"><label>{{\\'BOOKSHIPMENT.SPECIAL_INSTRUCTIONS\\' | translate}}</label><textarea ng-model=vm.shipment_details.specialInstructions name=description md-maxlength=750 rows=5 md-select-on-focus ng-disabled=vm.isReview></textarea></md-input-container><p class=\\\"md-caption p-a-sm\\\">{{\\'BOOKSHIPMENT.SHIPMENTS_OPTIONS_DISCLAIMER\\' | translate}}</p></md-card-content>\");\n$templateCache.put(\"/app/book-shipment/forms/shipment-options.html\",\"<md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.SHIPMENT_OPTIONS\\' | translate}}</span></h2><span flex></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event) ng-hide=vm.isReview><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.clearSection(\\'shipment_options\\')\\\"><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.CLEAR_SECTION\\' | translate}}</p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><h3 class=text-upper>{{\\'BOOKSHIPMENT.SERVICE_TYPE\\' | translate}}<span class=text-danger> *</span></h3><md-radio-group ng-model=vm.shipment_options.serviceType layout-gt-sm=row ng-required=!vm.isReview ng-disabled=vm.isReview><md-radio-button value=DTD ng-disabled=vm.isReview>{{\\'BOOKSHIPMENT.DOOR_TO_DOOR\\' | translate}}</md-radio-button><md-radio-button value=DTP ng-disabled=vm.isReview>{{\\'BOOKSHIPMENT.DOOR_TO_PORT\\' | translate}}</md-radio-button><md-radio-button value=PTD ng-disabled=vm.isReview>{{\\'BOOKSHIPMENT.PORT_TO_DOOR\\' | translate}}</md-radio-button><md-radio-button value=PTP ng-disabled=vm.isReview>{{\\'BOOKSHIPMENT.PORT_TO_PORT\\' | translate}}</md-radio-button></md-radio-group><h3 class=text-upper>{{\\'BOOKSHIPMENT.SERVICE_LEVEL\\' | translate}}<span class=text-danger> *</span></h3><md-radio-group ng-model=vm.shipment_options.serviceLevelType layout-gt-sm=row ng-required=!vm.isReview ng-disabled=vm.isReview><div flex-gt-sm=25 ng-repeat=\\\"serviceLevelType in vm.serviceLevelTypes\\\"><md-radio-button value={{serviceLevelType.serviceLevelType}} ng-disabled=vm.isReview ng-click=vm.updateServiceLevel()>{{serviceLevelType.label | translate}}</md-radio-button><md-radio-group ng-show=\\\"vm.shipment_options.serviceLevelType == \\'{{serviceLevelType.serviceLevelType}}\\'\\\" ng-model=vm.shipment_options.serviceLevel class=padding-left-small ng-required=\\\"!vm.isReview && vm.shipment_options.serviceLevel != \\'\\'\\\" ng-disabled=vm.isReview layout=column><md-radio-button ng-repeat=\\\"serviceLevel in serviceLevelType.options\\\" value={{serviceLevel.value}} ng-disabled=vm.isReview class=service-level-option>{{serviceLevel.label | translate}}</md-radio-button></md-radio-group></div></md-radio-group><h3 class=text-upper>{{\\'BOOKSHIPMENT.ACCESSORIALS\\' | translate}}</h3><div layout-gt-md=row class=m-b><div flex-gt-md=50><div layout=row><div flex=40><strong class=text-upper>{{\\'BOOKSHIPMENT.TYPE\\' | translate}}</strong></div><div flex=30 class=text-center><strong class=text-upper>{{\\'BOOKSHIPMENT.PICKUP\\' | translate}}</strong></div><div flex=30 class=text-center><strong class=text-upper>{{\\'BOOKSHIPMENT.DELIVERY\\' | translate}}</strong></div></div><ul class=border-list><li><div layout=row><div flex=40>{{\\'BOOKSHIPMENT.INSIDE\\' | translate}}</div><div flex=30 class=text-center><md-checkbox class=md-primary ng-model=vm.shipment_options.insideP aria-label=\\\"\\r\\n {{\\'BOOKSHIPMENT.INSIDE\\' | translate}} {{\\'BOOKSHIPMENT.DELIVERY\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.insideD aria-label=\\\"{{\\'BOOKSHIPMENT.INSIDE\\' | translate}} {{\\'BOOKSHIPMENT.PICKUP\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div></div></li><li><div layout=row><div flex=40>{{\\'BOOKSHIPMENT.LIFTGATE\\' | translate}}</div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.liftGateP aria-label=\\\"\\r\\n {{\\'BOOKSHIPMENT.LIFTGATE\\' | translate}} {{\\'BOOKSHIPMENT.DELIVERY\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.liftGateD aria-label=\\\"{{\\'BOOKSHIPMENT.LIFTGATE\\' | translate}} {{\\'BOOKSHIPMENT.PICKUP\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div></div></li><li><div layout=row><div flex=40>{{\\'BOOKSHIPMENT.PALLET_JACK\\' | translate}}</div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.palletJackP aria-label=\\\"\\r\\n {{\\'BOOKSHIPMENT.PALLET_JACK\\' | translate}} {{\\'BOOKSHIPMENT.DELIVERY\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.palletJackD aria-label=\\\"{{\\'BOOKSHIPMENT.PALLET_JACK\\' | translate}} {{\\'BOOKSHIPMENT.PICKUP\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div></div></li><li><div layout=row><div flex=40>{{\\'BOOKSHIPMENT.TWO_MAN\\' | translate}}</div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.twoManP aria-label=\\\"\\r\\n {{\\'BOOKSHIPMENT.TWO_MAN\\' | translate}} {{\\'BOOKSHIPMENT.DELIVERY\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.twoManD aria-label=\\\"{{\\'BOOKSHIPMENT.TWO_MAN\\' | translate}} {{\\'BOOKSHIPMENT.PICKUP\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div></div></li><li><div layout=row><div flex=40>{{\\'BOOKSHIPMENT.WHITE_GLOVE\\' | translate}}</div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.whiteGloveP aria-label=\\\"\\r\\n {{\\'BOOKSHIPMENT.WHITE_GLOVE\\' | translate}} {{\\'BOOKSHIPMENT.DELIVERY\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.whiteGloveD aria-label=\\\"{{\\'BOOKSHIPMENT.WHITE_GLOVE\\' | translate}} {{\\'BOOKSHIPMENT.PICKUP\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div></div></li><li><div layout=row><div flex=40>{{\\'BOOKSHIPMENT.APPT\\' | translate}}</div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.apptP aria-label=\\\"\\r\\n {{\\'BOOKSHIPMENT.APPT\\' | translate}} {{\\'BOOKSHIPMENT.DELIVERY\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.apptD aria-label=\\\"{{\\'BOOKSHIPMENT.APPT\\' | translate}} {{\\'BOOKSHIPMENT.PICKUP\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div></div></li><li><div layout=row><div flex=40>{{\\'BOOKSHIPMENT.HOTEL\\' | translate}}</div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.hotelP aria-label=\\\"\\r\\n {{\\'BOOKSHIPMENT.HOTEL\\' | translate}} {{\\'BOOKSHIPMENT.DELIVERY\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.hotelD aria-label=\\\"{{\\'BOOKSHIPMENT.HOTEL\\' | translate}} {{\\'BOOKSHIPMENT.PICKUP\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div></div></li><li><div layout=row><div flex=40>{{\\'BOOKSHIPMENT.CONVENTION\\' | translate}}</div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.conventionP aria-label=\\\"\\r\\n {{\\'BOOKSHIPMENT.CONVENTION\\' | translate}} {{\\'BOOKSHIPMENT.DELIVERY\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.conventionD aria-label=\\\"{{\\'BOOKSHIPMENT.CONVENTION\\' | translate}} {{\\'BOOKSHIPMENT.PICKUP\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div></div></li><li><div layout=row><div flex=40>{{\\'BOOKSHIPMENT.RESIDENTIAL\\' | translate}}</div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.residentialP aria-label=\\\"\\r\\n {{\\'BOOKSHIPMENT.RESIDENTIAL\\' | translate}} {{\\'BOOKSHIPMENT.DELIVERY\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div><div flex=30 class=text-center><md-checkbox ng-model=vm.shipment_options.residentialD aria-label=\\\"{{\\'BOOKSHIPMENT.RESIDENTIAL\\' | translate}} {{\\'BOOKSHIPMENT.PICKUP\\' | translate}}\\\" class=md-primary ng-disabled=vm.isReview></md-checkbox></div></div></li></ul></div></div></md-card-content>\");\n$templateCache.put(\"/app/book-shipment/forms/shipper-consignee.html\",\"<form novalidate class=\\\"form-horizontal light-form\\\" name=vm.ShipperConsigneeForm><md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.SHIPPER_CONSIGNEE_INFO\\' | translate}}</span></h2><span flex></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.clearSection(\\'shipper_consignee_info\\')\\\"><div layout=row flex><p flex>{{\\'BOOKSHIPMENT.CLEAR_SECTION\\' | translate}}</p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><div layout=row layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.shipper_consignee_info.same_as_billing ng-change=vm.changedSameAsBilling() aria-label=\\\"Same As Billing Party\\\">Same As Billing Party</md-checkbox></div><h3 class=\\\"text-upper m-b-0\\\">{{\\'BOOKSHIPMENT.SHIPPER_NAME_ADDRESS\\' | translate }}</h3><div ng-include=\\\"\\'/app/book-shipment/forms/shipper-info.html\\'\\\"></div><h3 class=\\\"text-upper m-b-0\\\">{{\\'BOOKSHIPMENT.CONSIGNEE_NAME_ADDRESS\\' | translate }}</h3><div ng-include=\\\"\\'/app/book-shipment/forms/consignee-info.html\\'\\\"></div></md-card-content></form>\");\n$templateCache.put(\"/app/book-shipment/forms/shipper-info.html\",\"<div layout-gt-sm=row><div flex-gt-sm=48><auto-complete-bookment class=required-ast field=shipper search-field={{vm.shipper_consignee_info.shipper}} display-name=BOOKSHIPMENT.SHIPPER_NAME search-text=vm.shipper_consignee_info.shipper form=vm.ShipperConsigneeForm is-review=vm.isReview is-fields-locked=vm.isShipperFieldLocked></auto-complete-bookment><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ADDRESS_1\\' | translate}}<span class=text-danger> *</span></label><input ng-model=vm.shipper_consignee_info.shipperAddress1 name=shipperAddress1 ng-required=!vm.isReview ng-disabled=\\\"vm.isReview || vm.isShipperFieldLocked\\\" md-maxlength=45><div ng-messages=vm.ShipperConsigneeForm.shipperAddress1.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ADDRESS_2\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.shipperAddress2 ng-disabled=\\\"vm.isReview || vm.isShipperFieldLocked\\\" md-maxlength=45 name=shipperAddress2><div ng-messages=vm.ShipperConsigneeForm.shipperAddress2.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ADDRESS_3\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.shipperAddress3 ng-disabled=\\\"vm.isReview || vm.isShipperFieldLocked\\\" md-maxlength=45 name=shipperAddress3><div ng-messages=vm.ShipperConsigneeForm.shipperAddress3.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ADDRESS_4\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.shipperAddress4 ng-disabled=\\\"vm.isReview || vm.isShipperFieldLocked\\\" md-maxlength=45 name=shipperAddress4><div ng-messages=vm.ShipperConsigneeForm.shipperAddress4.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.CITY\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.shipperCity ng-disabled=\\\"vm.isReview || vm.isShipperFieldLocked\\\" md-maxlength=45 name=shipperCity><div ng-messages=vm.ShipperConsigneeForm.shipperCity.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.STATE_PROV\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.shipperState ng-disabled=vm.isReview md-maxlength=45 name=shipperState><div ng-messages=vm.ShipperConsigneeForm.shipperState.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.POSTAL_CODE\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.shipperPostalCode ng-disabled=\\\"vm.isReview || vm.isShipperFieldLocked\\\" md-maxlength=45 name=shipperPostalCode><div ng-messages=vm.ShipperConsigneeForm.shipperPostalCode.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.COUNTRY\\' | translate}}<span class=text-danger> *</span></label><input ng-model=vm.shipper_consignee_info.shipperCountry name=shipperCountry ng-required=!vm.isReview ng-disabled=\\\"vm.isReview || vm.isShipperFieldLocked\\\" md-maxlength=45><div ng-messages=vm.ShipperConsigneeForm.shipperCountry.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.ACCOUNT_CODE\\' | translate}}</label><input ng-model=vm.shipper_consignee_info.shipperAccountCode ng-disabled=vm.isReview md-maxlength=45 name=shipperAccountCode><div ng-messages=vm.ShipperConsigneeForm.shipperAccountCode.$error><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.CONTACT_NAME\\' | translate}}<span class=text-danger> *</span></label><input ng-model=vm.shipper_consignee_info.shipperContactName name=shipperContactName ng-required=!vm.isReview ng-disabled=vm.isReview md-maxlength=45><div ng-messages=vm.ShipperConsigneeForm.shipperContactName.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.PHONE\\' | translate}}<span class=text-danger> *</span></label><input ng-model=vm.shipper_consignee_info.shipperPhone name=shipper_phone ng-pattern=/^.{10,}$/ ng-required=!vm.isReview ng-disabled=vm.isReview md-maxlength=45><div ng-messages=vm.ShipperConsigneeForm.shipper_phone.$error><div ng-message=required>{{\\'BOOKSHIPMENT.REQUIRED\\' | translate}}</div><div ng-message=pattern>{{\\'BOOKSHIPMENT.NOT_VALID_PHONE\\' | translate}}</div><div ng-message=md-maxlength>{{\\'BOOKSHIPMENT.LENGTH_ERROR\\' | translate}}</div></div></md-input-container></div></div>\");\n$templateCache.put(\"/app/book-shipment/modals/clear-fields.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'BOOKSHIPMENT.CLEAR_ALL_FIELDS\\' | translate}}</h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span><p>{{\\'BOOKSHIPMENT.SURE\\' | translate}}</p></span><div layout=row><span flex></span><div layout-align=\\\"end end\\\"><md-button ng-click=vm.closeModal()>{{\\'BOOKSHIPMENT.CANCEL\\' | translate}}</md-button><md-button ng-click=vm.clearOrder()>{{\\'BOOKSHIPMENT.CLEAR\\' | translate}}</md-button></div></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/book-shipment/modals/confirmation.html\",\"<md-dialog class=\\\"md-card-light m-t modal-content\\\"><md-toolbar><div class=\\\"md-toolbar-tools {{vm.confirmCSS}}\\\"><h2><span ng-show=\\\"!vm.isSubmitLoading && !vm.submissionErrors\\\">{{\\'BOOKSHIPMENT.CONFIRMATION\\' | translate}} </span><span ng-show=vm.isSubmitLoading>{{\\'BOOKSHIPMENT.SUBMITTING\\' | translate}} </span><span ng-show=\\\"!vm.isSubmitLoading && vm.submissionErrors\\\">{{\\'BOOKSHIPMENT.SUBMISSION_ERROR\\' | translate}}</span></h2><span flex></span><md-button class=md-raised ng-show=\\\"!vm.isSubmitLoading && !vm.submissionErrors && !!vm.shippingLabel\\\" ng-click=vm.printShippingLabel()>{{\\'BOOKSHIPMENT.PRINT_LABEL\\' | translate}}</md-button><md-button class=md-raised ng-show=\\\"!vm.isSubmitLoading && !vm.submissionErrors\\\" ng-click=vm.printBillOfLading()>{{\\'BOOKSHIPMENT.PRINT_BOL\\' | translate}}</md-button><md-button class=\\\"md-raised md-primary\\\" ng-click=vm.closeConfirmationModal() ng-if=\\\"!vm.isSubmitLoading && !vm.submissionErrors\\\" ng-disabled=vm.isSubmitLoading><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button><md-button class=\\\"md-raised md-primary\\\" ng-click=vm.closeModal() ng-if=\\\"!vm.isSubmitLoading && !!vm.submissionErrors\\\" ng-disabled=vm.isSubmitLoading><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><div layout=row layout-align=\\\"center center\\\"><md-progress-circular md-mode=indeterminate ng-show=vm.isSubmitLoading class=md-hue-1 md-diameter=100px></md-progress-circular><div ng-show=\\\"!vm.isSubmitLoading && !vm.submissionErrors\\\" class=submission-succession-text><i class=check-icon></i><h2>{{\\'BOOKSHIPMENT.SUCCESS_RECEIVED\\' | translate}}</h2><div class=track-trace-link><a ng-click=vm.viewBookedShipment()>Click here to view in Track and Trace</a> <small>(It may take a minute for shipment to appear in your results, so please save this link.)</small></div></div><div ng-show=\\\"!vm.isSubmitLoading && !!vm.submissionErrors\\\"><h2 class=text-danger>Errors</h2><div class=text-danger ng-repeat=\\\"error in vm.submissionErrors\\\"><p>{{error}}</p></div></div></div></md-dialog-content><md-dialog-actions layout-gt-xs=row layout-align-xs=\\\"center center\\\"><div ng-if=\\\"!vm.isSubmitLoading && !vm.submissionErrors\\\"><md-button class=\\\"md-raised md-primary\\\" ng-click=vm.closeConfirmationModal() ng-disabled=vm.isSubmitLoading>{{\\'BOOKSHIPMENT.OK\\' | translate}}</md-button></div><div ng-if=\\\"!vm.isSubmitLoading && !!vm.submissionErrors\\\"><md-button class=\\\"md-raised md-primary\\\" ng-click=vm.closeModal() ng-disabled=vm.isSubmitLoading>{{\\'BOOKSHIPMENT.OK\\' | translate}}</md-button></div></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/book-shipment/modals/review-form.html\",\"<md-dialog class=\\\"md-card-light xs-fullscreen\\\"><md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.REVIEW\\' | translate}}</span></h2><span flex></span><!-- <md-button class=\\\"md-raised\\\" ng-click=\\\"vm.print()\\\">{{\\'BOOKSHIPMENT.PRINT\\' | translate}}</md-button> --><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><div><div layout-gt-sm=row><div flex-gt-sm=50><form novalidate class=\\\"form-horizontal light-form\\\"><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.CUSTOMER_EMAIL\\' | translate}}<span ng-hide=vm.isReview class=text-danger> *</span></label><input ng-model=vm.customer_info.customerEmail ng-required=!vm.isReview></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.PHONE\\' | translate}}<span ng-hide=vm.isReview class=text-danger> *</span></label><input ng-model=vm.customer_info.customerPhone ng-required=!vm.isReview></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" flex-gt-sm><label>{{\\'BOOKSHIPMENT.BOL_SLI_CMR\\' | translate}}<span ng-hide=vm.isReview class=text-danger> *</span></label><input ng-model=vm.complete_shipment.bol_sli_cmr ng-required=!vm.isReview></md-input-container></form></div><div flex-gt-sm=50><md-card id={{vm.sideBarData[0].id}} class=md-card-light><md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.BILLING_PARTY_INFO\\' | translate}}</span></h2><span flex></span></div></md-toolbar><form novalidate class=\\\"form-horizontal light-form\\\"><md-card-content ng-include=\\\"\\'/app/book-shipment/forms/billing-party-info.html\\'\\\"></md-card-content></form></md-card></div></div><div layout-gt-sm=row><div flex-gt-sm=50><md-card id={{vm.sideBarData[0].id}} class=md-card-light><md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.SHIPPER_NAME_ADDRESS\\' | translate}}</span></h2><span flex></span></div></md-toolbar><form novalidate class=\\\"form-horizontal light-form\\\"><md-card-content ng-include=\\\"\\'/app/book-shipment/forms/shipper-info.html\\'\\\"></md-card-content></form></md-card></div><div flex-gt-sm=50><md-card id={{vm.sideBarData[0].id}} class=md-card-light><md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'BOOKSHIPMENT.CONSIGNEE_NAME_ADDRESS\\' | translate}}</span></h2><span flex></span></div></md-toolbar><form novalidate class=\\\"form-horizontal light-form\\\"><md-card-content ng-include=\\\"\\'/app/book-shipment/forms/consignee-info.html\\'\\\"></md-card-content></form></md-card></div></div><div layout-gt-sm=row><div flex-gt-sm=50><md-card id={{vm.sideBarData[2].id}} class=\\\"md-card-light horizontal-form light-form\\\"><div ng-include=\\\"\\'/app/book-shipment/forms/shipment-options.html\\'\\\"></div></md-card></div><div flex-gt-sm=50><md-card id={{vm.sideBarData[3].id}} class=\\\"md-card-light horizontal-form light-form\\\" ng-include=\\\"\\'/app/book-shipment/forms/shipment-details.html\\'\\\"></md-card></div></div><div layout-gt-sm=row><div flex-gt-sm=50><md-card id={{vm.sideBarData[4].id}} class=\\\"md-card-light horizontal-form light-form\\\" ng-include=\\\"\\'/app/book-shipment/forms/reference-numbers.html\\'\\\"></md-card></div><div flex-gt-sm=50><md-card id={{vm.sideBarData[5].id}} class=\\\"md-card-light horizontal-form light-form\\\" ng-include=\\\"\\'/app/book-shipment/forms/haz-mat.html\\'\\\"></md-card></div></div><md-card id={{vm.sideBarData[6].id}} class=\\\"md-card-light horizontal-form light-form\\\" ng-include=\\\"\\'/app/book-shipment/forms/item-details.html\\'\\\"></md-card></div></md-dialog-content><md-dialog-actions layout-gt-xs=row layout-align-xs=\\\"center center\\\"><span id=book_shipment_review_terms ng-if=!vm.readTermsAndConditions>{{ \\'BOOKSHIPMENT.REVIEW_TERMS\\' | translate }}</span> <a href=/terms-conditions target=_blank><md-button ng-click=\\\"vm.readTermsAndConditions = true\\\" class=\\\"md-raised {{(vm.readTermsAndConditions)? \\'green-button\\' : \\'md-primary\\'}}\\\">{{\\'BOOKSHIPMENT.TERMS_CONDITIONS\\' | translate}}</md-button></a><md-button class=\\\"md-raised md-primary\\\" ng-click=vm.submitOrder() ng-disabled=!vm.readTermsAndConditions>{{\\'BOOKSHIPMENT.SUBMIT\\' | translate}}</md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/book-shipment/modals/submission-error.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'BOOKSHIPMENT.SUBMISSION_ERROR\\' | translate}}</h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span><p>{{\\'BOOKSHIPMENT.FAILED_TO_SUBMIT\\' | translate}}</p></span><div layout=row><span flex></span><div layout-align=\\\"end end\\\"><md-button ng-click=vm.closeModal()>{{\\'BOOKSHIPMENT.OK\\' | translate}}</md-button></div></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/book-shipment/modals/submission.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'BOOKSHIPMENT.SUBMIT\\' | translate}}</h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-if=vm.isFormValid()><h3>{{\\'BOOKSHIPMENT.SUBMIT_VALID\\' | translate}}</h3></span><span ng-if=!vm.isFormValid()><h3>{{\\'BOOKSHIPMENT.SUBMIT_NOT_VALID\\' | translate}}</h3></span><div layout=row><span flex></span><div layout-align=\\\"end end\\\"><md-button ng-click=vm.closeModal()>{{\\'BOOKSHIPMENT.OK\\' | translate}}</md-button></div></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/book-shipment/search-previous-shipments/search-previous-shipments.html\",\"<div layout=row><div flex=95 class=flex-transition><div><h3 layout-xs=row layout-align-xs=\\\"start center\\\"><md-icon class=m-r-xs>search</md-icon><span>{{\\'BOOKSHIPMENT.LOOKUP_PREVIOUS_SHIPMENT\\' | translate | uppercase}}</span></h3></div></div><md-button style=margin-top:9px class=\\\"md-fab md-mini btn-collapse\\\" aria-label=Open/Close ng-click=\\\"toggleCollapse(); vm.setCollapseState()\\\"><md-icon>{{collapsed ? \\'expand_more\\' : \\'expand_less\\'}}</md-icon></md-button></div><div ng-show=!collapsed><form ng-submit=searchCtrl.clickedSearch() analytics-on=submit analytics-category=BookShipment analytics-event=used-previous-shipment><div layout=row><auto-complete field=bol_number search-field={{bolSliCmrSearch}} display-name=\\\"AWB/BOL #\\\" search-text=bolSliCmrSearch extra-param-string=\\\"book_shipment=true\\\" flex></auto-complete><md-button class=\\\"md-icon-button m-t-sm\\\" type=submit><md-icon>search</md-icon></md-button></div><!--<div layout=\\\"row\\\">\\r\\n <div flex=\\\"48\\\">\\r\\n <md-input-container class=\\\"md-block\\\" flex-gt-sm>\\r\\n <label>{{\\'BOOKSHIPMENT.ORIGIN\\' | translate}}</label>\\r\\n <input ng-model=\\\"vm.lookup.origin\\\">\\r\\n </md-input-container>\\r\\n </div>\\r\\n <div flex=\\\"48\\\" flex-offset-gt-sm=\\\"5\\\">\\r\\n <md-input-container class=\\\"md-block\\\" flex-gt-sm>\\r\\n <label>{{\\'BOOKSHIPMENT.DESTINATION\\' | translate}}</label>\\r\\n <input ng-model=\\\"vm.lookup.destination\\\">\\r\\n </md-input-container>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <mdp-date-picker mdp-placeholder=\\\"{{\\'BOOKSHIPMENT.DATE\\' | translate}}\\\"\\r\\n ng-model=\\\"vm.lookup.date\\\"\\r\\n class=\\\"md-block\\\" flex-gt-sm\\r\\n ></mdp-date-picker>--></form></div>\");\n$templateCache.put(\"/app/book-shipment/toast/attach-doc.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.ATTACH_DOC_ERROR\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/attach-doc.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.ATTACH_DOC_SUCCESS\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/clear-draft.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.CLEAR_ERROR\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/clear-draft.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.CLEAR_SUCCESS\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/lookup-none.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=warn-color>warning</md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.LOOKUP_NONE_ERROR\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/lookup.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.LOOKUP_ERROR\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/lookup.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.LOOKUP_SUCCESS\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/remove-doc.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.REMOVE_DOC_ERROR\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/remove-doc.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.REMOVE_DOC_SUCCESS\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/save-draft.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.SAVE_ERROR\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/save-draft.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.SAVE_SUCCESS\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/submit.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'BOOKSHIPMENT.SUBMIT_ERROR\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span><p></p></div></md-toast>\");\n$templateCache.put(\"/app/book-shipment/toast/terms-conditions.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-warning></md-icon><span layout=row><p>{{\\'BOOKSHIPMENT.MUST_READ_TERMS\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/components/breadcrumbs/breadcrumbs.html\",\"<md><breadcrumb><a href=#>Track Trace</a></breadcrumb></md>\");\n$templateCache.put(\"/app/components/contacts/contact-phone.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2 translate=WIDGETS.CALL_CRANE_CONTACT></h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span translate=WIDGETS.CALL_CRANE_CONTACT_CONTENT></span><br><br><b><a href=tel:{{phone_number}}>{{contact.phone}}</a></b></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><span flex=auto></span><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled><span translate=CLOSE></span></md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/components/contacts/contacts.html\",\"<!-- ContactsController as vm --><md-dialog id=support-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2 translate=WIDGETS.MESSAGE></h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><form novalidate class=light-form name=messageForm ng-submit=vm.sendMessage()><div layout=column><md-input-container class=md-block flex=auto><label translate=WIDGETS.CRANE_CONTACT_NAME></label><input ng-model=vm.contactName name=name disabled></md-input-container><md-input-container class=md-block flex=auto><md-input-container class=md-block flex=auto><label translate=WIDGETS.SUBJECT></label><input ng-model=vm.contactMessageData.subject name=subject ng-init=\\\"vm.contactMessageData.subject = \\'General Account\\'\\\" ng-disabled=true></md-input-container><div ng-messages=messageForm.subject.$error><div ng-message=required><span translate=WIDGETS.REQUIRED></span></div></div></md-input-container></div><md-input-container class=md-block flex=auto><label translate=WIDGETS.MESSAGE></label><textarea ng-model=vm.contactMessageData.message name=message md-maxlength=1000 rows=5 md-select-on-focus required></textarea><div ng-messages=messageForm.message.$error><div ng-message=required><span translate=WIDGETS.MESSAGE_ERROR></span></div><div ng-message=md-maxlength><span translate=WIDGETS.MESSAGE_MAX_ERROR></span></div></div></md-input-container><md-input-container class=md-block flex=auto><label translate=WIDGETS.CURRENT_URL></label><input value={{vm.getCurrentUrl()}} name=url ng-disabled=true></md-input-container><md-input-container class=md-block ng-hide=\\\"vm.contactMessageData.subject !== \\'General Account\\'\\\"><md-checkbox ng-model=vm.willSendUrl class=md-primary aria-label=willSendUrl><span translate=WIDGETS.SEND_URL></span></md-checkbox></md-input-container><div ng-if=\\\"vm.getIsInTrackTrace() && vm.willSendUrl\\\" ng-repeat=\\\"field in vm.getCurrentFields()\\\"><span ng-if=\\\"field.value != \\'\\'\\\"><b><span translate={{field.display}}></span>:</b> <span ng-if=\\\"field.display.includes(\\'DATE\\')\\\">{{field.value | date: \\\"MMM dd, yyyy\\\" : \\\"UTC\\\"}}</span> <span ng-if=\\\"!field.display.includes(\\'DATE\\')\\\">{{field.value}}</span><br></span></div><div ng-if=\\\"vm.getIsInShipmentDetails() && vm.willSendUrl\\\" ng-repeat=\\\"detail in vm.getShipmentDetails()\\\"><b><span translate={{detail.display}}></span>:</b> <span ng-if=\\\"detail.display.includes(\\'DATE\\')\\\">{{detail.value | date: \\\"MMM dd, yyyy\\\" : \\\"UTC\\\"}}</span> <span ng-if=\\\"!detail.display.includes(\\'DATE\\')\\\">{{detail.value}}</span><br></div><md-input-container class=md-block flex=auto><p translate=WIDGETS.CALL_CRANE_CONTACT_CONTENT></p><a href=tel:{{phone_number}}>{{contact.phone}}</a></md-input-container><div layout=row><span flex=auto></span><div layout-align=\\\"end end\\\"><md-button type=submit class=\\\"md-accent md-raised\\\" aria-label=\\\"Send Message\\\" ng-disabled=messageForm.$invalid><span translate=WIDGETS.SEND></span></md-button></div></div></form></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/components/contacts/message-error.toast.html\",\"<md-toast><div layout=row><md-icon class=text-danger></md-icon><span flex=auto><p>An Error has occurred while sending your message.<br>Please try again at a later time or phone us.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/components/contacts/message-success.toast.html\",\"<md-toast><div layout=row><md-icon class=text-success></md-icon><span flex=auto><p>Message has been sent!<br>Your Crane representative will be in touch.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/components/contacts/user-rep.html\",\"<md-button class=\\\"contact-info contact-email\\\" md-ink-ripple=false ng-click=vm.showContactModal() ng-disabled=(vm.noContact)><md-tooltip>Support</md-tooltip><md-icon></md-icon></md-button>\");\n$templateCache.put(\"/app/components/crane-search/crane-search-cfs-results.html\",\"<md-dialog class=navbar-search-results ng-cloak><md-toolbar><div class=md-toolbar-tools><h2>{{ \\'COMPONENTS.SEARCH_RESULTS\\' | translate}} - {{ query }}</h2><span flex=auto></span><md-button class=\\\"md-icon-button md-button\\\" ng-click=closeSearchResults()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding flex-fill flex=auto style=\\\"min-height: 120px\\\"><div loadmask=!isLoading style=\\\"min-height: 120px\\\" class=loadmask-light ng-show=isLoading></div><div class=table-scroll ng-hide=isLoading><table class=card-content-table><thead><tr><th>PRO #</th><th>{{\\'SHIPPINGDETAILS.ORIGIN\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.DESTINATION_ABBREVIATED\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.EXCEPTION_ABBREVIATED\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.STATUS\\' | translate}}</th></tr></thead><tbody><tr ng-repeat=\\\"item in searchResults\\\"><td><a class=btn-link ng-href=/shipping-details-cfs/{{item.pro}}>{{item.pro}}</a></td><td><md-icon></md-icon>{{item.pickupdate | date:\\'dd-MMM-yyyy\\'}}<br><md-icon></md-icon>{{item.origincitystate}}</td><td><md-icon></md-icon>{{item.deliverydate | date:\\'dd-MMM-yyyy\\'}}<br><md-icon></md-icon>{{item.destinationcitystate}}</td><td><md-icon ng-if=\\\"item.exception == \\'current_exception\\'\\\" class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\"></md-icon></td><td class=\\\"{{item.isdelivered == \\'false\\' ? \\'text-success\\' : \\'\\'}}\\\">{{item.isdelivered == \\\"true\\\" ? \\'Delivered\\' : \\'Undelivered\\'}}</td></tr><tr ng-if=\\\"searchResults.length == 0\\\"><td colspan=5>{{ \\'COMPONENTS.NO_SEARCH_RESULTS\\' | translate }}</td></tr></tbody></table></div></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"end end\\\"><div flex-fill flex=auto layout=row><div flex=auto flex-fill><span class=search-results-info ng-if=\\\"searchResults.length > 0\\\">{{ \\'COMPONENTS.SEARCH_RESULTS_SHOWING\\' | translate: searchResultsTranslateData }}</span></div><div><md-button ng-click=closeSearchResults()>{{ \\'CLOSE\\' | translate }}</md-button></div></div></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/components/crane-search/crane-search-cmts-results.html\",\"<md-dialog class=navbar-search-results ng-cloak><md-toolbar><div class=md-toolbar-tools><h2>{{ \\'COMPONENTS.SEARCH_RESULTS\\' | translate}} - {{ query }}</h2><span flex=auto></span><md-button class=\\\"md-icon-button md-button\\\" ng-click=closeSearchResults()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding flex-fill flex=auto style=\\\"min-height: 120px\\\"><div loadmask=!isLoading style=\\\"min-height: 120px\\\" class=loadmask-light ng-show=isLoading></div><div class=table-scroll ng-hide=isLoading><table class=card-content-table><thead><tr><th>Load #</th><th>{{\\'SHIPPINGDETAILS.ORIGIN\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.DESTINATION_ABBREVIATED\\' | translate}}</th><!--<th>{{\\'SHIPPINGDETAILS.EXCEPTION_ABBREVIATED\\' | translate}}</th>--><th>{{\\'SHIPPINGDETAILS.STATUS\\' | translate}}</th></tr></thead><tbody><tr ng-repeat=\\\"item in searchResults\\\"><td><a class=btn-link ng-href=/shipping-details-cmts/{{item.load_id}}>{{item.load_number}}</a></td><td><md-icon></md-icon>{{item.planned_start_date | date:\\'dd-MMM-yyyy hh:mm\\'}}<br><md-icon></md-icon>{{item.pickup_location}}</td><td><md-icon></md-icon>{{item.planned_end_date | date:\\'dd-MMM-yyyy hh:mm\\'}}<br><md-icon></md-icon>{{item.delivery_location}}</td><!--<td>\\r\\n <md-icon ng-if=\\\"item.exception == \\'current_exception\\'\\\" class=\\\"current-exception\\\" title=\\\"current exception\\\" aria-label=\\\"current exception\\\"></md-icon>\\r\\n </td>--><td>{{item.load_status}}</td></tr><tr ng-if=\\\"searchResults.length == 0\\\"><td colspan=5>{{ \\'COMPONENTS.NO_SEARCH_RESULTS\\' | translate }}</td></tr></tbody></table></div></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"end end\\\"><div flex-fill flex=auto layout=row><div flex=auto flex-fill><span class=search-results-info ng-if=\\\"searchResults.length > 0\\\">{{ \\'COMPONENTS.SEARCH_RESULTS_SHOWING\\' | translate: searchResultsTranslateData }}</span></div><div><md-button ng-click=closeSearchResults()>{{ \\'CLOSE\\' | translate }}</md-button></div></div></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/components/crane-search/crane-search-csl-results.html\",\"<md-dialog class=navbar-search-results ng-cloak><md-toolbar><div class=md-toolbar-tools><h2>{{ \\'COMPONENTS.SEARCH_RESULTS\\' | translate}} - {{ query }}</h2><span flex=auto></span><md-button class=\\\"md-icon-button md-button\\\" ng-click=closeSearchResults()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding flex-fill flex=auto style=\\\"min-height: 120px\\\"><div loadmask=!isLoading style=\\\"min-height: 120px\\\" class=loadmask-light ng-show=isLoading></div><div class=table-scroll ng-hide=isLoading><table class=card-content-table><thead><tr><th>PRO #</th><th>{{\\'SHIPPINGDETAILS.ORIGIN\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.DESTINATION_ABBREVIATED\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.EXCEPTION_ABBREVIATED\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.STATUS\\' | translate}}</th></tr></thead><tbody><tr ng-repeat=\\\"item in searchResults\\\"><td><a class=btn-link ng-href=/shipping-details-csl/{{item.pro}}>{{item.pro}}</a></td><td><md-icon></md-icon>{{item.pickupapptdate | date:\\'dd-MMM-yyyy\\'}}<br><md-icon></md-icon>{{item.origincitystate}}</td><td><md-icon></md-icon>{{item.consigneeapptdate | date:\\'dd-MMM-yyyy\\'}}<br><md-icon></md-icon>{{item.destinationcitystate}}</td><td><md-icon ng-if=\\\"item.exception == \\'current_exception\\'\\\" class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\"></md-icon></td><td class=\\\"{{item.isdelivered == \\'false\\' ? \\'text-success\\' : \\'\\'}}\\\">{{item.isdelivered == \\\"true\\\" ? \\'Delivered\\' : \\'Undelivered\\'}}</td></tr><tr ng-if=\\\"searchResults.length == 0\\\"><td colspan=5>{{ \\'COMPONENTS.NO_SEARCH_RESULTS\\' | translate }}</td></tr></tbody></table></div></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"end end\\\"><div flex-fill flex=auto layout=row><div flex=auto flex-fill><span class=search-results-info ng-if=\\\"searchResults.length > 0\\\">{{ \\'COMPONENTS.SEARCH_RESULTS_SHOWING\\' | translate: searchResultsTranslateData }}</span></div><div><md-button ng-click=closeSearchResults()>{{ \\'CLOSE\\' | translate }}</md-button></div></div></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/components/crane-search/crane-search-results.html\",\"<md-dialog class=navbar-search-results ng-cloak><md-toolbar><div class=md-toolbar-tools><h2>{{ \\'COMPONENTS.SEARCH_RESULTS\\' | translate}} - {{ query }}</h2><span flex=auto></span><md-button class=\\\"md-icon-button md-button\\\" ng-click=closeSearchResults()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding flex-fill flex=auto style=\\\"min-height: 120px\\\"><div loadmask=!isLoading style=\\\"min-height: 120px\\\" class=loadmask-light ng-show=isLoading></div><div class=table-scroll ng-hide=isLoading><table class=card-content-table><thead><tr><th>{{\\'SHIPPINGDETAILS.AWB_BOL\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.ORIGIN\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.DESTINATION_ABBREVIATED\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.EXCEPTION_ABBREVIATED\\' | translate}}</th><th>{{\\'SHIPPINGDETAILS.STATUS\\' | translate}}</th></tr></thead><tbody><tr ng-repeat=\\\"item in searchResults\\\"><td><a class=btn-link ng-href=/shipping-details/{{item.gshpid}}>{{item.awb}}</a></td><td><md-icon></md-icon>{{item.departuredate | date:\\'dd-MMM-yyyy\\'}}<br><md-icon></md-icon>{{item.origin}}</td><td><md-icon></md-icon>{{item.duedate | date:\\'dd-MMM-yyyy\\'}}<br><md-icon></md-icon>{{item.destination}}</td><td><md-icon ng-if=\\\"item.flag == \\'current_exception\\'\\\" class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\"></md-icon><md-icon ng-if=\\\"item.flag == \\'potential_exception\\'\\\" class=potential-exception title=\\\"potential exception\\\" aria-label=\\\"potential exception\\\"></md-icon></td><td class=\\\"{{item.isdelivered == \\'false\\' ? \\'text-success\\' : \\'\\'}}\\\">{{item.isdelivered == \\\"true\\\" ? \\'Delivered\\' : \\'Undelivered\\'}}</td></tr><tr ng-if=\\\"searchResults.length == 0\\\"><td colspan=5>{{ \\'COMPONENTS.NO_SEARCH_RESULTS\\' | translate }}</td></tr></tbody></table></div></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"end end\\\"><div flex-fill flex=auto layout=row><div flex=auto flex-fill><span class=search-results-info ng-if=\\\"searchResults.length > 0\\\">{{ \\'COMPONENTS.SEARCH_RESULTS_SHOWING\\' | translate: searchResultsTranslateData }}</span></div><div><md-button ng-click=closeSearchResults()>{{ \\'CLOSE\\' | translate }}</md-button></div></div></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/components/crane-search/crane-search.html\",\"<div ng-controller=\\\"CraneSearchController as vm\\\" layout=row><md-button class=\\\"icon-button btn-unpad\\\" ng-click=$parent.expandSearch(false) ng-show=$parent.mobileExpanded><md-icon aria-label=search></md-icon></md-button><div class=navbar-search flex ng-show=$parent.isExpanded><form ng-submit=vm.onFormSubmit($event) name=crane_search_form id=crane-search><input placeholder=\\\"{{ \\'COMPONENTS.SEARCH_SHIPMENTS\\' | translate }}\\\" ng-model=craneSearch name=query> <input type=submit style=display:none></form></div><md-button class=\\\"icon-button btn-unpad\\\" ng-click=vm.searchAction()><md-icon aria-label=search></md-icon></md-button></div>\");\n$templateCache.put(\"/app/components/crane-table/crane-table.html\",\"<style>@media (max-width: 768px) {\\r\\n .tool-buttons {\\r\\n /*width:220px; */\\r\\n }\\r\\n }\\r\\n .hide-page-class .table-page\\r\\n {\\r\\n display: none;\\r\\n }\\r\\n .show-page-class .table-page\\r\\n {\\r\\n display: block;\\r\\n }\\r\\n .text{\\r\\n text-transform: capitalize;\\r\\n font-weight: bold;\\r\\n }</style><md-card class=m-t><md-toolbar class=three-dot-height ng-style=\\\"lensviewtablepopup == true ? {\\'position\\': \\'absolute\\',\\'top\\':\\'0\\'} : \\'\\'\\\"><div><div class=\\\"md-toolbar-tools inline-table\\\" layout-gt-xs=row layout=column layout-align-gt-xs=\\\"space-between center\\\"><div layout=row layout-align=\\\"center center\\\" class=mobile-style-adj><md-icon ng-show=!!icon ng-bind-html=icon></md-icon>  <span class=uppercase translate={{title}}></span> <span ng-show=!lensviewtable>({{tctrl.getTable(content).total()}})</span> <span ng-show=lensviewtable>({{tctrl.getTable(content).total()}})</span></div><div layout=row layout-align=\\\"space-around center\\\" class=mobile-style-adj><span ng-show=lensviewtable style=\\\"font-size: 13px;font-style: italic;color: #CCC;margin-left: 5px;text-transform: none\\\">{{lensviewtitle}}</span> <span ng-if=\\\"tctrl.listSelectedCount > 0 && !tctrl.showPouptext\\\">, Selected: {{tctrl.listSelectedCount}} {{tctrl.showPouptext}}</span> <span class=text ng-if=\\\"tctrl.listSelectedCount > 0 && tctrl.showPouptext\\\"> Users Selected: {{tctrl.listSelectedCount}}</span></div><div layout=row layout-align=\\\"start enter\\\" class=\\\"tool-buttons mobile-style-adj\\\"><!-- ng-show=\\\"!!buttons\\\" --><!--<span ng-show=\\\"!!buttons\\\" layout=\\\"row\\\" class=\\\"tool-buttons\\\">--> <span ng-repeat=\\\"button in buttons\\\"><md-button ng-if=!readaccess ng-hide=\\\"button.hide || button.lensviewIcon || button.closeButton\\\" class=md-raised ng-click=button.action(button.param)><span translate={{button.display}}></span></md-button><md-icon style=\\\"margin:7px 0px 0px 9px;cursor:pointer\\\" ng-show=button.lensviewIcon ng-bind-html=button.icon ng-click=button.action(button.param)></md-icon></span><div ng-include=menu style=display:inline></div><span flex=auto ng-show=lensviewtablepopup></span><md-button class=md-icon-button ng-click=tctrl.cancel() ng-show=lensviewtablepopup><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button><!--</span>--></div><!--<h2>\\r\\n\\r\\n <md-icon ng-show=\\\"!!icon\\\" ng-bind-html=\\\"icon\\\"></md-icon>\\r\\n <span class=\\\"uppercase\\\" translate=\\\"{{title}}\\\"></span>\\r\\n\\r\\n <span ng-show=\\\"!lensviewtable\\\">({{tctrl.getTable(content).total()}})</span>\\r\\n <span ng-show=\\\"lensviewtable\\\">({{tctrl.getTable(content).total()}})</span>\\r\\n <span ng-show=\\\"lensviewtable\\\" style=\\\"font-size: 14px;\\r\\n font-style: italic;\\r\\n color: #CCC;\\r\\n margin-left: 10px;\\r\\n text-transform: none;\\\">{{lensviewtitle}}</span>\\r\\n <span ng-if=\\\"tctrl.listSelectedCount > 0\\\">, Selected: {{tctrl.listSelectedCount}}</span>\\r\\n <!-- <span ng-if=\\\"tctrl.getSelectedCount() > 0\\\">, Selected: {{tctrl.getSelectedCount()}}</span> --><!--</h2>\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <span ng-show=\\\"!!buttons\\\" layout=\\\"row\\\" class=\\\"tool-buttons\\\">\\r\\n <span ng-repeat=\\\"button in buttons\\\">\\r\\n <md-button ng-if=\\\"!readaccess\\\" ng-hide=\\\"button.hide || button.lensviewIcon || button.closeButton\\\" class=\\\"md-raised\\\" ng-click=\\\"button.action(button.param)\\\">\\r\\n <span translate=\\\"{{button.display}}\\\"></span>\\r\\n </md-button>\\r\\n <md-icon style=\\\"margin:7px 0px 0px 18px;cursor:pointer;\\\" ng-show=\\\"button.lensviewIcon\\\" ng-bind-html=\\\"button.icon\\\" ng-click=\\\"button.action(button.param)\\\"></md-icon>\\r\\n </span>\\r\\n </span>\\r\\n <div ng-include=\\\"menu\\\"></div>\\r\\n <span flex=\\\"auto\\\" ng-show=\\\"lensviewtablepopup\\\"></span>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"tctrl.cancel()\\\" ng-show=\\\"lensviewtablepopup\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>--></div></div></md-toolbar><md-card-content ng-class=\\\"{\\'lensview-table\\' : (lensviewtable == true) }\\\"><div class=table-scroll ng-init=\\\"globals.tableParams1 = tctrl.getTable(content)\\\"><div class=loadmask-light loadmask=!isLoading><form ng-class=\\\"loaddatausers == true ? \\'hide-page-class\\' : \\'show-page-class\\'\\\" ng-submit=select()><div ng-show=loaddatausers><md-progress-circular md-mode=indeterminate class=\\\"md-hue-1 progress-indicator ng-scope\\\" md-diameter=100px style=\\\"position: absolute; top: 50%; left: 50%; margin-top: -50px; margin-left: -50px; width: 100px; height: 100px\\\" aria-valuemin=0 aria-valuemax=100 role=progressbar></md-progress-circular></div><table ng-table-dynamic=\\\"globals.tableParams1 with tctrl.columns\\\" ng-class=\\\"lensviewtablepopup == true ? \\'popup-class\\' : \\'\\'\\\" class=\\\"table table-striped table-fixed table-static\\\" template-header=/app/components/crane-table/header.html template-pagination=/app/components/crane-table/pagination.html><tbody ng-hide=loaddatausers><!-- <tr ng-repeat=\\\"(index, row) in $data | limitTo :tctrl.showAllClientException.length\\\" ng-if=\\\"!tctrl.readAccess && tctrl.showAllClientException.length>0 && tctrl.showAllClientException[index].approver_level ==\\'all_clients_approver\\'\\\">\\r\\n <td></td>\\r\\n <td>{{tctrl.showAllClientException[index].first_name}}</td>\\r\\n <td>{{tctrl.showAllClientException[index].last_name}}</td>\\r\\n <td>{{tctrl.showAllClientException[index].email}}</td>\\r\\n <td class=\\\"{{tctrl.getClass(row, \\'user_status\\')}}\\\">{{tctrl.showAllClientException[index].user_status}}</td>\\r\\n <td ng-bind-html=\\\"tctrl.getField(row, \\'approver_level\\')\\\">{{tctrl.showAllClientException[index].approver_level}}</td>\\r\\n <td style=\\\"color: #4AACDE;\\\" ng-click=\\\"tctrl.gotoSelectUser($event, tctrl.showAllClientException[index].id,true)\\\">View User</td>\\r\\n\\r\\n </tr> --><tr ng-repeat=\\\"(index, row) in $data | limitTo :1\\\" ng-if=\\\"!tctrl.readAccessLens && tctrl.showAllClient.length>0 && tctrl.showAllClient[0]==\\'ALL CLIENTS CWW\\'\\\"><td></td><td>{{tctrl.showAllClient[0]}}</td><td style=\\\"color: #4AACDE\\\">{{tctrl.showAllClient[1]}}</td><td>{{tctrl.showAllClient[2]}}</td><td style=\\\"color: #4AACDE\\\" ng-if=tctrl.mangaeLensGroupCheck ng-click=\\\"tctrl.gotoSelectUser($event, tctrl.showAllClient[0],true)\\\">{{tctrl.showAllClient[3]}}</td><!-- <td ng-if=\\\"tctrl.showAllClient.length>4\\\"></td> --></tr><tr ng-repeat=\\\"(index, row) in $data | limitTo :1\\\" ng-if=\\\"!tctrl.readAccessLens && tctrl.showAllClientCsl.length>0 && tctrl.showAllClientCsl[0]==\\'ALL CLIENTS CSL\\'\\\"><td></td><td>{{tctrl.showAllClientCsl[0]}}</td><td style=\\\"color: #4AACDE\\\">{{tctrl.showAllClientCsl[1]}}</td><td>{{tctrl.showAllClientCsl[2]}}</td><td style=\\\"color: #4AACDE\\\" ng-if=tctrl.mangaeLensGroupCheck ng-click=\\\"tctrl.gotoSelectUser($event, tctrl.showAllClientCsl[0],true)\\\">{{tctrl.showAllClientCsl[3]}}</td><!-- <td ng-if=\\\"tctrl.showAllClient.length>4\\\"></td> --></tr><tr ng-repeat=\\\"(index, row) in $data | limitTo :1\\\" ng-if=\\\"!tctrl.readAccessLens && tctrl.showAllClientCfs.length>0 && tctrl.showAllClientCfs[0]==\\'ALL CLIENTS CFS\\'\\\"><td></td><td>{{tctrl.showAllClientCfs[0]}}</td><td style=\\\"color: #4AACDE\\\">{{tctrl.showAllClientCfs[1]}}</td><td>{{tctrl.showAllClientCfs[2]}}</td><td style=\\\"color: #4AACDE\\\" ng-if=tctrl.mangaeLensGroupCheck ng-click=\\\"tctrl.gotoSelectUser($event, tctrl.showAllClientCfs[0],true)\\\">{{tctrl.showAllClientCfs[3]}}</td><!-- <td ng-if=\\\"tctrl.showAllClient.length>4\\\"></td> --></tr><tr ng-repeat=\\\"(index, row) in $data | limitTo :1\\\" ng-if=\\\"!tctrl.readAccessLens && tctrl.showAllClientCmts.length>0 && tctrl.showAllClientCmts[0]==\\'ALL CLIENTS CMTS\\'\\\"><td></td><td>{{tctrl.showAllClientCmts[0]}}</td><td style=\\\"color: #4AACDE\\\">{{tctrl.showAllClientCmts[1]}}</td><td>{{tctrl.showAllClientCmts[2]}}</td><td style=\\\"color: #4AACDE\\\" ng-if=tctrl.mangaeLensGroupCheck ng-click=\\\"tctrl.gotoSelectUser($event, tctrl.showAllClientCmts[0],true)\\\">{{tctrl.showAllClientCmts[3]}}</td><!-- <td ng-if=\\\"tctrl.showAllClient.length>4\\\"></td> --></tr><tr ng-repeat=\\\"(index, row) in $data\\\" ng-if=\\\"(!($data[index].name ==\\'ALL CLIENTS CWW\\') || (tctrl.showAllClientFlag)) && (!($data[index].name ==\\'ALL CLIENTS CFS\\') || (tctrl.showAllClientFlagCfs)) && (!($data[index].name ==\\'ALL CLIENTS CSL\\') || (tctrl.showAllClientFlagCsl)) && (!($data[index].name ==\\'ALL CLIENTS CMTS\\') || (tctrl.showAllClientFlagCmts))\\\" style=\\\"{{row.is_new?\\'color:#45AFE3;font-weight:bold\\':\\'\\';}}\\\"><td ng-repeat=\\\"col in $columns \\\" ng-if=\\\"(!($data[index].name ==\\'ALL CLIENTS CWW\\') || (tctrl.showAllClientFlag)) && (!($data[index].name ==\\'ALL CLIENTS CFS\\') || (tctrl.showAllClientFlagCfs)) && (!($data[index].name ==\\'ALL CLIENTS CSL\\') || (tctrl.showAllClientFlagCmts)) && (!($data[index].name ==\\'ALL CLIENTS CMTS\\') || (tctrl.showAllClientFlagCmts))\\\" ng-style=\\\"{\\'min-width\\' : (col.field == \\'start_date\\' || col.field == \\'end_date\\' || col.field == \\'mode\\' ) ? \\'110px\\' :\\'\\'}\\\"><input style=cursor:pointer ng-click=\\\"tctrl.selectUser($event, index)\\\" ng-if=\\\"col.field==\\'selected\\' && !($data[index].name ==\\'ALL CLIENTS CWW\\') && !($data[index].name ==\\'ALL CLIENTS CFS\\') && !($data[index].name ==\\'ALL CLIENTS CSL\\') && !($data[index].name ==\\'ALL CLIENTS CMTS\\') && !($data[index].approver_level ==\\'all_clients_approver\\')\\\" type=checkbox ng-model=row.selected> <a ng-click=\\\"tctrl.gotoSelectUser($event, row.)\\\" ng-if=\\\"col.field==\\'selecteditems\\'\\\"></a><!-- Discussion page cww only --> <span class=hoverable ng-if=\\\"col.field == \\'flags\\'\\\"><md-icon ng-if=\\\"row.flags.includes(\\'current_exception\\')\\\" class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\" ng-mouseover=tctrl.getException(row.gshpid)></md-icon><md-icon ng-if=\\\"row.flags.includes(\\'potential_exception\\')\\\" class=potential-exception title=\\\"potential exception\\\" aria-label=\\\"potential exception\\\" ng-mouseover=tctrl.getPotentialException(row.gshpid)></md-icon><md-tooltip ng-if=\\\"row.flags.includes(\\'current_exception\\')\\\" md-direction=right><md-progress-circular md-mode=indeterminate class=\\\"md-warn md-hue-2\\\" ng-show=tctrl.tooltipIsLoading></md-progress-circular><p ng-show=!tctrl.tooltipIsLoading>Current Exception: <span>{{tctrl.response.code}}</span></p><p ng-show=!tctrl.tooltipIsLoading>Description: <span>{{tctrl.response.description}}</span></p></md-tooltip><md-tooltip ng-if=\\\"row.flags.includes(\\'potential_exception\\')\\\" md-direction=right><md-progress-circular md-mode=indeterminate class=tracktracetooltip ng-show=tctrl.tooltipIsLoading></md-progress-circular><p ng-show=!tctrl.tooltipIsLoading>Current Potential Exception: <span>{{tctrl.response.title}}</span></p><p ng-show=!tctrl.tooltipIsLoading>Description: <span>{{tctrl.response.description}}</span></p></md-tooltip></span><!-- Discussion page csl only --> <span class=hoverable ng-if=\\\"col.field == \\'cslflags\\'\\\"><md-icon ng-show=row.exceptions.length class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\" ng-mouseover=tctrl.getException(row.exceptions)></md-icon><md-tooltip md-direction=right><md-progress-circular md-mode=indeterminate class=\\\"md-warn md-hue-2\\\" ng-show=vm.tooltipIsLoading></md-progress-circular><div ng-show=!tctrl.tooltipIsLoading ng-repeat=\\\"exception in row.exceptions\\\"><p>Current Exception: <span>{{exception.pointname}}</span></p><p>Date / Time Created: <span>{{exception.created_at | date:\\'dd-MMM-yyyy\\'}}     {{exception.created_at | date:\\'hh:mm\\'}}</span></p></div></md-tooltip></span><!-- Discussion page cww only --> <a target=_blank href=\\\"{{tctrl.gotoShipment(row, col.field)}}\\\" ng-if=\\\"col.field==\\'awb\\'\\\" class=awb-bol-number><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span></a> <a target=_blank href=\\\"{{tctrl.gotoShipment(row, col.field)}}\\\" ng-if=\\\"col.field==\\'unseen_discussion_count_cww\\'\\\" class=awb-bol-number><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span></a> <a target=_blank href=\\\"{{tctrl.gotoShipment(row, col.field)}}\\\" ng-if=\\\"col.field==\\'status_cww\\'\\\" ng-class=\\\"(row.status == \\'undelivered\\') ? \\'discussion_undelivered\\' : (row.status == \\'delivered\\') ? \\'discussion_delivered\\' : (row.status == \\'booked\\') ? \\'discussion_booked\\' : \\'\\'\\\" ng-class=\\\"\\\"><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span></a> <a target=_blank style=\\\"color: #5E6163 !important;font-weight: normal\\\" href=\\\"{{tctrl.gotoShipment(row, col.field)}}\\\" ng-if=\\\"col.field==\\'bookingnumber_cww\\'\\\" class=awb-bol-number><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span></a><!-- Discussion page csl only --> <a target=_blank href=\\\"{{tctrl.gotoShipment(row, col.field)}}\\\" ng-if=\\\"col.field==\\'unseen_discussion_count_csl\\'\\\" class=awb-bol-number><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span></a> <a target=_blank href=\\\"{{tctrl.gotoShipment(row, col.field)}}\\\" ng-if=\\\"col.field==\\'pro\\'\\\" class=awb-bol-number><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span></a> <a target=_blank href=\\\"{{tctrl.gotoShipment(row, col.field)}}\\\" ng-if=\\\"col.field==\\'bol\\'\\\" class=awb-bol-number><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span></a> <a target=_blank href=\\\"{{tctrl.gotoShipment(row, col.field)}}\\\" ng-if=\\\"col.field==\\'status_csl\\'\\\" ng-class=\\\"(row.status == \\'UNDELIVERED\\') ? \\'discussion_undelivered\\' : (row.status == \\'DELIVERED\\') ? \\'discussion_delivered\\' : (row.status == \\'PLANNED\\') ? \\'discussion_booked\\' : \\'\\'\\\" ng-class=\\\"\\\"><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span></a><!-- Discussion page cfs only --> <a target=_blank href=\\\"{{tctrl.gotoShipment(row, col.field)}}\\\" ng-if=\\\"col.field==\\'status_cfs\\'\\\" ng-class=\\\"(row.status == \\'UNDELIVERED\\') ? \\'discussion_undelivered\\' : (row.status == \\'DELIVERED\\') ? \\'discussion_delivered\\' : (row.status == \\'PLANNED\\') ? \\'discussion_booked\\' : \\'\\'\\\" ng-class=\\\"\\\"><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span></a> <a ng-if=\\\"col.field==\\'action\\' && !tctrl.showUserText && !tctrl.viewUserText\\\"><span ng-if=\\\"$columns[1].field !=\\'first_name\\' \\\"><!--<span style=\\\"cursor:pointer;\\\" ng-if=\\\"($data[index].name ==\\'ALL CLIENTS\\')\\\" ng-click=\\\"tctrl.gotoSelectUser($event, $data[index],true)\\\">View List</span>--> <span style=cursor:pointer ng-if=tctrl.showLensText ng-click=\\\"tctrl.gotoSelectUser($event, $data[index])\\\">Edit Lens Group</span> <span style=cursor:pointer ng-if=\\\"tctrl.showDepText && !tctrl.readAccess\\\" ng-click=tctrl.edit_deptlens($event,row)>Edit Department</span> <span style=cursor:pointer ng-if=\\\"tctrl.showDepText && tctrl.readAccess\\\" ng-click=tctrl.edit_deptlens($event,row)>View Department</span> </span><span style=cursor:pointer ng-if=\\\"!tctrl.showLensText && !tctrl.viewExceptionText && !tctrl.featureSpotlight && !tctrl.showUserText && !tctrl.viewUserText && !tctrl.showDepText && $columns[1].field !=\\'first_name\\'\\\" ng-click=\\\"tctrl.gotoSelectUser($event, $data[index])\\\">Edit List</span> <span style=cursor:pointer ng-if=tctrl.viewExceptionText ng-click=\\\"tctrl.gotoSelectUser($event, $data[index])\\\">View</span> <span style=cursor:pointer ng-if=tctrl.featureSpotlight ng-click=\\\"tctrl.gotoSelectUser($event, $data[index])\\\">Edit</span><!-- <span style=\\\"cursor:pointer;\\\" ng-if=\\\"$columns[1].field ==\\'first_name\\' || tctrl.showUserText \\\" ng-click=\\\"tctrl.gotoSelectUser($event, $data[index])\\\">Edit User</span> --> </a><a target=_blank href={{tctrl.getLink(row)}} ng-if=\\\"col.field==\\'action\\' && ($columns[1].field ==\\'first_name\\' || tctrl.showUserText) && !tctrl.viewUserText && !tctrl.viewUserTextLens\\\">Edit User </a><a href={{tctrl.getLink(row)}} ng-if=\\\"col.field==\\'action\\' && ($columns[1].field ==\\'first_name\\' || tctrl.showUserTextLens) && !tctrl.viewUserText && !tctrl.showUserText\\\">Edit User </a><a target=_blank href={{tctrl.getLink(row)}} ng-if=\\\"col.field==\\'action\\' && ($columns[1].field ==\\'first_name\\' || tctrl.viewUserText) && !tctrl.showUserText && !tctrl.viewUserTextLens\\\">View User </a><a ng-click=\\\"tctrl.removeElem($event, $data[index])\\\" ng-if=\\\"((col.field==\\'actionremove\\') && !($data[index].name ==\\'ALL CLIENTS CWW\\') && !($data[index].name ==\\'ALL CLIENTS CFS\\') && !($data[index].name ==\\'ALL CLIENTS CSL\\') && !($data[index].name ==\\'ALL CLIENTS CMTS\\'))\\\" style=\\\"cursor: pointer\\\">Remove </a><!-- User edit open new tab --> <a target=_blank ng-if=\\\"tctrl.isLink(col.field) && !col.page && tctrl.EditTab\\\" href=\\\"{{tctrl.getLink(row, col.field)}}\\\" class=\\\"{{tctrl.getClass(row, col.field)}}\\\"><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span><md-icon ng-if=tctrl.hasIcon(col.field)>{{tctrl.getIcon(row, col.field)}}</md-icon></a><a ng-if=\\\"tctrl.isLink(col.field) && !col.page && !tctrl.EditTab\\\" href=\\\"{{tctrl.getLink(row, col.field)}}\\\" class=\\\"{{tctrl.getClass(row, col.field)}}\\\"><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span><md-icon ng-if=tctrl.hasIcon(col.field)>{{tctrl.getIcon(row, col.field)}}</md-icon></a><!-- Equipment page only --> <a style=cursor:pointer ng-if=\\\"tctrl.isLink(col.field) && col.page == \\'equipment\\'\\\" ng-click=tctrl.editEquipment(row)><span ng-bind-html=\\\"tctrl.getField(row, col.field)\\\"></span><md-icon>{{tctrl.getIcon(row, col.field)}}</md-icon></a><div ng-model=myColor ng-if=\\\"col.field==\\'priority\\'\\\"><i class=material-icons ng-style=\\\"{color: myColor}\\\" ng-bind-html=\\\"tctrl.getPrority(row, col.field)\\\" style=\\\"margin-left: 15px\\\">{{tctrl.getPrority(row, col.field)}}</i></div><img ng-if=tctrl.isLinkImg(col.field) title=\\\"No Image Selected\\\" src=\\\"{{tctrl.getLink(row, col.field)}}\\\" style=\\\"height: 50px; width:100px; font-size: 12px; text-align: center\\\" atr> <a ng-if=\\\"(($data[index].name ==\\'ALL CLIENTS CWW\\') && ($data[index].name ==\\'ALL CLIENTS CSL\\') && ($data[index].name ==\\'ALL CLIENTS CFS\\') && ($data[index].name ==\\'ALL CLIENTS CMTS\\') && col.field == \\'company_count\\')\\\"><span>ALL</span></a><div ng-if=\\\"!tctrl.isLink(col.field) && col.field !=\\'selected\\' && col.field !=\\'selecteditems\\' && !(($data[index].name ==\\'ALL CLIENTS CWW\\') && ($data[index].name ==\\'ALL CLIENTS CSL\\') && ($data[index].name ==\\'ALL CLIENTS CFS\\') && ($data[index].name ==\\'ALL CLIENTS CMTS\\') && col.field == \\'company_count\\') &&\\r\\n col.field != \\'priority\\' && col.field != \\'flags\\' && col.field != \\'awb\\' && col.field != \\'unseen_discussion_count_cww\\' && col.field != \\'bookingnumber_cww\\' && col.field != \\'unseen_discussion_count_csl\\'\\r\\n && col.field != \\'status_cww\\' && col.field != \\'pro\\' && col.field != \\'bol\\' && col.field != \\'status_csl\\' && col.field != \\'status_cfs\\' && col.field != \\'slide_title\\' && !tctrl.isLinkImg(col.field)\\\" class=\\\"{{tctrl.getClass(row, col.field)}}\\\"><span class=\\\"tctrl.getClass(row, col.field)\\\" ng-bind-html=\\\"col.isDate ? (tctrl.getField(row, col.field) | date) : tctrl.getField(row, col.field)\\\"></span></div><div ng-if=\\\"col.field == \\'slide_title\\'\\\"><span class=ellipsis_title ng-bind-html=\\\"col.isDate ? (tctrl.getField(row, col.field) | date) : tctrl.getField(row, col.field)\\\"></span></div></td></tr><!-- <tr>\\r\\n <td id=\\\"isResults\\\" ng-show=\\\"vm.isNoResults\\\">\\r\\n <span translate=\\\"ADMIN.POTENTIAL.NORESULTS\\\"></span>\\r\\n </td>\\r\\n </tr> --><tr ng-if=\\\"(tctrl.getTable(content).total() === 0)\\\"><td colspan=100% style=\\\"text-align: center\\\" id=isResults><span>No Result Found</span></td></tr></tbody></table></form></div></div><md-button style=\\\"position: absolute;bottom: 0;color: #f6f6f6;margin: 5px 0px 16px 10px\\\" ng-show=tctrl.clearbtn ng-click=tctrl.clearAll() hide-xs><span translate=TRACKTRACE.CLEAR></span></md-button></md-card-content></md-card>\");\n$templateCache.put(\"/app/components/crane-table/filterDefault.html\",\"<md-input-container class=error-hidden><input type=text name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container>\");\n$templateCache.put(\"/app/components/crane-table/filterHeader.html\",\"<tr ng-show=show_filter class=ng-table-filters><th data-title-text=\\\"{{$column.titleAlt(this) || $column.title(this)}}\\\" ng-repeat=\\\"$column in $columns\\\" ng-if=$column.show(this) class=\\\"filter {{$column.class(this)}}\\\"><div ng-repeat=\\\"(name, filter) in $column.filter(this)\\\"><div ng-include=config.getTemplateUrl(filter)></div></div></th></tr>\");\n$templateCache.put(\"/app/components/crane-table/header.html\",\"<ng-table-group-row></ng-table-group-row><ng-table-sorter-row-cview><ng-table-filter-row-cview></ng-table-filter-row-cview></ng-table-sorter-row-cview>\");\n$templateCache.put(\"/app/components/crane-table/pagination.html\",\"<div class=\\\"ng-table-pager m-t-sm ng-scope table-page\\\" ng-if=params.data.length><div layout-gt-xs=row layout-xs=column><div><ul ng-if=pages.length class=\\\"pagination ng-table-pagination ng-scope\\\"><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=\\\"ng-scope disabled\\\"><a ng-switch-when=prev ng-click=params.page(page.number) href=\\\"\\\" class=ng-scope>«</a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=first ng-click=params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>1</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=page ng-click=params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>2</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=last ng-click=params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>3</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=next ng-click=params.page(page.number) href=\\\"\\\" class=ng-scope>»</a></li></ul></div><span flex></span><div ng-if=params.settings().counts.length class=\\\"ng-table-counts btn-group pull-right ng-scope\\\"><div><md-button ng-repeat=\\\"count in params.settings().counts\\\" ng-class=\\\"{\\'md-primary\\':params.count()==count}\\\" ng-click=params.count(count) aria-label=\\\"Pagination Count\\\" class=\\\"md-raised md-default\\\"><span ng-bind=count class=ng-binding></span></md-button></div><span class=md-caption>Records per page</span></div></div></div>\");\n$templateCache.put(\"/app/components/crane-table/sorterHeader.html\",\"<tr class=ng-table-sort-header><!-- Table Header --><th title={{$column.headerTitle(this)}} ng-repeat=\\\"$column in $columns\\\" ng-class=\\\"{ \\'sortable\\': $column.sortable(this),\\r\\n \\'sort-asc\\': params.sorting()[$column.sortable(this)]==\\'asc\\',\\r\\n \\'sort-desc\\': params.sorting()[$column.sortable(this)]==\\'desc\\'\\r\\n }\\\" ng-if=$column.show(this) ng-init=\\\"template = $column.headerTemplateURL(this)\\\" class=\\\"header {{$column.class(this)}}\\\" filter=\\\"{ age: \\'/app/components/crane-table/filterHeader.html\\' }\\\"><!-- <div\\r\\n ng-click=\\\"$column.field==\\'selected\\' ? null : sortBy($column, $event) \\\"\\r\\n ng-if=\\\"!template\\\"\\r\\n class=\\\"ng-table-header\\\"\\r\\n style=\\\"height: 100%;\\\"\\r\\n ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\"\\r\\n ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\">\\r\\n <input\\r\\n type=\\\"checkbox\\\"\\r\\n ng-model=\\\"tctrl.selectAll\\\"\\r\\n ng-click=\\\"tctrl.checkAll(tctrl.selectAll)\\\"\\r\\n ng-if=\\\"$column.field==\\'selected\\'\\\"/>\\r\\n <span\\r\\n ng-click=\\\"$column.field==\\'selected\\' ? sortBy($column, $event) : null\\\"\\r\\n ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"\\r\\n translate=\\\"{{$column.title(this)}}\\\">\\r\\n </span>\\r\\n </div> --><div ng-if=!template><div ng-if=!$column.notstatic class=ng-table-header style=\\\"height: 100%\\\" ng-style=\\\"{\\'width\\' : tctrl.featureSpotlight ? tctrl.getColumnWidth($column.field) : ($column.field == \\'company_count\\') ? \\'auto\\' : \\'120px\\'}\\\" ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><md-select md-container-class=spotlight-dropdown ng-model=tctrl.searchData[$column.field] placeholder=\\\"{{$column.title(this) | translate}}\\\" aria-label=\\\"{{$column.title(this) | translate}}\\\" ng-if=\\\"$column.field ==\\'index_status\\' && searchflag \\\" ng-change=tctrl.searchListData() style=\\\"margin: 0px !important\\\"><md-option ng-value=null>—</md-option><md-option ng-repeat=\\\"status in tctrl.slide_status\\\" ng-value=status.status>{{status.type}}</md-option></md-select><md-select md-container-class=spotlight-dropdown ng-model=tctrl.searchData[$column.field] placeholder=\\\"{{$column.title(this) | translate}}\\\" aria-label=\\\"{{$column.title(this) | translate}}\\\" ng-if=\\\"$column.field ==\\'priority\\' && searchflag\\\" ng-change=tctrl.searchListData() style=\\\"margin: 0px !important; padding: 0px !important\\\"><md-option ng-value=null>—</md-option><md-option ng-repeat=\\\"priority in tctrl.priority\\\" ng-value=priority.status><span>{{priority.type}} </span><span style=\\\"margin-left: 5px !important; display: inline-block\\\"><i style=\\\"font-size: 17px !important\\\" class=material-icons ng-style=\\\"{color: priority.color}\\\">{{priority.icon}}</i></span></md-option></md-select><input style=cursor:pointer type=checkbox ng-model=tctrl.selectAll ng-click=tctrl.checkAll(tctrl.selectAll) ng-if=\\\"$column.field==\\'selected\\'\\\"> <input type=text placeholder=\\\"{{$column.title(this) | translate}}\\\" ng-if=\\\"$column.field !=\\'selected\\' && searchflag && $column.field !=\\'company\\' && $column.field !=\\'action\\' && \\r\\n $column.field != \\'selecteditems\\' && $column.field !=\\'is_active\\' && $column.field !=\\'actionremove\\'&& $column.field !=\\'status\\' && $column.field !=\\'slide_image\\' && $column.field !=\\'index_status\\' && $column.field !=\\'priority\\'\\\" ng-keyup=tctrl.searchListData() ng-minlength=3 ng-model=tctrl.searchData[$column.field] style=\\\"background: #050b24;border: none;border-bottom: 1px solid #7d879b; color: #FFF; \\r\\n width: 100%\\\"> <span ng-if=\\\"!searchflag || $column.field ==\\'selected\\' || $column.field ==\\'company\\' \\\" ng-click=\\\"sortBy($column, $event)\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\" translate={{$column.title(this)}}></span><!-- <span ng-show=\\\"searchflag && $column.field ==\\'action\\' \\\" \\r\\n ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"\\r\\n style=\\\"float: right;\\\"\\r\\n >\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"tctrl.searchflag = false\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </span> --></div><div ng-if=$column.notstatic class=ng-table-header resizable r-directions=\\\"[\\'right\\']\\\" id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}};min-width:130px;width:310px ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><input type=checkbox ng-model=tctrl.selectAll ng-click=tctrl.checkAll(tctrl.selectAll) ng-if=\\\"$column.field==\\'selected\\'\\\"> <span ng-click=\\\"sortBy($column, $event)\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\" translate={{$column.title(this)}}></span><!--\\r\\n ng-click=\\\"$column.field==\\'selected\\' ? sortBy($column, $event) : null\\\"\\r\\n <span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\">\\r\\n <span translate=\\\"{{$column.title(this)}}\\\" ng-click=\\\"!sortClickable($event) ? null : sortBy($column, $event)\\\"></span>\\r\\n </span> --></div><span ng-repeat=\\\"button in buttons\\\"><md-icon style=\\\"margin:7px 0px 0px 35px;cursor:pointer; font-size: 28px; color: rgb(85,154,196)\\\" ng-show=button.closeButton ng-bind-html=button.icon ng-click=button.action(button.param) ng-if=\\\"$column.field == \\'action\\' && searchflag\\\"></md-icon></span></div><div ng-if=template ng-include=template></div></th></tr>\");\n$templateCache.put(\"/app/components/hold-button/hold-button.html\",\"<md-button class=\\\"md-raised search-type md-accent\\\" ng-mousedown=\\'mouseDown(\\\"up\\\")\\' ng-mouseup=mouseUp(ev) ng-disabled=isdisabled()><span ng-hide=isloading translate={{title}}></span><md-progress-circular md-mode=indeterminate ng-hide=!isloading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button>\");\n$templateCache.put(\"/app/components/loading-button/loading-button.html\",\"<md-button class=\\\"md-raised md-accent\\\" ng-click=callfunction() ng-disabled=isdisabled()><span ng-hide=isloading translate={{display}}></span><md-progress-circular md-mode=indeterminate ng-hide=!isloading class=md-hue-1 md-diameter=30px></md-progress-circular></md-button>\");\n$templateCache.put(\"/app/components/navbar/navbar.html\",\"<md-toolbar layout=row layout-align=\\\"center center\\\"><md-button href=https://github.com/Swiip/generator-gulp-angular>Gulp Angular</md-button><section flex layout=row layout-align=\\\"left center\\\"><md-button href=# class=md-raised>Home</md-button><md-button href=# class=md-raised>About</md-button><md-button href=# class=md-raised>Contact</md-button></section><md-button class=acme-navbar-text>Application was created {{ vm.relativeDate }}.</md-button></md-toolbar>\");\n$templateCache.put(\"/app/components/ob-daterangepicker/calendar.html\",\"<div class=input-container ng-if=month._showInput()><label>{{month.Attrs.label}}</label><input type=text ng-model=month.value ng-keypress=\\\"month.dateInputEntered($event, month.value)\\\" ng-blur=\\\"month.dateInputSelected($event, month.value)\\\"></div><div class=header><span class=\\\"arrow-btn left\\\" ng-if=month.showLeftArrow() ng-click=month.moveToPrev()>◀</span> <span class=date>{{month.getFormattedMonth(month.calendar.currentCalendar)}}</span> <span class=\\\"arrow-btn right\\\" ng-if=month.showRightArrow() ng-click=month.moveToNext(1)>▶</span></div><div class=board><div class=days-of-week><span class=day-name ng-repeat=\\\"day in month.daysName track by $index\\\">{{day}}</span></div><div class=weeks><div ng-repeat=\\\"week in month.calendar.monthWeeks track by $index\\\"><span class=day ng-repeat=\\\"day in week track by $index\\\" ng-class=\\\"{\\r\\n \\'selected\\': day.selected,\\r\\n \\'current\\': day.currentDay,\\r\\n \\'other-month\\': !day.currentMonth,\\r\\n \\'in-range\\': day.inRange,\\r\\n \\'range-start\\': day.rangeStart,\\r\\n \\'range-end\\': day.rangeEnd,\\r\\n \\'disabled\\': day.disabled\\r\\n }\\\" ng-click=month.daySelected(day)>{{day.mo.format(\\'D\\')}}</span></div></div></div>\");\n$templateCache.put(\"/app/components/ob-daterangepicker/date-range-picker.html\",\"<calendar class=calendar api=picker.startCalendarApi min-day=picker.minDay() max-day=picker.maxDay() week-start=picker.weekStart() month=picker.startCalendar interceptors=picker.startCalendarInterceptors range-start=picker.rangeStart range-end=picker.rangeEnd selected-day=picker.rangeStart max-month=picker.endCalendar week-days-name=picker.weekDaysName() month-format=picker.monthFormat() input-format=picker.inputFormat() label=\\\"Start Date\\\"></calendar><calendar class=calendar api=picker.endCalendarApi min-day=picker.minDay() max-day=picker.maxDay() week-start=picker.weekStart() month=picker.endCalendar interceptors=picker.endCalendarInterceptors range-start=picker.rangeStart range-end=picker.rangeEnd selected-day=picker.rangeEnd min-month=picker.startCalendar week-days-name=picker.weekDaysName() month-format=picker.monthFormat() input-format=picker.inputFormat() label=\\\"End Date\\\"></calendar>\");\n$templateCache.put(\"/app/components/ob-daterangepicker/ob-date-range-picker.html\",\"<div class=picker-dropdown-container ng-class=\\\"{\\'disabled\\': obDateRangePicker.disabled()}\\\"><div class=picker-dropdown ng-class=\\\"{\\'open\\': obDateRangePicker.isPickerVisible}\\\" ng-click=obDateRangePicker.togglePicker()><span>{{obDateRangePicker.value}}</span></div><div class=picker ng-class=\\\"{\\'open\\': obDateRangePicker.isPickerVisible}\\\" ng-show=obDateRangePicker.isPickerVisible><div class=date-range ng-show=obDateRangePicker.isCustomVisible><date-range-picker ng-if=obDateRangePicker.isPickerVisible api=obDateRangePicker.pickerApi interceptors=obDateRangePicker.pickerInterceptors linked-calendars=obDateRangePicker.linkedCalendars() week-start=obDateRangePicker.weekStart() range=obDateRangePicker._range week-days-name=obDateRangePicker.weekDaysName() min-day=obDateRangePicker._getMinDay() max-day=obDateRangePicker._getMaxDay() month-format=obDateRangePicker.monthFormat() input-format=obDateRangePicker.inputFormat()></date-range-picker></div><div class=ranges-actions ng-class=\\\"{\\'custom-open\\': obDateRangePicker.isCustomVisible}\\\"><div class=ranges><div class=range ng-repeat=\\\"range in obDateRangePicker.preRanges track by $index\\\" ng-class=\\\"{\\'selected\\': obDateRangePicker.selectedRengeIndex === $index, \\'disabled\\': range.disabled}\\\" ng-click=\\\"obDateRangePicker.predefinedRangeSelected(range, $index)\\\" ng-if=\\\"!$last || ($last && !obDateRangePicker.calendarsAlwaysOn())\\\">{{range.name}}</div></div><div class=actions ng-if=!obDateRangePicker.autoApply()><div class=\\\"btn cancel\\\" ng-click=obDateRangePicker.discardChanges()>Cancel</div><div class=\\\"btn apply\\\" ng-click=obDateRangePicker.applyChanges()>APPLY</div></div></div></div></div>\");\n$templateCache.put(\"/app/components/ob-daterangepicker/ob-day-picker.html\",\"<div ng-form={{::dayPicker.formName}} class=picker-dropdown-container ng-class=\\\"{\\'open\\': dayPicker.isPickerVisible,\\r\\n \\'disabled\\': dayPicker.disabled(),\\r\\n \\'invalid\\': !dayPicker.dayValidity}\\\"><input class=picker-input ng-model=dayPicker.value ng-change=dayPicker.updateValidity() ng-keydown=\\\"dayPicker.dateInputEntered($event, dayPicker.value)\\\" ng-click=dayPicker.showPicker() ng-disabled=dayPicker.disabled()><div class=picker ng-show=dayPicker.isPickerVisible><calendar class=calendar api=dayPicker.calendarApi min-day=dayPicker._getMinDay() max-day=dayPicker._getMaxDay() week-start=dayPicker.weekStart() month=dayPicker._selectedDay interceptors=dayPicker.calendarInterceptors selected-day=dayPicker._selectedDay min-month=dayPicker.startCalendar week-days-name=dayPicker.weekDaysName() month-format=dayPicker.monthFormat() show-input=false></calendar></div></div>\");\n$templateCache.put(\"/app/components/time-zones-select/time-zones-select.html\",\"<md-input-container class=md-block><label>{{\\'ADMIN.POTENTIAL.TIME_ZONE\\' | translate}}</label><md-icon></md-icon><md-select ng-model=model aria-label=model ng-disabled=disabled><!--<div ng-repeat=\\\"timeZoneObject in vm.timeZoneObjects\\\">\\r\\n <md-optgroup label=\\\"{{timeZoneObject.country}}\\\">\\r\\n <md-option value=\\\"{{zone}}\\\" ng-repeat=\\\"zone in timeZoneObject.zones\\\">\\r\\n {{zone}}\\r\\n </md-option>\\r\\n </md-optgroup>\\r\\n </div>--><md-option ng-repeat=\\\"zone in vm.timeZoneObjects\\\" value={{zone.value}}>{{zone.display}}</md-option></md-select></md-input-container>\");\n$templateCache.put(\"/app/components/widgets/bookmarked-shipments-results.html\",\"<style>@media screen and (min-width: 790px) and (max-width: 1500px) { \\r\\n .bookmark-table-Scroll{\\r\\n height:390px !important;\\r\\n overflow-y: auto;\\r\\n }\\r\\n }\\r\\n .card-content-table thead tr th{\\r\\n width: auto !important;\\r\\n }</style><div ng-if=!widgetsCtrl.bookmarksError class=\\\"table-scroll bookmark-table-Scroll\\\"><table class=card-content-table><thead><tr><th><span translate=SHIPPINGDETAILS.AWB_BOL></span></th><th><span translate=SHIPPINGDETAILS.ORIGIN_ABBREVIATED></span> <span>→</span> <span translate=SHIPPINGDETAILS.DESTINATION_ABBREVIATED></span></th><!-- <th style=\\\"min-width:85px;\\\"><span translate=\\\"SHIPPINGDETAILS.START_DATE\\\"></span></th>\\r\\n <th style=\\\"min-width:85px;\\\"><span translate=\\\"SHIPPINGDETAILS.DUE_DATE\\\"></span></th> --><th><span translate=SHIPPINGDETAILS.START_DATE></span></th><th><span translate=SHIPPINGDETAILS.DUE_DATE></span></th><th><span translate=SHIPPINGDETAILS.ESTIMATED_DELIVERY_ABBREVIATED></span></th><th><span translate=SHIPPINGDETAILS.EXCEPTION_ABBREVIATED></span></th><th><span translate=SHIPPINGDETAILS.STATUS></span></th><th ng-show=widgetsCtrl.showRemoveButton></th><th><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\" ng-if=\\\"widgetsCtrl.bookmarksCount > 0\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4 style=\\\"z-index: 1000 !important\\\"><md-menu-item ng-hide=widgetsCtrl.showRemoveButton><md-button ng-click=\\\"widgetsCtrl.editBookmarks();widgetsCtrl.showRemoveButton = true\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.EDIT></span></p></div></md-button></md-menu-item><md-menu-item ng-show=widgetsCtrl.showRemoveButton><md-button ng-click=widgetsCtrl.doneEditingBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.DONE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></th></tr></thead><tbody><tr ng-repeat=\\\"item in widgetsCtrl.bookmarks\\\"><td><a target=_blank class=btn-link ng-href=/shipping-details/{{item.gshpid}} ng-click=vm.closeBookmarksModal() analytics-on analytics-category=Dashboard analytics-event=ClickBookmarkedShipment>{{item.awb}}</a></td><td><!-- <md-icon class=\\\"m-r-xs\\\"></md-icon> {{item.departuredate | date:\\'dd-MMM-yyyy\\'}}<br> --><!-- <md-icon class=\\\"m-r-xs\\\"></md-icon> {{item.origin}} --> {{item.origincitycode ? (item.origincitycode + \\\" \\\") : \\\"\\\"}}→{{item.destinationcitycode ? (\\\" \\\" + item.destinationcitycode) : \\\"\\\"}}<md-tooltip md-direction=left><p>{{item.origin + \\\" \\\"}} {{item.destination ? \\\"to \\\" +item.destination : \\\"\\\"}}</p></md-tooltip></td><td>{{item.shipdate | date:\\'dd-MMM-yyyy\\'}}</td><td>{{item.duedate | date:\\'dd-MMM-yyyy\\'}}</td><td>{{item.estimateddate | date:\\'dd-MMM-yyyy\\'}}</td><td><md-icon ng-if=\\\"item.flag == \\'current_exception\\'\\\" class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\" ng-mouseover=widgetsCtrl.getException(item.gshpid)></md-icon><md-icon ng-if=\\\"item.flag == \\'potential_exception\\'\\\" class=potential-exception title=\\\"potential exception\\\" aria-label=\\\"potential exception\\\" ng-mouseover=widgetsCtrl.getPotentialException(item.gshpid)></md-icon><md-tooltip ng-if=\\\"item.flag == \\'current_exception\\'\\\" md-direction=left><md-progress-circular md-mode=indeterminate class=\\\"md-warn md-hue-2\\\" ng-show=widgetsCtrl.tooltipIsLoading></md-progress-circular><p ng-show=!widgetsCtrl.tooltipIsLoading>Current Exception: <span>{{widgetsCtrl.response.code}}</span></p><p ng-show=!widgetsCtrl.tooltipIsLoading>Description: <span>{{widgetsCtrl.response.description}}</span></p></md-tooltip><md-tooltip ng-if=\\\"item.flag == \\'potential_exception\\'\\\" md-direction=left><md-progress-circular md-mode=indeterminate class=tracktracetooltip ng-show=widgetsCtrl.tooltipIsLoading></md-progress-circular><p ng-show=!widgetsCtrl.tooltipIsLoading>Current Potential Exception: <span>{{widgetsCtrl.response.title}}</span></p><p ng-show=!widgetsCtrl.tooltipIsLoading>Description: <span>{{widgetsCtrl.response.description}}</span></p></md-tooltip></td><td class=\\\"{{ (item.isbooked)?\\'text-success\\':(item.isdelivered == \\'false\\' ? \\'text-success\\' : \\'\\')}}\\\">{{widgetsCtrl.getStatus(item)}}</td><td></td><td ng-show=widgetsCtrl.showRemoveButton><md-button class=\\\"md-raised btn-danger\\\" ng-click=widgetsCtrl.unBookmarkId(item.bookmark_id) analytics-on analytics-category=Dashboard analytics-event=UnBookmarkShipment><span translate=WIDGETS.REMOVE></span></md-button></td></tr><tr ng-show=\\\"widgetsCtrl.bookmarksCount < 1\\\"><td colspan=\\\"{{widgetsCtrl.showRemoveButt ? \\'8\\' : \\'8\\'}}\\\"><span translate=WIDGETS.NO_BOOKMARKS></span></td></tr></tbody></table></div><div ng-if=\\\"widgetsCtrl.bookmarksError.length > 0\\\" layout=row><h3>{{widgetsCtrl.bookmarksError}}</h3></div><style>.md-open-menu-container.md-whiteframe-z2.md-active.md-clickable {\\r\\n z-index: 100000000;\\r\\n }</style>\");\n$templateCache.put(\"/app/components/widgets/bookmarked-shipments.html\",\"<div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\" ng-disabled=\\\"widgetsCtrl.switchUser == true\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=WIDGETS.BOOKMARKED_SHIPMENTS></span><md-progress-circular md-mode=indeterminate md-diameter=40px ng-show=\\\"!widgetsCtrl.isBookmarksFirstLoad && !widgetsCtrl.bookmarksLoaded\\\"></md-progress-circular></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\" ng-if=\\\"widgetsCtrl.bookmarksCount > 0\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=widgetsCtrl.editBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.EDIT></span></p></div></md-button></md-menu-item><md-menu-item ng-show=widgetsCtrl.showRemoveButton><md-button ng-click=widgetsCtrl.doneEditingBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.DONE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content class=p-0><div ng-show=widgetsCtrl.bookmarksLoaded><div ng-include=\\\"\\'/app/components/widgets/bookmarked-shipments-results.html\\'\\\"></div></div></md-card-content><div layout=row layout-align=\\\"center start\\\" flex=100 style=margin-top:15px ng-show=widgetsCtrl.showRemoveButton><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=widgetsCtrl.showRemoveButton ng-click=widgetsCtrl.doneEditingBookmarks()><span translate=WIDGETS.DONE></span></md-button></div><div ng-if=\\\"widgetsCtrl.switchUser == true\\\" class=uppercase style=\\\"text-align: center;color: #1E585C;font-size: 25px;margin-top:230px\\\"><md-icon aria-label=unavailable style=\\\"color: #1E585C;padding: 10px;font-size: 28px;margin-top: -10px\\\"></md-icon>unavailable in lens mode</div></div>\");\n$templateCache.put(\"/app/components/widgets/current-exceptions.html\",\"<md-card class=\\\"current-exceptions-widget widget loading-container\\\" flex=1><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=WIDGETS.CURRENT_EXCEPTIONS><!-- </span>\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" md-diameter=\\\"40px\\\" ng-show=\\\"!vm.isCurrentExceptionsFirstLoad && !vm.currentExceptionsLoaded\\\"></md-progress-circular></span> --></span></h2></div></md-toolbar><md-card-content flex=auto class=p-0 class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.currentExceptionLoading><div ng-show=vm.showLoading ng-if=\\\"!vm.currentExceptionsError && vm.currentExceptionLoading\\\" layout-gt-xs=row class=m-t-sm ng-class=\\\"{loaded: vm.currentExceptionsLoaded, \\'first-load\\': vm.isCurrentExceptionsFirstLoad, \\'loading-content\\': !vm.currentExceptionsLoaded}\\\"><div flex-gt-xs=50 class=text-center><donut-chart data=vm.currentExceptions data-theme=current-exceptions control=vm.currentExceptionsControl segment-class-map=vm.currentExceptionsSegmentClassMap></donut-chart></div><div flex-gt-xs=50 class=\\\"xs-p-xs p-t-0\\\"><p class=\\\"md-caption donut-bars\\\"><span translate=WIDGETS.CURRENT_EXCEPTIONS_DESC></span></p><ul layout-xs=row class=icon-list style=\\\"margin: 0;padding: 0;display:flex\\\"><div flex=auto layout-gt-xs=column layout-xs=row layout-align-xs=\\\"center center\\\"><li flex=auto flex-xs=auto class=donut-bars style=padding-bottom:10px layout-align-xs=\\\"center center\\\" ng-repeat=\\\"shiptype in vm.currentExceptions.slice(0,3)\\\" ng-mouseover=vm.currentExceptionsControl.growSegment(shiptype.type) ng-mouseleave=vm.currentExceptionsControl.restoreSegment(shiptype.type) ng-class=\\\"{highlighted: vm.currentExceptionsSegmentClassMap[shiptype.type]}\\\"><a href=\\\"/track-trace?status=0¤t_exception=1&business_type_group={{shiptype.type}}\\\" analytics-on analytics-category=Dashboard analytics-event=TandT-current-exceptions-{{shiptype.type}}><div layout-align-xs=\\\"center center\\\" class=\\\"mode-wrapper {{shiptype.color}}\\\"><div class=mode-text><md-icon aria-label={{shiptype.type}}-shipment><span ng-bind-html=shiptype.icon></span></md-icon><span style=\\\"text-transform: capitalize\\\">{{shiptype.type}}</span></div></div><span layout-align-xs=\\\"center center\\\" class=\\\"display-blk md-headline text-center number value-{{shiptype.shipments}} {{vm.largeDonutNumbers ? \\'wrap-number\\' : \\'\\'}}\\\"><counting-number>{{shiptype.shipments}}</counting-number></span></a></li></div></ul></div></div><div class=\\\"m-t m-b p-a-sm text-center\\\" ng-if=vm.currentExceptionsError>{{vm.currentExceptionsError}}</div></md-card-content></md-card><!-- <md-card layout-align=\\'center center\\' flex ng-show=\\\"!vm.showLoading\\\">\\r\\n <module-load-animation></module-load-animation>\\r\\n</md-card>\\r\\n -->\");\n$templateCache.put(\"/app/components/widgets/custom-end-date.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2><span translate=WIDGETS.SET_END_DATE></span></h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><form class=light-form name=setDateForm><mdp-date-picker ng-hide=\\\"activeModal === \\'on-time-percentage\\'\\\" mdp-format=MM/DD/YYYY mdp-max-date=\\\"endDate?endDate : vm.dateMax\\\" class=error-hidden mdp-placeholder=\\\"Start Date\\\" ng-model=startDate ng-change=\\\"(startDate | date: \\'MM/DD/YYYY\\');vm.checkValidDate($event,startDate,endDate)\\\" name=pickUpStartDate></mdp-date-picker><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=startDate mdp-max-date=vm.dateMax class=error-hidden mdp-placeholder=\\\"End Date\\\" ng-model=endDate ng-change=\\\"(endDate | date: \\'MM/DD/YYYY\\');vm.checkValidDate($event,startDate,endDate)\\\" name=pickUpDate></mdp-date-picker></form><div layout=row layout-align=center ng-show=vm.disableSet><span ng-if=\\\"activeModal !==\\'on-time-percentage\\'\\\" style=\\\"color:red; text-align: center\\\">Please select either Start Date or End Date</span> <span ng-if=\\\"activeModal ===\\'on-time-percentage\\'\\\" style=\\\"color:red; text-align: center\\\">Please select End Date</span></div></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><span flex=auto></span><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled><span translate=CLOSE></span></md-button><md-button ng-hide=\\\"setDateForm.pickUpStartDate.$invalid || setDateForm.pickUpDate.$invalid || vm.setValid\\\" ng-click=vm.setEndDate(startDate,endDate)><span translate=SET></span></md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/components/widgets/lane-pairs-map.html\",\"<datamap map=mapObject plugins=mapPlugins plugin-data=mapPluginData></datamap>\");\n$templateCache.put(\"/app/components/widgets/potential-exceptions.html\",\"<md-card class=\\\"potential-exceptions-widget widget loading-container\\\" flex=1><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=WIDGETS.POTENTIAL_EXCEPTIONS></span><!--\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" md-diameter=\\\"40px\\\" ng-show=\\\"!vm.isPotentialExceptionsFirstLoad && !vm.potentialExceptionsLoaded\\\"></md-progress-circular></span> --></h2></div></md-toolbar><md-card-content flex=auto class=p-0 class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.currentPotentialExceptionsLoading><div ng-if=\\\"!vm.potentialExceptionsError && vm.currentPotentialExceptionsLoading\\\" layout-gt-xs=row class=m-t-sm ng-class=\\\"{loaded: vm.potentialExceptionsLoaded, \\'first-load\\': vm.isPotentialExceptionsFirstLoad, \\'loading-content\\': !vm.potentialExceptionsLoaded}\\\"><div flex-gt-xs=50 class=text-center><donut-chart data=vm.potentialExceptions data-theme=potential-exceptions control=vm.potentialExceptionsControl segment-class-map=vm.potentialExceptionsSegmentClassMap></donut-chart></div><div flex-gt-xs=50 class=\\\"xs-p-xs p-t-0\\\"><p class=\\\"md-caption donut-bars\\\"><span translate=WIDGETS.POTENTIAL_EXCEPTIONS_DESC></span></p><ul layout-xs=row class=icon-list style=\\\"margin: 0;padding: 0;display:flex\\\"><div flex=grow layout-gt-xs=column layout-xs=row layout-align-xs=\\\"center center\\\"><li flex=auto flex-xs=auto class=donut-bars style=padding-bottom:10px layout-align-xs=\\\"center center\\\" ng-repeat=\\\"shiptype in vm.potentialExceptions.slice(0,3)\\\" ng-mouseover=vm.potentialExceptionsControl.growSegment(shiptype.type) ng-mouseleave=vm.potentialExceptionsControl.restoreSegment(shiptype.type) ng-class=\\\"{highlighted: vm.potentialExceptionsSegmentClassMap[shiptype.type]}\\\"><a href=\\\"/track-trace?status=0&potential_exception=1&business_type_group={{shiptype.type}}\\\" analytics-on analytics-category=Dashboard analytics-event=TandT-potential-exceptions-{{shiptype.type}}><div layout-align-xs=\\\"center center\\\" class=\\\"mode-wrapper {{shiptype.color}}\\\"><div class=mode-text><md-icon aria-label={{shiptype.type}}-shipment><span ng-bind-html=shiptype.icon></span></md-icon><span style=\\\"text-transform: capitalize\\\">{{shiptype.type}}</span></div></div><span layout-align-xs=\\\"center center\\\" class=\\\"display-blk md-headline text-center number value-{{shiptype.shipments}} {{vm.largeDonutNumbers ? \\'wrap-number\\' : \\'\\'}}\\\"><counting-number>{{shiptype.shipments}}</counting-number></span></a></li></div></ul></div></div><div class=\\\"m-t m-b p-a-sm text-center\\\" ng-if=vm.potentialExceptionsError>{{vm.potentialExceptionsError}}</div></md-card-content></md-card><!-- <md-card layout-align=\\'center center\\' flex ng-show=\\\"!vm.showLoading\\\">\\r\\n <module-load-animation></module-load-animation>\\r\\n</md-card> -->\");\n$templateCache.put(\"/app/components/widgets/total-shipments.html\",\"<style type=text/css>@media screen and (max-width: 1054px) and (min-width: 960px){\\r\\n span#font-range { \\r\\n font-size: 13px;\\r\\n } \\r\\n }</style><md-card class=\\\"total-shipments-widget widget loading-container\\\" flex=1><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=WIDGETS.TOTAL_SHIPMENTS><!-- <md-progress-circular md-mode=\\\"indeterminate\\\" md-diameter=\\\"40px\\\" ng-show=\\\"!vm.isActiveShipmentsFirstLoad && !vm.activeShipmentsLoaded\\\"></md-progress-circular></span> --></span></h2></div></md-toolbar><md-card-content flex=auto class=p-0 class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.currentShipmentsLoading><div layout-gt-xs=row class=m-t-sm ng-if=\\\"!vm.activeShipmentsError && vm.currentShipmentsLoading\\\" ng-class=\\\"{loaded: vm.activeShipmentsLoaded, \\'first-load\\': vm.isActiveShipmentsFirstLoad, \\'loading-content\\': !vm.activeShipmentsLoaded}\\\"><div flex-gt-xs=50 class=text-center><donut-chart data=vm.activeShipments data-theme=active-shipments control=vm.activeShipmentsControl segment-class-map=vm.activeShipmentsSegmentClassMap></donut-chart></div><div flex-gt-xs=50 class=\\\"xs-p-xs p-t-0\\\"><p class=\\\"md-caption donut-bars\\\"><span translate=WIDGETS.TOTAL_SHIPMENTS_DESC></span></p><ul layout-xs=row class=icon-list style=\\\"margin: 0;padding: 0;display:flex\\\"><div flex=grow layout-gt-xs=column layout-xs=row layout-align-xs=\\\"center center\\\"><li flex=auto flex-xs=33 layout-align-xs=\\\"center center\\\" class=donut-bars style=padding-bottom:10px ng-repeat=\\\"shiptype in vm.activeShipments.slice(0,3)\\\" ng-mouseover=vm.activeShipmentsControl.growSegment(shiptype.type) ng-mouseleave=vm.activeShipmentsControl.restoreSegment(shiptype.type) ng-class=\\\"{highlighted: vm.activeShipmentsSegmentClassMap[shiptype.type]}\\\"><a href=\\\"/track-trace?status=0&business_type_group={{shiptype.type}}\\\" analytics-on analytics-category=Dashboard analytics-event=TandT-active-{{shiptype.type}}><div layout-align-xs=\\\"center center\\\" class=\\\"mode-wrapper {{shiptype.color}}\\\"><div class=mode-text><md-icon aria-label={{shiptype.type}}-shipment><span ng-bind-html=shiptype.icon></span></md-icon><span style=\\\"text-transform: capitalize\\\">{{shiptype.type}}</span></div></div><span layout-align-xs=\\\"center center\\\" class=\\\"display-blk md-headline text-center number value-{{shiptype.shipments}} {{vm.largeDonutNumbers ? \\'wrap-number\\' : \\'\\'}}\\\"><counting-number>{{shiptype.shipments}}</counting-number></span></a></li></div></ul></div></div><div class=\\\"m-t m-b p-a-sm text-center\\\" ng-if=vm.activeShipmentsError>{{vm.activeShipmentsError}}</div></md-card-content></md-card><!-- <md-card layout-align=\\'center center\\' flex ng-show=\\\"!vm.showLoading\\\">\\r\\n <module-load-animation></module-load-animation>\\r\\n</md-card> -->\");\n$templateCache.put(\"/app/dashboard/cfs/dashboard.html\",\"<cva-shell ng-controller=\\\"WidgetsCfsController as widgetsCtrl\\\"><!-- <div class=\\\"blur_div_cfs\\\" style=\\\"z-index:4\\\">\\r\\n\\r\\n <div class=\\\"shell-padding\\\" style=\\\"background-color:#2b3549;\\\">\\r\\n <div class=\\\"view-header\\\">\\r\\n <div layout-xs=\\\"column\\\" layout-gt-xs=\\\"row\\\">\\r\\n <div flex=\\\"auto\\\">\\r\\n <h2>\\r\\n <span>\\r\\n <span class=\\\"md-display-1\\\">DASHBOARD</span><br>\\r\\n </span>\\r\\n </h2>\\r\\n <span class=\\\"breadcrumb flat\\\">\\r\\n <a href=\\'/cfs\\' class=\\\"parent-link\\\">Crane Freight & Cartage</a>\\r\\n </span>\\r\\n </div>\\r\\n\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div class=\\\"\\\" style=\\\"background-color:#2b3549; opacity:0.8;height:100%;width:100%;\\\"> </div>\\r\\n\\r\\n </div> --><!-- <div class=\\\"blur_div_cfs work-progress\\\" style=\\\"z-index:5;\\\">\\r\\n <h1> WORK IN PROGRESS </h1>\\r\\n </div> --><div class=shell-padding multiple-key-press=vm.keyHandler(keyEvent)><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=https://cviewclassic.craneww.com:8443/portal/dologin class=c-view-classic-iframe style=\\\"width:0;height:0;border:0; border:none\\\"></iframe><div ng-include=vm.getAljexDashboard() class=aljex_class></div></div></cva-shell>\");\n$templateCache.put(\"/app/dashboard/cmts/dashboard.html\",\"<cva-shell ng-controller=\\\"WidgetsCmtsController as widgetsCtrl\\\"><div class=shell-padding multiple-key-press=vm.keyHandler(keyEvent)><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=https://cviewclassic.craneww.com:8443/portal/dologin class=c-view-classic-iframe style=\\\"width:0;height:0;border:0; border:none\\\"></iframe><div ng-include=vm.getCmtsDashboard() class=aljex_class></div></div></cva-shell>\");\n$templateCache.put(\"/app/dashboard/configurations/version-a.html\",\"<div flex=100 layout=row style=\\\"margin:0 15px\\\"><span flex=auto></span><md-button class=btn-link md-ink-ripple=false ng-click=vm.hardRefresh() ng-disabled=trackTraceCtrl.showLoading><span>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span><!-- <span class=\\\"btn-load-wrapper\\\" ng-show=\\\"trackTraceCtrl.showLoading\\\">\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>\\r\\n </span> --></md-button></div><!-- <div flex layout=\\\"row\\\" ng-include=\\\"\\'/app/dashboard/five-day-forecast/five-day-forecast.html\\'\\\">HI</div> --><div layout-xs=column layout-sm=column layout-gt-sm=row layout-fill><!-- hide the html if you are loading and show the loading animation instead --><!-- ACTIVE SHIPMENTS --><div class=ie-donut flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/total-shipments.html\\'\\\" ng-show=vm.showLoading></div><!-- CURRENT EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/current-exceptions.html\\'\\\" ng-show=vm.showLoading></div><!-- POTENTIAL EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/potential-exceptions.html\\'\\\" ng-show=vm.showLoading></div></div><div ng-if=true><five-day-forecast></five-day-forecast></div><div layout-xs=column layout-sm=column layout-gt-sm=row><!--OTP --><div flex-xs=auto flex-gt-xs=35 ng-hide={{vm.is_consignee_user}} layout=column><div flex=auto ng-include=\\\"\\'/app/dashboard/on-time/otp.html\\'\\\"></div></div><!--SPENDING OVER TIME --><div flex-xs=auto flex-gt-sm=\\\"{{(vm.is_consignee_user == \\'true\\')?100:65}}\\\" layout=column><div flex=auto ng-include=\\\"\\'/app/dashboard/spending-over-time/spending-over-time.html\\'\\\"></div></div></div><!-- Book mark Shipment --><div flex=auto layout-xs=column layout-sm=column layout-gt-sm=row><md-card flex=auto ng-include=\\\"\\'/app/components/widgets/bookmarked-shipments.html\\'\\\" ng-controller=\\\"WidgetsController as widgetsCtrl\\\" class=\\\"loadmask-dark widget has-menu bookMark-widget\\\" loadmask=!widgetsCtrl.isBookmarksFirstLoad ng-class=\\\"{\\'disabled-bookmark-page\\': widgetsCtrl.switchUser == true}\\\"></md-card></div><!-- SHIPMENTS VOLUME AND COUNT OVER TIME --><div ng-if=true ng-hide={{vm.is_consignee_user}}><md-card flex=auto ng-include=\\\"\\'/app/dashboard/shipments-over-time/shipments-over-time.html\\'\\\" class=widget></md-card></div>\");\n$templateCache.put(\"/app/dashboard/configurations/version-b.html\",\"<div layout-xs=column layout-sm=column layout-gt-sm=row layout-fill><!-- hide the html if you are loading and show the loading animation instead --><five-day-forecast></five-day-forecast><div flex=auto layout=row ng-include=\\\"\\'/app/dashboard/five-day-forecast/five-day-forecast.html\\\"></div><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/total-shipments.html\\'\\\" ng-show=vm.showLoading></div><!-- CURRENT EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/current-exceptions.html\\'\\\" ng-show=vm.showLoading></div><!-- POTENTIAL EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/potential-exceptions.html\\'\\\" ng-show=vm.showLoading></div></div><!-- SHIPMENTS VOLUME AND COUNT OVER TIME --><div ng-if=true><md-card flex=auto ng-include=\\\"\\'/app/dashboard/shipments-over-time/shipments-over-time.html\\'\\\" class=widget></md-card></div><div layout-xs=column layout-sm=column layout-gt-sm=row><!--SPENDING OVER TIME --><div flex-xs=auto flex-gt-xs=33><div flex=auto ng-include=\\\"\\'/app/dashboard/on-time/otp.html\\'\\\"></div><div flex=auto ng-include=\\\"\\'/app/components/widgets/spending-over-time.html\\'\\\"></div></div><!-- BOOKMARKED SHIPMENTS --><div flex-xs=auto flex-gt-sm=66 layout=column><md-card flex=auto ng-include=\\\"\\'/app/components/widgets/bookmarked-shipments.html\\'\\\" ng-controller=\\\"WidgetsController as widgetsCtrl\\\" class=\\\"loadmask-dark widget has-menu\\\" loadmask=!widgetsCtrl.isBookmarksFirstLoad ng-class=\\\"{\\'disabled-bookmark-page\\': widgetsCtrl.switchUser == true}\\\"></md-card></div></div>\");\n$templateCache.put(\"/app/dashboard/csl/dashboard.html\",\"<cva-shell ng-controller=\\\"WidgetsCslController as widgetsCtrl\\\"><div class=shell-padding multiple-key-press=vm.keyHandler(keyEvent)><div class=c-view-classic-loader ng-show=showLoaderImage></div><iframe iframe-onload=iframeLoadedCallBack() src=https://cviewclassic.craneww.com:8443/portal/dologin class=c-view-classic-iframe style=\\\"width:0;height:0;border:0; border:none\\\"></iframe><div ng-include=vm.getAljexDashboard() class=aljex_class></div></div></cva-shell>\");\n$templateCache.put(\"/app/dashboard/five-day-forecast/api-error.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'There was problem updating your custom forecasts\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=$ctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><ul><li ng-repeat=\\\"message in apiErrorMessages\\\">{{ message }}</li></ul></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=$ctrl.closeModal()>{{\\'CLOSE\\' | translate}}</md-button><span flex=auto></span></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/dashboard/five-day-forecast/custom-options.html\",\"<md-card-content loadmask-dark loadmask-clear loadmask=!$ctrl.isLoading><div ng-show=$ctrl.active><form name=$ctrl.customOptionsForm flex=auto class=five-day-form-in><div layout=column><div class=custom-forecast><header layout=row layout-align=\\\"start center\\\"><div flex=auto flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label translate=WIDGETS.FORECAST_LABEL></label><input ng-model=$ctrl.newOption.forecast_label ng-required=\\\"($ctrl.newOption.origins.length > 0\\r\\n || $ctrl.newOption.destinations.length > 0\\r\\n || $ctrl.newOption.lane_pairs.length > 0)\\r\\n \\\" name=newOption></md-input-container><!-- <label translate=\\\"WIDGETS.FORECAST_LABEL\\\"></label>\\r\\n <input\\r\\n ng-model=\\\"optionRow.forecast_label\\\"\\r\\n ng-model-options=\\\"{ debounce: 200 }\\\"\\r\\n ng-required=\\\"true\\\"\\r\\n name=\\\"{{optionRow.id}}\\\"\\r\\n value=\\\"{{optionRow.forecast_label}}\\\">\\r\\n </md-input-container> --></div></header><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.ORIGIN></label><md-chips ng-model=$ctrl.newOption.origins md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchOrigin md-items=\\\"item in $ctrl.getMatches(\\'citycountry\\', searchOrigin)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Origin\\\"><md-item-template><span md-highlight-text=searchOrigin>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.DESTINATION></label><md-chips ng-model=$ctrl.newOption.destinations md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchDestination md-items=\\\"item in $ctrl.getMatches(\\'citycountry\\', searchDestination)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Destination\\\"><md-item-template><span md-highlight-text=searchDestination>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.LANE_PAIRS></label><md-chips ng-model=$ctrl.newOption.lane_pairs md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchLanePairs md-items=\\\"item in $ctrl.getMatches(\\'lanepairs\\', searchLanePairs)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Lane Pair\\\"><md-item-template><span md-highlight-text=searchLanePairs>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></div><div ng-repeat=\\\"optionRow in $ctrl.customForecasts\\\" layout=column><div class=custom-forecast><header layout-gt-sm=row layout-align=\\\"center center\\\" layout-wrap><div flex=auto flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label translate=WIDGETS.FORECAST_LABEL></label><input ng-model=optionRow.forecast_label ng-model-options=\\\"{ debounce: 200 }\\\" ng-required=true name={{optionRow.id}} value={{optionRow.forecast_label}}></md-input-container></div><div layout=row layout-align=\\\"center center\\\" flex=auto><div flex=50 flex-offset-gt-sm=10><md-checkbox ng-model=optionRow.is_default ng-change=$ctrl.removeOtherDefaults(optionRow) aria-label=\\\"Set As Default\\\">Set as Default</md-checkbox></div><div flex=50 layout=row layout-align=end><md-button aria-label=delete ng-click=$ctrl.deleteOptionRow(optionRow)>REMOVE<md-icon>clear</md-icon></md-button></div></div></header><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.ORIGIN></label><md-chips ng-model=optionRow.origins ng-required=$ctrl.requireAtLeastOne(optionRow) md-transform-chip=$ctrl.chipDisplay($chip) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchOrigin md-items=\\\"item in $ctrl.getMatches(\\'citycountry\\', searchOrigin)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Origin\\\"><md-item-template><span md-highlight-text=searchOrigin>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.DESTINATION></label><md-chips ng-model=optionRow.destinations md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(optionRow) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchDestination md-items=\\\"item in $ctrl.getMatches(\\'citycountry\\', searchDestination)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Destination\\\"><md-item-template><span md-highlight-text=searchDestination>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=\\\"cfc-content lane-pairs\\\"><md-input-container><label translate=WIDGETS.FIVE_DAY.LANE_PAIRS></label><md-chips ng-model=optionRow.lane_pairs md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(optionRow) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchLanePairs md-items=\\\"item in $ctrl.getMatches(\\'lanepairs\\', searchLanePairs)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Lane Pair\\\"><md-item-template><span md-highlight-text=searchLanePairs>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></div></form><div layout=row><div layout=row layout-align=start flex=auto class=m-t><md-button class=\\\"md-warn md-ink-ripple five-day-cancel\\\" ng-click=$ctrl.cancel()><span translate=USER.CANCEL></span></md-button></div><div layout=row layout-align=end flex=auto class=m-t><md-button class=\\\"md-primary md-ink-ripple five-day-save\\\" ng-click=$ctrl.save() ng-disabled=\\\"$ctrl.emptyData() || $ctrl.customOptionsForm.$invalid\\\"><span translate=USER.SAVE></span></md-button></div></div></div></md-card-content>\");\n$templateCache.put(\"/app/dashboard/five-day-forecast/five-day-forecast-mobile.form.html\",\"<!-- <div hide-gt-sm>\\r\\n <div layout=\\\"column\\\" class=\\\"\\\">\\r\\n <div flex=\\\"95\\\" class=\\\"flex-transition\\\">\\r\\n <div>\\r\\n <h4><md-icon class=\\\"m-r-xs\\\">search</md-icon><span style=\\\"text-transform:uppercase;\\\" translate=\\\"WIDGETS.CHANGE_QUERY\\\"></span></h4>\\r\\n </div>\\r\\n </div>\\r\\n <md-button class=\\\"md-fab md-mini btn-collapse\\\" aria-label=\\\"Open/Close\\\" ng-click=\\\"toggleCollapse()\\\">\\r\\n <md-icon>{{collapsed ? \\'expand_more\\' : \\'expand_less\\'}}</md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n</div> --><!-- <div ng-show=\\\"$ctrl.isMobile() || !collapsed\\\" flex=\\\"auto\\\"> --><div ng-show=true flex=auto><div ng-include=\\\"\\'/app/dashboard/five-day-forecast/five-day-forecast.form.html\\'\\\"></div></div><div ng-show=$ctrl.isMobile() style=\\\"padding-bottom: 5px\\\"></div>\");\n$templateCache.put(\"/app/dashboard/five-day-forecast/five-day-forecast.form.html\",\"<form name=$ctrl.fiveDayForm><div layout-gt-sm=row layout=column flex=auto><div flex=25><mdp-date-picker mdp-format=MM/DD/YYYY ng-change=$ctrl.selectedDateChange() ng-model-options=\\\"{debounce: 1000}\\\" ng-disabled=$ctrl.isLoading ng-model=$ctrl.payload.date_from class=\\\"mb-0 error-hidden\\\"><label translate=WIDGETS.START_DATE></label>{{$ctrl.start_date.$error}}</mdp-date-picker></div><div flex=20 ng-class=\\\"{\\'mobile-offset-top\\': $ctrl.isMobile()}\\\" flex-offset=\\\"{{$ctrl.isMobile() ? \\'\\' : \\'5\\'}}\\\"><div class=\\\"md-tab-wrapper five-day-bs-type-active\\\"><md-tabs md-stretch-tabs=always><md-tab ng-repeat=\\\"vtab in $ctrl.lane_type\\\" md-on-select=\\\"$ctrl.onLaneTypeTabSelected(vtab, $index)\\\" md-on-deselect=announceDeselected(vtab) ng-disabled=vtab.deselected><md-tab-label><span translate={{vtab.label}}></span><div ng-show=\\\"vtab.field==\\'air\\'\\\"><md-icon></md-icon></div><div ng-show=\\\"vtab.field==\\'sea\\'\\\"><md-icon></md-icon></div><div ng-show=\\\"vtab.field==\\'ground\\'\\\"><md-icon></md-icon></div></md-tab-label></md-tab></md-tabs></div></div><div flex=25 flex-offset=5 ng-if=!$ctrl.isMobile()><md-input-container class=md-block><label translate=WIDGETS.CUSTOM_FORECAST></label><md-select ng-model=$ctrl.selectedOptionRow ng-change=$ctrl.checkClear(); ng-model-options=\\\"{trackBy: $value.id}\\\" md-on-open=$ctrl.onSelectOpen() md-on-close=$ctrl.onSelectClose() placeholder=\\\"Default Forecast\\\" aria-label=\\\"Default Forecast\\\"><md-option value=null>Global Forecast</md-option><md-option ng-repeat=\\\"frow in $ctrl.custom_forecasts\\\" value={{frow.id}}>{{frow.forecast_label}}</md-option></md-select></md-input-container></div><div flex=5 ng-if=!$ctrl.isMobile() layout=row layout-align=\\\"start center\\\"><md-button aria-label=create ng-click=$ctrl.toggleOptions()><md-icon>create</md-icon>edit</md-button></div><!-- Mobile --><div layout=row class=mobile-offset-top ng-if=$ctrl.isMobile()><md-input-container flex=90 class=md-block><label translate=WIDGETS.CUSTOM_FORECAST></label><md-select ng-model=$ctrl.selectedOptionRow ng-change=$ctrl.checkClear(); ng-model-options=\\\"{trackBy: $value.id}\\\" aria-label=$ctrl.selectedOptionRow><md-option value=null>None</md-option><md-option ng-repeat=\\\"frow in $ctrl.custom_forecasts\\\" value={{frow.id}}>{{frow.forecast_label}}</md-option></md-select></md-input-container><md-button class=md-icon-button flex=10 aria-label=create ng-click=$ctrl.toggleOptions()><md-icon>create</md-icon></md-button></div></div></form>\");\n$templateCache.put(\"/app/dashboard/five-day-forecast/five-day-forecast.html\",\"<md-card flex=auto class=\\\"widget ie-fivedayforcast\\\"><md-toolbar><div class=md-toolbar-tools><h2 layout-xs=row><md-icon md-svg-src=../assets/images/icons/ic_date_range.svg class=\\\"icon-reset svg-icon-reset\\\"></md-icon><span ng-show=!$ctrl.optionsActive translate=WIDGETS.FIVE_DAY.FIVE_DAY_FORECAST></span> <span ng-show=$ctrl.optionsActive translate=WIDGETS.FORECAST_CUSTOM_OPTIONS></span></h2><span flex=auto></span><!-- <md-menu md-position-mode=\\\"target-right target\\\">\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"$mdOpenMenu($event)\\\">\\r\\n <md-icon aria-label=\\\"options\\\">\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n </md-menu> --></div></md-toolbar><md-card-content ng-show=!$ctrl.optionsActive class=five-day-forecast loadmask-dark loadmask-clear loadmask=!$ctrl.isLoading><div ng-class=\\\"{loaded: !$ctrl.isLoading, \\'first-load\\': $ctrl.isLoading, \\'loading-content\\': $ctrl.isLoading}\\\" layout=column flex=auto style=display:block><div class=ie-forecastdate flex=100 layout=row collapsible template-url=/app/dashboard/five-day-forecast/five-day-forecast-mobile.form.html></div><div layout=row layout-align=\\\"center end\\\" class=\\\"activity-notices hide show-gt-sm\\\"><div flex=1 ng-repeat=\\\"day in $ctrl.days track by $index | limitTo:5\\\" class=activity-header><div flex=auto ng-if=\\\"!day.is_record && day.is_high\\\" class=\\\"notice high-activity\\\"><div class=\\\"activity-icon high-activity-icon\\\"><span><img src=../assets/images/flame-icon.png></span></div><div class=\\\"activity-text high-activity-text\\\"><span>High Shipment Activity</span></div></div><div ng-if=day.is_record class=\\\"notice daily-record\\\"><div class=\\\"activity-icon daily-record-icon\\\"><span><md-icon class=material-icons></md-icon></span></div><div class=\\\"activity-text daily-record-text\\\"><span>New Daily Record</span></div></div></div></div><div flex=1 id=forecasts layout-gt-sm=row layout-align-gt-sm=\\\"center stretch\\\" layout-align-sm=\\\"space-between stretch\\\" layout-sm=column><div flex-gt-sm=20 flex-sm=100 ng-repeat=\\\"day in $ctrl.days track by $index | limitTo:5\\\" class=day-wrapper><div layout=column layout-align=\\\"center stretch\\\" class=\\\"activity-notices hide-gt-sm\\\"><div flex=auto ng-if=\\\"!day.is_record && day.is_high\\\" class=\\\"notice high-activity\\\"><div class=\\\"activity-icon high-activity-icon\\\"><span><img src=../assets/images/flame-icon.png></span></div><div class=\\\"activity-text high-activity-text\\\"><span>High Shipment Activity</span></div></div><div ng-if=day.is_record class=\\\"notice daily-record\\\"><div class=\\\"activity-icon daily-record-icon\\\"><span><md-icon class=material-icons></md-icon></span></div><div class=\\\"activity-text daily-record-text\\\"><span>New Daily Record</span></div></div></div><forecast flex=auto data=day payload=$ctrl.payload index={{$index}} mobile=$ctrl.isMobile()></forecast></div></div></div></md-card-content><custom-options flex=auto ng-if=$ctrl.optionsActive active=$ctrl.optionsActive custom-forecasts=$ctrl.custom_forecasts></custom-options></md-card>\");\n$templateCache.put(\"/app/dashboard/five-day-forecast/forecast.html\",\"<style>@media screen and (max-width: 1170px) and (min-width: 960px) {\\r\\n .font-xs{\\r\\n font-size:8px !important;\\r\\n }\\r\\n\\r\\n .font-xs md-icon{\\r\\n font-size:10px !important;\\r\\n }\\r\\n\\r\\n #forecasts .day-wrapper .forecast .business-group span{\\r\\n padding:0px !important;\\r\\n }\\r\\n }\\r\\n\\r\\n @media screen and (max-width: 1400px) and (min-width: 1280px) {\\r\\n .font-xs{\\r\\n font-size:8px !important;\\r\\n }\\r\\n\\r\\n .font-xs md-icon{\\r\\n font-size:10px !important;\\r\\n }\\r\\n\\r\\n #forecasts .day-wrapper .forecast .business-group span{\\r\\n padding:0px !important;\\r\\n }\\r\\n }\\r\\n\\r\\n md-tooltip .md-content {\\r\\n color: #FFFFFF;\\r\\n text-transform: uppercase;\\r\\n font-weight: normal;\\r\\n font-size: .95em;\\r\\n opacity: 0.96; \\r\\n background-color: black;\\r\\n height: auto;\\r\\n}</style><div layout=row layout-align=\\\"center stretch\\\" layout-fill class=forecast-wrapper ng-class=\\\"{\\'show-notice\\': $ctrl.data.is_record || $ctrl.data.is_high, \\'record-high\\': $ctrl.data.is_record, \\'high-shipments\\': $ctrl.data.is_high && !$ctrl.data.is_record}\\\"><div layout=column layout-align=\\\"end stretch\\\" layout-fill><div flex=auto layout=column class=\\\"forecast disabled\\\" layout-align=\\\"center stretch\\\" ng-if=!$ctrl.getTotal()><div class=upper><h1 layout=row layout-align=\\\"center center\\\" class=header>{{$ctrl.getDay()}}</h1><span class=subheader layout=row layout-align=\\\"center center\\\">{{$ctrl.getDate()}}</span></div><div flex=auto layout=column layout-align=\\\"center center\\\"><span class=md-display-1 translate=WIDGETS.FIVE_DAY.DISABLED></span></div></div><div flex=auto layout=column class=forecast layout-align=\\\"center stretch\\\" ng-if=$ctrl.getTotal() ng-click=$ctrl.viewOnTrackAndTrace()><div class=upper><h1 layout=row layout-align=\\\"center center\\\" class=header>{{$ctrl.getDay()}}</h1><span class=subheader layout=row layout-align=\\\"center center\\\">{{$ctrl.getDate()}}</span><md-tooltip md-direction=center><div class=tooltip-bc-color><span style=\\\"margin:5%;font-weight: bold;margin-left: 3%;font-size: 1.3em\\\">Top Shipments</span> <span ng-show=\\\"$ctrl.data.ref_numbers.length === 0\\\" style=\\\"margin:3%;margin-left: 3%;font-weight: bold\\\">No Shipments Found.</span><div style=\\\"margin-left: 3%\\\" ng-repeat=\\\"shipmentValue in $ctrl.data.ref_numbers track by $index\\\" style=\\\"margin-bottom: -2%\\\"><span style=\\\"color: #fff;font-weight: bold\\\">{{$ctrl.data.ref_numbers[$index]}}</span></div></div></md-tooltip></div><div flex=auto></div><div class=body><div ng-if=!$ctrl.mobile><md-grid-list md-cols=4 md-gutter=8px md-row-height=1:1><md-grid-tile ng-repeat=\\\"container in $ctrl.containers\\\" md-colspan={{container.colspan}} md-rowspan={{container.rowspan}} class={{container.icon_class}}><md-icon ng-if=!container.empty md-svg-icon={{container.icon}}></md-icon></md-grid-tile></md-grid-list></div><h1 layout=row layout-align=\\\"center center\\\" class=md-display-3>{{$ctrl.getTotal()}}</h1><span layout=row layout-align=\\\"center center\\\" class=md-title>DELIVERIES</span></div><div class=business-group layout=row><span flex=1 class=font-xs><md-icon></md-icon>{{$ctrl.getPercentageAir()}} </span><span flex=1 class=font-xs><md-icon></md-icon>{{$ctrl.getPercentageSea()}} </span><span flex=1 class=font-xs><md-icon></md-icon>{{$ctrl.getPercentageGround()}}</span></div><div class=lower><breakdown data=$ctrl.data index={{$ctrl.index}} mobile=$ctrl.mobile></breakdown></div></div></div></div>\");\n$templateCache.put(\"/app/dashboard/five-day-forecast/new-custom-option-row.html\",\"<div layout=column><div class=custom-forecast><header layout=row layout-align=\\\"start center\\\"><div flex=auto flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label translate=WIDGETS.FORECAST_LABEL></label><input ng-model=$ctrl.newOption.forecast_label ng-required=\\\"($ctrl.newOption.origins.length > 0\\r\\n || $ctrl.newOption.destinations.length > 0\\r\\n || $ctrl.newOption.lane_pairs.length > 0)\\r\\n \\\" name=newOption></md-input-container><!-- <label translate=\\\"WIDGETS.FORECAST_LABEL\\\"></label>\\r\\n <input\\r\\n ng-model=\\\"optionRow.forecast_label\\\"\\r\\n ng-model-options=\\\"{ debounce: 200 }\\\"\\r\\n ng-required=\\\"true\\\"\\r\\n name=\\\"{{optionRow.id}}\\\"\\r\\n value=\\\"{{optionRow.forecast_label}}\\\">\\r\\n </md-input-container> --></div></header><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.ORIGIN></label><md-chips ng-model=$ctrl.newOption.origins md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchOrigin md-items=\\\"item in $ctrl.getMatches(\\'citycountry\\', searchOrigin)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Origin\\\"><md-item-template><span md-highlight-text=searchOrigin>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.DESTINATION></label><md-chips ng-model=$ctrl.newOption.destinations md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchDestination md-items=\\\"item in $ctrl.getMatches(\\'citycountry\\', searchDestination)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Destination\\\"><md-item-template><span md-highlight-text=searchDestination>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.LANE_PAIRS></label><md-chips ng-model=$ctrl.newOption.lane_pairs md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchLanePairs md-items=\\\"item in $ctrl.getMatches(\\'lanepairs\\', searchLanePairs)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Lane Pair\\\"><md-item-template><span md-highlight-text=searchLanePairs>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></div>\");\n$templateCache.put(\"/app/dashboard/on-time/otp.html\",\"<md-card flex=auto flex-fill class=\\\"ontime-percentage-widget widget loading-container has-menu\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=WIDGETS.ON_TIME_PERCENTAGE></span> </span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.setCustomRange(\\'on-time-percentage\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.SET_END_DATE></span></p></div></md-button></md-menu-item><md-menu-item ng-if=vm.widgetHasCustomRange.onTimePercentage><md-button ng-click=\\\"vm.resetCustomRange(\\'on-time-percentage\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.RESET_END_DATE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always class=md-primary><md-tab ng-repeat=\\\"tab in vm.onTimePercentage.tabs\\\" md-on-select=vm.onTimePercentage.tabSelected(tab) ng-disabled=tab.disabled md-active=\\\"$index==3\\\"><md-tab-label><span translate={{tab.label}}></span></md-tab-label></md-tab></md-tabs><md-content flex=auto flex-fill class=\\\"loadmask-dark loadmask-clear\\\" loadmask=vm.onTimePercentage.isLoaded()><div flex=auto ng-class=\\\"{loaded: vm.onTimePercentage.isLoaded(), \\'first-load\\': !vm.onTimePercentage.isLoaded(), \\'loading-content\\': !vm.onTimePercentage.isLoaded()}\\\" id=on-time-percentage><div layout=column layout-align=\\\" center\\\" class=md-padding><div class=\\\"padding-bottom-10px padding-bottom-10px-otp\\\" layout=row layout-align=end><a class=otpDetails ng-click=vm.loadTrackandTrace(vm.onTimePercentage) style=\\\"font-size: 11px\\\">View Shipments</a></div><h4 layout=row layout-align=\\\"center center\\\" ng-if=vm.onTimePercentage.isLoaded()>{{vm.onTimePercentage.getDateRange()}}</h4><div class=percentage><span ng-if=!vm.onTimePercentage.isNoCurrentData()>{{ vm.onTimePercentage.getPercentage() }}%</span> <span ng-if=vm.onTimePercentage.isNoCurrentData()>—</span></div><div><section class=\\\"btn-group btn-group-sm btn-group-block-xs\\\" layout=row layout-sm=column layout-align=\\\"center center\\\" style=\\\"text-align: center; width: 100%\\\"><md-button class=\\\"btn-left {{vm.onTimePercentage.version == \\'ontime\\' ? \\'btn-active\\' : \\'btn-inactive\\'}}\\\" ng-click=\\\"vm.onTimePercentageSwap(\\'ontime\\')\\\" flex=25 style=\\\"width: 100px\\\"><strong><span translate=WIDGETS.RAW></span></strong></md-button><md-button class=\\\"btn-right {{vm.onTimePercentage.version == \\'adjusted_ontime\\' ? \\'btn-active\\' : \\'btn-inactive\\'}}\\\" flex=25 ng-click=\\\"vm.onTimePercentageSwap(\\'adjusted_ontime\\')\\\" style=\\\"width: 100px\\\"><strong><span translate=WIDGETS.ADJUSTED></span></strong></md-button></section><p class=\\\"md-caption change-info\\\"></p><div ng-if=!vm.onTimePercentage.isNoCurrentData() class=otp-div-height><div ng-if=!vm.onTimePercentage.isNoPreviousData()><md-icon aria-label=direction ng-show=vm.onTimePercentage.getChange()>{{vm.onTimePercentage.getDirection()}}</md-icon><md-icon ng-hide=vm.onTimePercentage.getChange()>remove</md-icon>{{ vm.onTimePercentage.getChange() }}% {{vm.onTimePercentage.fromLast() | translate}}</div><div ng-if=vm.onTimePercentage.isNoPreviousData() class=otp-div-height>{{ vm.onTimePercentage.noPreviousData() | translate }}</div></div><div ng-if=vm.onTimePercentage.isNoCurrentData() class=otp-div-height>{{ vm.onTimePercentage.noCurrentData() | translate }}</div><p></p></div><!-- Percent Complete --><div flex=auto layout=column><div flex=auto layout=row layout-align=\\\"center center\\\" class=\\\"text-strong margin-top-btm-otp\\\">Current {{vm.onTimePercentage.selected}}</div><div flex=auto layout=row class=\\\"meter blue progress-bar\\\"><span class=percent><strong>{{vm.onTimePercentage.getDatePercentage()}}%</strong></span> <span class=\\\"bar progress-bar\\\" ng-attr-style=\\\"width: {{vm.onTimePercentage.getDatePercentage()}}%\\\"></span></div><!-- Progress Bar --><div layout=row class=\\\"m-b-sm otp-progress-font\\\"><span class=text-sub>{{vm.displayDate(vm.onTimePercentage.getDateFrom())}}</span> <span flex=auto></span> <span class=text-sub>{{vm.displayDate(vm.onTimePercentage.getDatePeriodTo())}}</span></div></div></div><!-- End column --></div><!-- End loading class --></md-content></md-card>\");\n$templateCache.put(\"/app/dashboard/shipments-over-time/shipments-over-time.html\",\"<md-toolbar><div class=md-toolbar-tools><h2 layout-xs=row><md-icon md-svg-src=../assets/images/icons/ic_date_range.svg class=\\\"icon-reset svg-icon-reset\\\"></md-icon><span id=font-range translate=WIDGETS.SHIPMENTS_OVER_TIME></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.setCustomRange(\\'lane-pairs\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.SET_END_DATE></span></p></div></md-button></md-menu-item><md-menu-item ng-if=vm.widgetHasCustomRange.lanePairs><md-button ng-click=\\\"vm.resetCustomRange(\\'lane-pairs\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.RESET_END_DATE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content class=shipment-volume-over-time><div layout=column><!-- SHIPMENT COUNT AND VOLUME TOOLBAR --><div layout-gt-sm=row><!-- Period Tabs --><div flex-gt-sm=45 class=\\\"xs-m-b sm-m-b\\\"><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always><md-tab ng-repeat=\\\"tab in vm.periods\\\" md-on-select=vm.onSVOCPeriodTabSelected(tab) md-on-deselect=announceDeselected(tab) ng-disabled=tab.disabled><md-tab-label><span translate={{tab.label}}></span></md-tab-label></md-tab></md-tabs></div><!-- Metric Tabs --><div flex-gt-sm=25 flex-offset-gt-sm=5 class=\\\"xs-m-b sm-m-b\\\"><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always><md-tab ng-repeat=\\\"vtab in vm.metric_types\\\" md-on-select=vm.onSVOCMetricTabSelected(vtab) md-on-deselect=announceDeselected(vtab) ng-disabled=vtab.disabled><md-tab-label><span translate={{vtab.label}}></span></md-tab-label></md-tab></md-tabs></div><!-- Lane Type Tabs --><div flex-gt-sm=25 flex-offset-gt-sm=5 class=\\\"xs-m-b sm-m-b\\\"><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always><md-tab ng-repeat=\\\"vtab in vm.lane_type\\\" md-on-select=vm.onSVOCLaneTypeTabSelected(vtab) md-on-deselect=announceDeselected(vtab) ng-disabled=vtab.disabled><md-tab-label><span translate={{vtab.label}}></span><div ng-show=\\\"vtab.field==\\'air\\'\\\"><md-icon></md-icon></div><div ng-show=\\\"vtab.field==\\'sea\\'\\\"><md-icon></md-icon></div><div ng-show=\\\"vtab.field==\\'ground\\'\\\"><md-icon></md-icon></div></md-tab-label></md-tab></md-tabs></div></div><!-- Charts --><div layout=row><h2><span translate=WIDGETS.BY_TOP_LANE_PAIR></span></h2><span flex=auto></span> <span><h2><md-button ng-show=vm.shipmentVolVsCountSettings.isLanePairData class=\\\"md-raised md-primary\\\" ng-click=vm.toggleTotal()>{{vm.totalButton}}</md-button></h2></span></div><div class=\\\"loadmask-dark loadmask-clear md-padding\\\" loadmask=vm.shipmentVolVsCountSettings.isLanePairLoaded><div ng-class=\\\"{loaded: vm.shipmentVolVsCountSettings.isLanePairLoaded, \\'first-load\\': vm.shipmentVolVsCountSettings.isLanePairFirstLoad, \\'loading-content\\': !vm.shipmentVolVsCountSettings.isLanePairLoaded}\\\"><div ng-hide=\\\"vm.shipmentVolVsCountSettings.isLanePairFirstLoad || vm.shipmentVolVsCountSettings.isLanePairData\\\" layout=column><div><p class=text-center>No data available for this time period</p></div><!-- <div class=\\\"date-range\\\">\\r\\n {{ vm.lanePairsPeriod[vm.shipmentVolVsCountSettings.selectedPeriod].DateFrom | date : \\'shortDate\\' : \\'UTC\\' }} – {{ vm.lanePairsPeriod[vm.shipmentVolVsCountSettings.selectedPeriod].DateTo | date : \\'shortDate\\' : \\'UTC\\' }}\\r\\n </div> --><div class=date-range>{{ vm.shipmentVolVsCountSettings.period.start | date : \\'MM/dd/yy\\' }} – {{ vm.shipmentVolVsCountSettings.period.end | date : \\'MM/dd/yy\\' }}</div></div><div ng-if=vm.shipmentVolVsCountSettings.isLanePairData><div layout-gt-sm=row layout-xs=column><div flex-gt-sm=45><div ng-show=vm.shipmentVolVsCountSettings.isLanePairData><lane-pair-bar-chart data=vm.topLanePairs settings=vm.shipmentVolVsCountSettings label=\\\"\\\"></lane-pair-bar-chart></div></div><div flex-gt-sm=5></div><div flex-gt-sm=45><div ng-show=vm.shipmentVolVsCountSettings.isLanePairData><count-vs-volume-line-chart data=vm.topLanePairs settings=vm.shipmentVolVsCountSettings label=\\\"\\\"></count-vs-volume-line-chart></div></div></div><div layout=row><div flex=100 class=lanepairmap><lane-pair-map land=land boundary=boundary data=vm.pins arcs=vm.topLanePairs settings=vm.shipmentVolVsCountSettings></lane-pair-map></div></div><div class=\\\"date-range text-center\\\"><!-- {{ vm.lanePairsPeriod[vm.shipmentVolVsCountSettings.selectedPeriod].DateFrom | date : \\'shortDate\\' : \\'UTC\\' }} – {{ vm.lanePairsPeriod[vm.shipmentVolVsCountSettings.selectedPeriod].DateTo | date : \\'shortDate\\' : \\'UTC\\' }} --> {{ vm.getStartDate(vm.shipmentVolVsCountSettings.period.start | date : \\'MM/dd/yy\\' , vm.shipmentVolVsCountSettings.period.end | date : \\'MM/dd/yy\\') }} – {{ vm.shipmentVolVsCountSettings.period.end | date : \\'MM/dd/yy\\' }}</div></div></div></div></div><!-- <p class=\\\"text-center md-caption\\\"><em>{{\\'WIDGETS.LAST_UPDATED\\' | translate}} {{widgetsCtrl.svcotLastUpdated}} {{\\'WIDGETS.AGO\\' | translate}}</em></p> --></md-card-content>\");\n$templateCache.put(\"/app/dashboard/spending-over-time/spending-over-time.html\",\"<md-card flex=auto flex-fill class=\\\"spent-height spending-over-time-widget widget loading-container has-menu\\\" flex=1 ng-hide=!vm.hasFinancialPermissions><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=WIDGETS.SPENDING_OVER_TIME></span> </span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.setCustomRange(\\'spend-over-time\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.SET_END_DATE></span></p></div></md-button></md-menu-item><md-menu-item ng-if=vm.widgetHasCustomRange.spendOverTime><md-button ng-click=\\\"vm.resetCustomRange(\\'spend-over-time\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.RESET_END_DATE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><div class=spending-over-time><div layout=column><div layout-gt-sm=row><!-- Period Tabs --><div flex-gt-sm=45 class=\\\"xs-m-b sm-m-b\\\"><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always class=md-primary><md-tab ng-repeat=\\\"tab in vm.spendingOverTime.tabs\\\" md-on-select=vm.tabSelectedOne(tab) ng-disabled=tab.disabled><md-tab-label><span translate={{tab.label}}></span></md-tab-label></md-tab></md-tabs></div><div flex-gt-sm=15 flex-offset-gt-sm=5 class=\\\"xs-m-b sm-m-b\\\"></div><!-- sop Type Tabs --><div flex-gt-sm=30 flex-offset-gt-sm=5 class=\\\"xs-m-b sm-m-b\\\"><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always md-selected=vm.defaultTabSelected><md-tab ng-repeat=\\\"(key,spendtab) in vm.spent_type;\\\" id=sopTab-{{key}} md-on-select=\\\"vm.onspentModeSelected(spendtab); \\\" md-on-deselect=deselectSpendMode(spendtab)><md-tab-label><span translate={{spendtab.label}}></span><div ng-show=\\\"spendtab.field==\\'air\\'\\\"><md-icon></md-icon></div><div ng-show=\\\"spendtab.field==\\'sea\\'\\\"><md-icon></md-icon></div><div ng-show=\\\"spendtab.field==\\'urgent_air\\'\\\"><md-icon></md-icon></div><div ng-show=\\\"spendtab.field==\\'ground\\'\\\"><md-icon></md-icon></div><div ng-show=\\\"spendtab.field==\\'warehouse\\'\\\"><md-icon></md-icon></div><div ng-show=\\\"spendtab.field==\\'custom_brokerage\\'\\\"><md-icon></md-icon></div></md-tab-label></md-tab></md-tabs></div></div><div layout-gt-sm=row><div flex-gt-sm=98 class=\\\"xs-m-b sm-m-b pad-10px\\\"><!-- Charts --><md-content flex=auto flex-fill class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.spendingOverTime.isLoaded()><h4 layout=row layout-align=\\\"center center\\\" ng-if=\\\"vm.spendingOverTime.isLoaded() && !vm.spendingOverTime.hasData() && (vm.sopDefaultDate.group == \\'week\\')\\\">{{vm.sopDefaultDate.dateFrom | date : \\'MMM d, y\\'}} - {{vm.sopDefaultDate.dateTo | date : \\'MMM d, y\\'}}</h4><h4 layout=row layout-align=\\\"center center\\\" ng-if=\\\"vm.spendingOverTime.isLoaded() && !vm.spendingOverTime.hasData() && (vm.sopDefaultDate.group != \\'week\\')\\\">{{vm.spendingOverTime.getDateRange()}}</h4><h4 layout=row layout-align=\\\"center center\\\" ng-if=\\\"vm.spendingOverTime.isLoaded() && vm.spendingOverTime.hasData()\\\">{{vm.spendingOverTime.getDateRange()}}</h4><div ng-class=\\\"{loaded: vm.spendingOverTime.isLoaded(), \\'first-load\\': !vm.spendingOverTime.isLoaded(), \\'loading-content\\': !vm.spendingOverTime.isLoaded()}\\\"><!-- <div ng-if=\\\"vm.spendingOverTime.hasData()\\\">\\r\\n <bar-chart\\r\\n data=\\\"vm.spendingOverTime.getData()\\\"\\r\\n data-theme=\\\"vm.spendingOverTime.getTheme()\\\"\\r\\n data-y-label=\\\"USD\\\">\\r\\n </bar-chart>\\r\\n </div>--><div flex=auto class=canvasDiv ng-if=vm.spendingOverTime.hasData()><!-- <canvas class=\\\"chart chart-bar\\\" chart-data=\\\"vm.getstackedChartData()\\\" chart-labels=\\\"vm.getChartLabels()\\\"\\r\\n chart-options=\\\"options\\\" chart-series=\\\"series\\\" chart-colors=\\\"chartColors\\\" chart-click=\\\"onclick\\\"></canvas> --><canvas id=canvasStackChart class=\\\"chart chart-bar\\\" chart-data=stackedData chart-labels=labelColors chart-options=options chart-series=series chart-colors=chartColors></canvas></div><div ng-if=!vm.spendingOverTime.hasData() class=\\\"m-t m-b\\\" layout=row layout-sm=column layout-align=\\\"center center\\\"><span translate=WIDGETS.NO_DATA_AVAILABLE></span></div></div></md-content></div></div></div></div></md-card>\");\n$templateCache.put(\"/app/dashboard/spending-over-time/spending-over-time.orig.html\",\"<md-card flex=auto flex-fill class=\\\"spending-over-time-widget widget loading-container has-menu\\\" flex=1 ng-hide=!vm.hasFinancialPermissions><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=WIDGETS.SPENDING_OVER_TIME></span> </span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.setCustomRange(\\'spend-over-time\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.SET_END_DATE></span></p></div></md-button></md-menu-item><md-menu-item ng-if=vm.widgetHasCustomRange.spendOverTime><md-button ng-click=\\\"vm.resetCustomRange(\\'spend-over-time\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.RESET_END_DATE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always class=md-primary><md-tab ng-repeat=\\\"tab in vm.spendingOverTime.tabs\\\" md-on-select=vm.tabSelectedOne(tab) ng-disabled=tab.disabled><md-tab-label><span translate={{tab.label}}></span></md-tab-label></md-tab></md-tabs><md-content flex=auto flex-fill class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.spendingOverTime.isLoaded()><h4 layout=row layout-align=\\\"center center\\\" ng-if=\\\"vm.spendingOverTime.isLoaded() && !vm.spendingOverTime.hasData() && (vm.sopDefaultDate.group == \\'week\\')\\\">{{vm.sopDefaultDate.dateFrom | date : \\'MMM d, y\\'}} - {{vm.sopDefaultDate.dateTo | date : \\'MMM d, y\\'}}</h4><h4 layout=row layout-align=\\\"center center\\\" ng-if=\\\"vm.spendingOverTime.isLoaded() && !vm.spendingOverTime.hasData() && (vm.sopDefaultDate.group != \\'week\\')\\\">{{vm.spendingOverTime.getDateRange()}}</h4><h4 layout=row layout-align=\\\"center center\\\" ng-if=\\\"vm.spendingOverTime.isLoaded() && vm.spendingOverTime.hasData()\\\">{{vm.spendingOverTime.getDateRange()}}</h4><div ng-class=\\\"{loaded: vm.spendingOverTime.isLoaded(), \\'first-load\\': !vm.spendingOverTime.isLoaded(), \\'loading-content\\': !vm.spendingOverTime.isLoaded()}\\\"><div ng-if=vm.spendingOverTime.hasData()><bar-chart data=vm.spendingOverTime.getData() data-theme=vm.spendingOverTime.getTheme() data-y-label=USD></bar-chart></div><div ng-if=!vm.spendingOverTime.hasData() class=\\\"m-t m-b\\\" layout=row layout-sm=column layout-align=\\\"center center\\\"><span translate=WIDGETS.NO_DATA_AVAILABLE></span></div></div></md-content></md-card>\");\n$templateCache.put(\"/app/directives/accordion/accordion.html\",\"<md-card class=\\\"accordion {{ !collapsed ? \\'accordion-expanded\\' : \\'\\'}}\\\"><md-toolbar ng-click=\\\"collapsed = !collapsed\\\"><div class=md-toolbar-tools><h2 class=md-headline><md-icon ng-if=icon>{{icon}}</md-icon>{{title}}</h2><span flex=auto></span><md-icon>{{collapsed ? \\'\\' : \\'\\'}}</md-icon></div></md-toolbar><div ng-if=!collapsed class=accordion-content><md-card-content ng-transclude class=accordion-inner></md-card-content></div></md-card>\");\n$templateCache.put(\"/app/kitchen-sink/sections/admin-toolbars.html\",\"<!-- Potential Exception Status Toolbars --><div class=m-a><h1 id=anchor-charts class=md-display-2>Potential Exception Admin Toolbars</h1></div><md-card class=m-t><md-toolbar style=\\\"background: #2D7D8F\\\"><div class=md-toolbar-tools><h2><span>Potential Exceptions</span></h2><span flex></span> <span><md-icon></md-icon>New</span></div></md-toolbar></md-card><md-card class=m-t><md-toolbar><div class=md-toolbar-tools><h2><span>Potential Exceptions</span></h2><span flex></span> <span><md-icon></md-icon>Draft</span></div></md-toolbar></md-card><md-card class=m-t><md-toolbar class=md-warning><div class=md-toolbar-tools><h2><span>Potential Exceptions</span></h2><span flex></span> <span><md-icon></md-icon>Submitted</span></div></md-toolbar></md-card><md-card class=m-t><md-toolbar style=\\\"background: #BE4747\\\"><div class=md-toolbar-tools><h2><span>Potential Exceptions</span></h2><span flex></span> <span><md-icon></md-icon>Rejected</span></div></md-toolbar></md-card><md-card class=m-t><md-toolbar style=\\\"background: #1B7E41\\\"><div class=md-toolbar-tools><h2><span>Potential Exceptions</span></h2><span flex></span> <span><md-icon></md-icon>Published</span></div></md-toolbar></md-card><md-card class=m-t><md-toolbar style=\\\"background: #7E7E7E\\\"><div class=md-toolbar-tools><h2><span>Potential Exceptions</span></h2><span flex></span> <span><md-icon></md-icon>Ended</span></div></md-toolbar></md-card><md-card class=\\\"md-card-light m-t\\\"><md-toolbar style=\\\"background: #1B7E41\\\"><div class=md-toolbar-tools><h2><span>Potential Exceptions</span></h2><span flex></span></div></md-toolbar><md-tabs md-border-bottom md-stretch-tabs=always class=md-primary><md-tab label=\\\" Published\\\"><md-content class=md-padding><p></p></md-content></md-tab><md-tab label=\\\" Submitted Update\\\"><md-content class=md-padding><p></p></md-content></md-tab></md-tabs></md-card>\");\n$templateCache.put(\"/app/kitchen-sink/sections/charts.html\",\"<div class=m-a><h1 class=md-display-2>Charts</h1></div><div layout=row><md-card flex=50 ng-controller=ExceptionMapController><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>World Map Chart</span></h2></div></md-toolbar><md-card-content><div ng-include=\\\"\\'/app/components/widgets/lane-pairs-map.html\\'\\\"></div></md-card-content></md-card><md-card flex=50><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>Bar Chart (Selectable Theme)</span></h2><span flex></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4 class=md-menu-content-light><md-menu-item><md-button ng-click=\\\"kitchenSinkCtrl.theme = \\'primary\\'; kitchenSinkCtrl.resetTheme()\\\" ng-disabled=!widget1Loaded><div layout=row><p flex>Theme: Primary</p></div></md-button></md-menu-item><md-menu-item><md-button ng-click=\\\"kitchenSinkCtrl.theme = \\'warning\\'; kitchenSinkCtrl.resetTheme()\\\" ng-disabled=!widget1Loaded><div layout=row><p flex>Theme: Warning</p></div></md-button></md-menu-item><md-menu-item><md-button ng-click=\\\"kitchenSinkCtrl.theme = \\'danger\\'; kitchenSinkCtrl.resetTheme()\\\" ng-disabled=!widget1Loaded><div layout=row><p flex>Theme: Danger</p></div></md-button></md-menu-item><md-menu-item><md-button ng-click=\\\"kitchenSinkCtrl.theme = \\'success\\'; kitchenSinkCtrl.resetTheme()\\\" ng-disabled=!widget1Loaded><div layout=row><p flex>Theme: Success</p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content><div class=animate-show ng-class=\\\"{loaded: themeLoaded}\\\"><bar-chart data=themeData data-theme=kitchenSinkCtrl.theme data-y-label=USD></bar-chart></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/kitchen-sink/sections/colors.html\",\"<div layout=row class=\\\"m-a cascade-in\\\"><h1 flex id=anchor-colors class=md-display-2>Colors</h1><span flex></span> <span>Bg = Background Color</span></div><cva-accordion-group id=colors class=cascade-in><cva-accordion data-title=\\\"General Colors\\\" data-icon=><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #324C7F\\\"></div><div class=color-description><h4 class=color-name>Toolbar Background</h4><small>#324C7F</small> <small>rgba(50, 76, 127, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #2A416D\\\"></div><div class=color-description><h4 class=color-name>Toolbar Tabs Active Bg</h4><small>#2A416D</small> <small>rgba(42, 65, 109, 1)</small></div></md-card></div><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #050B24\\\"></div><div class=color-description><h4 class=color-name>Widget Bg / Side Nav Bg</h4><small>#050B24</small> <small>rgba(5, 11, 36, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #21282F\\\"></div><div class=color-description><h4 class=color-name>Widget Border</h4><small>#21282F</small> <small>rgba(33, 40, 47, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #1E233A\\\"></div><div class=color-description><h4 class=color-name>Side Nav Active Tab Bg</h4><small>#1E233A</small> <small>rgba(30, 35, 58, 1)</small></div></md-card></div><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #1B7E41\\\"></div><div class=color-description><h4 class=color-name>Spend Bar Graph</h4><small>#1B7E41</small> <small>rgba(27, 126, 65, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #30C268\\\"></div><div class=color-description><h4 class=color-name>Spend Bar Graph:hover</h4><small>#30C268</small> <small>rgba(48, 194, 104, 1)</small></div></md-card></div><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #FD7600\\\"></div><div class=color-description><h4 class=color-name>Shipment Count</h4><small>#FD7600</small> <small>rgba(253, 118, 0, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #45AFE3\\\"></div><div class=color-description><h4 class=color-name>Links / Shipment Volume</h4><small>#45AFE3</small> <small>rgba(69, 175, 227, 1)</small></div></md-card></div><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #E6E6E6\\\"></div><div class=color-description><h4 class=color-name>Tables Even Row Bg</h4><small>#E6E6E6</small> <small>rgba(230, 230, 230, 1)</small></div></md-card></div><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: rgba(97,97,97,0.90)\\\"></div><div class=color-description><h4 class=color-name>Tooltip Background</h4><small>#616161, 90% Opacity</small> <small>rgba(97,97,97,0.90)</small></div></md-card></div><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #2D7D8F\\\"></div><div class=color-description><h4 class=color-name>Color Name</h4><small>#2D7D8F</small> <small>rgba(45, 125, 143, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #1B7E41\\\"></div><div class=color-description><h4 class=color-name>Crane Green</h4><small>#1B7E41</small> <small>rgba(27, 126, 65, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #213D75\\\"></div><div class=color-description><h4 class=color-name>Crane Blue</h4><small>#213D75</small> <small>rgba(33, 61, 117, 1)</small></div></md-card></div></cva-accordion><cva-accordion data-title=\\\"Map Colors\\\" data-icon=><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #FD7600\\\"></div><div class=color-description><h4 class=color-name>Lane Pair 1</h4><small>#FD7600</small> <small>rgba(253, 118, 0, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #85D9A4\\\"></div><div class=color-description><h4 class=color-name>Lane Pair 2</h4><small>#85D9A4</small> <small>rgba(133, 217, 164, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #FFD35B\\\"></div><div class=color-description><h4 class=color-name>Lane Pair 3</h4><small>#FFD35B</small> <small>rgba(255, 211, 91, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #3F4C59\\\"></div><div class=color-description><h4 class=color-name>Map / Table Controls</h4><small>#3F4C59</small> <small>rgba(63, 76, 89, 1)</small></div></md-card></div></cva-accordion><cva-accordion data-title=\\\"Exceptions Colors\\\" data-icon=><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #30C268\\\"></div><div class=color-description><h4 class=color-name>Active Shipments / Land</h4><small>#30C268</small> <small>rgba(48, 194, 104, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #85D9A4\\\"></div><div class=color-description><h4 class=color-name>Air</h4><small>#85D9A4</small> <small>rgba(133, 217, 164, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #1C6033\\\"></div><div class=color-description><h4 class=color-name>Sea</h4><small>#1C6033</small> <small>rgba(28, 96, 51, 1)</small></div></md-card></div><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #EF533D\\\"></div><div class=color-description><h4 class=color-name>Current Exceptions</h4><small>#EF533D</small> <small>rgba(239, 83, 61, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #F4978A\\\"></div><div class=color-description><h4 class=color-name>Current Exceptions: Air</h4><small>#F4978A</small> <small>rgba(244, 151, 138, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #76291E\\\"></div><div class=color-description><h4 class=color-name>Current Exceptions: Sea</h4><small>#76291E</small> <small>rgba(118, 41, 30, 1)</small></div></md-card></div><div layout=row><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #EF9E3D\\\"></div><div class=color-description><h4 class=color-name>Potential Exceptions</h4><small>#EF9E3D</small> <small>rgba(239, 158, 61, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #FFE39C\\\"></div><div class=color-description><h4 class=color-name>Potential Exceptions: Ait</h4><small>#FFE39C</small> <small>rgba(255, 227, 156, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #774E1E\\\"></div><div class=color-description><h4 class=color-name>Potential Exceptions: Sea</h4><small>#774E1E</small> <small>rgba(119, 78, 30, 1)</small></div></md-card></div></cva-accordion><cva-accordion data-title=\\\"Font Colors\\\" data-icon=><div layout=row flex-gt-xs=100><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #F6F6F6\\\"></div><div class=color-description><h4 class=color-name>Light Text</h4><small>#F6F6F6</small> <small>rgba(48, 194, 104, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #5E6163\\\"></div><div class=color-description><h4 class=color-name>Dark Text</h4><small>#5E6163</small> <small>rgba(133, 217, 164, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #050B24\\\"></div><div class=color-description><h4 class=color-name>Dark Sub-Header</h4><small>#050B24</small> <small>rgba(28, 96, 51, 1)</small></div></md-card><md-card flex=25 class=\\\"color color-box\\\"><div class=color-square style=\\\"background: #909192\\\"></div><div class=color-description><h4 class=color-name>Light Sub-Header<br>Widget Time-Stamp</h4><small>#909192</small> <small>rgba(28, 96, 51, 1)</small></div></md-card></div></cva-accordion><cva-accordion data-title=\\\"Colors in Order\\\" data-icon=><ng-repeat ng-repeat=\\\"colorGroup in kitchenSinkCtrl.colorGroups\\\"><h3>{{ colorGroup.name }}</h3><div layout=row flex-gt-xs=100><md-card flex=25 class=\\\"color color-box\\\" ng-repeat=\\\"color in colorGroup.colors\\\"><div class=color-square style=\\\"background: {{ color.rgbColor }}\\\"></div><div class=color-description><h4 class=color-name>{{ color.name }}</h4><small>{{ color.hexColor }}</small> <small>{{ color.rgbColor }}</small></div></md-card></div></ng-repeat></cva-accordion></cva-accordion-group>\");\n$templateCache.put(\"/app/kitchen-sink/sections/forms.html\",\"<h1 class=\\\"md-display-2 m-a\\\">Forms</h1><div layout=row><md-card flex=50 class=cascade-in><md-toolbar><div class=md-toolbar-tools><h2><span>Dark Form</span></h2></div></md-toolbar><md-card-content><div><form name=userForm class=dark-form><div layout-gt-xs=row class=md-inline-form><md-input-container class=md-block flex-gt-xs><label>Company (Disabled)</label><input ng-model=user.company disabled></md-input-container></div><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm><label>First name</label><input ng-model=user.firstName></md-input-container><md-input-container class=md-block flex-gt-sm><label>Long Last Name That Will Be Truncated And 3 Dots (Ellipsis) Will Appear At The End</label><input ng-model=theMax></md-input-container></div><div layout=row class=md-inline-form><div flex=50><md-input-container class=md-block><label>Input Alignment</label><input type=text></md-input-container></div><div flex=50><div class=datepicker-wrapper><label>Origin Date Range</label><ob-daterangepicker range=kitchenSinkCtrl.range ranges=kitchenSinkCtrl.ranges linked-calendars=false calendars-always-on=true class=\\\"down center\\\"></ob-daterangepicker></div></div></div><md-input-container class=md-block><label>Address</label><input ng-model=user.address></md-input-container><md-input-container class=md-block><input ng-model=user.address2 placeholder=\\\"Address 2\\\"></md-input-container><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm><label>City</label><input ng-model=user.city></md-input-container><md-input-container class=md-block flex-gt-sm><label>State</label><md-select ng-model=user.state aria-label=user.state><md-option ng-repeat=\\\"state in [\\'AL\\', \\'AK\\', \\'AZ\\', \\'AR\\', \\'CA\\', \\'CO\\', \\'CT\\', \\'DE\\', \\'FL\\', \\'GA\\', \\'HI\\', \\'ID\\', \\'IL\\', \\'IN\\', \\'IA\\', \\'KS\\', \\'KY\\', \\'LA\\', \\'ME\\', \\'MD\\', \\'MA\\', \\'MI\\', \\'MN\\', \\'MS\\', \\'MO\\', \\'MT\\', \\'NE\\', \\'NV\\', \\'NH\\', \\'NJ\\', \\'NM\\', \\'NY\\', \\'NC\\', \\'ND\\', \\'OH\\', \\'OK\\', \\'OR\\', \\'PA\\', \\'RI\\', \\'SC\\', \\'SD\\', \\'TN\\', \\'TX\\', \\'UT\\', \\'VT\\', \\'VA\\', \\'WA\\', \\'WV\\', \\'WI\\', \\'WY\\']\\\">{{state}}</md-option></md-select></md-input-container><md-input-container class=md-block flex-gt-sm><label>Postal Code</label><input name=postalCode ng-model=user.postalCode placeholder=12345 required ng-pattern=/^[0-9]{5}$/ md-maxlength=5><div ng-messages=userForm.postalCode.$error role=alert multiple><div ng-message=required class=my-message>You must supply a postal code.</div><div ng-message=pattern class=my-message>That doesn\\'t look like a valid postal code.</div><div ng-message=md-maxlength class=my-message>Don\\'t use the long version silly...we don\\'t need to be that specific...</div></div></md-input-container></div><md-input-container class=md-block><label>Biography</label><textarea ng-model=user.biography md-maxlength=150 rows=5 md-select-on-focus></textarea></md-input-container><div layout=row><div flex=33><md-checkbox ng-model=data.cb1 aria-label=option class=md-primary>Option</md-checkbox></div><div flex=33><md-checkbox ng-model=data.cb2 aria-label=option class=md-primary>Option 2</md-checkbox></div><div flex=33><md-checkbox ng-model=data.cb3 aria-label=option class=md-primary>Option 3</md-checkbox></div></div><div layout=row layout-align=\\\"end start\\\"><md-button class=md-raised ng-click=kitchenSinkCtrl.showBookmarkToast()>Submit</md-button></div></form></div></md-card-content></md-card><md-card flex=50 class=\\\"md-card-light cascade-in\\\"><md-toolbar><div class=md-toolbar-tools><h2><span>Light Form</span></h2></div></md-toolbar><md-card-content><div><form name=userForm class=light-form><div layout-gt-xs=row class=md-inline-form><md-input-container class=md-block flex-gt-xs><label>Company (Disabled)</label><input ng-model=user.company disabled></md-input-container></div><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm><label>First name</label><input ng-model=user.firstName></md-input-container><md-input-container class=md-block flex-gt-sm><label>Long Last Name That Will Be Truncated And 3 Dots (Ellipsis) Will Appear At The End</label><input ng-model=theMax></md-input-container></div><div layout=row class=md-inline-form><div flex=50><md-input-container class=md-block><label>Input Alignment</label><input type=text></md-input-container></div><div flex=50><div class=datepicker-wrapper><label>Origin Date Range</label><ob-daterangepicker name=shipDate range=kitchenSinkCtrl.range ranges=kitchenSinkCtrl.ranges linked-calendars=false calendars-always-on=true class=\\\"down left\\\"></ob-daterangepicker></div></div></div><md-input-container class=md-block><label>Address</label><input ng-model=user.address></md-input-container><md-input-container class=md-block><input ng-model=user.address2 placeholder=\\\"Address 2\\\"></md-input-container><div layout-gt-sm=row><md-input-container class=md-block flex-gt-sm><label>City</label><input ng-model=user.city></md-input-container><md-input-container class=md-block flex-gt-sm><label>State</label><md-select ng-model=user.state aria-label=user.state><md-option ng-repeat=\\\"state in [\\'AL\\', \\'AK\\', \\'AZ\\', \\'AR\\', \\'CA\\', \\'CO\\', \\'CT\\', \\'DE\\', \\'FL\\', \\'GA\\', \\'HI\\', \\'ID\\', \\'IL\\', \\'IN\\', \\'IA\\', \\'KS\\', \\'KY\\', \\'LA\\', \\'ME\\', \\'MD\\', \\'MA\\', \\'MI\\', \\'MN\\', \\'MS\\', \\'MO\\', \\'MT\\', \\'NE\\', \\'NV\\', \\'NH\\', \\'NJ\\', \\'NM\\', \\'NY\\', \\'NC\\', \\'ND\\', \\'OH\\', \\'OK\\', \\'OR\\', \\'PA\\', \\'RI\\', \\'SC\\', \\'SD\\', \\'TN\\', \\'TX\\', \\'UT\\', \\'VT\\', \\'VA\\', \\'WA\\', \\'WV\\', \\'WI\\', \\'WY\\']\\\">{{state}}</md-option></md-select></md-input-container><md-input-container class=md-block flex-gt-sm><label>Postal Code</label><input name=postalCode ng-model=user.postalCode placeholder=12345 required ng-pattern=/^[0-9]{5}$/ md-maxlength=5><div ng-messages=userForm.postalCode.$error role=alert multiple><div ng-message=required class=my-message>You must supply a postal code.</div><div ng-message=pattern class=my-message>That doesn\\'t look like a valid postal code.</div><div ng-message=md-maxlength class=my-message>Don\\'t use the long version silly...we don\\'t need to be that specific...</div></div></md-input-container></div><md-input-container class=md-block><label>Biography</label><textarea ng-model=user.biography md-maxlength=150 rows=5 md-select-on-focus></textarea></md-input-container><div layout=row><div flex=33><md-checkbox ng-model=data.cb1 aria-label=option class=md-primary>Option</md-checkbox></div><div flex=33><md-checkbox ng-model=data.cb2 aria-label=option class=md-primary>Option 2</md-checkbox></div><div flex=33><md-checkbox ng-model=data.cb3 aria-label=option class=md-primary>Option 3</md-checkbox></div></div><div layout=row layout-align=\\\"end start\\\"><md-button class=\\\"md-raised md-primary\\\" ng-click=kitchenSinkCtrl.showBookmarkToast()>Submit</md-button></div></form></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/kitchen-sink/sections/icons.html\",\"<h1 class=\\\"md-display-2 m-a\\\">Icons</h1><md-card id=icons class=cascade-in><md-card-content><div layout=row><div flex-gt-sm=25><div class=icon-list-item layout=row ng-repeat=\\\"icon in (kitchenSinkCtrl.icons | limitTo : 8 : 0)\\\"><div flex=10><md-icon ng-bind-html=icon.icon></md-icon></div><span flex>{{ icon.name }}</span></div></div><div flex-gt-sm=25><div class=icon-list-item layout=row ng-repeat=\\\"icon in (kitchenSinkCtrl.icons | limitTo : 8 : 8)\\\"><div flex=10><md-icon ng-bind-html=icon.icon></md-icon></div><span flex>{{ icon.name }}</span></div></div><div flex-gt-sm=25><div class=icon-list-item layout=row ng-repeat=\\\"icon in (kitchenSinkCtrl.icons | limitTo : 8 : 16)\\\"><div flex=10><md-icon ng-bind-html=icon.icon></md-icon></div><span flex>{{ icon.name }}</span></div></div><div flex-gt-sm=25><div class=icon-list-item layout=row ng-repeat=\\\"icon in (kitchenSinkCtrl.icons | limitTo : 8 : 24)\\\"><div flex=10><md-icon ng-bind-html=icon.icon></md-icon></div><span flex>{{ icon.name }}</span></div></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/kitchen-sink/sections/loading-animations.html\",\"<h1 class=\\\"md-display-2 m-a\\\">Loading Animations</h1><div layout-xs=column layout-sm=column layout-gt-sm=row><div flex-xs flex-gt-xs=33 layout=column flex-fill id=first_load><md-card flex class=\\\"widget cascade-in\\\"><md-toolbar class=md-success><div class=md-toolbar-tools><h2><md-icon></md-icon><span>First Load</span></h2></div></md-toolbar><md-card-content class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=widget1Loaded flex-fill flex><div layout=row id=widget1_content class=\\\"loading-content m-t-sm\\\" ng-class=\\\"{loaded: widget1Loaded}\\\"><div flex=50><donut-chart data=widget1Data data-theme=active-shipments data-always-initial-animation=true control=widget1Control segment-class-map=widget1SegmentClassMap></donut-chart></div><div flex=50><p class=md-caption>Previous 7 Days</p><ul class=icon-list><li ng-mouseover=\\\"widget1Control.growSegment(\\'air\\')\\\" ng-mouseleave=\\\"widget1Control.restoreSegment(\\'air\\')\\\" ng-class=\\\"{highlighted: widget1SegmentClassMap.air}\\\"><div class=\\\"mode-wrapper md-success-2\\\"><div class=mode-text><md-icon aria-label=air-shipment></md-icon>Air</div></div><span class=md-headline>{{ widget1Data[0].shipments }}</span></li><li ng-mouseover=\\\"widget1Control.growSegment(\\'sea\\')\\\" ng-mouseleave=\\\"widget1Control.restoreSegment(\\'sea\\')\\\" ng-class=\\\"{highlighted: widget1SegmentClassMap.sea}\\\"><div class=\\\"mode-wrapper md-success-3\\\"><div class=mode-text><md-icon aria-label=sea-shipment></md-icon>Sea</div></div><span class=md-headline>{{ widget1Data[1].shipments }}</span></li><li ng-mouseover=\\\"widget1Control.growSegment(\\'ground\\')\\\" ng-mouseleave=\\\"widget1Control.restoreSegment(\\'ground\\')\\\" ng-class=\\\"{highlighted: widget1SegmentClassMap.ground}\\\"><div class=\\\"mode-wrapper md-success\\\"><div class=mode-text><md-icon aria-label=ground-shipment></md-icon>Land</div></div><span class=md-headline>{{ widget1Data[2].shipments }}</span></li></ul></div></div></md-card-content></md-card><md-button class=md-raised ng-click=kitchenSinkCtrl.resetWidget1Load() ng-disabled=!widget1Loaded><span ng-show=widget1Loaded>Reset</span><md-progress-circular md-mode=indeterminate ng-hide=widget1Loaded class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div><div flex-xs flex-gt-xs=33 layout=column flex-fill id=reloading><md-card flex class=\\\"widget cascade-in\\\"><md-toolbar class=md-warning><div class=md-toolbar-tools><h2><md-icon></md-icon><span>Reloading<md-progress-circular md-mode=indeterminate class=md-hue-1 md-diameter=40px ng-hide=widget2Loaded></md-progress-circular></span></h2></div></md-toolbar><md-card-content flex-fill flex class=p-0><div layout=row class=m-t-sm><div flex=50><donut-chart data=widget2Data data-theme=current-exceptions control=widget2Control segment-class-map=widget2SegmentClassMap></donut-chart></div><div flex=50><p class=md-caption>Previous 7 Days</p><ul class=icon-list><li ng-mouseover=\\\"widget2Control.growSegment(\\'air\\')\\\" ng-mouseleave=\\\"widget2Control.restoreSegment(\\'air\\')\\\" ng-class=\\\"{highlighted: widget2SegmentClassMap.air}\\\"><div class=\\\"mode-wrapper md-warning-2\\\"><div class=mode-text><md-icon aria-label=air-shipment></md-icon>Air</div></div><span class=\\\"md-headline number value-{{widget2Data[0].shipments}}\\\"><counting-number>{{ widget2Data[0].shipments }}</counting-number></span></li><li ng-mouseover=\\\"widget2Control.growSegment(\\'sea\\')\\\" ng-mouseleave=\\\"widget2Control.restoreSegment(\\'sea\\')\\\" ng-class=\\\"{highlighted: widget2SegmentClassMap.sea}\\\"><div class=\\\"mode-wrapper md-warning-3\\\"><div class=mode-text><md-icon aria-label=sea-shipment></md-icon>Sea</div></div><span class=\\\"md-headline number value-{{widget2Data[1].shipments}}\\\"><counting-number>{{ widget2Data[1].shipments }}</counting-number></span></li><li ng-mouseover=\\\"widget2Control.growSegment(\\'ground\\')\\\" ng-mouseleave=\\\"widget2Control.restoreSegment(\\'ground\\')\\\" ng-class=\\\"{highlighted: widget2SegmentClassMap.ground}\\\"><div class=\\\"mode-wrapper md-warning\\\"><div class=mode-text><md-icon aria-label=ground-shipment></md-icon>Land</div></div><span class=\\\"md-headline number value-{{widget2Data[2].shipments}}\\\"><counting-number>{{ widget2Data[2].shipments }}</counting-number></span></li></ul></div></div></md-card-content></md-card><md-button class=md-raised ng-click=kitchenSinkCtrl.resetWidget2Load() ng-disabled=!widget2Loaded><span ng-show=widget2Loaded>Reset</span><md-progress-circular md-mode=indeterminate ng-hide=widget2Loaded class=\\\"md-hue-1 md-accent\\\" md-diameter=30px></md-progress-circular></md-button></div><div flex-xs flex-gt-xs=33 layout=column flex-fill id=bar_chart><md-card flex class=cascade-in><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>Spending Over Time</span></h2></div></md-toolbar><div loadmask=widget3Loaded><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always class=md-primary><md-tab label=Week><md-content class=loading-content ng-class=\\\"{loaded: widget3Loaded}\\\"><bar-chart data=widget3DataTab1 data-theme=primary data-y-label=USD></bar-chart></md-content></md-tab><md-tab label=Month><md-content class=loading-content ng-class=\\\"{loaded: widget3Loaded}\\\"><bar-chart data=widget3DataTab2 data-theme=success data-y-label=USD></bar-chart></md-content></md-tab><md-tab label=Quarter><md-content class=loading-content ng-class=\\\"{loaded: widget3Loaded}\\\"><bar-chart data=widget3DataTab3 data-theme=warning data-y-label=USD></bar-chart></md-content></md-tab><md-tab label=Year><md-content class=loading-content ng-class=\\\"{loaded: widget3Loaded}\\\"><bar-chart data=widget3DataTab4 data-theme=danger data-y-label=USD></bar-chart></md-content></md-tab></md-tabs></div></md-card><md-button class=md-raised ng-click=kitchenSinkCtrl.resetWidget3Load() ng-disabled=!widget3Loaded><span ng-show=widget3Loaded>Reset</span><md-progress-circular md-mode=indeterminate ng-hide=widget3Loaded class=\\\"md-hue-1 md-accent\\\" md-diameter=30px></md-progress-circular></md-button></div></div>\");\n$templateCache.put(\"/app/kitchen-sink/sections/miscellaneous.html\",\"<!-- Miscellaneous --><h1 class=\\\"md-display-2 m-a\\\">Miscellaneous</h1><md-card id=miscellaneous class=cascade-in><md-card-content><h3>View Background</h3><div class=v-background></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/kitchen-sink/sections/tables.html\",\"<h1 class=\\\"md-display-2 m-a\\\">Tables</h1><div layout=row><div id=table1 flex=50 flex-fill layout=row><md-card class=cascade-in flex><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>Table Small - Light - Full Load</span></h2></div></md-toolbar><md-card-content flex-fill flex><div class=loadmask-light loadmask=table1Loaded style=position:absolute;top:52px;left:0;right:0;bottom:0></div><table class=\\\"card-content-table table-sm\\\" ng-show=table1Loaded><tbody><tr><td>Shipping Invoice</td><td><a href=#>2015-07-14_143680_QDSR152_SI.pdf</a></td><td>14-Jul-2015</td><td class=col-icon><a class=\\\"btn-sm icon-button md-button md-ink-ripple\\\" href=#><md-icon class=material-icons></md-icon></a></td></tr><tr><td>Shipping Invoice</td><td><a href=#>2015-07-14_143680_QDSR152_SI.pdf</a></td><td>14-Jul-2015</td><td class=col-icon><a class=\\\"btn-sm icon-button md-button md-ink-ripple\\\" href=#><md-icon class=material-icons></md-icon></a></td></tr><tr><td>Shipping Invoice</td><td><a href=#>2015-07-14_143680_QDSR152_SI.pdf</a></td><td>14-Jul-2015</td><td class=col-icon><a class=\\\"btn-sm icon-button md-button md-ink-ripple\\\" href=#><md-icon class=material-icons></md-icon></a></td></tr><tr><td>Shipping Invoice</td><td><a href=#>2015-07-14_143680_QDSR152_SI.pdf</a></td><td>14-Jul-2015</td><td class=col-icon><a class=\\\"btn-sm icon-button md-button md-ink-ripple\\\" href=#><md-icon class=material-icons></md-icon></a></td></tr></tbody></table></md-card-content></md-card><div><md-button class=md-raised ng-click=kitchenSinkCtrl.resetTable1Load() ng-disabled=!table1Loaded><span ng-show=table1Loaded>Reset</span><md-progress-circular md-mode=indeterminate ng-hide=table1Loaded class=\\\"md-hue-1 md-accent\\\" md-diameter=30px></md-progress-circular></md-button></div></div><div id=table2 flex=50 flex-fill layout=row><md-card flex class=\\\"md-card-dark cascade-in\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>Table Small - Dark - Update</span></h2><span flex></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4 class=md-menu-content-light><md-menu-item><md-button ng-click=\\\"\\\"><div layout=row><p flex>Edit Table Contents</p></div></md-button></md-menu-item><md-menu-item ng-controller=\\\"UserController as userCtrl\\\"><md-button ng-click=\\\"\\\"><div layout=row><p flex>Table Action</p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content loadmask=table2Loaded class=loadmask-dark><table class=\\\"card-content-table table-sm\\\"><tbody><tr><td>Shipping Invoice</td><td><a href=#>2015-07-14_143680_QDSR152_SI.pdf</a></td><td>14-Jul-2015</td><td class=col-icon><a class=\\\"btn-sm icon-button md-button md-ink-ripple\\\" href=#><md-icon class=material-icons></md-icon></a></td></tr><tr><td>Shipping Invoice</td><td><a href=#>2015-07-14_143680_QDSR152_SI.pdf</a></td><td>14-Jul-2015</td><td class=col-icon><a class=\\\"btn-sm icon-button md-button md-ink-ripple\\\" href=#><md-icon class=material-icons></md-icon></a></td></tr><tr><td>Shipping Invoice</td><td><a href=#>2015-07-14_143680_QDSR152_SI.pdf</a></td><td>14-Jul-2015</td><td class=col-icon><a class=\\\"btn-sm icon-button md-button md-ink-ripple\\\" href=#><md-icon class=material-icons></md-icon></a></td></tr><tr><td>Shipping Invoice</td><td><a href=#>2015-07-14_143680_QDSR152_SI.pdf</a></td><td>14-Jul-2015</td><td class=col-icon><a class=\\\"btn-sm icon-button md-button md-ink-ripple\\\" href=#><md-icon class=material-icons></md-icon></a></td></tr></tbody></table></md-card-content></md-card><div><md-button class=md-raised ng-click=kitchenSinkCtrl.resetTable2Load() ng-disabled=!table2Loaded><span ng-show=table2Loaded>Reset</span><md-progress-circular md-mode=indeterminate ng-hide=table2Loaded class=\\\"md-hue-1 md-accent\\\" md-diameter=30px></md-progress-circular></md-button></div></div></div><div class=m-a class=cascade-in><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>Table Cards</span></h2></div></md-toolbar><div class=table-scroll><table class=\\\"card-table table-fixed table-static\\\"><thead><tr><th class=col-icon>TYPE</th><th class=td-20>MILESTONE</th><th class=td-20>EST. DATE</th><th class=td-10>EST. TIME</th><th class=td-20>ACTUAL DATE</th><th class=td-10>ACTUAL TIME</th><th class=td-20>DESCRIPTION</th><th class=td-20>REMARKS</th></tr></thead><tbody><tr class=md-whiteframe-1dp><td class=col-icon><md-icon></md-icon></td><td class=td-20>Booking Created</td><td class=td-20>12-May-2016</td><td class=td-10>12:20</td><td class=td-20>12-May-2016</td><td class=td-10>13:45</td><td class=td-20>Late description here</td><td class=td-20>no remark</td></tr><tr class=md-whiteframe-1dp><td class=col-icon></td><td class=td-20>Booking Created</td><td class=td-20>12-May-2016</td><td class=td-10>12:20</td><td class=td-20>12-May-2016</td><td class=td-10>13:45</td><td class=td-20>Late description here</td><td class=td-20>no remark</td></tr><tr class=md-whiteframe-1dp><td class=col-icon><md-icon><span class=text-warning></span></md-icon></td><td class=td-20>Booking Created</td><td class=td-20>12-May-2016</td><td class=td-10>12:20</td><td class=td-20>12-May-2016</td><td class=td-10>13:45</td><td class=td-20>Late description here</td><td class=td-20>no remark</td></tr><tr class=md-whiteframe-1dp><td class=col-icon><md-icon><span class=text-danger></span></md-icon></td><td class=td-20>Booking Created</td><td class=td-20>12-May-2016</td><td class=td-10>12:20</td><td class=td-20>12-May-2016</td><td class=td-10>13:45</td><td class=td-20>Late description here</td><td class=td-20>no remark</td></tr></tbody></table></div></div><md-card class=\\\"m-t cascade-in\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>Table Striped</span></h2></div></md-toolbar><md-card-content><table class=table-striped><thead><tr><th class=td-20>MILESTONE</th><th class=td-10>EST. DATE</th><th class=td-7-5>EST. TIME</th><th class=td-10>ACTUAL DATE</th><th class=td-7-5>ACTUAL TIME</th><th class=td-20>DESCRIPTION</th><th class=td-20>REMARKS</th></tr></thead><tbody><tr><td class=td-20>Booking Created</td><td class=td-10>12-May-2016</td><td class=td-7-5>12:20</td><td class=td-10>12-May-2016</td><td class=td-7-5>13:45</td><td class=td-20>Late description here</td><td class=td-20>no remark</td></tr><tr><td class=td-20>Booking Created</td><td class=td-10>12-May-2016</td><td class=td-7-5>12:20</td><td class=td-10>12-May-2016</td><td class=td-7-5>13:45</td><td class=td-20>Late description here</td><td class=td-20>no remark</td></tr><tr><td class=td-20>Booking Created</td><td class=td-10>12-May-2016</td><td class=td-7-5>12:20</td><td class=td-10>12-May-2016</td><td class=td-7-5>13:45</td><td class=td-20>Late description here</td><td class=td-20>no remark</td></tr><tr><td class=td-20>Booking Created</td><td class=td-10>12-May-2016</td><td class=td-7-5>12:20</td><td class=td-10>12-May-2016</td><td class=td-7-5>13:45</td><td class=td-20>Late description here</td><td class=td-20>no remark</td></tr></tbody></table></md-card-content></md-card>\");\n$templateCache.put(\"/app/kitchen-sink/sections/typography.html\",\"<h1 class=\\\"md-display-2 m-a\\\">Typography</h1><md-card id=typography class=cascade-in><md-card-content><div layout=row><div flex><div class=type-box><h2 style=\\\"font-weight: normal\\\">Aa Zz</h2><small>OpenSans-Regular</small></div></div><div flex><div class=type-box><h2 style=\\\"font-weight: 700\\\">Aa Zz</h2><small>OpenSans-Bold</small></div></div><div flex><div class=type-box><h2 style=\\\"font-weight: 600\\\">Aa Zz</h2><small>OpenSans-Semibold</small></div></div><div flex><div class=type-box><h2 style=\\\"font-weight: normal\\\"><em>Aa Zz</em></h2><small>OpenSans-Italic</small></div></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/kitchen-sink/sections/widgets.html\",\"<div class=m-a><h1 class=md-display-2>UI Widgets</h1></div><div layout=row><md-card flex=50><md-toolbar><div class=md-toolbar-tools><h2><span>Accordion Group - Light</span></h2></div></md-toolbar><md-card-content><cva-accordion-group class=accordion-group-light><cva-accordion data-title=\\\"Accordion with Grid Inside\\\" data-icon=><div layout-gt-xs=row layout-xs=column><div flex-gt-xs=33 class=md-padding>Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Quisque libero metus, condimentum nec, tempor a, commodo mollis, magna. Nullam dictum felis eu pede mollis pretium.</div><div flex-gt-xs=33 class=md-padding>Suspendisse enim turpis, dictum sed, iaculis a, condimenbilia Curae; Sed aliquam, nisi quis porttitor congue, elit erat euismod orci, ac placerat dolor lectus quis orci.</div><div flex-gt-xs=33 class=md-padding>Curabitur at lacus ac elit erat enim turpis.</div></div></cva-accordion><cva-accordion data-title=\\\"Accordion Title With Icon\\\" data-icon=>Proin faucibus arcu quis ante</cva-accordion><cva-accordion data-title=\\\"Container Details\\\" data-icon=>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In ac dui quis mi consectetuer lacinia. In ut quam vitae odio lacinia tincidunt. Vestibulum facilisis, purus nec pulvinar iaculis, ligula mi congue nunc, vitae euismod ligula urna in dolor. Fusce pharetra convallis urna.</cva-accordion><cva-accordion data-title=\\\"Accordion Title With No Icon\\\">bofdskladk</cva-accordion></cva-accordion-group></md-card-content></md-card><md-card flex=50><md-toolbar><div class=md-toolbar-tools><h2><span>Tab Group</span></h2></div></md-toolbar><md-tabs md-border-bottom md-stretch-tabs=always class=md-primary><md-tab label=First><md-content class=md-padding><h3>Tab One</h3><p>Sed lectus. Curabitur nisi. Vivamus elementum semper nisi. Etiam iaculis nunc ac metus. Fusce ac felis sit amet ligula pharetra condimentum.</p></md-content></md-tab><md-tab label=Second><md-content class=md-padding><h3>Tab Two</h3><p>Nullam tincidunt adipiscing enim. Sed mollis, eros et ultrices tempus, mauris ipsum aliquam libero, non adipiscing dolor urna a orci. Praesent egestas neque eu enim. Nulla sit amet est. Vivamus consectetuer hendrerit lacus.</p><p>Vestibulum facilisis, purus nec pulvinar iaculis, ligula mi congue nunc, vitae euismod ligula urna in dolor. Sed magna purus, fermentum eu, tincidunt eu, varius ut, felis. Pellentesque auctor neque nec urna. Nunc sed turpis. Nullam tincidunt adipiscing enim.</p></md-content></md-tab><md-tab label=Third><md-content class=md-padding><h3>Tab Three</h3><p>Vestibulum facilisis, purus nec pulvinar iaculis, ligula mi congue nunc, vitae euismod ligula urna in dolor. Sed magna purus, fermentum eu, tincidunt eu, varius ut, felis. Pellentesque auctor neque nec urna. Nunc sed turpis. Nullam tincidunt adipiscing enim. Sed lectus. Curabitur nisi. Vivamus elementum semper nisi. Etiam iaculis nunc ac metus. Fusce ac felis sit amet ligula pharetra condimentum.</p></md-content></md-tab></md-tabs></md-card></div>\");\n$templateCache.put(\"/app/layout/alerts/alerts.html\",\"<!-- Alert Menu --><md-menu md-position-mode=\\\"target-right target\\\" md-offset=\\\"0 60\\\" ng-if=true><!-- Alert Button --><md-button class=alerts-btn md-ink-ripple=false aria-label=\\\"Open demo menu\\\" ng-click=\\\"$mdOpenMenu($event); vm.closeAlerts();\\\"><span class=counter ng-if=\\\"vm.getAlertsCount() > 0\\\">{{vm.getAlertsCount()}}</span><md-icon aria-label=alerts></md-icon></md-button><!-- Alert Menu Content--><md-menu-content width=6 class=\\\"alerts-menu fixed-position\\\"><md-list class=list-light><md-list-item ng-if=\\\"vm.getAlerts().length == 0\\\">No alerts at this time.</md-list-item><md-list-item ng-repeat=\\\"item in vm.getAlerts() | limitTo : 50 : 0\\\" ng-click=vm.clickAlert(item) class=md-3-line><md-icon class=md-avatar ng-bind-html=vm.alertIcon(item.data.notification.notifiable_type)></md-icon><div class=md-list-item-text><div ng-class=\\\"item.status==\\'unread\\' ? \\'unread\\' : \\'read\\'\\\"><h3>{{item.type}}</h3><p>{{item.message}}</p><p>{{item.data.notification.updated_at | date: \\'MMM dd, yyyy h:mm a\\'}}</p></div></div></md-list-item><!-- <md-virtual-repeat-container id=\\\"vertical-container\\\" style=\\\"height: 200px; width: 300px; border: 1px solid red; color: #212121;\\\" ng-if=\\\"vm.virtualRepeat\\\">\\r\\n <div md-virtual-repeat=\\\"item in vm.infiniteItems\\\" md-on-demand class=\\\"repeated-item\\\" flex style=\\\"height: 120px; min-height: 120px;\\\">\\r\\n <strong>{{item.title}}</strong>\\r\\n <p>{{item.content}}</p>\\r\\n </div>\\r\\n </md-virtual-repeat-container> --></md-list></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/layout/lensview/lensview-modal.html\",\"<md-toast><div class=md-toast-content><div layout-gt-sm=row><div class=md-toolbar-tools><h2>View Data As :</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><div class=light-content><div layout-gt-sm=row><div flex-gt-sm=40 flex-sm=1 flex-xs=1 style=\\\"border-right: 2px solid #CCC\\\"><div style=margin-left:20px><!-- <md-input-container class=\\\"md-block error-hidden\\\">\\r\\n <label translate=\\\"{{searchCtrl.searchFields.service_level_code.display}}\\\"></label> --><md-select ng-model=vm.lensviewType aria-label=vm.lensviewType><md-option ng-value=company><span><md-icon style=\\\"color: #5e6163\\\"></md-icon></span><span>Company</span></md-option><md-option><span><md-icon style=\\\"color: #5e6163\\\"></md-icon></span><span>User</span></md-option></md-select><!-- </md-input-container> --></div></div><div flex-gt-sm=60 flex-sm=1 flex-xs=1><div><!-- <md-input-container class=\\\"md-block error-hidden\\\" > --> <input placeholder=\\\"Enter Company Name\\\" ng-model=vm.serachData id=lensviewsearch style=\\\"text-shadow: none !important;\\r\\n color: #000; width: 100%; padding: 25px\\\"><!-- </md-input-container> --></div></div></div><div layout-gt-sm=row><div flex-gt-sm=1 flex-sm=1 flex-xs=1 style=\\\"background: #CCC; border-bottom: 1px solid #20222e\\\"><div style=\\\"margin-left: 10px;\\r\\n width: 100px;\\r\\n height: 40px;\\r\\n float: left;\\r\\n padding-top: 15px\\\">Recent</div><div style=\\\"width: 100px;\\r\\n height: 40px;\\r\\n float: left;\\r\\n padding-top: 15px\\\">Favorite</div><!-- <md-tabs md-dynamic-height md-border-bottom >\\r\\n <md-tab label=\\\"one\\\" style=\\\"background: #000 !important\\\">\\r\\n <md-content class=\\\"md-padding\\\">\\r\\n <h1 class=\\\"md-display-2\\\">Tab One</h1>\\r\\n \\r\\n </md-content>\\r\\n </md-tab>\\r\\n <md-tab label=\\\"two\\\" style=\\\"background: #000 !important\\\">\\r\\n <md-content class=\\\"md-padding\\\">\\r\\n <h1 class=\\\"md-display-2\\\">Tab One</h1>\\r\\n \\r\\n </md-content>\\r\\n </md-tab>\\r\\n </md-tabs> --></div></div><div layout-gt-sm=row><div flex-gt-sm=1 flex-sm=1 flex-xs=1 style=\\\"background: #CCC; height: 480px;overflow: hidden\\\"><div style=\\\"border-bottom: 1px solid #20222e; height: 60px\\\" ng-repeat=\\\"a in [1,2,3,4,]\\\"><div style=\\\"width:50px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\"><md-icon></md-icon></div><div style=\\\"width:80px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\">Company</div><div style=\\\"width:200px;float:left; padding-top: 15px;\\r\\n padding-left: 15px;font-size: 18px;font-weight: 900\\\">XYZ</div><div style=\\\"width:50px;float:right; padding-top: 15px;\\r\\n padding-left: 15px\\\"><md-icon></md-icon></div></div><div style=\\\"border-bottom: 1px solid #20222e; height: 60px\\\" ng-repeat=\\\"a in [1,2,3]\\\"><div style=\\\"width:50px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\"><md-icon></md-icon></div><div style=\\\"width:80px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\">User</div><div style=\\\"width:200px;float:left; padding-top: 15px;\\r\\n padding-left: 15px;font-size: 18px;font-weight: 900\\\">ABC</div><div style=\\\"width:50px;float:right; padding-top: 15px;\\r\\n padding-left: 15px\\\"><md-icon></md-icon></div></div></div></div></div></div></md-toast>\");\n$templateCache.put(\"/app/layout/lensview/lensview-modal1.html\",\"<style>.md-whiteframe-z1{\\r\\nbox-shadow:none;\\r\\n}\\r\\n\\r\\n.lensview-search md-autocomplete-wrap{\\r\\npadding : 13px;\\r\\n}\\r\\n\\r\\nmd-autocomplete button{\\r\\n\tdisplay: none;\\r\\n}\\r\\n.md-autocomplete input:not(.md-input){\\r\\nfont-size:18px !important;\\r\\n}\\r\\n\\r\\n@media screen and (max-width: 768px) and (min-width: 320px){\\r\\n .text-field{\\r\\n margin-top: 50px;\\r\\n }\\r\\n .search-field{\\r\\n margin-top: 65px;\\r\\n }\\r\\n .content-div{\\r\\n height: 80px !important;\\r\\n }\\r\\n .name-text{\\r\\n padding-left: 15px !important;\\r\\n }\\r\\n .heading-text{\\r\\n width: 100% !important;\\r\\n float: none !important;\\r\\n }\\r\\n .depart-depart{\\r\\n width: 100% !important;\\r\\n }\\r\\n .depart-company{\\r\\n width: 100% !important;\\r\\n }\\r\\n .top-class{\\r\\n margin-top: 100px !important;\\r\\n }\\r\\n\\r\\n /*.favourite-btn{\\r\\n padding-top: 5px !important;\\r\\n }\\r\\n .name-text{\\r\\n padding-top: 5px !important;\\r\\n padding-left: 15px !important;\\r\\n }\\r\\n .content-div{\\r\\n height: 80px !important;\\r\\n }*/\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Lens View\\\" ng-cloak style=\\\"right: 0px !important; top: 0px !important;position: fixed; z-index: 999;min-height:500px; border-radius: 0; background: #39c;width: 735px\\\" ng-controller=\\\"lensviewController as vm\\\" ng-init=\\\"vm.lensviewtab = 2;vm.loadRecent();\\\"><!-- style=\\\"left: 927px !important; top: 0px !important;position: fixed; z-index: 999;min-height:500px; border-radius: 0; background: #39c\\\" --><md-toolbar style=\\\"background: #39c\\\"><div class=md-toolbar-tools><md-icon aria-label=alerts></md-icon><h2 style=\\\"margin-left: 5px\\\">View Data As :</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.cancel()><md-icon aria-label=\\\"Close dialog\\\" style=\\\"color: #504646;font-size: 35px;margin-top: -15px\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=light-content><div layout-gt-sm=row style=\\\"outline: none;border:none;height: 60px\\\"><div flex-gt-sm=40 flex-sm=1 flex-xs=1 style=\\\"border-right: 2px solid #CCC\\\"><div style=margin-left:20px><!-- <md-input-container class=\\\"md-block error-hidden\\\">\\r\\n <label translate=\\\"{{searchCtrl.searchFields.service_level_code.display}}\\\"></label> --><md-select ng-model=vm.lensviewType aria-label=vm.lensviewType ng-change=vm.resetList() style=margin:15px><md-option ng-selected=true value=lens_grp_company><span><md-icon style=\\\"color: #39c !important;margin-top:-5px;font-size: 24px\\\"></md-icon></span><span style=\\\"color: #000 !important; font-size: 18px; font-weight: 900; padding: 30px\\\">COMPANY</span></md-option><md-option value=lens_grp_user><span><md-icon style=\\\"color: #39c !important;margin-top:-5px;font-size: 24px\\\"></md-icon></span><span style=\\\"color: #000 !important;font-size: 18px; font-weight: 900; padding: 30px\\\">USER</span></md-option><md-option value=lens_grp_department><span><md-icon style=\\\"color: #39c !important;margin-top:-5px;font-size: 24px\\\"></md-icon></span><span style=\\\"color: #000 !important;font-size: 18px; font-weight: 900; padding: 30px\\\">DEPARTMENT</span></md-option></md-select><!-- </md-input-container> --></div></div><div flex-gt-sm=60 flex-sm=1 flex-xs=1><div ng-if=\\\"vm.lensviewType != \\'lens_grp_department\\'\\\" class=lensview-search><input ng-keyup=\\\"vm.getMatches(vm.lensviewType, vm.serachData);vm.lensviewtab = 0;\\\" ng-model=vm.serachData placeholder=\\\"ENTER {{vm.lensviewType == \\'lens_grp_company\\' ? \\'COMPANY\\' : \\'USER\\'}} NAME\\\" id=lensviewsearch name=lensviewsearch focus={{vm.focusTxt}} style=\\\"text-shadow: none !important;font-size: 17px; color: #000; width: 87%;border: none; padding: 18px;\\r\\n outline: none\\\"></div><div ng-if=\\\"vm.lensviewType == \\'lens_grp_department\\'\\\" class=lensview-search><input class=depart-company ng-keyup=\\\"vm.getMatches(\\'lens_grp_company\\', vm.serachDataCompany);vm.lensviewtab = 3;\\\" ng-model=vm.serachDataCompany placeholder=\\\"ENTER COMPANY NAME\\\" id=lensviewsearchcompany name=lensviewsearchcompany focus={{vm.focusTxt}} style=\\\"text-shadow: none !important;font-size: 14px; color: #000; width: 38%; border: none; border-right: 1px solid #bbb; padding: 20px; outline: none\\\"> <input class=depart-depart ng-disabled=departmentCheck ng-keyup=\\\"vm.getDepartments(\\'lens_grp_department\\', vm.serachDataDepart, companyId);vm.lensviewtab = 4;\\\" ng-model=vm.serachDataDepart placeholder=\\\"ENTER DEPARTMENT NAME\\\" id=lensviewsearchdepart name=lensviewsearchdepart focus={{vm.focusTxt}} style=\\\"text-shadow: none !important;font-size: 14px; color: #000; width: 42%; border: none; padding: 20px; outline: none\\\"></div></div></div><div layout-gt-sm=row class=text-field ng-class=\\\"vm.lensviewType == \\'lens_grp_department\\' ? \\'top-class\\' : \\'\\'\\\"><div flex-gt-sm=1 flex-sm=1 flex-xs=1 style=\\\"background: #DEDEDE; border-bottom: 1px solid #ccc\\\"><div title=RECENT class=lensviewBackColorChange style=\\\"outline: none; width: 100px; height: 40px; float: left; padding-top: 15px\\\" ng-style=\\\"{\\'border-bottom\\' : vm.lensviewtab ==2 ? \\'2px solid #3C3D67\\' : \\'none\\'}\\\" ng-click=\\\"vm.lensviewtab = 2;vm.loadRecent();\\\"><span style=\\\"margin-left: 10px;outline: none\\\" ng-style=\\\"{\\'color\\' : vm.lensviewtab ==2 ? \\'#3C3D67\\' : \\'\\'}\\\">RECENT</span></div><div title=FAVORITES class=lensviewBackColorChange style=\\\"outline: none; width: 100px; height: 40px; float: left; padding-top: 15px\\\" ng-style=\\\"{\\'border-bottom\\' : vm.lensviewtab ==1 ? \\'2px solid #3C3D67\\' : \\'none\\'}\\\" ng-click=\\\"vm.lensviewtab = 1;vm.loadFavorites();\\\"><span style=\\\"margin-left: 10px;outline: none\\\" ng-style=\\\"{\\'color\\' : vm.lensviewtab ==1 ? \\'#3C3D67\\' : \\'\\'}\\\" ng-click=\\\"\\\">FAVORITES</span></div><div title=SEARCH class=lensviewBackColorChange style=\\\"outline: none; width: 100px; height: 40px; float: left; padding-top: 15px\\\" ng-style=\\\"{\\'border-bottom\\' : vm.lensviewtab ==0 || vm.lensviewtab==3 || vm.lensviewtab==4 ? \\'2px solid #3C3D67\\' : \\'none\\'}\\\" ng-click=\\\"vm.lensviewtab = 0;vm.focusSearchTxt();vm.getMatches(vm.lensviewType, vm.serachData);\\\"><span style=\\\"margin-left: 10px;outline: none\\\" ng-style=\\\"{\\'color\\' : vm.lensviewtab ==0 ? \\'#3C3D67\\' : \\'\\'}\\\" ng-click=\\\"\\\">SEARCH</span></div><!-- <md-tabs md-dynamic-height md-border-bottom >\\r\\n <md-tab label=\\\"one\\\" style=\\\"background: #000 !important\\\">\\r\\n <md-content class=\\\"md-padding\\\">\\r\\n <h1 class=\\\"md-display-2\\\">Tab One</h1>\\r\\n\\r\\n </md-content>\\r\\n </md-tab>\\r\\n <md-tab label=\\\"two\\\" style=\\\"background: #000 !important\\\">\\r\\n <md-content class=\\\"md-padding\\\">\\r\\n <h1 class=\\\"md-display-2\\\">Tab One</h1>\\r\\n\\r\\n </md-content>\\r\\n </md-tab>\\r\\n </md-tabs> --></div></div><div layout-gt-sm=row class=search-field><div flex-gt-sm=1 flex-sm=1 flex-xs=1 style=\\\"background: #DEDEDE; height: 480px;overflow: hidden\\\"><div style=\\\"border-bottom: 1px solid #ccc; height: 60px\\\" ng-repeat=\\\"data in vm.recentSearch | limitTo:8\\\" ng-if=\\\"vm.lensviewtab == 2 || vm.lensviewtab == 1\\\" class=\\\"uppercase lensview-search-row content-div\\\"><div ng-if=\\\"data.recent_type != \\'Department\\'\\\" style=\\\"width:50px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\"><md-icon>{{data.recent_type == \\'User\\' ? \\'\\' : \\'\\'}}</md-icon></div><div ng-if=\\\"data.recent_type == \\'Department\\'\\\" style=\\\"width:50px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\"><md-icon></md-icon></div><div class=heading-text style=\\\"width:80px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\">{{data.recent_type}}</div><div ng-if=\\\"data.recent_type != \\'Department\\'\\\" title={{data.name}} ng-click=\\\"vm.switchUser(data.name,data.recent_id,data.recent_type,\\'\\',\\'\\',data.portal_type,data.show_booking)\\\" style=\\\"float:left;padding-top: 15px;\\r\\n padding-left: 15px;font-size: 18px;font-weight: 900;outline: none;cursor: pointer\\\">{{data.name | strLimit: 20}}</div><div class=name-text ng-if=\\\"data.recent_type == \\'Department\\'\\\" title={{data.name}} ng-click=\\\"vm.switchUser(data.name,data.recent_id,data.recent_type,data.company_id,\\'\\',data.portal_type,data.show_booking)\\\" style=\\\"float:left;padding-top: 15px;\\r\\n padding-left: 35px;font-size: 18px;font-weight: 900;outline: none;cursor: pointer\\\">{{data.name | strLimit: 25}}</div><div class=favourite-btn style=\\\"width:50px;float:right; padding-top: 15px;\\r\\n\\r\\n padding-left: 15px;outline: none; cursor: pointer\\\" ng-if=\\\"vm.lensviewtab !==0\\\" ng-click=vm.addToFavorites(data)><md-icon ng-style=\\\"{\\'color\\': data.favourite != null ? \\'#39c\\' :\\'#CCC\\'}\\\">{{data.favourite != null ? \\'\\' : \\'\\'}}</md-icon></div></div><!-- <div style=\\\"border-bottom: 1px solid #20222e; height: 60px\\\" ng-repeat=\\\"a in [1,2,3,4,5,6,7,8]\\\" ng-if=\\\"vm.lensviewType == \\'user\\'\\\">\\r\\n <div style=\\\"width:50px;float:left; padding-top: 15px;\\r\\n padding-left: 15px; \\\"> <md-icon></md-icon> </div>\\r\\n <div style=\\\"width:80px;float:left; padding-top: 15px;\\r\\n padding-left: 15px;\\\">User</div>\\r\\n <div style=\\\"width:200px;float:left; padding-top: 15px;\\r\\n padding-left: 15px;font-size: 18px;font-weight: 900;\\\">ABC</div>\\r\\n <div style=\\\"width:50px;float:right; padding-top: 15px;\\r\\n padding-left: 15px;\\\"> <md-icon></md-icon> </div>\\r\\n\\r\\n </div> --><div ng-if=vm.showLoader style=\\\"width:200px; padding-top:175px; margin-left:290px\\\"><span><md-progress-circular md-mode=indeterminate md-diameter=40px class=md-hue-1 md-margin-top=131px></md-progress-circular></span></div><div ng-if=\\\"vm.lensviewtab != 1 && vm.lensviewtab != 2 && vm.lensviewType != \\'lens_grp_department\\'\\\" class=\\\"uppercase lensview-search-row content-div\\\" style=\\\"border-bottom: 1px solid #ccc; height: 60px\\\" ng-repeat=\\\"data in vm.autocompleteData | limitTo:8\\\"><div style=\\\"width:50px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\"><md-icon>{{ vm.lensviewType == \\'lens_grp_user\\'? \\'\\' : \\'\\'}}</md-icon></div><div class=uppercase style=\\\"width:80px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\">{{vm.lensviewType.replace(\\\"lens_grp_\\\",\\\"\\\")}}</div><div title={{data.display}} ng-click=\\\"vm.switchUser(data.display,data.value,\\'\\',\\'\\',\\'\\',data.portal_type,data.show_booking)\\\" style=\\\"width:60%;float:left;padding-top: 15px;\\r\\n padding-left: 15px;font-size: 18px;font-weight: 900;outline: none;cursor: pointer\\\">{{data.display | strLimit: 25}}</div><div style=\\\"width:50px;float:right; padding-top: 15px;\\r\\n padding-left: 15px; cursor: pointer\\\" ng-if=\\\"vm.lensviewtab != 0\\\"><md-icon></md-icon></div></div><div ng-if=\\\"vm.lensviewtab == 3 && vm.lensviewType == \\'lens_grp_department\\'\\\" class=\\\"uppercase lensview-search-row content-div\\\" style=\\\"border-bottom: 1px solid #ccc; height: 60px\\\" ng-repeat=\\\"data in vm.autocompleteData | limitTo:8\\\"><div style=\\\"width:50px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\"><md-icon></md-icon></div><div class=uppercase style=\\\"width:80px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\">company</div><div title={{data.display}} ng-click=vm.changeCompany(data.display,data.value,data.portal_type) style=\\\"width:60%;float:left;padding-top: 15px;\\r\\n padding-left: 15px;font-size: 18px;font-weight: 900;outline: none;cursor: pointer\\\">{{data.display | strLimit: 25}}</div><div style=\\\"width:50px;float:right; padding-top: 15px;\\r\\n padding-left: 15px; cursor: pointer\\\" ng-if=\\\"vm.lensviewtab != 3\\\"><md-icon></md-icon></div></div><div ng-if=\\\"vm.lensviewtab == 4 && vm.lensviewType == \\'lens_grp_department\\'\\\" class=\\\"uppercase lensview-search-row content-div\\\" style=\\\"border-bottom: 1px solid #ccc; height: 60px\\\" ng-repeat=\\\"data in vm.autocompleteData | limitTo:8\\\"><div style=\\\"width:50px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\"><md-icon></md-icon></div><div class=uppercase style=\\\"width:80px;float:left; padding-top: 15px;\\r\\n padding-left: 15px\\\">department</div><div title={{data.display}} ng-click=\\\"vm.switchUser(data.display,data.value,\\'\\',companyId,companyName,data.portal_type,data.show_booking)\\\" style=\\\"width:60%;float:left;padding-top: 15px;\\r\\n padding-left: 35px;font-size: 18px;font-weight: 900;outline: none;cursor: pointer\\\">{{data.display | strLimit: 25}}</div><div style=\\\"width:50px;float:right; padding-top: 15px;\\r\\n padding-left: 15px; cursor: pointer\\\" ng-if=\\\"vm.lensviewtab != 4\\\"><md-icon></md-icon></div></div><div ng-if=\\\"vm.autocompleteData.length==0\\\" style=\\\"padding: 10px;text-align:center\\\">{{vm.zeroRecord}}</div></div></div></md-dialog-content><!-- <md-dialog-actions layout-gt-xs=\\\"row\\\" class=\\\"light-content\\\" layout-align-xs=\\\"center center\\\">\\r\\n\\r\\n\\r\\n </md-dialog-actions> --></md-dialog>\");\n$templateCache.put(\"/app/layout/lensview/lensview.html\",\"<!-- Alert Menu --><style>.admintab_check{\\r\\n/*background-image:repeating-linear-gradient(45deg, transparent 11px, transparent -2px, transparent 26px, rgba(46, 101, 103, 52.39) 30px);*/\\r\\n opacity: 1.5;\\r\\n background-color: #39c;\\r\\n z-index: 50 ! important;\\r\\n margin: 0;padding: 5px 0px 0px 0px;\\r\\n margin-left: -6px;\\r\\n width: auto;\\r\\n margin-right: -7px;\\r\\n\\r\\n height: 63px;\\r\\n margin-top: -8px;\\r\\n }\\r\\n .line-top{\\r\\n background-image: repeating-linear-gradient(45deg, transparent 11px, transparent -2px, transparent 26px, rgba(46, 101, 103, 52.39) 30px);\\r\\n /*z-index: 1000 !important;*/\\r\\n position: absolute;\\r\\n width: 100%;\\r\\n height: 93px;\\r\\n top: 0;\\r\\n left: 0;\\r\\n cursor: auto;\\r\\n margin-top: -27px;\\r\\n}\\r\\n\\r\\n.lens-check{\\r\\n background-image: repeating-linear-gradient(45deg, transparent 11px, transparent -2px, transparent 26px, rgba(46, 101, 103, 52.39) 30px);\\r\\n z-index: 1000 !important;\\r\\n}\\r\\n\\r\\n .admintab_close{\\r\\n float: left;\\r\\n padding-left: 215px;\\r\\n margin-top: -55px;\\r\\n\\r\\n }\\r\\n @media screen and (max-width: 768px) and (min-width: 320px){\\r\\n .cancel-btn{\\r\\n right: 90px !important;\\r\\n }\\r\\n .cancel-icon{\\r\\n right: 145px !important;\\r\\n }\\r\\n } \\r\\n @media screen and (max-width: 400px) and (min-width: 320px){\\r\\n .cancel-btn{\\r\\n right: 125px !important;\\r\\n }\\r\\n .cancel-icon{\\r\\n right: 185px !important;\\r\\n }\\r\\n }\\r\\n @media screen and (max-width: 368px) and (min-width: 320px){\\r\\n .cancel-btn{\\r\\n right: 180px !important;\\r\\n }\\r\\n .cancel-icon{\\r\\n right: 230px !important;\\r\\n }\\r\\n }</style><!-- Previous functionality commented for console error fix need to delete this commented code\\r\\n \\r\\n <md-menu md-position-mode=\\\"target-right target\\\" flex=\\\"auto\\\" md-offset=\\\"0 60\\\" ng-if=\\\"true\\\">\\r\\n <md-button ng-disabled=\\\"vm.admin_check\\\" ng-if=\\\"vm.switchEmail == \\'\\' && vm.lens_mode_view == true\\\" class=\\\"alerts-btn\\\" md-ink-ripple=\\\"false\\\" aria-label=\\\"Open demo menu\\\" ng-click=\\\"vm.showLensview();\\\" ng-class=\\\"vm.admin_check == true ? \\'lens-check\\' : \\'\\'\\\">\\r\\n <span class=\\\"counter\\\" ng-if=\\\"vm.getAlertsCount() > 0\\\">\\r\\n {{vm.getAlertsCount()}}\\r\\n </span>\\r\\n <md-icon aria-label=\\\"alerts\\\" style=\\\"color:#45afe3;font-size: 30px;\\r\\n margin-top: -5px;\\\"></md-icon>\\r\\n\\r\\n </md-button>\\r\\n\\r\\n <div ng-if=\\\"vm.switchEmail != \\'\\'\\\" style=\\\"margin: -10px -9px;min-width: 450px;\\\" ng-class=\\\"{\\'alerts-btn\\':!vm.admin_check}\\\" \\r\\n md-ink-ripple=\\\"false\\\" aria-label=\\\"Open demo menu\\\" class=\\\"lensview-md-button\\\">\\r\\n\\r\\n <span><div class=\\\"line-top\\\" ng-if=\\\"vm.admin_check || vm.strickCheck\\\"></div></span>\\r\\n <div ng-click=\\\"vm.showLensview();\\\" style=\\\"outline: none;\\\">\\r\\n <div style=\\\"float:left;padding-right: 10px;position: relative;\\r\\n z-index: 1001;\\\">\\r\\n <md-icon aria-label=\\\"alerts\\\" style=\\\"color:#fff;font-size:2.5em !important;\\\"></md-icon>\\r\\n </div>\\r\\n <div class=\\\"uppercase\\\" style=\\\"color:#fff; float:left;margin-left:6px;padding-left:10px;\\r\\n width: calc(100% - 55px);\\\">\\r\\n <div style=\\\"font-weight: 400; text-align: left;color: black;font-family:Helvetica;\\\">\\r\\n viewing as\\r\\n <span></span>\\r\\n </div>\\r\\n <div title=\\\"{{vm.switchEmail}}\\\" style=\\\"text-align: left;font-weight: 700;margin-top:-13px; font-family:Helvetica;font-size :16px;overflow: hidden;text-overflow: ellipsis;margin-right: 10px;\\\">\\r\\n {{vm.switchEmail | strLimit: 25}}\\r\\n </div>\\r\\n <br/>\\r\\n </div>\\r\\n <div ng-if=\\\"!vm.admin_check\\\" ng-attr-style=\\\"display:{{(vm.strickCheck)?\\'none\\':\\'block\\'}}\\\" style=\\\"float:left;padding-left: 20px;\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\" ng-click=\\\"vm.clearSwitchEmail();\\\" style=\\\"font-size: 25px;position: absolute;right: 35px;top: 5px;\\\" class=\\\"lensview-close-icon cancel-icon\\\"\\r\\n ></md-icon>\\r\\n </div>\\r\\n\\r\\n <div ng-if=\\\"vm.admin_check\\\" ng-attr-style=\\\"display:{{(vm.strickCheck || vm.admin_check)?\\'none\\':\\'block\\'}}\\\" class=\\\"cancel-btn\\\" style=\\\"float:left;padding-left: 12px;position: relative;\\r\\n z-index: 1001;\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\" ng-click=\\\" vm.clearSwitchEmail();\\\" style=\\\"font-size: 25px; margin-left: -100px;\\\" class=\\\"lensview-close-icon\\\" ></md-icon>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n </div>\\r\\n\\r\\n \\r\\n\\r\\n</md-menu> --><md-menu md-position-mode=\\\"target-right target\\\" flex=auto md-offset=\\\"0 60\\\"><button ng-disabled=vm.admin_check ng-show=\\\"vm.switchEmail == \\'\\' && vm.lens_mode_view == true\\\" class=\\\"md-button alerts-btn\\\" md-ink-ripple=false aria-label=\\\"Open demo menu\\\" ng-click=vm.showLensview(); ng-class=\\\"vm.admin_check == true ? \\'lens-check\\' : \\'\\'\\\"><span class=counter ng-show=\\\"vm.getAlertsCount() > 0\\\">{{vm.getAlertsCount()}}</span><md-icon aria-label=alerts style=\\\"color:#45afe3;font-size: 30px;\\r\\n margin-top: -5px\\\"></md-icon></button><md-menu-content hide></md-menu-content></md-menu><div ng-if=\\\"vm.switchEmail != \\'\\'\\\" style=\\\"margin: -10px -9px;min-width: 450px\\\" ng-class=\\\"{\\'alerts-btn\\':!vm.admin_check}\\\" md-ink-ripple=false aria-label=\\\"Open demo menu\\\" class=lensview-md-button><span><div class=line-top ng-if=\\\"vm.admin_check || vm.strickCheck\\\"></div></span><div ng-click=vm.showLensview(); style=\\\"outline: none\\\"><div style=\\\"float:left;padding-right: 10px;position: relative;\\r\\nz-index: 1001\\\"><md-icon aria-label=alerts style=\\\"color:#fff;font-size:2.5em !important\\\"></md-icon></div><div class=uppercase style=\\\"color:#fff; float:left;margin-left:6px;padding-left:10px;\\r\\nwidth: calc(100% - 55px)\\\"><div style=\\\"font-weight: 400; text-align: left;color: black;font-family:Helvetica\\\">viewing as <span></span></div><div title={{vm.switchEmail}} style=\\\"text-align: left;font-weight: 700;margin-top:-13px; font-family:Helvetica;font-size :16px;overflow: hidden;text-overflow: ellipsis;margin-right: 10px\\\">{{vm.switchEmail | strLimit: 25}}</div><br></div><div ng-if=!vm.admin_check ng-attr-style=\\\"display:{{(vm.strickCheck)?\\'none\\':\\'block\\'}}\\\" style=\\\"float:left;padding-left: 20px\\\"><md-icon aria-label=\\\"Close dialog\\\" ng-click=vm.clearSwitchEmail(); style=\\\"font-size: 25px;position: absolute;right: 35px;top: 5px\\\" class=\\\"lensview-close-icon cancel-icon\\\"></md-icon></div><div ng-if=vm.admin_check ng-attr-style=\\\"display:{{(vm.strickCheck || vm.admin_check)?\\'none\\':\\'block\\'}}\\\" class=cancel-btn style=\\\"float:left;padding-left: 12px;position: relative;\\r\\nz-index: 1001\\\"><md-icon aria-label=\\\"Close dialog\\\" ng-click=\\\" vm.clearSwitchEmail();\\\" style=\\\"font-size: 25px; margin-left: -100px\\\" class=lensview-close-icon></md-icon></div></div></div>\");\n$templateCache.put(\"/app/shipping-details/activity-log/activity-log.html\",\"<md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>{{\\'SHIPPINGDETAILS.ACTIVITY_LOG\\' | translate}}</span></h2></div></md-toolbar><md-card-content class=card-content-light><table class=\\\"card-content-table table-sm\\\"><tbody><tr><td colspan=3>{{\\'SHIPPINGDETAILS.NO_ACTIVITY\\' | translate}}</td></tr></tbody></table></md-card-content>\");\n$templateCache.put(\"/app/shipping-details/bookmark/bookmark-already-removed-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>You have already removed this bookmark.<br>You can view your bookmarks in the <a href=#/ class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/bookmark/bookmark-discussion-toast.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>Bookmark Shipment Discussion Error: {{vm.bookmarkShipmentError}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/bookmark/bookmark-discussion-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment discussion has been bookmarked!<br>Bookmarked discussion shipments appear in the <a href=/shipment-discussions class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/bookmark/bookmark-limit-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>You have exceeded your bookmark limit!<br>You can remove bookmarks in the <a href=/ class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/bookmark/bookmark-notification-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment notification is enabled!<br>Notification of the shipment appear in the <a href=/shipment-discussions class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/bookmark/bookmark-toast.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>Bookmark Shipment Error: {{vm.bookmarkShipmentError}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/bookmark/bookmark-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment has been bookmarked!<br>Bookmarked shipments appear in the <a href=/ class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/bookmark/bookmarks-list.html\",\"<md-dialog class=\\\"md-card-light bookmarks-list\\\" aria-label=Bookmarks ng-controller=\\\"WidgetsController as widgetsCtrl\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'WIDGETS.BOOKMARKS\\' | translate}}</h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding style=\\\"min-height: 120px\\\"><div class=loadmask-light loadmask=widgetsCtrl.bookmarksLoaded ng-if=!widgetsCtrl.bookmarksLoaded style=position:absolute;top:52px;left:0;right:0;bottom:0></div><div ng-include=\\\"\\'/app/components/widgets/bookmarked-shipments-results.html\\'\\\" ng-show=widgetsCtrl.bookmarksLoaded></div><div ng-show=widgetsCtrl.bookmarksLoaded class=m-t layout=row layout-align=\\\"center center\\\"><a href=/ ng-click=vm.closeModal($event)>{{\\'ADMIN.POTENTIAL.VIEW_IN_DASHBOARD\\' | translate}}</a></div><div layout=row layout-align=\\\"center start\\\" flex=100 style=margin-top:15px ng-show=\\\"widgetsCtrl.showRemoveButton && widgetsCtrl.bookmarksCount >0\\\"><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=widgetsCtrl.showRemoveButton ng-click=widgetsCtrl.doneEditingBookmarks();vm.doneBookmark()><span translate=WIDGETS.DONE></span></md-button></div></md-dialog-content><md-dialog-actions ng-show=widgetsCtrl.bookmarksLoaded><div layout=row layout-align=\\\"end end\\\"><md-button ng-click=vm.closeModal()>{{\\'SHIPPINGDETAILS.CONTAINER.CLOSE\\' | translate}}</md-button></div></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/bookmark/chat-toast.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>Error: {{vm.chatShipmentError}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/bookmark/remove-bookmark-discussion-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment bookmarked discussion has been removed!<br>Bookmarked discussion shipments appear in the <a href=/shipment-discussions class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/bookmark/remove-bookmark-notification-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment notification is disabled!</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/bookmark/remove-bookmark-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment bookmarked has been removed!<br>Bookmarked shipments appear in the <a href=/ class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/containers/container-details.html\",\"<md-dialog class=md-card-light aria-label=\\\"Container Details\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'SHIPPINGDETAILS.CONTAINER.CONTAINER_NUM\\' | translate}} - {{history[0].contno}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding><div><h2>{{\\'SHIPPINGDETAILS.CONTAINER.CONTAINER_TYPE\\' | translate}}</h2>{{history[0].conttype}}</div><md-card><md-card-content><table class=table-striped><thead><tr><th class=td-20>{{\\'SHIPPINGDETAILS.CONTAINER.EVENT_NAME\\' | translate}}</th><th class=td-20>{{\\'SHIPPINGDETAILS.CONTAINER.EVENT_DATE\\' | translate}}</th><th class=td-20>{{\\'SHIPPINGDETAILS.CONTAINER.EVENT_TIME\\' | translate}}</th></tr></thead><tbody><tr ng-repeat=\\\"row in history | unique: \\'sno\\'\\\"><td class=td-20>{{row.eventname}}</td><td class=td-20>{{row.eventdate | date:\\'MMM d, y\\' : \\'UTC\\'}}</td><td class=td-20>{{row.eventtime}}</td></tr></tbody></table></md-card-content></md-card></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/containers/container-list.html\",\"<!-- <table class=\\\"table-striped\\\">\\r\\n <thead>\\r\\n <tr>\\r\\n <th class=\\\"td-20\\\">{{\\'SHIPPINGDETAILS.CONTAINER.CONTAINER_NUM\\' | translate}}</th>\\r\\n <th class=\\\"td-20\\\">{{\\'SHIPPINGDETAILS.CONTAINER.CONTAINER_TYPE\\' | translate}}</th>\\r\\n <th class=\\\"td-20\\\">{{\\'SHIPPINGDETAILS.CONTAINER.EVENT_NAME\\' | translate}}</th>\\r\\n <th class=\\\"td-20\\\">{{\\'SHIPPINGDETAILS.CONTAINER.EVENT_DATE\\' | translate}}</th>\\r\\n <th class=\\\"td-20\\\">{{\\'SHIPPINGDETAILS.CONTAINER.EVENT_TIME\\' | translate}}</th>\\r\\n <th class=\\\"td-20\\\">{{\\'SHIPPINGDETAILS.CONTAINER.FULL_STATUS\\' | translate}}</th>\\r\\n </tr>\\r\\n </thead>\\r\\n <tbody>\\r\\n <tr ng-repeat=\\\"row in vm.getContainers()\\\">\\r\\n <td class=\\\"td-20\\\">\\r\\n <span ng-if=\\\"vm.containerHistory[row.contno].length > 1\\\">\\r\\n <a ng-click=\\\"vm.showContainerDetails($event, row.contno,vm.fullHistroy)\\\">{{row.contno}}</a>\\r\\n </span>\\r\\n <span ng-if=\\\"vm.containerHistory[row.contno].length == 1\\\">\\r\\n {{row.contno}}\\r\\n </span>\\r\\n </td>\\r\\n <td class=\\\"td-20\\\">\\r\\n {{row.conttype}}\\r\\n </td>\\r\\n <td class=\\\"td-20\\\">\\r\\n {{row.eventname}}\\r\\n </td>\\r\\n <td class=\\\"td-20\\\">\\r\\n {{row.eventdate | date:\\'MMM d, y\\' : \\'UTC\\'}}\\r\\n </td>\\r\\n <td class=\\\"td-20\\\">\\r\\n {{row.eventtime}}\\r\\n </td>\\r\\n <td class=\\\"td-20\\\">\\r\\n {{row.fullstatus}}\\r\\n </td>\\r\\n </tr>\\r\\n <tr ng-if=\\\"vm.getContainers().length < 1\\\">\\r\\n <td colspan=\\\"5\\\">No Container Details Available</td>\\r\\n </tr>\\r\\n\\r\\n <tr ng-show=\\\"vm.fullHistroy\\\" ng-repeat=\\\"row in vm.history\\\" ng-if=\\\"$index > 0\\\" >\\r\\n\\r\\n <td class=\\\"td-20\\\">\\r\\n {{row.eventname}}\\r\\n </td>\\r\\n <td class=\\\"td-20\\\">\\r\\n {{row.eventdate | date:\\'MMM d, y\\' : \\'UTC\\'}}\\r\\n </td>\\r\\n <td class=\\\"td-20\\\">\\r\\n {{row.eventtime}}\\r\\n </td>\\r\\n <td class=\\\"td-20\\\">\\r\\n {{row.fullstatus}}\\r\\n </td>\\r\\n </tr>\\r\\n </tbody>\\r\\n</table> --><style>.th {\\r\\n padding: 1.25rem 1rem;\\r\\n text-align: left;\\r\\n background-color: #050B24;\\r\\n color: #fff;\\r\\n}\\r\\n.highlighter:nth-child(odd) {\\r\\n background-color: #E6E6E6;\\r\\n}\\r\\n .tr{\\r\\n\\r\\n border-bottom: 1px solid #000;\\r\\n}\\r\\n .td {\\r\\n padding: .75rem 1.25rem;\\r\\n text-align: left;\\r\\n\\r\\n}\\r\\n\\r\\n\\r\\n.th:first-child{\\r\\n border-top-left-radius: 4px;\\r\\n border-bottom-left-radius: 4px;\\r\\n}\\r\\n.th:last-child{\\r\\n border-top-right-radius: 4px;\\r\\n border-bottom-right-radius: 4px;\\r\\n}\\r\\n .displayNone{\\r\\n visibility: hidden;\\r\\n }\\r\\n .handCursor{\\r\\n cursor: pointer;\\r\\n padding-left: 15px;\\r\\n position: relative;\\r\\n }\\r\\n .handCursor span{\\r\\n display: inline;\\r\\n }\\r\\n .firstRow{\\r\\n padding: 0.75rem 0rem 0rem 0.5rem;\\r\\n }\\r\\n /* .handCursor i{\\r\\n padding: 2px;\\r\\n margin: 0px 4px;\\r\\n } */\\r\\n /* .handCursor .material-icons{\\r\\n font-size: 11px;\\r\\n background-color: #fff;\\r\\n color: #050b25;\\r\\n border-radius: 16px;\\r\\n padding:0px;\\r\\n font-weight: bold;\\r\\n border: 2px solid #050b25;\\r\\n } */\\r\\n .handCursor .material-icons{\\r\\n position: absolute;\\r\\n left: -10px;\\r\\n }</style><div class=table><div layout-gt-xs=\\\"row header\\\"><div class=th flex=30 flex-xs=100>{{\\'SHIPPINGDETAILS.CONTAINER.CONTAINER_NUM\\' | translate}}</div><div class=th flex=20 flex-xs=100>{{\\'SHIPPINGDETAILS.CONTAINER.CONTAINER_TYPE\\' | translate}}</div><div class=th flex=20 flex-xs=100>{{\\'SHIPPINGDETAILS.CONTAINER.EVENT_NAME\\' | translate}}</div><div class=th flex=20 flex-xs=100>{{\\'SHIPPINGDETAILS.CONTAINER.EVENT_DATE\\' | translate}}</div><div class=th flex=20 flex-xs=100>{{\\'SHIPPINGDETAILS.CONTAINER.EVENT_TIME\\' | translate}}</div><div class=th flex=20 flex-xs=100>{{\\'SHIPPINGDETAILS.CONTAINER.FULL_STATUS\\' | translate}}</div><div class=th flex=20 flex-xs=100>{{\\'SHIPPINGDETAILS.CONTAINER.LOCATION_CITY\\' | translate}}</div><div class=th flex=20 flex-xs=100>{{\\'SHIPPINGDETAILS.CONTAINER.LOCATION_COUNTRY\\' | translate}}</div></div><div layout-gt-xs=column class=highlighter ng-repeat=\\\"(key,value) in vm.containerDetails\\\"><div layout-gt-xs=row ng-repeat=\\\"(k,valz) in value\\\" ng-if=\\\"$index == 0 || value[0].show\\\"><div flex=30 flex-xs=100 class=\\\"td firstRow\\\" ng-class=\\\"{\\'displayNone\\': $index != 0}\\\"><!-- <span class=\\\"expandIcon\\\">\\r\\n\\r\\n\\r\\n </span> --> <span ng-if=\\\"vm.containerHistory[valz.contno].length > 1\\\"><a class=handCursor ng-click=vm.showAllConaintersData(key,valz) style=\\\"color: #5e6163\\\"><i class=material-icons ng-hide=\\\"valz.expandBtn || value[0].expandBtn\\\">keyboard_arrow_down </i><i class=material-icons ng-hide=\\\"!valz.expandBtn || !value[0].expandBtn\\\">keyboard_arrow_up </i>{{valz.contno}} </a></span><span ng-if=\\\"vm.containerHistory[valz.contno].length == 1\\\">{{valz.contno}}</span></div><div flex=20 flex-xs=100 class=td ng-class=\\\"{\\'displayNone\\': $index != 0}\\\">{{valz.conttype}}</div><div flex=20 flex-xs=100 class=td>{{valz.eventname}}</div><div flex=20 flex-xs=100 class=td>{{valz.eventdate | date:\\'MMM d, y\\' : \\'UTC\\'}}</div><div flex=20 flex-xs=100 class=td>{{valz.eventtime}}</div><div flex=20 flex-xs=100 class=td>{{valz.fullstatus}}</div><div flex=20 flex-xs=100 class=td>{{valz.locationname}}</div><div flex=20 flex-xs=100 class=td>{{valz.interimportctry}}</div></div></div><div layout-gt-xs=row ng-if=\\\"vm.getContainers().length < 1\\\"><div flex=20 flex-xs=100 class=td>No Container Details Available</div></div></div>\");\n$templateCache.put(\"/app/shipping-details/discussion/file_size_error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span><p>File size is limited to 5mb.</p><p>Allowed types: jpg, jpeg, gif, png, pdf, docs, dox, csv, xlsx, txt, xls</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/discussion/index.html\",\"<style type=text/css>.attachment-ul{\\r\\n margin: 0;padding: 0;\\r\\n }\\r\\n .attachment-icon{\\r\\n color: #324c7e;top: 7px;position: relative;\\r\\n }\\r\\n .attachment-text{\\r\\n cursor: pointer;color: #494949;font-size: 15px;margin: 0 !important;\\r\\n }\\r\\n .tooltip {\\r\\n position: relative;\\r\\n display: inline-block;\\r\\n }\\r\\n\\r\\n .tooltip .tooltiptext {\\r\\n visibility: hidden;\\r\\n width: 120px;\\r\\n background-color: black;\\r\\n color: #fff;\\r\\n text-align: center;\\r\\n border-radius: 6px;\\r\\n padding: 10px 0;\\r\\n position: absolute;\\r\\n z-index: 1;\\r\\n top: 110%;\\r\\n left: 50%;\\r\\n margin-left: -60px;\\r\\n }\\r\\n\\r\\n .tooltip .tooltiptext::after {\\r\\n content: \\\"\\\";\\r\\n position: absolute;\\r\\n bottom: 100%;\\r\\n left: 50%;\\r\\n margin-left: -5px;\\r\\n border-width: 5px;\\r\\n border-style: solid;\\r\\n border-color: transparent transparent black transparent;\\r\\n }\\r\\n\\r\\n .tooltip:hover .tooltiptext {\\r\\n visibility: visible;\\r\\n }\\r\\n\\r\\n .btn-color-hide{\\r\\n background-color: #E6E6E6 !important;\\r\\n }\\r\\n .btn-color-show{\\r\\n background-color: #30c267 !important;\\r\\n }</style><md-toolbar ng-click=\\\"vm.expandReference = !vm.expandReference\\\" ng-attr-class=\\\"{{(vm.expandReference)?\\'active\\':\\'\\'}}\\\"><div class=md-toolbar-tools ng-if=vm.searchDiscussionNew><section style=\\\"width: 100%\\\" class=chat_input layout=row layout-align=\\\"start center\\\"><input type=text ng-model=vm.findText class=search-text-box autocomplete=off autofocus><md-icon ng-click=vm.cancelFindData(); aria-label=options class=image_cancel_icon></md-icon></section></div><div class=md-toolbar-tools ng-if=vm.searchDiscussionOld layout=row layout-align=\\\"space-between center\\\"><h2><!--<md-icon\\r\\n style=\\\"font-family: \\'discussion-toolbar\\' !important;color:#192e5a\\\" >\\r\\n \\r\\n </md-icon>--><md-icon style=\\\"margin-right: 5px;margin-left: 10px;color:#192e5a\\\"><i class=material-icons style=\\\"margin-top:4px;font-size: 2.2rem\\\">chat</i></md-icon><span id=font-range translate=\\\"SHIPMENT DISCUSSION\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\" layout=row layout-align=\\\"space center\\\"><div ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=tooltip><md-button ng-click=vm.sendNotification() class=md-icon-button><md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarkedNotification}\\\" style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Notifications</span></div><div class=tooltip><md-button ng-click=vm.findAttachmentComments() class=md-icon-button><md-icon ng-class=\\\"{\\'text-success\\': vm.isAttachmentsNotification}\\\" style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize; font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Attachments</span></div><div class=tooltip><md-button ng-click=vm.findData(vm.findText) style=\\\"margin-right: 10px\\\" class=md-icon-button><md-icon style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Search</span></div><md-menu-content hide></md-menu-content></md-menu></div></md-toolbar><md-card-content class=discussion_layout><div ng-attr-class=\\\"shipment_status {{(vm.data.isbooked)?\\'booked\\':((vm.data.isdelivered == \\'true\\')?\\'delivered\\':\\'undelivered\\')}} \\\" layout=column layout-align=\\\"space-around start\\\" layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\"><div class=status><!--<md-icon class=\\\"icon\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\" style=\\\"font-family:\\'discussion-deliverd\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=icon ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\"></md-icon><!--<md-icon class=\\\"icon\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=\\\"font-family:\\'discussion-in-transit\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=\\\"icon sidebar-in-transit\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=font-size:1.4rem></md-icon><!--<md-icon class=\\\"icon\\\" ng-if=\\\"vm.data.isbooked\\\" style=\\\"font-family:\\'discussion-booked\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=icon ng-if=vm.data.isbooked></md-icon><span class=text ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\" style=font-size:1rem>SHIPMENT DELIVERED</span> <span class=text ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=font-size:1rem>SHIPMENT IN-TRANSIT</span> <span class=text ng-if=vm.data.isbooked style=font-size:1rem>BOOKED</span></div><div class=desc><span ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\">Limited shipment requests may be made at this time.</span> <span ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\">No further shipment requests may be made at this time.</span> <span ng-if=vm.data.isbooked>Shipment requests may be made at this time.</span></div></div><section class=\\\"message_body remove-padding-xs\\\" scroll-to-bottom=vm.discussion_chat style=\\\"max-height: 500px;overflow-y: scroll\\\"><div ng-repeat=\\\"(key,chat_msg) in vm.discussion_chat\\\"><main style=margin-top:20px><div class=date_time_div><!-- {{vm.getSuffixDate(key)}} --> <span class=content>{{key | date: \\'EEEE MMM dd\\'}}</span></div></main><div ng-repeat=\\\"message in chat_msg\\\"><!-- MAIN COMMENT --><article class=\\\"messages chat_msgs msg_section msg_section{{message.id}}\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == message.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};width:100%;\\\" layout=row layout-align=\\\"start stretch\\\"><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == message.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=msg_details><div class=author layout=column layout-gt-xs=row><span class=name>{{message.user_name | capitalize}}</span> <span class=\\\"company remove-marginLeft-xs\\\">{{message.user_email}}</span></div><div class=text_messages><p ng-bind-html=\\\"highlight(message.comment_text | userTagHighlight: vm.company_contacts)\\\"></p><p><ul class=attachment-ul type=none><li ng-repeat=\\\"file in message.attachments\\\"><p class=attachment-text></p><p><a style=\\\"color: #494949 !important\\\" target=_blank download={{vm.downloadlinkv2}}{{file.url}} href={{vm.downloadlinkv2}}{{file.url}}><img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'doc\\' || file.url.split(\\'.\\').pop() == \\'docx\\'\\\" src=/assets/images/icons/word-doc-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'pdf\\'\\\" src=/assets/images/icons/pdf-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'png\\'\\\" src=/assets/images/icons/png-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'jpg\\' || file.url.split(\\'.\\').pop() == \\'jpeg\\'\\\" src=/assets/images/icons/jpg-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'xlsx\\' || file.url.split(\\'.\\').pop() == \\'xls\\'\\\" src=/assets/images/icons/excel-xls-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'txt\\'\\\" src=/assets/images/icons/txt-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'csv\\'\\\" src=/assets/images/icons/csv-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <i style=\\\"float:left;margin:0 10px 0 0\\\" ng-if=\\\"file.url.split(\\'.\\').pop() == \\'gif\\'\\\" class=\\\"material-icons attachment-icon\\\"></i></a></p><div style=\\\"display:inline-block;vertical-align: middle;margin-top: 5px\\\"><a style=\\\"color: #494949 !important\\\" target=_blank download={{vm.downloadlinkv2}}{{file.url}} href={{vm.downloadlinkv2}}{{file.url}}>{{file.originalName}}</a></div></li></ul></p><p></p><p></p></div></section><section ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=reply_btn_div layout=row layout-align=\\\"center start\\\" ng-click=\\\"vm.showReplyTextBox(message.id, message.user_id)\\\"><!--<i class=\\\"material-icons\\\"\\r\\n style=\\\"font-family: \\'discussion-reply\\' !important; font-size: 16px; margin-top: 3px; margin-right: 5px; \\\">\\r\\n \\r\\n </i>--> <i class=material-icons style=\\\"vertical-align: middle\\\">reply</i> <span class=reply_txt>Reply</span></section><aside class=time_div hide-xs><span class=time_txt>{{message.created_at | date: \\'hh:mm a\\'}}</span></aside></article><!-- USER LIST DROPDOWN AND REPLY TEXT --><article class=\\\"hide replyTextBoxDiv{{message.id}} replyTextBoxDiv chat_input chatSubInput chatSubInput{{message.id}}\\\" layout=row layout-align=\\\"start center\\\" ng-click=$event.stopPropagation() ng-if=\\\"message.id == replyId\\\"><!-- USER LIST DROPDOWN --><section class=\\\"userLists hide\\\" id=userList><!-- | filter:userFilter --><article ng-attr-style=\\\"margin-top:{{($index == 0)?\\'10px\\':\\'0px\\'}}\\\" ng-repeat=\\\"x in vm.company_contacts | orderBy : \\'full_name\\'\\\" class=active ng-class=\\\"{\\'active-highlight\\': $index == focusIndex , \\'userList{{$index}}\\':$index == $index }\\\" ng-click=userSelect($event,$index,x.full_name,message.id,x.email);>{{ x.full_name }} {{\\'[\\' + x.email + \\']\\' }}</article></section><!-- COMMENT TEXT BOX --><!--<input type=\\\"text\\\" class=\\\"chat_input_text chat_input_text{{message.id}}\\\" autocomplete=\\\"off\\\" ng-focus=\\\"checkTagWord(message.id,$event)\\\" ng-keyup=\\\"checkTagWord(message.id,$event)\\\" maxlength=\\\"2200\\\" />--><div id={{message.id}} class=\\\"chat_input_text chat_input_text{{message.id}}\\\" maxlength=2200 autocomplete=off ng-keyup=checkTagWord($event,message.id) ng-focus=checkTagWord($event,message.id) contenteditable=true ng-click=\\\"setManualCrusorPoint($event,\\'chat_input_text{{message.id}}\\')\\\" onkeypress=\\\"return (this.innerText.length <= 2200)\\\"></div><md-icon aria-label=options class=image_upload_icon><label for=file{{message.id}} style=\\\"cursor: pointer\\\"><i class=material-icons style=\\\"font-size:26px;color: #494949\\\"></i></label><input style=\\\"visibility: hidden;width: 0\\\" type=file ng-modal=vm.files{{message.id}} id=file{{message.id}} msg_id={{message.id}} name=files multiple onchange=\\\"angular.element(this).scope().fileNameChanged(this);this.value=null;return false\\\"></md-icon><md-icon ng-class=\\\"{\\'disabledbutton\\' : vm.replyTagPopup == true}\\\" aria-label=options class=select_dropdown_icon ng-click=openUserTagsDiv($event,message.id)><i class=material-icons style=\\\"color: #494949\\\">alternate_email</i></md-icon><button class=chat_submit id=replyBtn type=button layout=row layout-align=\\\"center center\\\" ng-click=vm.chat_text_submit(message.id) ng-disabled=vm.submitBtnReply ng-class=\\\"(vm.submitBtnReply == true) ? \\'btn-color-hide\\' : \\'btn-color-show\\'\\\"><md-icon aria-label=options style=\\\"color: #ffffff;margin-top:-2px\\\"></md-icon></button></article><!-- File Attachment --><ul ng-if=\\\"(message_id == message.id)\\\"><li style=\\\"color: #000\\\" class=savedFile{{$index}} ng-repeat=\\\"file in files\\\">{{file.name}} - {{vm.file_size_array[file.name].size}} <span title=remove ng-click=vm.removeFile(file.name,$index,message.id) style=\\\"color: red;cursor: pointer;margin-left: 20px\\\"><i style=\\\"color: red;position: relative;top: 10px\\\" class=material-icons></i></span></li></ul><!-- Replies Section --><main ng-if=\\\"message.replies.length > 1\\\" style=margin-top:20px><div class=date_time_div><span style=\\\"cursor: pointer;width: 140px\\\" class=content><span class=\\\"expand_less{{message.id}} hide\\\" ng-click=\\\"vm.reply_comment_display(message.id,\\'less\\',key,$index)\\\"><i style=\\\"vertical-align: middle\\\" class=material-icons>expand_less</i>   {{message.replies.length}} Replies </span><span class=expand_more{{message.id}} ng-click=\\\"vm.reply_comment_display(message.id,\\'more\\',key,$index)\\\"><i style=\\\"vertical-align: middle\\\" class=material-icons>expand_more</i>   {{message.replies.length}} Replies</span></span></div></main><article ng-if=\\\"message.replies.length > 1\\\" class=\\\"messages hide chat_msgs expand_div expand_div{{message.id}}\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};margin-left:{{(1)*45}}px;width: calc(100% - ((1)*45)px);min-height: 40px !important;\\\" layout=row layout-align=\\\"start stretch\\\"><aside class=arrow_left layout=row layout-align=\\\"center start\\\"><i class=material-icons>subdirectory_arrow_right</i></aside><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=msg_details layout=column layout-align=\\\"space-around start\\\" layout-gt-xs=row layout-align-gt-xs=\\\"space-between center\\\" style=\\\"padding: 15px 30px\\\"><div class=text_messages><p style=\\\"margin: 0\\\">Expand to view <span style=\\\"color:#000000;font-size: 15px;font-weight: bold\\\">{{message.replies.length}} Replies to {{message.user_name}}</span></p></div><div class=text_messages><p style=\\\"margin: 0;color: #324c7e;cursor: pointer\\\" ng-click=\\\"vm.reply_comment_display(message.id, \\'less\\',key,$index)\\\">See most recent replies   <i style=\\\"color: #324c7e;vertical-align: middle\\\" class=material-icons>arrow_downward</i></p></div></section><aside class=time_div hide-xs><span class=time_txt>{{message.created_at | date: \\'hh:mm a\\'}}</span></aside></article><!-- REPLY COMMENTS --><!-- ng-class=\\\"message.replies.length > 5 ? \\'hide\\' : \\'\\'\\\" --><article ng-if=message.replies.length class=\\\"messages chat_msgs reply_msg_section{{reply.id}} sub_msg_details sub_msg_details{{message.id}}\\\" ng-repeat=\\\"reply in message.replies\\\" ng-class=\\\"reply.attachments.length > 0 ? \\'attachment-exist\\' : \\'\\'\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};margin-left:{{(1)*45}}px;width: calc(100% - ((1)*45)px);\\\" layout=row layout-align=\\\"start stretch\\\"><aside class=arrow_left layout=row layout-align=\\\"center start\\\"><i class=material-icons>subdirectory_arrow_right</i></aside><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=\\\"msg_details remove-padding-right-xs\\\"><div class=author layout=column layout-gt-xs=row><span class=name>{{reply.user_name | capitalize}}</span> <span class=\\\"company remove-marginLeft-xs\\\">{{reply.user_email}}</span></div><div class=text_messages><p ng-bind-html=\\\"highlight(reply.comment_text | userTagHighlight: vm.company_contacts)\\\"></p><p><ul class=attachment-ul type=none><li ng-repeat=\\\"file in reply.attachments\\\"><p class=attachment-text></p><p><a style=\\\"color: #494949 !important\\\" target=_blank download={{vm.downloadlinkv2}}{{file.url}} href={{vm.downloadlinkv2}}{{file.url}}><img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'doc\\' || file.url.split(\\'.\\').pop() == \\'docx\\'\\\" src=/assets/images/icons/word-doc-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'pdf\\'\\\" src=/assets/images/icons/pdf-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'png\\'\\\" src=/assets/images/icons/png-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'jpg\\' || file.url.split(\\'.\\').pop() == \\'jpeg\\'\\\" src=/assets/images/icons/jpg-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'xlsx\\' || file.url.split(\\'.\\').pop() == \\'xls\\'\\\" src=/assets/images/icons/excel-xls-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'txt\\'\\\" src=/assets/images/icons/txt-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <img ng-if=\\\"file.url.split(\\'.\\').pop() == \\'csv\\'\\\" src=/assets/images/icons/csv-icon.png alt=\\\"Headshot photo\\\" style=\\\"float:left;margin:0 10px 0 0\\\"> <i style=\\\"float:left;margin:0 10px 0 0\\\" ng-if=\\\"file.url.split(\\'.\\').pop() == \\'gif\\'\\\" class=\\\"material-icons attachment-icon\\\"></i></a></p><div style=\\\"display:inline-block;vertical-align: middle;margin-top: 5px\\\"><a style=\\\"color: #494949 !important\\\" target=_blank download={{vm.downloadlinkv2}}{{file.url}} href={{vm.downloadlinkv2}}{{file.url}}>{{file.originalName}}</a></div></li></ul></p><p></p><p></p></div></section><!--<section class=\\\"reply_btn_div\\\" layout=\\\"row\\\" layout-align=\\\"center start\\\" >\\r\\n\\r\\n <i class=\\\"material-icons\\\">reply</i>\\r\\n <span class=\\\"reply_txt\\\">Reply</span>\\r\\n\\r\\n </section>--><aside class=time_div hide-xs><span class=time_txt>{{reply.created_at | date: \\'hh:mm a\\'}}</span></aside></article></div></div></section><section ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=\\\"chat_input chatMainInput\\\" layout=row layout-align=\\\"start center\\\" ng-click=$event.stopPropagation()><section class=\\\"userLists hide\\\" id=userList><!-- | filter:userFilter --><article ng-attr-style=\\\"margin-top:{{($index == 0)?\\'10px\\':\\'0px\\'}};\\\" ng-if=vm.company_contacts ng-repeat=\\\"x in vm.company_contacts | orderBy : \\'full_name\\'\\\" class=active ng-class=\\\"{\\'active-highlight\\': $index == focusIndex , \\'userList{{$index}}\\':$index == $index }\\\" ng-click=\\\"userSelect($event,$index,x.full_name,\\'\\',x.email);document.getElementById(\\'chat_input_main_text\\').focus();\\\">{{ x.full_name }} {{\\'[ \\' + x.email + \\' ]\\' }}</article></section><!--<input type=\\\"text\\\" class=\\\"chat_input_text\\\" ng-model=\\\"vm.discussion_comment_text\\\" ng-focus=\\\"checkTagWord()\\\" ng-keyup=\\\"checkTagWord()\\\" autocomplete=\\\"off\\\" maxlength=\\\"2200\\\" />--><div class=\\\"chat_input_text chat_input_main_text\\\" id=chat_input_main_text maxlength=2200 autocomplete=off ng-model=vm.discussion_comment_text ng-keyup=checkTagWord($event) ng-focus=checkTagWord($event) contenteditable=true message_id=\\\"\\\" ng-click=\\\"setManualCrusorPoint($event,\\'chat_input_main_text\\')\\\" ng-keypress=\\\"return (this.innerText.length <= 2200)\\\"></div><md-icon aria-label=options class=image_upload_icon><label for=fileOne style=\\\"cursor: pointer\\\"><i class=material-icons style=\\\"font-size:26px;color: #494949\\\"></i></label><input style=\\\"visibility: hidden;width: 0\\\" type=file ng-modal=vm.files msg_id=\\\"\\\" id=fileOne name=files multiple onchange=\\\"angular.element(this).scope().fileNameChanged(this);this.value=null;return false\\\"></md-icon><md-icon ng-class=\\\"{\\'disabledbutton\\' : vm.commentTagPopup == true}\\\" aria-label=options class=select_dropdown_icon ng-click=openUserTagsDiv($event);><i class=material-icons style=\\\"color: #494949\\\">alternate_email</i></md-icon><button class=chat_submit id=commentBtn type=button layout=row layout-align=\\\"center center\\\" ng-click=vm.chat_text_submit() ng-disabled=vm.submitBtn ng-class=\\\"(vm.submitBtn == true) ? \\'btn-color-hide\\' : \\'btn-color-show\\'\\\"><md-icon aria-label=options style=\\\"color: #ffffff;margin-top:-2px\\\"></md-icon></button></section><ul ng-if=\\\"(message_id == \\'none\\')\\\"><li style=\\\"color: #000\\\" class=savedFile{{$index}} ng-repeat=\\\"file in files\\\">{{file.name}} - {{vm.file_size_array[file.name].size}} <span title=remove ng-click=vm.removeFile(file.name,$index) style=\\\"color: red;cursor: pointer;margin-left: 20px\\\"><i style=\\\"color: red;position: relative;top: 10px\\\" class=material-icons></i></span></li></ul></md-card-content>\");\n$templateCache.put(\"/app/shipping-details/documents/documents-modal.html\",\"<md-dialog class=\\\"md-card-light documents-modal\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon>{{\\'SHIPPINGDETAILS.DOCUMENTS\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding><div ng-repeat=\\\"row in vm.data.shipment_images_display\\\"><div class=documents-table layout=row layout-align=\\\"end center\\\"><span flex=33>{{row.documenttype}}</span> <span flex=auto class=file-path-container><a ng-click=\\\"vm.downloadDocument(row.documentpath, row.documentname)\\\" style=\\\"cursor: pointer\\\" class=long-file-name>{{row.documentname}}</a></span> <span flex=nogrow><a ng-click=\\\"vm.downloadDocument(row.documentpath, row.documentname)\\\" style=\\\"cursor: pointer\\\"><md-icon class=text-dark><md-icon></md-icon></md-icon></a></span></div></div><div ng-if=\\\"vm.data.shipment_images_display.length == 0\\\"><span translate=SHIPPINGDETAILS.NO_DOCUMENTS></span></div></md-dialog-content><!--<md-dialog-actions layout=\\\"row\\\" layout-align=\\\"end end\\\">\\r\\n <md-button ng-click=\\\"vm.closeModal()\\\">{{\\'SHIPPINGDETAILS.CONTAINER.CLOSE\\' | translate}}</md-buttom>\\r\\n\t</md-dialog-actions>--></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/documents/documents.html\",\"<md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>{{\\'SHIPPINGDETAILS.DOCUMENTS\\' | translate}}</span></h2></div></md-toolbar><md-card-content><div class=table-scroll><table class=\\\"card-content-table table-sm\\\"><tbody><tr ng-repeat=\\\"row in vm.data.shipment_images_display\\\" ng-if=\\\"$index < 6\\\"><td class=td-7-5>{{row.documenttype}}</td><td class=td-25><a ng-click=\\\"vm.downloadDocument(row.documentpath, row.documentname)\\\" style=\\\"cursor: pointer\\\">{{row.documentname}}</a></td><!-- Document Download link, TODO get correct URL --><td class=\\\"col-icon td-7-5\\\"><a ng-click=\\\"vm.downloadDocument(row.documentpath, row.documentname)\\\" style=\\\"cursor: pointer\\\"><md-icon></md-icon></a></td></tr><tr ng-if=\\\"vm.getDocumentsCount(vm.data.shipment_images_display) < 1\\\"><td colspan=3>{{\\'SHIPPINGDETAILS.NO_DOCUMENTS\\' | translate}}</td></tr></tbody></table></div><div layout=row layout-align=\\\"center center\\\" ng-if=\\\"vm.getDocumentsCount(vm.data.shipment_images_display) > 5\\\"><md-button ng-click=\\\"vm.showModal(ev, \\'documents/documents-modal\\')\\\">{{\\'SHIPPINGDETAILS.VIEW_MORE\\' | translate}}</md-button></div></md-card-content>\");\n$templateCache.put(\"/app/shipping-details/invoices/invoice-line-items.html\",\"<div class=table-scroll><table class=table-striped><thead><tr><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.AMOUNT\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.CHARGECODE\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.CHARGEDESCRIPTION\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.CURRENCY\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.QUANTITY\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.RATE\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.TAX\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.REMARKS\\' | translate}}</th></tr></thead><tbody><tr ng-repeat=\\\"line_item in invoice.invoice_details\\\"><td class=td-15>{{line_item.amount}}</td><td class=td-15>{{line_item.chargecode}}</td><td class=td-15>{{line_item.chargedescription}}</td><td class=td-15>{{line_item.currency}}</td><td class=td-15>{{line_item.quantity}}</td><td class=td-15>{{line_item.rate}}</td><td class=td-15>{{line_item.tax}}</td><td class=td-15>{{line_item.remarks}}</td></tr></tbody></table></div>\");\n$templateCache.put(\"/app/shipping-details/invoices/invoice-list.html\",\"<md-card><md-card-content style=background:white><h2>{{\\'SHIPPINGDETAILS.INVOICE.OVERVIEW\\' | translate}}</h2><div layout-gt-xs=row><div flex=33 flex-xs=100><strong>{{\\'SHIPPINGDETAILS.CUSTOMER_NAME\\' | translate | uppercase}}</strong><p>{{vm.data.customername}}</p><strong>{{\\'SHIPPINGDETAILS.INVOICE.CUSTOMER_NUMBER\\' | translate | uppercase}}</strong><p>{{vm.data.customerpartyid}}</p></div><div flex=33 flex-xs=100><strong>{{\\'SHIPPINGDETAILS.INVOICE.ADDRESS\\' | translate | uppercase}}</strong><p><span ng-repeat=\\\"address_line in vm.getConsigneeAddress(vm.data.shipment_invoices_without_credit_note[0])\\\" ng-if=address_line>{{address_line}}<br></span></p></div><div flex=33 flex-xs=100><strong>{{\\'SHIPPINGDETAILS.INVOICE.TOTAL_AMOUNT\\' | translate | uppercase}}</strong><!--<p>{{vm.data.shipment_invoices_without_credit_note[0].totalinvoiceamount | number:2 }} {{ vm.data.shipment_invoices_without_credit_note[0].currencycode }} </p>--><p>{{vm.data.total_amount | number:2 }} <span ng-if=vm.data.total_amount>USD</span></p><div><p></p><strong>{{\\'SHIPPINGDETAILS.INVOICE.DATE\\' | translate | uppercase}}</strong><p>{{vm.data.shipment_invoices_without_credit_note[0].invoicedate | date : \\'dd-MMM-yyyy\\'}}</p></div><strong>{{\\'SHIPPINGDETAILS.INVOICE.TOTAL_GROSS_WEIGHT\\' | translate | uppercase}}</strong><p>{{vm.data.totalgrossweight}}</p></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/invoices/invoice.html\",\"<md-dialog class=md-card-light aria-label=\\\"Invoice Details\\\" style=\\\"color: rgba(255,255,255,0.87)\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'SHIPPINGDETAILS.INVOICE_NUM\\' | translate}}: {{invoice.invoicenumber}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding><div layout=row><div flex=33><strong>{{\\'SHIPPINGDETAILS.SHIPPER\\' | translate | uppercase}}</strong><br><p>{{invoice.shippername}}</p><br><strong>{{\\'SHIPPINGDETAILS.SHIPPER_NUMBER\\' | translate | uppercase}}</strong><br><p>{{invoice.shipperpartyid}}</p></div><div flex=34><strong>{{\\'SHIPPINGDETAILS.INVOICE.ADDRESS\\' | translate | uppercase}}</strong> <span ng-repeat=\\\"address_line in address\\\"><p ng-if=address_line>{{address_line}}</p></span></div><div flex=33><strong>{{\\'SHIPPINGDETAILS.INVOICE.TOTAL_AMOUNT\\' | translate | uppercase}}</strong><p>{{invoice.totalinvoiceamount | number:2}} {{invoice.currencycode}}</p><div><p></p><strong>{{\\'SHIPPINGDETAILS.INVOICE.DATE\\' | translate | uppercase}}</strong><p>{{invoice.invoicedate | date : \\'dd-MMM-yyyy\\'}}</p></div><strong>{{\\'SHIPPINGDETAILS.INVOICE.GROSS_WEIGHT\\' | translate | uppercase}}</strong><p>{{invoice.grossweight}}</p></div></div><div ng-include=\\\"\\'/app/shipping-details/invoices/invoice-line-items.html\\'\\\"></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/marks-numbers/marks-numbers.html\",\"<md-toolbar><div class=md-toolbar-tools><h2><span>{{\\'SHIPPINGDETAILS.MARKS_NUMBERS\\' | translate}}</span></h2></div></md-toolbar><md-card-content><input value=\\\"Marks and Numbers go here\\\"></md-card-content>\");\n$templateCache.put(\"/app/shipping-details/milestones/milestones.html\",\"<div class=table-scroll><table class=\\\"card-table table-static\\\"><thead ng-if=\\\"vm.data.shipment_milestones_view.length > 0\\\"><tr><th class=col-icon>{{\\'SHIPPINGDETAILS.TYPE\\' | translate}}</th><th class=td-20>{{\\'SHIPPINGDETAILS.MILESTONE\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.ESTIMATED\\' | translate}} {{\\'SHIPPINGDETAILS.DATE\\' | translate}}</th><th class=td-10>{{\\'SHIPPINGDETAILS.ESTIMATED\\' | translate}} {{\\'SHIPPINGDETAILS.TIME\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.ACTUAL\\' | translate}} {{\\'SHIPPINGDETAILS.DATE\\' | translate}}</th><th class=td-10>{{\\'SHIPPINGDETAILS.ACTUAL\\' | translate}} {{\\'SHIPPINGDETAILS.TIME\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.REASON_DESC\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.REMARKS\\' | translate}}</th></tr></thead><tbody><tr class=md-whiteframe-1dp ng-repeat=\\\"row in vm.data.shipment_milestones_view\\\"><td class=col-icon><md-icon ng-style=\\\"row.reasoncode ? {\\'color\\': \\'red\\'} : \\'\\'\\\" ng-class=\\\"{\\'text-success\\': row.actualdate.length > 0}\\\"></md-icon></td><td ng-style=\\\"row.reasoncode ? {\\'color\\': \\'red\\'} : \\'\\'\\\" class=td-20>{{row.milestonedescription}}</td><td class=td-15>{{vm.convertDate(row.estimateddate) | date:\\'dd-MMM-yyyy\\'}}</td><td class=td-10>{{vm.convertTime(row.estimatedtime)}}</td><td class=td-15>{{vm.convertDate(row.actualdate) | date:\\'dd-MMM-yyyy\\'}}</td><td class=td-10>{{vm.convertTime(row.actualtime)}}</td><td class=td-15>{{vm.getReasonDescription(row)}}</td><td class=td-15-flex>{{row.remark}}</td></tr><tr ng-if=\\\"vm.data.shipment_milestones_view.length < 1\\\"><td colspan=8>{{\\'SHIPPINGDETAILS.NO_MILESTONES\\' | translate}}</td></tr></tbody></table></div>\");\n$templateCache.put(\"/app/shipping-details/potential-exceptions/potential-exception-dialog-item.html\",\"<div layout-gt-xs=row layout-align-gt-xs=\\\"start center\\\" class=list-row ng-click=\\\"\\\"><div flex-gt-xs=40 class=m-r><div class=m-b-sm layout=row layout-align=\\\"start canter\\\"><md-icon class=\\\"icon-reset text-warning m-r-xs\\\" style=\\\"font-size: 1.5em\\\"></md-icon><div>{{exception.title}}</div></div><div class=m-b-sm layout=row layout-align=\\\"start canter\\\"><md-icon class=\\\"icon-reset text-accent m-r-xs\\\" style=\\\"font-size: 1.5em; margin-left: 0\\\"></md-icon><div>{{exception.start_date | date : \\\"MM/dd/yyyy\\\"}} - {{exception.end_date | date : \\\"MM/dd/yyyy\\\"}}</div></div></div><div flex-gt-xs=60><span class=\\\"outline-group outline-group-lg outline-group-primary\\\" layout=row><span class=\\\"item item-bg text-center\\\" flex=35><span ng-if=exception.air><md-icon aria-label=air-shipment ng-if=\\\"!exception.sea && !exception.land\\\"></md-icon><h5 class=\\\"m-t-0 m-b-0\\\">AIR TRAVEL</h5></span><span ng-if=exception.sea><md-icon aria-label=sea-shipment ng-if=\\\"!exception.air && !exception.land\\\"></md-icon><h5 class=\\\"m-t-0 m-b-0\\\">SEA TRAVEL</h5></span><span ng-if=exception.land><md-icon aria-label=ground-shipment ng-if=\\\"!exception.air && !exception.sea\\\"></md-icon><h5 class=\\\"m-t-0 m-b-0\\\">LAND TRAVEL</h5></span></span><span class=\\\"item item-bg\\\" flex>{{exception.city}}<br><md-icon class=icon-reset style=\\\"{{exception.port_usage != \\'Departure\\' ? \\'transform: rotate(135deg);\\' : \\'\\'}}\\\"></md-icon>{{exception.port_usage}}</span></span></div></div>\");\n$templateCache.put(\"/app/shipping-details/potential-exceptions/potential-exception-item.html\",\"<div layout-gt-xs=row layout-xs=column class=exceptions-row ng-click=\\\"sdpeCtrl.showList = true; vm.showExceptionsModal(ev, true)\\\"><div flex-gt-xs=40 class=m-r><div class=m-b-sm layout=row layout-align=\\\"start canter\\\"><span><md-icon class=\\\"icon-reset text-warning m-r-xs\\\" style=\\\"font-size: 1.5em\\\"></md-icon></span><div>{{exception.title}}</div></div><div class=m-b-sm layout=row layout-align=\\\"start canter\\\"><md-icon class=\\\"icon-reset text-accent m-r-xs\\\" style=\\\"font-size: 1.5em; margin-left: 0\\\"></md-icon><div>{{exception.start_date | date : \\\"MM/dd/yyyy\\\"}} - {{exception.end_date | date : \\\"MM/dd/yyyy\\\"}}</div></div></div><div flex-gt-xs=60><span class=\\\"outline-group outline-group-lg outline-group-primary m-b\\\" layout=row flexfill><span class=\\\"item item-bg text-center\\\" flex=35><span ng-if=exception.air><md-icon aria-label=air-shipment ng-if=\\\"!exception.sea && !exception.land\\\"></md-icon><h5 class=\\\"m-t-0 m-b-0\\\">AIR TRAVEL</h5></span><span ng-if=exception.sea><md-icon aria-label=sea-shipment ng-if=\\\"!exception.air && !exception.land\\\"></md-icon><h5 class=\\\"m-t-0 m-b-0\\\">SEA TRAVEL</h5></span><span ng-if=exception.land><md-icon aria-label=ground-shipment ng-if=\\\"!exception.air && !exception.sea\\\"></md-icon><h5 class=\\\"m-t-0 m-b-0\\\">LAND TRAVEL</h5></span></span><span class=\\\"item item-bg\\\" flex>{{exception.city}}<br><md-icon class=icon-reset style=\\\"{{exception.port_usage != \\'Departure\\' ? \\'transform: rotate(135deg);\\' : \\'\\'}}\\\"></md-icon>{{exception.port_usage}}</span></span></div></div>\");\n$templateCache.put(\"/app/shipping-details/potential-exceptions/potential-exceptions.html\",\"<md-toolbar class=md-warning><div class=md-toolbar-tools><h2><md-icon></md-icon><span>{{\\'SHIPPINGDETAILS.POTENTIAL_EXCEPTIONS\\' | translate}}</span></h2></div></md-toolbar><md-card-content ng-controller=\\\"ShipmentPotentialExceptionsController as sdpeCtrl\\\"><div ng-repeat=\\\"exception in (vm.data.potential_exceptions | limitTo : 3)\\\"><div ng-include=\\\"\\'/app/shipping-details/potential-exceptions/potential-exception-item.html\\'\\\"></div></div><p hide-gt-xs ng-if=\\\"vm.data.potential_exceptions.length < 1\\\">{{\\'SHIPPINGDETAILS.NO_POTENTIAL_EXCEPTIONS\\' | translate}}</p><h3 class=\\\"md-headline text-center\\\" hide-xs ng-if=\\\"vm.data.potential_exceptions.length < 1\\\">{{\\'SHIPPINGDETAILS.NO_POTENTIAL_EXCEPTIONS\\' | translate}}</h3><div layout=row layout-align=\\\"center center\\\" ng-if=\\\"vm.data.potential_exceptions.length > 3\\\"><md-button ng-click=\\\"vm.showExceptionsModal(ev, true)\\\">{{\\'SHIPPINGDETAILS.VIEW_MORE\\' | translate}}</md-button></div></md-card-content>\");\n$templateCache.put(\"/app/shipping-details/potential-exceptions/potential-exceptions.modal.html\",\"<!-- ShippingDetailsController as vm --><md-dialog class=\\\"md-card-light m-t\\\"><md-toolbar class=md-warning><div class=md-toolbar-tools><h2 flex>{{!sdpeCtrl.showList ? sdpeCtrl.potentialException.title : \\'SHIPPINGDETAILS.POTENTIAL_EXCEPTIONS\\' | translate}}</h2><md-button class=md-icon-button ng-click=sdpeCtrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding light-form potential-exceptions\\\"><div><div class=\\\"exception-list exception-list-slide\\\" ng-if=sdpeCtrl.showList><div ng-repeat=\\\"exception in vm.data.potential_exceptions\\\"><div ng-include=\\\"\\'/app/shipping-details/potential-exceptions/potential-exception-dialog-item.html\\'\\\"></div></div></div><div class=\\\"exception-details exception-slide\\\" ng-if=!sdpeCtrl.showList><div layout-gt-sm=row><div flex-gt-sm=45 flex-sm=1 flex-xs=1><h4 class=\\\"m-t-0 m-b-xs\\\"><span translate=ADMIN.POTENTIAL.EXCEPTION_TITLE></span></h4><p class=\\\"m-t-0 m-b\\\">{{sdpeCtrl.potentialException.title}}</p><h4 class=\\\"m-t-0 m-b-xs\\\"><span translate=ADMIN.POTENTIAL.DESCRIPTION></span></h4><p class=\\\"m-t-0 m-b\\\">{{sdpeCtrl.potentialException.description}}</p><h4 class=\\\"m-t-0 m-b-xs\\\"><span translate=ADMIN.POTENTIAL.NOTES></span></h4><p class=\\\"m-t-0 m-b\\\">{{sdpeCtrl.potentialException.notes}}</p><h4 class=\\\"m-t-0 m-b-xs\\\"><span translate=ADMIN.POTENTIAL.SOURCE></span></h4><p class=\\\"m-t-0 m-b\\\">{{sdpeCtrl.potentialException.source}}</p></div><div flex-gt-sm=45 flex-offset-gt-sm=10 flex-sm=1 flex-xs=1><div layout-gt-sm=row><div flex-gt-sm=47><h4 class=\\\"m-t-0 m-b-xs\\\" translate=ADMIN.POTENTIAL.START_DATE></h4><p class=\\\"m-t-0 m-b\\\"><md-icon></md-icon>{{sdpeCtrl.potentialException.start_date | date : \\\"MM/dd/yyyy\\\"}}</p></div><div flex-gt-sm=47 flex-offset-gt-sm=5><h4 class=\\\"m-t-0 m-b-xs\\\" translate=ADMIN.POTENTIAL.START_TIME></h4><p class=\\\"m-t-0 m-b\\\"><md-icon></md-icon>{{sdpeCtrl.potentialException.start_date | date : \\\"hh:mm\\\"}}</p></div></div><div layout-gt-sm=row><div flex-gt-sm=47><h4 class=\\\"m-t-0 m-b-xs\\\" translate=ADMIN.POTENTIAL.END_DATE></h4><p class=\\\"m-t-0 m-b\\\"><md-icon></md-icon>{{sdpeCtrl.potentialException.end_date | date : \\\"MM/dd/yyyy\\\"}}</p></div><div flex-gt-sm=47 flex-offset-gt-sm=5><h4 class=\\\"m-t-0 m-b-xs\\\" translate=ADMIN.POTENTIAL.END_TIME></h4><p class=\\\"m-t-0 m-b\\\"><md-icon></md-icon>{{sdpeCtrl.potentialException.end_date | date : \\\"hh:mm\\\"}}</p></div></div><h4 class=\\\"m-t-0 m-b-xs\\\" translate=ADMIN.POTENTIAL.TIME_ZONE></h4>{{sdpeCtrl.potentialException.timezone}}<p class=\\\"m-t-0 m-b\\\"><md-icon></md-icon>{{sdpeCtrl.potentialException.time_zone }}</p><div class=\\\"m-b m-t\\\"><h4 class=\\\"m-t-0 m-b-xs\\\" translate=ADMIN.POTENTIAL.SHIPPING_MODE></h4><div class=m-t-sm><md-checkbox ng-disabled=true ng-checked=sdpeCtrl.potentialException.air aria-label=\\\"Mode Checkbox\\\" class=md-primary><span translate=ADMIN.POTENTIAL.AIR></span></md-checkbox><md-checkbox ng-disabled=true ng-checked=sdpeCtrl.potentialException.sea class=md-primary aria-label=potentialException><span translate=ADMIN.POTENTIAL.SEA></span></md-checkbox></div></div><div class=m-b><h4 class=\\\"m-t-0 m-b-xs\\\"><span translate=ADMIN.POTENTIAL.EXCEPTION_ARRIVAL></span></h4><div class=m-t-sm><md-checkbox ng-checked=sdpeCtrl.potentialException.arrivals ng-disabled=true aria-label=\\\"Mode Checkbox\\\" class=md-primary><span translate=ADMIN.POTENTIAL.ARRIVALS></span></md-checkbox><md-checkbox ng-checked=sdpeCtrl.potentialException.departures ng-disabled=true aria-label=\\\"Mode Checkbox\\\" class=md-primary><span translate=ADMIN.POTENTIAL.DEPARTURES></span></md-checkbox></div></div></div></div></div></div></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"end center\\\"><div><p class=md-caption ng-if=!sdpeCtrl.showList><md-icon class=icon-reset></md-icon>Created: {{sdpeCtrl.potentialException.created_at | date : \\\"MMM dd, yyyy h:mm a\\\"}}  <md-icon class=icon-reset></md-icon>Last Activity: {{sdpeCtrl.potentialException.updated_at | date : \\\"MMM dd, yyyy h:mm a\\\"}}</p></div><span flex></span><md-button class=\\\"md-raised md-accent\\\" ng-click=\\\"sdpeCtrl.showList = true\\\" ng-if=!sdpeCtrl.showList>View All Potential Exceptions</md-button><md-button ng-if=sdpeCtrl.showList ng-click=sdpeCtrl.closeModal()><span translate=SHIPPINGDETAILS.CONTAINER.CLOSE></span></md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/reference-numbers/reference-numbers-list.html\",\"<div ng-if=vm.isReferenceNumbers layout-gt-xs=row><div flex-gt-xs=50 flex-xs=1 class=md-padding><span ng-repeat=\\\"(key, item) in vm.referenceNumberObject\\\"><span ng-if=$even><h4 class=list-header>{{key}}</h4><span ng-repeat=\\\"number in vm.getReferenceNumbers(item) track by $index\\\"><div flex-offset-gt-xs=50><ul class=reference-list><li>{{number}}</li></ul></div></span></span></span></div><div flex-gt-xs=50 flex-xs=1 class=md-padding><span ng-repeat=\\\"(key, item) in vm.referenceNumberObject\\\"><span ng-if=$odd><h4 class=list-header>{{key}}</h4><span ng-repeat=\\\"number in vm.getReferenceNumbers(item) track by $index\\\"><div flex-offset-gt-xs=50><ul class=reference-list><li>{{number}}</li></ul></div></span></span></span></div></div><div ng-if=!vm.isReferenceNumbers layout-gt-xs=row><h3>{{\\'SHIPPINGDETAILS.NO_REFERENCE_NUMBERS\\' | translate}}</h3></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/document-lists.html\",\"<md-card style=margin:0px><md-card-content><div class=table-scroll><table class=\\\"table table-fixed table-static\\\" cellspacing=0><tbody><tr ng-repeat=\\\"cfsData in vm.data.csl_documents\\\"><td class=td-25>{{cfsData.name}}</td><td class=\\\"td-25 documentName\\\" ng-click=\\\"vm.downloadDocument(cfsData.document_id, vm.data.pro, cfsData.filename)\\\">{{cfsData.filename}}</td><td class=td-25>{{cfsData.mod_date}}</td><td ng-click=\\\"vm.downloadDocument(cfsData.document_id, vm.data.pro, cfsData.filename)\\\" class=\\\"td-10 icon\\\"><i class=material-icons></i></td></tr><tr ng-if=\\\"vm.data.csl_documents < 1\\\"><td colspan=4>{{\\'SHIPPINGDETAILS.NO_DOCUMENTS\\' | translate}}</td></tr></tbody></table></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/invoice-modal.html\",\"<md-dialog class=\\\"md-card-light m-t modal-content\\\" ng-attr-style=\\\"top:{{(vm.invoiceLineCharges.length > 5)?0:25}}%;\\\"><md-toolbar><div class=md-toolbar-tools><h2 style=margin-left:10px><span>Invoice PRO #: {{vm.ref_num}}</span></h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><div layout=row layout-align=\\\"center center\\\"><div class=table-scroll><table class=\\\"table table-striped table-fixed table-static invoiceTable\\\"><thead><tr><th class=td-25>DESCRIPTION</th><th class=td-10>Amount</th></tr></thead><tbody><tr ng-repeat=\\\"invoiceCharges in vm.invoiceLineCharges\\\"><td>{{invoiceCharges.description}}</td><td>{{(invoiceCharges.amount)?(\\'$\\'+(invoiceCharges.amount | number : 2)+\\' USD\\'):\\'\\'}}</td></tr></tbody></table></div></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/pick-details.html\",\"<md-dialog class=\\\"md-card-light m-t pick-details-modal\\\"><md-toolbar><div class=md-toolbar-tools><md-toolbar><div class=md-toolbar-tools style=padding-left:0px><h2><md-icon class=\\\"pick-header-modal shipment-section-icon\\\"></md-icon><span class=font-15>{{vm.currentMilestone.name}} details</span></h2></div></md-toolbar><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><div layout=column><md-card class=background-fff layout=column layout-gt-xs=row><md-card-content flex=100 flex-gt-xs=50><div class=heading>COMPANY NAME</div><div class=details>{{vm.currentMilestone.company | capitalize}}</div></md-card-content><md-card-content flex=100 flex-gt-xs=50><div class=heading>ADDRESS</div><div class=details>{{(vm.currentMilestone.address)?(vm.currentMilestone.address | capitalize):\\'\\'}}{{(vm.currentMilestone.city)?\\',\\':\\'\\'}}<br>{{(vm.currentMilestone.city)?(vm.currentMilestone.city | capitalize):\\'\\'}}{{(vm.currentMilestone.state)?\\', \\':\\'\\'}} {{(vm.currentMilestone.state | uppercase)+\\' \\' +vm.currentMilestone.zip}}</div></md-card-content></md-card><md-card class=background-fff layout=column layout-gt-xs=row><md-card-content flex=100 flex-gt-xs=50><div class=heading>POD SIGNATURE</div><div class=details>{{vm.currentMilestone.podsignature}}</div></md-card-content><md-card-content flex=100 flex-gt-xs=50><div class=heading>REF#</div><div class=details>{{vm.currentMilestone.ref_no}}</div></md-card-content></md-card></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/shipping-details-cfs.html\",\"<!-- Master Cluster JS File --><style type=text/css>.discussion-box{\\r\\n height: 85px;\\r\\n margin-right: 25px;\\r\\n border: 1px solid #43a59a;\\r\\n background: #43a59a;\\r\\n border-radius: 5px;\\r\\n min-width: 90px;\\r\\n max-width: 90px;\\r\\n position: relative;\\r\\n cursor: pointer;\\r\\n }\\r\\n.shipment_discussion_chat .discussion_layout .message_body main .date_time_div .content{\\r\\n background-color: #fff;\\r\\n}\\r\\n\\r\\n.box-count {\\r\\n border-radius: 25px;\\r\\n background-color: #43a59a;\\r\\n padding: 5px 7px;\\r\\n color: #fff;\\r\\n bottom: 50px;\\r\\n position: relative;\\r\\n right: -25px;\\r\\n font-size: 10px;\\r\\n border: 1px solid #333;\\r\\n font-weight: 700;\\r\\n}\\r\\n\\r\\n.box-count-less {\\r\\n border-radius: 25px;\\r\\n background-color: #43a59a;\\r\\n padding: 5px 9px;\\r\\n color: #fff;\\r\\n bottom: 50px;\\r\\n position: relative;\\r\\n right: -25px;\\r\\n font-size: 10px;\\r\\n border: 1px solid #333;\\r\\n font-weight: 700;\\r\\n}\\r\\n\\r\\n.discussion-text{\\r\\n font-size: 11px;\\r\\n font-weight: 600;\\r\\n position: relative;\\r\\n bottom: 18px;\\r\\n left: 12px;\\r\\n}</style><!-- <script src=\\\"js/markerclusterer.js\\\"></script> --><cva-shell id=shippingDetailsAljex><div loadmask=!vm.isLoading loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 translate=SHIPPINGDETAILS.SHIPPING_DETAILS></span><br><!-- <span class=\\\"breadcrumbs md-subhead\\\" ng-include=\\\"\\'/app/components/breadcrumbs/breadcrumbs.html\\'\\\"></span> --></span></h2></div><span ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\"><div class=discussion-box ng-if=vm.discussion_visibility><span ng-click=vm.markRead(); href=#reference-area du-smooth-scroll offset=80 duration=700><div style=\\\"padding: 20px 24px 0px 24px\\\"><i style=\\\"color:#FFFFFF;font-size: 35px\\\" class=material-icons>chat</i> <span ng-attr-style=\\\"visibility:{{(vm.unseen_discussion_count > 0)?\\'\\':\\'hidden\\'}}\\\" ng-class=\\\"((vm.unseen_discussion_count <= 9)) ? \\'box-count-less\\' : \\'box-count\\'\\\">{{vm.unseen_discussion_count > 9 ? \\'9+\\' : vm.unseen_discussion_count}}</span></div><div class=discussion-text>DISCUSSION</div></span></div></span></div></div><!-- Details Header --><md-card class=m-b><md-card-content><div layout=column layout-gt-xs=row><div layout=column layout-align=\\\"space-between start\\\" layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\" flex=100 flex-gt-sm=45 class=margin-bottom-5><!-- Shipment Status Text --><div><div ng-show=!vm.data.isdelivered><div class=shiment-top-left><md-icon></md-icon><span class=text-upper translate=SHIPPINGDETAILS.ESTIMATED_DELIVERY></span></div></div><div ng-show=vm.data.isdelivered><div flex=100 class=shiment-top-left><md-icon></md-icon><span class=text-upper translate=SHIPPINGDETAILS.SHIPMENT_DELIVERED></span></div></div></div><!-- Due Text --><div ng-show=!vm.data.isdelivered><div class=shipment-day-remaining ng-if=\\\"vm.data.days_balance > 0\\\">{{vm.data.days_balance}} {{(vm.data.days_balance > 1)?\\'Days\\':\\'Day\\'}} Remaining</div><div class=shipment-day-remaining ng-if=\\\"vm.data.days_balance <= 0\\\">Due Immediately</div></div></div><!-- Milestone Text --><div flex=100 flex-gt-xs=50 layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\"><div></div><div><!-- ng-click=\\\"vm.gotoMilestome()\\\" --> <a href=#milestones-area du-smooth-scroll offset=80 duration=700 class=\\\"shipment-view-milestone-aljex text-upper\\\" translate=SHIPPINGDETAILS.VIEWALLMILESTONE style=\\\"cursor: pointer\\\"></a></div></div></div><div layout-gt-xs=row layout-xs=column class=m-b-sm layout-align-gt-xs=\\\"space-between start\\\" style=\\\"border-bottom: 1px solid #3f4c59\\\"><div flex=100 flex-gt-xs={{vm.showWayPointDiv?50:50}} class=shipment-main-caption class=m-b-xs><div flex=100 flex-gt-xs=95 class=margin-bottom-10>{{vm.data.load_display_date_time[\\'date_display\\'] | date:\\'EEE - MMM d, y\\' : \\'UTC\\'}}   {{vm.data.load_display_date_time[\\'time_display\\']}}</div><div class=bookmark-toolbar ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" style=\\\"margin-top: 10px; margin-bottom: 10px\\\"><md-button class=\\\"btn-outline btn-icon-l\\\" ng-click=\\\"vm.bookmarkShipment(\\'normal\\')\\\" ng-disabled=vm.isBookmarking><span class=\\\"fade {{vm.isBookmarking ? \\'fade-out\\' : \\'\\'}}\\\">{{vm.bookmarkButtonText | translate}}<md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarked}\\\"></md-icon></span><md-progress-circular md-mode=indeterminate ng-show=vm.isBookmarking class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><md-button class=\\\"btn-outline btn-gray\\\" ng-click=\\\"vm.showModal(ev, \\'bookmark/bookmarks-list\\')\\\"><span translate=SHIPPINGDETAILS.VIEW_BOOKMARKS></span></md-button><md-button ng-if=vm.discussion_visibility style=\\\"margin-top: 5px\\\" class=\\\"btn-outline btn-icon-l\\\" ng-click=\\\"vm.bookmarkShipmentDiscussion(\\'discussion\\')\\\" ng-disabled=vm.isBookmarkingDiscussion><span class=\\\"fade {{vm.isBookmarkingDiscussion ? \\'fade-out\\' : \\'\\'}}\\\">{{vm.bookmarkButtonTextDiscussion | translate}}<md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarkedDiscussion}\\\"></md-icon></span><md-progress-circular md-mode=indeterminate ng-show=vm.isBookmarkingDiscussion class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div></div><div flex=100 flex-sm=50 ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/show-list-view/status_arrows.html\\'\\\" flex-gt-sm={{vm.showWayPointDiv?45:45}} class=m-b-xs></div></div><!-- Filter Section [SHOW LIST VIEW] --><div ng-if=vm.showWayPointDiv layout=column class=showListViewFilter ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/show-list-view/loads_filter.html\\'\\\"></div><!-- SHOW LIST VIEW --><div ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/show-list-view/show-list-view.html\\'\\\" layout=column layout-gt-sm=row flex=100 style=min-height:320px></div><!-- Details Section --><div flex=100 layout-gt-sm=row layout-align=\\\"space-between start\\\" class=\\\"shipment-customer-info-box m-t-sm\\\" ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/show-list-view/details.html\\'\\\"></div></md-card-content></md-card><!-- Milestones Section --><div class=p-a-sm id=milestones-area><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>{{\\'SHIPPINGDETAILS.MILESTONES\\' | translate | uppercase}}</span></h2></div></md-toolbar><div ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/milestones/milestones.html\\'\\\"></div></div><!-- More Shipping Details --><div style=display:block id=more_shipping_details ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/more-shipping/more-shipping.html\\'\\\"></div><!-- More Shipping Details --><div style=display:block id=accordion-invoices ng-if=vm.hasFinancialPermissions ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/invoices/invoice-list.html\\'\\\"></div><!-- More Shipping Details --><div style=display:block id=reference-area ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/reference-numbers/reference-numbers-list.html\\'\\\"></div><!-- Shipping Details Core Content --><!--<cva-accordion-group class=\\\"accordion-group-light\\\">\\r\\n\\r\\n <cva-accordion data-title=\\\"More Shipping Details\\\" data-icon=\\\"\\\" data-saved-expanded=\\\"{{vm.expandedShippingDetails}}\\\" id=\\\"more_shipping_details\\\" class=\\\"\\\" >\\r\\n\\r\\n <div layout=\\\"row\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedShippingDetails\\\" ng-change=\\\"vm.setShippingDetailsExpanded()\\\" aria-label=\\\"keep shipping details open\\\">\\r\\n Keep Shipping Details Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n\\r\\n <div layout-gt-sm=\\\"row\\\" class=\\\"\\\" style=\\\"margin-top:10px;\\\" ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/more-shipping/more-shipping.html\\'\\\" class=\\\"m-t-sm\\\"></div>\\r\\n\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion data-title=\\\"Invoice Details\\\" data-icon=\\\"\\\" id=\\\"accordion-invoices\\\" data-saved-expanded=\\\"{{vm.expandedInvoices}}\\\" ng-if=\\\"vm.hasFinancialPermissions\\\">\\r\\n <div layout=\\\"row\\\" layout-xs=\\\"column\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedInvoices\\\" ng-change=\\\"vm.setInvoicesExpanded()\\\" aria-label=\\\"keep invoices open\\\">\\r\\n Keep Invoices Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n <div ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/invoices/invoice-list.html\\'\\\"></div>\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion data-title=\\\"Invoice Details\\\" data-icon=\\\"\\\" id=\\\"accordion-invoices\\\" data-saved-expanded=\\\"{{vm.expandedInvoices}}\\\" ng-if=\\\"vm.hasFinancialPermissions\\\">\\r\\n <div layout=\\\"row\\\" layout-xs=\\\"column\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedInvoices\\\" ng-change=\\\"vm.setInvoicesExpanded()\\\" aria-label=\\\"keep invoices open\\\">\\r\\n Keep Invoices Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n <div ng-include=\\\"\\'/app/shipping-details/invoices/invoice-list.html\\'\\\"></div>\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion data-title=\\\"Container Details\\\" data-icon=\\\"\\\">\\r\\n <div class=\\\"scrollable\\\" ng-include=\\\"\\'/app/shipping-details/containers/container-list.html\\'\\\" ></div>\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion id=\\\"reference-area\\\" data-title=\\\"Reference Numbers\\\" data-icon=\\\"\\\" data-saved-expanded=\\\"{{vm.expandedRefNumbers}}\\\">\\r\\n <div layout=\\\"row\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedRefNumbers\\\" ng-change=\\\"vm.setRefNumbersExpanded()\\\" aria-label=\\\"keep reference numbers open\\\">\\r\\n Keep Reference Numbers Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n <div ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/reference-numbers/reference-numbers-list.html\\'\\\" class=\\\"m-t-sm\\\"></div>\\r\\n </cva-accordion>\\r\\n\\r\\n </cva-accordion-group>--><!-- Documents Section --><div class=p-a-sm id=document-area><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>DOCUMENTS</span></h2></div></md-toolbar><div ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/document-lists.html\\'\\\"></div></div><!--Shipment Discussion Chat--><div ng-if=vm.discussion_visibility id=reference-area layout-gt-sm=row layout-sm=column layout-xs=column class=shipment_discussion_chat><md-card flex-gt-sm=100 flex-lt-md=1 class=m-b ng-include=\\\"\\'/app/shipping-details/shipping-details-cfs/discussion/index.html\\'\\\"></md-card></div><div layout-gt-sm=row layout-sm=column layout-xs=column ng-if=false><!-- Activity Log Section --><!-- <md-card class=\\\"\\\" flex-gt-xs=\\\"50\\\" flex-xs=\\\"1\\\" ng-include=\\\"\\'/app/shipping-details/activity-log/activity-log.html\\'\\\"></md-card> --><!-- Marks & Numbers --><!-- <md-card flex=\\\"50\\\" ng-include=\\\"\\'/app/shipping-details/marks-numbers/marks-numbers.html\\'\\\"></md-card> --></div></div><div ng-if=vm.failedToRetrieveData class=\\\"m-t m-b\\\" layout=row layout-align=\\\"center center\\\"><h2><span translate=SHIPPINGDETAILS.FAILED_TO_RETRIEVE_DATA></span> {{vm.failedToRetrieveData}}</h2></div></cva-shell>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/document-lists.html\",\"<md-card style=margin:0px><md-card-content><div class=table-scroll><table class=\\\"table table-fixed table-static\\\" cellspacing=0><tbody><tr ng-repeat=\\\"cmtsData in vm.data.document_references\\\"><td class=\\\"td-15 documentName\\\" ng-click=\\\"vm.downloadDocument(cmtsData.document_id, vm.data.load_id, cmtsData.document_name, cmtsData.entity)\\\">{{cmtsData.document_name}}</td><!--<td class=\\\"td-15 documentName\\\" ng-click=\\\"vm.downloadDocument(cmtsData.document_id, vm.data.pro, cmtsData.filename,cmtsData.entity)\\\">{{cmtsData.filename}}</td>--><td class=td-15>{{cmtsData.document_type}}</td><td class=\\\"td-10 icon\\\" ng-click=\\\"vm.downloadDocument(cmtsData.document_id, vm.data.load_id, cmtsData.document_name, cmtsData.entity)\\\"><i class=material-icons></i></td></tr><tr ng-if=\\\"vm.data.document_references < 1\\\"><td colspan=4>{{\\'SHIPPINGDETAILS.NO_DOCUMENTS\\' | translate}}</td></tr></tbody></table></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/invoice-modal.html\",\"<md-dialog class=\\\"md-card-light m-t modal-content\\\" ng-attr-style=\\\"top:{{(vm.invoiceLineCharges.length > 5)?0:25}}%;\\\"><md-toolbar><div class=md-toolbar-tools><h2 style=margin-left:10px><span>Invoice Load #: {{vm.data.load_number | capitalize}}</span></h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><div layout=row layout-align=\\\"center center\\\"><div class=table-scroll><table class=\\\"table table-striped table-fixed table-static invoiceTable\\\"><thead><tr><th class=td-25>DESCRIPTION</th><th class=td-10>Amount</th></tr></thead><tbody><tr ng-repeat=\\\"invoiceCharges in vm.invoiceLineCharges\\\"><td>{{invoiceCharges.description}}</td><td>{{(invoiceCharges.amount)?(vm.data.currency_code_display+(invoiceCharges.amount | number : 2)):\\'-\\'}}</td></tr></tbody></table></div></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/pick-details.html\",\"<md-dialog class=\\\"md-card-light m-t pick-details-modal\\\"><md-toolbar><div class=md-toolbar-tools><md-toolbar><div class=md-toolbar-tools style=padding-left:0px><h2><md-icon class=\\\"pick-header-modal shipment-section-icon\\\"></md-icon><span class=font-15>{{vm.currentMilestone.name}} details</span></h2></div></md-toolbar><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><div layout=column><md-card class=background-fff layout=column layout-gt-xs=row><md-card-content flex=100 flex-gt-xs=50><div class=heading>COMPANY NAME</div><div class=details>{{vm.currentMilestone.company | capitalize}}</div></md-card-content><md-card-content flex=100 flex-gt-xs=50><div class=heading>ADDRESS</div><div class=details>{{(vm.currentMilestone.address)?(vm.currentMilestone.address | capitalize):\\'\\'}}{{(vm.currentMilestone.city)?\\',\\':\\'\\'}}<br>{{(vm.currentMilestone.city)?(vm.currentMilestone.city | capitalize):\\'\\'}}{{(vm.currentMilestone.state)?\\', \\':\\'\\'}} {{(vm.currentMilestone.state | uppercase)+\\' \\' +vm.currentMilestone.zip}}</div></md-card-content></md-card><md-card class=background-fff layout=column layout-gt-xs=row><md-card-content flex=100 flex-gt-xs=50><div class=heading>POD SIGNATURE</div><div class=details>{{vm.currentMilestone.podsignature}}</div></md-card-content><md-card-content flex=100 flex-gt-xs=50><div class=heading>REF#</div><div class=details>{{vm.currentMilestone.ref_no}}</div></md-card-content></md-card></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/shipping-details-cmts.html\",\"<!-- Master Cluster JS File --><style type=text/css>.discussion-box{\\r\\n height: 85px;\\r\\n margin-right: 25px;\\r\\n border: 1px solid #43a59a;\\r\\n background: #43a59a;\\r\\n border-radius: 5px;\\r\\n min-width: 90px;\\r\\n max-width: 90px;\\r\\n position: relative;\\r\\n cursor: pointer;\\r\\n }\\r\\n.shipment_discussion_chat .discussion_layout .message_body main .date_time_div .content{\\r\\n background-color: #fff;\\r\\n}\\r\\n\\r\\n.box-count {\\r\\n border-radius: 25px;\\r\\n background-color: #43a59a;\\r\\n padding: 5px 7px;\\r\\n color: #fff;\\r\\n bottom: 50px;\\r\\n position: relative;\\r\\n right: -25px;\\r\\n font-size: 10px;\\r\\n border: 1px solid #333;\\r\\n font-weight: 700;\\r\\n}\\r\\n\\r\\n.box-count-less {\\r\\n border-radius: 25px;\\r\\n background-color: #43a59a;\\r\\n padding: 5px 9px;\\r\\n color: #fff;\\r\\n bottom: 50px;\\r\\n position: relative;\\r\\n right: -25px;\\r\\n font-size: 10px;\\r\\n border: 1px solid #333;\\r\\n font-weight: 700;\\r\\n}\\r\\n\\r\\n.discussion-text{\\r\\n font-size: 11px;\\r\\n font-weight: 600;\\r\\n position: relative;\\r\\n bottom: 18px;\\r\\n left: 12px;\\r\\n}</style><!-- <script src=\\\"js/markerclusterer.js\\\"></script> --><cva-shell id=shippingDetailsAljex><div loadmask=!vm.isLoading loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 translate=SHIPPINGDETAILS.SHIPPING_DETAILS></span><br><!-- <span class=\\\"breadcrumbs md-subhead\\\" ng-include=\\\"\\'/app/components/breadcrumbs/breadcrumbs.html\\'\\\"></span> --></span></h2></div><span ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\"><div class=discussion-box ng-if=vm.discussion_visibility><span ng-click=vm.markRead(); href=#reference-area du-smooth-scroll offset=80 duration=700><div style=\\\"padding: 20px 24px 0px 24px\\\"><i style=\\\"color:#FFFFFF;font-size: 35px\\\" class=material-icons>chat</i> <span ng-attr-style=\\\"visibility:{{(vm.unseen_discussion_count > 0)?\\'\\':\\'hidden\\'}}\\\" ng-class=\\\"((vm.unseen_discussion_count <= 9)) ? \\'box-count-less\\' : \\'box-count\\'\\\">{{vm.unseen_discussion_count > 9 ? \\'9+\\' : vm.unseen_discussion_count}}</span></div><div class=discussion-text>DISCUSSION</div></span></div></span></div></div><!-- Details Header --><md-card class=m-b><md-card-content><div layout=column layout-gt-xs=row><div layout=column layout-align=\\\"space-between start\\\" layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\" flex=100 flex-gt-sm=45 class=margin-bottom-5><!-- Shipment Status Text --><div><div ng-show=!vm.data.isdelivered><div class=shiment-top-left><md-icon></md-icon><span class=text-upper translate=SHIPPINGDETAILS.ESTIMATED_DELIVERY></span></div></div><div ng-show=vm.data.isdelivered><div flex=100 class=shiment-top-left><md-icon></md-icon><span class=text-upper translate=SHIPPINGDETAILS.SHIPMENT_DELIVERED></span></div></div></div><!-- Due Text --><div ng-show=!vm.data.isdelivered><div class=shipment-day-remaining ng-if=\\\"vm.data.days_balance > 0\\\">{{vm.data.days_balance}} {{(vm.data.days_balance > 1)?\\'Days\\':\\'Day\\'}} Remaining</div><div class=shipment-day-remaining ng-if=\\\"vm.data.days_balance <= 0\\\">Due Immediately</div></div></div><!-- Milestone Text --><div flex=100 flex-gt-xs=50 layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\"><div></div><div><!-- ng-click=\\\"vm.gotoMilestome()\\\" --> <a href=#milestones-area du-smooth-scroll offset=80 duration=700 class=\\\"shipment-view-milestone-aljex text-upper\\\" translate=SHIPPINGDETAILS.VIEWALLMILESTONE style=\\\"cursor: pointer\\\"></a></div></div></div><div layout-gt-xs=row layout-xs=column class=m-b-sm layout-align-gt-xs=\\\"space-between start\\\" style=\\\"border-bottom: 1px solid #3f4c59\\\"><div flex=100 flex-gt-xs={{vm.showWayPointDiv?100:100}} class=shipment-main-caption class=m-b-xs><div flex=100 flex-gt-xs=95 class=margin-bottom-10 style=\\\"display: flex; justify-content: space-between\\\"><div style=\\\"justify-content: flex-start\\\">{{vm.data.load_display_date_time[\\'date_display\\']}}   {{vm.data.load_display_date_time[\\'time_display\\']}}</div><div style=\\\"justify-content: flex-end\\\">{{vm.data.load_status.toUpperCase()}}</div></div><div class=bookmark-toolbar ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" style=\\\"margin-top: 10px; margin-bottom: 10px\\\"><md-button class=\\\"btn-outline btn-icon-l\\\" ng-click=\\\"vm.bookmarkShipment(\\'normal\\')\\\" ng-disabled=vm.isBookmarking><span class=\\\"fade {{vm.isBookmarking ? \\'fade-out\\' : \\'\\'}}\\\">{{vm.bookmarkButtonText | translate}}<md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarked}\\\"></md-icon></span><md-progress-circular md-mode=indeterminate ng-show=vm.isBookmarking class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><md-button class=\\\"btn-outline btn-gray\\\" ng-click=\\\"vm.showModal(ev, \\'bookmark/bookmarks-list\\')\\\"><span translate=SHIPPINGDETAILS.VIEW_BOOKMARKS></span></md-button><!--<md-button ng-if=\\\"vm.discussion_visibility\\\" style=\\\"margin-top: 5px;\\\" class=\\\"btn-outline btn-icon-l\\\"--><!--ng-click=\\\"vm.bookmarkShipmentDiscussion(\\'discussion\\')\\\"--><!--ng-disabled=\\\"vm.isBookmarkingDiscussion\\\">--><!--<span class=\\\"fade {{vm.isBookmarkingDiscussion ? \\'fade-out\\' : \\'\\'}}\\\">--><!--{{vm.bookmarkButtonTextDiscussion | translate}}<md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarkedDiscussion}\\\"></md-icon>--><!--</span>--><!--<md-progress-circular md-mode=\\\"indeterminate\\\" ng-show=\\\"vm.isBookmarkingDiscussion\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>--><!--</md-button>--></div></div><!--<div flex=\\\"100\\\" flex-sm=\\\"50\\\" ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/show-list-view/status_arrows.html\\'\\\" flex-gt-sm=\\\"{{vm.showWayPointDiv?45:45}}\\\" class=\\\"m-b-xs\\\"></div>--></div><!-- Filter Section [SHOW LIST VIEW] --><div ng-if=vm.showWayPointDiv layout=column class=showListViewFilter ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/show-list-view/loads_filter.html\\'\\\"></div><!-- SHOW LIST VIEW --><div ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/show-list-view/show-list-view.html\\'\\\" layout=column layout-gt-sm=row flex=100 style=min-height:320px></div><!-- Details Section --><div flex=100 layout-gt-sm=row layout-align=\\\"space-between start\\\" class=\\\"shipment-customer-info-box m-t-sm\\\" ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/show-list-view/details.html\\'\\\"></div></md-card-content></md-card><!-- Stops Section --><div class=p-a-sm id=milestones-area><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>{{\\'SHIPPINGDETAILS.STOPS\\' | translate | uppercase}}</span></h2></div></md-toolbar><div ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/stops/stops.html\\'\\\"></div></div><!-- Milestones Section --><div class=p-a-sm id=milestones-area><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>{{\\'SHIPPINGDETAILS.MILESTONES\\' | translate | uppercase}}</span></h2></div></md-toolbar><div ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/milestones/milestones.html\\'\\\"></div></div><!-- More Shipping Details --><div style=display:block id=more_shipping_details ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/more-shipping/more-shipping.html\\'\\\"></div><!-- More Shipping Details --><div style=display:block id=accordion-invoices ng-if=vm.hasFinancialPermissions ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/invoices/invoice-list.html\\'\\\"></div><!-- More Shipping Details --><div style=display:block id=reference-area ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/reference-numbers/reference-numbers-list.html\\'\\\"></div><!-- Shipping Details Core Content --><!--<cva-accordion-group class=\\\"accordion-group-light\\\">\\r\\n\\r\\n <cva-accordion data-title=\\\"More Shipping Details\\\" data-icon=\\\"\\\" data-saved-expanded=\\\"{{vm.expandedShippingDetails}}\\\" id=\\\"more_shipping_details\\\" class=\\\"\\\" >\\r\\n\\r\\n <div layout=\\\"row\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedShippingDetails\\\" ng-change=\\\"vm.setShippingDetailsExpanded()\\\" aria-label=\\\"keep shipping details open\\\">\\r\\n Keep Shipping Details Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n\\r\\n <div layout-gt-sm=\\\"row\\\" class=\\\"\\\" style=\\\"margin-top:10px;\\\" ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/more-shipping/more-shipping.html\\'\\\" class=\\\"m-t-sm\\\"></div>\\r\\n\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion data-title=\\\"Invoice Details\\\" data-icon=\\\"\\\" id=\\\"accordion-invoices\\\" data-saved-expanded=\\\"{{vm.expandedInvoices}}\\\" ng-if=\\\"vm.hasFinancialPermissions\\\">\\r\\n <div layout=\\\"row\\\" layout-xs=\\\"column\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedInvoices\\\" ng-change=\\\"vm.setInvoicesExpanded()\\\" aria-label=\\\"keep invoices open\\\">\\r\\n Keep Invoices Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n <div ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/invoices/invoice-list.html\\'\\\"></div>\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion data-title=\\\"Invoice Details\\\" data-icon=\\\"\\\" id=\\\"accordion-invoices\\\" data-saved-expanded=\\\"{{vm.expandedInvoices}}\\\" ng-if=\\\"vm.hasFinancialPermissions\\\">\\r\\n <div layout=\\\"row\\\" layout-xs=\\\"column\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedInvoices\\\" ng-change=\\\"vm.setInvoicesExpanded()\\\" aria-label=\\\"keep invoices open\\\">\\r\\n Keep Invoices Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n <div ng-include=\\\"\\'/app/shipping-details/invoices/invoice-list.html\\'\\\"></div>\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion data-title=\\\"Container Details\\\" data-icon=\\\"\\\">\\r\\n <div class=\\\"scrollable\\\" ng-include=\\\"\\'/app/shipping-details/containers/container-list.html\\'\\\" ></div>\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion id=\\\"reference-area\\\" data-title=\\\"Reference Numbers\\\" data-icon=\\\"\\\" data-saved-expanded=\\\"{{vm.expandedRefNumbers}}\\\">\\r\\n <div layout=\\\"row\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedRefNumbers\\\" ng-change=\\\"vm.setRefNumbersExpanded()\\\" aria-label=\\\"keep reference numbers open\\\">\\r\\n Keep Reference Numbers Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n <div ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/reference-numbers/reference-numbers-list.html\\'\\\" class=\\\"m-t-sm\\\"></div>\\r\\n </cva-accordion>\\r\\n\\r\\n </cva-accordion-group>--><!-- Documents Section --><div class=p-a-sm id=document-area><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>DOCUMENTS</span></h2></div></md-toolbar><div ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/document-lists.html\\'\\\"></div></div><!--Shipment Discussion Chat--><!--<div ng-if=\\\"vm.discussion_visibility\\\" id=\\\"reference-area\\\" layout-gt-sm=\\\"row\\\" layout-sm=\\\"column\\\"--><!--layout-xs=\\\"column\\\" class=\\\"shipment_discussion_chat\\\">--><!--<md-card flex-gt-sm=\\\"100\\\" flex-lt-md=\\\"1\\\" class=\\\"m-b\\\" ng-include=\\\"\\'/app/shipping-details/shipping-details-cmts/discussion/index.html\\'\\\"></md-card>--><!--</div>--><!--<div layout-gt-sm=\\\"row\\\" layout-sm=\\\"column\\\" layout-xs=\\\"column\\\" ng-if=\\\"false\\\">--><!-- Activity Log Section --><!-- <md-card class=\\\"\\\" flex-gt-xs=\\\"50\\\" flex-xs=\\\"1\\\" ng-include=\\\"\\'/app/shipping-details/activity-log/activity-log.html\\'\\\"></md-card> --><!-- Marks & Numbers --><!-- <md-card flex=\\\"50\\\" ng-include=\\\"\\'/app/shipping-details/marks-numbers/marks-numbers.html\\'\\\"></md-card> --><!--</div>--></div><div ng-if=vm.failedToRetrieveData class=\\\"m-t m-b\\\" layout=row layout-align=\\\"center center\\\"><h2><span translate=SHIPPINGDETAILS.FAILED_TO_RETRIEVE_DATA></span> {{vm.failedToRetrieveData}}</h2></div></cva-shell>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/document-lists.html\",\"<md-card style=margin:0px><md-card-content><div class=table-scroll><table class=\\\"table table-fixed table-static\\\" cellspacing=0><tbody><tr ng-repeat=\\\"csl_document in vm.data.csl_documents\\\"><td class=td-25>{{csl_document.name}}</td><td class=\\\"td-25 documentName\\\" ng-click=\\\"vm.downloadDocument(csl_document.document_id, vm.data.pro, csl_document.filename)\\\">{{csl_document.filename}}</td><td class=td-25>{{csl_document.mod_date}}</td><td ng-click=\\\"vm.downloadDocument(csl_document.document_id, vm.data.pro, csl_document.filename)\\\" class=\\\"td-10 icon\\\"><i class=material-icons></i></td></tr><tr ng-if=\\\"vm.data.csl_documents < 1\\\"><td colspan=4>{{\\'SHIPPINGDETAILS.NO_DOCUMENTS\\' | translate}}</td></tr></tbody></table></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/invoice-modal.html\",\"<md-dialog class=\\\"md-card-light m-t modal-content\\\" ng-attr-style=\\\"top:{{(vm.invoiceLineCharges.length > 5)?0:25}}%;\\\"><md-toolbar><div class=md-toolbar-tools><h2 style=margin-left:10px><span>Invoice PRO #: {{vm.ref_num}}</span></h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><div layout=row layout-align=\\\"center center\\\"><div class=table-scroll><table class=\\\"table table-striped table-fixed table-static invoiceTable\\\"><thead><tr><th class=td-25>DESCRIPTION</th><th class=td-10>Amount</th></tr></thead><tbody><tr ng-repeat=\\\"invoiceCharges in vm.invoiceLineCharges\\\"><td>{{invoiceCharges.description}}</td><td>{{(invoiceCharges.amount)?(\\'$\\'+(invoiceCharges.amount | number : 2)+\\' USD\\'):\\'\\'}}</td></tr></tbody></table></div></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/pick-details.html\",\"<md-dialog class=\\\"md-card-light m-t pick-details-modal\\\"><md-toolbar><div class=md-toolbar-tools><md-toolbar><div class=md-toolbar-tools style=padding-left:0px><h2><md-icon class=\\\"pick-header-modal shipment-section-icon\\\"></md-icon><span class=font-15>{{vm.currentMilestone.name}} details</span></h2></div></md-toolbar><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><div layout=column><md-card class=background-fff layout=column layout-gt-xs=row><md-card-content flex=100 flex-gt-xs=50><div class=heading>COMPANY NAME</div><div class=details>{{vm.currentMilestone.company | capitalize}}</div></md-card-content><md-card-content flex=100 flex-gt-xs=50><div class=heading>ADDRESS</div><div class=details>{{(vm.currentMilestone.address)?(vm.currentMilestone.address | capitalize):\\'\\'}}{{(vm.currentMilestone.city)?\\',\\':\\'\\'}}<br>{{(vm.currentMilestone.city)?(vm.currentMilestone.city | capitalize):\\'\\'}}{{(vm.currentMilestone.state)?\\', \\':\\'\\'}} {{(vm.currentMilestone.state | uppercase)+\\' \\' +vm.currentMilestone.zip}}</div></md-card-content></md-card><md-card class=background-fff layout=column layout-gt-xs=row><md-card-content flex=100 flex-gt-xs=50><div class=heading>POD SIGNATURE</div><div class=details>{{vm.currentMilestone.podsignature}}</div></md-card-content><md-card-content flex=100 flex-gt-xs=50><div class=heading>REF#</div><div class=details>{{vm.currentMilestone.ref_no}}</div></md-card-content></md-card></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/shipping-details-csl.html\",\"<!-- Master Cluster JS File --><style type=text/css>.discussion-box{\\r\\n height: 85px;\\r\\n margin-right: 25px;\\r\\n border: 1px solid #43a59a;\\r\\n background: #43a59a;\\r\\n border-radius: 5px;\\r\\n min-width: 90px;\\r\\n max-width: 90px;\\r\\n position: relative;\\r\\n cursor: pointer;\\r\\n }\\r\\n.shipment_discussion_chat .discussion_layout .message_body main .date_time_div .content{\\r\\n background-color: #fff;\\r\\n}\\r\\n\\r\\n.box-count {\\r\\n border-radius: 25px;\\r\\n background-color: #43a59a;\\r\\n padding: 5px 7px;\\r\\n color: #fff;\\r\\n bottom: 50px;\\r\\n position: relative;\\r\\n right: -25px;\\r\\n font-size: 10px;\\r\\n border: 1px solid #333;\\r\\n font-weight: 700;\\r\\n}\\r\\n\\r\\n.box-count-less {\\r\\n border-radius: 25px;\\r\\n background-color: #43a59a;\\r\\n padding: 5px 9px;\\r\\n color: #fff;\\r\\n bottom: 50px;\\r\\n position: relative;\\r\\n right: -25px;\\r\\n font-size: 10px;\\r\\n border: 1px solid #333;\\r\\n font-weight: 700;\\r\\n}\\r\\n\\r\\n.discussion-text{\\r\\n font-size: 11px;\\r\\n font-weight: 600;\\r\\n position: relative;\\r\\n bottom: 18px;\\r\\n left: 12px;\\r\\n}</style><!-- <script src=\\\"js/markerclusterer.js\\\"></script> --><cva-shell id=shippingDetailsAljex><div loadmask=!vm.isLoading loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1 translate=SHIPPINGDETAILS.SHIPPING_DETAILS></span><br><!-- <span class=\\\"breadcrumbs md-subhead\\\" ng-include=\\\"\\'/app/components/breadcrumbs/breadcrumbs.html\\'\\\"></span> --></span></h2></div><span ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\"><div ng-if=vm.discussion_visibility class=discussion-box><span href=#reference-area du-smooth-scroll offset=80 duration=700 ng-click=vm.markRead();><div style=\\\"padding: 20px 24px 0px 24px\\\"><i style=\\\"color:#FFFFFF;font-size: 35px\\\" class=material-icons>chat</i> <span ng-attr-style=\\\"visibility:{{(vm.unseen_discussion_count > 0)?\\'\\':\\'hidden\\'}}\\\" ng-class=\\\"((vm.unseen_discussion_count <= 9)) ? \\'box-count-less\\' : \\'box-count\\'\\\">{{vm.unseen_discussion_count > 9 ? \\'9+\\' : vm.unseen_discussion_count}}</span></div><div class=discussion-text>DISCUSSION</div></span></div></span></div></div><!-- Details Header --><md-card class=m-b><md-card-content><div layout=column layout-gt-xs=row><div layout=column layout-align=\\\"space-between start\\\" layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\" flex=100 flex-gt-sm=45 class=margin-bottom-5><!-- Shipment Status Text --><div><div ng-show=!vm.data.isdelivered><div class=shiment-top-left><md-icon></md-icon><span class=text-upper translate=SHIPPINGDETAILS.ESTIMATED_DELIVERY></span></div></div><div ng-show=vm.data.isdelivered><div flex=100 class=shiment-top-left><md-icon></md-icon><span class=text-upper translate=SHIPPINGDETAILS.SHIPMENT_DELIVERED></span></div></div></div><!-- Due Text --><div ng-show=!vm.data.isdelivered><div class=shipment-day-remaining ng-if=\\\"vm.data.days_balance > 0\\\">{{vm.data.days_balance}} {{(vm.data.days_balance > 1)?\\'Days\\':\\'Day\\'}} Remaining</div><div class=shipment-day-remaining ng-if=\\\"vm.data.days_balance <= 0\\\">Due Immediately</div></div></div><!-- Milestone Text --><div flex=100 flex-gt-xs=50 layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\"><div></div><div><!-- ng-click=\\\"vm.gotoMilestome()\\\" --> <a href=#milestones-area du-smooth-scroll offset=80 duration=700 class=\\\"shipment-view-milestone-aljex text-upper\\\" translate=SHIPPINGDETAILS.VIEWALLMILESTONE style=\\\"cursor: pointer\\\"></a></div></div></div><div layout-gt-xs=row layout-xs=column class=m-b-sm layout-align-gt-xs=\\\"space-between start\\\" style=\\\"border-bottom: 1px solid #3f4c59\\\"><div flex=100 flex-gt-xs={{vm.showWayPointDiv?50:50}} class=shipment-main-caption class=m-b-xs><div flex=100 flex-gt-xs=95 class=margin-bottom-10>{{vm.data.load_display_date_time[\\'date_display\\'] | date:\\'EEE - MMM d, y\\' : \\'UTC\\'}}   {{vm.data.load_display_date_time[\\'time_display\\']}}</div><div class=bookmark-toolbar ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" style=\\\"margin-top: 10px; margin-bottom: 10px\\\"><md-button class=\\\"btn-outline btn-icon-l\\\" ng-click=\\\"vm.bookmarkShipment(\\'normal\\')\\\" ng-disabled=vm.isBookmarking><span class=\\\"fade {{vm.isBookmarking ? \\'fade-out\\' : \\'\\'}}\\\">{{vm.bookmarkButtonText | translate}}<md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarked}\\\"></md-icon></span><md-progress-circular md-mode=indeterminate ng-show=vm.isBookmarking class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><md-button class=\\\"btn-outline btn-gray\\\" ng-click=\\\"vm.showModal(ev, \\'bookmark/bookmarks-list\\')\\\"><span translate=SHIPPINGDETAILS.VIEW_BOOKMARKS></span></md-button><md-button ng-if=vm.discussion_visibility style=\\\"margin-top: 5px\\\" class=\\\"btn-outline btn-icon-l\\\" ng-click=\\\"vm.bookmarkShipmentDiscussion(\\'discussion\\')\\\" ng-disabled=vm.isBookmarkingDiscussion><span class=\\\"fade {{vm.isBookmarkingDiscussion ? \\'fade-out\\' : \\'\\'}}\\\">{{vm.bookmarkButtonTextDiscussion | translate}}<md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarkedDiscussion}\\\"></md-icon></span><md-progress-circular md-mode=indeterminate ng-show=vm.isBookmarkingDiscussion class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></div></div><div flex=100 flex-sm=50 ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/show-list-view/status_arrows.html\\'\\\" flex-gt-sm={{vm.showWayPointDiv?45:45}} class=m-b-xs></div></div><!-- Filter Section [SHOW LIST VIEW] --><div ng-if=vm.showWayPointDiv layout=column class=showListViewFilter ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/show-list-view/loads_filter.html\\'\\\"></div><!-- SHOW LIST VIEW --><div ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/show-list-view/show-list-view.html\\'\\\" layout=column layout-gt-sm=row flex=100 style=min-height:320px></div><!-- Details Section --><div flex=100 layout-gt-sm=row layout-align=\\\"space-between start\\\" class=\\\"shipment-customer-info-box m-t-sm\\\" ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/show-list-view/details.html\\'\\\"></div></md-card-content></md-card><!-- Milestones Section --><div class=p-a-sm id=milestones-area><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>{{\\'SHIPPINGDETAILS.MILESTONES\\' | translate | uppercase}}</span></h2></div></md-toolbar><div ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/milestones/milestones.html\\'\\\"></div></div><!-- More Shipping Details --><div style=display:block id=more_shipping_details ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/more-shipping/more-shipping.html\\'\\\"></div><!-- More Shipping Details --><div style=display:block id=accordion-invoices ng-if=vm.hasFinancialPermissions ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/invoices/invoice-list.html\\'\\\"></div><!-- More Shipping Details --><div style=display:block id=reference-area ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/reference-numbers/reference-numbers-list.html\\'\\\"></div><!-- Shipping Details Core Content --><!--<cva-accordion-group class=\\\"accordion-group-light\\\">\\r\\n\\r\\n <cva-accordion data-title=\\\"More Shipping Details\\\" data-icon=\\\"\\\" data-saved-expanded=\\\"{{vm.expandedShippingDetails}}\\\" id=\\\"more_shipping_details\\\" class=\\\"\\\" >\\r\\n\\r\\n <div layout=\\\"row\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedShippingDetails\\\" ng-change=\\\"vm.setShippingDetailsExpanded()\\\" aria-label=\\\"keep shipping details open\\\">\\r\\n Keep Shipping Details Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n\\r\\n <div layout-gt-sm=\\\"row\\\" class=\\\"\\\" style=\\\"margin-top:10px;\\\" ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/more-shipping/more-shipping.html\\'\\\" class=\\\"m-t-sm\\\"></div>\\r\\n\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion data-title=\\\"Invoice Details\\\" data-icon=\\\"\\\" id=\\\"accordion-invoices\\\" data-saved-expanded=\\\"{{vm.expandedInvoices}}\\\" ng-if=\\\"vm.hasFinancialPermissions\\\">\\r\\n <div layout=\\\"row\\\" layout-xs=\\\"column\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedInvoices\\\" ng-change=\\\"vm.setInvoicesExpanded()\\\" aria-label=\\\"keep invoices open\\\">\\r\\n Keep Invoices Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n <div ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/invoices/invoice-list.html\\'\\\"></div>\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion data-title=\\\"Invoice Details\\\" data-icon=\\\"\\\" id=\\\"accordion-invoices\\\" data-saved-expanded=\\\"{{vm.expandedInvoices}}\\\" ng-if=\\\"vm.hasFinancialPermissions\\\">\\r\\n <div layout=\\\"row\\\" layout-xs=\\\"column\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedInvoices\\\" ng-change=\\\"vm.setInvoicesExpanded()\\\" aria-label=\\\"keep invoices open\\\">\\r\\n Keep Invoices Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n <div ng-include=\\\"\\'/app/shipping-details/invoices/invoice-list.html\\'\\\"></div>\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion data-title=\\\"Container Details\\\" data-icon=\\\"\\\">\\r\\n <div class=\\\"scrollable\\\" ng-include=\\\"\\'/app/shipping-details/containers/container-list.html\\'\\\" ></div>\\r\\n </cva-accordion>\\r\\n\\r\\n <cva-accordion id=\\\"reference-area\\\" data-title=\\\"Reference Numbers\\\" data-icon=\\\"\\\" data-saved-expanded=\\\"{{vm.expandedRefNumbers}}\\\">\\r\\n <div layout=\\\"row\\\" layout-align=\\\"end center\\\" class=\\\"light-form\\\">\\r\\n <md-checkbox class=\\\"md-primary\\\" ng-model=\\\"vm.expandedRefNumbers\\\" ng-change=\\\"vm.setRefNumbersExpanded()\\\" aria-label=\\\"keep reference numbers open\\\">\\r\\n Keep Reference Numbers Open\\r\\n </md-checkbox>\\r\\n </div>\\r\\n <div ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/reference-numbers/reference-numbers-list.html\\'\\\" class=\\\"m-t-sm\\\"></div>\\r\\n </cva-accordion>\\r\\n\\r\\n </cva-accordion-group>--><!-- Documents Section --><div class=p-a-sm id=document-area><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span>DOCUMENTS</span></h2></div></md-toolbar><div ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/document-lists.html\\'\\\"></div></div><!--Shipment Discussion Chat--><div ng-if=vm.discussion_visibility id=reference-area layout-gt-sm=row layout-sm=column layout-xs=column class=shipment_discussion_chat><md-card flex-gt-sm=100 flex-lt-md=1 class=m-b ng-include=\\\"\\'/app/shipping-details/shipping-details-csl/discussion/index.html\\'\\\"></md-card></div><div layout-gt-sm=row layout-sm=column layout-xs=column ng-if=false><!-- Activity Log Section --><!-- <md-card class=\\\"\\\" flex-gt-xs=\\\"50\\\" flex-xs=\\\"1\\\" ng-include=\\\"\\'/app/shipping-details/activity-log/activity-log.html\\'\\\"></md-card> --><!-- Marks & Numbers --><!-- <md-card flex=\\\"50\\\" ng-include=\\\"\\'/app/shipping-details/marks-numbers/marks-numbers.html\\'\\\"></md-card> --></div></div><div ng-if=vm.failedToRetrieveData class=\\\"m-t m-b\\\" layout=row layout-align=\\\"center center\\\"><h2><span translate=SHIPPINGDETAILS.FAILED_TO_RETRIEVE_DATA></span> {{vm.failedToRetrieveData}}</h2></div></cva-shell>\");\n$templateCache.put(\"/app/track-trace/action-board/action-board-new.html\",\"<style>.fiveDayForecast md-card {\\r\\n margin: 1px;\\r\\n }\\r\\n \\r\\n .fiveDayForecast md-card md-toolbar {\\r\\n border-top-left-radius: 1px;\\r\\n border-top-right-radius: 1px;\\r\\n }\\r\\n \\r\\n .container {\\r\\n display: flex;\\r\\n flex-wrap: nowrap;\\r\\n \\r\\n }\\r\\n \\r\\n .circle-holder {\\r\\n width: 30px;\\r\\n height: 30px;\\r\\n border-radius: 50%;\\r\\n text-align: center;\\r\\n padding: 8px;\\r\\n margin-left: 10px;\\r\\n margin-top: -5px;\\r\\n }\\r\\n \\r\\n .delivered-Count {\\r\\n \\r\\n font-size: .7rem;\\r\\n background: rgb(58, 127, 61);\\r\\n color: #fff;\\r\\n \\r\\n }\\r\\n \\r\\n .unDelivered-Count {\\r\\n font-size: .7rem;\\r\\n background-color: #050b25;\\r\\n color: #fff;\\r\\n }\\r\\n \\r\\n #action-board {\\r\\n border-collapse: separate;\\r\\n border-spacing: 0 5px;\\r\\n \\r\\n width: 100%;\\r\\n }\\r\\n \\r\\n table#action-board {\\r\\n table-layout: auto;\\r\\n width: 100%;\\r\\n }\\r\\n \\r\\n #action-board th {\\r\\n padding: 8px;\\r\\n width: 0% !important;\\r\\n }\\r\\n \\r\\n #action-board tr td {\\r\\n padding: 15px 10px 15px 15px;\\r\\n background-color: #fff;\\r\\n color: #5E6163;\\r\\n }\\r\\n \\r\\n #action-board tbody tr td:last-child {\\r\\n border-top-right-radius: 6px;\\r\\n border-bottom-right-radius: 6px;\\r\\n }\\r\\n \\r\\n #action-board tbody tr td:first-child {\\r\\n border-top-left-radius: 6px;\\r\\n border-bottom-left-radius: 6px;\\r\\n }\\r\\n \\r\\n #action-board tbody tr {\\r\\n background: transparent;\\r\\n border-bottom: 1px solid #ccc;\\r\\n color: #5E6163;\\r\\n }\\r\\n \\r\\n #action-board th {\\r\\n padding-top: 12px;\\r\\n padding-bottom: 12px;\\r\\n text-align: left;\\r\\n background-color: #050b25;\\r\\n color: white;\\r\\n text-transform: uppercase;\\r\\n border-left: 3px solid #273144;\\r\\n \\r\\n }\\r\\n \\r\\n #action-board th:first-child {\\r\\n border-left: 0px;\\r\\n }\\r\\n \\r\\n #AdvSearch {\\r\\n margin: 15px 0px;\\r\\n }\\r\\n #Action-container md-card{\\r\\n background: transparent;\\r\\n }\\r\\n #Action-container md-card md-card-content{\\r\\n padding: 0px;\\r\\n }\\r\\n .action-bar{\\r\\n margin-top: 5px;\\r\\n }\\r\\n .notAuthorize{\\r\\n background: white;\\r\\n color: #000;\\r\\n text-align: center;\\r\\n padding: 30px;\\r\\n font-size: 22px;\\r\\n }</style><cva-shell autoscroll=true><div loadmask=!loader loadmask-fixed-center=true class=loadmask-fullscreen></div><div class=shell-padding><!-- Primary View Header --><div class=view-header id=header-view><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span><span class=md-display-1>{{actionBoardCtrl.heading_text}}</span><br></span></h2><span class=\\\"breadcrumb flat\\\"><a href={{actionBoardCtrl.link}} class=parent-link>{{actionBoardCtrl.heading_text}}</a></span></div></div></div><div layout-gt-sm=row class=p-l-sm ng-if=initTableData><span flex=auto></span><div hide show-gt-sm><!-- <md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=\\\"false\\\" ng-click=\\\"actionBoardCtrl.showCustomizeResults($event)\\\" ng-disabled =\\\"showList\\\" >\\r\\n {{\\'TRACKTRACE.CUSTOMIZE_RESULTS\\' | translate}}\\r\\n </md-button> --><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=\\\"actionBoardCtrl.filtersVisible = !actionBoardCtrl.filtersVisible\\\" analytics-on=click analytics-category=User analytics-event=TandT-Filter ng-disabled=showList>{{\\'TRACKTRACE.FILTER\\' | translate}}</md-button></div></div><div class=notAuthorize ng-if=notAuthorize>{{errorMessage}}</div><div id=Action-container ng-hide=beforeLoad><div class=fiveDayForecast><md-card flex=auto id=mdCard-{{$index}} ng-repeat=\\\"act_data in all_Action_boardData\\\"><md-toolbar ng-click=expandShipment(act_data,$index)><div class=md-toolbar-tools><h2 flex=90 layout-gt-xs=row layout-xs=column><span class=action-bar flex=20 id=font-range translate={{act_data.days}}></span> <span class=action-bar flex=45>{{act_data.dates | date:\\'dd-MMM-yyyy\\'}}</span> <span class=\\\"container action-bar\\\" flex=33>Delivered <span class=\\\"circle-holder delivered-Count\\\">{{tableData[$index].deliverd_count}}</span></span> <span class=\\\"container action-bar\\\" flex=33>UnDelivered<span class=\\\"circle-holder unDelivered-Count\\\">{{tableData[$index].undeliverd_count}}</span></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=!act_data.expandMoreShipping><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=act_data.expandMoreShipping><md-icon aria-label=options></md-icon></md-button><md-menu-content hide></md-menu-content></md-menu></div></md-toolbar><md-card-content class=\\\"slide white-container\\\" ng-show=\\\"act_data.expandMoreShipping || openAllShipment\\\"><div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\"><div layout=row class=track-trace-table ng-if=tableData[$index].shipment_records><!-- <div ng-if=\\\"act_data.dataLoading\\\" class=\\\"\\\">\\r\\n <img src=\\\"./../../../assets/images/icons/loader.gif\\\" width=\\\"20px\\\" height=\\\"20px;\\\"/>\\r\\n </div> --><ng-table-action-board-table flex=100 day=tableData[$index].shipment_records actionboardctrl=actionBoardCtrl class=\\\"loadmask-light loadmask-opaque track-trace-table\\\"></ng-table-action-board-table></div></div></md-card-content></md-card></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/track-trace/action-board/action-board.html\",\"<!-- <style>\\r\\n .fiveDayForecast md-card {\\r\\n margin: 1px;\\r\\n }\\r\\n\\r\\n .fiveDayForecast md-card md-toolbar {\\r\\n border-top-left-radius: 1px;\\r\\n border-top-right-radius: 1px;\\r\\n }\\r\\n\\r\\n .container {\\r\\n display: flex;\\r\\n flex-wrap: nowrap;\\r\\n\\r\\n }\\r\\n\\r\\n .circle-holder {\\r\\n width: 30px;\\r\\n height: 30px;\\r\\n border-radius: 50%;\\r\\n text-align: center;\\r\\n padding: 8px;\\r\\n margin-left: 10px;\\r\\n margin-top: -5px;\\r\\n }\\r\\n\\r\\n .delivered-Count {\\r\\n\\r\\n font-size: .7rem;\\r\\n background: rgb(58, 127, 61);\\r\\n color: #fff;\\r\\n\\r\\n }\\r\\n\\r\\n .unDelivered-Count {\\r\\n font-size: .7rem;\\r\\n background-color: #050b25;\\r\\n color: #fff;\\r\\n }\\r\\n\\r\\n #action-board {\\r\\n border-collapse: separate;\\r\\n border-spacing: 0 5px;\\r\\n\\r\\n width: 100%;\\r\\n }\\r\\n\\r\\n table#action-board {\\r\\n table-layout: auto;\\r\\n width: 100%;\\r\\n }\\r\\n\\r\\n #action-board th {\\r\\n padding: 8px;\\r\\n width: 0% !important;\\r\\n }\\r\\n\\r\\n #action-board tr td {\\r\\n padding: 15px 10px 15px 15px;\\r\\n background-color: #fff;\\r\\n color: #5E6163;\\r\\n }\\r\\n\\r\\n #action-board tbody tr td:last-child {\\r\\n border-top-right-radius: 6px;\\r\\n border-bottom-right-radius: 6px;\\r\\n }\\r\\n\\r\\n #action-board tbody tr td:first-child {\\r\\n border-top-left-radius: 6px;\\r\\n border-bottom-left-radius: 6px;\\r\\n }\\r\\n\\r\\n #action-board tbody tr {\\r\\n background: transparent;\\r\\n border-bottom: 1px solid #ccc;\\r\\n color: #5E6163;\\r\\n }\\r\\n\\r\\n #action-board th {\\r\\n padding-top: 12px;\\r\\n padding-bottom: 12px;\\r\\n text-align: left;\\r\\n background-color: #050b25;\\r\\n color: white;\\r\\n text-transform: uppercase;\\r\\n border-left: 3px solid #273144;\\r\\n\\r\\n }\\r\\n\\r\\n #action-board th:first-child {\\r\\n border-left: 0px;\\r\\n }\\r\\n\\r\\n #AdvSearch {\\r\\n margin: 15px 0px;\\r\\n }\\r\\n #Action-container md-card{\\r\\n background: transparent;\\r\\n }\\r\\n #Action-container md-card md-card-content{\\r\\n padding: 0px;\\r\\n }\\r\\n .action-bar{\\r\\n margin-top: 5px;\\r\\n }\\r\\n .notAuthorize{\\r\\n background: white;\\r\\n color: #000;\\r\\n text-align: center;\\r\\n padding: 30px;\\r\\n font-size: 22px;\\r\\n }\\r\\n</style>\\r\\n\\r\\n\\r\\n<cva-shell autoscroll=\\\"true\\\">\\r\\n <div loadmask=\\\"!loader\\\" loadmask-fixed-center=\\\"true\\\" class=\\\"loadmask-fullscreen\\\"></div>\\r\\n <div class=\\\"shell-padding\\\">\\r\\n <div class=\\\"view-header\\\" id=\\\"header-view\\\">\\r\\n <div layout-xs=\\\"column\\\" layout-gt-xs=\\\"row\\\">\\r\\n <div flex=\\\"auto\\\">\\r\\n <h2>\\r\\n <span>\\r\\n <span class=\\\"md-display-1\\\">{{actionBoardCtrl.heading_text}}</span><br>\\r\\n </span>\\r\\n </h2>\\r\\n <span class=\\\"breadcrumb flat\\\">\\r\\n <a href=\\\"{{actionBoardCtrl.link}}\\\" class=\\\"parent-link\\\">{{actionBoardCtrl.heading_text}}</a>\\r\\n </span>\\r\\n </div>\\r\\n \\r\\n </div>\\r\\n </div>\\r\\n\\r\\n <div layout-gt-sm=\\\"row\\\" class=\\\"p-l-sm\\\">\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <div hide show-gt-sm>\\r\\n <md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=\\\"false\\\" ng-click=\\\"actionBoardCtrl.showCustomizeResults($event)\\\" ng-disabled =\\\"showList\\\" >\\r\\n {{\\'TRACKTRACE.CUSTOMIZE_RESULTS\\' | translate}}\\r\\n </md-button>\\r\\n\\r\\n <md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=\\\"false\\\" ng-click=\\\"actionBoardCtrl.filtersVisible = !actionBoardCtrl.filtersVisible\\\"\\r\\n analytics-on=\\\"click\\\" analytics-category=\\\"User\\\" analytics-event=\\\"TandT-Filter\\\" ng-disabled =\\\"showList\\\">\\r\\n {{\\'TRACKTRACE.FILTER\\' | translate}}\\r\\n </md-button>\\r\\n </div>\\r\\n\\r\\n </div>\\r\\n <div class=\\\"notAuthorize\\\" ng-if=\\\"notAuthorize\\\">\\r\\n {{errorMessage}}\\r\\n </div>\\r\\n <div id=\\\"Action-container\\\">\\r\\n <div class=\\\"fiveDayForecast\\\">\\r\\n \\r\\n <md-card flex=\\\"auto\\\" id=\\\"mdCard-{{$index}}\\\"\\r\\n ng-repeat=\\\"act_data in all_Action_boardData\\\">\\r\\n <md-toolbar ng-click=\\\"expandShipment(act_data,$index)\\\">\\r\\n <div class=\\\"md-toolbar-tools \\\">\\r\\n <h2 flex=\\\"90\\\" layout-gt-xs=\\\"row\\\" layout-xs=\\\"column\\\">\\r\\n\\r\\n <span class=\\\"action-bar\\\" flex=\\\"20\\\" id=\\\"font-range\\\" translate=\\\"{{act_data.day}}\\\"></span>\\r\\n <span class=\\\"action-bar\\\" flex=\\\"45\\\">{{act_data.date | date:\\'dd-MMM-yyyy\\'}}</span>\\r\\n <span class=\\\"container action-bar\\\" flex=\\\"33\\\">Delivered <span\\r\\n class=\\\"circle-holder delivered-Count\\\">{{act_data.deliverd_count}}</span></span>\\r\\n <span class=\\\"container action-bar\\\" flex=\\\"33\\\">UnDelivered<span\\r\\n class=\\\"circle-holder unDelivered-Count\\\">{{act_data.undeliverd_count}}</span></span>\\r\\n </h2>\\r\\n <span flex=\\\"auto\\\">\\r\\n\\r\\n </span>\\r\\n <md-menu md-position-mode=\\\"target-right target\\\">\\r\\n <md-button class=\\\"md-icon-button\\\" ng-if=\\\"!act_data.expandMoreShipping\\\">\\r\\n <md-icon aria-label=\\\"options\\\">\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-if=\\\"act_data.expandMoreShipping\\\">\\r\\n <md-icon aria-label=\\\"options\\\">\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n <md-menu-content hide></md-menu-content>\\r\\n </md-menu>\\r\\n </div>\\r\\n </md-toolbar>\\r\\n\\r\\n <md-card-content class=\\\"slide white-container\\\" ng-show=\\\"act_data.expandMoreShipping || openAllShipment\\\">\\r\\n <div flex=\\\"auto\\\" class=\\\"loading-container bookmarks-widget has-menu\\\">\\r\\n\\r\\n\\r\\n <div layout=\\\"row\\\" class=\\\"track-trace-table\\\">\\r\\n <ng-table-action-board-table flex=\\\"100\\\" day=\\\"act_data.shipment_records\\\" actionboardctrl=\\\"actionBoardCtrl\\\" class=\\\"loadmask-light loadmask-opaque track-trace-table\\\"></ng-table-action-board-table>\\r\\n </div>\\r\\n\\r\\n\\r\\n </div>\\r\\n </md-card-content>\\r\\n </md-card>\\r\\n </div>\\r\\n </div>\\r\\n </div>\\r\\n\\r\\n</cva-shell> -->\");\n$templateCache.put(\"/app/track-trace/customize-results/customize-results.html\",\"<style type=text/css>@media screen and (max-width: 768px) and (min-width: 320px){\\r\\n .font-css{\\r\\n font-size: 11px;\\r\\n }\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Customize Results Modal\\\" ng-controller=\\\"CustomizeResultsController as customizeCtrl\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><span hide-gt-xs show-xs hide-gt-xs>Customize Results</span><div layout=row hide-xs show-gt-xs flex=1><div flex=50 layout-margin><h2 translate=TRACKTRACE.ACTIVE_DATA></h2></div><div flex=50 layout-margin><h2 translate=TRACKTRACE.AVAILABLE_DATA></h2></div></div><span flex=auto hide-gt-xs show-xs></span><md-button class=md-icon-button ng-click=customizeCtrl.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content><div><div layout-gt-xs=row><div flex-gt-xs=50 flex-xs=1 class=\\\"active-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Active Columns</h3><!--<div layout=\\\"row\\\" ng-if=\\\"customizeCtrl.activeColumns.length > 11 || customizeCtrl.activeSearchField.length > 0\\\">\\r\\n <md-input-container flex=\\'90\\' class=\\\"md-block error-hidden\\\" flex-gt-sm=\\\"auto\\\">\\r\\n <label>{{\\'TRACKTRACE.SEARCH_ACTIVE_COLUMNS\\' | translate}}</label>\\r\\n <input type=\\\"text\\\"\\r\\n ng-model=\\\"customizeCtrl.activeSearchField\\\"\\r\\n ng-change=\\\"customizeCtrl.activeSearchChange()\\\"\\r\\n name=\\\"search\\\" />\\r\\n </md-input-container>\\r\\n <div flex=\\'10\\'>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"customizeCtrl.clickedActiveSearchX()\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n </div>--><div class=sortable-container as-sortable=customizeCtrl.dragListener() ng-model=customizeCtrl.activeColumns ng-style=\\\"{ true: {height: (customizeCtrl.colHeight) + \\'px\\'}, false: {height: (customizeCtrl.colHeight + 25) +\\'px\\'}}[customizeCtrl.activeColumns.length > 120]\\\"><md-card ng-repeat=\\\"column in customizeCtrl.activeColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle><div layout=row flex=auto layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><span flex=auto translate={{column.title}}></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Remove Field\\\" ng-click=customizeCtrl.remove(column)><span translate=TRACKTRACE.REMOVE_BUTT></span></md-button></div></md-card-content></md-card></div></div><div flex-gt-xs=50 flex-xs=1 class=\\\"available-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Available Columns</h3><div layout=row><md-input-container flex=\\\"{{customizeCtrl.availableSearchField.length >= 0 ? 90 : 100}}\\\" class=\\\"md-block error-hidden\\\" flex-gt-sm=auto><label translate=TRACKTRACE.SEARCH_COLUMNS></label><input type=text ng-model=customizeCtrl.availableSearchField ng-change=customizeCtrl.availableSearchChange() name=search></md-input-container><div flex=10 ng-if=\\\"customizeCtrl.availableSearchField.length >= 0\\\"><md-button class=\\\"md-icon-button btn-sm input-field-addon\\\" ng-click=customizeCtrl.clickedAvailableSearchX()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><div class=sortable-container as-sortable=customizeCtrl.dragListener() ng-model=customizeCtrl.availableColumns ng-style=\\\"{ true: {height: (customizeCtrl.colHeight -45 ) + \\'px\\'}, false: {height: (customizeCtrl.colHeight + 20 ) +\\'px\\'}}[true]\\\"><md-card ng-repeat=\\\"column in customizeCtrl.availableColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle ng-if=\\\"((column.field == \\'totalinvoiceamount\\' || column.field == \\'customerpartyid\\' ) ?((customizeCtrl.is_consignee_user == \\'true\\')?false:(!customizeCtrl.hasFinancialPermissions)?false:true):true)\\\"><div layout=row flex=auto layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><span flex=auto translate={{column.title}}></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Add Column\\\" ng-click=customizeCtrl.add(column)><span translate=TRACKTRACE.ADD_BUTT></span></md-button></div></md-card-content></md-card></div></div></div></div></md-dialog-content><md-dialog-actions layout=row class=dialog-footer-border><md-button aria-label=\\\"Cancel Customization\\\" ng-click=customizeCtrl.cancel() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button aria-label=\\\"Save As Default\\\" ng-click=customizeCtrl.saveToDefault()><span class=font-css translate=TRACKTRACE.SAVE_DEFAULT_CRITERIA></span></md-button><md-button aria-label=\\\"Load Default Criteria\\\" ng-click=customizeCtrl.restoreDefault()><span class=font-css translate=TRACKTRACE.RESTORE_DEFAULT_CRITERIA></span></md-button><md-button class=\\\"md-raised md-accent\\\" aria-label=\\\"Submit Customization\\\" ng-click=customizeCtrl.submit()><span translate=TRACKTRACE.SUBMIT></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/track-trace/exports/export-csv.html\",\"<md-dialog class=export-csv aria-label=\\\"Export CSV\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><h2 translate=\\\"{{exportCsvLoaded ? \\'TRACKTRACE.EXPORT\\' : \\'TRACKTRACE.EXPORTING\\'}}\\\"></h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content flex-fill flex=auto style=\\\"min-height: 120px\\\"><div class=loadmask-light loadmask=exportCsvLoaded ng-if=!exportCsvLoaded style=position:absolute;top:52px;left:0;right:0;bottom:0></div><div class=md-dialog-content ng-show=exportCsvLoaded><p><span translate=TRACKTRACE.EXPORT_LINE_1 style=\\\"color: #ffffff\\\"></span></p><p><span translate=TRACKTRACE.EXPORT_LINE_2 style=\\\"color: #ffffff\\\"></span></p></div></md-dialog-content><md-dialog-actions layout=row ng-show=exportCsvLoaded><md-button ng-click=closeDialog() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" ng-click=exportCustom()><span translate=TRACKTRACE.EXPORT_CUSTOM></span></md-button><md-button class=\\\"md-raised md-accent\\\" ng-click=exportAll()><span translate=TRACKTRACE.EXPORT_ALL></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/track-trace/exports/no-results.html\",\"<md-dialog class=\\\"export-csv md-card-light\\\" aria-label=\\\"Export CSV\\\" ng-cloak><md-toolbar><div class=md-toolbar-tools><h2 translate=TRACKTRACE.EXPORT></h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding><p><span translate=TRACKTRACE.NORESULTS style=\\\"color: #ffffff\\\"></span></p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"end center\\\"><md-button class=md-raised ng-click=closeDialog()><span translate=TRACKTRACE.CANCEL></span></md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/track-trace/in-memory-table/in-memory-table-shipments.html\",\"<md-content flex=auto ng-controller=\\\"InMemoryTableController as vm\\\"><md-card><md-card-header><span translate=TRACKTRACE.SHIPMENTS></span></md-card-header><md-table-container><table md-table md-row-select=vm.options.rowSelection multiple ng-model=vm.selected md-progress=vm.promise><thead ng-if=!vm.options.decapitate md-head md-order=vm.query.order md-on-reorder=\\\"\\\"><tr md-row id=header><!-- Generate th headers based on active columns --><th ng-repeat=\\\"col in vm.columns\\\" md-column md-order-by={{col.name}}>{{col.value}}</th></tr></thead><tbody md-body><tr md-row md-select=shipment md-on-select=logShipment md-select-id=name md-auto-select=vm.options.autoSelect ng-repeat=\\\"shipment in vm.shipments | orderBy:vm.query.order | limitTo: vm.query.limit : (vm.query.page -1) * vm.query.limit\\\"><!-- Generate td based on active columns --><td md-cell ng-repeat=\\\"col in vm.columns\\\">{{shipment[col.name]}}</td></tr></tbody></table></md-table-container><md-table-pagination md-limit=vm.query.limit md-limit-options=vm.limitOptions md-page=vm.query.page md-total={{vm.shipments.length}} md-page-select></md-table-pagination></md-card></md-content>\");\n$templateCache.put(\"/app/track-trace/quick-search/quick-search.html\",\"<style>.state_dropdown{\\r\\n margin:0px;\\r\\n box-sizing:border-box;\\r\\n }\\r\\n\\r\\n .state_dropdown label{\\r\\n display:none;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete{\\r\\n padding: 0px;\\r\\n margin:0px;\\r\\n height: 68px;\\r\\n background-color: #fff;\\r\\n width: 100%;\\r\\n box-sizing:border-box;\\r\\n z-index:0;\\r\\n border-radius:0px;\\r\\n margin-top: -2px;\\r\\n margin-left: -2px;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete-wrap{\\r\\n padding: 0px;\\r\\n height: 68px;\\r\\n padding: 1.3rem;\\r\\n width: 100%;\\r\\n box-sizing:border-box;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete-wrap button{\\r\\n display:none;\\r\\n }\\r\\n\\r\\n .state_dropdown input[type=\\'search\\']{\\r\\n border-bottom: 0px !important;\\r\\n }\\r\\n\\r\\n .light-form md-input-container .md-input:not([disabled]), .light-form md-select md-select-value{\\r\\n color: rgb(117,117,117) !important;\\r\\n }</style><form id=quick_search_form ng-submit=trackTraceCtrl.quickSearch(trackTraceCtrl.queryVal)><div layout-gt-xs=row layout-xs=column class=\\\"search-group {{trackTraceCtrl.searchType == \\'ship_date\\' || trackTraceCtrl.searchType == \\'due_date\\' ? \\'col-tablet-sm\\' : \\'\\'}}\\\"><div><!-- Search Options Menu --><md-menu md-position-mode=\\\"target target\\\" md-offset=\\\"0 60\\\"><md-button aria-label=\\\"Open demo menu\\\" class=\\\"md-raised search-type md-accent\\\" ng-click=$mdOpenMenu($event) layout-gt-xs=row><span ng-if=\\\"trackTraceCtrl.searchType == \\'reference_number\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.REFERENCE_NUM></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'status\\' && !trackTraceCtrl.booking_number_quick_search\\\"><span class=responsive-ellipsis translate=TRACKTRACE.STATUS></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'bol_number\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.AWB_BOL></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'shipper_name\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.SHIPPER></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'invoice_number\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.INVOICE_NUMBER></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'consignee_name\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.CONSIGNEE></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'container_number\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.CONTAINER_NUM></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'consol_number\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.MAWB_MBL></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'origin_code\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.ORIGIN></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'destination_code\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.DESTINATION></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'due_date\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.DUE_DATE></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'pod_eta_date\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.POD_DATE></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'pol_etd_date\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.ETD_DATE></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'ship_date\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.START_DATE></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'estimated_date\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.ESTIMATED_DATE></span> </span><span ng-if=\\\"trackTraceCtrl.searchType == \\'booking_number\\' && trackTraceCtrl.booking_number_quick_search\\\"><span class=responsive-ellipsis translate=TRACKTRACE.BOOKED></span></span><md-icon></md-icon></md-button><md-menu-content width=4><md-menu-item ng-hide=!trackTraceCtrl.booking_number_quick_search><md-button ng-click=\\\"trackTraceCtrl.searchChange(\\'booking_number\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.BOOKED></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-click=\\\"trackTraceCtrl.searchChange(\\'reference_number\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.REFERENCE_NUM></span></p></div></md-button></md-menu-item><md-menu-item ng-hide=trackTraceCtrl.booking_number_quick_search><md-button aria-label=\\\"Search By Status\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'status\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.STATUS></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By AWB/BOL\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'bol_number\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.AWB_BOL></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Shipper Name\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'shipper_name\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.SHIPPER></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Invoice #\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'invoice_number\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.INVOICE_NUMBER></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Consignee Name\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'consignee_name\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.CONSIGNEE></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Container #\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'container_number\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.CONTAINER_NUM></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By MAWB/MBL #\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'consol_number\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.MAWB_MBL></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Origin\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'origin_code\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.ORIGIN></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Destination\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'destination_code\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.DESTINATION></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Due Date\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'due_date\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.DUE_DATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By POD ETA\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'pod_eta_date\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.POD_DATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By POL ETD\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'pol_etd_date\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.ETD_DATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Start Date\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'ship_date\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.START_DATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Estimated Date\\\" ng-click=\\\"trackTraceCtrl.searchChange(\\'estimated_date\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.ESTIMATED_DATE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div><div flex=auto class=light-form><!-- Search Field --><div ng-show=\\\"trackTraceCtrl.searchType == \\'reference_number\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCtrl.queryVal name=query aria-label=\\\"Search By Reference Number\\\" placeholder=\\\"Search by {{\\'TRACKTRACE.REFERENCE_NUM\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- BOOKED --><div ng-show=\\\"trackTraceCtrl.searchType == \\'booking_number\\' && trackTraceCtrl.booking_number_quick_search \\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCtrl.queryVal name=query aria-label=\\\"Search By Booked Number\\\" placeholder=\\\"Search by {{\\'TRACKTRACE.BOOKED\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- BOL --><div ng-show=\\\"trackTraceCtrl.searchType == \\'bol_number\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCtrl.queryVal name=query placeholder=\\\"Search by {{\\'TRACKTRACE.AWB_BOL\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- STATUS --><div ng-show=\\\"trackTraceCtrl.searchType == \\'status\\' && !trackTraceCtrl.booking_number_quick_search\\\"><div layout-gt-xs=row><div flex-gt-xs=93><md-select ng-model=trackTraceCtrl.selectedStatus ng-change=\\\"\\\" class=clear-fields placeholder=\\\"Select a status\\\" md-on-open=trackTraceCtrl.onSelectOpen() md-on-close=trackTraceCtrl.onSelectClose()><md-option ng-repeat=\\\"status in trackTraceCtrl.statusList\\\">{{status.value}}</md-option></md-select></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Shipper Name --><div ng-show=\\\"trackTraceCtrl.searchType == \\'shipper_name\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCtrl.queryVal name=query placeholder=\\\"Search by {{\\'TRACKTRACE.SHIPPER\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Invoice # --><div ng-show=\\\"trackTraceCtrl.searchType == \\'invoice_number\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCtrl.queryVal name=query placeholder=\\\"Search by {{\\'TRACKTRACE.INVOICE_NUMBER\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Consignee Name --><div ng-show=\\\"trackTraceCtrl.searchType == \\'consignee_name\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCtrl.queryVal name=query placeholder=\\\"Search by {{\\'TRACKTRACE.CONSIGNEE\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Container # --><div ng-show=\\\"trackTraceCtrl.searchType == \\'container_number\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCtrl.queryVal name=query placeholder=\\\"Search by {{\\'TRACKTRACE.CONTAINER_NUM\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Consol # --><div ng-show=\\\"trackTraceCtrl.searchType == \\'consol_number\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCtrl.queryVal name=query placeholder=\\\"Search by {{\\'TRACKTRACE.MAWB_MBL\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- ORIGIN --><div ng-show=\\\"trackTraceCtrl.searchType == \\'origin_code\\'\\\" class=date-search><div layout-gt-xs=row><div flex-gt-xs=93><md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\"><md-autocomplete md-no-cache=false md-selected-item=trackTraceCtrl.selectedOrigin md-search-text-change=\\\"\\\" md-min-length=3 md-search-text=trackTraceCtrl.searchOriginText md-items=\\\"item in trackTraceCtrl.getMatch(\\'citycountry\\', trackTraceCtrl.searchOriginText)\\\" md-item-text=item.display placeholder=\\\"Enter origin\\\"><md-item-template><span md-highlight-text=trackTraceCtrl.searchOriginText md-highlight-flags=^i>{{item.display}}</span></md-item-template><md-not-found>No origin matching \\\"{{trackTraceCtrl.searchOriginText}}\\\" were found.</md-not-found></md-autocomplete></md-input-container></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- DESTINATION --><div ng-show=\\\"trackTraceCtrl.searchType == \\'destination_code\\'\\\" class=date-search><div layout-gt-xs=row><div flex-gt-xs=93><md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\"><md-autocomplete md-no-cache=false md-selected-item=trackTraceCtrl.selectedDestination md-search-text-change=\\\"\\\" md-min-length=3 md-search-text=trackTraceCtrl.searchDestinationText md-items=\\\"item in trackTraceCtrl.getMatch(\\'citycountry\\', trackTraceCtrl.searchDestinationText)\\\" md-item-text=item.display placeholder=\\\"Enter destination\\\"><md-item-template><span md-highlight-text=trackTraceCtrl.searchDestinationText md-highlight-flags=^i>{{item.display}}</span></md-item-template><md-not-found>No destination matching \\\"{{trackTraceCtrl.searchDestinationText}}\\\" were found.</md-not-found></md-autocomplete></md-input-container></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- DUE DATE --><div ng-show=\\\"trackTraceCtrl.searchType == \\'due_date\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"From Due Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.due_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"To Due Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.due_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCtrl.dueDateRangeSelect ng-change=trackTraceCtrl.selectRange() placeholder=\\\"or select a range\\\" aria-label=\\\"or select a range\\\" md-on-open=trackTraceCtrl.onSelectOpen() md-on-close=trackTraceCtrl.onSelectClose() aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCtrl.ranges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- POd DATE --><div ng-show=\\\"trackTraceCtrl.searchType == \\'pod_eta_date\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"From POD ETA\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.eta_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"To POD ETA\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.eta_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCtrl.etaDateRangeSelect ng-change=trackTraceCtrl.selectRange() placeholder=\\\"or select a range\\\" md-on-open=trackTraceCtrl.onSelectOpen() md-on-close=trackTraceCtrl.onSelectClose()><md-option ng-repeat=\\\"range in trackTraceCtrl.ranges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- POd edt DATE --><div ng-show=\\\"trackTraceCtrl.searchType == \\'pol_etd_date\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"From POL ETD\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.etd_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"To POL ETD\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.etd_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCtrl.etdDateRangeSelect ng-change=trackTraceCtrl.selectRange() placeholder=\\\"or select a range\\\" md-on-open=trackTraceCtrl.onSelectOpen() md-on-close=trackTraceCtrl.onSelectClose()><md-option ng-repeat=\\\"range in trackTraceCtrl.ranges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- SHIP DATE --><div ng-show=\\\"trackTraceCtrl.searchType == \\'ship_date\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"From Start Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.ship_start_date></mdp-date-picker></div><div flex-gt-xs=31><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"To Start Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.ship_end_date></mdp-date-picker></div><div flex-gt-xs=31><md-select ng-model=trackTraceCtrl.shipDateRangeSelect ng-change=trackTraceCtrl.selectRange() placeholder=\\\"or select a range\\\" aria-label=\\\"or select a range\\\" md-on-open=trackTraceCtrl.onSelectOpen() md-on-close=trackTraceCtrl.onSelectClose() aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCtrl.ranges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- ESTIMATED DATE --><div ng-show=\\\"trackTraceCtrl.searchType == \\'estimated_date\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"From Estimated Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.estimated_start_date></mdp-date-picker></div><div flex-gt-xs=31><mdp-date-picker mdp-format=MM/DD/YYYY mdp-min-date=trackTraceCtrl.minDate mdp-placeholder=\\\"To Estimated Date\\\" ng-change=trackTraceCtrl.dateChanged() ng-model=trackTraceCtrl.estimated_end_date></mdp-date-picker></div><div flex-gt-xs=31><md-select ng-model=trackTraceCtrl.estimatedDateRangeSelect ng-change=trackTraceCtrl.selectRange() placeholder=\\\"or select a range\\\" aria-label=\\\"or select a range\\\" md-on-open=trackTraceCtrl.onSelectOpen() md-on-close=trackTraceCtrl.onSelectClose() aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCtrl.ranges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div></div></div></form>\");\n$templateCache.put(\"/app/track-trace/server-table/filterDate.html\",\"<mdp-date-picker mdp-format=MM/DD/YYYY ng-model=vm.filters[name] ng-change=vm.filterDate(name) class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-date-picker>\");\n$templateCache.put(\"/app/track-trace/server-table/filterDefault.html\",\"<md-input-container class=error-hidden><input type=text name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" ng-minlength=3 class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container>\");\n$templateCache.put(\"/app/track-trace/server-table/filterHeader.html\",\"<tr ng-show=show_filter class=ng-table-filters><th data-title-text=\\\"{{$column.titleAlt(this) || $column.title(this)}}\\\" ng-repeat=\\\"$column in $columns\\\" ng-if=$column.show(this) class=\\\"filter {{$column.class(this)}}\\\"><div ng-repeat=\\\"(name, filter) in $column.filter(this)\\\"><div ng-include=config.getTemplateUrl(filter)></div></div></th></tr>\");\n$templateCache.put(\"/app/track-trace/server-table/filterNone.html\",\"\");\n$templateCache.put(\"/app/track-trace/server-table/filterStatus.html\",\"<md-input-container class=md-block><md-select ng-if=\\\"!trackTraceCtrl.bookingMode && !trackTraceCtrl.transitMode\\\" ng-model=params.filter()[name] name={{name}} ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() ng-disabled=$filterRow.disabled aria-label={{name}}><md-option ng-value=null>—</md-option><md-option ng-if=\\\"searchParamStatusVal == \\'none\\' || searchParamStatusVal == 1\\\" ng-value=1><!-- ng-value used to set true or false which ng-table needs --> Delivered</md-option><md-option ng-if=\\\"searchParamStatusVal == \\'none\\' || searchParamStatusVal == 0\\\" ng-value=0>Undelivered</md-option><md-option ng-if=\\\"searchParamStatusVal == \\'none\\' || searchParamStatusVal == 2\\\" ng-value=2>N/A</md-option><md-option ng-if=\\\"searchParamStatusVal == \\'none\\' || searchParamStatusVal == 3\\\" ng-value=3>Booked</md-option></md-select></md-input-container>\");\n$templateCache.put(\"/app/track-trace/server-table/header.html\",\"<ng-table-sorter-row-server-table></ng-table-sorter-row-server-table><ng-table-filter-row-cview></ng-table-filter-row-cview>\");\n$templateCache.put(\"/app/track-trace/server-table/pagination.html\",\"<div class=\\\"ng-table-pager m-t-sm ng-scope\\\" ng-if=params.data.length ng-controller=\\\"ServerTableController as vm\\\"><div layout-gt-xs=row layout-xs=column><div><ul ng-if=pages.length class=\\\"pagination ng-table-pagination ng-scope\\\"><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=\\\"ng-scope disabled\\\"><a ng-switch-when=prev ng-click=vm.page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope>«</a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=first ng-click=vm.page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>1</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=page ng-click=vm.page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>2</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=last ng-click=vm.page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>3</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=next ng-click=vm.page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope>»</a></li></ul></div><span flex></span><div ng-if=params.settings().counts.length class=\\\"ng-table-counts btn-group pull-right ng-scope\\\"><div><md-button ng-repeat=\\\"count in params.settings().counts\\\" ng-class=\\\"{\\'md-primary\\':params.count()==count}\\\" ng-click=vm.per_page(count);params.count(count) aria-label=\\\"Results Per Page\\\" class=\\\"md-raised md-default\\\"><span ng-bind=count class=ng-binding></span></md-button></div><span class=md-caption>Records per page</span></div></div></div>\");\n$templateCache.put(\"/app/track-trace/server-table/server-table.html\",\"<div ng-controller=\\\"ServerTableController as vm\\\" class=table-scroll ng-style=\\\"(vm.noResults || vm.isError) ? {\\'overflow-x\\':\\'hidden\\'} : {}\\\"><div class=loadmask-light loadmask=!vm.isLoading><table ng-table-dynamic=\\\"vm.tableParams with vm.columns\\\" template-header=/app/track-trace/server-table/header.html template-pagination=/app/track-trace/server-table/pagination.html class=card-table show-filter=trackTraceCtrl.filtersVisible><tbody><tr ng-repeat=\\\"row in $data\\\" ng-click=\\\"trackTraceCtrl.getShipment(row, $event)\\\"><td ng-repeat=\\\"col in $columns\\\" ng-if=col.field><span class=hoverable ng-if=\\\"col.field == \\'flag\\'\\\"><md-icon ng-if=\\\"row.flag == \\'current_exception\\'\\\" class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\" ng-mouseover=vm.getException(row.gshpid)></md-icon><md-icon ng-if=\\\"row.flag == \\'potential_exception\\'\\\" class=potential-exception title=\\\"potential exception\\\" aria-label=\\\"potential exception\\\" ng-mouseover=vm.getPotentialException(row.gshpid)></md-icon><md-tooltip ng-if=\\\"row.flag == \\'current_exception\\'\\\" md-direction=right><md-progress-circular md-mode=indeterminate class=\\\"md-warn md-hue-2\\\" ng-show=vm.tooltipIsLoading></md-progress-circular><p ng-show=!vm.tooltipIsLoading>Current Exception: <span>{{vm.response.code}}</span></p><p ng-show=!vm.tooltipIsLoading>Description: <span>{{vm.response.description}}</span></p></md-tooltip><md-tooltip ng-if=\\\"row.flag == \\'potential_exception\\'\\\" md-direction=right><md-progress-circular md-mode=indeterminate class=tracktracetooltip ng-show=vm.tooltipIsLoading></md-progress-circular><p ng-show=!vm.tooltipIsLoading>Current Potential Exception: <span>{{vm.response.title}}</span></p><p ng-show=!vm.tooltipIsLoading>Description: <span>{{vm.response.description}}</span></p></md-tooltip></span><span ng-if=\\\"col.field != \\'flag\\'\\\"><a target=_blank ng-href=/shipping-details/{{row.gshpid}} ng-if=\\\"col.field==\\'isdelivered\\' && row[\\'isbooked\\']\\\" class=\\\"text-strong text-success\\\"><!--{{row[col.field] == \\'true\\' ? \\'Delivered\\' : vm.checkStatus(row)}}--> Booked </a><a target=_blank ng-href=/shipping-details/{{row.gshpid}} ng-if=\\\"col.field == \\'isdelivered\\' && !row[\\'isbooked\\']\\\" class=\\\"{{(row[col.field] == \\'true\\' || row[col.field] == \\'booking\\') ? \\'\\' : \\'text-strong text-success\\' }}\\\">{{row[col.field] == \\'true\\' ? \\'Delivered\\' : vm.checkStatus(row)}} </a><a target=_blank ng-href=/shipping-details/{{row.gshpid}} class={{col.link_class}} ng-if=\\\"col.field != \\'isdelivered\\' && col.field != \\'destination\\' && col.field != \\'origin\\'\\\">{{col.isDate ? (row[col.field] | date:\\'dd-MMM-yyyy\\': \\'UTC\\') : row[col.field]}} </a><a target=_blank ng-href=/shipping-details/{{row.gshpid}} ng-if=\\\"col.field == \\'origin\\'\\\">{{col.origin = row.origin != null ? (row.origin + \\\", \\\" + (row.originstate || row.origincountrycode)) : \\'\\' }} </a><a target=_blank ng-href=/shipping-details/{{row.gshpid}} ng-if=\\\"col.field == \\'destination\\'\\\">{{col.destination = row.destination != null ? (row.destination + \\\", \\\" + (row.destinationstate || row.destinationcountrycode)) : \\'\\'}}</a></span></td></tr><tr ng-show=\\\"vm.noResults && !vm.isError\\\"><td colspan=100% style=\\\"text-align: center\\\" id=isResults><span translate=TRACKTRACE.NORESULTS></span></td></tr><tr ng-show=vm.isError><td colspan=100% style=\\\"text-align: center\\\" id=timedOut><span translate={{vm.error}}></span></td></tr></tbody></table></div></div>\");\n$templateCache.put(\"/app/track-trace/server-table/sorterHeader.html\",\"<tr class=ng-table-sort-header><!-- Table Header --><th title={{$column.headerTitle(this)}} ng-repeat=\\\"$column in $columns\\\" ng-class=\\\"{ \\'sortable\\': $column.sortable(this),\\r\\n \\'sort-asc\\': params.sorting()[$column.sortable(this)]==\\'asc\\',\\r\\n \\'sort-desc\\': params.sorting()[$column.sortable(this)]==\\'desc\\'\\r\\n }\\\" ng-init=\\\"template = $column.headerTemplateURL(this)\\\" ng-if=$column.title(this) class={{$column.class(this)}} filter=\\\"{ age: \\'/app/track-trace/server-table/filterHeader.html\\' }\\\"><div ng-if=!template><div ng-if=$column.static class=ng-table-header id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><input style=cursor:pointer;vertical-align:middle ng-click=vm.checkAll(vm.selectAll) ng-if=$column.checkbox type=checkbox ng-model=vm.selectAll> <span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : cwwSortBy($column, $event)\\\"></span></span></div><div ng-if=!$column.static class=ng-table-header resizable r-directions=\\\"[\\'right\\']\\\" id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\">{{$column.static}} <span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : cwwSortBy($column, $event)\\\"></span></span></div></div><div ng-if=template ng-include=template></div></th></tr>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/quick-filters.html\",\"<md-card-content class=collapsible-exceptions-wrapper><div layout-xs=column layout-sm=column layout-gt-sm=row class=\\\"collapsible-exceptions {{widgetsCfsCtrl.collapseState}}\\\" ng-controller=\\\"WidgetsCfsController as widgetsCfsCtrl\\\"><div flex-gt-sm=\\\"{{widgetsCfsCtrl.collapsed ? \\'85\\' : \\'66\\'}}\\\" class=flex-transition><div layout-gt-sm=row layout-sm=column><div flex=50 layout={{widgetsCfsCtrl.collapsibleLayout}} layout-align-gt-xs=\\\"center center\\\" layout-align-xs=\\\"start center\\\" class=flex-transition ng-class=\\\"{\\'filter-active\\': trackTraceCfsCtrl.isFilterActive.active}\\\"><div class=\\\"{{trackTraceCfsCtrl.isFilteredOut.active ? \\'text-success-faded\\' : \\'text-success\\' }} shipment-number md-display-{{widgetsCfsCtrl.collapsed ? \\'1\\' : \\'4\\'}}\\\">{{trackTraceCfsCtrl.data.active_count}}</div><div class=count>{{\\'WIDGETS.ACTIVE_SHIPMENTS\\' | translate}}<div class=not-shown><span ng-if=\\\"trackTraceCfsCtrl.data.unfiltered_counts.active - trackTraceCfsCtrl.data.active_count > 0\\\">{{ trackTraceCfsCtrl.data.unfiltered_counts.active - trackTraceCfsCtrl.data.active_count }} not shown</span></div></div><div class=filter-shipments ng-hide=widgetsCfsCtrl.collapsed><md-button class=\\\"btn-outline btn-loader\\\" ng-click=\\\"trackTraceCfsCtrl.filter(\\'active\\')\\\" ng-disabled=trackTraceCfsCtrl.loadingState.loading analytics-on analytics-category=Dashboard analytics-event=FilterShipments-Active><span ng-hide=trackTraceCfsCtrl.queryState.isFilterLoading.loading.active>{{trackTraceCfsCtrl.filterLabels.active | translate}}</span><md-progress-circular md-mode=indeterminate ng-hide=!trackTraceCfsCtrl.queryState.isFilterLoading.loading.active class=md-hue-1 md-diameter=36px></md-progress-circular></md-button></div></div><div flex=50 layout={{widgetsCfsCtrl.collapsibleLayout}} layout-align-gt-xs=\\\"center center\\\" layout-align-xs=\\\"start center\\\" class=flex-transition ng-class=\\\"{\\'filter-active\\': trackTraceCfsCtrl.isFilterActive.exception}\\\"><div class=\\\"{{ trackTraceCfsCtrl.isFilteredOut.exception ? \\'text-danger-faded\\' : \\'text-danger\\' }} shipment-number md-display-{{widgetsCfsCtrl.collapsed ? \\'1\\' : \\'4\\'}}\\\">{{trackTraceCfsCtrl.data.exception_count}}</div><div class=count><span translate=WIDGETS.SHIPMENTS_WITH_EXCEPTIONS></span><div class=not-shown><span ng-if=\\\"trackTraceCfsCtrl.data.unfiltered_counts.exception - trackTraceCfsCtrl.data.exception_count > 0\\\">{{ trackTraceCfsCtrl.data.unfiltered_counts.exception - trackTraceCfsCtrl.data.exception_count }} not shown</span></div></div><div class=filter-shipments ng-hide=widgetsCfsCtrl.collapsed><md-button class=\\\"btn-outline btn-loader\\\" ng-click=\\\"trackTraceCfsCtrl.filter(\\'exception\\')\\\" ng-disabled=trackTraceCfsCtrl.loadingState.loading analytics-on analytics-category=Dashboard analytics-event=FilterShipments-Exception><span ng-hide=trackTraceCfsCtrl.queryState.isFilterLoading.loading.exception>{{trackTraceCfsCtrl.filterLabels.exception | translate}}</span><md-progress-circular md-mode=indeterminate ng-hide=!trackTraceCfsCtrl.queryState.isFilterLoading.loading.exception class=md-hue-1 md-diameter=36px></md-progress-circular></md-button></div></div></div></div><!-- Lane Pairs Map ng-hide=\\\"widgetsCfsCtrl.collapsed\\\" \\r\\n\t\t<div ng-hide=\\\"widgetsCfsCtrl.collapsed\\\" class=\\\"map-container\\\">\\r\\n\t\t\t<div ng-include=\\\"\\'/app/components/widgets/lane-pairs-map.html\\'\\\" id=\\\"shipments-map\\\" flex=\\\"33\\\"></div>\\r\\n\t\t</div>\\r\\n\t\t<md-button class=\\\"md-fab md-mini btn-collapse\\\" aria-label=\\\"Open/Close\\\" ng-click=\\\"widgetsCfsCtrl.toggleCollapse($event)\\\"\\r\\n\t\t\t\t\t\t\t\tanalytics-on analytics-category=\\\"Dashboard\\\" analytics-event=\\\"CollapseLanePairs\\\">\\r\\n\t <md-icon>{{widgetsCfsCtrl.collapsed ? \\'\\' : \\'\\'}}</md-icon>\\r\\n\t </md-button> --></div></md-card-content>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/track-trace-cfs.html\",\"<cva-shell><div class=shell-padding multiple-key-press=trackTraceCfsCtrl.hardRefresh(keyEvent)><!-- ng-keydown=\\\"trackTraceCfsCtrl.hardRefresh($event)\\\" tabindex=\\\"0\\\" --><!-- Primary View Header --><!-- Widgets controller calling here [Removed Quick filters page which is not required in aljex]\\r\\n <div class=\\\"m-b\\\">\\r\\n <md-card style=\\\"position:relative; z-index:3;\\\" ng-controller=\\\"WidgetsCfsController as widgetsCfsCtrl\\\"></md-card>\\r\\n </div>--><md-card><md-card-content><div ng-include=\\\"\\'/app/track-trace/track-trace-cfs/quick-search/quick-search.html\\'\\\"></div><div ng-include=\\\"\\'/app/advanced-search/cfs/adv-search.html\\'\\\"></div></md-card-content></md-card><div class=m-b><md-card ng-include=\\\"\\'/app/track-trace/track-trace-cfs/quick-filters.html\\'\\\" style=\\\"position:relative; z-index:3\\\" ng-controller=\\\"WidgetsCfsController as widgetsCfsCtrl\\\"></md-card></div><!-- SHIPMENTS RESULTS CARD --><div class=track-trace-results><div layout-gt-sm=row class=p-l-sm><h3 class=\\\"md-headline text-upper\\\">{{\\'TRACKTRACE.SHIPMENTS\\' | translate}} <small class=\\\"text-warning text-xs text-lower text-strong\\\">({{trackTraceCfsCtrl.data.results_count}} {{trackTraceCfsCtrl.data.results_filtered ? \\'TRACKTRACE.CURRENTLY_FILTERED\\' : \\'TRACKTRACE.TOTAL\\' | translate}})</small> <span><md-button id=shipment-filter class=\\\"md-fab md-mini btn-collapse\\\" show-xs show-sm hide-gt-sm layout-align=\\\"end center\\\" aria-label=Open/Close ng-click=\\\"showList = ! showList\\\"><md-icon>{{!showList ? \\'\\' : \\'\\'}}</md-icon></md-button></span></h3><span flex=auto></span><div hide show-gt-sm><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCfsCtrl.refresh() ng-disabled=trackTraceCfsCtrl.queryState.displayNoResults ng-disabled=trackTraceCfsCtrl.showLoading><span ng-hide=trackTraceCfsCtrl.showLoading>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span> <span class=btn-load-wrapper ng-show=trackTraceCfsCtrl.showLoading><md-progress-circular md-mode=indeterminate class=md-hue-1 md-diameter=30px></md-progress-circular></span></md-button><!-- the ng-click is just for a test right now --><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCfsCtrl.showExportCSV($event) ng-disabled=trackTraceCfsCtrl.queryState.displayNoResults ng-if=trackTraceCfsCtrl.hasExportPermissions>{{\\'TRACKTRACE.EXPORT\\' | translate}}</md-button></div><div ng-show=showList hide-gt-sm><md-button id=refresh-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCfsCtrl.refresh() ng-disabled=trackTraceCfsCtrl.showLoading><span ng-hide=trackTraceCfsCtrl.showLoading>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span> <span class=btn-load-wrapper ng-show=trackTraceCfsCtrl.showLoading><md-progress-circular md-mode=indeterminate class=md-hue-1 md-diameter=30px></md-progress-circular></span></md-button><!-- the ng-click is just for a test right now --><md-button id=export-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCfsCtrl.showExportCSV($event)>{{\\'TRACKTRACE.EXPORT\\' | translate}}</md-button></div></div><br hide-gt-sm><!-- Server Table Inclusion --><div layout=row class=track-trace-table><div flex=100 ng-include=\\\"\\'/app/track-trace/track-trace-cfs/server-table/server-table.html\\'\\\" class=\\\"loadmask-light loadmask-opaque track-trace-table\\\"></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/quick-filters.html\",\"<md-card-content class=collapsible-exceptions-wrapper><div layout-xs=column layout-sm=column layout-gt-sm=row class=\\\"collapsible-exceptions {{widgetsCmtsCtrl.collapseState}}\\\" ng-controller=\\\"WidgetsCmtsController as widgetsCmtsCtrl\\\"><div flex-gt-sm=\\\"{{widgetsCmtsCtrl.collapsed ? \\'85\\' : \\'66\\'}}\\\" class=flex-transition><div layout-gt-sm=row layout-sm=column><div flex=50 layout={{widgetsCmtsCtrl.collapsibleLayout}} layout-align-gt-xs=\\\"center center\\\" layout-align-xs=\\\"start center\\\" class=flex-transition ng-class=\\\"{\\'filter-active\\': trackTraceCmtsCtrl.isFilterActive.active}\\\"><div class=\\\"{{trackTraceCmtsCtrl.isFilteredOut.active ? \\'text-success-faded\\' : \\'text-success\\' }} shipment-number md-display-{{widgetsCmtsCtrl.collapsed ? \\'1\\' : \\'4\\'}}\\\">{{trackTraceCmtsCtrl.data.active_count}}</div><div class=count>{{\\'WIDGETS.ACTIVE_SHIPMENTS\\' | translate}}<div class=not-shown><span ng-if=\\\"trackTraceCmtsCtrl.data.unfiltered_counts.active - trackTraceCmtsCtrl.data.active_count > 0\\\">{{ trackTraceCmtsCtrl.data.unfiltered_counts.active - trackTraceCmtsCtrl.data.active_count }} not shown</span></div></div><div class=filter-shipments ng-hide=widgetsCmtsCtrl.collapsed><md-button class=\\\"btn-outline btn-loader\\\" ng-click=\\\"trackTraceCmtsCtrl.filter(\\'active\\')\\\" ng-disabled=trackTraceCmtsCtrl.loadingState.loading analytics-on analytics-category=Dashboard analytics-event=FilterShipments-Active><span ng-hide=trackTraceCmtsCtrl.queryState.isFilterLoading.loading.active>{{trackTraceCmtsCtrl.filterLabels.active | translate}}</span><md-progress-circular md-mode=indeterminate ng-hide=!trackTraceCmtsCtrl.queryState.isFilterLoading.loading.active class=md-hue-1 md-diameter=36px></md-progress-circular></md-button></div></div><div flex=50 layout={{widgetsCmtsCtrl.collapsibleLayout}} layout-align-gt-xs=\\\"center center\\\" layout-align-xs=\\\"start center\\\" class=flex-transition ng-class=\\\"{\\'filter-active\\': trackTraceCmtsCtrl.isFilterActive.exception}\\\"><div class=\\\"{{ trackTraceCmtsCtrl.isFilteredOut.exception ? \\'text-danger-faded\\' : \\'text-danger\\' }} shipment-number md-display-{{widgetsCmtsCtrl.collapsed ? \\'1\\' : \\'4\\'}}\\\">{{trackTraceCmtsCtrl.data.exception_count}}</div><div class=count><span translate=WIDGETS.SHIPMENTS_WITH_EXCEPTIONS></span><div class=not-shown><span ng-if=\\\"trackTraceCmtsCtrl.data.unfiltered_counts.exception - trackTraceCmtsCtrl.data.exception_count > 0\\\">{{ trackTraceCmtsCtrl.data.unfiltered_counts.exception - trackTraceCmtsCtrl.data.exception_count }} not shown</span></div></div><div class=filter-shipments ng-hide=widgetsCmtsCtrl.collapsed><md-button class=\\\"btn-outline btn-loader\\\" ng-click=\\\"trackTraceCmtsCtrl.filter(\\'exception\\')\\\" ng-disabled=trackTraceCmtsCtrl.loadingState.loading analytics-on analytics-category=Dashboard analytics-event=FilterShipments-Exception><span ng-hide=trackTraceCmtsCtrl.queryState.isFilterLoading.loading.exception>{{trackTraceCmtsCtrl.filterLabels.exception | translate}}</span><md-progress-circular md-mode=indeterminate ng-hide=!trackTraceCmtsCtrl.queryState.isFilterLoading.loading.exception class=md-hue-1 md-diameter=36px></md-progress-circular></md-button></div></div></div></div></div></md-card-content>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/track-trace-cmts.html\",\"<cva-shell><div class=shell-padding multiple-key-press=trackTraceCmtsCtrl.hardRefresh(keyEvent)><md-card><md-card-content><div ng-include=\\\"\\'/app/track-trace/track-trace-cmts/quick-search/quick-search.html\\'\\\"></div><div ng-include=\\\"\\'/app/advanced-search/cmts/adv-search.html\\'\\\"></div></md-card-content></md-card><div class=m-b><md-card ng-include=\\\"\\'/app/track-trace/track-trace-cmts/quick-filters.html\\'\\\" style=\\\"position:relative; z-index:3\\\" ng-controller=\\\"WidgetsCmtsController as widgetsCmtsCtrl\\\"></md-card></div><!-- SHIPMENTS RESULTS CARD --><div class=track-trace-results><div layout-gt-sm=row class=p-l-sm><h3 class=\\\"md-headline text-upper\\\">{{\\'TRACKTRACE.SHIPMENTS\\' | translate}} <small class=\\\"text-warning text-xs text-lower text-strong\\\">({{trackTraceCmtsCtrl.data.results_count}} {{trackTraceCmtsCtrl.data.results_filtered ? \\'TRACKTRACE.CURRENTLY_FILTERED\\' : \\'TRACKTRACE.TOTAL\\' | translate}})</small> <span><md-button id=shipment-filter class=\\\"md-fab md-mini btn-collapse\\\" show-xs show-sm hide-gt-sm layout-align=\\\"end center\\\" aria-label=Open/Close ng-click=\\\"showList = ! showList\\\"><md-icon>{{!showList ? \\'\\' : \\'\\'}}</md-icon></md-button></span></h3><span flex=auto></span><div hide show-gt-sm><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCmtsCtrl.refresh() ng-disabled=trackTraceCmtsCtrl.queryState.displayNoResults ng-disabled=trackTraceCmtsCtrl.showLoading><span ng-hide=trackTraceCmtsCtrl.showLoading>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span> <span class=btn-load-wrapper ng-show=trackTraceCmtsCtrl.showLoading><md-progress-circular md-mode=indeterminate class=md-hue-1 md-diameter=30px></md-progress-circular></span></md-button><!-- the ng-click is just for a test right now --><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCmtsCtrl.showExportCSV($event) ng-disabled=trackTraceCmtsCtrl.queryState.displayNoResults ng-if=trackTraceCmtsCtrl.hasExportPermissions>{{\\'TRACKTRACE.EXPORT\\' | translate}}</md-button></div><div ng-show=showList hide-gt-sm><md-button id=refresh-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCmtsCtrl.refresh() ng-disabled=trackTraceCmtsCtrl.showLoading><span ng-hide=trackTraceCmtsCtrl.showLoading>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span> <span class=btn-load-wrapper ng-show=trackTraceCmtsCtrl.showLoading><md-progress-circular md-mode=indeterminate class=md-hue-1 md-diameter=30px></md-progress-circular></span></md-button><!-- the ng-click is just for a test right now --><md-button id=export-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCmtsCtrl.showExportCSV($event)>{{\\'TRACKTRACE.EXPORT\\' | translate}}</md-button></div></div><br hide-gt-sm><!-- Server Table Inclusion --><div layout=row class=track-trace-table><div flex=100 ng-include=\\\"\\'/app/track-trace/track-trace-cmts/server-table/server-table.html\\'\\\" class=\\\"loadmask-light loadmask-opaque track-trace-table\\\"></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/quick-filters.html\",\"<md-card-content class=collapsible-exceptions-wrapper><div layout-xs=column layout-sm=column layout-gt-sm=row class=\\\"collapsible-exceptions {{widgetsCslCtrl.collapseState}}\\\" ng-controller=\\\"WidgetsCslController as widgetsCslCtrl\\\"><div flex-gt-sm=\\\"{{widgetsCslCtrl.collapsed ? \\'85\\' : \\'66\\'}}\\\" class=flex-transition><div layout-gt-sm=row layout-sm=column><div flex=50 layout={{widgetsCslCtrl.collapsibleLayout}} layout-align-gt-xs=\\\"center center\\\" layout-align-xs=\\\"start center\\\" class=flex-transition ng-class=\\\"{\\'filter-active\\': trackTraceCslCtrl.isFilterActive.active}\\\"><div class=\\\"{{trackTraceCslCtrl.isFilteredOut.active ? \\'text-success-faded\\' : \\'text-success\\' }} shipment-number md-display-{{widgetsCslCtrl.collapsed ? \\'1\\' : \\'4\\'}}\\\">{{trackTraceCslCtrl.data.active_count}}</div><div class=count>{{\\'WIDGETS.ACTIVE_SHIPMENTS\\' | translate}}<div class=not-shown><span ng-if=\\\"trackTraceCslCtrl.data.unfiltered_counts.active - trackTraceCslCtrl.data.active_count > 0\\\">{{ trackTraceCslCtrl.data.unfiltered_counts.active - trackTraceCslCtrl.data.active_count }} not shown</span></div></div><div class=filter-shipments ng-hide=widgetsCslCtrl.collapsed><md-button class=\\\"btn-outline btn-loader\\\" ng-click=\\\"trackTraceCslCtrl.filter(\\'active\\')\\\" ng-disabled=trackTraceCslCtrl.loadingState.loading analytics-on analytics-category=Dashboard analytics-event=FilterShipments-Active><span ng-hide=trackTraceCslCtrl.queryState.isFilterLoading.loading.active>{{trackTraceCslCtrl.filterLabels.active | translate}}</span><md-progress-circular md-mode=indeterminate ng-hide=!trackTraceCslCtrl.queryState.isFilterLoading.loading.active class=md-hue-1 md-diameter=36px></md-progress-circular></md-button></div></div><div flex=50 layout={{widgetsCslCtrl.collapsibleLayout}} layout-align-gt-xs=\\\"center center\\\" layout-align-xs=\\\"start center\\\" class=flex-transition ng-class=\\\"{\\'filter-active\\': trackTraceCslCtrl.isFilterActive.exception}\\\"><div class=\\\"{{ trackTraceCslCtrl.isFilteredOut.exception ? \\'text-danger-faded\\' : \\'text-danger\\' }} shipment-number md-display-{{widgetsCslCtrl.collapsed ? \\'1\\' : \\'4\\'}}\\\">{{trackTraceCslCtrl.data.exception_count}}</div><div class=count><span translate=WIDGETS.SHIPMENTS_WITH_EXCEPTIONS></span><div class=not-shown><span ng-if=\\\"trackTraceCslCtrl.data.unfiltered_counts.exception - trackTraceCslCtrl.data.exception_count > 0\\\">{{ trackTraceCslCtrl.data.unfiltered_counts.exception - trackTraceCslCtrl.data.exception_count }} not shown</span></div></div><div class=filter-shipments ng-hide=widgetsCslCtrl.collapsed><md-button class=\\\"btn-outline btn-loader\\\" ng-click=\\\"trackTraceCslCtrl.filter(\\'exception\\')\\\" ng-disabled=trackTraceCslCtrl.loadingState.loading analytics-on analytics-category=Dashboard analytics-event=FilterShipments-Exception><span ng-hide=trackTraceCslCtrl.queryState.isFilterLoading.loading.exception>{{trackTraceCslCtrl.filterLabels.exception | translate}}</span><md-progress-circular md-mode=indeterminate ng-hide=!trackTraceCslCtrl.queryState.isFilterLoading.loading.exception class=md-hue-1 md-diameter=36px></md-progress-circular></md-button></div></div></div></div><!-- Lane Pairs Map ng-hide=\\\"widgetsCslCtrl.collapsed\\\" \\r\\n\t\t<div ng-hide=\\\"widgetsCslCtrl.collapsed\\\" class=\\\"map-container\\\">\\r\\n\t\t\t<div ng-include=\\\"\\'/app/components/widgets/lane-pairs-map.html\\'\\\" id=\\\"shipments-map\\\" flex=\\\"33\\\"></div>\\r\\n\t\t</div>\\r\\n\t\t<md-button class=\\\"md-fab md-mini btn-collapse\\\" aria-label=\\\"Open/Close\\\" ng-click=\\\"widgetsCslCtrl.toggleCollapse($event)\\\"\\r\\n\t\t\t\t\t\t\t\tanalytics-on analytics-category=\\\"Dashboard\\\" analytics-event=\\\"CollapseLanePairs\\\">\\r\\n\t <md-icon>{{widgetsCslCtrl.collapsed ? \\'\\' : \\'\\'}}</md-icon>\\r\\n\t </md-button> --></div></md-card-content>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/track-trace-csl.html\",\"<cva-shell><div class=shell-padding multiple-key-press=trackTraceCslCtrl.hardRefresh(keyEvent)><!-- ng-keydown=\\\"trackTraceCslCtrl.hardRefresh($event)\\\" tabindex=\\\"0\\\" --><!-- Primary View Header --><!-- Widgets controller calling here [Removed Quick filters page which is not required in aljex]\\r\\n <div class=\\\"m-b\\\">\\r\\n <md-card style=\\\"position:relative; z-index:3;\\\" ng-controller=\\\"WidgetsCslController as widgetsCslCtrl\\\"></md-card>\\r\\n </div>--><md-card><md-card-content><div ng-include=\\\"\\'/app/track-trace/track-trace-csl/quick-search/quick-search.html\\'\\\"></div><div ng-include=\\\"\\'/app/advanced-search/csl/adv-search.html\\'\\\"></div></md-card-content></md-card><div class=m-b><md-card ng-include=\\\"\\'/app/track-trace/track-trace-csl/quick-filters.html\\'\\\" style=\\\"position:relative; z-index:3\\\" ng-controller=\\\"WidgetsCslController as widgetsCslCtrl\\\"></md-card></div><!-- SHIPMENTS RESULTS CARD --><div class=track-trace-results><div layout-gt-sm=row class=p-l-sm><h3 class=\\\"md-headline text-upper\\\">{{\\'TRACKTRACE.SHIPMENTS\\' | translate}} <small class=\\\"text-warning text-xs text-lower text-strong\\\">({{trackTraceCslCtrl.data.results_count}} {{trackTraceCslCtrl.data.results_filtered ? \\'TRACKTRACE.CURRENTLY_FILTERED\\' : \\'TRACKTRACE.TOTAL\\' | translate}})</small> <span><md-button id=shipment-filter class=\\\"md-fab md-mini btn-collapse\\\" show-xs show-sm hide-gt-sm layout-align=\\\"end center\\\" aria-label=Open/Close ng-click=\\\"showList = ! showList\\\"><md-icon>{{!showList ? \\'\\' : \\'\\'}}</md-icon></md-button></span></h3><span flex=auto></span><div hide show-gt-sm><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCslCtrl.refresh() ng-disabled=trackTraceCslCtrl.queryState.displayNoResults ng-disabled=trackTraceCslCtrl.showLoading><span ng-hide=trackTraceCslCtrl.showLoading>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span> <span class=btn-load-wrapper ng-show=trackTraceCslCtrl.showLoading><md-progress-circular md-mode=indeterminate class=md-hue-1 md-diameter=30px></md-progress-circular></span></md-button><!-- the ng-click is just for a test right now --><md-button class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCslCtrl.showExportCSV($event) ng-disabled=trackTraceCslCtrl.queryState.displayNoResults ng-if=trackTraceCslCtrl.hasExportPermissions>{{\\'TRACKTRACE.EXPORT\\' | translate}}</md-button></div><div ng-show=showList hide-gt-sm><md-button id=refresh-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCslCtrl.refresh() ng-disabled=trackTraceCslCtrl.showLoading><span ng-hide=trackTraceCslCtrl.showLoading>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span> <span class=btn-load-wrapper ng-show=trackTraceCslCtrl.showLoading><md-progress-circular md-mode=indeterminate class=md-hue-1 md-diameter=30px></md-progress-circular></span></md-button><!-- the ng-click is just for a test right now --><md-button id=export-results class=\\\"btn-link btn-block-sm\\\" md-ink-ripple=false ng-click=trackTraceCslCtrl.showExportCSV($event)>{{\\'TRACKTRACE.EXPORT\\' | translate}}</md-button></div></div><br hide-gt-sm><!-- Server Table Inclusion --><div layout=row class=track-trace-table><div flex=100 ng-include=\\\"\\'/app/track-trace/track-trace-csl/server-table/server-table.html\\'\\\" class=\\\"loadmask-light loadmask-opaque track-trace-table\\\"></div></div></div></div></cva-shell>\");\n$templateCache.put(\"/app/user/modals/preview-slide.modal.html\",\"<!-- <md-dialog class=\\\"md-card-light m-t spotlight-modal xs-fullscreen\\\">\\r\\n <div class=\\\"preview-feature\\\">\\r\\n <md-toolbar style=\\\"min-height: 30px;\\\">\\r\\n <div class=\\\"md-toolbar-tools\\\" style=\\\"height: 30px;\\\">\\r\\n <h2>{{newSlide.feature_name}}</h2>\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"closeModal()\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n </md-toolbar>\\r\\n <img class = \\\"slide-preview\\\" ng-src={{newSlide.slide_image.url}}></img>\\r\\n </div>\\r\\n\\r\\n <md-dialog-content class=\\\"md-padding\\\">\\r\\n <div>\\r\\n <h2> {{newSlide.slide_title}} </h2>\\r\\n </div>\\r\\n <div>\\r\\n <span ng-bind-html=\\\"newSlide.slide_content\\\"></span>\\r\\n </div>\\r\\n </md-dialog-content>\\r\\n\\r\\n <md-dialog-actions layout=\\\"row\\\" layout-align=\\\"start center\\\">\\r\\n\\r\\n <loading-button callfunction=\\\"previousSlide(newSlide)\\\" ng-if=\\\"showPrev\\\" display=\\\"ADMIN.FEATURE.BACK\\\"> </loading-button>\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <span class=\\\"circle-pos\\\" ng-repeat=\\\"slide in splotlightSlideArr\\\">\\r\\n <div id=\\\"circle\\\" ng-if=\\\"slide != newSlide\\\"></div>\\r\\n <div id=\\\"active-circle\\\" ng-if=\\\"slide == newSlide\\\"></div>\\r\\n </span>\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <loading-button callfunction=\\\"nextSlide(newSlide)\\\" ng-if=\\\"showNext\\\" display=\\\"ADMIN.FEATURE.NEXT\\\"></loading-button>\\r\\n\\r\\n </md-dialog-actions>\\r\\n\\r\\n</md-dialog> --><md-dialog class=feature_spotlight_newPopup flex=95 flex-gt-sm=55 style=\\\"max-width:900px !important;border-radius:0px\\\"><!-- <md-toolbar>\\r\\n <div class=\\\"md-toolbar-tools\\\">\\r\\n <h2>{{newSlide.feature_name}}</h2>\\r\\n <span flex></span>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"closeModal()\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n </md-toolbar> --><md-dialog-content><div class=\\\"md-dialog-content featured_spot_popup_content\\\"><div><img class=popup_image ng-src={{newSlide.slide_image.url}}><md-button class=\\\"md-icon-button featured_spot_popup_btn\\\" ng-click=closeModal()><md-icon class=featured_spot_popup_icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><div style=\\\"padding: 1% 4% 0 4%;box-sizing:border-box\\\"><h2 class=featured_spot_popup_heading>{{newSlide.slide_title}}</h2></div><div style=\\\"padding: 1% 4% 0 4%;box-sizing:border-box\\\"><h2 class=featured_spot_popup_heading>{{userCtrl.newSlide.slide_title}}</h2></div><div style=\\\"padding: 0 4% 2% 4%;text-align: justify;box-sizing:border-box\\\"><p ng-bind-html=newSlide.slide_content></p></div></md-dialog-content><md-dialog-actions class=featured_spot_popup_footer layout=row layout-align=\\\"center center\\\"><loading-button callfunction=previousSlide(newSlide) ng-style=\\\"{\\'visibility\\': showPrev?\\'visible\\':\\'hidden\\'}\\\" display=ADMIN.FEATURE.BACK></loading-button><span flex=auto></span> <span class=circle-pos ng-repeat=\\\"slide in splotlightSlideArr\\\"><div id=circle ng-if=\\\"slide != newSlide\\\"></div><div id=active-circle ng-if=\\\"slide == newSlide\\\"></div></span><span flex=auto></span><loading-button callfunction=nextSlide(newSlide) ng-style=\\\"{\\'visibility\\': showNext?\\'visible\\':\\'hidden\\'}\\\" display=ADMIN.FEATURE.NEXT></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/user/toast/audit-log.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><p>No Records Found!</p></span></div></md-toast>\");\n$templateCache.put(\"/app/user/toast/confirm-account.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><p>{{\\'USER.ERROR_CONFIRM_ACCOUNT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/user/toast/confirm-account.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><span layout=row><p>{{\\'USER.SUCCESS_CONFIRM_ACCOUNT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/user/toast/log-out.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><p>{{\\'USER.ERROR_LOG_OUT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/user/toast/password-change.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><span layout=row><p>{{\\'USER.PASSWORD_UPDATED\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/user/toast/question-change.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><span layout=row><p>{{\\'USER.QUESTION_UPDATED\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/user/toast/resend-confirmation-check.html\",\"\");\n$templateCache.put(\"/app/user/toast/spotlight-slide.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><p>{{\\'ADMIN.FEATURE.MESSAGE.NO_ACTIVE_SPOTLIGHT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/user/toast/update-account.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><p>{{\\'USER.ERROR_UPDATE_ACCOUNT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/user/toast/update-account.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><span layout=row><p>{{\\'USER.SUCCESS_UPDATE_ACCOUNT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/bulk-companies/toast/bulk-import-success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon style=color:green>check</md-icon><span layout=column layout-align=\\\"center start\\\"><span translate=ADMIN.BULK_IMPORT.SAVE_SUCCESS></span> <span ng-show=!!message>{{message}}</span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/bulk-users/toast/bulk-import-success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon style=color:green>check</md-icon><span layout=column layout-align=\\\"center start\\\"><span translate=ADMIN.BULK_IMPORT.SAVE_SUCCESS></span> <span ng-show=!!message>{{message}}</span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/forms/action-buttons.html\",\"<span ng-if=!vm.saveBtnShow><md-button ng-if=!vm.readAccess class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.saveCompany() ng-disabled=\\\"vm.isLoad.save || vm.formDetails.$pristine || vm.formDetails.$invalid\\\" type=submit class=\\\"btn btn-default\\\" ng-show=!vm.isCreate><!-- <md-icon>save</md-icon> --> <span ng-hide=vm.isLoad.save translate=USER.SAVE></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><md-button ng-if=vm.readAccess class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.listCompany() class=\\\"btn btn-default\\\" ng-show=!vm.isCreate><!-- <md-icon>save</md-icon> --> <span>Close</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></span><span ng-if=vm.saveBtnShow><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.saveCompany() ng-disabled=!vm.saveBtnShow type=submit class=\\\"btn btn-default\\\" ng-show=!vm.isCreate><!-- <md-icon>save</md-icon> --> <span ng-hide=vm.isLoad.save translate=USER.SAVE></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></span><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.createNewCompany() ng-disabled=\\\"vm.isLoad.createNew || (vm.company.view_action_board && (vm.company.refresh_time===undefined || vm.company.refresh_time<=0 ))\\\" type=submit class=\\\"btn btn-default\\\" ng-show=vm.isCreate><!-- <md-icon>save</md-icon><md-icon>create</md-icon> --> <span ng-hide=vm.isLoad.createNew translate=USER.SAVE></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.createNew class=md-hue-1 md-diameter=30px></md-progress-circular></md-button>\");\n$templateCache.put(\"/app/admin/companies/forms/menu-action-buttons.html\",\"<md-menu ng-if=\\\"!vm.isCreate && !vm.company.is_crane && vm.status.cssClass === \\'md-danger\\'\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item ng-if=\\\"!vm.company.is_active && !vm.company.is_crane\\\"><md-button class=md-primary ng-click=\\\"vm.showModal(ev, \\'delete-company\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=COMPANY.DELETE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/companies/forms/search.html\",\"<div layout=row><div flex=95 class=flex-transition><div><h3><md-icon class=m-r-xs>search</md-icon><span class=uppercase translate=COMPANY.LOOKUP_COMPANY></span></h3></div></div><md-button style=margin-top:9px class=\\\"md-fab md-mini btn-collapse\\\" aria-label=Open/Close ng-click=toggleCollapse()><md-icon>{{collapsed ? \\'expand_more\\' : \\'expand_less\\'}}</md-icon></md-button></div><div ng-show=!collapsed><form><div layout-gt-sm=row><div flex=40 style=\\\"margin-right: 30px\\\"><md-input-container class=md-block flex-gt-sm=auto><label translate=COMPANY.COMPANY_NAME></label><input ng-model=vm.lookup.name ng-keyup=vm.companySearch()></md-input-container></div><div id=company-customer-type flex=50 flex-gt-sm=row><h3><span style=\\\"font-size: 15px\\\">Filter Search by Customer Type</span></h3><div layout=row style=\\\"position: relative\\\"><div layout=row layout-align=\\\"space-around center\\\" flex=100 flex-gt-sm=row class=dotted-style><div class=checkbox-customer-type><md-checkbox ng-keyup=vm.companySearch() aria-label=cww ng-change=vm.CustomerFilter(vm.cww_filter) ng-model=vm.cww_filter class=md-primary></md-checkbox>CWW</div><div class=checkbox-customer-type><md-checkbox ng-keyup=vm.companySearch() aria-label=csl ng-change=vm.CustomerFilter(vm.csl_filter) ng-model=vm.csl_filter class=md-primary></md-checkbox>CSL</div><div class=checkbox-customer-type><md-checkbox ng-keyup=vm.companySearch() aria-label=cfs ng-change=vm.CustomerFilter(vm.cfs_filter) ng-model=vm.cfs_filter class=md-primary></md-checkbox>CFS</div><div class=checkbox-customer-type><md-checkbox ng-keyup=vm.companySearch() aria-label=cmts ng-change=vm.CustomerFilter(vm.cmts_filter) ng-model=vm.cmts_filter class=md-primary></md-checkbox>CMTS</div></div>     <div style=\\\"position: absolute;top: 80px;background-color: #050a25;left: 35%\\\"><span style=\\\"float: left\\\">  *<span style=\\\"font-size: 15px;color: #fff\\\">Only</span>  </span> <span style=\\\"float: left\\\"><md-switch ng-disabled=vm.filterCheck ng-keyup=vm.companySearch() style=\\\"display: block;margin:0 !important\\\" ng-model=vm.filter_only></md-switch></span>  </div></div></div><div flex=20 flex-gt-sm=row style=\\\"margin: 80px 0 50px\\\"><span style=\\\"font-style: italic;font-size: 12px\\\">* Turn on <span style=\\\"font-size: 15px;color: #fff;font-weight: bold\\\">Only</span> to filter selected Customer Types specific to search criteria.</span></div></div><div layout=row><span flex=auto></span><md-button class=\\\"md-primary md-raised btn btn-default\\\" ng-click=vm.companySearch(true)><md-icon>clear</md-icon><span translate=COMPANY.CLEAR></span></md-button><md-button class=\\\"md-primary md-raised btn btn-default\\\" ng-click=vm.companySearchFilter();toggleCollapse() ng-disabled=\\\"vm.companySearchNotEnable && vm.filterCheck\\\"><md-icon>search</md-icon><span translate=COMPANY.SEARCH></span></md-button></div></form></div>\");\n$templateCache.put(\"/app/admin/companies/modals/activate-company.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'COMPANY.ACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'COMPANY.ACTIVATE_CONFIRM\\' | translate}}</p><p>{{vm.getName()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.activateCompany() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/companies/modals/api-error.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.ERROR_CREATING_COMPANY\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><ul><li ng-repeat=\\\"message in apiErrorMessages\\\">{{ message }}</li></ul></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'CLOSE\\' | translate}}</md-button><span flex=auto></span></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/companies/modals/deactivate-company.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'COMPANY.DEACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'COMPANY.DEACTIVATE_CONFIRM\\' | translate}}</p><p>{{}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.deactivateCompany() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/companies/modals/delete-company.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'COMPANY.DELETE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'COMPANY.DELETE_CONFIRM\\' | translate}}</p><p>{{vm.getCompanyUserCount()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.deleteCompany() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/companies/toast/attach-doc.error.html\",\"<md-toast><div layout=row><md-icon class=text-error>error</md-icon><span flex><p>{{\\'USER.BULK.IMPORT_ERROR\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/toast/attach-doc.invalid.error.html\",\"<md-toast><div layout=row><md-icon class=text-error>error</md-icon><span flex><p>{{\\'USER.BULK.INVALID_HEADERS\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\" style=\\\"margin-left: 0;margin-top: 5%\\\" ng-style=\\\"$index>0 && {\\'margin-bottom\\':\\'-3px;\\'}\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/toast/cfs-delete-exception.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>CFS Exception Approvers removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/toast/create-company.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=column layout-align=\\\"center start\\\"><span>{{\\'COMPANY.ERROR_SAVE_COMPANY\\' | translate}}</span> <span ng-repeat=\\\"message in messages track by $index\\\">{{message}}</span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/toast/create-company.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>{{\\'COMPANY.SUCCESS_SAVE_COMPANY\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/toast/delete-company.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=column layout-align=\\\"center start\\\"><span>{{\\'FEATURE.MESSAGE.DELETED_ERROR\\' | translate}}</span> <span ng-repeat=\\\"message in messages track by $index\\\">{{message}}</span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/toast/delete-company.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>---Company removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/toast/delete-exception.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>CSL Exception Approvers removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/toast/save-company.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>{{\\'COMPANY.ERROR_SAVE_COMPANY\\' | translate}}</p><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/toast/save-company.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>{{\\'COMPANY.SUCCESS_SAVE_COMPANY\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/toast/tms-delete-exception.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>CMTS Exception Approvers removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/companies/views/company-details.html\",\"<style>.hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }\\r\\n .space-customer-grid{\\r\\n margin-left: 2%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }</style><cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1 ng-show=vm.isCreate translate=COMPANY.CREATE_COMPANY></span> <span class=md-display-1 ng-show=\\\"!vm.isCreate && !vm.readAccess\\\" translate=COMPANY.EDIT_COMPANY></span> <span class=md-display-1 ng-show=\\\"!vm.isCreate && vm.readAccess\\\">View Company</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/companies class=parent-link><span translate=COMPANY.COMPANIES></span></a> / <span ng-show=!vm.isCreate>{{vm.company.name}}</span> <span ng-show=vm.isCreate>{{\\\"NEW\\\"}}</span></span></div></div></div></div><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex layout=row><md-icon class=material-icons>business</md-icon><span translate=COMPANY.COMPANY_DETAILS></span></h2><span flex=auto></span><div ng-include=\\\"\\'/app/admin/companies/forms/action-buttons.html\\'\\\"></div><div ng-include=\\\"\\'/app/admin/companies/forms/menu-action-buttons.html\\'\\\"></div><span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=row class=fourth_column><div flex-gt-sm=45 class=md-card-div style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company translate=COMPANY.COMPANY_NAME></label><input type=text ng-disabled=vm.readAccess ng-model=vm.company.name name=first_name required><div ng-messages=vm.formDetails.first_name.$error><div ng-message=required><span translate=COMPANY.NAME_REQUIRED></span></div></div></md-input-container><md-input-container class=\\\"md-block error-hidden\\\" ng-if=!vm.isCreate layout=row layout-align=\\\"start center\\\"><md-checkbox ng-disabled=vm.readAccess aria-label=companyActive ng-model=vm.company.is_active class=md-primary><span translate=COMPANY.ACTIVE></span></md-checkbox></md-input-container></div><div flex-gt-sm=48 class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><h4>Customer Type*    <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.customer_type_cehck>Customer Type is mandatory</span></h4><span style=\\\"margin-right: 60px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.readAccess aria-label=cww ng-change=vm.cww_setup(vm.company.is_cww) ng-model=vm.company.is_cww class=md-primary>CWW</md-checkbox></span><span style=\\\"margin-right: 60px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.readAccess aria-label=csl ng-change=vm.csl_setup(vm.company.is_csl) ng-model=vm.company.is_csl class=md-primary>CSL</md-checkbox></span><span style=\\\"margin-right: 60px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.readAccess aria-label=cfs ng-change=vm.cfs_setup(vm.company.is_cfs) ng-model=vm.company.is_cfs class=md-primary>CFS</md-checkbox></span><span style=\\\"font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=vm.readAccess aria-label=cmts ng-change=vm.cmts_setup(vm.company.is_cmts) ng-model=vm.company.is_cmts class=md-primary>CMTS</md-checkbox></span></md-input-container></div></div><br><div id=cww-setup-box ng-if=vm.company.is_cww><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CWW SETUP</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=48 flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"end center\\\"><md-checkbox style=\\\"margin: 0px\\\" aria-label=readAccess ng-disabled=vm.readAccess ng-model=vm.company.show_discussion_module class=md-primary></md-checkbox> <span style=\\\"min-width: 110px\\\">Discussion</span><md-checkbox style=\\\"margin: 0px\\\" aria-label=readAccess ng-disabled=vm.readAccess ng-model=vm.company.show_booking_shipment class=md-primary></md-checkbox> <span style=\\\"min-width: 135px\\\">Show Bookings</span><md-checkbox ng-disabled=vm.readAccess aria-label=readAccess ng-model=vm.company.is_reskin class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Magno Reskin</span></div></div><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Contacts</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.DEFAULT_CRANE_CONTACT></label><md-select ng-class=\\\"vm.readAccess ? \\'hide-select-icon\\' : \\'\\'\\\" ng-model=vm.company.cww_default_contact_id name=default_contact_id aria-label=default_contact_id required ng-disabled=vm.readAccess ng-required=true md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select><div ng-show=vm.primaryContactCheckCww ng-messages=vm.formDetails.default_contact_id.$error><div ng-message=required><span translate=COMPANY.PRIMARY_CONTACT_REQUIRED></span></div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"margin-top: 41px\\\"><label translate=COMPANY.DEFAULT_BCC></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cww_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Party IDs</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.DEFAULT_PARTY_ID></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cww_party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIdsCww(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cww_party_check>Party ID / Group ID either one is mandatory</span></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin-top: 60px\\\"><label translate=COMPANY.DEFAULT_GROUP_ID></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cww_related_party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIdsCww(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'current_user_related_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></md-card-content></md-card></div><div id=csl-setup-box ng-if=vm.company.is_csl><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CSL SETUP</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=48 flex-offset-gt-sm=6 style=margin-bottom:0px layout=row layout-align=\\\"end center\\\"><md-checkbox ng-disabled=vm.readAccess aria-label=readAccess ng-model=vm.company.is_send_exception_email class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Do Not Send Exception Emails</span></div></div><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Contacts</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.DEFAULT_CRANE_CONTACT></label><md-select ng-class=\\\"vm.readAccess ? \\'hide-select-icon\\' : \\'\\'\\\" ng-model=vm.company.csl_default_contact_id name=default_contact_id aria-label=default_contact_id required ng-disabled=vm.readAccess ng-required=true md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select><div ng-show=vm.primaryContactCheckCsl ng-messages=vm.formDetails.default_contact_id.$error><div ng-message=required><span translate=COMPANY.PRIMARY_CONTACT_REQUIRED></span></div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"margin-top: 41px\\\"><label translate=COMPANY.DEFAULT_BCC></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.csl_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Customer IDs</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">Default Customer IDs</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.csl_customer_ids md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIdsCsl(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCsl(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.csl_party_check>Customer ID is mandatory</span></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><h3>Exception Threshold</h3><div layout=row><div style=\\\"position: relative;margin-right: 35px\\\"><i style=\\\"position: absolute;top: 30px;color: black\\\" ng-if=!vm.company.is_threshold_default class=material-icons></i> <i style=\\\"position: absolute;top: 30px;color: #bbb\\\" ng-if=vm.company.is_threshold_default class=material-icons></i></div><div style=\\\"margin-right: 15px\\\"><p ng-attr-style=\\\"{{(vm.company.is_threshold_default)?(\\'color:#bbb;font-size: 10px;margin: 0;padding: 0 12px;\\'):(\\'color:black;font-size: 10px;margin: 0;padding: 0 12px;\\')}}\\\" translate=\\\"\\\">Hours</p><md-input-container style=\\\"margin: 5px 0\\\" class=\\\"md-block error-hidden\\\" layout=row layout-align=\\\"center center\\\"><input type=text ng-attr-style=\\\"{{(vm.company.is_threshold_default)?(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;padding: 0px 10px;font-size: 25px;color: #bbb !important;\\'):(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;font-size: 25px;padding: 0px 10px;color: #45AFE3 !important;\\')}}\\\" ng-disabled=\\\"vm.readAccess || vm.company.is_threshold_default\\\" ng-model=vm.company.csl_exception_hours name=csl_exception_hours ng-change=\\\"vm.thresholdChange(vm.company.csl_exception_hours,\\'hrs\\')\\\" ng-pattern=/^\\\\d+$/ maxlength=2 required></md-input-container></div><div style=\\\"position: relative;margin-right: 15px\\\"><span style=\\\"position: absolute;top: 30px;color: #45AFE3\\\" ng-if=!vm.company.is_threshold_default>:</span> <span style=\\\"position: absolute;top: 30px;color: #bbb\\\" ng-if=vm.company.is_threshold_default>:</span></div><div style=\\\"margin-left: 0px;margin-right: 30px\\\"><p ng-attr-style=\\\"{{(vm.company.is_threshold_default)?(\\'color:#bbb;font-size: 10px;margin: 0;padding: 0 8px;\\'):(\\'color:black;font-size: 10px;margin: 0;padding: 0 8px;\\')}}\\\" translate=\\\"\\\">Minutes</p><md-input-container style=\\\"margin: 5px 0\\\" class=\\\"md-block error-hidden\\\"><input type=text ng-attr-style=\\\"{{(vm.company.is_threshold_default)?(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;padding: 0px 10px;font-size: 25px;color: #bbb !important;\\'):(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;font-size: 25px;padding: 0px 10px;color: #45AFE3 !important;\\')}}\\\" ng-disabled=\\\"vm.readAccess || vm.company.is_threshold_default\\\" ng-model=vm.company.csl_exception_minutes name=csl_exception_minutes ng-change=\\\"vm.thresholdChange(vm.company.csl_exception_minutes,\\'mins\\')\\\" ng-pattern=/^[0-5]?[0-9]$/ maxlength=2 required></md-input-container></div><div style=\\\"margin: 30px\\\"><md-checkbox ng-change=vm.csl_threshold_default(vm.company.is_threshold_default,vm.company.csl_exception_hours_exist,vm.company.csl_exception_minutes_exist) ng-disabled=vm.readAccess aria-label=readAccess ng-model=vm.company.is_threshold_default class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Default</span></div></div><div><span style=color:red ng-show=vm.formDetails.csl_exception_hours.$error.pattern>Enter only numbers</span> <span style=color:red ng-show=vm.formDetails.csl_exception_minutes.$error.pattern>Minutes between 0-59 (enter number only)</span></div><div ng-if=thresholdCheck ng-hide=\\\"vm.formDetails.csl_exception_hours.$error.pattern || vm.formDetails.csl_exception_minutes.$error.pattern\\\" style=\\\"box-shadow: 0px 5px 10px 0px grey;padding: 5px\\\"><span style=\\\"color: #fd7600;font-style: italic\\\">The new threshold will not be affected any existing Live exceptions.<br><span ng-if=\\\"exceptionCount > 1 || exceptionCount == 0\\\">There are {{exceptionCount}} Live Exceptions for this customer.</span> <span ng-if=\\\"exceptionCount == 1\\\">There is {{exceptionCount}} Live Exception for this customer.</span> {{vm.formDetails.csl_exception_hours.$error.pattern}}{{vm.formDetails.csl_exception_minutes.$error.pattern}}</span></div></div></div></md-card-content></md-card></div><div id=cfs-setup-box ng-if=vm.company.is_cfs><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CFS SETUP</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Contacts</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.DEFAULT_CRANE_CONTACT></label><md-select ng-class=\\\"vm.readAccess ? \\'hide-select-icon\\' : \\'\\'\\\" ng-model=vm.company.cfs_default_contact_id name=default_contact_id aria-label=default_contact_id required ng-disabled=vm.readAccess ng-required=true md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select><div ng-show=vm.primaryContactCheckCfs ng-messages=vm.formDetails.default_contact_id.$error><div ng-message=required><span translate=COMPANY.PRIMARY_CONTACT_REQUIRED></span></div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"margin-top: 41px\\\"><label translate=COMPANY.DEFAULT_BCC></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cfs_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Customer IDs</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">Default Customer IDs</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cfs_customer_ids md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCfs(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cfs_party_check>Customer ID is mandatory</span></md-input-container></div></div></md-card-content></md-card></div><div id=cmts-setup-box ng-if=vm.company.is_cmts><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CMTS SETUP</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Contacts</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=COMPANY.DEFAULT_CRANE_CONTACT></label><md-select ng-class=\\\"vm.readAccess ? \\'hide-select-icon\\' : \\'\\'\\\" ng-model=vm.company.cmts_default_contact_id name=default_contact_id aria-label=default_contact_id required ng-disabled=vm.readAccess ng-required=true md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select><div ng-show=vm.primaryContactCheckCfs ng-messages=vm.formDetails.default_contact_id.$error><div ng-message=required><span translate=COMPANY.PRIMARY_CONTACT_REQUIRED></span></div></div></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"margin-top: 41px\\\"><label translate=COMPANY.DEFAULT_BCC></label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cmts_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Trading Partner IDs</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">Default Trading Partner IDs</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.company.cmts_customer_ids md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCmts(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cmts_party_check>Trading Partner ID is mandatory</span></md-input-container></div></div></md-card-content></md-card></div><div layout-gt-sm=row class=fourth_column><div flex-gt-sm=45 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-checkbox ng-disabled=vm.readAccess aria-label=readAccess ng-model=vm.company.is_demo class=md-primary></md-checkbox>     <span style=\\\"font-weight: 700\\\">Demo Company</span></div></div><br></md-card-content></form></md-card><!--<section ng-if=\\\"vm.logsVisible()\\\">--><!--<log-company-record data=\\\"vm.company\\\"></log-record>--><!--</section>--><!-- <section class=\\\"md-card-light\\\" ng-controller=\\\"lensviewDepartmentsController as vm\\\">\\r\\n <div ng-include=\\\"\\'/app/admin/lensview/departments/lensview-departments.html\\'\\\"></div>\\r\\n </section> --><section ng-controller=\\\"lensviewDepartmentsController as lv\\\" ng-show=!vm.isCreate><crane-table title=DEPARTMENTS icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.departmenttitle is-loading=lv.isLoading.table is-no-results=lv.noResults buttons=lv.buttons searchflag=lv.searchflag ctrl=lensviewDepartmentsController></crane-table></section><section ng-if=vm.logs_visible><log-company-record data=vm.company></log-company-record></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/modals/potential-exceptions.cancel.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.POTENTIAL.CANCEL_POTENTIAL_EXCEPTION\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal() ng-disabled=vm.isLoadingAffectedShipments><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-show=!vm.isLoadingAffectedShipments><h3>{{\\'ADMIN.POTENTIAL.CONFIRM_CANCEL_STRING\\' | translate}} {{vm.numShipmentsAffected}} {{\\'ADMIN.POTENTIAL.SHIPMENTS\\' | translate}}</h3><h3>{{\\'ADMIN.POTENTIAL.EDIT_CANCEL\\' | translate}}</h3></span><span layout=row layout-align=\\\"center center\\\" ng-show=vm.isLoadingAffectedShipments><h3>{{\\'ADMIN.POTENTIAL.LOADING_AFFECTED\\' | translate}}</h3></span><div layout=row><span flex=auto></span><div layout-align=\\\"end end\\\"><md-button ng-disabled=vm.isLoadingAffectedShipments ng-click=vm.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><md-button ng-disabled=vm.isLoadingAffectedShipments ng-click=vm.confirmCancel()>{{\\'ADMIN.POTENTIAL.CONFIRM\\' | translate}}</md-button></div></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/modals/potential-exceptions.delete.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.POTENTIAL.DELETE_POTENTIAL_EXCEPTION\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'ADMIN.POTENTIAL.ARE_SURE\\' | translate}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.confirmDelete() isdisabled=vm.isButtonDisabled() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/modals/potential-exceptions.end.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.POTENTIAL.END_POTENTIAL_EXCEPTION\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal() ng-disabled=vm.isLoadingAffectedShipments><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content p-md\\\"><span ng-show=!vm.isLoadingAffectedShipments><p>{{\\'ADMIN.POTENTIAL.CONFIRM_END_STRING\\' | translate}} <strong>{{vm.numShipmentsAffected}}</strong> {{\\'ADMIN.POTENTIAL.SHIPMENTS\\' | translate}}</p><p>{{\\'ADMIN.POTENTIAL.END_STRING\\' | translate}}</p><a href=\\\"/track-trace?potential_exception_id={{vm.exceptionDetails.id}}\\\" target=_blank><md-button class=btn-link>{{\\'ADMIN.POTENTIAL.VIEW_TRACK_TRACE_RESULTS\\' | translate}}</md-button></a><br>{{\\'ADMIN.POTENTIAL.OPEN_WINDOW\\' | translate}} </span><span layout=row layout-align=\\\"center center\\\" ng-show=vm.isLoadingAffectedShipments><h3>{{\\'ADMIN.POTENTIAL.LOADING_AFFECTED\\' | translate}}</h3></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-disabled=\\\"vm.isLoadingAffectedShipments || vm.isActionDisabled\\\" ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.confirmEnd() isdisabled=vm.isButtonDisabled() display=ADMIN.POTENTIAL.END isloading=vm.isActionLoading.confirmEnd></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/modals/potential-exceptions.publish.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.POTENTIAL.CONFIRM_POTENTIAL_EXCEPTION\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal() ng-disabled=vm.isLoadingAffectedShipments><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-show=!vm.isLoadingAffectedShipments><p>{{\\'ADMIN.POTENTIAL.CONFIRM_SUBMIT_STRING\\' | translate}} <strong>{{vm.numShipmentsAffected}}</strong> {{\\'ADMIN.POTENTIAL.SHIPMENTS\\' | translate}}</p><span ng-if=!vm.switchEmail><a href=\\\"/track-trace?potential_exception_id={{vm.exceptionDetails.id}}\\\" target=_blank class=btn-link>{{\\'ADMIN.POTENTIAL.VIEW_TRACK_TRACE_RESULTS\\' | translate}} </a></span><span ng-if=vm.switchEmail><a ng-click=vm.errorMsgLensMode() target=_blank class=btn-link>{{\\'ADMIN.POTENTIAL.VIEW_TRACK_TRACE_RESULTS\\' | translate}}</a></span><br>{{\\'ADMIN.POTENTIAL.OPEN_WINDOW\\' | translate}}<p>{{\\'ADMIN.POTENTIAL.CONFIRM_PRESS_STRING\\' | translate}}</p></span><span layout=row layout-align=\\\"center center\\\" ng-show=vm.isLoadingAffectedShipments><h3>{{\\'ADMIN.POTENTIAL.LOADING_AFFECTED\\' | translate}}</h3></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-disabled=vm.isLoadingAffectedShipments ng-click=vm.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><hold-button timeout=30 callfunction=vm.confirmPublish isdisabled=vm.isButtonDisabled() title=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmPublish></hold-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/modals/potential-exceptions.reject.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.POTENTIAL.REJECT_POTENTIAL_EXCEPTION\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><form class=light-form name=rejectForm ng-submit=vm.confirmReject(reject_reason)><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'ADMIN.POTENTIAL.REJECT_REASON\\' | translate}}</p><md-input-container class=md-block><label>{{\\'ADMIN.POTENTIAL.REJECTION\\' | translate}}</label><textarea ng-model=reject_reason name=reject_reason md-maxlength=150 rows=5 md-select-on-focus required></textarea><div ng-messages=rejectForm.reject_reason.$error><div ng-message=required>{{\\'ADMIN.POTENTIAL.REJECT_REASON\\' | translate}}</div><div ng-message=md-maxlength>{{\\'ADMIN.POTENTIAL.MAX_ERROR\\' | translate}}</div></div></md-input-container></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" type=submit ng-disabled=vm.isActionDisabled><span ng-hide=vm.isActionLoading.confirmReject>{{\\'ADMIN.POTENTIAL.CONFIRM\\' | translate}}</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isActionLoading.confirmReject class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/modals/potential-exceptions.submit.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.POTENTIAL.CONFIRM_POTENTIAL_EXCEPTION\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal() ng-disabled=vm.isLoadingAffectedShipments><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-show=!vm.isLoadingAffectedShipments><p>{{\\'ADMIN.POTENTIAL.CONFIRM_SUBMIT_STRING\\' | translate}} <strong>{{vm.numShipmentsAffected}}</strong> {{\\'ADMIN.POTENTIAL.SHIPMENTS\\' | translate}}</p><p>{{\\'ADMIN.POTENTIAL.CONFIRM_INFO_STRING\\' | translate}}</p><span ng-if=!vm.switchEmail><a href=\\\"/track-trace?potential_exception_id={{vm.exceptionDetails.id}}\\\" target=_blank class=btn-link>{{\\'ADMIN.POTENTIAL.VIEW_TRACK_TRACE_RESULTS\\' | translate}}</a> </span><span ng-if=vm.switchEmail><a ng-click=vm.errorMsgLensMode() target=_blank class=btn-link>{{\\'ADMIN.POTENTIAL.VIEW_TRACK_TRACE_RESULTS\\' | translate}}</a></span><br>{{\\'ADMIN.POTENTIAL.OPEN_WINDOW\\' | translate}} </span><span layout=row layout-align=\\\"center center\\\" ng-show=vm.isLoadingAffectedShipments><h3>{{\\'ADMIN.POTENTIAL.LOADING_AFFECTED\\' | translate}}</h3></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-disabled=\\\"vm.isLoadingAffectedShipments || vm.isActionDisabled\\\" ng-click=vm.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.confirmSubmit() isdisabled=vm.isButtonDisabled() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmSubmit></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/modals/potential-exceptions.warning.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.POTENTIAL.WARNING\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal() ng-disabled=vm.isLoadingAffectedShipments><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-show=!vm.isLoadingAffectedShipments><p>{{\\'ADMIN.POTENTIAL.PENDING_STRING\\' | translate}}</p><p>{{\\'ADMIN.POTENTIAL.CONFIRM_SUBMIT_STRING\\' | translate}} <strong>{{vm.numShipmentsAffected}}</strong> {{\\'ADMIN.POTENTIAL.SHIPMENTS\\' | translate}}</p><p>{{\\'ADMIN.POTENTIAL.WARNING_END_DATE\\' | translate}}</p><a href=\\\"/track-trace?potential_exception_id={{vm.exceptionDetails.id}}\\\" target=_blank class=btn-link>{{\\'ADMIN.POTENTIAL.VIEW_TRACK_TRACE_RESULTS\\' | translate}}</a><br>{{\\'ADMIN.POTENTIAL.OPEN_WINDOW\\' | translate}} </span><span layout=row layout-align=\\\"center center\\\" ng-show=vm.isLoadingAffectedShipments><h3>{{\\'ADMIN.POTENTIAL.LOADING_AFFECTED\\' | translate}}</h3></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-disabled=vm.isLoadingAffectedShipments ng-click=vm.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button ng-disabled=vm.isLoadingAffectedShipments class=\\\"md-raised md-accent\\\" ng-click=vm.confirmEnd()>{{\\'ADMIN.POTENTIAL.END\\' | translate}}</md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-delete.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.FAILED_DELETE\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-delete.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.SUCCESS_DELETE\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-end.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.FAILED_END\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-end.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.SUCCESS_END\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-get.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.FAILED_GET\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-lensmodeon.error.html\",\"<md-toast><div layout=row><md-icon class=text-warning>error</md-icon><span flex><p>Lensview is on, Switch off lensview to click on link!</p></span><span ng-controller=\\\"CreatePotentialExceptionsController as vm\\\" ng-click=vm.closeMdToastErr()><md-icon style=\\\"position: absolute;right: 0px;top: 5px;font-size: 20px;cursor: pointer\\\" aria-label=\\\"Close dialog\\\" class=\\\"ng-scope material-icons\\\"></md-icon></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-publish.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.FAILED_PUBLISH\\' | translate}}</p><div ng-show=\\\"!!messages && messages.length > 0\\\"><div ng-repeat=\\\"message in messages\\\"><p style=color:red>{{message}}</p></div></div></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-publish.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.SUCCESS_PUBLISH\\' | translate}}</p><p ng-show=!!message>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-reject.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.FAILED_REJECT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-reject.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.SUCCESS_REJECT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-save-draft.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger></md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.FAILED_SAVE_DRAFT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-save-draft.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.SUCCESS_SAVE_DRAFT\\' | translate}}</p><p ng-show=!!message>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-server.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.SERVER_ERROR\\' | translate}}</p><div ng-show=\\\"!!messages && messages.length > 0\\\"><div ng-repeat=\\\"message in messages\\\"><p style=color:red>{{message}}</p></div></div></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-submit.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.FAILED_SUBMIT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/create-potential-exceptions/toast/toast-submit.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>{{\\'ADMIN.POTENTIAL.SUCCESS_SUBMIT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/equipment-type/modals/edit-equipmentModal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog equipment_model\\\"><md-toolbar><div class=md-toolbar-tools><h2>Equipment Details</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><div class=column><md-input-container class=\\\"md-block error-hidden\\\"><label class=company translate=Code></label><input type=text ng-disabled=true ng-model=vm.equipment_data.code></md-input-container></div><div class=column><md-input-container class=\\\"md-block error-hidden\\\"><label class=company translate=Description></label><input type=text ng-disabled=false ng-model=vm.equipment_data.description></md-input-container></div><div class=column><md-input-container class=\\\"md-block error-hidden m-b\\\"><label translate=\\\"Equipment Type Group\\\"></label><md-select aria-label=vm.equipment_data.group ng-model=vm.equipment_data.group><md-option ng-value=\\\"\\'\\'\\\">-</md-option><md-option ng-repeat=\\\"options in vm.equipmentTypeGroupData\\\" ng-selected=\\\"options == vm.equipment_data.group\\\">{{options}}</md-option></md-select></md-input-container></div></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.updateEquipmentType() display=SUBMIT isloading=vm.equipmentTypeUpdating></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/equipment-type/toast/toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color ng-if=\\\"messages.status == \\'success\\'\\\">check</md-icon><md-icon class=text-danger ng-if=\\\"messages.status == \\'error\\'\\\">error</md-icon><span layout=row><p>{{messages.message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/feature-spotlight/forms/spotlight-actions.html\",\"<md-menu><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4 id=spotlightIndexMenu><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedActiveCount()== 0\\\" ng-click=\\\"tctrl.showModal(ev, \\'activate-slide\\')\\\" class=md-primary ng-click=\\\"\\\" style=\\\"color: #000\\\"><div layout=row flex=auto><p flex=auto><span translate=ADMIN.FEATURE.ACTION_OPTIONS.ACTIVE_SLIDE></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedFilterCount(\\'active\\', true) == 0\\\" ng-click=\\\"tctrl.showModal(ev, \\'deactivate-slide\\')\\\" class=md-primary ng-click=\\\"\\\" style=\\\"color: #000\\\"><div layout=row flex=auto><p flex=auto><span translate=ADMIN.FEATURE.ACTION_OPTIONS.DEACTIVATE_SLIDE></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedFilterCount(\\'priority\\', false) == 0\\\" ng-click=\\\"tctrl.showModal(ev, \\'priority-slide\\')\\\" class=md-primary ng-click=\\\"\\\" style=\\\"color: #000\\\"><div layout=row flex=auto><p flex=auto><span translate=ADMIN.FEATURE.ACTION_OPTIONS.MARK_PRIORITY_FEATURE></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedFilterCount(\\'priority\\', true) == 0\\\" ng-click=\\\"tctrl.showModal(ev, \\'nonpriority-slide\\')\\\" class=md-primary ng-click=\\\"\\\" style=\\\"color: #000\\\"><div layout=row flex=auto><p flex=auto><span translate=ADMIN.FEATURE.ACTION_OPTIONS.UNMARK_PRIORITY_FEATURE></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedFilterCount(\\'is_active\\', false) == 0\\\" class=md-primary ng-click=\\\"tctrl.canDelete(ev, \\'delete-slide\\')\\\" style=\\\"color: #000\\\"><div layout=row flex=auto><p flex=auto><span translate=ADMIN.FEATURE.ACTION_OPTIONS.DELETE_SLIDE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/feature-spotlight/modals/activate-slide.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.FEATURE.BULK.ACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span translate=ADMIN.FEATURE.BULK.ACTIVATE_CONFIRM></span> {{ tctrl.getSelectedActiveCount() }} <span class=lowercase translate=ADMIN.FEATURE.SLIDE></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-show=\\\"tctrl.getSelectedActiveCount>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"tctrl.getSelectedActiveCount()<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-show=\\\"{{tctrl.getSelectedActiveCount() > 0}}\\\" callfunction=\\\"tctrl.bulkUpdate({active: true}, \\'/spotlights/bulk_update/\\')\\\" display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/feature-spotlight/modals/deactivate-slide.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.FEATURE.BULK.DEACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span translate=ADMIN.FEATURE.BULK.DEACTIVATE_CONFIRM></span> {{ tctrl.getSelectedFilterCount(\\'active\\', true) }} <span class=lowercase translate=ADMIN.FEATURE.SLIDE></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-if=\\\"tctrl.getSelectedFilterCount(\\'active\\', true)>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"tctrl.getSelectedCount(\\'deactivate\\')<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-if=\\\"tctrl.getSelectedFilterCount(\\'active\\', true)>0\\\" callfunction=\\\"tctrl.bulkUpdate({active: false}, \\'/spotlights/bulk_update/\\')\\\" display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/feature-spotlight/modals/delete-slide.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.FEATURE.BULK.DELETE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><!-- <md-dialog-content class=\\\"light-content md-padding\\\">\\r\\n <span translate=\\'USER.BULK.DELETE_CONFIRM\\'></span> {{ tctrl.getSelectedCount(\\'delete\\') }} <span class=\\\"lowercase\\\" translate=\\\"USER.USERS\\\"></span>\\r\\n </md-dialog-content> --><md-dialog-content class=\\\"light-content md-padding\\\"><span translate=ADMIN.FEATURE.BULK.DELETE_CONFIRM></span> {{ tctrl.getSelectedCount(\\'delete\\') }} <span class=lowercase translate=ADMIN.FEATURE.SLIDE></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-if=\\\"tctrl.getSelectedCount(\\'delete\\')>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"tctrl.getSelectedCount(\\'delete\\')<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-if=\\\"tctrl.getSelectedCount(\\'delete\\')>0\\\" callfunction=tctrl.bulkDelete() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/feature-spotlight/modals/delete-spotlight.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.FEATURE.ACTION_OPTIONS.DELETE_SLIDE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><!-- <md-dialog-content class=\\\"light-content md-padding\\\">\\r\\n <span translate=\\'USER.BULK.DELETE_CONFIRM\\'></span> {{ vm.getSelectedCount(\\'delete\\') }} <span class=\\\"lowercase\\\" translate=\\\"USER.USERS\\\"></span>\\r\\n</md-dialog-content> --><md-dialog-content class=\\\"light-content md-padding\\\"><span translate=ADMIN.FEATURE.BULK.DELETE_CONFIRM></span> 1 <span class=lowercase translate=ADMIN.FEATURE.SLIDE></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><!--<md-button\\r\\n class=\\\"md-primary\\\"\\r\\n ng-click=\\\"vm.closeModal()\\\">\\r\\n <span translate=\\\"ADMIN.CLOSE\\\"></span></md-button>--><loading-button callfunction=vm.deleteSlide(vm.newSlide) display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/feature-spotlight/modals/nonpriority-slide.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.FEATURE.BULK.UNPRIORITIZE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span translate=ADMIN.FEATURE.BULK.UNPRIORITIZE_CONFIRM></span> {{ tctrl.getSelectedFilterCount(\\'priority\\', true) }} <span class=lowercase translate=ADMIN.FEATURE.SLIDE></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-show=\\\"tctrl.getSelectedFilterCount(\\'priority\\', true)>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"tctrl.getSelectedCount(\\'activate\\')<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-show=\\\"{{tctrl.getSelectedFilterCount(\\'priority\\', true) > 0}}\\\" callfunction=\\\"tctrl.bulkUpdate({priority: false}, \\'/spotlights/bulk_update/\\')\\\" display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/feature-spotlight/modals/preview-slide.modal.html\",\"<md-dialog class=feature_spotlight_newPopup flex=95 flex-gt-sm=55 style=\\\"max-width:900px !important;border-radius:0px;background:none !important;box-shadow:none\\\"><span class=m-b style=\\\"text-align: center; color:#ffffff; font-size: 25px; font-weight:700\\\">SLIDE PREVIEW </span><!-- <md-toolbar>\\r\\n <div class=\\\"md-toolbar-tools\\\">\\r\\n <h2>{{newSlide.feature_name}}</h2>\\r\\n <span flex></span>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"closeModal()\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n </md-toolbar> --><md-dialog-content><div class=\\\"md-dialog-content featured_spot_popup_content\\\"><div><img class=popup_image ng-src={{vm.newSlide.slide_image.url}}><md-button class=\\\"md-icon-button featured_spot_popup_btn\\\" ng-click=vm.closeModal()><md-icon class=featured_spot_popup_icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><div style=\\\"padding: 1% 4% 0 4%;box-sizing:border-box\\\"><h2 class=featured_spot_popup_heading>{{vm.newSlide.slide_title}}</h2></div><div style=\\\"padding: 1% 4% 0 4%;box-sizing:border-box\\\"><h2 class=featured_spot_popup_heading>{{userCtrl.vm.newSlide.slide_title}}</h2></div><div style=\\\"padding: 0 4% 2% 4%;text-align: justify;box-sizing:border-box\\\"><p ng-bind-html=vm.newSlide.slide_content></p></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/admin/feature-spotlight/modals/priority-slide.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.FEATURE.BULK.PRIORITIZE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span translate=ADMIN.FEATURE.BULK.PRIORITIZE_CONFIRM></span> {{ tctrl.getSelectedFilterCount(\\'priority\\', false) }} <span class=lowercase translate=ADMIN.FEATURE.SLIDE></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-show=\\\"tctrl.getSelectedFilterCount(\\'priority\\', false)>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"tctrl.getSelectedCount(\\'activate\\')<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-show=\\\"{{tctrl.getSelectedFilterCount(\\'priority\\', false) > 0}}\\\" callfunction=\\\"tctrl.bulkUpdate({priority: true}, \\'/spotlights/bulk_update/\\')\\\" display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/feature-spotlight/toast/create-slide.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=column layout-align=\\\"center start\\\"><span>{{\\'ADMIN.FEATURE.MESSAGE.ERROR_SAVE_SPOTLIGHT\\' | translate}}</span> <span ng-repeat=\\\"message in messages track by $index\\\">{{message}}</span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/feature-spotlight/toast/create-slide.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>{{\\'ADMIN.FEATURE.MESSAGE.SUCCESS_SAVE_SPOTLIGHT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/feature-spotlight/toast/delete-slide.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/feature-spotlight/toast/delete-slide.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/feature-spotlight/toast/save-slide.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/feature-spotlight/toast/save-slide.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/groups/modals/api-error.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.ERROR_CREATING_ACCOUNT\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><ul><li ng-repeat=\\\"message in apiErrorMessages\\\">{{ message }}</li></ul></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'CLOSE\\' | translate}}</md-button><span flex=auto></span></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/groups/toast/create-group.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>{{\\'ADMIN.GROUPS.SUCCESS_CREATE_GROUP\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/groups/toast/update-group.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>{{\\'ADMIN.GROUPS.SUCCESS_UPDATE_GROUP\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/cfs_exceptions/add-cfs-exception.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"addCfsExceptionPopUpController as vm\\\" ng-cloak><md-dialog-content class=light-content style=\\\"background: #F5F5F5;margin-top: 100px\\\"><crane-table title=\\\"CFS EXCEPTION APPROVERS\\\" icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewAddTitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=vm.searchflag buttons=vm.buttons lensviewtablepopup=true ctrl=addCfsExceptionPopUpController></crane-table></md-dialog-content><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button ng-click=vm.cancel() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" ng-click=vm.addSectedLensGroup()><span class=uppercase>Add to Selected Users</span></md-button></md-dialog-actions><!-- </form> --></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/cfs_exceptions/cfs-exceptions.html\",\"<!-- <cva-shell>\\r\\n <div class=\\\"shell-padding book-shipment content-max\\\" id=\\\"toast-parent\\\">\\r\\n <div class=\\\"view-header\\\">\\r\\n <div layout-xs=\\\"column\\\" layout-gt-xs=\\\"row\\\">\\r\\n <div flex=\\\"auto\\\">\\r\\n <h2 class=\\\"md-display-1\\\" translate=\\\"Lens Groups\\\"></h2>\\r\\n <span class=\\\"breadcrumb flat\\\">\\r\\n <a href=\\'/#\\' class=\\\"parent-link\\\"><span translate=\\\"Lens Groups\\\"></span></a>\\r\\n </span>\\r\\n </div>\\r\\n \\r\\n </div>\\r\\n </div> --><!-- <md-card class=\\\"p-a-sm\\\" collapsible template-url=\\\"/app/admin/users/forms/search.html\\\"></md-card> --><!-- /app/admin/lensview/forms/menu-actions.html --><crane-table title=Departments icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons menu=\\\"\\'/app/admin/lensview/forms/action-buttons.html\\'\\\" ctrl=lensviewDepartmentsController></crane-table><!-- </cva-shell> -->\");\n$templateCache.put(\"/app/admin/lensview/cmts_exceptions/add-cmts-exception.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"addCmtsExceptionPopUpController as vm\\\" ng-cloak><md-dialog-content class=light-content style=\\\"background: #F5F5F5;margin-top: 100px\\\"><crane-table title=\\\"CMTS EXCEPTION APPROVERS\\\" icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewAddTitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=vm.searchflag buttons=vm.buttons lensviewtablepopup=true ctrl=addCmtsExceptionPopUpController></crane-table></md-dialog-content><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button ng-click=vm.cancel() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" ng-click=vm.addSectedLensGroup()><span class=uppercase>Add to Selected Users</span></md-button></md-dialog-actions><!-- </form> --></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/cmts_exceptions/cmts-exceptions.html\",\"<!-- <cva-shell>\\r\\n <div class=\\\"shell-padding book-shipment content-max\\\" id=\\\"toast-parent\\\">\\r\\n <div class=\\\"view-header\\\">\\r\\n <div layout-xs=\\\"column\\\" layout-gt-xs=\\\"row\\\">\\r\\n <div flex=\\\"auto\\\">\\r\\n <h2 class=\\\"md-display-1\\\" translate=\\\"Lens Groups\\\"></h2>\\r\\n <span class=\\\"breadcrumb flat\\\">\\r\\n <a href=\\'/#\\' class=\\\"parent-link\\\"><span translate=\\\"Lens Groups\\\"></span></a>\\r\\n </span>\\r\\n </div>\\r\\n \\r\\n </div>\\r\\n </div> --><!-- <md-card class=\\\"p-a-sm\\\" collapsible template-url=\\\"/app/admin/users/forms/search.html\\\"></md-card> --><!-- /app/admin/lensview/forms/menu-actions.html --><crane-table title=Departments icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons menu=\\\"\\'/app/admin/lensview/forms/action-buttons.html\\'\\\" ctrl=lensviewDepartmentsController></crane-table><!-- </cva-shell> -->\");\n$templateCache.put(\"/app/admin/lensview/companies/add-companies.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"lensviewCompaniesController as vm\\\" ng-cloak><!-- <form name=\\\"searchForm\\\" reset-directive=\\\"searchCtrl.searchFields\\\" class=\\\"light-form\\\" ng-submit=\\\"vm.search()\\\"> --><!-- <md-toolbar>\\r\\n <div class=\\\"md-toolbar-tools\\\">\\r\\n <md-icon aria-label=\\\"Lens Group\\\" style=\\\" color: rgb(35, 42, 51); font-size: 25px;\\\"></md-icon>\\r\\n <h2 class=\\\"uppercase\\\" style=\\\"margin-left: 15px\\\">Add Company</h2>\\r\\n <span style=\\\"font-size: 14px;\\r\\n font-style: italic;\\r\\n color: #CCC;\\r\\n margin-left: 10px;\\r\\n text-transform: none;\\\">Add Companies to this Lens Group</span>\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"vm.cancel()\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n </md-toolbar> --><md-dialog-content class=light-content style=\\\"background: #F5F5F5;margin-top: 100px\\\"><crane-table title=COMPANY icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewAddTitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=true buttons=\\\"\\\" lensviewtablepopup=true ctrl=\\\"lensviewCompaniesPopUpController as lv\\\"></crane-table></md-dialog-content><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><!-- <md-button ng-click=\\\"vm.clearAll()\\\" hide-xs>\\r\\n <span translate=\\\"TRACKTRACE.CLEAR\\\"></span>\\r\\n </md-button> --> <span flex=auto></span><!-- <div ng-if=\\\"searchCtrl.isSavedSearch\\\" hide-xs>\\r\\n <md-button ng-click=\\\"searchCtrl.loadDefault()\\\">\\r\\n <span translate=\\\"TRACKTRACE.LOAD_DEFAULT_CRITERIA\\\"></span>\\r\\n </md-button>\\r\\n\\r\\n </div> --><!-- <md-button ng-click=\\\"searchCtrl.saveToDefault()\\\" hide-xs>\\r\\n <span translate=\\\"TRACKTRACE.SAVE_DEFAULT_CRITERIA\\\"></span>\\r\\n </md-button> --><md-button class=\\\"md-raised md-accent\\\" ng-click=vm.addSectedCompanies()><span class=uppercase>Add Selected Companies</span></md-button></md-dialog-actions><!-- </form> --></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/companies/lensview-companies.html\",\"<crane-table title=COMPANY icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=vm.searchflag buttons=vm.buttons menu=\\\"\\'/app/admin/lensview/menuform/menu.html\\'\\\" ctrl=lensviewCompaniesController></crane-table>\");\n$templateCache.put(\"/app/admin/lensview/csl_exceptions/add-exception.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"addExceptionPopUpController as vm\\\" ng-cloak><md-dialog-content class=light-content style=\\\"background: #F5F5F5;margin-top: 100px\\\"><crane-table title=\\\"CSL EXCEPTION APPROVERS\\\" icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewAddTitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=vm.searchflag buttons=vm.buttons lensviewtablepopup=true ctrl=addExceptionPopUpController></crane-table></md-dialog-content><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button ng-click=vm.cancel() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" ng-click=vm.addSectedLensGroup()><span class=uppercase>Add to Selected Users</span></md-button></md-dialog-actions><!-- </form> --></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/csl_exceptions/csl-exceptions.html\",\"<!-- <cva-shell>\\r\\n <div class=\\\"shell-padding book-shipment content-max\\\" id=\\\"toast-parent\\\">\\r\\n <div class=\\\"view-header\\\">\\r\\n <div layout-xs=\\\"column\\\" layout-gt-xs=\\\"row\\\">\\r\\n <div flex=\\\"auto\\\">\\r\\n <h2 class=\\\"md-display-1\\\" translate=\\\"Lens Groups\\\"></h2>\\r\\n <span class=\\\"breadcrumb flat\\\">\\r\\n <a href=\\'/#\\' class=\\\"parent-link\\\"><span translate=\\\"Lens Groups\\\"></span></a>\\r\\n </span>\\r\\n </div>\\r\\n \\r\\n </div>\\r\\n </div> --><!-- <md-card class=\\\"p-a-sm\\\" collapsible template-url=\\\"/app/admin/users/forms/search.html\\\"></md-card> --><!-- /app/admin/lensview/forms/menu-actions.html --><crane-table title=Departments icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons menu=\\\"\\'/app/admin/lensview/forms/action-buttons.html\\'\\\" ctrl=lensviewDepartmentsController></crane-table><!-- </cva-shell> -->\");\n$templateCache.put(\"/app/admin/lensview/csl_exceptions/edit-department.html\",\"<style>@media (max-width: 599px) {\\r\\n.hide-xs:not(.show-xs):not(.show), .hide:not(.show-xs):not(.show) {\\r\\n display: block; }\\r\\n }\\r\\n .hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"lensviewDepartmentsController as vm\\\" ng-cloak><md-dialog-content class=light-content style=\\\"background: #F5F5F5\\\"><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex><md-icon ng-bind-html= class=\\\"ng-binding material-icons\\\"></md-icon><span ng-if=!department.read_access>EDIT DEPARTMENT</span> <span ng-if=department.read_access>VIEW DEPARTMENT</span></h2><span ng-if=!department.read_access style=\\\"font-size: 14px;font-style: italic;color: #828791;margin-left: 10px;text-transform: none\\\">{{vm.lensviewtitleedit}}</span> <span flex=auto></span><md-button class=md-icon-button ng-click=vm.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button><span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=row class=\\\"fourth_column newchips\\\"><div flex-gt-sm=45 class=md-card-div style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden m-b\\\"><label style=\\\"font-weight: 600\\\">Department Name</label><input type=text ng-model=department.name ng-disabled=department.read_access name=first_name required><div ng-messages=vm.formDetails.first_name.$error><div ng-message=required><span>Departmant Name Required</span></div></div></md-input-container></div><div flex-gt-sm=48 class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><h4>Customer Type*   {{status}} <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.customer_type_cehck>Customer Type is mandatory</span></h4><md-radio-group ng-model=department.customer_type><md-radio-button ng-disabled=department.read_access ng-if=\\\"department.customer_types.includes(\\'cww\\')\\\" ng-click=\\\"vm.changeCustomerTypeEdit(\\'cww\\',department.statusChanged)\\\" style=\\\"display: inline-block\\\" value=CWW class=md-primary>CWW</md-radio-button>      <md-radio-button ng-disabled=department.read_access ng-if=\\\"department.customer_types.includes(\\'csl\\')\\\" ng-click=\\\"vm.changeCustomerTypeEdit(\\'csl\\',department.statusChanged)\\\" style=\\\"display: inline-block\\\" value=CSL>CSL</md-radio-button>      <md-radio-button ng-disabled=department.read_access ng-if=\\\"department.customer_types.includes(\\'cfs\\')\\\" ng-click=\\\"vm.changeCustomerTypeEdit(\\'cfs\\',department.statusChanged)\\\" style=\\\"display: inline-block\\\" value=CFS>CFS</md-radio-button></md-radio-group></md-input-container></div></div><br><div id=cww-setup-box ng-if=\\\"department.is_cww || department.is_csl || department.is_cfs\\\"><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row><div flex-gt-sm=50 ng-if=department.is_cww><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Party IDs</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Party ID / Group ID either one is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=department.is_csl><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Customer IDs</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatchCsl(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Customer ID is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=department.is_cfs><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Customer IDs</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatchCfs(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Customer ID is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=department.is_cww><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Group IDs</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=department.related_party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'current_user_related_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=50 ng-if=\\\"department.is_cww || department.is_csl || department.is_cfs\\\"><label style=\\\"font-weight: 700;color: #b4b5b5;font-size: 12px\\\">Primary Contact Override</label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=department.default_contact_id ng-disabled=department.read_access name=default_contact_id aria-label=default_contact_id><md-option value=\\\"\\\">    --    </md-option><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=50 ng-if=\\\"department.is_cww || department.is_csl || department.is_cfs\\\"><md-input-container class=\\\"md-block error-hidden m-b\\\"><label style=\\\"font-weight: 700\\\">BCC Override</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=department.default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=50><div flex-gt-sm=50 ng-if=department.is_cww style=\\\"margin: 10px 0\\\"><div style=\\\"display: inline-block\\\"><label style=\\\"font-weight: 700\\\">Reskin :     </label><md-checkbox ng-disabled=department.read_access aria-label=is_reskin ng-model=department.is_reskin ng-change=vm.changeReskin(department.is_reskin) class=md-primary></md-checkbox></div><div ng-show=department.is_reskin style=\\\"display: inline-block;position: relative;top: -5px\\\"><md-input-container style=\\\"margin:0;padding: 0\\\" class=\\\"md-block error-hidden m-b\\\"><md-select style=\\\"margin: 0px 0 0px 20px\\\" ng-disabled=department.reskin_check ng-model=department.reskin_type aria-label=department.reskin_type><md-option value=default>Default</md-option><md-option value=magno>Magno</md-option></md-select></md-input-container></div></div></div></div></md-card-content></md-card></div><div layout-gt-sm=row><div flex-gt-sm=50 style=\\\"margin: 10px 0\\\"><label style=\\\"font-weight: 700\\\">Demo Department :     </label><md-checkbox ng-disabled=department.read_access aria-label=is_demo ng-model=department.is_demo class=md-primary></md-checkbox></div></div></md-card-content></form></md-card><md-dialog-actions style=\\\"background: #F5F5F5 !important;border-top:1px solid #ccc;padding: 20px 15px\\\" layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button ng-if=\\\"!department.read_access && !vm.textCustType\\\" style=\\\"border: 1px solid #ccc;background: #fff\\\" ng-click=vm.closeModal() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\" translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textCustType>* This Action will overrides previous department settings. Are you sure?</span></span><md-button ng-if=\\\"!department.read_access && !vm.textCustType\\\" ng-enable=vm.formDetails.$valid class=\\\"md-raised md-accent\\\" ng-click=vm.updateDepartment(department.id) hide-xs><span style=\\\"padding: 10px 25px\\\">SAVE</span></md-button><md-button ng-if=vm.textCustType style=\\\"border: 1px solid #ccc;background: #fff\\\" ng-click=vm.cancelCustomerType(typeCust) hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\" translate=TRACKTRACE.CANCEL></span></md-button><md-button ng-if=vm.textCustType ng-enable=vm.formDetails.$valid class=\\\"md-raised md-accent\\\" ng-click=vm.changeCustomerSettings(department.customer_type) hide-xs><span style=\\\"padding: 10px 25px\\\">OK</span></md-button><md-button ng-if=department.read_access ng-enable=vm.formDetails.$valid class=\\\"md-raised md-accent\\\" ng-click=vm.closeModal() hide-xs><span style=\\\"padding: 10px 25px\\\">CLOSE</span></md-button></md-dialog-actions></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/departments/add-department.html\",\"<style>@media (max-width: 599px) {\\r\\n.hide-xs:not(.show-xs):not(.show), .hide:not(.show-xs):not(.show) {\\r\\n display: block; }\\r\\n }</style><md-dialog style=\\\"margin-top: 104px;margin-left: -41px\\\" class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"lensviewDepartmentsController as vm\\\" ng-cloak><md-dialog-content class=light-content style=\\\"background: #F5F5F5\\\"><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex><md-icon ng-bind-html= class=\\\"ng-binding material-icons\\\"></md-icon><span>ADD DEPARTMENT</span></h2><span style=\\\"font-size: 14px;font-style: italic;color: #828791;margin-left: 10px;text-transform: none\\\">{{vm.lensviewtitle}}</span> <span flex=auto></span><md-button class=md-icon-button ng-click=vm.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button><span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=row class=\\\"fourth_column newchips\\\"><div flex-gt-sm=45 class=md-card-div style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden m-b\\\"><label style=\\\"font-weight: 600\\\">Department Name</label><input type=text ng-model=vm.department.name name=first_name required><div ng-messages=vm.formDetails.first_name.$error><div ng-message=required><span>Departmant Name Required</span></div></div></md-input-container></div><div flex-gt-sm=48 class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><h4>Customer Type*    <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.customer_type_cehck>Customer Type is mandatory</span></h4><md-radio-group ng-model=vm.department.customer_type><md-radio-button ng-if=\\\"company.customer_types.includes(\\'cww\\')\\\" ng-click=\\\"vm.changeCustomerType(\\'cww\\')\\\" style=\\\"display: inline-block\\\" value=cww selected class=md-primary>CWW</md-radio-button>      <md-radio-button ng-if=\\\"company.customer_types.includes(\\'csl\\')\\\" ng-click=\\\"vm.changeCustomerType(\\'csl\\')\\\" style=\\\"display: inline-block\\\" value=csl class=md-primary>CSL</md-radio-button>      <md-radio-button ng-if=\\\"company.customer_types.includes(\\'cfs\\')\\\" ng-click=\\\"vm.changeCustomerType(\\'cfs\\')\\\" style=\\\"display: inline-block\\\" value=cfs class=md-primary>CFS</md-radio-button>      <md-radio-button ng-if=\\\"company.customer_types.includes(\\'cmts\\')\\\" ng-click=\\\"vm.changeCustomerType(\\'cmts\\')\\\" style=\\\"display: inline-block\\\" value=cmts class=md-primary>CMTS</md-radio-button></md-radio-group></md-input-container></div></div><br><div id=cww-setup-box ng-if=\\\"vm.is_cww || vm.is_csl || vm.is_cfs || vm.is_cmts\\\"><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row><div flex-gt-sm=50 ng-if=vm.is_cww><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Party IDs</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=vm.department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Party ID / Group ID either one is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=vm.is_csl><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Customer IDs</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=vm.department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-search-text=searchText md-items=\\\"item in vm.getMatchCsl(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Customer ID is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=vm.is_cfs><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Customer IDs</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=vm.department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-search-text=searchText md-items=\\\"item in vm.getMatchCfs(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Customer ID is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=vm.is_cmts><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Trading Partner IDs</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=vm.department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-search-text=searchText md-items=\\\"item in vm.getMatchCmts(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Trading Partner ID is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=vm.is_cww><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Group IDs</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=vm.department.related_party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'current_user_related_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=50 ng-if=\\\"vm.is_cww || vm.is_csl || vm.is_cfs || vm.is_cmts\\\"><label style=\\\"font-weight: 700;color: #b4b5b5;font-size: 12px\\\">Primary Contact Override</label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=vm.department.default_contact_id name=default_contact_id aria-label=default_contact_id><md-option value=\\\"\\\">    --    </md-option><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=50 ng-if=\\\"vm.is_cww || vm.is_csl || vm.is_cfs || vm.is_cmts\\\"><md-input-container class=\\\"md-block error-hidden m-b\\\"><label style=\\\"font-weight: 700\\\">BCC Override</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=vm.department.default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=50><div flex-gt-sm=50 ng-if=vm.is_cww style=\\\"margin: 10px 0\\\"><div style=\\\"display: inline-block\\\"><label style=\\\"font-weight: 700\\\">Reskin :     </label><md-checkbox ng-model=vm.department.is_reskin aria-label=is_reskin ng-change=vm.changeReskin(vm.department.is_reskin) class=md-primary></md-checkbox></div><div ng-show=vm.department.is_reskin style=\\\"display: inline-block;position: relative;top: -5px\\\"><md-input-container style=\\\"margin:0;padding: 0\\\" class=\\\"md-block error-hidden m-b\\\"><md-select style=\\\"margin: 0px 0 0px 20px\\\" ng-disabled=vm.reskin_check ng-model=vm.department.reskin_type aria-label=vm.department.reskin_type><md-option value=default>Default</md-option><md-option value=magno>Magno</md-option></md-select></md-input-container></div></div></div></div></md-card-content></md-card></div><div layout-gt-sm=row><div flex-gt-sm=50 style=\\\"margin: 10px 0\\\"><label style=\\\"font-weight: 700\\\">Demo Department :     </label><md-checkbox ng-model=vm.department.is_demo aria-label=is_demo class=md-primary></md-checkbox></div></div></md-card-content></form></md-card><md-dialog-actions style=\\\"background: #F5F5F5 !important;border-top:1px solid #ccc;padding: 20px 15px\\\" layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button style=\\\"border: 1px solid #ccc;background: #fff\\\" ng-click=vm.closeModal() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\" translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button style=\\\"box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);background-color: rgb(45,125,143)\\\" ng-disabled=vm.formDetails.$invalid class=\\\"btn btn-default\\\" ng-click=vm.saveDepartment() hide-xs><span style=\\\"padding: 10px 25px\\\">SAVE</span></md-button></md-dialog-actions></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/departments/edit-department.html\",\"<style>@media (max-width: 599px) {\\r\\n.hide-xs:not(.show-xs):not(.show), .hide:not(.show-xs):not(.show) {\\r\\n display: block; }\\r\\n }\\r\\n .hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"lensviewDepartmentsController as vm\\\" ng-cloak><md-dialog-content class=light-content style=\\\"background: #F5F5F5\\\"><!-- ACCOUNT DETAILS --><md-card id=company_details><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex><md-icon ng-bind-html= class=\\\"ng-binding material-icons\\\"></md-icon><span ng-if=!department.read_access>EDIT DEPARTMENT</span> <span ng-if=department.read_access>VIEW DEPARTMENT</span></h2><span ng-if=!department.read_access style=\\\"font-size: 14px;font-style: italic;color: #828791;margin-left: 10px;text-transform: none\\\">{{vm.lensviewtitleedit}}</span> <span flex=auto></span><md-button class=md-icon-button ng-click=vm.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button><span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=row class=\\\"fourth_column newchips\\\"><div flex-gt-sm=45 class=md-card-div style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden m-b\\\"><label style=\\\"font-weight: 600\\\">Department Name</label><input type=text ng-model=department.name ng-disabled=department.read_access name=first_name required><div ng-messages=vm.formDetails.first_name.$error><div ng-message=required><span>Departmant Name Required</span></div></div></md-input-container></div><div flex-gt-sm=48 class=\\\"md-card-div space-customer-grid\\\" flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"start center\\\"><md-input-container class=\\\"md-block error-hidden\\\"><h4>Customer Type*   {{status}} <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.customer_type_cehck>Customer Type is mandatory</span></h4><md-radio-group ng-model=department.customer_type><md-radio-button ng-disabled=department.read_access ng-if=\\\"department.customer_types.includes(\\'cww\\')\\\" ng-click=\\\"vm.changeCustomerTypeEdit(\\'cww\\',department.statusChanged)\\\" style=\\\"display: inline-block\\\" value=CWW class=md-primary>CWW</md-radio-button>      <md-radio-button ng-disabled=department.read_access ng-if=\\\"department.customer_types.includes(\\'csl\\')\\\" ng-click=\\\"vm.changeCustomerTypeEdit(\\'csl\\',department.statusChanged)\\\" style=\\\"display: inline-block\\\" value=CSL class=md-primary>CSL</md-radio-button>      <md-radio-button ng-disabled=department.read_access ng-if=\\\"department.customer_types.includes(\\'cfs\\')\\\" ng-click=\\\"vm.changeCustomerTypeEdit(\\'cfs\\',department.statusChanged)\\\" style=\\\"display: inline-block\\\" value=CFS class=md-primary>CFS</md-radio-button>      <md-radio-button ng-disabled=department.read_access ng-if=\\\"department.customer_types.includes(\\'cmts\\')\\\" ng-click=\\\"vm.changeCustomerTypeEdit(\\'cmts\\',department.statusChanged)\\\" style=\\\"display: inline-block\\\" value=CMTS class=md-primary>cmts</md-radio-button></md-radio-group></md-input-container></div></div><br><div id=cww-setup-box ng-if=\\\"department.is_cww || department.is_csl || department.is_cfs\\\"><md-card style=margin:0 class=md-card-light><md-card-content><div layout-gt-sm=row><div flex-gt-sm=50 ng-if=department.is_cww><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Party IDs</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Party ID / Group ID either one is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=department.is_csl><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Customer IDs</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatchCsl(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Customer ID is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=department.is_cfs><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Customer IDs</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatchCfs(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Customer ID is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=department.is_cmts><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Trading Partner IDs</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=department.party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatchCmts(\\'current_user_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.party_check>Trading Partner ID is mandatory</span></md-input-container></div><div flex-gt-sm=50 ng-if=department.is_cww><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-weight: 700\\\">Group IDs</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=department.related_party_id_names md-require-match=true md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addPartyIds(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'current_user_related_parties\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=50 ng-if=\\\"department.is_cww || department.is_csl || department.is_cfs\\\"><label style=\\\"font-weight: 700;color: #b4b5b5;font-size: 12px\\\">Primary Contact Override</label><md-input-container class=\\\"md-block error-hidden\\\"><md-select ng-model=department.default_contact_id ng-disabled=department.read_access name=default_contact_id aria-label=default_contact_id><md-option value=\\\"\\\">    --    </md-option><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></md-input-container></div><div flex-gt-sm=50 ng-if=\\\"department.is_cww || department.is_csl || department.is_cfs\\\"><md-input-container class=\\\"md-block error-hidden m-b\\\"><label style=\\\"font-weight: 700\\\">BCC Override</label><md-chips class=\\\"newchips user-chips email-chips\\\" ng-model=department.default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=department.read_access md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div><div layout-gt-sm=row><div flex-gt-sm=50><div flex-gt-sm=50 ng-if=department.is_cww style=\\\"margin: 10px 0\\\"><div style=\\\"display: inline-block\\\"><label style=\\\"font-weight: 700\\\">Reskin :     </label><md-checkbox ng-disabled=department.read_access aria-label=read_access ng-model=department.is_reskin ng-change=vm.changeReskin(department.is_reskin) class=md-primary></md-checkbox></div><div ng-show=department.is_reskin style=\\\"display: inline-block;position: relative;top: -5px\\\"><md-input-container style=\\\"margin:0;padding: 0\\\" class=\\\"md-block error-hidden m-b\\\"><md-select style=\\\"margin: 0px 0 0px 20px\\\" ng-disabled=department.reskin_check ng-model=department.reskin_type aria-label=department.reskin_type><md-option value=default>Default</md-option><md-option value=magno>Magno</md-option></md-select></md-input-container></div></div></div></div></md-card-content></md-card></div><div layout-gt-sm=row><div flex-gt-sm=50 style=\\\"margin: 10px 0\\\"><label style=\\\"font-weight: 700\\\">Demo Department :     </label><md-checkbox ng-disabled=department.read_access aria-label=read_access ng-model=department.is_demo class=md-primary></md-checkbox></div></div></md-card-content></form></md-card><md-dialog-actions style=\\\"background: #F5F5F5 !important;border-top:1px solid #ccc;padding: 20px 15px\\\" layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button ng-if=\\\"!department.read_access && !vm.textCustType\\\" style=\\\"border: 1px solid #ccc;background: #fff\\\" ng-click=vm.closeModal() hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\" translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto style=\\\"text-align: center;color: red;font-size: 16px;font-style: italic\\\"><span ng-if=vm.textCustType>* This Action will overrides previous department settings. Are you sure?</span></span><md-button ng-if=\\\"!department.read_access && !vm.textCustType\\\" ng-enable=vm.formDetails.$valid class=\\\"md-raised md-accent\\\" ng-click=vm.updateDepartment(department.id) hide-xs><span style=\\\"padding: 10px 25px\\\">SAVE</span></md-button><md-button ng-if=vm.textCustType style=\\\"border: 1px solid #ccc;background: #fff\\\" ng-click=vm.cancelCustomerType(typeCust) hide-xs><span style=\\\"color:#bbb;padding: 10px 25px\\\" translate=TRACKTRACE.CANCEL></span></md-button><md-button ng-if=vm.textCustType ng-enable=vm.formDetails.$valid class=\\\"md-raised md-accent\\\" ng-click=vm.changeCustomerSettings(department.customer_type) hide-xs><span style=\\\"padding: 10px 25px\\\">OK</span></md-button><md-button ng-if=department.read_access ng-enable=vm.formDetails.$valid class=\\\"md-raised md-accent\\\" ng-click=vm.closeModal() hide-xs><span style=\\\"padding: 10px 25px\\\">CLOSE</span></md-button></md-dialog-actions></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/departments/lensview-departments.html\",\"<!-- <cva-shell>\\r\\n <div class=\\\"shell-padding book-shipment content-max\\\" id=\\\"toast-parent\\\">\\r\\n <div class=\\\"view-header\\\">\\r\\n <div layout-xs=\\\"column\\\" layout-gt-xs=\\\"row\\\">\\r\\n <div flex=\\\"auto\\\">\\r\\n <h2 class=\\\"md-display-1\\\" translate=\\\"Lens Groups\\\"></h2>\\r\\n <span class=\\\"breadcrumb flat\\\">\\r\\n <a href=\\'/#\\' class=\\\"parent-link\\\"><span translate=\\\"Lens Groups\\\"></span></a>\\r\\n </span>\\r\\n </div>\\r\\n \\r\\n </div>\\r\\n </div> --><!-- <md-card class=\\\"p-a-sm\\\" collapsible template-url=\\\"/app/admin/users/forms/search.html\\\"></md-card> --><!-- /app/admin/lensview/forms/menu-actions.html --><crane-table title=Departments icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons menu=\\\"\\'/app/admin/lensview/forms/action-buttons.html\\'\\\" ctrl=lensviewDepartmentsController></crane-table><!-- </cva-shell> -->\");\n$templateCache.put(\"/app/admin/lensview/forms/action-buttons.html\",\"<!-- <md-button class=\\\"md-raised md-accent btn-block-xs\\\"\\r\\n ng-click=\\\"vm.updateAccount(false)\\\"\\r\\n ng-disabled=\\\"vm.isLoad.account\\\"\\r\\n type=\\\"submit\\\"\\r\\n class=\\\"btn btn-default\\\">\\r\\n <span ng-hide=\\\"vm.isLoad.contact\\\" translate=\\\"USER.SAVE\\\"></span>\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" ng-hide=\\\"!vm.isLoad.contact\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>\\r\\n</md-button>\\r\\n<md-button class=\\\"md-raised md-accent btn-block-xs\\\" \\r\\n ng-click=\\\"vm.updateAccount(true)\\\" \\r\\n ng-disabled=\\\"vm.isLoad.account\\\"\\r\\n type=\\\"submit\\\" \\r\\n class=\\\"btn btn-default\\\"\\r\\n ng-show=\\\"vm.isCreate\\\">\\r\\n <span ng-hide=\\\"vm.isLoad.account\\\" translate=\\\"USER.SAVE_AND_NEW\\\"></span>\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" ng-hide=\\\"!vm.isLoad.account\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>\\r\\n</md-button>\\r\\n<md-button class=\\\"md-raised md-accent btn-block-xs\\\" \\r\\n ng-click=\\\"vm.showModal(ev, \\'resend-confirmation-check\\')\\\" \\r\\n ng-disabled=\\\"vm.isLoad.account\\\"\\r\\n type=\\\"submit\\\" \\r\\n class=\\\"btn btn-default\\\"\\r\\n ng-show=\\\"!vm.isCreate && !vm.user.confirmed\\\">\\r\\n <span ng-hide=\\\"vm.isLoad.account\\\" translate=\\\"Resend Confirmation\\\"> </span>\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" ng-hide=\\\"!vm.isLoad.account\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>\\r\\n</md-button> -->\");\n$templateCache.put(\"/app/admin/lensview/forms/department-actions.html\",\"<md-menu ng-if=!tctrl.readAccess><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount()==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'delete-department\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=\\\"\\\">REMOVE</span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount()==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'activate-demo\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=\\\"\\\">Activate Demo</span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount()==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'deactivate-demo\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=\\\"\\\">Deactivate Demo</span></p></div></md-button></md-menu-item></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/lensview/forms/exception-actions.html\",\"<md-menu ng-if=!tctrl.readAccess><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount()==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'delete-exception\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=\\\"\\\">REMOVE</span></p></div></md-button></md-menu-item></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/lensview/forms/lensgroup-actions.html\",\"<style>@media only screen and (min-width: 320px) and (max-width: 768px){\\r\\n.manage-lens-bulk{\\r\\n /*margin-left: 230px !important;*/\\r\\n}\\r\\n}</style><md-menu ng-if=tctrl.readlens><md-button class=\\\"md-icon-button manage-lens-bulk\\\" ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount()==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'delete-lensgroup\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=\\\"\\\">REMOVE</span></p></div></md-button></md-menu-item></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/lensview/forms/menu-actions.html\",\"<md-menu><!-- <md-button class=\\\"md-icon-button\\\" ng-click=\\\"\\\">\\r\\n <md-icon aria-label=\\\"options\\\">\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"\\\">\\r\\n <md-icon aria-label=\\\"options\\\">\\r\\n \\r\\n </md-icon>\\r\\n </md-button> --><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount()==0\\\" class=md-primary ng-click=tctrl.bulkEdit()><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.EDIT></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount(\\'activate\\')==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'bulk-activate-users\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.ACTIVATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount(\\'deactivate\\')==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'bulk-deactivate-users\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.DEACTIVATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount(\\'delete\\')==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'bulk-delete-users\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.DELETE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/lensview/forms_forms/action-buttons.html\",\"<md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.updateAccount(false) ng-disabled=vm.isLoad.account type=submit class=\\\"btn btn-default\\\"><span ng-hide=vm.isLoad.contact>SAVE</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.contact class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><!--<md-button class=\\\"md-raised md-accent btn-block-xs\\\"--><!--ng-click=\\\"vm.updateAccount(true)\\\"--><!--ng-disabled=\\\"vm.isLoad.account\\\"--><!--type=\\\"submit\\\"--><!--class=\\\"btn btn-default\\\"--><!--ng-show=\\\"vm.isCreate\\\">--><!--<span ng-hide=\\\"vm.isLoad.account\\\" translate=\\\"USER.SAVE_AND_NEW\\\"></span>--><!--<md-progress-circular md-mode=\\\"indeterminate\\\" ng-hide=\\\"!vm.isLoad.account\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>--><!--</md-button>--><!--<md-button class=\\\"md-raised md-accent btn-block-xs\\\"--><!--ng-click=\\\"vm.showModal(ev, \\'resend-confirmation-check\\')\\\"--><!--ng-disabled=\\\"vm.isLoad.account\\\"--><!--type=\\\"submit\\\"--><!--class=\\\"btn btn-default\\\"--><!--ng-show=\\\"!vm.isCreate && !vm.user.confirmed\\\">--><!--<span ng-hide=\\\"vm.isLoad.account\\\" translate=\\\"Resend Confirmation\\\"> </span>--><!--<md-progress-circular md-mode=\\\"indeterminate\\\" ng-hide=\\\"!vm.isLoad.account\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>--> <!--</md-button>-->\");\n$templateCache.put(\"/app/admin/lensview/forms_forms/menu-actions.html\",\"<md-menu><!-- <md-button class=\\\"md-icon-button\\\" ng-click=\\\"\\\">\\r\\n <md-icon aria-label=\\\"options\\\">\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"\\\">\\r\\n <md-icon aria-label=\\\"options\\\">\\r\\n \\r\\n </md-icon>\\r\\n </md-button> --><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount()==0\\\" class=md-primary ng-click=tctrl.bulkEdit()><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.EDIT></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount(\\'activate\\')==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'bulk-activate-users\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.ACTIVATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount(\\'deactivate\\')==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'bulk-deactivate-users\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.DEACTIVATE></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount(\\'delete\\')==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'bulk-delete-users\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.DELETE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/lensview/lensgroup/add-lensgroup.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"addLensGroupPopUpController as vm\\\" ng-cloak><!-- <form name=\\\"searchForm\\\" reset-directive=\\\"searchCtrl.searchFields\\\" class=\\\"light-form\\\" ng-submit=\\\"vm.search()\\\"> --><!-- <md-toolbar>\\r\\n <div class=\\\"md-toolbar-tools\\\">\\r\\n <md-icon aria-label=\\\"Lens Group\\\" style=\\\" color: rgb(35, 42, 51); font-size: 25px;\\\"></md-icon>\\r\\n <h2 class=\\\"uppercase\\\" style=\\\"margin-left: 15px\\\">Add Company</h2>\\r\\n <span style=\\\"font-size: 14px;\\r\\n font-style: italic;\\r\\n color: #CCC;\\r\\n margin-left: 10px;\\r\\n text-transform: none;\\\">Add Companies to this Lens Group</span>\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"vm.cancel()\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n </md-toolbar> --><md-dialog-content class=light-content style=\\\"background: #F5F5F5;margin-top: 100px\\\"><crane-table title=\\\"LENS GROUP\\\" icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewAddTitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=vm.searchflag buttons=vm.buttons lensviewtablepopup=true ctrl=addLensGroupPopUpController></crane-table></md-dialog-content><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><md-button ng-click=vm.clearAll() hide-xs><span translate=TRACKTRACE.CLEAR></span></md-button><span flex=auto></span><!-- <div ng-if=\\\"searchCtrl.isSavedSearch\\\" hide-xs>\\r\\n <md-button ng-click=\\\"searchCtrl.loadDefault()\\\">\\r\\n <span translate=\\\"TRACKTRACE.LOAD_DEFAULT_CRITERIA\\\"></span>\\r\\n </md-button>\\r\\n\\r\\n </div> --><!-- <md-button ng-click=\\\"searchCtrl.saveToDefault()\\\" hide-xs>\\r\\n <span translate=\\\"TRACKTRACE.SAVE_DEFAULT_CRITERIA\\\"></span>\\r\\n </md-button> --><md-button class=\\\"md-raised md-accent\\\" ng-click=vm.addSectedLensGroup()><span class=uppercase>Add to Selected Lists</span></md-button></md-dialog-actions><!-- </form> --></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/menuform/menu.html\",\"<md-menu><!-- <md-button class=\\\"md-icon-button\\\" ng-click=\\\"\\\">\\r\\n <md-icon aria-label=\\\"options\\\">\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"\\\">\\r\\n <md-icon aria-label=\\\"options\\\">\\r\\n \\r\\n </md-icon>\\r\\n </md-button> --><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount()== 0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev,\\'delete-lensgroup\\')\\\"><div layout=row flex=auto><p flex=auto><span>Remove</span></p></div></md-button></md-menu-item></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/lensview/modals/activate-demo.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>Activate Demo Departments</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p ng-show=\\\"tctrl.listSelectedCount == 1\\\">This action will activate demo feature for {{tctrl.listSelectedCount}} Department</p><p ng-show=\\\"tctrl.listSelectedCount > 1\\\">This action will activate demo feature for {{tctrl.listSelectedCount}} Departments</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=tctrl.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=tctrl.bulkDeleteDemo(true) display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/modals/cfs-delete-exception.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>Remove Departments</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This action will remove {{tctrl.listSelectedCount}} CFS Exception Approvers</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=tctrl.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=tctrl.bulkDelete() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/modals/cmts-delete-exception.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>Remove Departments</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This action will remove {{tctrl.listSelectedCount}} CMTS Exception Approvers</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=tctrl.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=tctrl.bulkDelete() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/modals/deactivate-demo.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>Deactivate Demo Departments</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p ng-show=\\\"tctrl.listSelectedCount == 1\\\">This action will deactivate demo feature for {{tctrl.listSelectedCount}} Department</p><p ng-show=\\\"tctrl.listSelectedCount > 1\\\">This action will deactivate demo feature for {{tctrl.listSelectedCount}} Departments</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=tctrl.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=tctrl.bulkDeleteDemo(false) display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/modals/delete-department.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>Remove Departments</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This action will remove {{tctrl.listSelectedCount}} Departments</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=tctrl.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=tctrl.bulkDelete() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/modals/delete-exception.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>Remove Departments</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This action will remove {{tctrl.listSelectedCount}} CSL Exception Approvers</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=tctrl.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=tctrl.bulkDelete() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/modals/delete-lensgroup.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>Remove</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This action will remove {{tctrl.listSelectedCount}} Lens Group</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=tctrl.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=tctrl.bulkDeleteLensGroup() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/toast/create-lensgroup.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><span ng-repeat=\\\"message in message track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/toast/create-lensgroup.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Lens Group Created Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/toast/delete-lensgroup.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/toast/delete-lensgroup.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Lens Group removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/toast/update-lensgroup.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Lens Group Updated Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/users/add-users.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen lensview-add-popup\\\" aria-label=\\\"Advanced Search Modal \\\" ng-controller=\\\"lensviewUsersController as vm\\\" ng-cloak><!-- <form name=\\\"searchForm\\\" reset-directive=\\\"searchCtrl.searchFields\\\" class=\\\"light-form\\\" ng-submit=\\\"vm.search()\\\"> --><!-- <md-toolbar>\\r\\n <div class=\\\"md-toolbar-tools\\\">\\r\\n <md-icon aria-label=\\\"Lens Group\\\" style=\\\" color: rgb(35, 42, 51); font-size: 25px;\\\"></md-icon>\\r\\n <h2 class=\\\"uppercase\\\" style=\\\"margin-left: 15px\\\">Add Company</h2>\\r\\n <span style=\\\"font-size: 14px;\\r\\n font-style: italic;\\r\\n color: #CCC;\\r\\n margin-left: 10px;\\r\\n text-transform: none;\\\">Add Companies to this Lens Group</span>\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"vm.cancel()\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n </md-toolbar> --><md-dialog-content class=light-content ng-controller=\\\"lensviewUsersPopupController as lv\\\" style=\\\"background: #F5F5F5;margin-top: 100px\\\"><crane-table title=Users icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=lv.lensviewtitle is-loading=vm.isLoading.table is-no-results=vm.noResults searchflag=true buttons=\\\"\\\" lensviewtablepopup=true loaddatausers=vm.loadLensUsersFlag ctrl=lensviewUsersPopupController></crane-table></md-dialog-content><md-dialog-actions layout-gt-xs=row class=light-content layout-align-xs=\\\"center center\\\"><!-- <md-button ng-controller=\\\"lensviewUsersPopupController as lv\\\" ng-click=\\\"lv.clearAll()\\\" hide-xs>\\r\\n <span translate=\\\"TRACKTRACE.CLEAR\\\"></span>\\r\\n </md-button> --> <span flex=auto></span><!-- <div ng-if=\\\"searchCtrl.isSavedSearch\\\" hide-xs>\\r\\n <md-button ng-click=\\\"searchCtrl.loadDefault()\\\">\\r\\n <span translate=\\\"TRACKTRACE.LOAD_DEFAULT_CRITERIA\\\"></span>\\r\\n </md-button>\\r\\n\\r\\n </div> --><!-- <md-button ng-click=\\\"searchCtrl.saveToDefault()\\\" hide-xs>\\r\\n <span translate=\\\"TRACKTRACE.SAVE_DEFAULT_CRITERIA\\\"></span>\\r\\n </md-button> --><md-button class=\\\"md-raised md-accent\\\" ng-click=vm.addSectedusers()><span class=uppercase>Add Selected users</span></md-button></md-dialog-actions><!-- </form> --></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/users/lensview-edit-users.html\",\"<cva-shell><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><!-- Primary View Header --><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><!-- <span class=\\\"md-display-1\\\" ng-show=\\\"vm.isCreate\\\" translate=\\\"COMPANY.CREATE_COMPANY\\\"></span> --> <span class=md-display-1 ng-show=!vm.isCreate>EDIT LENS GROUP</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/lensgroups class=parent-link><span translate=COMPANY.COMPANIES></span></a> / <span ng-show=!vm.isCreate>{{vm.company.name}}</span> <span ng-show=vm.isCreate>{{\\\"NEW\\\"}}</span></span></div></div></div></div><!-- ACCOUNT DETAILS --><md-card><form name=vm.formDetails class=light-form role=form novalidate><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 class=md-flex><md-icon class=material-icons>business</md-icon><span translate=COMPANY.COMPANY_DETAILS></span></h2><span flex=auto></span><div ng-include=\\\"\\'/app/admin/companies/forms/action-buttons.html\\'\\\"></div><div ng-include=\\\"\\'/app/admin/companies/forms/menu-action-buttons.html\\'\\\"></div><span flex=0></span></div></md-toolbar><md-card-content><div layout-gt-sm=row><div flex-gt-sm=70><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>Lens Group Name</label><input type=text ng-model=vm.lensgroup.name name=name required><div ng-messages=vm.formDetails.name.$error><div ng-message=required><span>Lens Group Name required</span></div></div></md-input-container></div><!-- <div flex-gt-sm=\\\"30\\\">\\r\\n <md-input-container class=\\\"md-block error-hidden m-b\\\" ng-if=\\\"!vm.isCreate\\\">\\r\\n <md-checkbox ng-model=\\\"vm.company.is_active\\\" class=\\\"md-primary\\\">\\r\\n <span translate=\\\"COMPANY.ACTIVE\\\"></span>\\r\\n\\r\\n </md-checkbox>\\r\\n </md-input-container>\\r\\n\t\t\t\t\t\t\t</div> --></div><div layout-gt-sm=row><div flex-gt-sm=100><md-input-container class=\\\"md-block error-hidden m-b\\\"><label>Description</label><input type=text ng-model=vm.lensgroup.description name=description required><div ng-messages=vm.formDetails.description.$error><div ng-message=required><span>Lens Group Description required</span></div></div></md-input-container></div></div></md-card-content><!--<md-card-actions layout=\\\"row\\\" layout-align=\\\"end center\\\">\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <div ng-include=\\\"\\'app/admin/companies/forms/action-buttons.html\\'\\\"></div>\\r\\n <span flex=\\\"0\\\"></span>\\r\\n </md-card-actions>--></form></md-card><section ng-if=vm.logsVisible()><log-company-record data=vm.company></log-company-record></section><section class=md-card-light ng-controller=\\\"lensviewCompaniesController as vm\\\"><div ng-include=\\\"\\'/app/admin/lensview/companies/lensview-companies.html\\'\\\"></div></section><section class=md-card-light ng-controller=\\\"lensviewUsersController as vm\\\"><div ng-include=\\\"\\'/app/admin/lensview/users/lensview-users.html\\'\\\"></div></section><section ng-controller=\\\"lensviewController as lv\\\"><crane-table title=\\\"Lens Groups\\\" icon=lv.icon lensviewtable=lv.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=lv.isLoading.table is-no-results=lv.noResults buttons=lv.buttons menu=\\\"\\'/app/admin/lensview/forms/action-buttons.html\\'\\\" ctrl=lensviewController></crane-table></section></div></cva-shell>\");\n$templateCache.put(\"/app/admin/lensview/users/lensview-users.html\",\"<crane-table title=Users icon=vm.icon lensviewtable=vm.lensviewtable lensviewtitle=vm.lensviewtitle is-loading=vm.isLoading.table is-no-results=vm.noResults buttons=vm.buttons searchflag=vm.searchflag menu=\\\"\\'/app/admin/lensview/menuform/menu.html\\'\\\" ctrl=lensviewUsersController></crane-table>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/account_overrides.html\",\"<style type=text/css>.override-border{\\r\\n font-size: 13px;color: black;\\r\\n font-weight: 600;border-bottom: 1px solid #d1d1d1;\\r\\n padding-bottom: 10px;\\r\\n }\\r\\n .md-chip-input-container{\\r\\n width: 100% !important;\\r\\n }\\r\\n md-chips.md-default-theme .md-chip, md-chips .md-chip {\\r\\n background: #d1d1d1;\\r\\n color: rgb(66,66,66);\\r\\n}\\r\\n.md-chips .md-chip{\\r\\n border-radius: 6px;\\r\\n}\\r\\nmd-select.md-default-theme:not([disabled]):focus .md-select-value, md-select:not([disabled]):focus .md-select-value{\\r\\n color: black;\\r\\n}</style><div class=header><div class=header_text><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=step>Step 4:</span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=step>Step 5:</span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=step>Step 5:</span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=step>Step 5:</span> <span>Add User Accounts (Optional)</span></div></div><div layout=row layout-align=\\\"end center\\\"><button style=\\\"position: relative\\\" ng-click=\\\"vm.company_next_step(vm.form_step_number,\\'normal\\')\\\" class=skip-btn>SKIP ACCOUNT OVERRIDES <i style=\\\"position: absolute;top: 7px;right: 10px;font-size: 30px\\\" class=material-icons></i></button></div><div id=cww-setup-box ng-if=vm.supportCompany.is_cww><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CWW ACCOUNT OVERRIDES</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div class=desc>Add any Override Values for the new CWW users</div><div class=user_add_div><div class=table-scroll><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-15 style=\\\"vertical-align: top\\\"><!-- <input type=\\\"checkbox\\\" ng-model=\\\"vm.overrideSelect\\\" ng-click=\\\"vm.check_selectAllMain()\\\" id=\\\"userOverrideCheckbox\\\" />\\r\\n <label for=\\\"userOverrideCheckbox\\\"> SELECT ALL </label> --></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=vm.supportCompanyEdit.primary_contact_cww md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEdit.bccs_cww md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Party & Group ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><!--\\r\\n <input\\r\\n style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0);\\\"\\r\\n type=\\\"text\\\"\\r\\n ng-model=\\\"vm.add_user.party_group_ids\\\"/> --><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEdit.party_group_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCwwUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-20 colspan=2 style=\\\"vertical-align: top\\\"><div flex=100 layout=row layout-align=\\\"center start\\\"><button ng-click=vm.updateUserRowCompanyCww() style=margin-top:15px>APPLY OVERRIDES TO SELECTED</button></div></th></tr></thead><tbody><tr><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border for=userOverrideCheckbox><input type=checkbox ng-model=vm.overrideSelect ng-click=vm.check_selectAllMain() id=userOverrideCheckbox> SELECT ALL</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>PRIMARY CONTACT OVERRIDE</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>BCC OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>PARTY & GROUP ID OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>APPLY TO CSL</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ACTIONS</div></td></tr><tr ng-repeat=\\\"user_lists in vm.companyUsersCww\\\" ng-hide=\\\"(user_lists.cww_access == false)\\\" class=\\\"user_list user_list2\\\"><td class=td-20 style=\\\"vertical-align: bottom\\\"><input type=checkbox id=step2Select{{$index}} class=override_multiple_checkbox ng-checked=vm.overrideSelect ng-click=vm.check_selectAll()> {{user_lists.first_name}} {{user_lists.last_name}}</td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCww != $index\\\"><span ng-if=user_lists.cww_overrides.primary_contact.email>{{user_lists.cww_overrides.primary_contact.email}}</span> <span ng-if=!user_lists.cww_overrides.primary_contact.email><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCww == $index\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=user_lists.cww_overrides.primary_contact.id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact.id}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCww != $index\\\"><span ng-if=\\\"user_lists.cww_overrides.bccs.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.cww_overrides.bccs md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.cww_overrides.bccs.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCww == $index\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=user-chips ng-model=user_lists.cww_overrides.bccs md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-25 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCww != $index\\\"><span ng-if=\\\"user_lists.cww_overrides.party_group_ids.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.cww_overrides.party_group_ids md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.cww_overrides.party_group_ids.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>Party & Group ID Overrides</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCww == $index\\\"><label class=line-height-15px>Party & Group ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips cwwdepartment-chips toUpperCase\\\" ng-model=user_lists.cww_overrides.party_group_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCwwUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-10 style=\\\"vertical-align: middle;padding-bottom: 10px\\\"><!-- <div ng-if=\\\"vm.editUserIdCww != $index\\\">\\r\\n <input\\r\\n ng-if=\\\"(user_lists.csl_access == true || user_lists.cfs_access == true)\\\"\\r\\n id=\\\"step3Select{{$index}}\\\" class=\\\"override_multiple_checkbox1\\\" ng-checked=\\\"vm.overrideSelectCopy\\\"\\r\\n type=\\\"checkbox\\\" ng-model=\\\"vm.overrideSelectCopy\\\" ng-click=\\\"vm.copyOverridesCompany(vm.overrideSelectCopy,$index,user_lists.csl_access,user_lists.cfs_access)\\\" />\\r\\n </div>\\r\\n <div ng-if=\\\"vm.editUserIdCww == $index\\\">\\r\\n <input\\r\\n ng-if=\\\"(user_lists.csl_access == true || user_lists.cfs_access == true)\\\"\\r\\n id=\\\"step3Select{{$index}}\\\" class=\\\"override_multiple_checkbox1\\\" ng-checked=\\\"vm.overrideSelectCopy\\\"\\r\\n type=\\\"checkbox\\\" ng-model=\\\"vm.overrideSelectCopy\\\" ng-click=\\\"vm.copyOverridesCompany(vm.overrideSelectCopy,$index,user_lists.csl_access,user_lists.cfs_access)\\\" id=\\\"\\\" />\\r\\n </div> --> <input type=checkbox ng-if=\\\"(user_lists.csl_access == true || user_lists.cfs_access == true)\\\" id=step5Select{{$index}} class=override_multiple_checkbox1 ng-checked=vm.overrideSelect1 ng-click=vm.copyOverridesCompany($index,user_lists.csl_access,user_lists.cfs_access)></td><td class=\\\"td-20 remove-user-text\\\" style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div flex=100 ng-if=\\\"vm.editUserIdCww != $index\\\"><span class=edit-user-text ng-click=vm.editUserListRowCww($index)>Edit</span>  <span class=remove-user-text ng-click=\\\"vm.removeUserListStep2($index,\\'company\\')\\\">Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserIdCww == $index\\\"><span ng-click=\\\"vm.completeUserListRowStep2($index,\\'company\\')\\\">Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div><div id=csl-setup-box ng-if=vm.supportCompany.is_csl><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CSL ACCOUNT OVERRIDES</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div class=desc>Add any Override Values for the new CSL users</div><div class=user_add_div><div class=table-scroll><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-15 style=\\\"vertical-align: top\\\"><!-- <input type=\\\"checkbox\\\" ng-model=\\\"vm.overrideSelect\\\" ng-click=\\\"vm.check_selectAllMain()\\\" id=\\\"userOverrideCheckbox\\\" />\\r\\n <label for=\\\"userOverrideCheckbox\\\"> SELECT ALL </label> --></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=vm.supportCompanyEdit.primary_contact_csl md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEdit.bccs_csl md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Customer ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><!--\\r\\n <input\\r\\n style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0);\\\"\\r\\n type=\\\"text\\\"\\r\\n ng-model=\\\"vm.add_user.party_group_ids\\\"/> --><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEdit.customer_ids_csl md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCslUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-21 style=\\\"vertical-align: top\\\"><div flex=100 layout=row layout-align=\\\"center start\\\"><button ng-click=vm.updateUserRowCompanyCsl() style=margin-top:15px>APPLY OVERRIDES TO SELECTED</button></div></th></tr></thead><tbody><tr><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border for=userOverrideCheckboxCsl><input type=checkbox ng-model=vm.overrideSelectCsl ng-click=vm.check_selectAllMain_Csl() id=userOverrideCheckboxCsl> SELECT ALL</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>PRIMARY CONTACT OVERRIDE</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>BCC OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>CUSTOMER ID OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ACTIONS</div></td></tr><tr ng-repeat=\\\"user_lists in vm.companyUsersCww\\\" ng-hide=\\\"(user_lists.csl_access == false)\\\" class=\\\"user_list user_list2\\\"><td class=td-20 style=\\\"vertical-align: bottom\\\"><input type=checkbox id=step3Select{{$index}} class=override_multiple_checkbox_csl ng-checked=vm.overrideSelectCsl ng-click=vm.check_selectAll_csl()> {{user_lists.first_name}} {{user_lists.last_name}}</td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCsl != $index\\\"><span ng-if=user_lists.csl_overrides.primary_contact.email>{{user_lists.csl_overrides.primary_contact.email}}</span> <span ng-if=!user_lists.csl_overrides.primary_contact.email><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCsl == $index\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=user_lists.csl_overrides.primary_contact.id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact.id}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCsl != $index\\\"><span ng-if=\\\"user_lists.csl_overrides.bccs.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.csl_overrides.bccs md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.csl_overrides.bccs.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCsl == $index\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=user-chips ng-model=user_lists.csl_overrides.bccs md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-25 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCsl != $index\\\"><span ng-if=\\\"user_lists.csl_overrides.customer_ids.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.csl_overrides.customer_ids md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.csl_overrides.customer_ids.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>Customer ID Overrides</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCsl == $index\\\"><label class=line-height-15px>Customer ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=user_lists.csl_overrides.customer_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCslUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=\\\"td-20 remove-user-text\\\" style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div flex=100 ng-if=\\\"vm.editUserIdCsl != $index\\\"><span class=edit-user-text ng-click=vm.editUserListRowCsl($index)>Edit</span>  <span class=remove-user-text ng-click=\\\"vm.removeUserListStep2Csl($index,\\'company\\')\\\">Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserIdCsl == $index\\\"><span ng-click=\\\"vm.completeUserListRowStep2Csl($index,\\'company\\')\\\">Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div><div id=cfs-setup-box ng-if=vm.supportCompany.is_cfs><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CFS ACCOUNT OVERRIDES</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div class=desc>Add any Override Values for the new CFS users</div><div class=user_add_div><div class=table-scroll><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-15 style=\\\"vertical-align: top\\\"><!-- <input type=\\\"checkbox\\\" ng-model=\\\"vm.overrideSelect\\\" ng-click=\\\"vm.check_selectAllMain()\\\" id=\\\"userOverrideCheckbox\\\" />\\r\\n <label for=\\\"userOverrideCheckbox\\\"> SELECT ALL </label> --></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=vm.supportCompanyEdit.primary_contact_cfs md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEdit.bccs_cfs md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Customer ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><!--\\r\\n <input\\r\\n style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0);\\\"\\r\\n type=\\\"text\\\"\\r\\n ng-model=\\\"vm.add_user.party_group_ids\\\"/> --><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEdit.customer_ids_cfs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCfsUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-21 style=\\\"vertical-align: top\\\"><div flex=100 layout=row layout-align=\\\"center start\\\"><button ng-click=vm.updateUserRowCompanyCfs() style=margin-top:15px>APPLY OVERRIDES TO SELECTED</button></div></th></tr></thead><tbody><tr><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border for=userOverrideCheckboxCfs><input type=checkbox ng-model=vm.overrideSelectCfs ng-click=vm.check_selectAllMain_Cfs() id=userOverrideCheckboxCfs> SELECT ALL</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>PRIMARY CONTACT OVERRIDE</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>BCC OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>CUSTOMER ID OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ACTIONS</div></td></tr><tr ng-repeat=\\\"user_lists in vm.companyUsersCww\\\" ng-hide=\\\"(user_lists.cfs_access == false)\\\" class=\\\"user_list user_list2\\\"><td class=td-20 style=\\\"vertical-align: bottom\\\"><input type=checkbox id=step4Select{{$index}} class=override_multiple_checkbox_cfs ng-checked=vm.overrideSelectCfs ng-click=vm.check_selectAll_cfs()> {{user_lists.first_name}} {{user_lists.last_name}}</td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCfs != $index\\\"><span ng-if=user_lists.cfs_overrides.primary_contact.email>{{user_lists.cfs_overrides.primary_contact.email}}</span> <span ng-if=!user_lists.cfs_overrides.primary_contact.email><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCfs == $index\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=user_lists.cfs_overrides.primary_contact.id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact.id}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCfs != $index\\\"><span ng-if=\\\"user_lists.cfs_overrides.bccs.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.cfs_overrides.bccs md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.cfs_overrides.bccs.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCfs == $index\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=user-chips ng-model=user_lists.cfs_overrides.bccs md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-25 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCfs != $index\\\"><span ng-if=\\\"user_lists.csl_overrides.customer_ids.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.csl_overrides.customer_ids md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.csl_overrides.customer_ids.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>Customer ID Overrides</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCfs == $index\\\"><label class=line-height-15px>Customer ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=user_lists.csl_overrides.customer_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCfsUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=\\\"td-20 remove-user-text\\\" style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div flex=100 ng-if=\\\"vm.editUserIdCfs != $index\\\"><span class=edit-user-text ng-click=vm.editUserListRowCfs($index)>Edit</span>  <span class=remove-user-text ng-click=\\\"vm.removeUserListStep2Cfs($index,\\'company\\')\\\">Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserIdCfs == $index\\\"><span ng-click=\\\"vm.completeUserListRowStep2Cfs($index,\\'company\\')\\\">Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/add-company.html\",\"<cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\" class=support_request_addUser><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span ng-if=!vm.support.requestId class=md-display-1>Add Company</span> <span ng-if=vm.support.requestId class=md-display-1>Edit Company</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/supportRequests class=parent-link><span>Support Requests</span></a> / <span ng-if=!vm.support.requestId class=color-ffffff>Add New Company</span> <span ng-if=vm.support.requestId class=color-ffffff>Edit Company</span></span></div></div></div></div><md-card><!-- \\'/app/admin/lensview/lensgroup-actionbutton.html\\' --><md-card-content class=add_user_header ng-include=\\\"\\'/app/admin/support-requests/add-company/header.html\\'\\\"></md-card-content><md-card-content ng-show=\\\"vm.form_step_number == 1\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_one.html\\'\\\"></md-card-content><md-card-content ng-show=\\\"vm.form_step_number == 2\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_two.html\\'\\\"></md-card-content><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 3\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_three.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 3\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_three.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 3\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_four.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 4\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_four.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 5\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/account_overrides.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 4\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_four.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 5\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/account_overrides.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 4\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_four.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 5\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/account_overrides.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 5\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_five.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 4\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/account_overrides.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 6\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_five.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 6\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_five.html\\'\\\"></md-card-content></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\"><md-card-content ng-show=\\\"vm.form_step_number == 6\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/step_five.html\\'\\\"></md-card-content></span><md-card-content ng-include=\\\"\\'/app/admin/support-requests/add-company/footer.html\\'\\\" class=add_user_footer layout=column layout-gt-xs=row layout-align=\\\"space-around center\\\" layout-align-gt-xs=\\\"space-between start\\\"></md-card-content><md-card-content style=\\\"padding-top: 0px\\\" ng-include=\\\"\\'/app/admin/support-requests/add-company/skip_part.html\\'\\\" class=add_user_footer></md-card-content></md-card></div></cva-shell>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/footer.html\",\"<button style=\\\"visibility: hidden\\\" ng-show=\\\"vm.form_step_number == 1\\\" class=add_user_cancel_btn ng-click=vm.user_add_cancellation(vm.form_step_number)>Cancel</button> <button style=\\\"position: relative;color: #a9a9a9\\\" ng-show=\\\"vm.form_step_number != 1 && vm.form_step_number != 5 && vm.form_step_number != 6\\\" class=add_user_prev_btn ng-click=vm.prev_step(vm.form_step_number)><i style=\\\"position: absolute;top: 7px;left: 10px;color:#2f7d8e\\\" class=material-icons></i> <span style=color:#2f7d8e>PREVIOUS STEP</span></button> <button style=\\\"position: relative;color: #a9a9a9\\\" ng-if=\\\"!(vm.supportCompany.accessTypeClassic == true && vm.supportCompany.accessTypeStandard != true)\\\" ng-show=\\\"vm.form_step_number == 5\\\" class=add_user_prev_btn ng-click=vm.prev_step(vm.form_step_number)><i style=\\\"position: absolute;top: 7px;left: 10px;color:#2f7d8e\\\" class=material-icons></i> <span style=color:#2f7d8e>PREVIOUS STEP</span></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" style=\\\"position: relative;color: #a9a9a9\\\" ng-show=\\\"vm.form_step_number == 5\\\" class=add_user_prev_btn ng-click=vm.prev_step(vm.form_step_number)><i style=\\\"position: absolute;top: 7px;left: 10px;color:#2f7d8e\\\" class=material-icons></i> <span style=color:#2f7d8e>EDIT</span></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" style=\\\"position: relative;color: #a9a9a9\\\" ng-show=\\\"vm.form_step_number == 6\\\" class=add_user_prev_btn ng-click=vm.prev_step(vm.form_step_number)><i style=\\\"position: absolute;top: 7px;left: 10px;color:#2f7d8e\\\" class=material-icons></i> <span style=color:#2f7d8e>EDIT</span></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" style=\\\"position: relative;color: #a9a9a9\\\" ng-show=\\\"vm.form_step_number == 6\\\" class=add_user_prev_btn ng-click=vm.prev_step(vm.form_step_number)><i style=\\\"position: absolute;top: 7px;left: 10px;color:#2f7d8e\\\" class=material-icons></i> <span style=color:#2f7d8e>EDIT</span></button> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\"><button style=\\\"border: 0px solid #ece6e6;color: #a9a9a9;font-size: 16px;font-weight: 600;background-color:transparent\\\" class=add_user_cancel_btn>Step {{vm.form_step_number}} of 5</button> </span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\"><button style=\\\"border: 0px solid #ece6e6;color: #a9a9a9;font-size: 16px;font-weight: 600;background-color:transparent\\\" class=add_user_cancel_btn>Step {{vm.form_step_number}} of 6</button> </span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\"><button style=\\\"border: 0px solid #ece6e6;color: #a9a9a9;font-size: 16px;font-weight: 600;background-color:transparent\\\" class=add_user_cancel_btn>Step {{vm.form_step_number}} of 6</button> </span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\"><button style=\\\"border: 0px solid #ece6e6;color: #a9a9a9;font-size: 16px;font-weight: 600;background-color:transparent\\\" class=add_user_cancel_btn>Step {{vm.form_step_number}} of 6</button> </span><button ng-disabled=\\\"(vm.nameCheck || !vm.accessTypeEnableCheck || vm.customer_type_cehck || !vm.customerTypeEnableCheck)\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 1\\\" class=add_user_next_btn ng-click=vm.company_next_step(vm.form_step_number)>CONTACTS <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-disabled=(vm.repCheck) ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 2\\\" class=add_user_next_btn ng-click=vm.company_next_step(vm.form_step_number)>ADD DEPARTMENTS <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-disabled=(vm.repCheck) ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 2\\\" class=add_user_next_btn ng-click=vm.company_next_step(vm.form_step_number)>ADD DEPARTMENTS <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-disabled=(vm.repCheck) ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 2\\\" class=add_user_next_btn ng-click=vm.company_next_step(vm.form_step_number)>ADD DEPARTMENTS <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" ng-disabled=\\\"\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 2\\\" class=add_user_next_btn ng-click=\\\"vm.company_next_step(3,\\'normal\\')\\\">ADD USERS <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" ng-disabled=\\\"\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 3\\\" class=add_user_next_btn ng-click=\\\"vm.company_next_step(4,\\'normal\\')\\\">SET OVERRIDES <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-disabled=\\\"\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 3\\\" class=add_user_next_btn ng-click=\\\"vm.company_next_step(vm.form_step_number,\\'normal\\')\\\">ADD USERS <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-disabled=\\\"\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 4\\\" class=add_user_next_btn ng-click=\\\"vm.company_next_step(vm.form_step_number,\\'normal\\')\\\">SET OVERRIDES <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-disabled=\\\"\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 3\\\" class=add_user_next_btn ng-click=\\\"vm.company_next_step(vm.form_step_number,\\'normal\\')\\\">ADD USERS <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-disabled=\\\"\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 4\\\" class=add_user_next_btn ng-click=\\\"vm.company_next_step(vm.form_step_number,\\'normal\\')\\\">SET OVERRIDES <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" ng-disabled=\\\"\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 4\\\" class=add_user_next_btn ng-click=\\\"vm.company_next_step(vm.form_step_number,\\'normal\\')\\\">REVIEW <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-disabled=\\\"\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 5\\\" class=add_user_next_btn ng-click=vm.company_next_step(vm.form_step_number)>REVIEW <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-disabled=\\\"\\\" style=\\\"position: relative\\\" ng-show=\\\"vm.form_step_number == 5\\\" class=add_user_next_btn ng-click=vm.company_next_step(vm.form_step_number)>REVIEW <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" ng-show=\\\"vm.form_step_number == 5\\\" ng-click=vm.companyFormSubmit(vm.support.requestId) class=add_user_submit_btn><span ng-if=!vm.support.requestId>SUBMIT</span> <span ng-if=vm.support.requestId>UPDATE</span></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-show=\\\"vm.form_step_number == 6\\\" ng-click=vm.companyFormSubmit(vm.support.requestId) class=add_user_submit_btn><span ng-if=!vm.support.requestId>SUBMIT</span> <span ng-if=vm.support.requestId>UPDATE</span></button> <button ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-show=\\\"vm.form_step_number == 6\\\" ng-click=vm.companyFormSubmit(vm.support.requestId) class=add_user_submit_btn><span ng-if=!vm.support.requestId>SUBMIT</span> <span ng-if=vm.support.requestId>UPDATE</span></button>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/header.html\",\"<div class=stepIcons layout=row layout-align=\\\"space-between center\\\"><div class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 1)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 2)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><!-- <div class=\\\"icon_div\\\" layout=\\\"row\\\" layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 3)?\\'highlight\\':\\'\\'\\\" >\\r\\n\t<i class=\\\"material-icons\\\"></i>\\r\\n\t</div> --><div ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 3)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 3)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 3)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 3)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 4)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 4)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 4)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 4)?\\'highlight\\':\\'\\'\\\"><i class=material-icons>swap_vert</i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number == 5)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 5)?\\'highlight\\':\\'\\'\\\"><i class=material-icons>swap_vert</i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number == 6)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 5)?\\'highlight\\':\\'\\'\\\"><i class=material-icons>swap_vert</i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number == 6)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 5)?\\'highlight\\':\\'\\'\\\"><i class=material-icons>swap_vert</i></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number == 6)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><span class=vertical_line></span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=highlighted_vertical_line ng-attr-style=\\\"width: calc({{(vm.form_step_number != 1?(vm.form_step_number == 2?25:(vm.form_step_number == 3?50:(vm.form_step_number == 4?75:(vm.form_step_number == 5?100:0)))):0)}}% - 10px);\\\"></span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=highlighted_vertical_line ng-attr-style=\\\"width: calc({{(vm.form_step_number != 1?(vm.form_step_number == 2?20:(vm.form_step_number == 3?40:(vm.form_step_number == 4?60:(vm.form_step_number == 5?80:(vm.form_step_number == 6?100:0))))):0)}}% - 10px);\\\"></span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=highlighted_vertical_line ng-attr-style=\\\"width: calc({{(vm.form_step_number != 1?(vm.form_step_number == 2?20:(vm.form_step_number == 3?40:(vm.form_step_number == 4?60:(vm.form_step_number == 5?80:(vm.form_step_number == 6?100:0))))):0)}}% - 10px);\\\"></span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=highlighted_vertical_line ng-attr-style=\\\"width: calc({{(vm.form_step_number != 1?(vm.form_step_number == 2?20:(vm.form_step_number == 3?40:(vm.form_step_number == 4?60:(vm.form_step_number == 5?80:(vm.form_step_number == 6?100:0))))):0)}}% - 10px);\\\"></span><!-- ng-attr-style=\\\"width:{{(vm.form_step_number != 1?(vm.form_step_number == 2?50:100):\\'0\\')}}%;\\\" --></div>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/import-user.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2></h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content id=hello class=\\\"light-content md-padding\\\" loadmask=!vm.file.isUploading><form novalidate class=\\\"form-horizontal light-form\\\" name=vm.ImportUsersForm><section layout=row layout-align=center><div ngf-drop ngf-select ng-model=vm.file class=drop-box ngf-drop-available=dropSupported ngf-drag-over-class=\\\"{pattern: \\'.csv\\', accept:\\'dragover\\', reject:\\'dragover\\', delay:100}\\\" ngf-multiple=false ngf-allow-dir=false accept=.csv ngf-pattern=\\\"\\'.csv\\'\\\" style=\\\"color: gray\\\">Drop CSV\\'s or Click to Upload</div></section><div ngf-no-file-drop>File Drag/Drop is not supported for this browser</div><section layout=row layout-align=center><md-button class=\\\"md-raised md-primary\\\" ng-click=vm.downloadCSVTemplate()>Download CSV Template</md-button></section><p style=text-align:center ng-if=vm.isSafari()><span>Press \\\"CMD + s\\\" on the opened document to save and name it as template.csv</span></p></form></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/skip_part.html\",\"<style type=text/css>.skip-text{\\r\\n\tcolor: #45AFE3;\\r\\n\tfont-size: 13px;\\r\\n\tfont-weight: 600;\\r\\n\tpadding-right: 85px;\\r\\n\tcursor: pointer;\\r\\n margin-top: -20px;\\r\\n\t}\\r\\n .skip-text1{\\r\\n color: #45AFE3;\\r\\n font-size: 13px;\\r\\n font-weight: 600;\\r\\n padding-right: 20px;\\r\\n cursor: pointer;\\r\\n margin-top: -20px;\\r\\n }\\r\\n.desc{\\r\\n font-style: italic;\\r\\n color:#a8a8a8;\\r\\n font-size: .85em;\\r\\n }</style><div layout=row layout-align=\\\"end center\\\"><div class=skip-text ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-show=\\\"vm.form_step_number == 2\\\"><span style=\\\"position: relative;bottom: 85px;left: 155px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip adding departments<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_department_step(vm.form_step_number,\\'department\\')\\\">Skip Departments</span></div><div class=skip-text ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\" ng-show=\\\"vm.form_step_number == 2\\\"><span style=\\\"position: relative;bottom: 85px;left: 155px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip adding departments<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_department_step(vm.form_step_number,\\'department\\')\\\">Skip Departments</span></div><div class=skip-text ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-show=\\\"vm.form_step_number == 2\\\"><span style=\\\"position: relative;bottom: 85px;left: 155px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip adding departments<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_department_step(vm.form_step_number,\\'department\\')\\\">Skip Departments</span></div></div><div layout=row layout-align=\\\"end center\\\"><div class=skip-text1 ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" ng-show=\\\"vm.form_step_number == 2\\\"><span style=\\\"position: relative;bottom: 85px;left: 110px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip adding User Accounts<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_department_step(vm.form_step_number,\\'user\\')\\\">Skip User Accounts</span></div><div class=skip-text1 ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" ng-show=\\\"vm.form_step_number == 3\\\"><span style=\\\"position: relative;bottom: 85px;left: 110px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip Set Overridess<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_department_step(vm.form_step_number,\\'overrides\\')\\\">Skip Set Overrides</span></div><div class=skip-text1 ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-show=\\\"vm.form_step_number == 3\\\"><span style=\\\"position: relative;bottom: 85px;left: 110px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip adding User Accounts<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_department_step(vm.form_step_number,\\'user\\')\\\">Skip User Accounts</span></div><div class=skip-text1 ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-show=\\\"vm.form_step_number == 4\\\"><span style=\\\"position: relative;bottom: 85px;left: 110px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip Set Overridess<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_department_step(vm.form_step_number,\\'overrides\\')\\\">Skip Set Overrides</span></div><div class=skip-text1 ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-show=\\\"vm.form_step_number == 3\\\"><span style=\\\"position: relative;bottom: 85px;left: 110px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip adding User Accounts<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_department_step(vm.form_step_number,\\'user\\')\\\">Skip User Accounts</span></div><div class=skip-text1 ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" ng-show=\\\"vm.form_step_number == 4\\\"><span style=\\\"position: relative;bottom: 85px;left: 110px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip Set Overridess<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_department_step(vm.form_step_number,\\'overrides\\')\\\">Skip Set Overrides</span></div></div>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/step_five.html\",\"<style type=text/css>.heading-text{\\r\\n color: #a8a8a8;font-size: 15px;margin: 0 0 5px;\\r\\n}\\r\\n.sub-heading-text{\\r\\n color: #505457;font-size: 15px;margin:0;\\r\\n}\\r\\n.desc{\\r\\n font-style: italic;\\r\\n color:#a8a8a8;\\r\\n font-size: .85em;\\r\\n }\\r\\n.user_add_div .table-scroll table thead.header-table th .label {\\r\\n color: #a8a8a8;font-size: 15px;margin: 0 0 5px;\\r\\n padding: 25px 0px 35px 0px;\\r\\n max-width: 100%;\\r\\n white-space: nowrap;\\r\\n overflow: hidden;\\r\\n text-overflow: ellipsis;\\r\\n border-bottom: 1px solid #d2d2d2;\\r\\n}</style><div class=header layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=step>Step 5:</span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=step>Step 6:</span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=step>Step 6:</span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=step>Step 6:</span> <span>Review</span></div></div><div id=cfs-setup-box><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">REVIEW</span></h2><span flex=auto></span></div></md-toolbar><md-card-content><div class=company_name layout=row layout-align=\\\"space-between center\\\"><div class=text>Company Info</div><div><span><i class=material-icons style=\\\"color: #46afe3\\\">create</i></span> <span ng-click=vm.edit_prev_step(1) style=\\\"cursor: pointer;color: #46afe3;position: relative;bottom: 7px\\\">EDIT</span></div></div><div layout=row><div flex=20><p class=heading-text>Company Name</p><p class=sub-heading-text>{{vm.supportCompany.company_name}}</p></div><div flex=30><p class=heading-text>Access Type</p><p ng-if=\\\"(vm.supportCompany.accessTypeStandard && !vm.supportCompany.accessTypeClassic)\\\" class=sub-heading-text>C-View Portal</p><p ng-if=\\\"(!vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic)\\\" class=sub-heading-text>Pathway</p><p ng-if=\\\"(vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic)\\\" class=sub-heading-text>C-View Portal, Pathway</p></div><div flex=15><p class=heading-text>Portal Type</p><p style=\\\"text-transform: capitalize\\\" class=sub-heading-text>{{vm.supportCompany.portalType}}</p></div><div flex=15><!-- <p class=\\\"heading-text\\\">Portal Theme</p>\\r\\n <p ng-if=\\\"!vm.supportCompany.is_reskin\\\" class=\\\"sub-heading-text\\\">C-View Portal</p>\\r\\n <p ng-if=\\\"vm.supportCompany.is_reskin\\\" class=\\\"sub-heading-text\\\">Magno Re-Skin</p> --><p class=heading-text>Customer Type</p><p ng-if=\\\"vm.supportCompany.is_cww && !vm.supportCompany.is_csl && !vm.supportCompany.is_cfs\\\" class=sub-heading-text>CWW</p><p ng-if=\\\"vm.supportCompany.is_csl && !vm.supportCompany.is_cww && !vm.supportCompany.is_cfs\\\" class=sub-heading-text>CSL</p><p ng-if=\\\"vm.supportCompany.is_cfs && !vm.supportCompany.is_csl && !vm.supportCompany.is_cww\\\" class=sub-heading-text>CFS</p><p ng-if=\\\"vm.supportCompany.is_cww && vm.supportCompany.is_csl && !vm.supportCompany.is_cfs\\\" class=sub-heading-text>CWW, CSL</p><p ng-if=\\\"vm.supportCompany.is_cww && vm.supportCompany.is_cfs && !vm.supportCompany.is_csl\\\" class=sub-heading-text>CWW, CFS</p><p ng-if=\\\"vm.supportCompany.is_csl && vm.supportCompany.is_cfs && !vm.supportCompany.is_cww\\\" class=sub-heading-text>CSL, CFS</p><p ng-if=\\\"vm.supportCompany.is_cww && vm.supportCompany.is_csl && vm.supportCompany.is_cfs\\\" class=sub-heading-text>CWW, CSL, CFS</p></div></div><br><br><div layout=row ng-if=vm.supportCompany.is_cww style=\\\"padding-left: 50px\\\"><div flex=85 class=company_name><p class=text style=\\\"font-size: 12px\\\">CWW - DEFAULT PARTY & GROUP IDs</p><p></p><div ng-repeat=\\\"chipone in (vm.supportCompany.cww_party_id_names)\\\" ng-class=\\\"(vm.notexistIds.includes(chipone | uppercase)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span style=\\\"text-transform: uppercase\\\">{{chipone}}</span></div><div ng-repeat=\\\"chiptwo in vm.supportCompany.cww_related_party_id_names\\\" ng-class=\\\"(vm.notexistIds.includes(chiptwo | uppercase)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span style=\\\"text-transform: uppercase\\\">{{chiptwo}}</span></div><p></p></div><div flex=20 class=company_name><p class=heading-text>Magno Reskin</p><p><i ng-if=vm.supportCompany.is_reskin class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!vm.supportCompany.is_reskin class=material-icons style=\\\"color: red\\\">clear</i></p></div></div><div layout=row ng-if=vm.supportCompany.is_csl style=\\\"padding-left: 50px\\\"><div flex=45 class=company_name><p class=text style=\\\"font-size: 12px\\\">CSL - CUSTOMER IDs</p><p></p><div ng-repeat=\\\"custcsl in (vm.supportCompany.csl_customer_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(custcsl)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{custcsl}}</span></div><p></p></div><div flex=20 class=company_name><p class=heading-text>Show Shipment Class</p><p><i ng-if=vm.supportCompany.is_show_class class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!vm.supportCompany.is_show_class class=material-icons style=\\\"color: red\\\">clear</i></p></div><div flex=20 class=company_name><p class=heading-text>Do Not Send Exception Emails</p><p><i ng-if=vm.supportCompany.is_send_exception_email class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!vm.supportCompany.is_send_exception_email class=material-icons style=\\\"color: red\\\">clear</i></p></div><div flex=20 class=company_name><p class=heading-text>Exception Threshold</p><p><i ng-if=vm.supportCompany.is_threshold_default class=material-icons style=\\\"color: #48c267\\\">check</i>  <span ng-if=vm.supportCompany.is_threshold_default style=\\\"cursor: pointer;position: relative;bottom: 7px\\\">Default (00:00)</span> <i ng-if=!vm.supportCompany.is_threshold_default class=material-icons style=\\\"color: red\\\">check</i>  <span ng-if=!vm.supportCompany.is_threshold_default style=\\\"cursor: pointer;position: relative;bottom: 7px\\\">({{vm.supportCompany.csl_exception_hours}}:{{vm.supportCompany.csl_exception_minutes}})</span></p></div></div><div layout=row ng-if=vm.supportCompany.is_cfs style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CFS - CUSTOMER IDs</p><p></p><div ng-repeat=\\\"custcfs in (vm.supportCompany.cfs_customer_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(custcfs)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{custcfs}}</span></div><p></p></div></div><span style=\\\"display: block;border-bottom: 2px solid #979797\\\"></span><br><div class=company_name layout=row layout-align=\\\"space-between center\\\"><div class=text>Contacts</div><div><span><i class=material-icons style=\\\"color: #46afe3\\\">create</i></span> <span ng-click=vm.edit_prev_step(2) style=\\\"cursor: pointer;color: #46afe3;position: relative;bottom: 7px\\\">EDIT</span></div></div><!-- CWW CONTACTS --><div layout=row ng-if=vm.supportCompany.is_cww style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CWW - CONTACTS</p></div></div><div layout=row ng-if=vm.supportCompany.is_cww style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Crane Sales Rep</p><p class=sub-heading-text>{{vm.supportCompany.crane_sales_rep.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Operations Contacts</p><p ng-repeat=\\\"contact in vm.companyContactsCww\\\" class=sub-heading-text>{{contact.contact_name}}<br></p></div></div><div layout=row ng-if=vm.supportCompany.is_cww style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Default Primary Contact</p><p class=sub-heading-text>{{vm.supportCompany.cww_primary_contact_name.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Default BCCs</p><p ng-repeat=\\\"bcc in vm.supportCompany.cww_default_bccs\\\" class=sub-heading-text>{{bcc}}<br></p></div></div><!-- CSL CONTACTS --><div layout=row ng-if=vm.supportCompany.is_csl style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CSL - CONTACTS</p></div></div><div layout=row ng-if=vm.supportCompany.is_csl style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Crane Sales Rep</p><p class=sub-heading-text>{{vm.supportCompany.crane_sales_rep.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Operations Contacts</p><p ng-repeat=\\\"contact in vm.companyContactsCsl\\\" class=sub-heading-text>{{contact.contact_name}}<br></p></div></div><div layout=row ng-if=vm.supportCompany.is_csl style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Default Primary Contact</p><p class=sub-heading-text>{{vm.supportCompany.csl_primary_contact_name.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Default BCCs</p><p ng-repeat=\\\"bcc in vm.supportCompany.csl_default_bccs\\\" class=sub-heading-text>{{bcc}}<br></p></div></div><!-- CFS CONTACTS --><div layout=row ng-if=vm.supportCompany.is_cfs style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CFS - CONTACTS</p></div></div><div layout=row ng-if=vm.supportCompany.is_cfs style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Crane Sales Rep</p><p class=sub-heading-text>{{vm.supportCompany.crane_sales_rep.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Operations Contacts</p><p ng-repeat=\\\"contact in vm.companyContactsCfs\\\" class=sub-heading-text>{{contact.contact_name}}<br></p></div></div><div layout=row ng-if=vm.supportCompany.is_cfs style=\\\"padding-left: 50px\\\"><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Default Primary Contact</p><p class=sub-heading-text>{{vm.supportCompany.cfs_primary_contact_name.email}}</p></div><div flex=45 style=\\\"margin-bottom: 20px\\\"><p class=heading-text>Default BCCs</p><p ng-repeat=\\\"bcc in vm.supportCompany.cfs_default_bccs\\\" class=sub-heading-text>{{bcc}}<br></p></div></div><span style=\\\"display: block;border-bottom: 2px solid #979797\\\"></span><br><span ng-if=\\\"((vm.supportCompany.accessTypeClassic != true && vm.supportCompany.accessTypeStandard == true) ||\\r\\n (vm.supportCompany.accessTypeClassic == true && vm.supportCompany.accessTypeStandard == true))\\\"><div class=company_name layout=row layout-align=\\\"space-between center\\\"><div class=text>Departments</div><div><span><i class=material-icons style=\\\"color: #46afe3\\\">create</i></span> <span ng-click=vm.edit_prev_step(3) style=\\\"cursor: pointer;color: #46afe3;position: relative;bottom: 7px\\\">EDIT</span></div></div><!-- CWW DEPARTMENTS --><div layout=row ng-if=vm.supportCompany.is_cww style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CWW - DEPARTMENTS</p></div></div><div layout=row class=table-scroll ng-if=vm.supportCompany.is_cww style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Department Name</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Primary Contact</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div class=heading-text>BCC Override</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Party & Group IDs</div></th></thead><tbody><tr ng-repeat=\\\"item in vm.companyDepartmentsCww\\\" class=user_list><td><div class=sub-heading-text>{{item.name}}</div></td><td><div class=sub-heading-text>{{item.primary_contact.email}}</div></td><td><div class=sub-heading-text><p ng-repeat=\\\"bcc in item.bcc_override\\\" class=sub-heading-text>{{bcc}}<br></p></div></td><td style=\\\"padding-top: .75rem;padding-bottom: .75rem\\\"><div class=company_name><div ng-repeat=\\\"departcww in (item.party_or_group_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(departcww)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{departcww}}</span></div></div></td></tr></tbody></table></div><br><!-- CSL DEPARTMENTS --><div layout=row ng-if=vm.supportCompany.is_csl style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CSL - DEPARTMENTS</p></div></div><div layout=row class=table-scroll ng-if=vm.supportCompany.is_csl style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Department Name</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Primary Contact</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div class=heading-text>BCC Override</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Customer IDs</div></th></thead><tbody><tr ng-repeat=\\\"item2 in vm.companyDepartmentsCsl\\\" class=user_list><td><div class=sub-heading-text>{{item2.name}}</div></td><td><div class=sub-heading-text>{{item2.primary_contact.email}}</div></td><td><div class=sub-heading-text><p ng-repeat=\\\"bcc in item2.bcc_override\\\" class=sub-heading-text>{{bcc}}<br></p></div></td><td style=\\\"padding-top: .75rem;padding-bottom: .75rem\\\"><div class=company_name><div ng-repeat=\\\"departcsl in (item2.customer_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(departcsl)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{departcsl}}</span></div></div></td></tr></tbody></table></div><br><!-- CSL DEPARTMENTS --><div layout=row ng-if=vm.supportCompany.is_cfs style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CFS - DEPARTMENTS</p></div></div><div layout=row class=table-scroll ng-if=vm.supportCompany.is_cfs style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Department Name</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Primary Contact</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div class=heading-text>BCC Override</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Customer IDs</div></th></thead><tbody><tr ng-repeat=\\\"item3 in vm.companyDepartmentsCfs\\\" class=user_list><td><div class=sub-heading-text>{{item3.name}}</div></td><td><div class=sub-heading-text>{{item3.primary_contact.email}}</div></td><td><div class=sub-heading-text><p ng-repeat=\\\"bcc in item3.bcc_override\\\" class=sub-heading-text>{{bcc}}<br></p></div></td><td style=\\\"padding-top: .75rem;padding-bottom: .75rem\\\"><div class=company_name><div ng-repeat=\\\"departcfs in (item3.customer_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(departcfs)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{departcfs}}</span></div></div></td></tr></tbody></table></div><br><span style=\\\"display: block;border-bottom: 2px solid #979797\\\"></span><br></span><div class=company_name layout=row layout-align=\\\"space-between center\\\"><div class=text>User Accounts</div><div><span><i class=material-icons style=\\\"color: #46afe3\\\">create</i></span> <span ng-if=\\\"((vm.supportCompany.accessTypeClassic != true && vm.supportCompany.accessTypeStandard == true) ||\\r\\n (vm.supportCompany.accessTypeClassic == true && vm.supportCompany.accessTypeStandard == true))\\\" ng-click=vm.edit_prev_step(4) style=\\\"cursor: pointer;color: #46afe3;position: relative;bottom: 7px\\\">EDIT</span> <span ng-if=\\\"((vm.supportCompany.accessTypeClassic == true && vm.supportCompany.accessTypeStandard != true))\\\" ng-click=vm.edit_prev_step(3) style=\\\"cursor: pointer;color: #46afe3;position: relative;bottom: 7px\\\">EDIT</span></div></div><!-- USER ACCOUNTS --><div layout=row style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">USER ACCOUNTS</p></div></div><div class=user_add_div style=\\\"padding-left: 50px\\\"><div class=table-scroll><table class=table-static cellspacing=0 border=0 style=\\\"width: 95%; min-width:800px\\\"><thead class=header-table><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-5><div class=label>First Name</div></th><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-5><div class=label>Last Name</div></th><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-10><div class=label>Email</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px\\\">Pathway</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:35px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">ACCESS</span></div><div style=\\\"width:55px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">ROLE</span></div></div></div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px\\\">Customer Type</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CWW</span></div><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CSL</span></div><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CFS</span></div><div style=\\\"width:50px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">FINANCIAL</span></div></div></div></th><!-- <th style=\\\"text-align: center;padding-left: 0;font-size: 13px;\\\" class=\\\"td-10\\\"><div class=\\\"label\\\">Overrides</div></th> --></thead><tbody><tr class=user_list ng-repeat=\\\"item in vm.companyUsersCww\\\"><td style=\\\"height: 70px\\\"><div flex=100>{{item.first_name}}</div></td><td style=\\\"height: 70px\\\"><div flex=100>{{item.last_name}}</div></td><td style=\\\"height: 70px\\\"><div flex=100>{{item.email}}</div></td><td style=\\\"height: 70px\\\"><div layout=column class=\\\"label cust_type\\\"><div layout=row layout-align=\\\"space-between center\\\" style=\\\"padding: 0px\\\"><div style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.classic_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.classic_access class=material-icons style=\\\"color: red\\\">clear</i></div><div style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span flex=100><span ng-if=\\\"(item.classic_role == \\'customer_classic\\')\\\">Customer</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_ops\\')\\\">Customer Ops</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_consignee\\')\\\">Consignee</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_shipper\\')\\\">Shipper</span> <span ng-if=\\\"(item.classic_role == \\'\\')\\\">N/A</span></span></div></div></div></td><td style=\\\"height: 70px\\\"><span><div layout=row layout-align=\\\"space-between center\\\"><!-- CWW md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.cww_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.cww_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- CSL md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.csl_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.csl_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- CFS md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.cfs_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.cfs_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- FINACIAL md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.financial class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.financial class=material-icons style=\\\"color: red\\\">clear</i></div></div></span></td><!-- <td style=\\\"height: 70px;\\\">\\r\\n <div flex=\\\"100\\\">\\r\\n <span class=\\\"label\\\" style=\\\"font-weight: 600;font-size: 13px;\\\" flex=\\\"100\\\" layout=\\\"row\\\" layout-align=\\\"center center\\\">\\r\\n <span ng-if=\\\"(item.cww_overrides.primary_contact.id || item.cww_overrides.bccs.length || item.cww_overrides.party_group_ids.length || item.csl_overrides.primary_contact.id || item.csl_overrides.bccs.length || item.csl_overrides.customer_ids.length || item.cfs_overrides.primary_contact.id || item.cfs_overrides.bccs.length || item.cfs_overrides.customer_ids.length)\\\" class=\\\"override\\\" ng-click=\\\"vm.display_overrides(item)\\\" >\\r\\n {{ (item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length}}\\r\\n <span ng-if=\\\"((item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length == 1)\\\">Override</span>\\r\\n\\r\\n <span ng-if=\\\"((item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length > 1)\\\">Overrides</span>\\r\\n\\r\\n </span>\\r\\n <span ng-if=\\\"(!item.cww_overrides.primary_contact.id && !item.cww_overrides.bccs.length && !item.cww_overrides.party_group_ids.length && !item.csl_overrides.primary_contact.id && !item.csl_overrides.bccs.length && !item.csl_overrides.customer_ids.length && !item.cfs_overrides.primary_contact.id && !item.cfs_overrides.bccs.length && !item.cfs_overrides.customer_ids.length)\\\" class=\\\"no_override\\\">No overrides</span>\\r\\n </span>\\r\\n </div>\\r\\n </td> --></tr></tbody></table></div></div><br><span style=\\\"display: block;border-bottom: 2px solid #979797\\\"></span><br><span><div class=company_name layout=row layout-align=\\\"space-between center\\\"><div class=text>Account Overrides</div><div><span><i class=material-icons style=\\\"color: #46afe3\\\">create</i></span> <span ng-if=\\\"((vm.supportCompany.accessTypeClassic != true && vm.supportCompany.accessTypeStandard == true) ||\\r\\n (vm.supportCompany.accessTypeClassic == true && vm.supportCompany.accessTypeStandard == true))\\\" ng-click=vm.edit_prev_step(5) style=\\\"cursor: pointer;color: #46afe3;position: relative;bottom: 7px\\\">EDIT</span> <span ng-if=\\\"((vm.supportCompany.accessTypeClassic == true && vm.supportCompany.accessTypeStandard != true))\\\" ng-click=vm.edit_prev_step(4) style=\\\"cursor: pointer;color: #46afe3;position: relative;bottom: 7px\\\">EDIT</span></div></div><!-- CWW Account Overrides --><div layout=row ng-if=vm.supportCompany.is_cww style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CWW - ACCOUNT OVERRIDES</p></div></div><div layout=row class=table-scroll ng-if=vm.supportCompany.is_cww style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>User Account</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Primary Contact Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-30><div class=heading-text>BCC Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-30><div class=heading-text>Party & Group ID Overrides</div></th></thead><tbody><tr ng-repeat=\\\"overridecww in vm.companyUsersCww\\\" class=user_list><td><div class=sub-heading-text>{{overridecww.first_name}} {{overridecww.last_name}}</div></td><td><div class=sub-heading-text>{{overridecww.cww_overrides.primary_contact.email}}</div></td><td><div class=sub-heading-text><p ng-repeat=\\\"bcccww in overridecww.cww_overrides.bccs\\\" class=sub-heading-text>{{bcccww}}<br></p></div></td><td style=\\\"padding-top: .75rem;padding-bottom: .75rem\\\"><div class=company_name><div ng-repeat=\\\"overidecww in (overridecww.cww_overrides.party_group_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(overidecww)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{overidecww}}</span></div></div></td></tr></tbody></table></div><br><!-- CSL Account Overrides --><div layout=row ng-if=vm.supportCompany.is_csl style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CSL - ACCOUNT OVERRIDES</p></div></div><div layout=row class=table-scroll ng-if=vm.supportCompany.is_csl style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>User Account</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Primary Contact Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div class=heading-text>BCC Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Customer ID Overrides</div></th></thead><tbody><tr ng-repeat=\\\"overridecsl in vm.companyUsersCww\\\" class=user_list><td><div class=sub-heading-text>{{overridecsl.first_name}} {{overridecsl.last_name}}</div></td><td><div class=sub-heading-text>{{overridecsl.csl_overrides.primary_contact.email}}</div></td><td><div class=sub-heading-text><p ng-repeat=\\\"bcccsl in overridecsl.csl_overrides.bccs\\\" class=sub-heading-text>{{bcccsl}}<br></p></div></td><td style=\\\"padding-top: .75rem;padding-bottom: .75rem\\\"><div class=company_name><div ng-repeat=\\\"overidecsl in (overridecsl.csl_overrides.customer_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(overidecsl)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{overidecsl}}</span></div></div></td></tr></tbody></table></div><br><!-- CSL Account Overrides --><div layout=row ng-if=vm.supportCompany.is_cfs style=\\\"padding-left: 50px\\\"><div flex=100 class=company_name><p class=text style=\\\"font-size: 12px\\\">CFS - ACCOUNT OVERRIDES</p></div></div><div layout=row class=table-scroll ng-if=vm.supportCompany.is_cfs style=\\\"padding-left: 50px\\\"><table class=table-static cellspacing=0 border=0 style=width:95%;min-width:800px><thead><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>User Account</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-15><div class=heading-text>Primary Contact Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div class=heading-text>BCC Overrides</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-40><div class=heading-text>Customer ID Overrides</div></th></thead><tbody><tr ng-repeat=\\\"overridecfs in vm.companyUsersCww\\\" class=user_list><td><div class=sub-heading-text>{{overridecfs.first_name}} {{overridecfs.last_name}}</div></td><td><div class=sub-heading-text>{{overridecfs.cfs_overrides.primary_contact.email}}</div></td><td><div class=sub-heading-text><p ng-repeat=\\\"bcccfs in overridecfs.cfs_overrides.bcc_override\\\" class=sub-heading-text>{{bcccfs}}<br></p></div></td><td style=\\\"padding-top: .75rem;padding-bottom: .75rem\\\"><div class=company_name><div ng-repeat=\\\"overidecfs in (overridecfs.cfs_overrides.customer_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(overidecfs)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{overidecfs}}</span></div></div></td></tr></tbody></table></div><br></span></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/step_four.html\",\"<style type=text/css>.user_list{\\r\\n border-bottom: 1px solid #ece6e6;\\r\\n vertical-align: middle;\\r\\n clear:both;\\r\\n font-size:16px;\\r\\n color: #505457;\\r\\n padding-bottom: 10px;\\r\\n margin-bottom: 5px;\\r\\n }\\r\\n .remove-user-text{\\r\\n color:red;\\r\\n cursor:pointer;\\r\\n font-size:15px;\\r\\n font-weight: 500;\\r\\n }\\r\\n .desc{\\r\\n font-style: italic;\\r\\n color:#a8a8a8;\\r\\n font-size: .85em;\\r\\n }\\r\\n .md-switch-class{\\r\\n display: inline-block;margin: 0;\\r\\n }\\r\\n md-switch[disabled] .md-bar {\\r\\n background-color: #dbdbdb; /* set disabled bar color */\\r\\n }\\r\\n md-switch[disabled] .md-ink-ripple {\\r\\n background-color: #e7e7e7; /* not selected switch ripple color */\\r\\n }\\r\\n.edit-user-text{\\r\\n color:#46afe3;\\r\\n cursor:pointer;\\r\\n font-size:15px;\\r\\n font-weight: 500;\\r\\n }\\r\\n.user_list:nth-child(odd) {\\r\\n background-color: #ebebeb;\\r\\n padding: 15px;\\r\\n border-bottom: none;\\r\\n}\\r\\n.user_list:nth-child(even) {\\r\\n background-color: #ffffff;\\r\\n padding: 15px;\\r\\n border-bottom: none;\\r\\n}\\r\\n.user_add_list md-input-container.md-input-invalid .md-input{\\r\\n border-color: none !important;\\r\\n}\\r\\n.skip-btn{\\r\\n position: relative;\\r\\n border: 1px solid #ece6e6;\\r\\n color: #fff;\\r\\n font-weight: 600;\\r\\n font-size: 15px;\\r\\n padding: 13px 45px 13px 50px;\\r\\n background-color: #46afe3;\\r\\n border-radius: 5px;\\r\\n margin-bottom: 20px;\\r\\n}</style><div class=header layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=step>Step 3:</span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=step>Step 4:</span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" class=step>Step 4:</span> <span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard != true)\\\" class=step>Step 4:</span> <span>Add User Accounts (Optional)</span></div></div><div layout=row layout-align=\\\"end center\\\"><button ng-click=vm.showImportUserPopupCompany() class=skip-btn><i class=material-icons style=\\\"font-size: 15px\\\">open_in_new</i>    <span>IMPORT USERS</span></button>   <button style=\\\"position: relative\\\" ng-click=\\\"vm.company_next_step(vm.form_step_number,\\'user\\')\\\" class=skip-btn>SKIP USER ACCOUNTS <i style=\\\"position: absolute;top: 7px;right: 10px;font-size: 30px\\\" class=material-icons></i></button></div><form name=vm.GeneralRequestForm class=light-form novalidate><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">USER ACCOUNTS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout=column flex=100><div class=company_name><div class=text>User Accounts</div><div class=desc>Add all details for the new user accounts</div></div><div class=user_add_div><div class=table-scroll><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>First Name</label><input type=text ng-model=vm.supportCompanyEdit.cww_user_first_name name=cww_user_first_name required></md-input-container></div></th><th class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Last Name</label><input type=text ng-model=vm.supportCompanyEdit.cww_user_last_name name=cww_user_last_name required></md-input-container></div></th><th class=td-20><div flex=100><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Email</label><input type=email ng-model=vm.supportCompanyEdit.cww_user_email name=cww_user_email required></md-input-container></div></th><th class=td-15 colspan=3><div flex=100 layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.addRequestCompanyUsersCww(); class=\\\"md-raised md-primary\\\" style=\\\"background-color: #fff !important; border-radius: 10px !important;box-shadow: none !important;\\r\\n border: 1px solid #68b9ea !important;margin-top: 5px !important;line-height: 15px !important;\\r\\n min-width: 120px !important\\\"><span style=\\\"color: #68b9ea;text-transform: none\\\">ADD</span></md-button></div></th></tr></thead><thead class=header-table><th class=td-5><div class=label style=\\\"font-size: 13px;color: black;font-weight: 600\\\">FIRST NAME</div></th><th class=td-5><div class=label style=\\\"font-size: 13px;color: black;font-weight: 600\\\">LAST NAME</div></th><th class=td-10><div class=label style=\\\"font-size: 13px;color: black;font-weight: 600\\\">EMAIL</div></th><!-- <th class=\\\"td-10\\\"><div class=\\\"label\\\">CLASSIC ACCESS</div></th> --><th ng-if=\\\"((vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true))\\r\\n || ((vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true))\\\" class=td-20><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px;color: black;font-weight: 600\\\">Pathway</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:75px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">ACCESS</span></div><div style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">ROLE</span></div></div></div></th><th class=td-20><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px;color: black;font-weight: 600\\\">CUSTOMER TYPE</div><div layout=row layout-align=\\\"space-between center\\\"><div ng-if=vm.supportCompany.is_cww style=\\\"width:75px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">CWW</span></div><div ng-if=vm.supportCompany.is_csl style=\\\"width:75px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">CSL</span></div><div ng-if=vm.supportCompany.is_cfs style=\\\"width:75px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">CFS</span></div><div ng-if=\\\"((vm.supportCompany.accessTypeClassic != true && vm.supportCompany.accessTypeStandard == true) ||\\r\\n (vm.supportCompany.accessTypeClassic == true && vm.supportCompany.accessTypeStandard == true)) &&\\r\\n (vm.supportCompany.portalType == \\'customer\\')\\\" style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">FINANCIAL</span></div></div></div></th><!-- <th class=\\\"td-10\\\"><div class=\\\"label\\\">USER ROLE</div></th> --><th class=td-10><div class=label style=\\\"font-size: 13px;color: black;font-weight: 600\\\">ACTIONS</div></th></thead><tbody><tr class=\\\"user_list departmentRow{{$index}}\\\" ng-repeat=\\\"item in vm.companyUsersCww\\\"><td style=\\\"height: 70px\\\"><div flex=100 ng-attr-style=\\\"display:{{(vm.editUserId==$index && vm.editCheckCwwUser)?\\'none\\':\\'\\'}}\\\">{{item.first_name}}</div><div flex=100 ng-if=\\\"vm.editUserId == $index && vm.editCheckCwwUser\\\" ng-attr-style=\\\"display:{{vm.editUserId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>First Name</label><input type=text ng-model=vm.supportCompanyEditRow.cww_user_first_name name=cww_user_first_name required></md-input-container></div></td><td style=\\\"height: 70px\\\"><div flex=100 ng-attr-style=\\\"display:{{(vm.editUserId==$index && vm.editCheckCwwUser)?\\'none\\':\\'\\'}}\\\">{{item.last_name}}</div><div flex=100 ng-if=\\\"vm.editUserId == $index && vm.editCheckCwwUser\\\" ng-attr-style=\\\"display:{{vm.editUserId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Last Name</label><input type=text ng-model=vm.supportCompanyEditRow.cww_user_last_name name=cww_user_last_name required></md-input-container></div></td><td style=\\\"height: 70px\\\"><div flex=100 ng-attr-style=\\\"display:{{(vm.editUserId==$index && vm.editCheckCwwUser)?\\'none\\':\\'\\'}}\\\">{{item.email}}</div><div flex=100 ng-if=\\\"vm.editUserId == $index && vm.editCheckCwwUser\\\" ng-attr-style=\\\"display:{{vm.editUserId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Email</label><input type=text ng-model=vm.supportCompanyEditRow.cww_user_email name=cww_user_email required></md-input-container></div></td><td ng-if=\\\"((vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)) ||\\r\\n ((vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true))\\\" style=\\\"height: 70px\\\"><span ng-attr-style=\\\"display:{{(vm.editUserId==$index && vm.editCheckCwwUser)?\\'none\\':\\'\\'}}\\\"><div layout=row layout-align=\\\"space-between center\\\"><div ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" style=\\\"padding: 0;width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=true style=\\\"margin: 0\\\" class=md-switch-class ng-model=item.classic_access></md-switch></div><div ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" style=\\\"padding: 0;width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=true style=\\\"margin: 0\\\" class=md-switch-class ng-model=item.classic_access></md-switch></div><div style=\\\"padding: 0;width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span ng-if=\\\"(item.classic_role == \\'customer_classic\\')\\\">Customer</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_ops\\')\\\">Customer Ops</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_consignee\\')\\\">Consignee</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_shipper\\')\\\">Shipper</span></div></div></span><span ng-if=\\\"vm.editUserId == $index && vm.editCheckCwwUser\\\" ng-attr-style=\\\"display:{{vm.editUserId==$index?\\'block\\':\\'\\'}}\\\"><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:75px;text-align: center\\\" ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\" style=\\\"padding: 0\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=vm.accessToggle style=\\\"margin: 0\\\" class=md-switch-class ng-model=vm.supportCompanyEditRow.classic_access></md-switch></div><div style=\\\"width:75px;text-align: center\\\" ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\" style=\\\"padding: 0\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=vm.accessToggle style=\\\"margin: 0\\\" class=md-switch-class ng-model=vm.supportCompanyEditRow.classic_access></md-switch></div><div style=\\\"width:75px;text-align: center\\\" ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\" style=\\\"padding: 0\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=true class=md-switch-class style=\\\"margin: 0\\\" ng-model=vm.supportCompanyEditRow.classic_access></md-switch></div><div style=\\\"padding: 0;width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"><label ng-if=\\\"((!vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic) &&\\r\\n (vm.supportCompany.portalType == \\'customer\\'))\\\" translate=\\\"\\\">User Role</label><md-select ng-if=\\\"(((!vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic) ||\\r\\n (vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic)) &&\\r\\n (vm.supportCompany.portalType == \\'customer\\'))\\\" ng-model=vm.supportCompanyEditRow.classic_role aria-label=vm.supportCompanyEditRow.classic_role md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.customerClassic\\\">{{role.display}}</md-option></md-select><span ng-if=\\\"(((!vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic) ||\\r\\n (vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic)) &&\\r\\n (vm.supportCompany.portalType == \\'consignee\\'))\\\">Consignee</span> <span ng-if=\\\"(((!vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic) ||\\r\\n (vm.supportCompany.accessTypeStandard && vm.supportCompany.accessTypeClassic)) &&\\r\\n (vm.supportCompany.portalType == \\'shipper\\'))\\\">Shipper</span></md-input-container></div></div></span></td><td style=\\\"height: 70px\\\"><span ng-attr-style=\\\"display:{{(vm.editUserId==$index && vm.editCheckCwwUser)?\\'none\\':\\'\\'}}\\\"><div layout=row layout-align=\\\"space-between center\\\"><!-- CWW md-switch --><div ng-if=vm.supportCompany.is_cww style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=true style=\\\"margin: 0\\\" class=md-switch-class ng-model=item.cww_access></md-switch></div><!-- CSL md-switch --><div ng-if=vm.supportCompany.is_csl style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=true style=\\\"margin: 0\\\" class=md-switch-class ng-model=item.csl_access></md-switch></div><!-- CFS md-switch --><div ng-if=vm.supportCompany.is_cfs style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=true style=\\\"margin: 0\\\" class=md-switch-class ng-model=item.cfs_access></md-switch></div><!-- FINACIAL md-switch --><div ng-if=\\\"((vm.supportCompany.accessTypeClassic != true && vm.supportCompany.accessTypeStandard == true) ||\\r\\n (vm.supportCompany.accessTypeClassic == true && vm.supportCompany.accessTypeStandard == true)) &&\\r\\n (vm.supportCompany.portalType == \\'customer\\')\\\" style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=true style=\\\"margin: 0\\\" class=md-switch-class ng-model=item.financial></md-switch></div></div></span><span ng-if=\\\"vm.editUserId == $index && vm.editCheckCwwUser\\\" ng-attr-style=\\\"display:{{vm.editUserId==$index?\\'block\\':\\'\\'}}\\\"><div layout=row layout-align=\\\"space-between center\\\"><!-- CWW md-switch --><div ng-if=vm.supportCompany.is_cww style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard != true)\\\"><md-switch ng-disabled=vm.customerToggle style=\\\"margin: 0\\\" class=md-switch-class ng-model=vm.supportCompanyEditRow.cww_customer_type></md-switch></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic != true) && (vm.supportCompany.accessTypeStandard == true)\\\"><md-switch ng-disabled=vm.customerToggle style=\\\"margin: 0\\\" class=md-switch-class ng-model=vm.supportCompanyEditRow.cww_customer_type></md-switch></span><span ng-if=\\\"(vm.supportCompany.accessTypeClassic == true) && (vm.supportCompany.accessTypeStandard == true)\\\"><md-switch ng-disabled=vm.customerToggle style=\\\"margin: 0\\\" class=md-switch-class ng-model=vm.supportCompanyEditRow.cww_customer_type></md-switch></span></div><!-- CSL md-switch --><div ng-if=vm.supportCompany.is_csl style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch style=\\\"margin: 0\\\" class=md-switch-class ng-model=vm.supportCompanyEditRow.csl_customer_type></md-switch></div><!-- CFS md-switch --><div ng-if=vm.supportCompany.is_cfs style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch style=\\\"margin: 0\\\" class=md-switch-class ng-model=vm.supportCompanyEditRow.cfs_customer_type></md-switch></div><!-- FINACIAL md-switch --><div ng-if=\\\"((vm.supportCompany.accessTypeClassic != true && vm.supportCompany.accessTypeStandard == true) ||\\r\\n (vm.supportCompany.accessTypeClassic == true && vm.supportCompany.accessTypeStandard == true)) &&\\r\\n (vm.supportCompany.portalType == \\'customer\\')\\\" style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch style=\\\"margin: 0\\\" class=md-switch-class ng-model=vm.supportCompanyEditRow.financial_customer_type></md-switch></div></div></span></td><td style=\\\"height: 70px\\\"><div flex=100 ng-attr-style=\\\"display:{{(vm.editUserId==$index && vm.editCheckCwwUser)?\\'none\\':\\'\\'}}\\\"><span class=edit-user-text ng-click=vm.editCompanyUserListCww($index)>Edit</span>  <span class=remove-user-text ng-click=vm.removeCompanyUserListCww($index)>Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserId == $index && vm.editCheckCwwUser\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><span ng-click=vm.submitEditCompanyUserCww($index)>Done</span></div></td></tr></tbody></table></div></div></div></md-card-content></md-card></div></form>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/step_one.html\",\"<style>md-radio-button.md-default-theme .md-off, md-radio-button .md-off {\\r\\n border-color: #d6d6d6;\\r\\n}\\r\\n.md-card-light md-card-content, md-content.light-content, .light-content{\\r\\n background-color: #ebebeb;\\r\\n}\\r\\n.invisible-class{\\r\\n padding: 20px 15px !important;\\r\\n margin-bottom: 10px;\\r\\n}\\r\\n.newchips md-chip {\\r\\n background: transparent;\\r\\n color: #fff;\\r\\n border-radius: 7px !important;\\r\\n}\\r\\n.toUpperCase *{\\r\\n text-transform: uppercase;\\r\\n}\\r\\n.desc{\\r\\n font-style: italic;\\r\\n color:#a8a8a8;\\r\\n font-size: .85em;\\r\\n }\\r\\n.visible-class{\\r\\n padding: 20px 15px !important;\\r\\n margin-bottom: 10px;\\r\\n}\\r\\n.hide-select-icon .md-select-icon{\\r\\n display:none !important;\\r\\n }\\r\\n .space-customer-grid{\\r\\n margin-left: 2%;\\r\\n }\\r\\n @media screen and (max-width: 992px) {\\r\\n .space-customer-grid{\\r\\n margin-left: 0;\\r\\n }\\r\\n }\\r\\n /* md-radio-button.md-default-theme .md-off, md-radio-button .md-off {\\r\\n border-color: #a8a8a8 !important;\\r\\n}\\r\\n.light-form md-radio-button .md-off {\\r\\n border-color: #5E6163;\\r\\n}*/\\r\\n\\r\\n.md-chip.database-exist{\\r\\n background-color: #48c267 !important;\\r\\n}\\r\\n\\r\\n.md-chip.database-notexist{\\r\\n background-color: #9b9b9b !important;\\r\\n}</style><div class=header layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span class=step>Step 1:</span> <span>Company Info</span></div></div><form name=vm.GeneralRequestForm class=light-form role=form novalidate><div layout=column layout-gt-sm=row><div flex=100 flex-gt-sm=45 layout=column class=\\\"visible-class remove-margin-responsive\\\" style=\\\"margin-right: 15px\\\"><div class=company_name><div class=text>Company Name <span class=star>*</span></div><div class=desc>Enter the name as it will be displayed throught C-View</div></div><div layout=row><md-input-container flex=100 style=\\\"max-width: 100%\\\" flex-gt-sm=50 class=\\\"md-block error-hidden m-b\\\"><label style=\\\"color: #b4b5b5\\\">Company</label><input style=\\\"/*font-size:110%;color: #30353B;border-width: 0 0 2px 0;border-bottom-color: #a9a9a9;*/\\\" ng-model=vm.supportCompany.company_name ng-change=checkNameField(vm.supportCompany.company_name) type=text name=company_name ng-required=true><div ng-messages=vm.GeneralRequestForm.company_name.$error><div ng-message=required><span>Company name field required</span></div></div></md-input-container></div></div><div flex=100 flex-gt-sm=45 ng-class=\\\"vm.supportCompany.companyEnableCheck == true ? \\'visible-class\\' : \\'invisible-class\\'\\\"><div class=company_name><div ng-class=\\\"vm.supportCompany.companyEnableCheck == true ? \\'text\\' : \\'text-disable\\'\\\">Access Type <span ng-class=\\\"vm.supportCompany.companyEnableCheck == true ? \\'star\\' : \\'star-disable\\'\\\">*</span></div><div class=desc>Select whether to provide access for standard C-View or Pathway for this company</div></div><div flex=100 layout=row class=company_name><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=!vm.supportCompany.companyEnableCheck ng-change=\\\"vm.accessType(\\'standard\\',vm.supportCompany.accessTypeStandard)\\\" ng-model=vm.supportCompany.accessTypeStandard aria-label=supportCompany class=md-primary><span ng-class=\\\"vm.supportCompany.companyEnableCheck == true ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">C-View Portal</span></md-checkbox></span><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=!vm.supportCompany.companyEnableCheck ng-change=\\\"vm.accessType(\\'classic\\',vm.supportCompany.accessTypeClassic)\\\" ng-model=vm.supportCompany.accessTypeClassic class=md-primary aria-label=supportCompany><span ng-class=\\\"vm.supportCompany.companyEnableCheck == true ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">Pathway</span></md-checkbox></span></div></div></div><br><div layout=column layout-gt-sm=row><div flex=100 flex-gt-sm=45 class=remove-margin-responsive ng-if=vm.accessTypeEnableCheck ng-class=\\\"vm.accessTypeEnableCheck == true ? \\'visible-class\\' : \\'invisible-class\\'\\\" style=\\\"margin-right: 15px\\\"><div class=company_name><div ng-class=\\\"vm.accessTypeEnableCheck == true ? \\'text\\' : \\'text-disable\\'\\\">Portal Type <span ng-class=\\\"vm.accessTypeEnableCheck == true ? \\'star\\' : \\'star-disable\\'\\\">*</span></div><div class=desc>Short Description will be placed here</div></div><div layout=row><md-radio-group ng-model=vm.supportCompany.portalType><md-radio-button ng-disabled=\\\"\\\" style=\\\"display: inline-block\\\" ng-click=\\\"vm.portalChange(\\'customer\\')\\\" value=customer class=md-primary>Customer</md-radio-button>   <md-radio-button ng-disabled=\\\"\\\" style=\\\"display: inline-block\\\" ng-click=\\\"vm.portalChange(\\'consignee\\')\\\" value=consignee class=md-primary>Consignee</md-radio-button>   <md-radio-button ng-disabled=\\\"\\\" style=\\\"display: inline-block\\\" ng-click=\\\"vm.portalChange(\\'shipper\\')\\\" value=shipper class=md-primary>Shipper</md-radio-button></md-radio-group></div></div><div flex=100 flex-gt-sm=45 class=remove-margin-responsive ng-if=vm.accessTypeEnableCheck ng-class=\\\"(vm.customerTypeEnableCheck) ? \\'visible-class\\' : \\'invisible-class\\'\\\"><div class=company_name><div ng-class=\\\"(vm.customerTypeEnableCheck) ? \\'text\\' : \\'text-disable\\'\\\">Customer Type <span ng-class=\\\"(vm.customerTypeEnableCheck) ? \\'star\\' : \\'star-disable\\'\\\">*</span></div><div class=desc>Short Description will be placed here</div></div><div layout=row class=company_name><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=\\\"(vm.checkboxCustType || vm.checkboxCustType1)\\\" ng-change=vm.cww_setup(vm.supportCompany.is_cww) ng-model=vm.supportCompany.is_cww aria-label=supportCompany class=md-primary><span ng-class=\\\"(vm.customerTypeEnableCheck) ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">CWW</span></md-checkbox></span><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=(vm.checkboxCustType) ng-change=vm.csl_setup(vm.supportCompany.is_csl) ng-model=vm.supportCompany.is_csl aria-label=supportCompany class=md-primary><span ng-class=\\\"(vm.customerTypeEnableCheck) ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">CSL</span></md-checkbox></span><span style=\\\"font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=(vm.checkboxCustType) ng-change=vm.cfs_setup(vm.supportCompany.is_cfs) ng-model=vm.supportCompany.is_cfs aria-label=supportCompany class=md-primary><span ng-class=\\\"(vm.customerTypeEnableCheck) ? \\'text\\' : \\'text-disable\\'\\\" style=\\\"font-size: 15px\\\">CFS</span></md-checkbox></span></div></div></div><br><br><div style=\\\"border-bottom: 1px solid #ccc\\\"><br><div id=cww-setup-box ng-if=vm.supportCompany.is_cww><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CWW COMPANY INFO</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=48 flex-offset-gt-sm=5 style=margin-bottom:0px layout=row layout-align=\\\"end center\\\"><md-checkbox ng-disabled=\\\"\\\" aria-label=supportCompany ng-model=vm.supportCompany.is_reskin class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Magno Reskin</span></div></div><div style=\\\"clear: both\\\"></div><h3>Party IDs</h3><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"font-style: normal;font-size: 20px\\\" translate=COMPANY.DEFAULT_PARTY_ID></label><md-chips class=\\\"user-chips email-chips party-chips toUpperCase\\\" ng-class=\\\"(vm.idCheck == true)? \\'database-exist\\': \\'database-notexist\\'\\\" ng-model=vm.supportCompany.cww_party_id_names md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"vm.addPartyIdsCww($chip,$index,\\'party\\',\\'cww\\',\\'party_id\\',vm.supportCompany.portalType)\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"vm.selectedCwwPArtyIdChange(item,\\'cww\\',\\'party_id\\',vm.supportCompany.portalType)\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cww_party_check>Party ID / Group ID either one is mandatory</span></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin-top: 60px\\\"><label style=\\\"font-style: normal;font-size: 20px\\\" translate=COMPANY.DEFAULT_GROUP_ID></label><md-chips class=\\\"user-chips email-chips group-chips toUpperCase\\\" ng-class=\\\"(vm.idCheck == true)? \\'database-exist\\': \\'database-notexist\\'\\\" ng-model=vm.supportCompany.cww_related_party_id_names md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"vm.addPartyIdsCww($chip,$index,\\'group\\',\\'cww\\',\\'related_party_id\\',vm.supportCompany.portalType)\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"vm.selectedCwwPArtyIdChange(item,\\'cww\\',\\'related_party_id\\',vm.supportCompany.portalType)\\\" ng-disabled=vm.readAccess md-search-text=searchText1 md-items=\\\"item in vm.getMatchCww(\\'related_party_id\\', searchText1)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText1>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></md-card-content></md-card></div><div id=csl-setup-box ng-if=vm.supportCompany.is_csl><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CSL COMPANY INFO</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=48 flex-offset-gt-sm=6 style=margin-bottom:0px layout=row layout-align=\\\"end center\\\"><md-checkbox style=\\\"margin-right: 0\\\" ng-disabled=vm.readAccess ng-model=vm.supportCompany.is_show_class class=md-primary></md-checkbox> <span style=\\\"min-width: 110px\\\">Show Class</span><md-checkbox ng-disabled=vm.readAccess ng-model=vm.supportCompany.is_send_exception_email class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Do Not Send Exception Emails</span></div></div><div style=\\\"clear: both\\\"></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Customer IDs</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">Default Customer IDs</label><md-chips class=\\\"user-chips email-chips cslcustomer-chips toUpperCase\\\" ng-model=vm.supportCompany.csl_customer_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"vm.addPartyIdsCww($chip,$index,\\'cslcustomer\\',\\'csl\\',\\'customer_id\\',vm.supportCompany.portalType)\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"vm.selectedCwwPArtyIdChange(item,\\'csl\\',\\'customer_id\\',vm.supportCompany.portalType)\\\" ng-disabled=vm.readAccess md-search-text=searchText2 md-items=\\\"item in vm.getMatchCsl(\\'party_name\\', searchText2)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText2>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.csl_party_check>Customer ID is mandatory</span></md-input-container></div><div flex-gt-sm=48 flex-offset-gt-sm=5><h3>Exception Threshold</h3><div layout=row><div style=\\\"position: relative;margin-right: 35px\\\"><i style=\\\"position: absolute;top: 25px;color: black\\\" ng-if=!vm.supportCompany.is_threshold_default class=material-icons></i> <i style=\\\"position: absolute;top: 25px;color: #bbb\\\" ng-if=vm.supportCompany.is_threshold_default class=material-icons></i></div><div style=\\\"margin-right: 15px\\\"><p ng-attr-style=\\\"{{(vm.supportCompany.is_threshold_default)?(\\'color:#bbb;font-size: 10px;margin: 0;padding: 0 12px;\\'):(\\'color:black;font-size: 10px;margin: 0;padding: 0 12px;\\')}}\\\" translate=\\\"\\\">Hours</p><md-input-container style=\\\"margin: 5px 0\\\" class=\\\"md-block error-hidden\\\" layout=row layout-align=\\\"center center\\\"><input type=text ng-attr-style=\\\"{{(vm.supportCompany.is_threshold_default)?(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;padding: 0px 10px;font-size: 25px;color: #bbb !important;\\'):(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;font-size: 25px;padding: 0px 10px;color: #45AFE3 !important;\\')}}\\\" ng-disabled=\\\"vm.readAccess || vm.supportCompany.is_threshold_default\\\" ng-model=vm.supportCompany.csl_exception_hours ng-change=\\\"vm.thresholdChange(vm.supportCompany.csl_exception_hours,\\'hrs\\')\\\" name=csl_exception_hours maxlength=2 required></md-input-container></div><div style=\\\"position: relative;margin-right: 15px\\\"><span style=\\\"position: absolute;top: 25px;color: #45AFE3\\\" ng-if=!vm.supportCompany.is_threshold_default>:</span> <span style=\\\"position: absolute;top: 25px;color: #bbb\\\" ng-if=vm.supportCompany.is_threshold_default>:</span></div><div style=\\\"margin-left: 0px;margin-right: 30px\\\"><p ng-attr-style=\\\"{{(vm.supportCompany.is_threshold_default)?(\\'color:#bbb;font-size: 10px;margin: 0;padding: 0 8px;\\'):(\\'color:black;font-size: 10px;margin: 0;padding: 0 8px;\\')}}\\\" translate=\\\"\\\">Minutes</p><md-input-container style=\\\"margin: 5px 0\\\" class=\\\"md-block error-hidden\\\"><input type=text ng-attr-style=\\\"{{(vm.supportCompany.is_threshold_default)?(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;padding: 0px 10px;font-size: 25px;color: #bbb !important;\\'):(\\'max-width: 45px;min-width: 55px;height: 35px;border: 1px solid #b4b5b5;font-size: 25px;padding: 0px 10px;color: #45AFE3 !important;\\')}}\\\" ng-disabled=\\\"vm.readAccess || vm.supportCompany.is_threshold_default\\\" ng-model=vm.supportCompany.csl_exception_minutes ng-change=\\\"vm.thresholdChange(vm.supportCompany.csl_exception_minutes,\\'mins\\')\\\" name=csl_exception_minutes maxlength=2 required></md-input-container></div><div style=\\\"margin: 25px 5px\\\"><md-checkbox ng-change=vm.csl_threshold_default(vm.supportCompany.is_threshold_default,vm.supportCompany.csl_exception_hours_exist,vm.supportCompany.csl_exception_minutes_exist) ng-disabled=vm.readAccess aria-label=csl_threshold_default ng-model=vm.supportCompany.is_threshold_default class=md-primary></md-checkbox> <span style=\\\"min-width: 125px\\\">Default</span></div></div><div><span style=color:red ng-show=\\\"vm.GeneralRequestForm.csl_exception_hours.$error.pattern || vm.showhrsError\\\">Enter only numbers</span> <span style=color:red ng-show=\\\"vm.GeneralRequestForm.csl_exception_minutes.$error.pattern || vm.showMinsError\\\">Minutes between 0-59 (enter number only)</span></div><div ng-if=thresholdCheck ng-hide=\\\"vm.GeneralRequestForm.csl_exception_hours.$error.pattern || vm.GeneralRequestForm.csl_exception_minutes.$error.pattern\\\" style=\\\"box-shadow: 0px 5px 10px 0px grey;padding: 5px\\\"><span style=\\\"color: #fd7600;font-style: italic\\\">The new threshold will not be affected any existing Live exceptions.<br><span ng-if=\\\"exceptionCount > 1 || exceptionCount == 0\\\">There are {{exceptionCount}} Live Exceptions for this customer.</span> <span ng-if=\\\"exceptionCount == 1\\\">There is {{exceptionCount}} Live Exception for this customer.</span> {{vm.GeneralRequestForm.csl_exception_hours.$error.pattern}}{{vm.GeneralRequestForm.csl_exception_minutes.$error.pattern}}</span></div></div></div></md-card-content></md-card></div><div id=cfs-setup-box ng-if=vm.supportCompany.is_cfs><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CFS COMPANY INFO</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><h3>Customer IDs</h3><md-input-container class=\\\"md-block error-hidden\\\"><label translate=\\\"\\\">Default Customer IDs</label><md-chips class=\\\"user-chips email-chips cfscustomer-chips toUpperCase\\\" ng-model=vm.supportCompany.cfs_customer_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"vm.addPartyIdsCww($chip,$index,\\'cfscustomer\\',\\'cfs\\',\\'customer_id\\',vm.supportCompany.portalType)\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"vm.selectedCwwPArtyIdChange(item,\\'cfs\\',\\'customer_id\\',vm.supportCompany.portalType)\\\" ng-disabled=vm.readAccess md-search-text=searchText3 md-items=\\\"item in vm.getMatchCfs(\\'party_name\\', searchText3)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText3>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cfs_party_check>Customer ID is mandatory</span></md-input-container></div></div></md-card-content></md-card></div></form>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/step_three.html\",\"<style>.user_list{\\r\\n border-bottom: 1px solid #ece6e6;\\r\\n vertical-align: middle;\\r\\n clear:both;\\r\\n font-size:16px;\\r\\n color: #505457;\\r\\n padding-bottom: 10px;\\r\\n margin-bottom: 5px;\\r\\n }\\r\\n .remove-user-text{\\r\\n color:red;\\r\\n cursor:pointer;\\r\\n font-size:15px;\\r\\n font-weight: 500;\\r\\n }\\r\\n .desc{\\r\\n font-style: italic;\\r\\n color:#a8a8a8;\\r\\n font-size: .85em;\\r\\n }\\r\\n.edit-user-text{\\r\\n color:#46afe3;\\r\\n cursor:pointer;\\r\\n font-size:15px;\\r\\n font-weight: 500;\\r\\n }\\r\\n.user_list:nth-child(odd) {\\r\\n background-color: #ebebeb;\\r\\n padding: 15px;\\r\\n border-bottom: none;\\r\\n}\\r\\n.user_list:nth-child(even) {\\r\\n background-color: #ffffff;\\r\\n padding: 15px;\\r\\n border-bottom: none;\\r\\n}\\r\\n\\r\\n.toUpperCase *{\\r\\n text-transform: uppercase;\\r\\n}\\r\\n\\r\\n.skip-btn{\\r\\n position: relative;\\r\\n border: 1px solid #ece6e6;\\r\\n color: #fff;\\r\\n font-weight: 600;\\r\\n font-size: 15px;\\r\\n padding: 13px 45px 13px 50px;\\r\\n background-color: #46afe3;\\r\\n border-radius: 5px;\\r\\n margin-bottom: 20px;\\r\\n}</style><div class=header layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span class=step>Step 3:</span> <span>Add Departments (Optional)</span></div></div><div layout=row layout-align=\\\"end center\\\"><button style=\\\"position: relative\\\" ng-click=\\\"vm.company_next_step(vm.form_step_number,\\'normal\\')\\\" class=skip-btn>SKIP DEPARTMENTS <i style=\\\"position: absolute;top: 7px;right: 10px;font-size: 30px\\\" class=material-icons></i></button></div><form name=vm.GeneralRequestForm class=light-form novalidate><div id=cww-setup-box ng-if=vm.supportCompany.is_cww><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CWW DEPARTMENTS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout=column flex=100><div class=company_name><div class=text>Department Setup</div><div class=desc>List of Departments used if Client needs groups of users with limited Party/Group iD access. Separate multiple Group and party ID\\'s by semicolon (ex. PARTY123;GROUP1234)</div></div><div class=table-scroll><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><tbody><tr><td class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Department Name<span style=color:red>*</span></label><input type=text ng-model=vm.supportCompanyEdit.cww_department_name name=cww_department_name required> <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=\\\"(vm.departmentNameExistCww.length > 0)\\\">Name Already Exist</span></md-input-container></div></td><td class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\"><label>Primary Contact</label><md-select style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0)\\\" ng-class=\\\"\\\" ng-model=vm.supportCompanyEdit.cww_default_contact name=default_contact_id aria-label=default_contact_id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></md-input-container></div></td><td class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><label class=company>BCC Override</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEdit.cww_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-25><div flex=100 class=newchips><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Party & Group ID\\'s<span style=color:red>*</span></label><md-chips class=\\\"user-chips email-chips cwwdepartment-chips toUpperCase\\\" ng-model=vm.supportCompanyEdit.cww_party_group_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"vm.addPartyIdsCww($chip,$index,\\'cwwdepartment\\',\\'cww\\',\\'party_or_group_ids\\',vm.supportCompany.portalType)\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=vm.selectedCwwPArtyIdChange(item) ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cww_party_check>Party ID / Group ID either one is mandatory</span></md-input-container></div></td><td class=td-10><div flex=100 style=\\\"min-width: 100px\\\"><md-input-container class=\\\"md-block error-hidden\\\"><md-checkbox ng-model=vm.supportCompanyEdit.is_magno aria-label=is_magno class=md-primary><span>Magno Reskin</span></md-checkbox></md-input-container></div></td><td class=td-10><div flex=100><md-button ng-click=vm.addRequestCompanyDepartmentsCww(); class=\\\"md-raised md-primary\\\" style=\\\"background-color: #fff !important; border-radius: 10px !important;box-shadow: none !important;\\r\\n border: 1px solid #68b9ea !important;margin-top: 5px !important;line-height: 30px !important;\\r\\n min-width: 120px !important\\\"><span style=\\\"color: #68b9ea;text-transform: none\\\">ADD</span></md-button></div></td></tr><tr class=\\\"user_list departmentRow{{$index}}\\\" ng-repeat=\\\"item in vm.companyDepartmentsCww\\\"><td><div flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCww)?\\'none\\':\\'\\'}}\\\">{{item.name}}</div><div flex=100 ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCww\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Department Name<span style=color:red>*</span></label><input type=text ng-model=vm.supportCompanyEditRow.cww_department_name name=cww_department_name required></md-input-container></div></td><td><div flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCww)?\\'none\\':\\'\\'}}\\\">{{item.primary_contact.email}}</div><div flex=100 ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCww\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label>Primary Contact</label><md-select style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0)\\\" ng-class=\\\"\\\" ng-model=vm.supportCompanyEditRow.cww_default_contact name=default_contact_id aria-label=default_contact_id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></md-input-container></div></td><td><div flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCww)?\\'none\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=item.bcc_override md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex=100 ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCww\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><label class=company>BCC Override</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEditRow.cww_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td><div class=company_name flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCww)?\\'none\\':\\'\\'}}\\\"><div ng-repeat=\\\"partygroup in (item.party_or_group_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(partygroup)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{partygroup}}</span></div></div><div flex=100 class=newchips ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCww\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Party & Group ID\\'s<span style=color:red>*</span></label><md-chips class=\\\"user-chips email-chips cwwdepartment-chips toUpperCase\\\" ng-model=vm.supportCompanyEditRow.cww_party_group_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"vm.addPartyIdsCww($chip,$index,\\'cwwdepartment\\',\\'cww\\',\\'party_or_group_ids\\',vm.supportCompany.portalType)\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=vm.selectedCwwPArtyIdChange(item) md-search-text=searchText md-items=\\\"item in vm.getMatchCww(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cww_party_check>Party ID / Group ID either one is mandatory</span></md-input-container></div></td><td><div flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCww)?\\'none\\':\\'\\'}}\\\"><md-checkbox ng-model=item.magno_re_skin class=md-primary aria-label=magno_re_skin ng-disabled=true><span>Magno Reskin</span></md-checkbox></div><div flex=100 ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCww\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><md-checkbox ng-model=vm.supportCompanyEditRow.is_magno aria-label=magno_re_skin class=md-primary><span>Magno Reskin</span></md-checkbox></md-input-container></div></td><td><div flex=100 class=text-center ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCww)?\\'none\\':\\'\\'}}\\\"><span class=edit-user-text ng-click=vm.editCompanyDepartmentListCww($index)>Edit</span>   <span class=remove-user-text ng-click=vm.removeCompanyDepartmentListCww($index)>Remove</span></div><div flex=100 class=\\\"text-center edit-user-text\\\" ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCww\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><span ng-click=vm.submitEditCompanyDepartmentCww($index)>Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div><div id=csl-setup-box ng-if=vm.supportCompany.is_csl><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CSL DEPARTMENTS</span></h2><span flex=auto></span></div></md-toolbar><md-card-content><div layout=column flex=100><div class=company_name><div class=text>Department Setup</div><div class=desc>List of Departments used if Client needs groups of users with limited Party/Group iD access. Separate multiple Group and party ID\\'s by semicolon (ex. PARTY123;GROUP1234)</div></div><div class=table-scroll><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><tbody><tr><td class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Department Name<span style=color:red>*</span></label><input type=text ng-model=vm.supportCompanyEdit.csl_department_name name=csl_department_name required> <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=\\\"(vm.departmentNameExistCsl.length > 0)\\\">Name Already Exist</span></md-input-container></div></td><td class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\"><label>Primary Contact</label><md-select style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0)\\\" ng-class=\\\"\\\" ng-model=vm.supportCompanyEdit.csl_default_contact name=default_contact_id aria-label=default_contact_id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></md-input-container></div></td><td class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><label class=company>BCC Override</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEdit.csl_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-25><div flex=100 class=newchips><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Customer ID\\'s<span style=color:red>*</span></label><md-chips class=\\\"user-chips email-chips csldepartment-chips toUpperCase\\\" ng-model=vm.supportCompanyEdit.csl_customer_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"vm.addPartyIdsCww($chip,$index,\\'csldepartment\\',\\'csl\\',\\'customer_id\\',vm.supportCompany.portalType)\\\" md-on-add=vm.addPartyIdsCsl(true) secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=vm.selectedCwwPArtyIdChange(item) ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCsl(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cww_party_check>Party ID / Group ID either one is mandatory</span></md-input-container></div></td><td class=td-10><div flex=100><md-button ng-click=vm.addRequestCompanyDepartmentsCsl(); class=\\\"md-raised md-primary\\\" style=\\\"background-color: #fff !important; border-radius: 10px !important;box-shadow: none !important;\\r\\n border: 1px solid #68b9ea !important;margin-top: 5px !important;line-height: 30px !important;\\r\\n min-width: 120px !important\\\"><span style=\\\"color: #68b9ea;text-transform: none\\\">ADD</span></md-button></div></td></tr><tr class=\\\"user_list departmentRow{{$index}}\\\" ng-repeat=\\\"item in vm.companyDepartmentsCsl\\\"><td><div flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCsl)?\\'none\\':\\'\\'}}\\\">{{item.name}}</div><div flex=100 ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCsl\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Department Name<span style=color:red>*</span></label><input type=text ng-model=vm.supportCompanyEditRow.csl_department_name name=csl_department_name required></md-input-container></div></td><td><div flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCsl)?\\'none\\':\\'\\'}}\\\">{{item.primary_contact.email}}</div><div flex=100 ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCsl\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label>Primary Contact</label><md-select style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0)\\\" ng-class=\\\"\\\" ng-model=vm.supportCompanyEditRow.csl_default_contact name=default_contact_id aria-label=default_contact_id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></md-input-container></div></td><td><div flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCsl)?\\'none\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=item.bcc_override md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex=100 ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCsl\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><label class=company>BCC Override</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEditRow.csl_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td><div flex=100 class=company_name ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCsl)?\\'none\\':\\'\\'}}\\\"><div ng-repeat=\\\"custcsl in (item.customer_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(custcsl)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{custcsl}}</span></div></div><div flex=100 class=newchips ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCsl\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Customer ID\\'s<span style=color:red>*</span></label><md-chips class=\\\"user-chips email-chips csldepartment-chips toUpperCase\\\" ng-model=vm.supportCompanyEditRow.csl_customer_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"vm.addPartyIdsCww($chip,$index,\\'csldepartment\\',\\'csl\\',\\'customer_id\\',vm.supportCompany.portalType)\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=vm.selectedCwwPArtyIdChange(item) md-search-text=searchText md-items=\\\"item in vm.getMatchCsl(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cww_party_check>Customer ID is mandatory</span></md-input-container></div></td><td><div flex=100 class=text-center ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCsl)?\\'none\\':\\'\\'}}\\\"><span class=edit-user-text ng-click=vm.editCompanyDepartmentListCsl($index)>Edit</span>   <span class=remove-user-text ng-click=vm.removeCompanyDepartmentListCsl($index)>Remove</span></div><div flex=100 class=\\\"text-center edit-user-text\\\" ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCsl\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><span ng-click=vm.submitEditCompanyDepartmentCsl($index)>Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div><div id=cfs-setup-box ng-if=vm.supportCompany.is_cfs><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CFS DEPARTMENTS</span></h2><span flex=auto></span></div></md-toolbar><md-card-content><div layout=column flex=100><div class=company_name><div class=text>Department Setup</div><div class=desc>List of Departments used if Client needs groups of users with limited Party/Group iD access. Separate multiple Group and party ID\\'s by semicolon (ex. PARTY123;GROUP1234)</div></div><div class=table-scroll><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><tbody><tr><td class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Department Name<span style=color:red>*</span></label><input type=text ng-model=vm.supportCompanyEdit.cfs_department_name name=cfs_department_name required> <span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=\\\"(vm.departmentNameExistCfs.length > 0)\\\">Name Already Exist</span></md-input-container></div></td><td class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\"><label>Primary Contact</label><md-select style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0)\\\" ng-class=\\\"\\\" ng-model=vm.supportCompanyEdit.cfs_default_contact name=default_contact_id aria-label=default_contact_id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></md-input-container></div></td><td class=td-15><div flex=100><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><label class=company>BCC Override</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEdit.cfs_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-25><div flex=100 class=newchips><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Customer ID\\'s<span style=color:red>*</span></label><md-chips class=\\\"user-chips email-chips cfsdepartment-chips toUpperCase\\\" ng-model=vm.supportCompanyEdit.cfs_customer_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"vm.addPartyIdsCww($chip,$index,\\'cfsdepartment\\',\\'cfs\\',\\'customer_id\\',vm.supportCompany.portalType)\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=vm.selectedCwwPArtyIdChange(item) ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCfs(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cww_party_check>Party ID / Group ID either one is mandatory</span></md-input-container></div></td><td class=td-10><div flex=100><md-button ng-click=vm.addRequestCompanyDepartmentsCfs(); class=\\\"md-raised md-primary\\\" style=\\\"background-color: #fff !important; border-radius: 10px !important;box-shadow: none !important;\\r\\n border: 1px solid #68b9ea !important;margin-top: 5px !important;line-height: 30px !important;\\r\\n min-width: 120px !important\\\"><span style=\\\"color: #68b9ea;text-transform: none\\\">ADD</span></md-button></div></td></tr><tr class=\\\"user_list departmentRow{{$index}}\\\" ng-repeat=\\\"item in vm.companyDepartmentsCfs\\\"><td><div flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCfs)?\\'none\\':\\'\\'}}\\\">{{item.name}}</div><div flex=100 ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCfs\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Department Name<span style=color:red>*</span></label><input type=text ng-model=vm.supportCompanyEditRow.cfs_department_name name=cfs_department_name required></md-input-container></div></td><td><div flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCfs)?\\'none\\':\\'\\'}}\\\">{{item.primary_contact.email}}</div><div flex=100 ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCfs\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label>Primary Contact</label><md-select style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0)\\\" ng-class=\\\"\\\" ng-model=vm.supportCompanyEditRow.cfs_default_contact name=default_contact_id aria-label=default_contact_id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=contact.id ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></md-input-container></div></td><td><div flex=100 ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCfs)?\\'none\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=item.bcc_override md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></md-input-container></div><div flex=100 ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCfs\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><label class=company>BCC Override</label><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompanyEditRow.cfs_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td><div flex=100 class=company_name ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCfs)?\\'none\\':\\'\\'}}\\\"><div ng-repeat=\\\"custcfs in (item.customer_ids)\\\" ng-class=\\\"(vm.notexistIds.includes(custcfs)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span>{{custcfs}}</span></div></div><div flex=100 class=newchips ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCfs\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Customer ID\\'s<span style=color:red>*</span></label><md-chips class=\\\"user-chips email-chips cfsdepartment-chips toUpperCase\\\" ng-model=vm.supportCompanyEditRow.cfs_customer_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"vm.addPartyIdsCww($chip,$index,\\'cfsdepartment\\',\\'cfs\\',\\'customer_id\\',vm.supportCompany.portalType)\\\" secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=vm.selectedCwwPArtyIdChange(item) md-search-text=searchText md-items=\\\"item in vm.getMatchCfs(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.cfs_party_check>Customer ID is mandatory</span></md-input-container></div></td><td><div flex=100 class=text-center ng-attr-style=\\\"display:{{(vm.editDepatmentId==$index && vm.editCheckCfs)?\\'none\\':\\'\\'}}\\\"><span class=edit-user-text ng-click=vm.editCompanyDepartmentListCfs($index)>Edit</span>   <span class=remove-user-text ng-click=vm.removeCompanyDepartmentListCfs($index)>Remove</span></div><div flex=100 class=\\\"text-center edit-user-text\\\" ng-if=\\\"vm.editDepatmentId == $index && vm.editCheckCfs\\\" ng-attr-style=\\\"display:{{vm.editDepatmentId==$index?\\'block\\':\\'\\'}}\\\"><span ng-click=vm.submitEditCompanyDepartmentCfs($index)>Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div></form>\");\n$templateCache.put(\"/app/admin/support-requests/add-company/step_two.html\",\"<style>.user_list{\\r\\n border-bottom: 1px solid #ece6e6;\\r\\n vertical-align: middle;\\r\\n clear:both;\\r\\n font-size:16px;\\r\\n color: #505457;\\r\\n padding-bottom: 10px;\\r\\n margin-bottom: 5px;\\r\\n }\\r\\n .desc{\\r\\n font-style: italic;\\r\\n color:#a8a8a8;\\r\\n font-size: .85em;\\r\\n }\\r\\n .remove-user-text{\\r\\n color:red;\\r\\n cursor:pointer;\\r\\n font-size:15px;\\r\\n font-weight: 500;\\r\\n }\\r\\n .invisible-class{\\r\\n padding: 20px 15px !important;\\r\\n margin-bottom: 10px;\\r\\n }\\r\\n .visible-class{\\r\\n background-color: #fff !important;\\r\\n padding: 20px 15px !important;\\r\\n margin-bottom: 10px;\\r\\n }</style><div class=header layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span class=step>Step 2:</span> <span>Set Contacts</span></div></div><form name=vm.GeneralRequestForm class=light-form novalidate><div layout=column layout-gt-sm=row><div flex=100 flex-gt-sm=45 layout=column class=\\\"visible-class remove-margin-responsive\\\" style=\\\"margin-right: 15px\\\"><div class=company_name><div class=text>Crane Sales Rep<span class=star>*</span></div><div class=desc>Enter the name of the Sales Rep. for this company</div></div><div layout=row><md-input-container style=\\\"max-width: 100%\\\" flex=100 flex-gt-sm=50 class=\\\"md-block error-hidden m-b\\\"><md-autocomplete style=\\\"background: none\\\" md-delay=300 ng-model=vm.supportCompany.crane_sales_rep md-selected-item-change=checkRepField(item) md-search-text=vm.searchText2 md-items=\\\"item in vm.getMatchesCompanies(\\'sales_rep\\', vm.searchText2)\\\" md-item-text=item.email md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() placeholder=\\\"\\\"><md-item-template><span md-highlight-text=vm.searchText2>{{item.email}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-input-container></div></div><div flex=100 flex-gt-sm=45 class=visible-class><div class=company_name><div class=text>Customer Type</div><div class=desc>Short Description will be placed here</div></div><div layout=row class=company_name><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=true ng-change=vm.cww_setup(vm.supportCompany.is_cww) ng-model=vm.supportCompany.is_cww aria-label=supportCompany class=md-primary><span class=text style=\\\"font-size: 15px\\\">CWW</span></md-checkbox></span><span style=\\\"margin-right: 40px;font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=true aria-label=supportCompany ng-change=vm.csl_setup(vm.supportCompany.is_csl) ng-model=vm.supportCompany.is_csl class=md-primary><span class=text style=\\\"font-size: 15px\\\">CSL</span></md-checkbox></span><span style=\\\"font-size: 15px;font-weight: 600\\\"><md-checkbox ng-disabled=true ng-change=vm.cfs_setup(vm.supportCompany.is_cfs) ng-model=vm.supportCompany.is_cfs aria-label=supportCompany class=md-primary><span class=text style=\\\"font-size: 15px\\\">CFS</span></md-checkbox></span></div></div></div><br><div id=cww-setup-box ng-if=vm.supportCompany.is_cww><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CWW CONTACTS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content><div layout=column flex=100><div class=company_name><div class=text>Operations Contacts</div><div class=desc>Add any/all Operations Team Members that will be involved with data verification and corrections</div></div><div layout=column layout-gt-sm=row><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Contact Name</label><md-autocomplete style=\\\"background: none\\\" md-delay=300 ng-model=vm.supportCompany.cww_contact_name md-selected-item-change=checkContactFieldCww(item) md-search-text=vm.searchText8 md-items=\\\"item in vm.getMatchesCompanies(\\'operation_contact\\', vm.searchText8)\\\" md-item-text=item.email md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() placeholder=\\\"\\\"><md-item-template><span md-highlight-text=vm.searchText8>{{item.email}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-input-container></div><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Office Location</label><input type=text ng-model=vm.supportCompany.cww_contact_location maxlength=3 name=cww_contact_location required></md-input-container></div><div flex=100 flex-gt-sm=20><md-button ng-click=vm.addRequestCompanyContactsCww(); class=\\\"md-raised md-primary\\\" style=\\\"background-color: #fff !important; border-radius: 10px !important;box-shadow: none !important;\\r\\n border: 2px solid #68b9ea !important;margin-top: 10px !important;margin-left: 30px;min-width: 165px !important\\\"><span style=\\\"color: #68b9ea;text-transform: none\\\">ADD CONTACT</span></md-button></div></div><div layout=column layout-gt-sm=row class=user_list ng-repeat=\\\"item in vm.companyContactsCww\\\"><div flex=100 flex-gt-sm=40>{{item.contact_name}}</div><div flex=100 flex-gt-sm=40>{{item.office_location}}</div><div flex=100 flex-gt-sm=20 class=\\\"text-center remove-user-text\\\"><span ng-click=vm.removeCompanyContactListCww($index)>Remove</span></div></div></div><div layout=column flex=100><div class=company_name><div class=text>Primary Crane Contact<span class=star>*</span></div><div class=desc>Add any/all Operations Team Members that will be involved with data verification and corrections</div></div><div layout=row><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Primary Contact Name</label><md-autocomplete style=\\\"background: none\\\" md-delay=300 ng-model=vm.supportCompany.cww_primary_contact_name md-selected-item-change=checkPrimaryContactFieldCww(item) md-search-text=vm.searchText3 md-items=\\\"item in vm.getMatchesCompanies(\\'primary_crane_contact\\', vm.searchText3)\\\" md-item-text=item.email md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() placeholder=\\\"\\\"><md-item-template><span md-highlight-text=vm.searchText3>{{item.email}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-input-container></div><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Primary Contact Phone #</label><input style=\\\"font-size:110%;color: #30353B;border-width: 0 0 1px 0;border-bottom-color: #a9a9a9\\\" ng-model=vm.supportCompany.cww_primary_contact_phone type=text ng-change=checkPrimaryPhoneField(vm.supportCompany.cww_primary_contact_phone) name=cww_primary_contact_phone ng-required=true><div ng-messages=vm.GeneralRequestForm.cww_primary_contact_phone.$error><div ng-message=required><span>Primary contact phone field required</span></div></div></md-input-container></div></div><br></div><div class=company_name><div class=text>Additional BCC Contacts<span class=star>*</span></div><div class=desc>List of emails to be BCC\\'d for all client messages sent through Portal, usually distribution lists. This should contain Internal Users only (ex: first.last@cranewww.com). Type an email address and hit enter to add it to the list.</div></div><div class=spectrum_group layout=row><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"max-width: 100%\\\"><!-- <label style=\\\"color: #b4b5b5;\\\">Additional BCC Contacts</label> --><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompany.cww_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addBccContactsCww(true) secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-search-text=searchText4 md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText4)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText4>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.bcc_check_cww>Minimum of 1 BCC Contact Required</span></md-input-container></div></md-card-content></md-card></div><div id=csl-setup-box ng-if=vm.supportCompany.is_csl><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CSL CONTACTS</span></h2><span flex=auto></span></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=48 flex-offset-gt-sm=6 style=margin-bottom:0px layout=row layout-align=\\\"end center\\\"><md-checkbox ng-disabled=vm.readAccess ng-change=vm.copyContactsCww(vm.supportCompany.copy_contacts_csl) ng-model=vm.supportCompany.copy_contacts_csl class=md-primary aria-label=readAccess></md-checkbox> <span style=\\\"min-width: 125px\\\">Copy Contacts info from CWW</span></div></div><div style=\\\"clear: both\\\"></div><div layout=column flex=100><div class=company_name><div class=text>Operations Contacts</div><div class=desc>Add any/all Operations Team Members that will be involved with data verification and corrections</div></div><div layout=column layout-gt-sm=row><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Contact Name</label><md-autocomplete style=\\\"background: none\\\" md-delay=300 ng-model=vm.supportCompany.csl_contact_name md-selected-item-change=checkContactFieldCsl(item) md-search-text=vm.searchText9 md-items=\\\"item in vm.getMatchesCompanies(\\'operation_contact\\', vm.searchText9)\\\" md-item-text=item.email md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() placeholder=\\\"\\\"><md-item-template><span md-highlight-text=vm.searchText9>{{item.email}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-input-container></div><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Office Location</label><input type=text ng-model=vm.supportCompany.csl_contact_location maxlength=3 name=csl_contact_location required></md-input-container></div><div flex=100 flex-gt-sm=20><md-button ng-click=vm.addRequestCompanyContactsCsl(); class=\\\"md-raised md-primary\\\" style=\\\"background-color: #fff !important; border-radius: 10px !important;box-shadow: none !important;\\r\\n border: 2px solid #68b9ea !important;margin-top: 10px !important;margin-left: 30px;min-width: 165px !important\\\"><span style=\\\"color: #68b9ea;text-transform: none\\\">ADD CONTACT</span></md-button></div></div><div layout=column layout-gt-sm=row class=user_list ng-repeat=\\\"item in vm.companyContactsCsl\\\"><div flex=100 flex-gt-sm=40>{{item.contact_name}}</div><div flex=100 flex-gt-sm=40>{{item.office_location}}</div><div flex=100 flex-gt-sm=20 class=\\\"text-center remove-user-text\\\"><span ng-click=vm.removeCompanyContactListCsl($index)>Remove</span></div></div></div><div layout=column flex=100><div class=company_name><div class=text>Primary Crane Contact<span class=star>*</span></div><div class=desc>Add any/all Operations Team Members that will be involved with data verification and corrections</div></div><div layout=row><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Primary Contact Name</label><md-autocomplete style=\\\"background: none\\\" md-delay=300 ng-model=vm.supportCompany.csl_primary_contact_name md-selected-item-change=checkPrimaryContactFieldCsl(item) md-search-text=vm.searchText5 md-items=\\\"item in vm.getMatchesCompanies(\\'primary_crane_contact\\', vm.searchText5)\\\" md-item-text=item.email md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() placeholder=\\\"\\\"><md-item-template><span md-highlight-text=vm.searchText5>{{item.email}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-input-container></div><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Primary Contact Phone #</label><input style=\\\"font-size:110%;color: #30353B;border-width: 0 0 1px 0;border-bottom-color: #a9a9a9\\\" ng-model=vm.supportCompany.csl_primary_contact_phone type=text ng-change=checkPrimaryPhoneField(vm.supportCompany.csl_primary_contact_phone) name=csl_primary_contact_phone ng-required=true><div ng-messages=vm.GeneralRequestForm.csl_primary_contact_phone.$error><div ng-message=required><span>Primary contact phone field required</span></div></div></md-input-container></div></div><br></div><div class=company_name><div class=text>Additional BCC Contacts<span class=star>*</span></div><div class=desc>List of emails to be BCC\\'d for all client messages sent through Portal, usually distribution lists. This should contain Internal Users only (ex: first.last@cranewww.com). Type an email address and hit enter to add it to the list.</div></div><div class=spectrum_group layout=row><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"max-width: 100%\\\"><!-- <label style=\\\"color: #b4b5b5;\\\">Additional BCC Contacts</label> --><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompany.csl_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addBccContactsCsl(true) secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-search-text=searchText6 md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText6)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText6>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.bcc_check_csl>Minimum of 1 BCC Contact Required</span></md-input-container></div></md-card-content></md-card></div><div id=cfs-setup-box ng-if=vm.supportCompany.is_cfs><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CFS CONTACTS</span></h2><span flex=auto></span></div></md-toolbar><md-card-content><div layout-gt-sm=row class=newchips><div flex-gt-sm=48 flex-offset-gt-sm=6 style=margin-bottom:0px layout=row layout-align=\\\"end center\\\"><md-checkbox ng-disabled=vm.readAccess ng-change=vm.copyContactsCfs(vm.supportCompany.copy_contacts_cfs) ng-model=vm.supportCompany.copy_contacts_cfs class=md-primary aria-label=readAccess></md-checkbox> <span style=\\\"min-width: 125px\\\">Copy Contacts info from CWW</span></div></div><div style=\\\"clear: both\\\"></div><div layout=column flex=100><div class=company_name><div class=text>Operations Contacts</div><div class=desc>Add any/all Operations Team Members that will be involved with data verification and corrections</div></div><div layout=column layout-gt-sm=row><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Contact Name</label><md-autocomplete style=\\\"background: none\\\" md-delay=300 ng-model=vm.supportCompany.cfs_contact_name md-selected-item-change=checkContactFieldCfs(item) md-search-text=vm.searchText10 md-items=\\\"item in vm.getMatchesCompanies(\\'operation_contact\\', vm.searchText10)\\\" md-item-text=item.email md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() placeholder=\\\"\\\"><md-item-template><span md-highlight-text=vm.searchText10>{{item.email}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-input-container></div><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Office Location</label><input type=text ng-model=vm.supportCompany.cfs_contact_location maxlength=3 name=cfs_contact_location required></md-input-container></div><div flex=100 flex-gt-sm=20><md-button ng-click=vm.addRequestCompanyContactsCfs(); class=\\\"md-raised md-primary\\\" style=\\\"background-color: #fff !important; border-radius: 10px !important;box-shadow: none !important;\\r\\n border: 2px solid #68b9ea !important;margin-top: 10px !important;margin-left: 30px;min-width: 165px !important\\\"><span style=\\\"color: #68b9ea;text-transform: none\\\">ADD CONTACT</span></md-button></div></div><div layout=column layout-gt-sm=row class=user_list ng-repeat=\\\"item in vm.companyContactsCfs\\\"><div flex=100 flex-gt-sm=40>{{item.contact_name}}</div><div flex=100 flex-gt-sm=40>{{item.office_location}}</div><div flex=100 flex-gt-sm=20 class=\\\"text-center remove-user-text\\\"><span ng-click=vm.removeCompanyContactListCfs($index)>Remove</span></div></div></div><div layout=column flex=100><div class=company_name><div class=text>Primary Crane Contact<span class=star>*</span></div><div class=desc>Add any/all Operations Team Members that will be involved with data verification and corrections</div></div><div layout=row><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Primary Contact Name</label><md-autocomplete style=\\\"background: none\\\" md-delay=300 ng-model=vm.supportCompany.cfs_primary_contact_name md-selected-item-change=checkPrimaryContactFieldCfs(item) md-search-text=vm.searchText7 md-items=\\\"item in vm.getMatchesCompanies(\\'primary_crane_contact\\', vm.searchText7)\\\" md-item-text=item.email md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() placeholder=\\\"\\\"><md-item-template><span md-highlight-text=vm.searchText7>{{item.email}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-input-container></div><div flex=100 flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label style=\\\"color: #b4b5b5\\\" class=company>Primary Contact Phone #</label><input style=\\\"font-size:110%;color: #30353B\\\" ng-model=vm.supportCompany.cfs_primary_contact_phone type=text ng-change=checkPrimaryPhoneField(vm.supportCompany.cfs_primary_contact_phone) name=cfs_primary_contact_phone ng-required=true><div ng-messages=vm.GeneralRequestForm.cfs_primary_contact_phone.$error><div ng-message=required><span>Primary contact phone field required</span></div></div></md-input-container></div></div><br></div><div class=company_name><div class=text>Additional BCC Contacts<span class=star>*</span></div><div class=desc>List of emails to be BCC\\'d for all client messages sent through Portal, usually distribution lists. This should contain Internal Users only (ex: first.last@cranewww.com). Type an email address and hit enter to add it to the list.</div></div><div class=spectrum_group layout=row><md-input-container class=\\\"md-block error-hidden m-b\\\" style=\\\"max-width: 100%\\\"><!-- <label style=\\\"color: #b4b5b5;\\\">Additional BCC Contacts</label> --><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.supportCompany.cfs_default_bccs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=vm.addBccContactsCfs(true) secondary-placeholder=\\\"Comma separated emails\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-search-text=searchText8 md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText8)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText8>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips><span style=\\\"color: rgb(221,44,0);font-size: 12px;line-height: 14px\\\" ng-show=vm.bcc_check_cfs>Minimum of 1 BCC Contact Required</span></md-input-container></div></md-card-content></md-card></div></form>\");\n$templateCache.put(\"/app/admin/support-requests/add-user/add-user.html\",\"<style>.md-switch-class{\\r\\n display: inline-block;margin: 0;\\r\\n }\\r\\n md-switch[disabled] .md-bar {\\r\\n background-color: #dbdbdb; /* set disabled bar color */\\r\\n }\\r\\n md-switch[disabled] .md-ink-ripple {\\r\\n background-color: #e7e7e7; /* not selected switch ripple color */\\r\\n }</style><cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\" class=support_request_addUser><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-fullscreen></div><div ng-if=!vm.failedToRetrieveData class=shell-padding id=toast-parent><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout-xs=column layout-gt-xs=row><div flex=auto><h2><span class=md-display-1>Add Users</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/supportRequests class=parent-link><span>Support Requests / <span class=color-ffffff>Add Users</span></span></a></span></div></div></div></div><md-card><!-- \\'/app/admin/lensview/lensgroup-actionbutton.html\\' --><md-card-content class=background-color-ebebeb><md-card-content class=\\\"add_user_header remove-margin-xs remove-padding-xs\\\" ng-include=\\\"\\'/app/admin/support-requests/add-user/header.html\\'\\\"></md-card-content><md-card-content class=\\\"remove-margin-xs remove-padding-xs\\\" ng-show=\\\"vm.form_step_number == 1\\\" ng-include=\\\"\\'/app/admin/support-requests/add-user/step_one.html\\'\\\"></md-card-content><md-card-content ng-if=vm.departmentAccess class=\\\"remove-margin-xs remove-padding-xs\\\" ng-show=\\\"vm.form_step_number == 2\\\" ng-include=\\\"\\'/app/admin/support-requests/add-user/add_departments.html\\'\\\"></md-card-content><md-card-content ng-if=vm.departmentAccess class=\\\"remove-margin-xs remove-padding-xs\\\" ng-show=\\\"vm.form_step_number == 3\\\" ng-include=\\\"\\'/app/admin/support-requests/add-user/step_two.html\\'\\\"></md-card-content><md-card-content ng-if=!vm.departmentAccess class=\\\"remove-margin-xs remove-padding-xs\\\" ng-show=\\\"vm.form_step_number == 2\\\" ng-include=\\\"\\'/app/admin/support-requests/add-user/step_two.html\\'\\\"></md-card-content><md-card-content ng-if=!vm.departmentAccess class=\\\"remove-margin-xs remove-padding-xs\\\" ng-show=\\\"vm.form_step_number == 3\\\" ng-include=\\\"\\'/app/admin/support-requests/add-user/step_three.html\\'\\\"></md-card-content><md-card-content ng-if=vm.departmentAccess class=\\\"remove-margin-xs remove-padding-xs\\\" ng-show=\\\"vm.form_step_number == 4\\\" ng-include=\\\"\\'/app/admin/support-requests/add-user/step_three.html\\'\\\"></md-card-content><md-card-content ng-include=\\\"\\'/app/admin/support-requests/add-user/footer.html\\'\\\" class=\\\"add_user_footer remove-margin-xs remove-padding-xs\\\" layout=column layout-gt-xs=row layout-align=\\\"space-around center\\\" layout-align-gt-xs=\\\"space-between start\\\"></md-card-content></md-card-content><md-card-content style=\\\"padding-top: 0px\\\" ng-include=\\\"\\'/app/admin/support-requests/add-user/skip_part.html\\'\\\" class=add_user_footer></md-card-content></md-card></div><div ng-if=vm.failedToRetrieveData class=\\\"m-t m-b\\\" layout=row layout-align=\\\"center center\\\"><h2><span translate=\\\"Failed to retrive user details with error\\\"></span> {{vm.failedToRetrieveData}}</h2></div></cva-shell>\");\n$templateCache.put(\"/app/admin/support-requests/add-user/add_departments.html\",\"<style type=text/css>.override-border{\\r\\n font-size: 13px;color: black;\\r\\n font-weight: 600;\\r\\n /*border-bottom: 1px solid #d1d1d1;*/\\r\\n padding-bottom: 10px;\\r\\n }\\r\\n .md-chip-input-container{\\r\\n width: 100% !important;\\r\\n }\\r\\n md-chips.md-default-theme .md-chip, md-chips .md-chip {\\r\\n background: #d1d1d1;\\r\\n color: rgb(66,66,66);\\r\\n}\\r\\n.md-chips .md-chip{\\r\\n border-radius: 6px;\\r\\n}</style><div class=header><div class=header_text><span class=step>Step 2:</span> <span>Add Departments (Optional)</span></div></div><div id=cww-setup-box ng-if=vm.cwwShowData><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CWW DEPARTMENTS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content class=\\\"background-fff user_accounts\\\"><div class=text>Assign Deparments per User Account</div><div class=desc>List of Departments used if Client needs groups of users with limited Party/Group ID access. Seperate multiple Group and party ID\\'s by semicolon (ex. PARTY1234;GROUP1234)</div><div class=user_add_div><div class=\\\"table-scroll user_add_list light-form\\\"><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-20 style=\\\"vertical-align: top\\\"></th><th class=td-20 style=\\\"vertical-align: top\\\"></th><th class=td-20 style=\\\"vertical-align: top\\\"></th><th class=td-20 style=\\\"vertical-align: top\\\"></th></tr></thead><tbody><tr><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ASSIGNED DEPARTMENT</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>DEPARMENT PARTY & GROUP ID\\'s</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ACTIONS</div></td></tr><tr ng-repeat=\\\"user_lists in vm.user_list.user_accounts\\\" ng-hide=\\\"(user_lists.cww_access == false)\\\" class=\\\"user_list user_list2\\\"><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserId != $index\\\"><span ng-if=user_lists.cww_overrides.department.name>{{user_lists.cww_overrides.department.name}}</span> <span ng-if=!user_lists.cww_overrides.department.name><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserId == $index\\\"><label class=line-height-15px>Assign Department</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=user_lists.cww_overrides.department.department_id md-on-open=vm.onSelectOpen() ng-change=vm.addDepartmentUser($index,user_lists.cww_overrides.department.department_id) md-on-close=vm.onSelectClose()><md-option ng-value={{department.id}} ng-repeat=\\\"department in vm.cwwDeparments\\\">{{ department.name }}</md-option></md-select></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\">{{user_lists.first_name}} {{user_lists.last_name}}</td><td class=td-25 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserId != $index\\\"><span ng-if=\\\"user_lists.cww_overrides.department.party_id_names_combined.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.cww_overrides.department.party_id_names_combined md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.cww_overrides.department.party_id_names_combined.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserId == $index\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.cww_overrides.department.party_id_names_combined md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></div></td><td class=\\\"td-20 remove-user-text\\\" style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div flex=100 ng-if=\\\"vm.editUserId != $index\\\"><span class=edit-user-text ng-click=vm.editUserListRow($index)>Edit</span>    <span class=remove-user-text ng-click=vm.removeDepartmentListStep2($index)>Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserId == $index\\\"><span ng-click=vm.completeUserListRowStep2($index)>Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div><div id=csl-setup-box ng-if=vm.cslShowData><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CSL DEPARTMENTS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content class=\\\"background-fff user_accounts\\\"><div class=text>Assign Deparments per User Account</div><div class=desc>List of Departments used if Client needs groups of users with limited Party/Group ID access. Seperate multiple Group and party ID\\'s by semicolon (ex. PARTY1234;GROUP1234)</div><div class=user_add_div><div class=\\\"table-scroll user_add_list light-form\\\"><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-20 style=\\\"vertical-align: top\\\"></th><th class=td-20 style=\\\"vertical-align: top\\\"></th><th class=td-20 style=\\\"vertical-align: top\\\"></th><th class=td-20 style=\\\"vertical-align: top\\\"></th></tr></thead><tbody><tr><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ASSIGNED DEPARTMENT</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>DEPARTMENT CUSTOMER ID\\'S</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ACTIONS</div></td></tr><tr ng-repeat=\\\"user_lists in vm.user_list.user_accounts\\\" ng-hide=\\\"(user_lists.csl_access == false)\\\" class=\\\"user_list user_list2\\\"><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCsl != $index\\\"><span ng-if=user_lists.csl_overrides.department.name>{{user_lists.csl_overrides.department.name}}</span> <span ng-if=!user_lists.csl_overrides.department.name><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCsl == $index\\\"><label class=line-height-15px>Assign Department</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=user_lists.csl_overrides.department.department_id md-on-open=vm.onSelectOpen() ng-change=vm.addDepartmentUserCsl($index,user_lists.csl_overrides.department.department_id) md-on-close=vm.onSelectClose()><md-option ng-value={{department.id}} ng-repeat=\\\"department in vm.cslDeparments\\\">{{ department.name }}</md-option></md-select></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\">{{user_lists.first_name}} {{user_lists.last_name}}</td><td class=td-25 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCsl != $index\\\"><span ng-if=\\\"user_lists.csl_overrides.department.party_id_names.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.csl_overrides.department.party_id_names md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.csl_overrides.department.party_id_names.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCsl == $index\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.csl_overrides.department.party_id_names md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></div></td><td class=\\\"td-20 remove-user-text\\\" style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div flex=100 ng-if=\\\"vm.editUserIdCsl != $index\\\"><span class=edit-user-text ng-click=vm.editUserListRowCsl($index)>Edit</span>    <span class=remove-user-text ng-click=vm.removeDepartmentListStep2Csl($index)>Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserIdCsl == $index\\\"><span ng-click=vm.completeUserListRowStep2Csl($index)>Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div><div id=cfs-setup-box ng-if=vm.cfsShowData><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CFS DEPARTMENTS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content class=\\\"background-fff user_accounts\\\"><div class=text>Assign Deparments per User Account</div><div class=desc>List of Departments used if Client needs groups of users with limited Party/Group ID access. Seperate multiple Group and party ID\\'s by semicolon (ex. PARTY1234;GROUP1234)</div><div class=user_add_div><div class=\\\"table-scroll user_add_list light-form\\\"><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-20 style=\\\"vertical-align: top\\\"></th><th class=td-20 style=\\\"vertical-align: top\\\"></th><th class=td-20 style=\\\"vertical-align: top\\\"></th><th class=td-20 style=\\\"vertical-align: top\\\"></th></tr></thead><tbody><tr><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ASSIGNED DEPARTMENT CONTACT OVERRIDE</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>DEPARTMENT CUSTOMER ID\\'S</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ACTIONS</div></td></tr><tr ng-repeat=\\\"user_lists in vm.user_list.user_accounts\\\" ng-hide=\\\"(user_lists.cfs_access == false)\\\" class=\\\"user_list user_list2\\\"><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCfs != $index\\\"><span ng-if=user_lists.cfs_overrides.department.name>{{user_lists.cfs_overrides.department.name}}</span> <span ng-if=!user_lists.cfs_overrides.department.name><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCfs == $index\\\"><label class=line-height-15px>Assign Department</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=user_lists.cfs_overrides.department.department_id md-on-open=vm.onSelectOpen() ng-change=vm.addDepartmentUserCfs($index,user_lists.cfs_overrides.department.department_id) md-on-close=vm.onSelectClose()><md-option ng-value={{department.id}} ng-repeat=\\\"department in vm.cfsDeparments\\\">{{ department.name }}</md-option></md-select></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\">{{user_lists.first_name}} {{user_lists.last_name}}</td><td class=td-25 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCfs != $index\\\"><span ng-if=\\\"user_lists.cfs_overrides.department.party_id_names.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.cfs_overrides.department.party_id_names md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.cfs_overrides.department.party_id_names.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCfs == $index\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.cfs_overrides.department.party_id_names md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></div></td><td class=\\\"td-20 remove-user-text\\\" style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div flex=100 ng-if=\\\"vm.editUserIdCfs != $index\\\"><span class=edit-user-text ng-click=vm.editUserListRowCfs($index)>Edit</span>  <span class=remove-user-text ng-click=vm.removeDepartmentListStep2Cfs($index)>Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserIdCfs == $index\\\"><span ng-click=vm.completeUserListRowStep2Cfs($index)>Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/admin/support-requests/add-user/footer.html\",\"<button ng-if=\\\"vm.form_step_number == 1\\\" class=add_user_cancel_btn ng-click=vm.redirectToDashboard()>CANCEL</button> <button ng-if=!vm.departmentAccess ng-show=\\\"vm.form_step_number != 1 && vm.form_step_number != 3\\\" class=add_user_prev_btn ng-click=vm.prev_step(vm.form_step_number) style=\\\"position: relative\\\"><i style=\\\"position: absolute;top: 7px;left: 10px\\\" class=material-icons></i> Previous Step</button> <button ng-if=vm.departmentAccess ng-show=\\\"vm.form_step_number != 1 && vm.form_step_number != 4\\\" class=add_user_prev_btn ng-click=vm.prev_step(vm.form_step_number) style=\\\"position: relative\\\"><i style=\\\"position: absolute;top: 7px;left: 10px\\\" class=material-icons></i> Previous Step</button> <button ng-if=!vm.departmentAccess ng-show=\\\"vm.form_step_number == 3\\\" class=add_user_prev_btn ng-click=vm.prev_step(vm.form_step_number) style=\\\"position: relative\\\"><i style=\\\"position: absolute;top: 7px;left: 10px\\\" class=material-icons></i> EDIT</button> <button ng-if=vm.departmentAccess ng-show=\\\"vm.form_step_number == 4\\\" class=add_user_prev_btn ng-click=vm.prev_step(vm.form_step_number) style=\\\"position: relative\\\"><i style=\\\"position: absolute;top: 7px;left: 10px\\\" class=material-icons></i> EDIT</button> <button ng-if=!vm.departmentAccess style=\\\"border: 0px solid #ece6e6;color: #a9a9a9;font-size: 16px;font-weight: 600;background-color:transparent\\\" class=add_user_cancel_btn>Step {{vm.form_step_number}} of 3</button> <button ng-if=vm.departmentAccess style=\\\"border: 0px solid #ece6e6;color: #a9a9a9;font-size: 16px;font-weight: 600;background-color:transparent\\\" class=add_user_cancel_btn>Step {{vm.form_step_number}} of 4</button> <button ng-if=!vm.departmentAccess ng-show=\\\"vm.form_step_number == 1\\\" class=add_user_next_btn ng-click=vm.next_step(vm.form_step_number) style=\\\"position: relative\\\">SET OVERRIDES <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=vm.departmentAccess ng-show=\\\"vm.form_step_number == 1\\\" class=add_user_next_btn ng-click=vm.next_step(vm.form_step_number) style=\\\"position: relative\\\">ADD DEPARTMENTS <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=vm.departmentAccess ng-show=\\\"vm.form_step_number == 2\\\" class=add_user_next_btn ng-click=vm.next_step(vm.form_step_number) style=\\\"position: relative\\\">SET OVERRIDES <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=!vm.departmentAccess ng-show=\\\"vm.form_step_number == 2\\\" class=add_user_next_btn ng-click=vm.next_step(vm.form_step_number) style=\\\"position: relative\\\">REVIEW <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=vm.departmentAccess ng-show=\\\"vm.form_step_number == 3\\\" class=add_user_next_btn ng-click=vm.next_step(vm.form_step_number) style=\\\"position: relative\\\">REVIEW <i style=\\\"position: absolute;top: 10px;right: 10px\\\" class=material-icons></i></button> <button ng-if=!vm.departmentAccess ng-show=\\\"vm.form_step_number == 3\\\" class=add_user_submit_btn ng-click=vm.create_new_account()>Submit</button> <button ng-if=vm.departmentAccess ng-show=\\\"vm.form_step_number == 4\\\" class=add_user_submit_btn ng-click=vm.create_new_account()>Submit</button>\");\n$templateCache.put(\"/app/admin/support-requests/add-user/header.html\",\"<div class=stepIcons layout=row layout-align=\\\"space-between center\\\"><div class=icon_div ng-class=\\\"(vm.form_step_number >= 1)?\\'highlight\\':\\'\\'\\\" layout=row layout-align=\\\"center center\\\"><i class=material-icons></i></div><div ng-if=vm.departmentAccess class=icon_div layout=row layout-align=\\\"center center\\\" ng-class=\\\"(vm.form_step_number >= 2)?\\'highlight\\':\\'\\'\\\"><i class=material-icons></i></div><div ng-if=!vm.departmentAccess class=icon_div ng-class=\\\"(vm.form_step_number >= 2)?\\'highlight\\':\\'\\'\\\" layout=row layout-align=\\\"center center\\\"><i class=material-icons>swap_vert</i></div><div ng-if=vm.departmentAccess class=icon_div ng-class=\\\"(vm.form_step_number >= 3)?\\'highlight\\':\\'\\'\\\" layout=row layout-align=\\\"center center\\\"><i class=material-icons>swap_vert</i></div><div ng-if=!vm.departmentAccess class=icon_div ng-class=\\\"(vm.form_step_number == 3)?\\'highlight\\':\\'\\'\\\" layout=row layout-align=\\\"center center\\\"><i class=material-icons></i></div><div ng-if=vm.departmentAccess class=icon_div ng-class=\\\"(vm.form_step_number == 4)?\\'highlight\\':\\'\\'\\\" layout=row layout-align=\\\"center center\\\"><i class=material-icons></i></div><span class=vertical_line></span> <span ng-if=!vm.departmentAccess class=highlighted_vertical_line ng-attr-style=\\\"width: calc({{(vm.form_step_number != 1?(vm.form_step_number == 2?50:100):0)}}% - 10px);\\\"></span> <span ng-if=vm.departmentAccess class=highlighted_vertical_line ng-attr-style=\\\"width: calc({{(vm.form_step_number != 1?(vm.form_step_number == 2?33.333:(vm.form_step_number == 3?66.999:(vm.form_step_number == 4?100:0))):0)}}% - 10px);\\\"></span><!-- ng-attr-style=\\\"width:{{(vm.form_step_number != 1?(vm.form_step_number == 2?50:100):\\'0\\')}}%;\\\" --></div>\");\n$templateCache.put(\"/app/admin/support-requests/add-user/import-user.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2></h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content id=hello class=\\\"light-content md-padding\\\" loadmask=!vm.file.isUploading><form novalidate class=\\\"form-horizontal light-form\\\" name=vm.ImportUsersForm><section layout=row layout-align=center><div ngf-drop ngf-select ng-model=vm.file class=drop-box ngf-drop-available=dropSupported ngf-drag-over-class=\\\"{pattern: \\'.csv\\', accept:\\'dragover\\', reject:\\'dragover\\', delay:100}\\\" ngf-multiple=false ngf-allow-dir=false accept=.csv ngf-pattern=\\\"\\'.csv\\'\\\" style=\\\"color: gray\\\">Drop CSV\\'s or Click to Upload</div></section><div ngf-no-file-drop>File Drag/Drop is not supported for this browser</div><section layout=row layout-align=center><md-button class=\\\"md-raised md-primary\\\" ng-click=vm.downloadCSVTemplate()>Download XLSX Template</md-button></section><p style=text-align:center ng-if=vm.isSafari()><span>Press \\\"CMD + s\\\" on the opened document to save and name it as template.csv</span></p></form></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/add-user/skip_part.html\",\"<style type=text/css>.skip-text{\\r\\n\tcolor: #45AFE3;\\r\\n\tfont-size: 13px;\\r\\n\tfont-weight: 600;\\r\\n\tpadding-right: 85px;\\r\\n\tcursor: pointer;\\r\\n margin-top: -55px;\\r\\n\t}\\r\\n .skip-text1{\\r\\n color: #45AFE3;\\r\\n font-size: 13px;\\r\\n font-weight: 600;\\r\\n padding-right: 20px;\\r\\n cursor: pointer;\\r\\n margin-top: -20px;\\r\\n }\\r\\n.desc{\\r\\n font-style: italic;\\r\\n color:#a8a8a8;\\r\\n font-size: .85em;\\r\\n }</style><div layout=row layout-align=\\\"end center\\\"><div ng-if=!vm.departmentAccess class=skip-text ng-show=\\\"vm.form_step_number == 1\\\"><span style=\\\"position: relative;bottom: 80px;left: 155px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip Set Overrides<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_override_step(vm.form_step_number,\\'override\\')\\\">Skip Set Overrides</span></div><div ng-if=vm.departmentAccess class=skip-text ng-show=\\\"vm.form_step_number == 1\\\"><span style=\\\"position: relative;bottom: 80px;left: 155px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skipadding departments<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_override_step(vm.form_step_number,\\'departments\\')\\\">Skip Departments</span></div><div ng-if=vm.departmentAccess class=skip-text ng-show=\\\"vm.form_step_number == 2\\\"><span style=\\\"position: relative;bottom: 80px;left: 155px;\\r\\n font-weight: normal;font-style: italic;color:#a8a8a8;font-size: .85em\\\">(You may skip Set Overrides<br>and include them in the future)</span> <span ng-click=\\\"vm.skip_override_step(vm.form_step_number,\\'override\\')\\\">Skip Set Overrides</span></div></div>\");\n$templateCache.put(\"/app/admin/support-requests/add-user/step_one.html\",\"<style type=text/css>.company-info{\\r\\n padding-left: 100px;\\r\\n text-transform: uppercase;\\r\\n font-weight: 700;\\r\\n }</style><div loadmask=!vm.loadingUserData loadmask-fixed-center=true class=loadmask-light></div><div class=header><div class=header_text><span class=step>Step 1:</span> <span>Add New Accounts</span></div><div ng-if=vm.user_list.company.id class=import_user_btn layout=row layout-align-gt-sm=\\\"end center\\\"><button ng-click=vm.showImportUserPopup()><i class=material-icons style=\\\"font-size: 15px\\\">open_in_new</i>    <span>IMPORT USERS</span></button></div></div><section layout-gt-sm=row layout-align-gt-sm=\\\"space-between stretch\\\" style=margin-bottom:25px><article flex=100 class=\\\"company_name_blk remove-margin-responsive\\\" style=margin-top:5px><div class=company_name>{{vm.departmentAccess}}<div class=text>Company Name <span class=star>*</span></div><div class=desc>Select an existing company you wish to add users for</div><div class=spectrum_group layout=row><md-input-container flex=50 class=\\\"md-block error-hidden m-b\\\"><md-autocomplete class=hide_placeholder placeholder=Company md-no-cache=true ng-model=vm.user_list.company.name md-selected-item-change=vm.addUserCompanySelect(item) md-search-text=vm.searchUserCompany md-items=\\\"item in vm.getMatchesCompanies(\\'company_detail\\', vm.searchUserCompany)\\\" md-item-text=item.name md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-item-template><span md-highlight-text=vm.searchUserCompany>{{item.name}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-input-container><div class=company-info flex=50 ng-if=vm.user_list.company.id><a target=_blank ng-href=/companies/view/{{vm.user_list.company.id}}>View Company Info</a></div></div></div></article></section><div id=cww-setup-box><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">USER ACCOUNTS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content class=\\\"background-fff user_accounts\\\"><div class=desc>Add all details for the new user accounts</div><div class=user_add_div><div class=\\\"table-scroll user_add_list\\\"><form class=\\\"user_add_list light-form\\\" name=user_list_add_form style=width:100% novalidate><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-15><md-input-container class=\\\"md-block error-hidden m-b\\\"><input type=text flex=100 ng-model=vm.add_user.first_name id=vm.add_user.first_name placeholder=\\\"First Name\\\" name=vm.add_user.first_name required></md-input-container></th><th class=td-15><md-input-container class=\\\"md-block error-hidden\\\"><input type=text ng-model=vm.add_user.last_name id=vm.add_user.last_name name=vm.add_user.last_name placeholder=\\\"Last Name\\\" required></md-input-container></th><th class=td-20><md-input-container class=\\\"md-block error-hidden\\\"><input type=email ng-model=vm.add_user.email id=vm.add_user.email placeholder=Email required></md-input-container></th><th class=td-15 colspan=3><div flex=100 layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.addUserRow(user_list_add_form,true); class=\\\"md-raised md-primary\\\" style=\\\"background-color: #fff !important; border-radius: 10px !important;box-shadow: none !important;\\r\\n border: 1px solid #68b9ea !important;margin-top: 5px !important;line-height: 15px !important;\\r\\n min-width: 120px !important\\\"><span style=\\\"color: #68b9ea;text-transform: none\\\">ADD</span></md-button></div></th></tr></thead><thead class=header-table><tr><th class=td-5><div class=label style=\\\"font-size: 13px;color: black;font-weight: 600\\\">FIRST NAME</div></th><th class=td-5><div class=label style=\\\"font-size: 13px;color: black;font-weight: 600\\\">LAST NAME</div></th><th class=td-10><div class=label style=\\\"font-size: 13px;color: black;font-weight: 600\\\">EMAIL</div></th><th class=td-20 ng-if=\\\"vm.user_list.company.access_type.includes(\\'classic\\')\\\"><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px;color: black;font-weight: 600\\\">Pathway</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:75px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">ACCESS</span></div><div style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">ROLE</span></div></div></div></th><th class=td-20 style=\\\"height: 70px\\\"><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px;color: black;font-weight: 600\\\">CUSTOMER TYPE</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:75px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100 ng-if=\\\"vm.user_list.company.customer_types.includes(\\'cww\\')\\\"><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">CWW</span></div><div style=\\\"width:75px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100 ng-if=\\\"vm.user_list.company.customer_types.includes(\\'csl\\')\\\"><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">CSL</span></div><div style=\\\"width:75px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100 ng-if=\\\"vm.user_list.company.customer_types.includes(\\'cfs\\')\\\"><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">CFS</span></div><div ng-if=\\\"vm.user_list.company.portal_type == \\'customer\\' && vm.user_list.company.access_type.includes(\\'portal\\') \\\" style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px;color: black;font-weight: 600\\\">FINANCIAL</span></div></div></div></th><!-- <th class=\\\"td-10\\\"><div class=\\\"label\\\">USER ROLE</div></th> --><th class=td-10><div class=label style=\\\"font-size: 13px;color: black;font-weight: 600\\\">ACTIONS</div></th></tr></thead><tbody><tr ng-repeat=\\\"user_list in vm.user_list.user_accounts\\\" class=user_list><td class=td-20><div ng-if=\\\"vm.editUserId != $index\\\">{{user_list.first_name}}</div><div flex=100 ng-if=\\\"vm.editUserId == $index\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>First Name</label><input type=text ng-model=user_list.first_name></md-input-container></div></td><td class=td-20><div ng-if=\\\"vm.editUserId != $index\\\">{{user_list.last_name}}</div><div flex=100 ng-if=\\\"vm.editUserId == $index\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Last Name</label><input type=text ng-model=user_list.last_name></md-input-container></div></td><td class=td-20><div ng-if=\\\"vm.editUserId != $index\\\">{{user_list.email}}</div><div flex=100 ng-if=\\\"vm.editUserId == $index\\\"><md-input-container class=\\\"md-block error-hidden\\\"><label class=company>Email</label><input type=text ng-model=user_list.email></md-input-container></div></td><td style=\\\"height: 70px\\\" ng-if=\\\"vm.user_list.company.access_type.includes(\\'classic\\')\\\"><span><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"padding: 0;width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=\\\"((vm.editUserId != $index)?true:false) || (!vm.accessToggleUser)\\\" style=\\\"margin: 0\\\" class=md-switch-class ng-model=user_list.classic_access></md-switch></div><!--<div style=\\\"padding: 0;width:75px;text-align: center;\\\" layout-align=\\\"start center\\\" flex=\\\"100\\\">\\r\\n <md-switch ng-disabled=\\\"(vm.editUserId != $index)?true:false\\\" style=\\\"margin: 0;\\\" class=\\\"md-switch-class\\\" ng-model=\\\"item.classic_access\\\">\\r\\n </md-switch>\\r\\n </div>--> {{vm.user_list.classic_role}}<div ng-if=\\\"vm.editUserId != $index\\\" style=\\\"padding: 0;width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span ng-if=\\\"user_list.classic_role == \\'customer_classic\\'\\\">Customer</span> <span ng-if=\\\"user_list.classic_role == \\'classic_customer_ops\\'\\\">Customer Ops</span></div><div ng-if=\\\"vm.editUserId == $index && vm.user_list.company.portal_type != \\'customer\\'\\\" style=\\\"padding: 0;width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span>{{user_list.classic_role}}</span></div><div ng-if=\\\"vm.editUserId == $index && vm.user_list.company.portal_type == \\'customer\\'\\\" style=\\\"padding: 0;width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-input-container style=\\\"width: 90%\\\" class=\\\"md-block error-hidden\\\"><md-select ng-if=\\\"vm.user_list.company.portal_type == \\'customer\\'\\\" ng-model=user_list.classic_role md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=role.key ng-repeat=\\\"role in vm.customerClassic\\\">{{role.display}}</md-option></md-select><span ng-if=\\\"user_list.company.portal_type == \\'consignee\\'\\\">Consignee</span> <span ng-if=\\\"user_list.company.portal_type == \\'shipper\\'\\\">Shipper</span></md-input-container></div></div></span></td><td style=\\\"height: 70px\\\"><span><div layout=row layout-align=\\\"space-between center\\\"><!-- CWW md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100 ng-if=\\\"vm.user_list.company.customer_types.includes(\\'cww\\')\\\"><md-switch ng-disabled=\\\"((vm.editUserId != $index)?true:false) || (!vm.accessToggleUser)\\\" style=\\\"margin: 0\\\" class=md-switch-class ng-model=user_list.cww_access></md-switch></div><!-- CSL md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100 ng-if=\\\"vm.user_list.company.customer_types.includes(\\'csl\\')\\\"><md-switch ng-disabled=\\\"(vm.editUserId != $index)?true:false\\\" style=\\\"margin: 0\\\" class=md-switch-class ng-model=user_list.csl_access></md-switch></div><!-- CFS md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100 ng-if=\\\"vm.user_list.company.customer_types.includes(\\'cfs\\')\\\"><md-switch ng-disabled=\\\"(vm.editUserId != $index)?true:false\\\" style=\\\"margin: 0\\\" class=md-switch-class ng-model=user_list.cfs_access></md-switch></div><!-- FINACIAL md-switch --><div ng-if=\\\"vm.user_list.company.portal_type == \\'customer\\' && vm.user_list.company.access_type.includes(\\'portal\\')\\\" style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><md-switch ng-disabled=\\\"(vm.editUserId != $index)?true:false\\\" style=\\\"margin: 0\\\" class=md-switch-class ng-model=user_list.financial></md-switch></div></div></span></td><!--<td class=\\\"td-20\\\">\\r\\n <span ng-repeat=\\\"dept in user_list.departments\\\">{{dept.name}}<span ng-if=\\\"!$last\\\">,</span>\\r\\n </span>\\r\\n </td>--><td class=\\\"td-20 remove-user-text\\\"><div flex=100 ng-if=\\\"vm.editUserId != $index\\\"><span class=edit-user-text ng-click=vm.editUserListRow($index)>Edit</span>  <span class=remove-user-text ng-click=vm.removeUserList($index)>Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserId == $index\\\"><span ng-click=vm.completeUserListRow($index)>Done</span></div></td></tr></tbody></table></form></div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/admin/support-requests/add-user/step_three.html\",\"<div class=header><div class=header_text><span ng-if=!vm.departmentAccess class=step>Step 3:</span> <span ng-if=vm.departmentAccess class=step>Step 4:</span> <span>Review and Submit</span></div></div><section layout-gt-sm=row layout-align-gt-sm=\\\"space-between stretch\\\" style=margin-bottom:25px><article flex=100 class=\\\"company_name_blk remove-margin-responsive\\\" style=margin-top:5px><div class=company_name><div class=text>Company Name <span class=star>*</span></div><div class=desc>Select an existing company you want to add users for</div><div class=spectrum_group layout=row style=\\\"min-height: 50px\\\">{{vm.user_list.company.name}}<div class=company-info flex=50 ng-if=vm.user_list.company.id><a style=\\\"float: right\\\" target=_blank ng-href=/companies/view/{{vm.user_list.company.id}}>View Company Info</a></div></div></div></article></section><div id=cww-setup-box ng-if=vm.user_list.company.is_cww><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">ACCOUNTS</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content class=\\\"background-fff user_accounts\\\"><div class=user_add_div style=\\\"padding-left: 50px\\\"><div class=table-scroll><table class=table-static cellspacing=0 border=0 style=\\\"width: 95%; min-width:800px\\\"><thead class=header-table><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-5><div class=label>FIRST NAME</div></th><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-5><div class=label>LAST NAME</div></th><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-10><div class=label>EMAIL</div></th><th ng-if=vm.departmentAccess style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-10><div class=label>DEPARTMENT</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px\\\">Pathway</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:35px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">ACCESS</span></div><div style=\\\"width:55px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">ROLE</span></div></div></div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px\\\">CUSTOMER TYPE</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CWW</span></div><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CSL</span></div><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CFS</span></div><div style=\\\"width:50px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">FINANCIAL</span></div></div></div></th><th style=\\\"text-align: center;padding-left: 0;font-size: 13px\\\" class=td-10><div class=label>OVERRIDES</div></th></thead><tbody><tr class=user_list ng-repeat=\\\"item in vm.user_list.user_accounts\\\"><td style=\\\"height: 70px\\\"><div flex=100>{{item.first_name}}</div></td><td style=\\\"height: 70px\\\"><div flex=100>{{item.last_name}}</div></td><td style=\\\"height: 70px\\\"><div flex=100>{{item.email}}</div></td><td ng-if=vm.departmentAccess style=\\\"height: 70px\\\"><div flex=100><span class=label style=\\\"font-weight: 600;font-size: 13px\\\" flex=100 layout=row layout-align=\\\"center center\\\"><span ng-if=\\\"(item.cww_overrides.department.id || item.csl_overrides.department.id || item.cfs_overrides.department.id)\\\" class=override ng-click=vm.display_departments(item)>{{ (item.cww_overrides.department.id ? 1 : 0) + (item.csl_overrides.department.id ? 1 : 0) + (item.cfs_overrides.department.id ? 1 : 0) }} <span ng-if=\\\"((item.cww_overrides.department.id ? 1 : 0) + (item.csl_overrides.department.id ? 1 : 0) + \\r\\n (item.cfs_overrides.department.id ? 1 : 0) == 1)\\\">Department</span> <span ng-if=\\\"((item.cww_overrides.department.id ? 1 : 0) + (item.csl_overrides.department.id ? 1 : 0) + \\r\\n (item.cfs_overrides.department.id ? 1 : 0) > 1)\\\">Departments</span> </span><span ng-if=\\\"(!item.cww_overrides.department.id && !item.csl_overrides.department.id && !item.cfs_overrides.department.id)\\\" class=no_override>No Departments</span></span></div></td><td style=\\\"height: 70px\\\"><div layout=column class=\\\"label cust_type\\\"><div layout=row layout-align=\\\"space-between center\\\" style=\\\"padding: 0px\\\"><div style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.classic_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.classic_access class=material-icons style=\\\"color: red\\\">clear</i></div><div style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span flex=100><span ng-if=\\\"(item.classic_role == \\'customer_classic\\')\\\">Customer</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_ops\\')\\\">Customer Ops</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_consignee\\')\\\">Consignee</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_shipper\\')\\\">Shipper</span> <span ng-if=\\\"(item.classic_role == \\'\\')\\\">N/A</span></span></div></div></div></td><td style=\\\"height: 70px\\\"><span><div layout=row layout-align=\\\"space-between center\\\"><!-- CWW md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.cww_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.cww_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- CSL md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.csl_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.csl_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- CFS md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.cfs_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.cfs_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- FINACIAL md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.financial class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.financial class=material-icons style=\\\"color: red\\\">clear</i></div></div></span></td><td style=\\\"height: 70px\\\"><div flex=100><span class=label style=\\\"font-weight: 600;font-size: 13px\\\" flex=100 layout=row layout-align=\\\"center center\\\"><span ng-if=\\\"(item.cww_overrides.primary_contact.id || item.cww_overrides.bccs.length || item.cww_overrides.party_group_ids.length || item.csl_overrides.primary_contact.id || item.csl_overrides.bccs.length || item.csl_overrides.customer_ids.length || item.cfs_overrides.primary_contact.id || item.cfs_overrides.bccs.length || item.cfs_overrides.customer_ids.length)\\\" class=override ng-click=vm.display_overrides(item)>{{ (item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length}} <span ng-if=\\\"((item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length == 1)\\\">Override</span> <span ng-if=\\\"((item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length > 1)\\\">Overrides</span> </span><span ng-if=\\\"(!item.cww_overrides.primary_contact.id && !item.cww_overrides.bccs.length && !item.cww_overrides.party_group_ids.length && !item.csl_overrides.primary_contact.id && !item.csl_overrides.bccs.length && !item.csl_overrides.customer_ids.length && !item.cfs_overrides.primary_contact.id && !item.cfs_overrides.bccs.length && !item.cfs_overrides.customer_ids.length)\\\" class=no_override>No overrides</span></span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/admin/support-requests/add-user/step_two.html\",\"<style type=text/css>.override-border{\\r\\n font-size: 13px;color: black;\\r\\n font-weight: 600;border-bottom: 1px solid #d1d1d1;\\r\\n padding-bottom: 10px;\\r\\n }\\r\\n .md-chip-input-container{\\r\\n width: 100% !important;\\r\\n }</style><div class=header><div class=header_text><span ng-if=!vm.departmentAccess class=step>Step 2:</span> <span ng-if=vm.departmentAccess class=step>Step 3:</span> <span>Set Account Overrides (Optional)</span></div></div><section layout-gt-sm=row layout-align-gt-sm=\\\"space-between stretch\\\" style=margin-bottom:25px><article flex=100 class=\\\"company_name_blk remove-margin-responsive\\\" style=\\\"height: 125px\\\"><div class=company_name><div class=text>Company Name <span class=star>*</span></div><div class=desc>Select an existing company you want to add users for</div><div class=spectrum_group layout=row style=\\\"min-height: 50px\\\">{{vm.user_list.company.name}}<div class=company-info flex=50 ng-if=vm.user_list.company.id><a style=\\\"float: right\\\" target=_blank ng-href=/companies/view/{{vm.user_list.company.id}}>View Company Info</a></div></div></div></article></section><div id=cww-setup-box ng-if=vm.cwwShowData><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CWW ACCOUNT OVERRIDES</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content class=\\\"background-fff user_accounts\\\"><div class=desc>Add any Override Values for the new CWW users</div><div class=user_add_div><div class=\\\"table-scroll user_add_list light-form\\\"><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-15 style=\\\"vertical-align: top\\\"><!-- <input type=\\\"checkbox\\\" ng-model=\\\"vm.overrideSelect\\\" ng-click=\\\"vm.check_selectAllMain()\\\" id=\\\"userOverrideCheckbox\\\" />\\r\\n <label for=\\\"userOverrideCheckbox\\\"> SELECT ALL </label> --></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=vm.add_user.primary_contact_cww md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.add_user.bccs_cww md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Party & Group ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><!--\\r\\n <input\\r\\n style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0);\\\"\\r\\n type=\\\"text\\\"\\r\\n ng-model=\\\"vm.add_user.party_group_ids\\\"/> --><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.add_user.party_group_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCwwUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-20 colspan=2 style=\\\"vertical-align: top\\\"><div flex=100 layout=row layout-align=\\\"center start\\\"><button ng-click=vm.updateUserRow() style=margin-top:15px>APPLY OVERRIDES TO SELECTED</button></div></th></tr></thead><tbody><tr><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border for=userOverrideCheckbox><input type=checkbox ng-model=vm.overrideSelect ng-click=vm.check_selectAllMain() id=userOverrideCheckbox> SELECT ALL</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>PRIMARY CONTACT OVERRIDE</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>BCC OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>PARTY & GROUP ID OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>APPLY TO CSL</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ACTIONS</div></td></tr><tr ng-repeat=\\\"user_lists in vm.user_list.user_accounts\\\" ng-hide=\\\"(user_lists.cww_access == false)\\\" class=\\\"user_list user_list2\\\"><td class=td-20 style=\\\"vertical-align: bottom\\\"><input type=checkbox id=step2Select{{$index}} class=override_multiple_checkbox ng-checked=vm.overrideSelect ng-click=vm.check_selectAll()> {{user_lists.first_name}} {{user_lists.last_name}}</td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserId != $index\\\"><span ng-if=user_lists.cww_overrides.primary_contact.email>{{user_lists.cww_overrides.primary_contact.email}}</span> <span ng-if=!user_lists.cww_overrides.primary_contact.email><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserId == $index\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=user_lists.cww_overrides.primary_contact.id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact.id}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserId != $index\\\"><span ng-if=\\\"user_lists.cww_overrides.bccs.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.cww_overrides.bccs md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.cww_overrides.bccs.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserId == $index\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=user-chips ng-model=user_lists.cww_overrides.bccs md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-25 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserId != $index\\\"><span ng-if=\\\"user_lists.cww_overrides.party_group_ids.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.cww_overrides.party_group_ids md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.cww_overrides.party_group_ids.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>Party & Group ID Overrides</label></span></div><div flex=100 ng-if=\\\"vm.editUserId == $index\\\"><label class=line-height-15px>Party & Group ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips cwwdepartment-chips toUpperCase\\\" ng-model=user_lists.cww_overrides.party_group_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCwwUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-10 style=\\\"vertical-align: middle;padding-bottom: 10px\\\"><!-- <div ng-if=\\\"vm.editUserId != $index\\\">\\r\\n <input\\r\\n ng-if=\\\"(user_lists.csl_access == true || user_lists.cfs_access == true)\\\"\\r\\n type=\\\"checkbox\\\" ng-model=\\\"vm.overrideSelectCopy\\\" ng-click=\\\"vm.copyOverrides(vm.overrideSelectCopy,$index,user_lists.csl_access,user_lists.cfs_access)\\\" id=\\\"\\\" />\\r\\n </div>\\r\\n <div ng-if=\\\"vm.editUserId == $index\\\">\\r\\n <input\\r\\n ng-if=\\\"(user_lists.csl_access == true || user_lists.cfs_access == true)\\\"\\r\\n type=\\\"checkbox\\\" ng-model=\\\"vm.overrideSelectCopy\\\" ng-click=\\\"vm.copyOverrides(vm.overrideSelectCopy,$index,user_lists.csl_access,user_lists.cfs_access)\\\" id=\\\"\\\" />\\r\\n </div> --> <input type=checkbox ng-if=\\\"(user_lists.csl_access == true || user_lists.cfs_access == true)\\\" id=step6Select{{$index}} class=override_multiple_checkbox1 ng-checked=vm.overrideSelect1 ng-click=vm.copyOverrides($index,user_lists.csl_access,user_lists.cfs_access)></td><td class=\\\"td-20 remove-user-text\\\" style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div flex=100 ng-if=\\\"vm.editUserId != $index\\\"><span class=edit-user-text ng-click=vm.editUserListRow($index)>Edit</span>  <span class=remove-user-text ng-click=vm.removeUserListStep2($index)>Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserId == $index\\\"><span ng-click=vm.completeUserListRowStep2($index)>Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div><div id=csl-setup-box ng-if=vm.cslShowData><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CSL ACCOUNT OVERRIDES</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content class=\\\"background-fff user_accounts\\\"><div class=desc>Add any Override Values for the new CSL users</div><div class=user_add_div><div class=\\\"table-scroll user_add_list light-form\\\"><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-15 style=\\\"vertical-align: top\\\"><!-- <input type=\\\"checkbox\\\" ng-model=\\\"vm.overrideSelect\\\" ng-click=\\\"vm.check_selectAllMain()\\\" id=\\\"userOverrideCheckbox\\\" />\\r\\n <label for=\\\"userOverrideCheckbox\\\"> SELECT ALL </label> --></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=vm.add_user.primary_contact_csl md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.add_user.bccs_csl md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Customer ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><!--\\r\\n <input\\r\\n style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0);\\\"\\r\\n type=\\\"text\\\"\\r\\n ng-model=\\\"vm.add_user.party_group_ids\\\"/> --><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.add_user.customer_ids_csl md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCslUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-21 style=\\\"vertical-align: top\\\"><div flex=100 layout=row layout-align=\\\"center start\\\"><button ng-click=vm.updateUserRowCsl() style=margin-top:15px>APPLY OVERRIDES TO SELECTED</button></div></th></tr></thead><tbody><tr><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border for=userOverrideCheckboxCsl><input type=checkbox ng-model=vm.overrideSelectCsl ng-click=vm.check_selectAllMain_Csl() id=userOverrideCheckboxCsl> SELECT ALL</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>PRIMARY CONTACT OVERRIDE</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>BCC OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>CUSTOMER ID OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ACTIONS</div></td></tr><tr ng-repeat=\\\"user_lists in vm.user_list.user_accounts\\\" ng-hide=\\\"(user_lists.csl_access == false)\\\" class=\\\"user_list user_list2\\\"><td class=td-20 style=\\\"vertical-align: bottom\\\"><input type=checkbox id=step3Select{{$index}} class=override_multiple_checkbox_csl ng-checked=vm.overrideSelectCsl ng-click=vm.check_selectAll_csl()> {{user_lists.first_name}} {{user_lists.last_name}}</td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCsl != $index\\\"><span ng-if=user_lists.csl_overrides.primary_contact.email>{{user_lists.csl_overrides.primary_contact.email}}</span> <span ng-if=!user_lists.csl_overrides.primary_contact.email><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCsl == $index\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=user_lists.csl_overrides.primary_contact.id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact.id}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCsl != $index\\\"><span ng-if=\\\"user_lists.csl_overrides.bccs.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.csl_overrides.bccs md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.csl_overrides.bccs.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCsl == $index\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=user-chips ng-model=user_lists.csl_overrides.bccs md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-25 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCsl != $index\\\"><span ng-if=\\\"user_lists.csl_overrides.customer_ids.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.csl_overrides.customer_ids md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.csl_overrides.customer_ids.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>Customer ID Overrides</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCsl == $index\\\"><label class=line-height-15px>Customer ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=user_lists.csl_overrides.customer_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCslUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=\\\"td-20 remove-user-text\\\" style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div flex=100 ng-if=\\\"vm.editUserIdCsl != $index\\\"><span class=edit-user-text ng-click=vm.editUserListRowCsl($index)>Edit</span>  <span class=remove-user-text ng-click=vm.removeUserListStep2Csl($index)>Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserIdCsl == $index\\\"><span ng-click=vm.completeUserListRowStep2Csl($index)>Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div><div id=cfs-setup-box ng-if=vm.cfsShowData><md-card style=margin:0 class=md-card-light><md-toolbar class={{vm.status.cssClass}}><div class=md-toolbar-tools><h2 style=\\\"margin-left: 12px\\\" class=md-flex layout=row><span translate=\\\"\\\">CFS ACCOUNT OVERRIDES</span></h2><span flex=auto></span><!-- <div ng-include=\\\"\\'/app/admin/users/forms/menu-action-buttons.html\\'\\\"></div> --></div></md-toolbar><md-card-content class=\\\"background-fff user_accounts\\\"><div class=desc>Add any Override Values for the new CFS users</div><div class=user_add_div><div class=\\\"table-scroll user_add_list light-form\\\"><table class=table-static cellspacing=0 border=0 style=\\\"width: 100%; min-width:800px\\\"><thead><tr><th class=td-15 style=\\\"vertical-align: top\\\"><!-- <input type=\\\"checkbox\\\" ng-model=\\\"vm.overrideSelect\\\" ng-click=\\\"vm.check_selectAllMain()\\\" id=\\\"userOverrideCheckbox\\\" />\\r\\n <label for=\\\"userOverrideCheckbox\\\"> SELECT ALL </label> --></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=vm.add_user.primary_contact_cfs md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.add_user.bccs_cfs md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-20 style=\\\"vertical-align: top\\\"><label class=line-height-15px>Customer ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><!--\\r\\n <input\\r\\n style=\\\"border-width: 0px 0px 1px;border-bottom-color: rgb(0, 0, 0);\\\"\\r\\n type=\\\"text\\\"\\r\\n ng-model=\\\"vm.add_user.party_group_ids\\\"/> --><md-chips class=\\\"user-chips email-chips\\\" ng-model=vm.add_user.customer_ids_cfs md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCfsUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></th><th class=td-21 style=\\\"vertical-align: top\\\"><div flex=100 layout=row layout-align=\\\"center start\\\"><button ng-click=vm.updateUserRowCfs() style=margin-top:15px>APPLY OVERRIDES TO SELECTED</button></div></th></tr></thead><tbody><tr><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border for=userOverrideCheckboxCfs><input type=checkbox ng-model=vm.overrideSelectCfs ng-click=vm.check_selectAllMain_Cfs() id=userOverrideCheckboxCfs> SELECT ALL</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>PRIMARY CONTACT OVERRIDE</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>BCC OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>CUSTOMER ID OVERRIDES</div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div class=override-border>ACTIONS</div></td></tr><tr ng-repeat=\\\"user_lists in vm.user_list.user_accounts\\\" ng-hide=\\\"(user_lists.cfs_access == false)\\\" class=\\\"user_list user_list2\\\"><td class=td-20 style=\\\"vertical-align: bottom\\\"><input type=checkbox id=step4Select{{$index}} class=override_multiple_checkbox_cfs ng-checked=vm.overrideSelectCfs ng-click=vm.check_selectAll_cfs()> {{user_lists.first_name}} {{user_lists.last_name}}</td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCfs != $index\\\"><span ng-if=user_lists.cfs_overrides.primary_contact.email>{{user_lists.cfs_overrides.primary_contact.email}}</span> <span ng-if=!user_lists.cfs_overrides.primary_contact.email><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCfs == $index\\\"><label class=line-height-15px>Primary Contact Override</label><md-select ng-class=\\\"\\\" style=\\\"margin: 0\\\" ng-model=user_lists.cfs_overrides.primary_contact.id md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value={{contact.id}} ng-repeat=\\\"contact in vm.possibleContacts\\\">{{ contact.email }}</md-option></md-select></div></td><td class=td-20 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCfs != $index\\\"><span ng-if=\\\"user_lists.cfs_overrides.bccs.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.cfs_overrides.bccs md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.cfs_overrides.bccs.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>None</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCfs == $index\\\"><label class=line-height-15px>BCC Overrides</label><md-input-container class=\\\"md-block error-hidden\\\" style=\\\"margin: 0\\\"><md-chips class=user-chips ng-model=user_lists.cfs_overrides.bccs md-separator-keys=vm.keys placeholder=\\\"BCC Override\\\"><md-autocomplete md-selected-item=selectedItem md-no-cache=true md-delay=300 ng-disabled=\\\"\\\" md-search-text=searchText md-items=\\\"item in vm.getMatch(\\'bccs\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=td-25 style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div ng-if=\\\"vm.editUserIdCfs != $index\\\"><span ng-if=\\\"user_lists.csl_overrides.customer_ids.length > 0\\\"><md-chips class=\\\"user-chips email-chips default-md-chip\\\" ng-model=user_lists.csl_overrides.customer_ids md-require-match=true ng-attr-readonly=true md-removable=false md-separator-keys=vm.keys placeholder=\\\"\\\" secondary-placeholder=\\\"\\\"></md-chips></span><span ng-if=\\\"user_lists.csl_overrides.customer_ids.length == 0\\\"><label style=\\\"color: #c3c1c1\\\" for=none>Customer ID Overrides</label></span></div><div flex=100 ng-if=\\\"vm.editUserIdCfs == $index\\\"><label class=line-height-15px>Customer ID Overrides</label><md-input-container class=\\\"md-block error-hidden\\\"><md-chips class=\\\"user-chips email-chips\\\" ng-model=user_lists.csl_overrides.customer_ids md-separator-keys=vm.keys placeholder=\\\"Enter email\\\" md-on-add=\\\"\\\" md-require-match=true secondary-placeholder=\\\"Enter a Party Id\\\"><md-autocomplete md-selected-item=selectedItem md-delay=300 md-selected-item-change=\\\"\\\" ng-disabled=vm.readAccess md-search-text=searchText md-items=\\\"item in vm.getMatchCfsUser(\\'party_name\\', searchText)\\\" md-item-text=item><md-item-template><span md-highlight-text=searchText>{{item}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></td><td class=\\\"td-20 remove-user-text\\\" style=\\\"vertical-align: bottom;padding-bottom: 10px\\\"><div flex=100 ng-if=\\\"vm.editUserIdCfs != $index\\\"><span class=edit-user-text ng-click=vm.editUserListRowCfs($index)>Edit</span>  <span class=remove-user-text ng-click=vm.removeUserListStep2Cfs($index)>Remove</span></div><div flex=100 class=edit-user-text ng-if=\\\"vm.editUserIdCfs == $index\\\"><span ng-click=vm.completeUserListRowStep2Cfs($index)>Done</span></div></td></tr></tbody></table></div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/admin/support-requests/exports/export-csv.html\",\"<md-dialog class=export-csv aria-label=\\\"Export CSV\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><h2 translate=TRACKTRACE.EXPORT></h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content flex-fill flex=auto style=\\\"min-height: 120px\\\"><!--<div class=\\\"loadmask-light\\\" style=\\\"position:absolute;top:52px;left:0;right:0;bottom:0;\\\"></div>--><div class=md-dialog-content><p><span translate=TRACKTRACE.EXPORT_LINE_1></span></p><p><span translate=TRACKTRACE.EXPORT_LINE_2></span></p></div></md-dialog-content><md-dialog-actions layout=row><md-button ng-click=closeDialog() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><!-- <md-button class=\\\"md-raised md-accent\\\" ng-click=\\\"exportCustom()\\\">\\r\\n <span translate=\\\"TRACKTRACE.EXPORT_CUSTOM\\\"></span>\\r\\n </md-button> --><md-button class=\\\"md-raised md-accent\\\" ng-click=exportAll()><span translate=TRACKTRACE.EXPORT_ALL></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/exports/no-results.html\",\"<md-dialog class=\\\"export-csv md-card-light\\\" aria-label=\\\"Export CSV\\\" ng-cloak><md-toolbar><div class=md-toolbar-tools><h2 translate=TRACKTRACE.EXPORT></h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding><p><span translate=TRACKTRACE.NORESULTS></span></p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"end center\\\"><md-button class=md-raised ng-click=closeDialog()><span translate=TRACKTRACE.CANCEL></span></md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/forms/action-buttons.html\",\"<span ng-if=!vm.saveBtnShow><md-button ng-if=!vm.readAccess class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.saveCompany() ng-disabled=\\\"vm.isLoad.save || vm.formDetails.$pristine || vm.formDetails.$invalid\\\" type=submit class=\\\"btn btn-default\\\" ng-show=!vm.isCreate><!-- <md-icon>save</md-icon> --> <span ng-hide=vm.isLoad.save translate=USER.SAVE></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><md-button ng-if=vm.readAccess class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.listCompany() class=\\\"btn btn-default\\\" ng-show=!vm.isCreate><!-- <md-icon>save</md-icon> --> <span>Close</span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></span><span ng-if=vm.saveBtnShow><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.saveCompany() ng-disabled=!vm.saveBtnShow type=submit class=\\\"btn btn-default\\\" ng-show=!vm.isCreate><!-- <md-icon>save</md-icon> --> <span ng-hide=vm.isLoad.save translate=USER.SAVE></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.save class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></span><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.createNewCompany() ng-disabled=vm.isLoad.createNew type=submit class=\\\"btn btn-default\\\" ng-show=vm.isCreate><!-- <md-icon>save</md-icon><md-icon>create</md-icon> --> <span ng-hide=vm.isLoad.createNew translate=USER.SAVE></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.createNew class=md-hue-1 md-diameter=30px></md-progress-circular></md-button>\");\n$templateCache.put(\"/app/admin/support-requests/forms/menu-action-buttons.html\",\"<md-menu ng-if=\\\"!vm.isCreate && !vm.company.is_crane && vm.status.cssClass === \\'md-danger\\'\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item ng-if=\\\"!vm.company.is_active && !vm.company.is_crane\\\"><md-button class=md-primary ng-click=\\\"vm.showModal(ev, \\'delete-company\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=COMPANY.DELETE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/support-requests/forms/search.html\",\"<div layout=row><div flex=95 class=flex-transition><div><h3><md-icon class=m-r-xs>search</md-icon><span class=uppercase translate=COMPANY.LOOKUP_COMPANY></span></h3></div></div><md-button style=margin-top:9px class=\\\"md-fab md-mini btn-collapse\\\" aria-label=Open/Close ng-click=toggleCollapse()><md-icon>{{collapsed ? \\'expand_more\\' : \\'expand_less\\'}}</md-icon></md-button></div><div ng-show=!collapsed><form><div layout-gt-sm=row><div flex=48><md-input-container class=md-block flex-gt-sm=auto><label translate=COMPANY.COMPANY_NAME></label><input ng-model=vm.lookup.name ng-keyup=vm.companySearch()></md-input-container></div><div flex=48 flex-offset-gt-sm=5></div></div><div layout=row><span flex=auto></span><md-button class=\\\"md-primary md-raised btn btn-default\\\" ng-click=vm.companySearch(true)><md-icon>clear</md-icon><span translate=COMPANY.CLEAR></span></md-button><md-button class=\\\"md-primary md-raised btn btn-default\\\" ng-click=vm.companySearch();toggleCollapse() ng-disabled=\\\"vm.companySearchNotEnable && vm.filterCheck\\\"><md-icon>search</md-icon><span translate=COMPANY.SEARCH></span></md-button></div></form></div>\");\n$templateCache.put(\"/app/admin/support-requests/modals/activate-company.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'COMPANY.ACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'COMPANY.ACTIVATE_CONFIRM\\' | translate}}</p><p>{{vm.getName()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.activateCompany() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/modals/api-error.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.ERROR_CREATING_ACCOUNT\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><ul><li ng-repeat=\\\"message in apiErrorMessages\\\">{{ message }}</li></ul></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'CLOSE\\' | translate}}</md-button><span flex=auto></span></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/modals/deactivate-company.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'COMPANY.DEACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'COMPANY.DEACTIVATE_CONFIRM\\' | translate}}</p><p>{{}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.deactivateCompany() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/modals/delete-company.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'COMPANY.DELETE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'COMPANY.DELETE_CONFIRM\\' | translate}}</p><p>{{vm.getCompanyUserCount()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.deleteCompany() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/modals/departments.html\",\"<md-dialog aria-label=\\\"User Overrides\\\" style=\\\"min-width: 645px\\\"><form ng-cloak><md-toolbar style=\\\"background-color: #324c7e\\\"><div class=md-toolbar-tools><h2 style=\\\"margin-left: 10px;\\r\\n text-transform: none;\\r\\n color: #fff\\\">User Departments</h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><i class=material-icons>clear</i></md-button></div></md-toolbar><md-dialog-content><div class=md-dialog-content><h2>{{vm.overridesData.first_name}} {{vm.overridesData.last_name}}</h2><div id=cww-overrides-section ng-if=(vm.overridesData.cww_overrides.department.id)><div style=\\\"font-size: 12px;\\r\\n font-weight: 700;min-height: 30px;margin: 0\\\" layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span>CWW DEPARTMENTS</span></div></div><span style=\\\"display: block;border-bottom: 1px solid #979797\\\"></span><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Assigned Department</div><div class=text style=\\\"font-size: 15px;font-weight: 500\\\">{{vm.overridesData.cww_overrides.department.name}}</div></div></div><div flex-gt-sm=48 flex-offset-gt-sm=5><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Department Party & Group ID\\'s</div><div ng-repeat=\\\"chipone in vm.overridesData.cww_overrides.department.party_id_names_combined\\\" ng-class=\\\"(vm.notexistIds.includes(chipone | uppercase)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span style=\\\"text-transform: uppercase\\\">{{chipone}}</span></div></div></div></div></div><br><div id=csl-overrides-section ng-if=(vm.overridesData.csl_overrides.department.id)><div style=\\\"font-size: 12px;\\r\\n font-weight: 700;min-height: 30px;margin: 0\\\" layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span>CSL DEPARTMENTS</span></div></div><span style=\\\"display: block;border-bottom: 1px solid #979797\\\"></span><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Assigned Department</div><div class=text style=\\\"font-size: 15px;font-weight: 500\\\">{{vm.overridesData.csl_overrides.department.name}}</div></div></div><div flex-gt-sm=48 flex-offset-gt-sm=5><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Department Custome ID\\'s</div><div ng-repeat=\\\"chiptwo in vm.overridesData.csl_overrides.department.party_id_names\\\" ng-class=\\\"(vm.notexistIds.includes(chiptwo | uppercase)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span style=\\\"text-transform: uppercase\\\">{{chiptwo}}</span></div></div></div></div></div><br><div id=cfs-overrides-section ng-if=(vm.overridesData.cfs_overrides.department.id)><div style=\\\"font-size: 12px;\\r\\n font-weight: 700;min-height: 30px;margin: 0\\\" layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span>CFS DEPARTMENTS</span></div></div><span style=\\\"display: block;border-bottom: 1px solid #979797\\\"></span><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Assigned Department</div><div class=text style=\\\"font-size: 15px;font-weight: 500\\\">{{vm.overridesData.cfs_overrides.department.name}}</div></div></div><div flex-gt-sm=48 flex-offset-gt-sm=5><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Department Custome ID\\'s</div><div ng-repeat=\\\"chipthree in vm.overridesData.cfs_overrides.department.party_id_names\\\" ng-class=\\\"(vm.notexistIds.includes(chipthree | uppercase)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span style=\\\"text-transform: uppercase\\\">{{chipthree}}</span></div></div></div></div></div></div></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"center center\\\" style=\\\"padding:0px 30px 30px 30px\\\"><md-button ng-click=vm.closeModal() style=\\\"background-color:transparent;border:1px solid #2A9FD8; padding:0px 15px 0px 15px;min-width:200px\\\"><span style=\\\"color:#2A9FD8;font-weight: 700\\\">CLOSE</span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/modals/import-users-error.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\" style=\\\"top: 150px\\\"><md-toolbar><div class=md-toolbar-tools><h2>Listed User Emails Already Exists</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content style=\\\"background-color: #fff\\\" class=\\\"light-content md-padding\\\"><ul><li ng-repeat=\\\"email in vm.existUsers\\\">{{ email }}</li></ul></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal()>{{\\'CLOSE\\' | translate}}</md-button><span flex=auto></span></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/modals/override.html\",\"<md-dialog aria-label=\\\"User Overrides\\\" style=\\\"min-width: 645px\\\"><form ng-cloak><md-toolbar style=\\\"background-color: #324c7e\\\"><div class=md-toolbar-tools><h2 style=\\\"margin-left: 10px;\\r\\n text-transform: none;\\r\\n color: #fff\\\">User Overrides</h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><i class=material-icons>clear</i></md-button></div></md-toolbar><md-dialog-content><div class=md-dialog-content><h2>{{vm.overridesData.first_name}} {{vm.overridesData.last_name}}</h2><div id=cww-overrides-section ng-if=\\\"(vm.overridesData.cww_overrides.primary_contact.id || vm.overridesData.cww_overrides.bccs.length || vm.overridesData.cww_overrides.party_group_ids.length)\\\"><div style=\\\"font-size: 12px;\\r\\n font-weight: 700;min-height: 30px;margin: 0\\\" layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span>CWW OVERRIDES</span></div></div><span style=\\\"display: block;border-bottom: 1px solid #979797\\\"></span><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Primary Contact Overrides</div><div class=text style=\\\"font-size: 15px;font-weight: 500\\\">{{vm.overridesData.cww_overrides.primary_contact.email}}</div></div></div><div flex-gt-sm=48 flex-offset-gt-sm=5><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Party & Group ID Overrides</div><div ng-repeat=\\\"chipone in vm.overridesData.cww_overrides.party_group_ids\\\" ng-class=\\\"(vm.notexistIds.includes(chipone | uppercase)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span style=\\\"text-transform: uppercase\\\">{{chipone}}</span></div></div></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=50><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">BCC Overrides</div><div class=text style=\\\"font-size: 15px;font-weight: 500\\\"><span ng-repeat=\\\"default_bccs_data in vm.overridesData.cww_overrides.bccs\\\">{{default_bccs_data}}<span ng-if=!$last>,</span></span></div></div></div></div><div flex-gt-sm=50 flex-offset-gt-sm=5></div></div><br><div id=csl-overrides-section ng-if=\\\"(vm.overridesData.csl_overrides.primary_contact.id || vm.overridesData.csl_overrides.bccs.length || vm.overridesData.csl_overrides.customer_ids.length)\\\"><div style=\\\"font-size: 12px;\\r\\n font-weight: 700;min-height: 30px;margin: 0\\\" layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span>CSL OVERRIDES</span></div></div><span style=\\\"display: block;border-bottom: 1px solid #979797\\\"></span><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Primary Contact Overrides</div><div class=text style=\\\"font-size: 15px;font-weight: 500\\\">{{vm.overridesData.csl_overrides.primary_contact.email}}</div></div></div><div flex-gt-sm=48 flex-offset-gt-sm=5><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Customer ID Overrides</div><div ng-repeat=\\\"chiptwo in vm.overridesData.csl_overrides.customer_ids\\\" ng-class=\\\"(vm.notexistIds.includes(chiptwo | uppercase)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span style=\\\"text-transform: uppercase\\\">{{chiptwo}}</span></div></div></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=50><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">BCC Overrides</div><div class=text style=\\\"font-size: 15px;font-weight: 500\\\"><span ng-repeat=\\\"default_bccs_data in vm.overridesData.csl_overrides.bccs\\\">{{default_bccs_data}}<span ng-if=!$last>,</span></span></div></div></div></div><div flex-gt-sm=50 flex-offset-gt-sm=5></div></div><br><div id=cfs-overrides-section ng-if=\\\"(vm.overridesData.cfs_overrides.primary_contact.id || vm.overridesData.cfs_overrides.bccs.length || vm.overridesData.cfs_overrides.customer_ids.length)\\\"><div style=\\\"font-size: 12px;\\r\\n font-weight: 700;min-height: 30px;margin: 0\\\" layout=column layout-gt-xs=row layout-align-gt-xs=\\\"space-between start\\\" layout-align=\\\"space-around start\\\"><div class=header_text><span>CFS OVERRIDES</span></div></div><span style=\\\"display: block;border-bottom: 1px solid #979797\\\"></span><br><div layout-gt-sm=row class=newchips><div flex-gt-sm=45><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Primary Contact Overrides</div><div class=text style=\\\"font-size: 15px;font-weight: 500\\\">{{vm.overridesData.cfs_overrides.primary_contact.email}}</div></div></div><div flex-gt-sm=48 flex-offset-gt-sm=5><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">Customer ID Overrides</div><div ng-repeat=\\\"chipthree in vm.overridesData.cfs_overrides.customer_ids\\\" ng-class=\\\"(vm.notexistIds.includes(chipthree | uppercase)) ? \\'chips-notexist\\' : \\'chips-exist\\'\\\"><span style=\\\"text-transform: uppercase\\\">{{chipthree}}</span></div></div></div></div><div layout-gt-sm=row class=newchips><div flex-gt-sm=50><div class=company_name><div class=desc style=\\\"font-style:normal;font-weight: 700;\\r\\n font-size: 12px\\\">BCC Overrides</div><div class=text style=\\\"font-size: 15px;font-weight: 500\\\"><span ng-repeat=\\\"default_bccs_data in vm.overridesData.cfs_overrides.bccs\\\">{{default_bccs_data}}<span ng-if=!$last>,</span></span></div></div></div></div><div flex-gt-sm=50 flex-offset-gt-sm=5></div></div></div></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"center center\\\" style=\\\"padding:0px 30px 30px 30px\\\"><md-button ng-click=vm.closeModal() style=\\\"background-color:transparent;border:1px solid #2A9FD8; padding:0px 15px 0px 15px;min-width:200px\\\"><span style=\\\"color:#2A9FD8;font-weight: 700\\\">CLOSE</span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/modals/support-requests.modal.html\",\"<style type=text/css>.title{\\r\\n font-size: 26px;font-weight: 500;color: #b3b3b2;\\r\\n }\\r\\n .title-div{\\r\\n cursor: pointer;\\r\\n height: 80px;background-color: #50afe3;\\r\\n margin: 0 15px 15px 15px;\\r\\n border-radius: 5px;box-shadow: 0px 6px 15px -7px;\\r\\n }\\r\\n .icon-title{\\r\\n color: #ffffff !important;font-size: 35px !important;\\r\\n }\\r\\n .icon-margin{\\r\\n margin: auto;margin-left: 35px;\\r\\n }\\r\\n .cancel-btn{\\r\\n margin: 20px auto !important;min-width: 25%;\\r\\n border: 1px solid #b3b3b2;background-color: #fff !important;\\r\\n }\\r\\n .sub-title{\\r\\n cursor: pointer;font-size: 18px;font-weight: 600;\\r\\n margin: auto;margin-left: 0px;color: #ffffff;\\r\\n }</style><md-dialog class=\\\"md-card-light m-t small-dialog\\\" style=\\\"top: 15%;min-width: 45%\\\"><md-dialog-content class=\\\"light-content md-padding\\\"><br><p align=center><span class=title>I Need To</span></p><br><div style=clear:both></div><div ng-click=vm.addCompany(); layout-gt-sm=row class=title-div><span class=icon-margin><i class=\\\"material-icons icon-title\\\"></i></span> <span class=sub-title>Add a New Company</span></div><div ng-click=vm.addUser(); layout-gt-sm=row class=title-div><span class=icon-margin><i class=\\\"material-icons icon-title\\\"></i></span> <span class=sub-title>Add New Users to an Existing Company</span></div><div ng-click=vm.generalSupport(); layout-gt-sm=row class=title-div><span class=icon-margin><i class=\\\"material-icons icon-title\\\"></i></span> <span class=sub-title>General Support Request</span></div></md-dialog-content><md-dialog-actions layout=row><md-button class=cancel-btn ng-click=vm.closeModal()><span style=\\\"color: #b3b3b2;text-transform: none\\\">{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</span></md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/support-requests/server-table/filterDate.html\",\"<mdp-date-picker mdp-format=MM/DD/YYYY ng-model=vm.filters[name] ng-change=vm.filterDate(name) class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-date-picker>\");\n$templateCache.put(\"/app/admin/support-requests/server-table/filterDefault.html\",\"<md-input-container class=error-hidden><input type=text name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] ng-change=vm.updateFilteredCounts() class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container>\");\n$templateCache.put(\"/app/admin/support-requests/server-table/filterHeader.html\",\"<tr ng-show=show_filter class=ng-table-filters><th data-title-text=\\\"{{$column.titleAlt(this) || $column.title(this)}}\\\" ng-repeat=\\\"$column in $columns\\\" ng-if=$column.show(this) class=\\\"filter {{$column.class(this)}}\\\"><div ng-repeat=\\\"(name, filter) in $column.filter(this)\\\"><div ng-include=config.getTemplateUrl(filter)></div></div></th></tr>\");\n$templateCache.put(\"/app/admin/support-requests/server-table/filterNone.html\",\"\");\n$templateCache.put(\"/app/admin/support-requests/server-table/filterStatus.html\",\"<md-input-container class=md-block><md-select ng-model=params.filter()[name] name={{name}} aria-label={{name}} ng-change=vm.updateFilteredCounts() ng-disabled=$filterRow.disabled md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose()><md-option ng-value=null>—</md-option><md-option ng-value=\\\"\\'awaiting_demo\\'\\\"><!-- ng-value used to set true or false which ng-table needs --> Awaiting Demo</md-option><md-option ng-value=\\\"\\'in_review\\'\\\">In Review</md-option><md-option ng-value=\\\"\\'open\\'\\\">Open</md-option><md-option ng-value=\\\"\\'completed\\'\\\">Completed</md-option><md-option ng-value=\\\"\\'rejected\\'\\\">Rejected</md-option><md-option ng-value=\\\"\\'submitted\\'\\\">Submitted</md-option></md-select></md-input-container>\");\n$templateCache.put(\"/app/admin/support-requests/server-table/header.html\",\"<ng-table-sorter-row-support-req></ng-table-sorter-row-support-req><ng-table-filter-row-cview></ng-table-filter-row-cview>\");\n$templateCache.put(\"/app/admin/support-requests/server-table/pagination.html\",\"<div class=\\\"ng-table-pager m-t-sm ng-scope\\\" ng-if=params.data.length ng-controller=\\\"ServerTableSRController as vm\\\"><div layout-gt-xs=row layout-xs=column><div><ul ng-if=pages.length class=\\\"pagination ng-table-pagination ng-scope\\\"><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=\\\"ng-scope disabled\\\"><a ng-switch-when=prev ng-click=params.page(page.number);vm.checkSelectedInput() href=\\\"\\\" class=ng-scope>«</a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=first ng-click=params.page(page.number);vm.checkSelectedInput() href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>1</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=page ng-click=params.page(page.number);vm.checkSelectedInput() href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>2</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=last ng-click=params.page(page.number);vm.checkSelectedInput() href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>3</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=next ng-click=params.page(page.number);vm.checkSelectedInput() href=\\\"\\\" class=ng-scope>»</a></li></ul></div><span flex></span><div ng-if=params.settings().counts.length class=\\\"ng-table-counts btn-group pull-right ng-scope\\\"><div><md-button ng-repeat=\\\"count in params.settings().counts\\\" ng-class=\\\"{\\'md-primary\\':params.count()==count}\\\" ng-click=params.count(count) aria-label=\\\"Results Per Page\\\" class=\\\"md-raised md-default\\\"><span ng-bind=count class=ng-binding></span></md-button></div><span class=md-caption>Records per page</span></div></div></div>\");\n$templateCache.put(\"/app/admin/support-requests/server-table/server-table.html\",\"<style type=text/css>.title-text{\\r\\n white-space: nowrap;\\r\\n width: 200px;\\r\\n overflow: hidden;\\r\\n text-overflow: ellipsis;\\r\\n }</style><div ng-controller=\\\"ServerTableSRController as vm\\\" class=table-scroll ng-style=\\\"(vm.noResults || vm.isError) ? {\\'overflow-x\\':\\'hidden\\'} : {}\\\"><div class=loadmask-light loadmask=!vm.isLoading><table ng-table-dynamic=\\\"vm.tableParams with vm.columns\\\" template-header=/app/admin/support-requests/server-table/header.html template-pagination=/app/admin/support-requests/server-table/pagination.html class=\\\"card-table serverReqTable\\\" show-filter=supportRequestfiltersVisible><tbody><tr ng-repeat=\\\"row in $data\\\"><td ng-repeat=\\\"col in $columns\\\" ng-if=col.field><span class=hoverable ng-if=\\\"col.field == \\'selected\\'\\\"><input style=cursor:pointer ng-click=\\\"vm.selectUser($event, $index)\\\" ng-if=\\\"col.field==\\'selected\\'\\\" type=checkbox ng-model=\\\"row[\\'selected\\']\\\"> </span><span ng-if=\\\"col.field == \\'company\\'\\\">{{row[col.field][\\'name\\']}} </span><span ng-if=\\\"col.field != \\'selected\\' && col.field != \\'company\\'\\\"><a ng-if=\\\"col.field == \\'actions\\'\\\"><md-button class=demo_complete_btn ng-if=\\\"supportRequestTab ==\\'company_tickets\\' && row[\\'status\\'] == \\'awaiting_demo\\' && vm.supportrequestAdminCheck == \\'true\\'\\\" ng-click=viewCompanyRequest(row.id)>Demo Complete</md-button><md-button class=demo_complete_btn ng-if=\\\"supportRequestTab ==\\'company_tickets\\' && vm.validation_user == \\'true\\' && !row[\\'data_validated\\']\\\" ng-click=viewCompanyRequest(row.id)>Validate Data</md-button><md-button class=demo_complete_btn ng-if=\\\"supportRequestTab ==\\'company_tickets\\' && vm.validation_user == \\'true\\' && row[\\'data_validated\\']\\\" ng-click=viewCompanyRequest(row.id)>Data Validated</md-button><md-button class=demo_complete_btn ng-if=\\\"supportRequestTab ==\\'company_tickets\\' && vm.cview_classic_admin == \\'true\\' && row[\\'users_created\\']\\\" ng-click=viewCompanyRequest(row.id)>User/s Created</md-button><md-button class=demo_complete_btn ng-if=\\\"supportRequestTab ==\\'company_tickets\\' && vm.cview_classic_admin == \\'true\\' && !row[\\'users_created\\']\\\" ng-click=viewCompanyRequest(row.id)>Create User/s</md-button><md-button ng-if=\\\"supportRequestTab ==\\'general_tickets\\'\\\" ng-click=viewGeneralRequest(row.id) class=view_btn ng-if=\\\"row[\\'status\\'] != \\'awaiting_demo\\'\\\">View</md-button><md-button ng-if=\\\"supportRequestTab ==\\'account_tickets\\'\\\" ng-click=vm.viewAccountCreation(row.id) class=view_btn ng-if=\\\"row[\\'status\\'] != \\'awaiting_demo\\'\\\">View</md-button><md-button ng-if=\\\"supportRequestTab ==\\'company_tickets\\' && row[\\'status\\'] != \\'awaiting_demo\\'\\\" ng-click=viewCompanyRequest(row.id) class=view_btn ng-if=\\\"row[\\'status\\'] != \\'awaiting_demo\\'\\\">View</md-button></a><a ng-if=\\\"col.field == \\'created_at\\' || col.field == \\'updated_at\\' \\\">{{row[col.field] | date:\\'dd-MMM-yyyy\\' }} </a><a class={{col.link_class}} ng-if=\\\"col.field != \\'actions\\' && col.field != \\'created_at\\' && col.field != \\'updated_at\\' \\\"><p class=title-text title=\\\"{{row[col.field] | capitalize}}\\\" ng-if=\\\"col.field == \\'name\\'\\\" style=color:#45aee3;font-weight:600>{{row[col.field] | capitalize}}</p><span ng-if=\\\"col.field == \\'status\\'\\\"><span ng-if=\\\"row[col.field] == \\'in_review\\'\\\" style=\\\"color: #2b3d67;font-weight: 600\\\">In Review</span> <span ng-if=\\\"row[col.field] == \\'awaiting_user_creation\\'\\\" style=\\\"color: #2b3d67;font-weight: 600\\\">Awaiting User Creation</span> <span ng-if=\\\"row[col.field] == \\'open\\'\\\" style=\\\"color: #979797;font-weight: 600\\\">Open</span> <span ng-if=\\\"row[col.field] == \\'completed\\'\\\" style=\\\"color: #49c366;font-weight: 600\\\">Completed</span> <span ng-if=\\\"row[col.field] == \\'approved\\'\\\" style=\\\"color: #49c366;font-weight: 600\\\">Approved</span> <span ng-if=\\\"row[col.field] == \\'awaiting_demo\\'\\\" style=\\\"color: #f2a624;font-weight: 600\\\">Awaiting Demo</span> <span ng-if=\\\"row[col.field] == \\'awaiting_approval\\'\\\" style=\\\"color: #f2a624;font-weight: 600\\\">Awaiting Approval</span> <span ng-if=\\\"row[col.field] == \\'closed\\'\\\" style=\\\"color: #49c366;font-weight: 600\\\">Closed</span> <span ng-if=\\\"row[col.field] == \\'rejected\\'\\\" style=\\\"color: #49c366;font-weight: 600\\\">Rejected</span></span><p class=title-text title=\\\"{{row[col.field] | capitalize}}\\\" ng-if=\\\"col.field != \\'name\\' && col.field != \\'status\\' && col.field != \\'actions\\'\\\">{{row[col.field] | capitalize}}</p></a></span></td></tr><tr ng-show=\\\"vm.noResults && !vm.isError\\\"><td colspan=100% style=\\\"text-align: center\\\" id=isResults><span translate=TRACKTRACE.NORESULTS></span></td></tr><tr ng-show=vm.isError><td colspan=100% style=\\\"text-align: center\\\" id=timedOut><span translate={{vm.error}}></span></td></tr></tbody></table></div></div>\");\n$templateCache.put(\"/app/admin/support-requests/server-table/sorterHeader.html\",\"<tr class=ng-table-sort-header><!-- Table Header --><th title={{$column.headerTitle(this)}} ng-repeat=\\\"$column in $columns\\\" ng-class=\\\"{ \\'sortable\\': $column.sortable(this),\\r\\n \\'sort-asc\\': params.sorting()[$column.sortable(this)]==\\'asc\\',\\r\\n \\'sort-desc\\': params.sorting()[$column.sortable(this)]==\\'desc\\'\\r\\n }\\\" ng-init=\\\"template = $column.headerTemplateURL(this)\\\" ng-if=$column.title(this) class={{$column.class(this)}} filter=\\\"{ age: \\'/app/track-trace/server-table/filterHeader.html\\' }\\\"><div ng-if=!template><div ng-if=$column.static class=ng-table-header id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><input style=cursor:pointer;vertical-align:middle ng-click=vm.checkAll(vm.selectAll) ng-if=$column.checkbox type=checkbox ng-model=vm.selectAll> <span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : sortBy($column, $event)\\\"></span></span></div><div ng-if=!$column.static class=ng-table-header resizable r-directions=\\\"[\\'right\\']\\\" id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : sortBy($column, $event)\\\"></span></span></div></div><div ng-if=template ng-include=template></div></th></tr>\");\n$templateCache.put(\"/app/admin/support-requests/toast/attach-doc.error.html\",\"<md-toast><div layout=row><md-icon class=text-error>error</md-icon><span flex><p>{{\\'USER.BULK.IMPORT_ERROR\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/toast/attach-doc.invalid.error.html\",\"<md-toast><div layout=row><md-icon class=text-error>error</md-icon><span flex><p>{{\\'USER.BULK.INVALID_HEADERS\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/toast/create-company-request.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>Error saving company support request</p><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/toast/create-company-request.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>Successfully saved Company Support Request</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/toast/create-company.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><!-- <p>Error creating company support request</p> --> <span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/toast/create-company.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>Successfully Created Company</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/toast/create-general-request.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>Error saving general support request</p><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/toast/create-general-request.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>Successfully saved General Support Request</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/toast/delete-general-request.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex=auto><p>An error occurred deleting this general support request</p><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/toast/delete-general-request.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>Successfully deleted General Support Request</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/toast/validation-doc.html\",\"<md-toast><div layout=row><md-icon ng-if=\\\"status == \\'error\\'\\\" class=text-danger>error</md-icon><md-icon ng-if=\\\"status == \\'success\\'\\\" class=green-color>check</md-icon><span flex=auto><!--<p>Error!!</p>--> <span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/forms/action-buttons.html\",\"<span ng-if=\\\"!vm.saveBtnShow && !vm.saveBtnShowNew\\\"><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.updateAccount(false) ng-disabled=\\\"vm.isLoad.account || checkValidation()\\\" type=submit class=\\\"btn btn-default\\\"><span ng-hide=vm.isLoad.contact translate=USER.SAVE></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.contact class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></span><span ng-if=vm.saveBtnShowNew><md-button class=\\\"md-raised md-accent btn-block-xs save-button\\\" ng-click=vm.updateAccount(false) type=submit class=\\\"btn btn-default\\\"><span ng-hide=vm.isLoad.contact translate=USER.SAVE></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.contact class=md-hue-1 md-diameter=30px></md-progress-circular></md-button></span><md-button class=\\\"md-raised md-accent btn-block-xs\\\" ng-click=vm.updateAccount(true) ng-disabled=\\\"vm.isLoad.account || checkValidation()\\\" type=submit class=\\\"btn btn-default\\\" ng-show=vm.isCreate><span ng-hide=vm.isLoad.account translate=USER.SAVE_AND_NEW></span><md-progress-circular md-mode=indeterminate ng-hide=!vm.isLoad.account class=md-hue-1 md-diameter=30px></md-progress-circular></md-button><!-- <md-button class=\\\"md-raised md-accent btn-block-xs\\\" \\r\\n ng-click=\\\"vm.showModal(ev, \\'resend-confirmation-check\\')\\\" \\r\\n ng-disabled=\\\"vm.isLoad.account\\\"\\r\\n type=\\\"submit\\\" \\r\\n class=\\\"btn btn-default\\\"\\r\\n ng-show=\\\"!vm.isCreate && !vm.user.confirmed\\\">\\r\\n <span ng-hide=\\\"vm.isLoad.account\\\" translate=\\\"Resend Confirmation\\\"> </span>\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" ng-hide=\\\"!vm.isLoad.account\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>\\r\\n</md-button> -->\");\n$templateCache.put(\"/app/admin/users/forms/bulk-menu-actions.html\",\"<style>@media only screen and (min-width: 320px) and (max-width: 768px){\\r\\n.manage-users-bulk{\\r\\n margin-left: 260px !important;\\r\\n}\\r\\n}</style><md-menu><md-button class=\\\"md-icon-button manage-users-bulk\\\" ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-disabled=\\\"tctrl.getSelectedCount()==0\\\" class=md-primary ng-click=tctrl.bulkEdit()><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.EDIT></span></p></div></md-button></md-menu-item><!--<md-menu-item>--><!--<md-button--><!--ng-disabled=\\\"null_length == 0 || inactive_user_length > 0 || active_user_length > 0--><!--|| issue_ad_length > 0 || issue_nonad_length > 0--><!--|| no_security_length > 0 || unverified_length > 0--><!--|| (tctrl.getSelectedCount(\\'delete\\')-ad_user_length == 0)--><!--|| tctrl.getSelectedCount(\\'delete\\')==0\\\"--><!--class=\\\"md-primary\\\" --><!--ng-click=\\\"tctrl.showModal(ev, \\'bulk-delete-users\\')\\\">--><!--<div layout=\\\"row\\\" flex=\\\"auto\\\">--><!--<p flex=\\\"auto\\\"><span translate=\\\"USER.BULK.DELETE\\\"></span></p>--><!--</div>--><!--</md-button>--><!--</md-menu-item>--><md-menu-item><md-button ng-disabled=\\\"inactive_user_length == 0 || active_user_length > 0\\r\\n || issue_ad_length > 0 || issue_nonad_length > 0\\r\\n || no_security_length > 0 || unverified_length > 0 || null_length > 0\\r\\n || (tctrl.getSelectedCount(\\'delete\\')-ad_user_length == 0)\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'bulk-activate-users\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.ACTIVATE></span></p></div></md-button></md-menu-item><!-- <md-menu-item>\\r\\n <md-button\\r\\n ng-disabled=\\\"inactive_user_length > 0 || (active_user_length == 0 && unverified_length == 0)\\r\\n || issue_ad_length > 0 || issue_nonad_length > 0\\r\\n || no_security_length > 0 || null_length > 0\\r\\n || (tctrl.getSelectedCount(\\'delete\\')-ad_user_length == 0)\\r\\n || tctrl.getSelectedCount(\\'delete\\')==0\\\"\\r\\n class=\\\"md-primary\\\"\\r\\n ng-click=\\\"tctrl.showModal(ev, \\'bulk-deactivate-users\\')\\\">\\r\\n <div layout=\\\"row\\\" flex=\\\"auto\\\">\\r\\n <p flex=\\\"auto\\\"><span translate=\\\"USER.BULK.DEACTIVATE\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item> --><md-menu-item><md-button ng-disabled=\\\"inactive_user_length > 0 || null_length > 0 || issue_ad_length > 0 || issue_nonad_length > 0 ||\\r\\n (tctrl.getSelectedCount(\\'delete\\')-ad_user_length == 0)\\r\\n || tctrl.getSelectedCount(\\'delete\\')==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'bulk-deactivate-users\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.DEACTIVATE></span></p></div></md-button></md-menu-item><!-- <md-menu-item>\\r\\n>>>>>>> do_develop\\r\\n <md-button\\r\\n ng-disabled=\\\"(inactive_user_length == 0 && null_length == 0) || active_user_length > 0\\r\\n || issue_ad_length > 0 || issue_nonad_length > 0\\r\\n || no_security_length > 0 || unverified_length > 0\\r\\n || (tctrl.getSelectedCount(\\'delete\\')-ad_user_length == 0)\\r\\n || tctrl.getSelectedCount(\\'delete\\')==0\\\"\\r\\n class=\\\"md-primary\\\"\\r\\n ng-click=\\\"tctrl.showModal(ev, \\'bulk-delete-users\\')\\\">\\r\\n <div layout=\\\"row\\\" flex=\\\"auto\\\">\\r\\n <p flex=\\\"auto\\\"><span translate=\\\"USER.BULK.DELETE\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item> --><md-menu-item><md-button ng-disabled=\\\"issue_ad_length > 0 || active_user_length > 0 || unverified_length > 0 || no_security_length > 0\\r\\n || issue_nonad_length1 > 0\\r\\n || (tctrl.getSelectedCount(\\'delete\\')-ad_user_length == 0)\\r\\n || tctrl.getSelectedCount(\\'delete\\')==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'bulk-delete-users\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.DELETE></span></p></div></md-button></md-menu-item><!-- Okta buttons --><md-menu-item><md-button ng-disabled=\\\"inactive_user_length > 0 || active_user_length > 0\\r\\n || issue_ad_length > 0 || issue_nonad_length > 0\\r\\n || no_security_length > 0 || unverified_length == 0 || null_length > 0\\r\\n || (tctrl.getSelectedCount(\\'delete\\')-ad_user_length == 0)\\r\\n || tctrl.getSelectedCount(\\'delete\\')==0\\\" class=md-primary ng-click=\\\"tctrl.showModal(ev, \\'bulk-resend-verification\\')\\\"><div layout=row flex=auto><p flex=auto><span>Re-send verification email</span></p></div></md-button></md-menu-item><!--<md-menu-item>--><!--<md-button--><!--ng-disabled=\\\"inactive_user_length > 0 || active_user_length > 0--><!--|| issue_ad_length > 0 || issue_nonad_length == 0--><!--|| no_security_length > 0 || unverified_length > 0 || null_length > 0--><!--|| (tctrl.getSelectedCount(\\'delete\\')-ad_user_length == 0)--><!--|| tctrl.getSelectedCount(\\'delete\\')==0\\\"--><!--class=\\\"md-primary\\\"--><!--ng-click=\\\"tctrl.showModal(ev, \\'bulk-delete-resend-verification\\')\\\">--><!--<div layout=\\\"row\\\" flex=\\\"auto\\\">--><!--<p flex=\\\"auto\\\"><span>Delete & Re-send verification email</span></p>--><!--</div>--><!--</md-button>--><!--</md-menu-item>--><!--<md-menu-item>--><!--<md-button--><!--ng-disabled=\\\"inactive_user_length > 0 || active_user_length > 0--><!--|| issue_ad_length == 0 || issue_nonad_length > 0--><!--|| no_security_length > 0 || unverified_length > 0 || null_length > 0--><!--|| !(issue_ad_length == tctrl.getSelectedCount(\\'delete\\'))--><!--|| tctrl.getSelectedCount(\\'delete\\')==0\\\"--><!--class=\\\"md-primary\\\"--><!--ng-click=\\\"tctrl.showModal(ev, \\'bulk-reimport-verification\\')\\\">--><!--<div layout=\\\"row\\\" flex=\\\"auto\\\">--><!--<p flex=\\\"auto\\\"><span>Re-import</span></p>--><!--</div>--><!--</md-button>--><!--</md-menu-item>--><!--<md-menu-item>--><!--<md-button--><!--ng-disabled=\\\"inactive_user_length > 0 || active_user_length > 0--><!--|| issue_ad_length > 0 || issue_nonad_length > 0--><!--|| no_security_length == 0 || unverified_length > 0 || null_length > 0--><!--|| (tctrl.getSelectedCount(\\'delete\\')-ad_user_length == 0)--><!--|| tctrl.getSelectedCount(\\'delete\\')==0\\\"--><!--class=\\\"md-primary\\\"--><!--ng-click=\\\"tctrl.showModal(ev, \\'bulk-resend-immediateaction-verification\\')\\\">--><!--<div layout=\\\"row\\\" flex=\\\"auto\\\">--><!--<p flex=\\\"auto\\\"><span>Re-send Immediate Action email</span></p>--><!--</div>--><!--</md-button>--><!--</md-menu-item>--><!--<md-menu-item>--><!--<md-button--><!--ng-disabled=\\\"inactive_user_length > 0 || (active_user_length == 0 && reset_user_length == 0)--><!--|| issue_ad_length > 0 || issue_nonad_length > 0--><!--|| no_security_length > 0 || unverified_length > 0 || null_length > 0--><!--|| (tctrl.getSelectedCount(\\'delete\\')-ad_user_length == 0)--><!--|| tctrl.getSelectedCount(\\'delete\\')==0\\\"--><!--class=\\\"md-primary\\\" --><!--ng-click=\\\"tctrl.showModal(ev, \\'reset-password-and-security-question\\')\\\">--><!--<div layout=\\\"row\\\" flex=\\\"auto\\\">--><!--<p flex=\\\"auto\\\"><span translate=\\\"USER.BULK.RESET_PASSWORD_AND_SECURITY_QUESTION\\\"></span></p>--><!--</div>--><!--</md-button>--><!--</md-menu-item>--></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/users/forms/menu-action-buttons.html\",\"<md-menu ng-if=!vm.isCreate><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><!-- <md-menu-item ng-if=\\\"vm.user.is_active\\\">\\r\\n <md-button ng-disabled=\\\"ad_user_enable\\\" class=\\\"md-primary\\\" ng-click=\\\"vm.showModal(ev, \\'deactivate-user\\')\\\">\\r\\n <div layout=\\\"row\\\" flex=\\\"auto\\\">\\r\\n <p flex=\\\"auto\\\"><span translate=\\\"USER.DEACTIVATE\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item> --><md-menu-item ng-if=\\\"!vm.isCreate && (vm.user.user_status == \\'bad state\\' && vm.user.ad_user == false)\\\"><md-button ng-disabled=vm.isLoad.account class=md-primary ng-click=\\\"vm.showModal(ev, \\'delete-user\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.DELETE></span></p></div></md-button></md-menu-item><md-menu-item ng-if=\\\"!vm.isCreate && (vm.user.user_status == \\'unverified\\')\\\"><md-button ng-disabled=vm.isLoad.account class=md-primary ng-click=\\\"vm.showModal(ev, \\'resend-confirmation-check\\')\\\"><div layout=row flex=auto><p flex=auto><span>Re-send verification email</span></p></div></md-button></md-menu-item><md-menu-item ng-if=\\\"!vm.isCreate && ((vm.user.user_status == \\'active\\' && vm.user.ad_user == false) || vm.user.user_status == \\'unverified\\' || vm.user.user_status == \\'no-security\\' || (vm.user.user_status == \\'issue(non-ad)\\' && vm.user.is_active == true))\\\"><md-button ng-disabled=vm.isLoad.account class=md-primary ng-click=\\\"vm.showModal(ev, \\'deactivate-user\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.DEACTIVATE></span></p></div></md-button></md-menu-item><md-menu-item ng-if=\\\"!vm.isCreate && (vm.user.user_status == \\'inactive\\')\\\"><md-button ng-disabled=vm.isLoad.account class=md-primary ng-click=\\\"vm.showModal(ev, \\'activate-user\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.ACTIVATE></span></p></div></md-button></md-menu-item><md-menu-item ng-if=\\\"!vm.isCreate && (vm.user.user_status == \\'inactive\\' || (vm.user.user_status == \\'issue(non-ad)\\' && vm.user.is_active == false))\\\"><md-button ng-disabled=vm.isLoad.account class=md-primary ng-click=\\\"vm.showModal(ev, \\'delete-user\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=USER.BULK.DELETE></span></p></div></md-button></md-menu-item><!--<md-menu-item ng-if=\\\"!vm.isCreate && (vm.user.user_status == \\'issue(ad)\\')\\\">--><!--<md-button ng-disabled=\\\"vm.isLoad.account\\\" class=\\\"md-primary\\\" ng-click=\\\"vm.showModal(ev, \\'reimport-verification\\')\\\">--><!--<div layout=\\\"row\\\" flex=\\\"auto\\\">--><!--<p flex=\\\"auto\\\"><span>Re-import</span></span></p>--><!--</div>--><!--</md-button>--><!--</md-menu-item>--><!--<md-menu-item ng-if=\\\"!vm.isCreate && (vm.user.user_status == \\'issue(non-ad)\\' && vm.user.is_active == false)\\\">--><!--<md-button ng-disabled=\\\"vm.isLoad.account\\\" class=\\\"md-primary\\\" ng-click=\\\"vm.showModal(ev, \\'delete-resend-verification\\')\\\">--><!--<div layout=\\\"row\\\" flex=\\\"auto\\\">--><!--<p flex=\\\"auto\\\"><span>Delete & Re-send verification email</span></span></p>--><!--</div>--><!--</md-button>--><!--</md-menu-item>--><!--<md-menu-item ng-if=\\\"!vm.isCreate && (vm.user.user_status == \\'no-security\\')\\\">--><!--<md-button ng-disabled=\\\"vm.isLoad.account\\\" class=\\\"md-primary\\\" ng-click=\\\"vm.showModal(ev, \\'resend-immediateaction-verification\\')\\\">--><!--<div layout=\\\"row\\\" flex=\\\"auto\\\">--><!--<p flex=\\\"auto\\\"><span>Re-send Immediate Action email</span></span></p>--><!--</div>--><!--</md-button>--><!--</md-menu-item>--><!-- For AD Users --><!--<md-menu-item ng-if=\\\"vm.user.ad_user\\\">--><!--<md-button ng-disabled=\\\"vm.user.synced_with_ad\\\" class=\\\"md-primary\\\" ng-click=\\\"vm.showADUserView(ev, \\'aduser\\')\\\">--><!--<div layout=\\\"row\\\" flex=\\\"auto\\\">--><!--<p flex=\\\"auto\\\"><span>Re-sync data with AD</span></p>--><!--</div>--><!--</md-button>--><!--</md-menu-item>--><!-- End --><!-- <md-menu-item ng-if=\\\"!vm.user.confirmed && vm.canSetSuperAdmin()\\\">\\r\\n <md-button class=\\\"md-primary\\\" ng-disabled=\\\"!vm.user.password_confirmation\\\" ng-click=\\\"vm.showModal(ev, \\'force-verify-user\\')\\\">\\r\\n <div layout=\\\"row\\\" flex=\\\"auto\\\">\\r\\n <p ng-if=\\\"vm.user.password_confirmation\\\" flex=\\\"auto\\\">{{\\'USER.VERIFY\\' | translate}}</p>\\r\\n <p ng-if=\\\"!vm.user.password_confirmation\\\" flex=\\\"auto\\\">{{\\'USER.VERIFY_PASSWORD\\' | translate}}</p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item> --><!-- <md-menu-item ng-if=\\\"!vm.user.is_active\\\">\\r\\n <md-button class=\\\"md-primary\\\" ng-click=\\\"vm.showModal(ev, \\'activate-user\\')\\\">\\r\\n <div layout=\\\"row\\\" flex=\\\"auto\\\">\\r\\n <p flex=\\\"auto\\\"><span translate=\\\"USER.ACTIVATE\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n <md-menu-item ng-if=\\\"!vm.user.is_active\\\">\\r\\n <md-button class=\\\"md-primary\\\" ng-click=\\\"vm.showModal(ev, \\'delete-user\\')\\\">\\r\\n <div layout=\\\"row\\\" flex=\\\"auto\\\">\\r\\n <p flex=\\\"auto\\\"><span translate=\\\"USER.DELETE\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item> --></md-menu-content></md-menu>\");\n$templateCache.put(\"/app/admin/users/forms/search.html\",\"<div layout=row><div flex=95 class=flex-transition><div><h3><md-icon class=m-r-xs>search</md-icon><span style=text-transform:uppercase translate=USER.LOOKUP_USER></span></h3></div></div><md-button style=margin-top:9px class=\\\"md-fab md-mini btn-collapse\\\" aria-label=Open/Close ng-click=toggleCollapse()><md-icon>{{collapsed ? \\'expand_more\\' : \\'expand_less\\'}}</md-icon></md-button></div><div ng-show=!collapsed><form><div layout-gt-sm=row><div flex=48><md-input-container class=\\\"md-block m-t-0\\\" flex-gt-sm=auto><label translate=USER.FIRST_NAME></label><input ng-model=vm.lookup.first_name ng-keyup=vm.userSearch()><!-- <md-icon></md-icon> --></md-input-container></div><div flex=48 flex-offset-gt-sm=5><md-input-container class=\\\"md-block m-t-0\\\" flex-gt-sm=auto><label translate=USER.LAST_NAME></label><input ng-model=vm.lookup.last_name ng-keyup=vm.userSearch()></md-input-container></div></div><div layout-gt-sm=row><div flex=48><md-input-container class=\\\"md-block m-t-0\\\" flex-gt-sm=auto><label translate=USER.COMPANY></label><input ng-model=vm.lookup.company.name ng-keyup=vm.userSearch()></md-input-container></div><!-- <div flex=\\\"48\\\" flex-offset-gt-sm=\\\"5\\\">\\r\\n <md-input-container class=\\\"md-block m-t-0\\\" flex-gt-sm=\\\"auto\\\">\\r\\n <label translate=\\\"USER.GROUP\\\"></label>\\r\\n <input ng-model=\\\"vm.lookup.group\\\">\\r\\n </md-input-container>\\r\\n </div> --></div><div layout-gt-sm=row><div flex=48><md-input-container class=\\\"md-block m-t-0\\\" flex-gt-sm=auto><label translate=USER.EMAIL></label><input ng-model=vm.lookup.email ng-keyup=vm.userSearch()></md-input-container></div><!--\\r\\n <div flex=\\\"48\\\" flex-offset-gt-sm=\\\"5\\\">\\r\\n <md-input-container class=\\\"md-block m-t-0\\\" flex-gt-sm>\\r\\n <label>USER.STATE</label>\\r\\n <md-select ng-model=\\\"vm.lookup.active\\\" placeholder=\\\"Select User State\\\">\\r\\n <md-option ng-value=\\\"opt\\\" ng-repeat=\\\"opt in vm.user_states\\\">{{opt}}</md-option>\\r\\n </md-select>\\r\\n </md-input-container>\\r\\n </div>\\r\\n\t\t--></div><div layout-gt-sm=row><div id=company-customer-type flex=50 flex-gt-sm=row><h3><span style=\\\"font-size: 15px\\\">Filter Search by Customer Type</span></h3><div layout=row style=\\\"position: relative\\\"><div layout=row layout-align=\\\"space-around center\\\" flex=100 flex-gt-sm=row class=dotted-style><div class=checkbox-customer-type><md-checkbox ng-keyup=vm.userSearch() ng-change=vm.CustomerFilter(vm.cww_filter) ng-model=vm.cww_filter aria-label=cww class=md-primary></md-checkbox>CWW</div><div class=checkbox-customer-type><md-checkbox ng-keyup=vm.userSearch() ng-change=vm.CustomerFilter(vm.csl_filter) ng-model=vm.csl_filter aria-label=csl class=md-primary></md-checkbox>CSL</div><div class=checkbox-customer-type><md-checkbox ng-keyup=vm.userSearch() ng-change=vm.CustomerFilter(vm.cfs_filter) ng-model=vm.cfs_filter aria-label=cfs class=md-primary></md-checkbox>CFS</div><div class=checkbox-customer-type><md-checkbox ng-keyup=vm.userSearch() ng-change=vm.CustomerFilter(vm.cmts_filter) ng-model=vm.cmts_filter aria-label=cmts class=md-primary></md-checkbox>CMTS</div></div>     <div style=\\\"position: absolute;top: 80px;background-color: #050a25;left: 35%\\\"><span style=\\\"float: left\\\">  *<span style=\\\"font-size: 15px;color: #fff\\\">Only</span>  </span> <span style=\\\"float: left\\\"><md-switch ng-disabled=vm.filterCheck ng-keyup=vm.userSearch() style=\\\"display: block;margin:0 !important\\\" ng-model=vm.filter_only></md-switch></span>  </div></div></div><div flex=20 flex-gt-sm=row style=\\\"margin: 80px 0 50px\\\"><span style=\\\"font-style: italic;font-size: 12px\\\">* Turn on <span style=\\\"font-size: 15px;color: #fff;font-weight: bold\\\">Only</span> to filter selected Customer Types specific to search criteria.</span></div></div><hr><div layout=row><span flex=auto></span><md-button class=\\\"md-raised btn btn-default\\\" ng-click=vm.userSearch(true)><md-icon>clear</md-icon>Clear</md-button><md-button class=\\\"md-primary md-raised btn btn-default\\\" ng-click=toggleCollapse();vm.userSearchFilter() ng-disabled=\\\"vm.userSearchNotEnable && vm.filterCheck\\\"><md-icon>search</md-icon>Search</md-button></div></form></div>\");\n$templateCache.put(\"/app/admin/users/modals/activate-user.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'USER.ACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'USER.ACTIVATE_CONFIRM\\' | translate}}</p><p>{{vm.getName()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.activateUser() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/aduser.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>Re-sync AD Data</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This action will Resync the data of the user with the data from Active Directory. All local changes will be lost.</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.updateAdUserData() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/api-error.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'ADMIN.ERROR_CREATING_ACCOUNT\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><ul><li ng-repeat=\\\"message in apiErrorMessages\\\">{{ message }}</li></ul></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'CLOSE\\' | translate}}</md-button><span flex=auto></span></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/bulk-activate-users.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'USER.BULK.ACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span translate=USER.BULK.ACTIVATE_CONFIRM></span> {{ inactive_user_length }} <span class=lowercase translate=USER.USERS></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-show=\\\"inactive_user_length > 0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"inactive_user_length <=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-show=\\\"{{inactive_user_length > 0}}\\\" callfunction=tctrl.bulkActivate() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/bulk-deactivate-users.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'USER.BULK.DEACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-if=\\\"ad_user_check == false\\\"><span translate=USER.BULK.DEACTIVATE_CONFIRM></span>{{ (active_user_length + issue_nonad_length1 + no_security_length + unverified_length) }} <span class=lowercase translate=USER.USERS></span> </span><span ng-if=\\\"ad_user_check == true && (null_length == 0 && inactive_user_length == 0)\\\">Selection contains {{ ad_user_length }} AD-Users and {{ tctrl.getSelectedCount(\\'deactivate\\')-ad_user_length }} Non AD-Users. This selection will de-activate only {{ (active_user_length + issue_nonad_length1 + no_security_length + unverified_length - ad_user_length)}} Non AD-Users. </span><span ng-if=\\\"ad_user_check == true && (null_length > 0 || inactive_user_length > 0)\\\">Selection contains {{ ad_user_length }} AD-Users and {{ tctrl.getSelectedCount(\\'deactivate\\')-ad_user_length }} Non AD-Users. This selection will de-activate only {{ (active_user_length + issue_nonad_length1 + no_security_length + unverified_length + null_length + inactive_user_length - ad_user_length)}} Non AD-Users.</span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-if=\\\"tctrl.getSelectedCount(\\'deactivate\\')>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"tctrl.getSelectedCount(\\'deactivate\\')<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-if=\\\"tctrl.getSelectedCount(\\'deactivate\\')>0\\\" callfunction=tctrl.bulkDeactivate() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/bulk-delete-resend-verification.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>DELETE & RE-SEND VERIFICATION EMAIL</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><!-- <md-dialog-content class=\\\"light-content md-padding\\\">\\r\\n <span translate=\\'USER.BULK.DELETE_CONFIRM\\'></span> {{ tctrl.getSelectedCount(\\'delete\\') }} <span class=\\\"lowercase\\\" translate=\\\"USER.USERS\\\"></span>\\r\\n </md-dialog-content> --><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-if=\\\"ad_user_check == false\\\"><span>This Action Will Delete & Re-send verification email to</span> {{ issue_nonad_length }} Non-AD Issue<!-- <span translate=\\'USER.BULK.DEACTIVATED\\'></span> --> <span class=lowercase translate=USER.USERS></span> </span><span ng-if=\\\"ad_user_check == true\\\">Selection contains {{ ad_user_length }} AD-Users and {{ tctrl.getSelectedCount(\\'delete\\')-ad_user_length }} Non AD-Users. This selection will delete only {{ issue_nonad_length }} Non AD-Users.</span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-if=\\\"issue_nonad_length>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"issue_nonad_length<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-if=\\\"issue_nonad_length>0\\\" callfunction=tctrl.bulkDeleteAndResendVerificationEmail() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/bulk-delete-users.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'USER.BULK.DELETE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><!-- <md-dialog-content class=\\\"light-content md-padding\\\">\\r\\n <span translate=\\'USER.BULK.DELETE_CONFIRM\\'></span> {{ tctrl.getSelectedCount(\\'delete\\') }} <span class=\\\"lowercase\\\" translate=\\\"USER.USERS\\\"></span>\\r\\n </md-dialog-content> --><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-if=\\\"ad_user_check == false\\\"><span translate=USER.BULK.DELETE_CONFIRM></span> <span>{{inactive_user_length + issue_nonad_length + null_length}}</span><!-- <span ng-if=\\\"inactive_user_length > 0\\\"> {{ inactive_user_length }} Inactive </span> --><!-- <span ng-if=\\\"null_length > 0\\\"> {{ null_length }} Bad State </span>\\r\\n <span ng-if=\\\"null_length == 0 && inactive_user_length == 0\\\"> {{ null_length + inactive_user_length }} </span> --><!-- <span translate=\\'USER.BULK.DEACTIVATED\\'></span> --> <span class=lowercase translate=USER.USERS></span> </span><!-- <span ng-if=\\\"ad_user_check == true\\\">\\r\\n Selection contains {{ ad_user_length }} AD-Users and {{ tctrl.getSelectedCount(\\'delete\\')-ad_user_length }} Non AD-Users. This selection will delete only {{ inactive_user_length }} Inactive Non AD-Users.\\r\\n </span> --> <span ng-if=\\\"ad_user_check == true\\\">Selection contains {{ ad_user_length }} AD-Users and {{ tctrl.getSelectedCount(\\'delete\\')-ad_user_length }} Non AD-Users. This selection will delete only {{ inactive_user_length + issue_nonad_length + null_length - ad_user_length }} Non AD-Users.</span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-if=\\\"tctrl.getSelectedCount(\\'delete\\')>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"tctrl.getSelectedCount(\\'delete\\')<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-if=\\\"tctrl.getSelectedCount(\\'delete\\')>0\\\" callfunction=tctrl.bulkDelete() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/bulk-reimport-verification.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>RE IMPORT</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><!-- <md-dialog-content class=\\\"light-content md-padding\\\">\\r\\n <span translate=\\'USER.BULK.DELETE_CONFIRM\\'></span> {{ tctrl.getSelectedCount(\\'delete\\') }} <span class=\\\"lowercase\\\" translate=\\\"USER.USERS\\\"></span>\\r\\n </md-dialog-content> --><md-dialog-content class=\\\"light-content md-padding\\\"><span><span>This Action Will Re-import</span> {{ issue_ad_length }} AD-issue<!-- <span translate=\\'USER.BULK.DEACTIVATED\\'></span> --> <span class=lowercase translate=USER.USERS></span> </span><!-- <span ng-if=\\\"ad_user_check == true\\\">\\r\\n Selection contains {{ ad_user_length }} AD-Users and {{ tctrl.getSelectedCount(\\'delete\\')-ad_user_length }} Non AD-Users. This selection will delete only {{ issue_ad_length }} Non AD-Users.\\r\\n </span> --></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-if=\\\"issue_ad_length>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"issue_ad_length<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-if=\\\"issue_ad_length>0\\\" callfunction=tctrl.bulkReimportUsers() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/bulk-resend-immediateaction-verification.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>RE-SEND IMMEDIATE ACTION EMAIL</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><!-- <md-dialog-content class=\\\"light-content md-padding\\\">\\r\\n <span translate=\\'USER.BULK.DELETE_CONFIRM\\'></span> {{ tctrl.getSelectedCount(\\'delete\\') }} <span class=\\\"lowercase\\\" translate=\\\"USER.USERS\\\"></span>\\r\\n </md-dialog-content> --><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-if=\\\"ad_user_check == false\\\"><span>This Action Will Re-send immediate action email to</span> {{ no_security_length }}<!-- <span translate=\\'USER.BULK.DEACTIVATED\\'></span> --> <span class=lowercase translate=USER.USERS></span> </span><span ng-if=\\\"ad_user_check == true\\\">Selection contains {{ ad_user_length }} AD-Users and {{ tctrl.getSelectedCount(\\'delete\\')-ad_user_length }} Non AD-Users. This selection will delete only {{ no_security_length }} Non AD-Users.</span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-if=\\\"no_security_length>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"no_security_length<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-if=\\\"no_security_length>0\\\" callfunction=tctrl.bulkResendImmediateActionEmail() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/bulk-resend-verification.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>RE-SEND VERIFICATION EMAIL</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><!-- <md-dialog-content class=\\\"light-content md-padding\\\">\\r\\n <span translate=\\'USER.BULK.DELETE_CONFIRM\\'></span> {{ tctrl.getSelectedCount(\\'delete\\') }} <span class=\\\"lowercase\\\" translate=\\\"USER.USERS\\\"></span>\\r\\n </md-dialog-content> --><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-if=\\\"ad_user_check == false\\\"><span>This Action Will Re-send verification email to</span> {{ unverified_length }} Unverified<!-- <span translate=\\'USER.BULK.DEACTIVATED\\'></span> --> <span class=lowercase translate=USER.USERS></span> </span><span ng-if=\\\"ad_user_check == true\\\">Selection contains {{ ad_user_length }} AD-Users and {{ tctrl.getSelectedCount(\\'delete\\')-ad_user_length }} Non AD-Users. This selection will delete only {{ unverified_length }} Unverified Non AD-Users.</span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-if=\\\"unverified_length>0\\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"unverified_length<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-if=\\\"unverified_length>0\\\" callfunction=tctrl.bulkResendVerificationEmail() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/csl-all-clients.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{vm.selectAllClientRole}} EXCEPTIONS - ALL CLIENTS</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>By removing this permission, user will become general approver for the companies he assigned to.</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><!-- <md-button ng-click=\\\"vm.closeModal()\\\" ng-disabled=\\\"vm.isActionDisabled\\\">{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button> --> <span flex=auto></span><loading-button callfunction=vm.closeModal() display=OK isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/deactivate-user.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'USER.DEACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'USER.DEACTIVATE_CONFIRM\\' | translate}}</p><p>{{vm.getName()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.deactivateUser() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/delete-resend-verification.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>DELETE & RE-SEND VERIFICATION EMAIL</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This Action Will Delete & Re-send verification email to the user</p><p>{{vm.getName()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.deleteAndResend() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.resendConfirmation></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/delete-user.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'USER.DELETE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'USER.DELETE_CONFIRM\\' | translate}}</p><p>{{vm.getName()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.deleteUser() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/force-verify-user.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'USER.VERIFY\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'USER.VERIFY_CONFIRM\\' | translate}}</p><p>{{vm.getName()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.confirmUser() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/lensview-modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'USER.ACTIVATE\\' | translate}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>{{\\'USER.ACTIVATE_CONFIRM\\' | translate}}</p><p>{{vm.getName()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.activateUser() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/reimport-verification.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>RE IMPORT</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This action will Re-import the user</p><p>{{vm.getName()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.reimportUser() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.resendConfirmation></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/resend-confirmation-check.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2><span translate=USER.RESEND_CONFIRMATION></span></h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p><span translate=USER.RESEND_CONFIRMATION_CHECK></span></p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.resendConfirmation() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.resendConfirmation></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/resend-immediateaction-verification.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>RE-SEND IMMEDIATE ACTION EMAIL</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This Action Will Re-send immediate action email to the user</p><p>{{vm.getName()}}</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closeModal() ng-disabled=vm.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=vm.immediateActionEmail() display=ADMIN.POTENTIAL.CONFIRM isloading=vm.isActionLoading.resendConfirmation></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/reset-password-and-security-question.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>RESET PASSWORD & SECURITY QUESTION</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><!-- <md-dialog-content class=\\\"light-content md-padding\\\">\\r\\n <span translate=\\'USER.BULK.DELETE_CONFIRM\\'></span> {{ tctrl.getSelectedCount(\\'delete\\') }} <span class=\\\"lowercase\\\" translate=\\\"USER.USERS\\\"></span>\\r\\n </md-dialog-content> --><md-dialog-content class=\\\"light-content md-padding\\\"><span ng-if=\\\"ad_user_check == false\\\"><span ng-if=\\\"active_user_length > 0 && reset_user_length == 0\\\"><span>This action will send an email to</span> {{ active_user_length }} active users to reset their password and security question. </span></span><span ng-if=\\\"reset_user_length > 0 && active_user_length == 0 \\\"><span>This action will send an email to</span> {{ reset_user_length }} reset users to reset their password and security question. </span><span ng-if=\\\"reset_user_length > 0 && active_user_length > 0 \\\"><span>This action will send an email to</span> {{ active_user_length }} active and {{ reset_user_length }} reset users to reset their password and security question. </span><span ng-if=\\\"ad_user_check == true\\\">Selection contains {{ ad_user_length }} AD-Users and {{ tctrl.getSelectedCount(\\'delete\\')-ad_user_length }} Non AD-Users. This selection will delete only {{ active_user_length }} Active Non AD-Users.</span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-if=\\\"active_user_length > 0 || reset_user_length > 0 \\\" ng-click=tctrl.closeModal() ng-disabled=tctrl.isActionDisabled>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><md-button class=md-primary ng-show=\\\"active_user_length<=0\\\" ng-click=tctrl.closeModal()><span translate=ADMIN.CLOSE></span></md-button><loading-button ng-if=\\\"active_user_length > 0 || reset_user_length > 0\\\" callfunction=tctrl.bulkResetPasswordAndSecurityQuestion() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/modals/save-user.modal.html\",\"\");\n$templateCache.put(\"/app/admin/users/modals/user-not-found.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>The user was not found</h2><span flex=auto></span><md-button class=md-icon-button ng-click=close()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><ul><li ng-repeat=\\\"message in templateMessages\\\">{{ message }}</li></ul></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=close()>Close</md-button><span flex=auto></span></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/users/toast/activate-user.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.ACTIVATED_ERROR\\' | translate}}</p></span><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/activate-user.success.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>{{\\'USER.ACTIVATED\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/activate-users.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.BULK.ACTIVATED_ERROR\\' | translate}}</p></span><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/activate-users.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><p>{{\\'USER.BULK.ACTIVATED\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/aduser.error.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>Resync with AD unsuccessful</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/aduser.success.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>Resync with AD successful</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/attach-doc.error.html\",\"<md-toast><div layout=row><md-icon class=text-error>error</md-icon><span flex><p>{{\\'USER.BULK.IMPORT_ERROR\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/attach-doc.invalid.error.html\",\"<md-toast><div layout=row><md-icon class=text-error>error</md-icon><span flex><p>{{\\'USER.BULK.INVALID_HEADERS\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/bulk-delete-resend-verification-email.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.BULK.ACTIVATED_ERROR\\' | translate}}</p></span><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/bulk-delete-resend-verification-email.success.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>Delete & Resend verification email sent successfully.</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/bulk-reimport-users.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.BULK.ACTIVATED_ERROR\\' | translate}}</p></span><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/bulk-reimport-users.success.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>Re-import users successfully.</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/bulk-resend-immediate-action-email.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.BULK.ACTIVATED_ERROR\\' | translate}}</p></span><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/bulk-resend-immediate-action-email.success.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>Resend immediate action email sent successfully.</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/bulk-resend-verification-email.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.BULK.ACTIVATED_ERROR\\' | translate}}</p></span><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/bulk-resend-verification-email.success.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>Resend verification email sent successfully.</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/bulk-reset-password-and-security-question-email.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.BULK.RESET_PASSWORD_AND_SECURITY_QUESTION_ERROR\\' | translate}}</p></span><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/bulk-reset-password-and-security-question-email.success.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>Reset password & Security Question email sent successfully..</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/create-account.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.ERROR_CREATE_ACCOUNT\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/create-account.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><p>{{\\'ADMIN.SUCCESS_CREATE_ACCOUNT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/deactivate-user.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.DEACTIVATED_ERROR\\' | translate}}{{debugger;name}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/deactivate-user.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><p>{{\\'USER.DEACTIVATED\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/deactivate-users.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.BULK.DEACTIVATED_ERROR\\' | translate}}{{debugger;name}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/deactivate-users.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><p>{{\\'USER.BULK.DEACTIVATED\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/default-columns-save-error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><p>{{\\'USER.DEFAULT_COLUMNS_SAVE_FALIURE\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/default-columns-save-sucess.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><span layout=row><p>{{\\'USER.DEFAULT_COLUMNS_SAVE_SUCCESS\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/delete-resend.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>An error occurred</p></span><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/delete-resend.success.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>Deleted & Re-sent verification email to the user</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/delete-user.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.DELETED_ERROR\\' | translate}}</p><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/delete-user.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><!-- <p>{{\\'USER.DELETED\\' | translate}}</p>\\r\\n <span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span> --><p>User removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/delete-users.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.BULK.DELETED_ERROR\\' | translate}}</p><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/delete-users.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><!-- <p>{{\\'USER.BULK.DELETED\\' | translate}}</p>\\r\\n <span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span> --><p>User removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/immediate-actionmail.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>An error occurred</p></span><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/immediate-actionmail.success.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>Re-sent immediate action email to the user</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/reimport-user.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>An error occurred</p></span><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/reimport-user.success.html\",\"<md-toast><div layout=row><md-icon class=text-success>check</md-icon><span flex><p>The User Account has been re imported</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/resend-confirmation.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.RESEND_CONFIRMATION_ERROR\\' | translate}}</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/resend-confirmation.success.html\",\"<md-toast><div layout=row><span flex><p>{{\\'USER.RESEND_CONFIRMATION_SUCCESS\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/update-account-invalid.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>Invalid Form</p><p>Please fill out the required fields</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/update-account.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'ADMIN.ERROR_UPDATE_ACCOUNT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/update-account.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><p>{{\\'ADMIN.SUCCESS_UPDATE_ACCOUNT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/update-contact.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'ADMIN.ERROR_UPDATE_CONTACT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/update-contact.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><p>{{\\'ADMIN.SUCCESS_UPDATE_CONTACT\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/update-role.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'ADMIN.ERROR_UPDATE_ROLE\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/users/toast/update-role.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><p>{{\\'ADMIN.SUCCESS_UPDATE_ROLE\\' | translate}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/components/widgets/cfs/bookmarked-shipments-results.html\",\"<div ng-if=!widgetsCfsCtrl.bookmarksError class=table-scroll><table class=card-content-table><thead><tr><th class=td-15><span translate=SHIPPINGDETAILS.PRO></span></th><th class=td-15><span translate=SHIPPINGDETAILS.PICKUP_ABBREVIATED></span> <span>→</span> <span translate=SHIPPINGDETAILS.DELIVERY_ABBREVIATED></span></th><th style=min-width:85px class=td-20 ng-if=\\\"widgetsCfsCtrl.page_name == \\'shipment\\'\\\"><span translate=SHIPPINGDETAILS.START_DATE></span></th><th style=min-width:85px class=td-20 ng-if=\\\"widgetsCfsCtrl.page_name == \\'shipment\\'\\\"><span translate=SHIPPINGDETAILS.DUE_DATE></span></th><th style=min-width:85px class=td-20 ng-if=\\\"widgetsCfsCtrl.page_name == \\'shipment\\'\\\"><span translate=SHIPPINGDETAILS.ESTIMATED_DELIVERY_ABBREVIATED></span></th><!--<th class=\\\"td-15\\\" ng-if=\\\"widgetsCfsCtrl.page_name == \\'dashboard\\'\\\">\\r\\n <span translate=\\\"SHIPPINGDETAILS.ETA_DATE\\\"></span>\\r\\n </th>\\r\\n <th class=\\\"td-15\\\" ng-if=\\\"widgetsCfsCtrl.page_name == \\'dashboard\\'\\\">\\r\\n <span translate=\\\"SHIPPINGDETAILS.ETA_TIME\\\"></span>\\r\\n </th>--><th class=td-20 ng-if=\\\"widgetsCfsCtrl.page_name == \\'dashboard\\'\\\"><span translate=ESTIMATED></span></th><th class=td-10><span translate=SHIPPINGDETAILS.EXCEPTION_ABBREVIATED></span></th><th class=td-15><span translate=SHIPPINGDETAILS.STATUS></span></th><th class=td-15><span translate=SHIPPINGDETAILS.MILESTONES></span></th><th class=td-15><span flex=auto></span><md-menu ng-if=\\\"widgetsCfsCtrl.bookmarksCount > 0\\\" md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4 style=\\\"z-index: 1000 !important\\\"><md-menu-item ng-hide=widgetsCfsCtrl.showRemoveButton><md-button ng-click=\\\"widgetsCfsCtrl.editBookmarks();widgetsCfsCtrl.showRemoveButton = true\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.EDIT></span></p></div></md-button></md-menu-item><md-menu-item ng-show=widgetsCfsCtrl.showRemoveButton><md-button ng-click=widgetsCfsCtrl.doneEditingBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.DONE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></th></tr></thead><tbody><tr ng-repeat=\\\"item in widgetsCfsCtrl.bookmarks\\\"><td><a target=_blank class=btn-link ng-href=/shipping-details-cfs/{{item.pro}} ng-click=vm.closeBookmarksModal() analytics-on analytics-category=Dashboard analytics-event=ClickBookmarkedShipment>{{item.pro}}</a></td><td ng-if=\\\"widgetsCfsCtrl.page_name == \\'shipment\\'\\\">{{item.load.origincity ? (item.load.origincity + \\\" \\\") : \\\"\\\"}}→{{item.load.destinationcity ? (\\\" \\\" + item.load.destinationcity) : \\\"\\\"}}</td><td ng-if=\\\"widgetsCfsCtrl.page_name == \\'shipment\\'\\\">{{item.load.pickupdate | date:\\'dd-MMM-yyyy\\'}}</td><td ng-if=\\\"widgetsCfsCtrl.page_name == \\'shipment\\'\\\">{{item.load.duedate | date:\\'dd-MMM-yyyy\\'}}</td><td ng-if=\\\"widgetsCfsCtrl.page_name == \\'shipment\\'\\\">{{item.load.consigneeapptdate | date:\\'dd-MMM-yyyy\\'}}</td><td ng-if=\\\"widgetsCfsCtrl.page_name == \\'dashboard\\'\\\">{{item.load.originstate}}  →  {{item.load.destinationstate}}</td><!--<td ng-if=\\\"widgetsCfsCtrl.page_name == \\'dashboard\\'\\\">{{item.load.estimateddelivery | date:\\'dd-MMM-yyyy\\'}} </td>\\r\\n <td ng-if=\\\"widgetsCfsCtrl.page_name == \\'dashboard\\'\\\">{{item.load.estimateddeliverytime | date:\\'hh:mm a\\'}}</td>--><td ng-if=\\\"widgetsCfsCtrl.page_name == \\'dashboard\\'\\\">{{item.load.consigneeapptdate | date:\\'dd-MMM-yyyy\\'}}   {{item.load.consigneeappttime | date:\\'hh:mm\\'}}</td><td><span class=hoverable><md-icon ng-show=item.load.exceptions.length class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\" ng-mouseover=widgetsCfsCtrl.getException(item.load.exceptions)></md-icon><md-tooltip md-direction=left><md-progress-circular md-mode=indeterminate class=\\\"md-warn md-hue-2\\\" ng-show=widgetsCfsCtrl.tooltipIsLoading></md-progress-circular><div ng-show=!widgetsCfsCtrl.tooltipIsLoading ng-repeat=\\\"exception in item.load.exceptions\\\"><p>Current Exception: <span>{{exception.pointname}}</span></p><p>Date / Time Created: <span>{{exception.created_at | date:\\'dd-MMM-yyyy\\'}}     {{exception.created_at | date:\\'hh:mm\\'}}</span></p></div></md-tooltip></span></td><td class=\\\"{{item.load.shipmentstatus == \\'UNDELIVERED\\' ? \\'text-success\\' : \\'\\'}}\\\">{{item.load.shipmentstatus}}</td><td>{{item.load.milestone}}</td><td><md-button ng-show=widgetsCfsCtrl.showRemoveButton class=\\\"md-raised btn-danger\\\" ng-click=widgetsCfsCtrl.unBookmarkId(item.pro) analytics-on analytics-category=Dashboard analytics-event=UnBookmarkShipment><span translate=WIDGETS.REMOVE></span></md-button></td></tr><tr ng-show=\\\"widgetsCfsCtrl.bookmarksCount < 1\\\"><td colspan=8><span translate=WIDGETS.NO_BOOKMARKS></span></td></tr></tbody></table></div><div ng-if=\\\"widgetsCfsCtrl.bookmarksError.length > 0\\\" layout=row><h3>{{widgetsCfsCtrl.bookmarksError}}</h3></div><style>.md-open-menu-container.md-whiteframe-z2.md-active.md-clickable {\\r\\n z-index: 100000000;\\r\\n }</style>\");\n$templateCache.put(\"/app/components/widgets/cfs/bookmarked-shipments.html\",\"<div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\" ng-disabled=\\\"widgetsCfsCtrl.switchUser == true\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=WIDGETS.BOOKMARKED_SHIPMENTS></span><md-progress-circular md-mode=indeterminate md-diameter=40px ng-show=\\\"!widgetsCfsCtrl.isBookmarksFirstLoad && !widgetsCfsCtrl.bookmarksLoaded\\\"></md-progress-circular></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\" ng-if=\\\"widgetsCfsCtrl.bookmarksCount > 0\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=widgetsCfsCtrl.editBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.EDIT></span></p></div></md-button></md-menu-item><md-menu-item ng-show=widgetsCfsCtrl.showRemoveButton><md-button ng-click=widgetsCfsCtrl.doneEditingBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.DONE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content class=p-0><!-- ng-show=\\\"widgetsCfsCtrl.bookmarksLoaded\\\" --><div><div ng-include=\\\"\\'/app/components/widgets/cfs/bookmarked-shipments-results.html\\'\\\"></div></div></md-card-content><div layout=row layout-align=\\\"center start\\\" flex=90 class=m-t><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=widgetsCfsCtrl.showRemoveButton ng-click=widgetsCfsCtrl.doneEditingBookmarks()><span translate=WIDGETS.DONE></span></md-button></div><div ng-if=\\\"widgetsCfsCtrl.switchUser == true\\\" class=uppercase style=\\\"text-align: center;color: #1E585C;font-size: 25px;margin-top:230px\\\"><md-icon aria-label=unavailable style=\\\"color: #1E585C;padding: 10px;font-size: 28px;margin-top: -10px\\\"></md-icon>unavailable in lens mode</div></div>\");\n$templateCache.put(\"/app/components/widgets/cfs/current-exceptions.html\",\"<md-card class=\\\"current-exceptions-widget widget loading-container\\\" flex=1><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=WIDGETS.CURRENT_EXCEPTIONS><!-- </span>\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" md-diameter=\\\"40px\\\" ng-show=\\\"!vm.isCurrentExceptionsFirstLoad && !vm.currentExceptionsLoaded\\\"></md-progress-circular></span> --></span></h2></div></md-toolbar><md-card-content flex=auto class=p-0 class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.currentExceptionLoading><div ng-show=vm.showLoading ng-if=\\\"!vm.currentExceptionsError && vm.currentExceptionLoading\\\" layout-gt-xs=row class=m-t-sm ng-class=\\\"{loaded: vm.currentExceptionsLoaded, \\'first-load\\': vm.isCurrentExceptionsFirstLoad, \\'loading-content\\': !vm.currentExceptionsLoaded}\\\" style=min-height:215px><div flex-gt-xs=50 class=text-center><donut-chart data=vm.currentExceptions data-theme=current-exceptions control=vm.currentExceptionsControl segment-class-map=vm.currentExceptionsSegmentClassMap></donut-chart></div><div flex-gt-xs=50 class=\\\"xs-p-xs p-t-0\\\"><p class=\\\"md-caption donut-bars\\\"><span translate=WIDGETS.CURRENT_EXCEPTIONS_DESC></span></p><ul layout-xs=row class=\\\"icon-list current_shipment_aljex\\\" style=\\\"margin: 0;padding: 0;display:flex\\\"><div flex=grow layout-gt-xs=column layout-xs=row><li flex=auto flex-xs=50 class=donut-bars layout-align-xs=\\\"start center\\\" ng-repeat=\\\"shiptype in vm.currentExceptions.slice(0,3)\\\" ng-mouseover=vm.currentExceptionsControl.growSegment(shiptype.type) ng-mouseleave=vm.currentExceptionsControl.restoreSegment(shiptype.type) ng-class=\\\"{highlighted: vm.currentExceptionsSegmentClassMap[shiptype.type]}\\\"><a href=\\\"/track-trace-cfs?shipment_status=undelivered&{{vm.donut_query[shiptype.type]}}¤t_exception=1&page_from=aljex\\\" analytics-on analytics-category=Dashboard analytics-event=TandT-current-exceptions-{{shiptype.type}}><div layout-align-xs=\\\"start center\\\" class=\\\"mode-wrapper {{shiptype.color}}\\\"><div class=\\\"mode-text padding-8px\\\"><md-icon aria-label={{shiptype.type}}-shipment class=\\\"display-block removeActiveCfsFont-{{$index}} font-22\\\" style=\\\"vertical-align: middle\\\"><span ng-bind-html=shiptype.icon></span></md-icon><span style=\\\"text-transform: capitalize\\\" class=xs-font-10>{{shiptype.type}}</span></div></div><span class=\\\"md-headline text-center number value-{{shiptype.shipments}}\\\"><counting-number>{{shiptype.shipments}}</counting-number></span></a></li></div></ul></div></div><div class=\\\"m-t m-b p-a-sm text-center\\\" ng-if=vm.currentExceptionsError>{{vm.currentExceptionsError}}</div></md-card-content></md-card><!-- <md-card layout-align=\\'center center\\' flex ng-show=\\\"!vm.showLoading\\\">\\r\\n <module-load-animation></module-load-animation>\\r\\n</md-card>\\r\\n -->\");\n$templateCache.put(\"/app/components/widgets/cfs/total-shipments.html\",\"<style type=text/css>@media screen and (max-width: 1054px) and (min-width: 960px){\\r\\n span#font-range { \\r\\n font-size: 13px;\\r\\n } \\r\\n }</style><md-card class=\\\"total-shipments-widget widget loading-container\\\" flex=1><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=WIDGETS.TOTAL_SHIPMENTS><!-- <md-progress-circular md-mode=\\\"indeterminate\\\" md-diameter=\\\"40px\\\" ng-show=\\\"!vm.isActiveShipmentsFirstLoad && !vm.activeShipmentsLoaded\\\"></md-progress-circular></span> --></span></h2></div></md-toolbar><md-card-content flex=auto class=p-0 class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.currentShipmentsLoading><div layout-gt-xs=row class=m-t-sm ng-if=\\\"!vm.activeShipmentsError && vm.currentShipmentsLoading\\\" ng-class=\\\"{loaded: vm.activeShipmentsLoaded, \\'first-load\\': vm.isActiveShipmentsFirstLoad, \\'loading-content\\': !vm.activeShipmentsLoaded}\\\" style=min-height:215px><div flex-gt-xs=50 class=text-center><donut-chart data=vm.activeShipments data-theme=active-shipments control=vm.activeShipmentsControl segment-class-map=vm.activeShipmentsSegmentClassMap></donut-chart></div><div flex-gt-xs=50 class=\\\"xs-p-xs p-t-0\\\"><p class=\\\"md-caption donut-bars\\\"><span translate=WIDGETS.TOTAL_SHIPMENTS_DESC></span></p><ul layout-xs=row class=\\\"icon-list total_shipment_aljex\\\" style=\\\"margin: 0;padding: 0;display:flex\\\"><div flex=grow layout-gt-xs=column layout-xs=row><li flex=auto flex-xs=50 class=donut-bars layout-align-xs=\\\"start center\\\" ng-repeat=\\\"shiptype in vm.activeShipments.slice(0,3)\\\" ng-mouseover=vm.activeShipmentsControl.growSegment(shiptype.type) ng-mouseleave=vm.activeShipmentsControl.restoreSegment(shiptype.type) ng-class=\\\"{highlighted: vm.activeShipmentsSegmentClassMap[shiptype.type]}\\\"><a href=\\\"/track-trace-cfs?shipment_status=undelivered&{{vm.donut_query[shiptype.type]}}&page_from=aljex\\\" analytics-on analytics-category=Dashboard analytics-event=TandT-active-{{shiptype.type}} class=display-block><div class=\\\"mode-wrapper {{shiptype.color}}\\\" layout-align-xs=\\\"start center\\\"><div class=\\\"mode-text padding-8px\\\"><md-icon aria-label={{shiptype.type}}-shipment class=\\\"display-block removeActiveCfsFont-{{$index}} font-22\\\" style=\\\"vertical-align: middle\\\"><span ng-bind-html=shiptype.icon></span></md-icon><span style=\\\"text-transform: capitalize;vertical-align: middle\\\" class=xs-font-10>{{shiptype.type}}</span></div></div><span class=\\\"md-headline text-center number value-{{shiptype.shipments}}\\\"><counting-number>{{shiptype.shipments}}</counting-number></span></a></li></div></ul></div></div><!--<div class=\\\"m-t m-b p-a-sm text-center\\\" ng-if=\\'vm.activeShipmentsError\\'>\\r\\n {{vm.activeShipmentsError}}\\r\\n </div>--></md-card-content></md-card><!-- <md-card layout-align=\\'center center\\' flex ng-show=\\\"!vm.showLoading\\\">\\r\\n <module-load-animation></module-load-animation>\\r\\n</md-card> -->\");\n$templateCache.put(\"/app/components/widgets/cmts/bookmarked-shipments-results.html\",\"<div ng-if=!widgetsCmtsCtrl.bookmarksError class=table-scroll><table class=card-content-table><thead><tr><th class=td-15><span translate=SHIPPINGDETAILS.LOAD></span></th><th class=td-15><span translate=SHIPPINGDETAILS.PICKUP_ABBREVIATED></span> <span>→</span> <span translate=SHIPPINGDETAILS.DELIVERY_ABBREVIATED></span></th><th class=td-20><span translate=\\\"PLANNED START\\\"></span></th><th class=td-20><span translate=\\\"PLANNED END\\\"></span></th><!--<th class=\\\"td-10\\\">\\r\\n <span translate=\\\"SHIPPINGDETAILS.EXCEPTION_ABBREVIATED\\\"></span>\\r\\n </th>--><th class=td-15><span translate=SHIPPINGDETAILS.STATUS></span></th><!--<th class=\\\"td-15\\\">\\r\\n <span translate=\\\"SHIPPINGDETAILS.MILESTONES\\\"></span>\\r\\n </th>--><th class=td-15><span flex=auto></span><md-menu ng-if=\\\"widgetsCmtsCtrl.bookmarksCount > 0\\\" md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4 style=\\\"z-index: 1000 !important\\\"><md-menu-item ng-hide=widgetsCmtsCtrl.showRemoveButton><md-button ng-click=\\\"widgetsCmtsCtrl.editBookmarks();widgetsCmtsCtrl.showRemoveButton = true\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.EDIT></span></p></div></md-button></md-menu-item><md-menu-item ng-show=widgetsCmtsCtrl.showRemoveButton><md-button ng-click=widgetsCmtsCtrl.doneEditingBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.DONE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></th></tr></thead><tbody><tr ng-repeat=\\\"item in widgetsCmtsCtrl.bookmarks\\\"><td><a target=_blank class=btn-link ng-href=/shipping-details-cmts/{{item.load_id}} ng-click=vm.closeBookmarksModal() analytics-on analytics-category=Dashboard analytics-event=ClickBookmarkedShipment>{{item.load_cmts.load_number}}</a></td><td>{{item.load_cmts.origin_city ? (item.load_cmts.origin_city + \\\" \\\") : \\\"\\\"}}→{{item.load_cmts.destination_city ? (\\\" \\\" + item.load_cmts.destination_city) : \\\"\\\"}}</td><td>{{item.load_cmts.planned_start | date:\\'dd-MMM-yyyy hh:mm\\'}}</td><td>{{item.load_cmts.planned_end | date:\\'dd-MMM-yyyy hh:mm\\'}}</td><td class=\\\"{{item.load_cmts.load_status == \\'UNDELIVERED\\' ? \\'text-success\\' : \\'\\'}}\\\">{{item.load_cmts.load_status}}</td><td><md-button ng-show=widgetsCmtsCtrl.showRemoveButton class=\\\"md-raised btn-danger\\\" ng-click=widgetsCmtsCtrl.unBookmarkId(item.load_id) analytics-on analytics-category=Dashboard analytics-event=UnBookmarkShipment><span translate=WIDGETS.REMOVE></span></md-button></td></tr><tr ng-show=\\\"widgetsCmtsCtrl.bookmarksCount < 1\\\"><td colspan=8><span translate=WIDGETS.NO_BOOKMARKS></span></td></tr></tbody></table></div><div ng-if=\\\"widgetsCmtsCtrl.bookmarksError.length > 0\\\" layout=row><h3>{{widgetsCmtsCtrl.bookmarksError}}</h3></div><style>.md-open-menu-container.md-whiteframe-z2.md-active.md-clickable {\\r\\n z-index: 100000000;\\r\\n }</style>\");\n$templateCache.put(\"/app/components/widgets/cmts/bookmarked-shipments.html\",\"<div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\" ng-disabled=\\\"widgetsCmtsCtrl.switchUser == true\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=WIDGETS.BOOKMARKED_SHIPMENTS></span><md-progress-circular md-mode=indeterminate md-diameter=40px ng-show=\\\"!widgetsCmtsCtrl.isBookmarksFirstLoad && !widgetsCmtsCtrl.bookmarksLoaded\\\"></md-progress-circular></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\" ng-if=\\\"widgetsCmtsCtrl.bookmarksCount > 0\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=widgetsCmtsCtrl.editBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.EDIT></span></p></div></md-button></md-menu-item><md-menu-item ng-show=widgetsCmtsCtrl.showRemoveButton><md-button ng-click=widgetsCmtsCtrl.doneEditingBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.DONE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content class=p-0><div><div ng-include=\\\"\\'/app/components/widgets/cmts/bookmarked-shipments-results.html\\'\\\"></div></div></md-card-content><div layout=row layout-align=\\\"center start\\\" flex=90 class=m-t><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=widgetsCmtsCtrl.showRemoveButton ng-click=widgetsCmtsCtrl.doneEditingBookmarks()><span translate=WIDGETS.DONE></span></md-button></div><div ng-if=\\\"widgetsCmtsCtrl.switchUser == true\\\" class=uppercase style=\\\"text-align: center;color: #1E585C;font-size: 25px;margin-top:230px\\\"><md-icon aria-label=unavailable style=\\\"color: #1E585C;padding: 10px;font-size: 28px;margin-top: -10px\\\"></md-icon>unavailable in lens mode</div></div>\");\n$templateCache.put(\"/app/components/widgets/cmts/current-exceptions.html\",\"<md-card class=\\\"current-exceptions-widget widget loading-container\\\" flex=1><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=WIDGETS.CURRENT_EXCEPTIONS></span><!-- </span>\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" md-diameter=\\\"40px\\\" ng-show=\\\"!vm.isCurrentExceptionsFirstLoad && !vm.currentExceptionsLoaded\\\"></md-progress-circular></span> --></h2></div></md-toolbar><md-card-content flex=auto class=p-0 class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.currentExceptionLoading><div ng-show=vm.showLoading ng-if=\\\"!vm.currentExceptionsError && vm.currentExceptionLoading\\\" layout-gt-xs=row class=m-t-sm ng-class=\\\"{loaded: vm.currentExceptionsLoaded, \\'first-load\\': vm.isCurrentExceptionsFirstLoad, \\'loading-content\\': !vm.currentExceptionsLoaded}\\\" style=min-height:215px><div flex-gt-xs=50 class=text-center><donut-chart data=vm.currentExceptions data-theme=current-exceptions control=vm.currentExceptionsControl segment-class-map=vm.currentExceptionsSegmentClassMap></donut-chart></div><div flex-gt-xs=50 class=\\\"xs-p-xs p-t-0\\\"><p class=\\\"md-caption donut-bars\\\"><span translate=WIDGETS.CURRENT_EXCEPTIONS_DESC></span></p><ul layout-xs=row class=\\\"icon-list current_shipment_aljex\\\" style=\\\"margin: 0;padding: 0;display:flex\\\"><div flex=grow layout-gt-xs=column layout-xs=row><li flex=auto flex-xs=50 class=donut-bars layout-align-xs=\\\"start center\\\" ng-repeat=\\\"shiptype in vm.currentExceptions.slice(0,3)\\\" ng-mouseover=vm.currentExceptionsControl.growSegment(shiptype.type) ng-mouseleave=vm.currentExceptionsControl.restoreSegment(shiptype.type) ng-class=\\\"{highlighted: vm.currentExceptionsSegmentClassMap[shiptype.type]}\\\"><a href=\\\"/track-trace-cmts?status=undelivered&{{vm.donut_query[shiptype.type]}}¤t_exception=1&page_from=aljex\\\" analytics-on analytics-category=Dashboard analytics-event=TandT-current-exceptions-{{shiptype.type}}><div layout-align-xs=\\\"start center\\\" class=\\\"mode-wrapper {{shiptype.color}}\\\"><div class=\\\"mode-text padding-8px\\\"><md-icon aria-label={{shiptype.type}}-shipment class=\\\"display-block removeActiveCmtsFont-{{$index}} font-22\\\" style=\\\"vertical-align: middle\\\"><span ng-bind-html=shiptype.icon></span></md-icon><span style=\\\"text-transform: capitalize\\\" class=xs-font-10>{{shiptype.type}}</span></div></div><span class=\\\"md-headline text-center number value-{{shiptype.shipments}}\\\"><counting-number>{{shiptype.shipments}}</counting-number></span></a></li></div></ul></div></div><div class=\\\"m-t m-b p-a-sm text-center\\\" ng-if=vm.currentExceptionsError>{{vm.currentExceptionsError}}</div></md-card-content></md-card><!-- <md-card layout-align=\\'center center\\' flex ng-show=\\\"!vm.showLoading\\\">\\r\\n <module-load-animation></module-load-animation>\\r\\n</md-card>\\r\\n -->\");\n$templateCache.put(\"/app/components/widgets/cmts/total-shipments.html\",\"<style type=text/css>@media screen and (max-width: 1054px) and (min-width: 960px){\\r\\n span#font-range {\\r\\n font-size: 13px;\\r\\n }\\r\\n }</style><md-card class=\\\"total-shipments-widget widget loading-container\\\" flex=1><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=WIDGETS.TOTAL_SHIPMENTS></span><!-- <md-progress-circular md-mode=\\\"indeterminate\\\" md-diameter=\\\"40px\\\" ng-show=\\\"!vm.isActiveShipmentsFirstLoad && !vm.activeShipmentsLoaded\\\"></md-progress-circular></span> --></h2></div></md-toolbar><md-card-content flex=auto class=p-0 class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.currentShipmentsLoading><div layout-gt-xs=row class=m-t-sm ng-if=\\\"!vm.activeShipmentsError && vm.currentShipmentsLoading\\\" ng-class=\\\"{loaded: vm.activeShipmentsLoaded, \\'first-load\\': vm.isActiveShipmentsFirstLoad, \\'loading-content\\': !vm.activeShipmentsLoaded}\\\" style=min-height:215px><div flex-gt-xs=50 class=text-center><donut-chart data=vm.activeShipments data-theme=active-shipments control=vm.activeShipmentsControl segment-class-map=vm.activeShipmentsSegmentClassMap></donut-chart></div><div flex-gt-xs=50 class=\\\"xs-p-xs p-t-0\\\"><p class=\\\"md-caption donut-bars\\\"><span translate=WIDGETS.TOTAL_SHIPMENTS_DESC></span></p><ul layout-xs=row class=\\\"icon-list total_shipment_aljex\\\" style=\\\"margin: 0;padding: 0;display:flex\\\"><div flex=grow layout-gt-xs=column layout-xs=row><li flex=auto flex-xs=50 class=donut-bars layout-align-xs=\\\"start center\\\" ng-repeat=\\\"shiptype in vm.activeShipments.slice(0,3)\\\" ng-mouseover=vm.activeShipmentsControl.growSegment(shiptype.type) ng-mouseleave=vm.activeShipmentsControl.restoreSegment(shiptype.type) ng-class=\\\"{highlighted: vm.activeShipmentsSegmentClassMap[shiptype.type]}\\\"><a href=\\\"/track-trace-cmts?status=undelivered&{{vm.donut_query[shiptype.type]}}\\\" analytics-on analytics-category=Dashboard analytics-event=TandT-active-{{shiptype.type}} class=display-block><div class=\\\"mode-wrapper {{shiptype.color}}\\\" layout-align-xs=\\\"start center\\\"><div class=\\\"mode-text padding-8px\\\"><md-icon aria-label={{shiptype.type}}-shipment class=\\\"display-block removeActiveCmtsFont-{{$index}} font-22\\\" style=\\\"vertical-align: middle\\\"><span ng-bind-html=shiptype.icon></span></md-icon><span style=\\\"text-transform: capitalize;vertical-align: middle\\\" class=xs-font-10>{{shiptype.type}}</span></div></div><span class=\\\"md-headline text-center number value-{{shiptype.shipments}}\\\"><counting-number>{{shiptype.shipments}}</counting-number></span></a></li></div></ul></div></div><!--<div class=\\\"m-t m-b p-a-sm text-center\\\" ng-if=\\'vm.activeShipmentsError\\'>\\r\\n {{vm.activeShipmentsError}}\\r\\n </div>--></md-card-content></md-card><!-- <md-card layout-align=\\'center center\\' flex ng-show=\\\"!vm.showLoading\\\">\\r\\n <module-load-animation></module-load-animation>\\r\\n</md-card> -->\");\n$templateCache.put(\"/app/components/widgets/csl/bookmarked-shipments-results.html\",\"<div ng-if=!widgetsCslCtrl.bookmarksError class=table-scroll><table class=card-content-table><thead><tr><th class=td-15><span translate=SHIPPINGDETAILS.PRO></span></th><th class=td-15><span translate=SHIPPINGDETAILS.PICKUP_ABBREVIATED></span> <span>→</span> <span translate=SHIPPINGDETAILS.DELIVERY_ABBREVIATED></span></th><th style=min-width:85px class=td-20 ng-if=\\\"widgetsCslCtrl.page_name == \\'shipment\\'\\\"><span translate=SHIPPINGDETAILS.START_DATE></span></th><th style=min-width:85px class=td-20 ng-if=\\\"widgetsCslCtrl.page_name == \\'shipment\\'\\\"><span translate=SHIPPINGDETAILS.DUE_DATE></span></th><th style=min-width:85px class=td-20 ng-if=\\\"widgetsCslCtrl.page_name == \\'shipment\\'\\\"><span translate=SHIPPINGDETAILS.ESTIMATED_DELIVERY_ABBREVIATED></span></th><!--<th class=\\\"td-15\\\" ng-if=\\\"widgetsCslCtrl.page_name == \\'dashboard\\'\\\">\\r\\n <span translate=\\\"SHIPPINGDETAILS.ETA_DATE\\\"></span>\\r\\n </th>\\r\\n <th class=\\\"td-15\\\" ng-if=\\\"widgetsCslCtrl.page_name == \\'dashboard\\'\\\">\\r\\n <span translate=\\\"SHIPPINGDETAILS.ETA_TIME\\\"></span>\\r\\n </th>--><th class=td-20 ng-if=\\\"widgetsCslCtrl.page_name == \\'dashboard\\'\\\"><span translate=ESTIMATED></span></th><th class=td-10><span translate=SHIPPINGDETAILS.EXCEPTION_ABBREVIATED></span></th><th class=td-15><span translate=SHIPPINGDETAILS.STATUS></span></th><th class=td-15><span translate=SHIPPINGDETAILS.MILESTONES></span></th><th class=td-15><span flex=auto></span><md-menu ng-if=\\\"widgetsCslCtrl.bookmarksCount > 0\\\" md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4 style=\\\"z-index: 1000 !important\\\"><md-menu-item ng-hide=widgetsCslCtrl.showRemoveButton><md-button ng-click=\\\"widgetsCslCtrl.editBookmarks();widgetsCslCtrl.showRemoveButton = true\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.EDIT></span></p></div></md-button></md-menu-item><md-menu-item ng-show=widgetsCslCtrl.showRemoveButton><md-button ng-click=widgetsCslCtrl.doneEditingBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.DONE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></th></tr></thead><tbody><tr ng-repeat=\\\"item in widgetsCslCtrl.bookmarks\\\"><td><a target=_blank class=btn-link ng-href=/shipping-details-csl/{{item.pro}} ng-click=vm.closeBookmarksModal() analytics-on analytics-category=Dashboard analytics-event=ClickBookmarkedShipment>{{item.pro}}</a></td><td ng-if=\\\"widgetsCslCtrl.page_name == \\'shipment\\'\\\">{{item.load.origincity ? (item.load.origincity + \\\" \\\") : \\\"\\\"}}→{{item.load.destinationcity ? (\\\" \\\" + item.load.destinationcity) : \\\"\\\"}}</td><td ng-if=\\\"widgetsCslCtrl.page_name == \\'shipment\\'\\\">{{item.load.pickupdate | date:\\'dd-MMM-yyyy\\'}}</td><td ng-if=\\\"widgetsCslCtrl.page_name == \\'shipment\\'\\\">{{item.load.duedate | date:\\'dd-MMM-yyyy\\'}}</td><td ng-if=\\\"widgetsCslCtrl.page_name == \\'shipment\\'\\\">{{item.load.consigneeapptdate | date:\\'dd-MMM-yyyy\\'}}</td><td ng-if=\\\"widgetsCslCtrl.page_name == \\'dashboard\\'\\\">{{item.load.originstate}}  →  {{item.load.destinationstate}}</td><!--<td ng-if=\\\"widgetsCslCtrl.page_name == \\'dashboard\\'\\\">{{item.load.estimateddelivery | date:\\'dd-MMM-yyyy\\'}} </td>\\r\\n <td ng-if=\\\"widgetsCslCtrl.page_name == \\'dashboard\\'\\\">{{item.load.estimateddeliverytime | date:\\'hh:mm a\\'}}</td>--><td ng-if=\\\"widgetsCslCtrl.page_name == \\'dashboard\\'\\\">{{item.load.consigneeapptdate | date:\\'dd-MMM-yyyy\\'}}   {{item.load.consigneeappttime | date:\\'hh:mm\\'}}</td><td><span class=hoverable><md-icon ng-show=item.load.exceptions.length class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\" ng-mouseover=widgetsCslCtrl.getException(item.load.exceptions)></md-icon><md-tooltip md-direction=left><md-progress-circular md-mode=indeterminate class=\\\"md-warn md-hue-2\\\" ng-show=widgetsCslCtrl.tooltipIsLoading></md-progress-circular><div ng-show=!widgetsCslCtrl.tooltipIsLoading ng-repeat=\\\"exception in item.load.exceptions\\\"><p>Current Exception: <span>{{exception.pointname}}</span></p><p>Date / Time Created: <span>{{exception.created_at | date:\\'dd-MMM-yyyy\\'}}     {{exception.created_at | date:\\'hh:mm\\'}}</span></p></div></md-tooltip></span></td><td class=\\\"{{item.load.shipmentstatus == \\'UNDELIVERED\\' ? \\'text-success\\' : \\'\\'}}\\\">{{item.load.shipmentstatus}}</td><td>{{item.load.milestone}}</td><td><md-button ng-show=widgetsCslCtrl.showRemoveButton class=\\\"md-raised btn-danger\\\" ng-click=widgetsCslCtrl.unBookmarkId(item.pro) analytics-on analytics-category=Dashboard analytics-event=UnBookmarkShipment><span translate=WIDGETS.REMOVE></span></md-button></td></tr><tr ng-show=\\\"widgetsCslCtrl.bookmarksCount < 1\\\"><td colspan=8><span translate=WIDGETS.NO_BOOKMARKS></span></td></tr></tbody></table></div><div ng-if=\\\"widgetsCslCtrl.bookmarksError.length > 0\\\" layout=row><h3>{{widgetsCslCtrl.bookmarksError}}</h3></div><style>.md-open-menu-container.md-whiteframe-z2.md-active.md-clickable {\\r\\n z-index: 100000000;\\r\\n }</style>\");\n$templateCache.put(\"/app/components/widgets/csl/bookmarked-shipments.html\",\"<div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\" ng-disabled=\\\"widgetsCslCtrl.switchUser == true\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=WIDGETS.BOOKMARKED_SHIPMENTS></span><md-progress-circular md-mode=indeterminate md-diameter=40px ng-show=\\\"!widgetsCslCtrl.isBookmarksFirstLoad && !widgetsCslCtrl.bookmarksLoaded\\\"></md-progress-circular></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\" ng-if=\\\"widgetsCslCtrl.bookmarksCount > 0\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=widgetsCslCtrl.editBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.EDIT></span></p></div></md-button></md-menu-item><md-menu-item ng-show=widgetsCslCtrl.showRemoveButton><md-button ng-click=widgetsCslCtrl.doneEditingBookmarks()><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.DONE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-card-content class=p-0><div ng-show=widgetsCslCtrl.bookmarksLoaded><div ng-include=\\\"\\'/app/components/widgets/csl/bookmarked-shipments-results.html\\'\\\"></div></div></md-card-content><div layout=row layout-align=\\\"center start\\\" flex=100 style=margin-top:15px ng-show=widgetsCslCtrl.showRemoveButton><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=widgetsCslCtrl.showRemoveButton ng-click=widgetsCslCtrl.doneEditingBookmarks()><span translate=WIDGETS.DONE></span></md-button></div><div ng-if=\\\"widgetsCslCtrl.switchUser == true\\\" class=uppercase style=\\\"text-align: center;color: #1E585C;font-size: 25px;margin-top:230px\\\"><md-icon aria-label=unavailable style=\\\"color: #1E585C;padding: 10px;font-size: 28px;margin-top: -10px\\\"></md-icon>unavailable in lens mode</div></div>\");\n$templateCache.put(\"/app/components/widgets/csl/current-exceptions.html\",\"<md-card class=\\\"current-exceptions-widget widget loading-container\\\" flex=1><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=WIDGETS.CURRENT_EXCEPTIONS><!-- </span>\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" md-diameter=\\\"40px\\\" ng-show=\\\"!vm.isCurrentExceptionsFirstLoad && !vm.currentExceptionsLoaded\\\"></md-progress-circular></span> --></span></h2></div></md-toolbar><md-card-content flex=auto class=p-0 class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.currentExceptionLoading><div ng-show=vm.showLoading ng-if=\\\"!vm.currentExceptionsError && vm.currentExceptionLoading\\\" layout-gt-xs=row class=m-t-sm ng-class=\\\"{loaded: vm.currentExceptionsLoaded, \\'first-load\\': vm.isCurrentExceptionsFirstLoad, \\'loading-content\\': !vm.currentExceptionsLoaded}\\\" style=min-height:215px><div flex-gt-xs=50 class=text-center><donut-chart data=vm.currentExceptions data-theme=current-exceptions control=vm.currentExceptionsControl segment-class-map=vm.currentExceptionsSegmentClassMap></donut-chart></div><div flex-gt-xs=50 class=\\\"xs-p-xs p-t-0\\\"><p class=\\\"md-caption donut-bars\\\"><span translate=WIDGETS.CURRENT_EXCEPTIONS_DESC></span></p><ul class=\\\"icon-list current_shipment_aljex\\\" style=\\\"margin: 0;padding: 0;display:flex\\\"><div flex=grow layout=column><li class=donut-bars style=padding-bottom:10px layout-align-xs=\\\"start center\\\" ng-repeat=\\\"shiptype in vm.currentExceptions.slice(0,3)\\\" ng-mouseover=vm.currentExceptionsControl.growSegment(shiptype.type) ng-mouseleave=vm.currentExceptionsControl.restoreSegment(shiptype.type) ng-class=\\\"{highlighted: vm.currentExceptionsSegmentClassMap[shiptype.type]}\\\"><a layout=row layout-align=\\\"start center\\\" flex=100 analytics-on analytics-category=Dashboard analytics-event=TandT-current-exceptions-{{shiptype.type}} href=\\\"/track-trace-csl?shipment_status=undelivered&{{vm.donut_query[shiptype.type]}}¤t_exception=1&page_from=aljex\\\"><div layout-align-xs=\\\"start center\\\" class=\\\"mode-wrapper {{shiptype.color}}\\\"><div class=\\\"mode-text padding-8px\\\"><!--<md-icon aria-label=\\\"{{shiptype.type}}-shipment\\\" class=\\\"display-block removeExceptionFont-{{$index}} font-22\\\" ><span ng-bind-html=\\\"shiptype.icon\\\" ></span></md-icon>--><md-icon aria-label={{shiptype.type}}-shipment class=\\\"display-block removeActiveCslFont-{{$index}}\\\"><span ng-bind-html=shiptype.icon></span></md-icon><span style=\\\"text-transform: capitalize\\\" class=xs-font-10>{{shiptype.type}}</span></div></div><span class=\\\"md-headline text-center number value-{{shiptype.shipments}}\\\"><counting-number>{{shiptype.shipments}}</counting-number></span></a></li></div></ul></div></div><div class=\\\"m-t m-b p-a-sm text-center\\\" ng-if=vm.currentExceptionsError>{{vm.currentExceptionsError}}</div></md-card-content></md-card><!-- <md-card layout-align=\\'center center\\' flex ng-show=\\\"!vm.showLoading\\\">\\r\\n <module-load-animation></module-load-animation>\\r\\n</md-card>\\r\\n -->\");\n$templateCache.put(\"/app/components/widgets/csl/total-shipments.html\",\"<style type=text/css>@media screen and (max-width: 1054px) and (min-width: 960px){\\r\\n span#font-range { \\r\\n font-size: 13px;\\r\\n } \\r\\n }</style><md-card class=\\\"total-shipments-widget widget loading-container\\\" flex=1><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=WIDGETS.TOTAL_SHIPMENTS><!-- <md-progress-circular md-mode=\\\"indeterminate\\\" md-diameter=\\\"40px\\\" ng-show=\\\"!vm.isActiveShipmentsFirstLoad && !vm.activeShipmentsLoaded\\\"></md-progress-circular></span> --></span></h2></div></md-toolbar><md-card-content flex=auto class=p-0 class=\\\"loadmask-dark loadmask-clear p-0\\\" loadmask=vm.currentShipmentsLoading><div layout-gt-xs=row class=m-t-sm ng-if=\\\"!vm.activeShipmentsError && vm.currentShipmentsLoading\\\" ng-class=\\\"{loaded: vm.activeShipmentsLoaded, \\'first-load\\': vm.isActiveShipmentsFirstLoad, \\'loading-content\\': !vm.activeShipmentsLoaded}\\\" style=min-height:215px><div flex-gt-xs=50 class=text-center><donut-chart data=vm.activeShipments data-theme=active-shipments control=vm.activeShipmentsControl segment-class-map=vm.activeShipmentsSegmentClassMap></donut-chart></div><div flex-gt-xs=50 class=\\\"xs-p-xs p-t-0\\\"><p class=\\\"md-caption donut-bars\\\"><span translate=WIDGETS.TOTAL_SHIPMENTS_DESC></span></p><ul class=\\\"icon-list total_shipment_aljex active_shipments\\\" style=\\\"margin: 0;padding: 0;display:flex\\\"><div flex=grow layout=column><li class=donut-bars style=padding-bottom:10px layout-align-xs=\\\"start center\\\" ng-repeat=\\\"shiptype in vm.activeShipments.slice(0,3)\\\" ng-mouseover=vm.activeShipmentsControl.growSegment(shiptype.type) ng-mouseleave=vm.activeShipmentsControl.restoreSegment(shiptype.type) ng-class=\\\"{highlighted: vm.activeShipmentsSegmentClassMap[shiptype.type]}\\\"><a layout=row flex=100 href=\\\"/track-trace-csl?shipment_status=undelivered&{{vm.donut_query[shiptype.type]}}&page_from=aljex\\\" analytics-on analytics-category=Dashboard analytics-event=TandT-active-{{shiptype.type}}><div class=\\\"mode-wrapper {{shiptype.color}}\\\" layout-align-xs=\\\"center center\\\"><div class=\\\"mode-text padding-8px\\\"><md-icon aria-label={{shiptype.type}}-shipment class=\\\"display-block removeActiveCslFont-{{$index}}\\\"><span ng-bind-html=shiptype.icon></span></md-icon><span style=\\\"text-transform: capitalize\\\">{{shiptype.type}}</span></div></div><span class=\\\"md-headline text-center number value-{{shiptype.shipments}}\\\"><counting-number>{{shiptype.shipments}}</counting-number></span></a></li></div></ul></div></div><div class=\\\"m-t m-b p-a-sm text-center\\\" ng-if=vm.activeShipmentsError>{{vm.activeShipmentsError}}</div></md-card-content></md-card><!-- <md-card layout-align=\\'center center\\' flex ng-show=\\\"!vm.showLoading\\\">\\r\\n <module-load-animation></module-load-animation>\\r\\n</md-card> -->\");\n$templateCache.put(\"/app/dashboard/cfs/configurations/version-a.html\",\"<div flex=100 layout=row style=\\\"margin:0 15px\\\"><span flex=auto></span><md-button class=btn-link md-ink-ripple=false ng-click=vm.hardRefresh() ng-disabled=trackTraceCtrl.showLoading><span>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span><!-- <span class=\\\"btn-load-wrapper\\\" ng-show=\\\"trackTraceCtrl.showLoading\\\">\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>\\r\\n </span> --></md-button></div><!-- <div flex layout=\\\"row\\\" ng-include=\\\"\\'/app/dashboard/five-day-forecast/five-day-forecast.html\\'\\\">HI</div> --><div layout-xs=column layout-sm=column layout-gt-sm=row layout-fill><!-- hide the html if you are loading and show the loading animation instead --><!-- ACTIVE SHIPMENTS --><div class=ie-donut flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/cfs/total-shipments.html\\'\\\" ng-show=vm.showLoading></div><!-- CURRENT EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/cfs/current-exceptions.html\\'\\\" ng-show=vm.showLoading></div></div><div ng-if=true><five-day-cfs-forecast></five-day-cfs-forecast></div><div layout-xs=column layout-sm=column layout-gt-sm=row><!--SPENDING OVER TIME --><div flex-xs=auto flex-gt-xs=33><div flex=auto ng-include=\\\"\\'/app/dashboard/cfs/on-time/otp.html\\'\\\"></div></div><!-- BOOKMARKED SHIPMENTS --><div flex-xs=auto flex-gt-sm=66 layout=column><md-card flex=auto ng-include=\\\"\\'/app/components/widgets/cfs/bookmarked-shipments.html\\'\\\" ng-controller=\\\"WidgetsCfsController as widgetsCfsCtrl\\\" ng-init=\\\"widgetsCfsCtrl.page_name=\\'dashboard\\'\\\" class=\\\"loadmask-dark widget has-menu shipment_bookmark\\\"><!-- loadmask=\\\"!widgetsCfsCtrl.isBookmarksFirstLoad\\\" ng-class=\\\"{\\'disabled-bookmark-page\\': widgetsCfsCtrl.switchUser == true}\\\" --></md-card></div></div>\");\n$templateCache.put(\"/app/dashboard/cfs/configurations/version-b.html\",\"<div layout-xs=column layout-sm=column layout-gt-sm=row layout-fill><!-- hide the html if you are loading and show the loading animation instead --><five-day-forecast></five-day-forecast><div flex=auto layout=row ng-include=\\\"\\'/app/dashboard/five-day-forecast/five-day-forecast.html\\\"></div><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/total-shipments.html\\'\\\" ng-show=vm.showLoading></div><!-- CURRENT EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/current-exceptions.html\\'\\\" ng-show=vm.showLoading></div><!-- POTENTIAL EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/potential-exceptions.html\\'\\\" ng-show=vm.showLoading></div></div><!-- SHIPMENTS VOLUME AND COUNT OVER TIME --><div ng-if=true><md-card flex=auto ng-include=\\\"\\'/app/dashboard/shipments-over-time/shipments-over-time.html\\'\\\" class=widget></md-card></div><div layout-xs=column layout-sm=column layout-gt-sm=row><!--SPENDING OVER TIME --><div flex-xs=auto flex-gt-xs=33><div flex=auto ng-include=\\\"\\'/app/dashboard/on-time/otp.html\\'\\\"></div><div flex=auto ng-include=\\\"\\'/app/components/widgets/spending-over-time.html\\'\\\"></div></div><!-- BOOKMARKED SHIPMENTS --><div flex-xs=auto flex-gt-sm=66 layout=column><md-card flex=auto ng-include=\\\"\\'/app/components/widgets/bookmarked-shipments.html\\'\\\" ng-controller=\\\"WidgetsController as widgetsCtrl\\\" class=\\\"loadmask-dark widget has-menu\\\" loadmask=!widgetsCtrl.isBookmarksFirstLoad ng-class=\\\"{\\'disabled-bookmark-page\\': widgetsCtrl.switchUser == true}\\\"></md-card></div></div>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/custom-options-modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t\\\" style=top:25%><md-toolbar><div class=md-toolbar-tools><h2 ng-if=\\\"editCheck == true\\\">EDIT FORECAST</h2>{{editCheckID}}<h2 ng-if=\\\"editCheck == false\\\">CREATE NEW FORECAST</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p ng-if=\\\"editCheck == true\\\">You have unsaved edits with your current forecast.<br>Would you like to save before editing a forecast?</p><p ng-if=\\\"editCheck == false\\\">You have unsaved edits with your current forecast.<br>Would you like to save before creating a new forecast?</p><p></p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"space-around center\\\"><md-button ng-click=vm.closeModal() class=\\\"md-raised md-button md-ink-ripple\\\" style=\\\"border:1px solid #2B7C8C;color:#2B7C8C;box-shadow:none\\\">CANCEL</md-button><md-button ng-click=vm.save(savedForecastId,editCheckID,true) class=\\\"md-raised md-accent ttsearch-buttom md-button md-ink-ripple\\\" style=box-shadow:none>SAVE</md-button><md-button ng-if=\\\"editCheck == true\\\" ng-click=vm.editForecast(editCheckID) class=\\\"md-raised md-accent ttsearch-buttom md-button md-ink-ripple\\\" style=box-shadow:none>NO</md-button><md-button ng-if=\\\"editCheck == false\\\" ng-click=vm.openNewForm() class=\\\"md-raised md-accent ttsearch-buttom md-button md-ink-ripple\\\" style=box-shadow:none>NO</md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/custom-options.html\",\"<md-card-content loadmask-dark loadmask-clear loadmask=!$ctrl.isLoading><div ng-show=$ctrl.active><form name=$ctrl.customOptionsForm flex=auto class=five-day-form-in><div layout=column><div class=custom-forecast><header layout=row layout-align=\\\"start center\\\"><div flex=auto flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label translate=WIDGETS.FORECAST_LABEL></label><input ng-model=$ctrl.newOption.forecast_label ng-required=\\\"($ctrl.newOption.origins.length > 0\\r\\n || $ctrl.newOption.destinations.length > 0\\r\\n || $ctrl.newOption.lane_pairs.length > 0)\\r\\n \\\" name=newOption></md-input-container><!-- <label translate=\\\"WIDGETS.FORECAST_LABEL\\\"></label>\\r\\n <input\\r\\n ng-model=\\\"optionRow.forecast_label\\\"\\r\\n ng-model-options=\\\"{ debounce: 200 }\\\"\\r\\n ng-required=\\\"true\\\"\\r\\n name=\\\"{{optionRow.id}}\\\"\\r\\n value=\\\"{{optionRow.forecast_label}}\\\">\\r\\n </md-input-container> --></div></header><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.ORIGIN></label><md-chips ng-model=$ctrl.newOption.origins md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchOrigin md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchOrigin)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Origin\\\"><md-item-template><span md-highlight-text=searchOrigin>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.DESTINATION></label><md-chips ng-model=$ctrl.newOption.destinations md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchDestination md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchDestination)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Destination\\\"><md-item-template><span md-highlight-text=searchDestination>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.LANE_PAIRS></label><md-chips ng-model=$ctrl.newOption.lane_pairs md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchLanePairs md-items=\\\"item in $ctrl.getMatches(\\'forecast_lane_pair\\', searchLanePairs)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Lane Pair\\\"><md-item-template><span md-highlight-text=searchLanePairs>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></div><div ng-repeat=\\\"optionRow in $ctrl.customForecasts\\\" layout=column><div class=custom-forecast><header layout-gt-sm=row layout-align=\\\"center center\\\" layout-wrap><div flex=auto flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label translate=WIDGETS.FORECAST_LABEL></label><input ng-model=optionRow.forecast_label ng-model-options=\\\"{ debounce: 200 }\\\" ng-required=true name={{optionRow.id}} value={{optionRow.forecast_label}}></md-input-container></div><div layout=row layout-align=\\\"center center\\\" flex=auto><div flex=50 flex-offset-gt-sm=10><md-checkbox ng-model=optionRow.is_default ng-change=$ctrl.removeOtherDefaults(optionRow) aria-label=\\\"Set As Default\\\">Set as Default</md-checkbox></div><div flex=50 layout=row layout-align=end><md-button aria-label=delete ng-click=$ctrl.deleteOptionRow(optionRow)>REMOVE<md-icon>clear</md-icon></md-button></div></div></header><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.ORIGIN></label><md-chips ng-model=optionRow.origins ng-required=$ctrl.requireAtLeastOne(optionRow) md-transform-chip=$ctrl.chipDisplay($chip) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchOrigin md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchOrigin)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Origin\\\"><md-item-template><span md-highlight-text=searchOrigin>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.DESTINATION></label><md-chips ng-model=optionRow.destinations md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(optionRow) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchDestination md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchDestination)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Destination\\\"><md-item-template><span md-highlight-text=searchDestination>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=\\\"cfc-content lane-pairs\\\"><md-input-container><label translate=WIDGETS.FIVE_DAY.LANE_PAIRS></label><md-chips ng-model=optionRow.lane_pairs md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(optionRow) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchLanePairs md-items=\\\"item in $ctrl.getMatches(\\'forecast_lane_pair\\', searchLanePairs)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Lane Pair\\\"><md-item-template><span md-highlight-text=searchLanePairs>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></div></form><div layout=row><div layout=row layout-align=start flex=auto class=m-t><md-button class=\\\"md-warn md-ink-ripple five-day-cancel\\\" ng-click=$ctrl.cancel()><span translate=USER.CANCEL></span></md-button></div><div layout=row layout-align=end flex=auto class=m-t><md-button class=\\\"md-primary md-ink-ripple five-day-save\\\" ng-click=$ctrl.save() ng-disabled=\\\"$ctrl.emptyData() || $ctrl.customOptionsForm.$invalid\\\"><span translate=USER.SAVE></span></md-button></div></div></div></md-card-content>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/delete-forecast.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/delete-forecast.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=m-t style=top:25%><md-toolbar><div class=md-toolbar-tools><h2>DELETE FORECAST</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>Are you sure you want to delete this custom forecast?</p><p></p><div style=\\\"text-align: center\\\"><!-- <loading-button\\r\\n callfunction=\\\"vm1.deleteForecastSet(id)\\\"\\r\\n display=\\\"YES\\\"\\r\\n isloading=\\\"vm1.isActionLoading\\\">\\r\\n </loading-button> --><md-button style=\\\"border: 1px solid #ccc\\\" ng-click=vm.deleteForecastSet(vm.savedDeletedForecastId,vm.savedDeletedForecastIndexNo) isloading=vm.isActionLoading>YES</md-button><span flex=auto></span><loading-button callfunction=vm.closeModal() display=NO></loading-button></div></md-dialog-content><!-- <md-dialog-actions layout=\\\"row\\\" layout-align=\\\"start center\\\"> \\r\\n <md-button ng-click=\\\"vm.closeModal()\\\">NO</md-button>\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <loading-button\\r\\n callfunction=\\\"vm.deleteForecastSet(id)\\\"\\r\\n display=\\\"YES\\\"\\r\\n isloading=\\\"vm.isActionLoading\\\">\\r\\n </loading-button>\\r\\n </md-dialog-actions> --></md-dialog>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/delete-forecast.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><p>Forecast Removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/five-day-forecast-mobile.form.html\",\"<!-- <div hide-gt-sm>\\r\\n <div layout=\\\"column\\\" class=\\\"\\\">\\r\\n <div flex=\\\"95\\\" class=\\\"flex-transition\\\">\\r\\n <div>\\r\\n <h4><md-icon class=\\\"m-r-xs\\\">search</md-icon><span style=\\\"text-transform:uppercase;\\\" translate=\\\"WIDGETS.CHANGE_QUERY\\\"></span></h4>\\r\\n </div>\\r\\n </div>\\r\\n <md-button class=\\\"md-fab md-mini btn-collapse\\\" aria-label=\\\"Open/Close\\\" ng-click=\\\"toggleCollapse()\\\">\\r\\n <md-icon>{{collapsed ? \\'expand_more\\' : \\'expand_less\\'}}</md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n</div> --><!-- <div ng-show=\\\"$ctrl.isMobile() || !collapsed\\\" flex=\\\"auto\\\"> --><div ng-show=true flex=auto><div ng-include=\\\"\\'/app/dashboard/cfs/five-day-forecast/five-day-forecast.form.html\\'\\\"></div></div><div ng-show=$ctrl.isMobile() style=\\\"padding-bottom: 5px\\\"></div>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/five-day-forecast.form.html\",\"<form name=$ctrl.fiveDayForm><div layout-gt-sm=row layout=column flex=auto><div flex=25><mdp-date-picker mdp-format=MM/DD/YYYY ng-change=$ctrl.selectedDateChange() ng-model-options=\\\"{debounce: 1000}\\\" ng-disabled=$ctrl.isLoading ng-model=$ctrl.payload.date_from class=\\\"mb-0 error-hidden\\\"><label translate=WIDGETS.START_DATE></label>{{$ctrl.start_date.$error}}</mdp-date-picker></div><div flex=20 ng-class=\\\"{\\'mobile-offset-top\\': $ctrl.isMobile()}\\\" flex-offset=\\\"{{$ctrl.isMobile() ? \\'\\' : \\'5\\'}}\\\"><div class=\\\"md-tab-wrapper five-day-bs-type-active\\\"><md-tabs md-stretch-tabs=always><md-tab ng-repeat=\\\"vtab in $ctrl.lane_type\\\" md-on-select=\\\"$ctrl.onLaneTypeTabSelected(vtab, $index)\\\" md-on-deselect=announceDeselected(vtab) ng-disabled=vtab.deselected><md-tab-label><span translate={{vtab.label}}></span><div ng-show=\\\"vtab.field==\\'ALL\\'\\\">ALL</div><div ng-show=\\\"vtab.field==\\'TL\\'\\\"><md-icon style=font-size:17px class=font-family-ftl></md-icon></div><div ng-show=\\\"vtab.field==\\'LOCAL\\'\\\"><md-icon style=font-size:17px class=font-family-intermodal></md-icon></div><div ng-show=\\\"vtab.field==\\'LTL\\'\\\"><md-icon style=font-size:17px class=font-family-ltl></md-icon></div></md-tab-label></md-tab></md-tabs></div></div><div flex=25 flex-offset=5 ng-if=!$ctrl.isMobile()><md-input-container class=md-block><label translate=WIDGETS.LOCATION_FILTER></label><md-select ng-model=$ctrl.selectedOptionRow ng-change=$ctrl.checkClear(); ng-model-options=\\\"{trackBy: $value.id}\\\" placeholder=\\\"Default Forecast\\\" aria-label=\\\"Default Forecast\\\" md-on-open=$ctrl.onSelectOpen() md-on-close=$ctrl.onSelectClose()><md-option value=null>All Locations</md-option><md-option ng-repeat=\\\"frow in $ctrl.custom_forecasts\\\" value={{frow.id}}>{{frow.forecast_label}}</md-option><!--<md-option ng-if=\\\"!$ctrl.custom_forecasts.length\\\" value=\\'create\\' layout=\\\"row\\\" layout-align=\\\"center center\\\" style=\\\"color:#2A9FD8; font-size:16px;\\\">\\r\\n\\r\\n <i\\r\\n class=\\\"material-icons\\\"\\r\\n style=\\\"float:left;cursor: pointer;color: #3eaee5;margin-right:10px\\\" ></i>\\r\\n <span style=\\\"float:left;\\\">Create Preset</span>\\r\\n\\r\\n </md-option>\\r\\n\\r\\n <md-option ng-if=\\\"$ctrl.custom_forecasts.length\\\" value=\\'create_new\\' layout=\\\"row\\\" layout-align=\\\"center center\\\" style=\\\"color:#2A9FD8; font-size:16px;\\\">\\r\\n\\r\\n <i\\r\\n class=\\\"material-icons\\\"\\r\\n style=\\\"float:left;cursor: pointer;color: #3eaee5;margin-right:10px\\\" ></i>\\r\\n <span style=\\\"float:left;\\\">Create a New Preset</span>\\r\\n\\r\\n </md-option>--></md-select></md-input-container></div><div flex=5 ng-if=!$ctrl.isMobile() layout=row layout-align=\\\"start center\\\"><!--<md-button aria-label=\\\"create\\\" ng-click=\\\"$ctrl.toggleOptions()\\\" style=\\\"color: #45AFE3;\\\">\\r\\n <md-icon style=\\\"color: #45AFE3;\\\">create</md-icon> edit\\r\\n </md-button>--><md-button aria-label=create ng-click=$ctrl.toggleOptions($ctrl.selectedOptionRow)><md-icon>create</md-icon>edit</md-button></div><!-- Mobile --><div layout=row class=mobile-offset-top ng-if=$ctrl.isMobile()><md-input-container flex=90 class=md-block><label translate=WIDGETS.LOCATION_FILTER></label><md-select ng-model=$ctrl.selectedOptionRow aria-label=$ctrl.selectedOptionRow ng-change=$ctrl.checkClear(); ng-model-options=\\\"{trackBy: $value.id}\\\" md-on-open=$ctrl.onSelectOpen() md-on-close=$ctrl.onSelectClose()><md-option value=null>None</md-option><md-option ng-repeat=\\\"frow in $ctrl.custom_forecasts\\\" value={{frow.id}}>{{frow.forecast_label}}</md-option></md-select></md-input-container><!-- ng-click=\\\"$ctrl.toggleOptions()\\\" --><md-button class=md-icon-button ng-click=$ctrl.toggleOptions($ctrl.selectedOptionRow) flex=10 aria-label=create><md-icon>create</md-icon></md-button></div></div></form>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/five-day-forecast.html\",\"<md-card flex=auto class=\\\"widget ie-fivedayforcast\\\" id=ie-fivedayforcast><md-toolbar ng-click=$ctrl.saveForecastAccordian()><div class=md-toolbar-tools><h2><md-icon md-svg-src=../assets/images/icons/ic_date_range.svg class=\\\"icon-reset svg-icon-reset\\\"></md-icon><span><span ng-show=!$ctrl.optionsActive translate=WIDGETS.FIVE_DAY.FIVE_DAY_FORECAST></span> <span ng-show=$ctrl.optionsActive translate=WIDGETS.FORECAST_CUSTOM_OPTIONS></span></span></h2><span flex=auto></span></div></md-toolbar><md-card-content ng-show=!$ctrl.optionsActive class=five-day-forecast loadmask-dark loadmask-clear loadmask=!$ctrl.isLoading><div ng-class=\\\"{loaded: !$ctrl.isLoading, \\'first-load\\': $ctrl.isLoading, \\'loading-content\\': $ctrl.isLoading}\\\" layout=column flex=auto style=display:block><div class=ie-forecastdate flex=100 layout=row collapsible template-url=/app/dashboard/cfs/five-day-forecast/five-day-forecast-mobile.form.html></div><div layout=row layout-align=\\\"center end\\\" class=\\\"activity-notices hide show-gt-sm\\\"><div flex=1 ng-repeat=\\\"day in $ctrl.days track by $index | limitTo:5\\\" class=activity-header><div flex=auto ng-if=\\\"!day.is_record && day.is_high\\\" class=\\\"notice high-activity\\\"><div class=\\\"activity-icon high-activity-icon\\\"><span><img src=../assets/images/flame-icon.png></span></div><div class=\\\"activity-text high-activity-text\\\"><span>High Shipment Activity</span></div></div><div ng-if=day.is_record class=\\\"notice daily-record\\\"><div class=\\\"activity-icon daily-record-icon\\\"><span><md-icon class=material-icons></md-icon></span></div><div class=\\\"activity-text daily-record-text\\\"><span>New Daily Record</span></div></div></div></div><div flex=1 id=forecasts layout-gt-sm=row layout-align-gt-sm=\\\"center stretch\\\" layout-align-sm=\\\"space-between stretch\\\" layout-sm=column><div flex-gt-sm=20 flex-sm=100 ng-repeat=\\\"day in $ctrl.days track by $index | limitTo:5\\\" class=day-wrapper><div layout=column layout-align=\\\"center stretch\\\" class=\\\"activity-notices hide-gt-sm\\\"><div flex=auto ng-if=\\\"!day.is_record && day.is_high\\\" class=\\\"notice high-activity\\\"><div class=\\\"activity-icon high-activity-icon\\\"><span><img src=../assets/images/flame-icon.png></span></div><div class=\\\"activity-text high-activity-text\\\"><span>High Shipment Activity</span></div></div><div ng-if=day.is_record class=\\\"notice daily-record\\\"><div class=\\\"activity-icon daily-record-icon\\\"><span><md-icon class=material-icons></md-icon></span></div><div class=\\\"activity-text daily-record-text\\\"><span>New Daily Record</span></div></div></div><forecast-cfs flex=auto data=day payload=$ctrl.payload index={{$index}} mobile=$ctrl.isMobile()></forecast-cfs></div></div></div></md-card-content><custom-options-cfs flex=auto ng-if=$ctrl.optionsActive active=$ctrl.optionsActive custom-forecasts=$ctrl.custom_forecasts></custom-options-cfs></md-card>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/forecast-cfs.html\",\"<style type=text/css>md-tooltip .md-content {\\r\\n color: #FFFFFF;\\r\\n text-transform: uppercase;\\r\\n font-weight: normal;\\r\\n font-size: .95em;\\r\\n opacity: 0.96; \\r\\n background-color: black;\\r\\n height: auto;\\r\\n}</style><div layout=row layout-align=\\\"center stretch\\\" layout-fill class=forecast-wrapper ng-class=\\\"{\\'show-notice\\': $ctrl.data.is_record || $ctrl.data.is_high, \\'record-high\\': $ctrl.data.is_record, \\'high-shipments\\': $ctrl.data.is_high && !$ctrl.data.is_record}\\\"><div layout=column layout-align=\\\"end stretch\\\" layout-fill><div flex=auto layout=column class=\\\"forecast disabled\\\" layout-align=\\\"center stretch\\\" ng-if=!$ctrl.getTotal()><div class=upper><h1 layout=row layout-align=\\\"center center\\\" class=header>{{$ctrl.getDay()}}</h1><span class=subheader layout=row layout-align=\\\"center center\\\">{{$ctrl.getDate()}}</span></div><div flex=auto layout=column layout-align=\\\"center center\\\"><span class=md-display-1 translate=WIDGETS.FIVE_DAY.DISABLED></span></div></div><!--<div flex=\\\"auto\\\" layout=\\\"column\\\" class=\\\"forecast\\\" layout-align=\\\"center stretch\\\" ng-if=\\\"$ctrl.getTotal()\\\" ng-click=\\\"$ctrl.viewOnTrackAndTraceCfs($ctrl.getDate())\\\" >--><div flex=auto layout=column class=forecast layout-align=\\\"center stretch\\\" ng-if=$ctrl.getTotal() ng-click=$ctrl.viewOnTrackAndTraceCfs($ctrl.getDateForTT())><div class=upper><h1 layout=row layout-align=\\\"center center\\\" class=header>{{$ctrl.getDay()}}</h1><span class=subheader layout=row layout-align=\\\"center center\\\">{{$ctrl.getDate()}}</span><md-tooltip md-direction=center><div class=tooltip-bc-color><span style=\\\"margin:5%;font-weight: bold;margin-left: 3%;font-size: 1.3em\\\">Top Shipments</span> <span ng-show=\\\"$ctrl.data.ref_numbers.length === 0\\\" style=\\\"margin:3%;margin-left: 3%;font-weight: bold\\\">No Shipments Found.</span><div style=\\\"margin-left: 3%\\\" ng-repeat=\\\"shipmentValue in $ctrl.data.ref_numbers track by $index\\\" style=\\\"margin-bottom: -2%\\\"><span style=\\\"color: #fff;font-weight: bold\\\">{{$ctrl.data.ref_numbers[$index]}}</span></div></div></md-tooltip></div><div flex=auto></div><div class=body><div ng-if=!$ctrl.mobile><md-grid-list md-cols=4 md-gutter=8px md-row-height=1:1><md-grid-tile ng-repeat=\\\"container in $ctrl.containers\\\" md-colspan={{container.colspan}} md-rowspan={{container.rowspan}} class={{container.icon_class}}><md-icon ng-if=!container.empty md-svg-icon={{container.icon}}></md-icon></md-grid-tile></md-grid-list></div><h1 layout=row layout-align=\\\"center center\\\" class=md-display-3>{{$ctrl.getTotal()}}</h1><span layout=row layout-align=\\\"center center\\\" class=md-title>DELIVERIES</span></div><div class=business-group layout=row layout-align=\\\"space-around center\\\"><span flex=1 class=font-xs><md-icon class=font-family-ftl style=font-size:11px></md-icon>{{$ctrl.getPercentageTl()}} </span><span flex=1 class=font-xs><md-icon class=font-family-intermodal style=font-size:11px></md-icon>{{$ctrl.getPercentageLocal()}} </span><span flex=1 class=font-xs><md-icon class=font-family-ltl style=font-size:11px></md-icon>{{$ctrl.getPercentageLtl()}}</span></div><!--<div class=\\\"business-group\\\" layout=\\\"row\\\">\\r\\n <span flex=\\\"1\\\"><md-icon></md-icon>{{$ctrl.getPercentageGround()}}</span>\\r\\n </div>--><div class=lower><breakdowncfs data=$ctrl.data index={{$ctrl.index}} mobile=$ctrl.mobile></breakdowncfs></div></div></div></div>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/location_filter_empty_modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t\\\" style=top:25%><md-toolbar><div class=md-toolbar-tools><h2 style=\\\"text-transform: capitalize\\\">Enter Required Field</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>Please enter a <b>Location Filter Label </b>to save this forecast.</p><p></p></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/save_changes_alert_model.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=m-t style=top:25%><md-toolbar><div class=md-toolbar-tools><h2 style=\\\"text-transform: capitalize\\\" ng-if=!vm.editForecastId>CANCEL CREATION OF FORECAST</h2><h2 style=\\\"text-transform: capitalize\\\" ng-if=vm.editForecastId>EDIT FORECAST</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p ng-if=\\\"vm.redirectPath == \\'cancel\\' && !vm.editForecastId \\\">Do you want to cancel creation of forecast</p><p ng-if=\\\"(vm.redirectPath == \\'cancel\\' && vm.editForecastId) || vm.redirectPath == \\'apply\\' \\\">You have unsaved edits with your current forecast.<br>Do you want to cancel the changes?</p><p></p><div style=\\\"text-align: center\\\"><md-button style=\\\"border: 1px solid #ccc\\\" ng-click=\\\"vm.redirectPath == \\'cancel\\'?vm.cancel():vm.getDays(vm.editForecastId)\\\" isloading=vm.isActionLoading>YES</md-button><span flex=auto></span><loading-button callfunction=vm.closeModal() display=NO></loading-button></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/dashboard/cfs/five-day-forecast/saved-forecast-accordian.html\",\"<div class=\\\"m-b saved-forecast\\\" style=display:block id=mySavedForecast><md-card flex=auto flex-fill class=\\\"ontime-percentage-widget widget loading-container has-menu\\\"><md-toolbar ng-click=$ctrl.saveForecastAccordian()><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=\\\"MY SAVED FORECAST\\\"></span> </span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=\\\"!$ctrl.aljexSavedForecastIsExpanded && !$ctrl.aljexSavedIsOpen\\\"><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=\\\"$ctrl.aljexSavedForecastIsExpanded || $ctrl.aljexSavedIsOpen\\\"><md-icon aria-label=options></md-icon></md-button><md-menu-content hide></md-menu-content></md-menu></div></md-toolbar><md-card-content ng-if=\\\"$ctrl.aljexSavedForecastIsExpanded || $ctrl.aljexSavedIsOpen\\\"><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\" class=\\\"light-form m-t\\\"><div layout=row flex-xs=100 style=margin-right:20px><md-checkbox layout=row ng-hide=$ctrl.allLocationSet ng-checked=true class=\\\"md-primary color-347c8f\\\" aria-label=\\\"All Locations is set to Default\\\">All Locations is set to Default</md-checkbox></div><div layout=row flex-xs=100><md-checkbox id=savedForecastOpen layout=row ng-model=$ctrl.aljexSavedForecastIsExpanded ng-change=$ctrl.setAljexSavedForecastExpanded() class=\\\"md-primary color-ffffff\\\" aria-label=\\\"Keep Saved Forecast Open\\\"></md-checkbox><label for=savedForecastOpen>Keep Saved Forecast Open</label></div></div><div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\"><div class=\\\"table-scroll m-t\\\"><table cellspacing=0 ng-class=\\\"card-content-table saved-forecast-table\\\" align=center;><thead><!-- ng-style or ng-class is not working --><tr ng-if=getForecastList.length><th class=location_filter_label style=width:55%;text-align:left>LOCATION FILTER LABEL</th><th class=location_filter_label style=width:15%>CURRENT DEFAULT</th><th style=width:15%>DELETE</th><th style=width:15%>EDIT</th></tr><tr ng-if=!getForecastList.length style=color:#3b3c41><th class=location_filter_label style=width:55%;text-align:left>LOCATION FILTER LABEL</th><th class=location_filter_label style=width:15%>CURRENT DEFAULT</th><th style=width:15%>DELETE</th><th style=width:15%>EDIT</th></tr></thead><tbody class=saved-forecast-list><tr ng-repeat=\\\"item in getForecastList\\\" class=savedForecast{{$index}}><!-- right now ng-style/ng-class is not working --><td class=location_filter_label ng-if=\\\"item.id == $ctrl.editForecastId\\\" style=text-align:left;color:#3eaee5>{{item.forecast_label}}</td><td class=location_filter_label ng-if=\\\"item.id != $ctrl.editForecastId\\\" style=text-align:left;color:#797a80>{{item.forecast_label}}</td><td class=current_default style=text-align:center><label class=container style=\\\"position: relative;margin-top:7px;display:inline\\\"><input type=checkbox ng-checked=item.is_default ng-true-value={{item.id}} ng-click=$ctrl.updateForecastSet(item.id) ng-model=$ctrl.forecast_check_value> <span class=checkmark></span></label><!-- <md-radio-button value=\\\"Apple\\\" class=\\\"md-primary\\\">Apple</md-radio-button> --></td><td style=text-align:center><i style=\\\"cursor: pointer\\\" ng-click=$ctrl.showModal(ev,item.id,$index) class=material-icons></i></td><td style=text-align:center ng-if=\\\"($ctrl.beforesave == true && $ctrl.addNewCheck == false) || ($ctrl.beforesave == false && $ctrl.addNewCheck == false) || ($ctrl.beforesave == true && $ctrl.addNewCheck == true)\\\"><i style=\\\"cursor: pointer\\\" class=material-icons ng-click=$ctrl.editForecast(item.id)></i></td><td style=text-align:center ng-if=\\\"$ctrl.beforesave == false && $ctrl.addNewCheck == true\\\"><i style=\\\"cursor: pointer\\\" class=material-icons ng-click=$ctrl.showCustomSearch($event,$ctrl.editForecastId,true,item.id)></i></td></tr><tr ng-if=!getForecastList.length><td colspan=4 style=text-align:center>Enter in custom forecast information above to create your first forecast</td></tr></tbody></table></div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/dashboard/cfs/on-time/otp.html\",\"<md-card flex=auto flex-fill class=\\\"ontime-percentage-widget widget loading-container has-menu\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=WIDGETS.ON_TIME_PERCENTAGE></span> </span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button aria-label=setCustomRange ng-click=\\\"vm.setCustomRange(\\'on-time-percentage\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.SET_END_DATE></span></p></div></md-button></md-menu-item><md-menu-item ng-if=vm.widgetHasCustomRange.onTimePercentage><md-button ng-click=\\\"vm.resetCustomRange(\\'on-time-percentage\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.RESET_END_DATE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always class=md-primary><md-tab ng-repeat=\\\"tab in vm.onTimePercentage.tabs\\\" md-on-select=vm.onTimePercentage.tabSelected(tab) ng-disabled=tab.disabled md-active=\\\"$index==3\\\"><md-tab-label><span translate={{tab.label}}></span></md-tab-label></md-tab></md-tabs><!-- loadmask=\\\"vm.onTimePercentage.isLoaded()\\\" --><md-content flex=auto flex-fill class=\\\"loadmask-dark loadmask-clear\\\" loadmask=vm.onTimePercentage.isLoaded()><div flex=auto ng-class=\\\"{loaded: vm.onTimePercentage.isLoaded(), \\'first-load\\': !vm.onTimePercentage.isLoaded(), \\'loading-content\\': !vm.onTimePercentage.isLoaded()}\\\" id=on-time-percentage><div layout=column layout-align=\\\" center\\\" class=\\\"md-padding cfs-padding\\\"><h4 layout=row layout-align=\\\"center center\\\" ng-if=vm.onTimePercentage.isLoaded()>{{vm.onTimePercentage.getDateRange()}}</h4><div class=\\\"percentage cfs-percentage\\\"><span ng-if=!vm.onTimePercentage.isNoCurrentData()>{{ vm.onTimePercentage.getPercentage() }}%</span> <span ng-if=vm.onTimePercentage.isNoCurrentData()>—</span></div><div><!--<section class=\\\"btn-group btn-group-sm btn-group-block-xs\\\" layout=\\\"row\\\" layout-sm=\\\"column\\\" layout-align=\\\"center center\\\" style=\\\"text-align: center; width: 100%\\\">\\r\\n <md-button class=\\\"btn-left {{vm.onTimePercentage.version == \\'ontime\\' ? \\'btn-active\\' : \\'btn-inactive\\'}}\\\" ng-click=\\\"vm.onTimePercentageSwap(\\'ontime\\')\\\" flex=\\\"25\\\" style=\\\"width: 100px\\\">\\r\\n <strong><span translate=\\\"WIDGETS.RAW\\\"></span></strong>\\r\\n </md-button>\\r\\n <md-button class=\\\"btn-right {{vm.onTimePercentage.version == \\'adjusted_ontime\\' ? \\'btn-active\\' : \\'btn-inactive\\'}}\\\" flex=\\\"25\\\" ng-click=\\\"vm.onTimePercentageSwap(\\'adjusted_ontime\\')\\\" style=\\\"width: 100px\\\">\\r\\n <strong><span translate=\\\"WIDGETS.ADJUSTED\\\"></span></strong>\\r\\n </md-button>\\r\\n </section>--><p class=\\\"md-caption change-info\\\"></p><div ng-if=!vm.onTimePercentage.isNoCurrentData() class=otp-div-height><div ng-if=!vm.onTimePercentage.isNoPreviousData()><md-icon aria-label=direction ng-show=vm.onTimePercentage.getChange()>{{vm.onTimePercentage.getDirection()}}</md-icon><md-icon ng-hide=vm.onTimePercentage.getChange()>remove</md-icon>{{ vm.onTimePercentage.getChange() }}% {{vm.onTimePercentage.fromLast() | translate}}</div><div ng-if=vm.onTimePercentage.isNoPreviousData() class=otp-div-height>{{ vm.onTimePercentage.noPreviousData() | translate }}</div></div><div ng-if=vm.onTimePercentage.isNoCurrentData() class=otp-div-height>{{ vm.onTimePercentage.noCurrentData() | translate }}</div><p></p></div><!-- Percent Complete --><div flex=auto layout=column><div flex=auto layout=row layout-align=\\\"center center\\\" class=\\\"text-strong current-cfs\\\">Current {{vm.onTimePercentage.selected}}</div><div flex=auto layout=row class=\\\"meter blue progress-bar\\\"><span class=percent><strong>{{vm.onTimePercentage.getDatePercentage()}}%</strong></span> <span class=\\\"bar progress-bar\\\" ng-attr-style=\\\"width: {{vm.onTimePercentage.getDatePercentage()}}%\\\"></span></div><!-- Progress Bar --><div layout=row class=\\\"m-b-sm otp-progress-font\\\"><span class=text-sub>{{vm.displayDate(vm.onTimePercentage.getDateFrom())}}</span> <span flex=auto></span> <span class=text-sub>{{vm.displayDate(vm.onTimePercentage.getDatePeriodTo())}}</span></div></div></div><!-- End column --></div><!-- End loading class --></md-content></md-card>\");\n$templateCache.put(\"/app/dashboard/cmts/configurations/version-a.html\",\"<div flex=100 layout=row style=\\\"margin:0 15px\\\"><span flex=auto></span><md-button class=btn-link md-ink-ripple=false ng-click=vm.hardRefresh() ng-disabled=trackTraceCtrl.showLoading><span>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span><!-- <span class=\\\"btn-load-wrapper\\\" ng-show=\\\"trackTraceCtrl.showLoading\\\">\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>\\r\\n </span> --></md-button></div><!-- <div flex layout=\\\"row\\\" ng-include=\\\"\\'/app/dashboard/five-day-forecast/five-day-forecast.html\\'\\\">HI</div> --><div layout-xs=column layout-sm=column layout-gt-sm=row layout-fill><!-- hide the html if you are loading and show the loading animation instead --><!-- ACTIVE SHIPMENTS --><div class=ie-donut flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/cmts/total-shipments.html\\'\\\" ng-show=vm.showLoading></div><!-- CURRENT EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/cmts/current-exceptions.html\\'\\\" ng-show=vm.showLoading></div></div><div ng-if=true><five-day-cmts-forecast></five-day-cmts-forecast></div><div layout-xs=column layout-sm=column layout-gt-sm=row><!-- BOOKMARKED SHIPMENTS --><div flex-xs=auto flex-gt-sm=100 layout=column><md-card flex=auto ng-include=\\\"\\'/app/components/widgets/cmts/bookmarked-shipments.html\\'\\\" ng-controller=\\\"WidgetsCmtsController as widgetsCmtsCtrl\\\" ng-init=\\\"widgetsCmtsCtrl.page_name=\\'dashboard\\'\\\" class=\\\"loadmask-dark widget has-menu shipment_bookmark\\\"></md-card></div></div>\");\n$templateCache.put(\"/app/dashboard/cmts/configurations/version-b.html\",\"<div layout-xs=column layout-sm=column layout-gt-sm=row layout-fill><!-- hide the html if you are loading and show the loading animation instead --><five-day-forecast></five-day-forecast><div flex=auto layout=row ng-include=\\\"\\'/app/dashboard/five-day-forecast/five-day-forecast.html\\\"></div><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/cmts/total-shipments.html\\'\\\" ng-show=vm.showLoading></div><!-- CURRENT EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/current-exceptions.html\\'\\\" ng-show=vm.showLoading></div><!-- POTENTIAL EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/potential-exceptions.html\\'\\\" ng-show=vm.showLoading></div></div><!-- SHIPMENTS VOLUME AND COUNT OVER TIME --><div ng-if=true><md-card flex=auto ng-include=\\\"\\'/app/dashboard/shipments-over-time/shipments-over-time.html\\'\\\" class=widget></md-card></div><div layout-xs=column layout-sm=column layout-gt-sm=row><!--SPENDING OVER TIME --><div flex-xs=auto flex-gt-xs=33><!--<div flex=\\\"auto\\\" ng-include=\\\"\\'/app/dashboard/on-time/otp.html\\'\\\"></div>--><div flex=auto ng-include=\\\"\\'/app/components/widgets/spending-over-time.html\\'\\\"></div></div><!-- BOOKMARKED SHIPMENTS --><div flex-xs=auto flex-gt-sm=66 layout=column><md-card flex=auto ng-include=\\\"\\'/app/components/widgets/bookmarked-shipments.html\\'\\\" ng-controller=\\\"WidgetsController as widgetsCtrl\\\" class=\\\"loadmask-dark widget has-menu\\\" loadmask=!widgetsCtrl.isBookmarksFirstLoad ng-class=\\\"{\\'disabled-bookmark-page\\': widgetsCtrl.switchUser == true}\\\"></md-card></div></div>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/custom-options-modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t\\\" style=top:25%><md-toolbar><div class=md-toolbar-tools><h2 ng-if=\\\"editCheck == true\\\">EDIT FORECAST</h2>{{editCheckID}}<h2 ng-if=\\\"editCheck == false\\\">CREATE NEW FORECAST</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p ng-if=\\\"editCheck == true\\\">You have unsaved edits with your current forecast.<br>Would you like to save before editing a forecast?</p><p ng-if=\\\"editCheck == false\\\">You have unsaved edits with your current forecast.<br>Would you like to save before creating a new forecast?</p><p></p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"space-around center\\\"><md-button ng-click=vm.closeModal() class=\\\"md-raised md-button md-ink-ripple\\\" style=\\\"border:1px solid #2B7C8C;color:#2B7C8C;box-shadow:none\\\">CANCEL</md-button><md-button ng-click=vm.save(savedForecastId,editCheckID,true) class=\\\"md-raised md-accent ttsearch-buttom md-button md-ink-ripple\\\" style=box-shadow:none>SAVE</md-button><md-button ng-if=\\\"editCheck == true\\\" ng-click=vm.editForecast(editCheckID) class=\\\"md-raised md-accent ttsearch-buttom md-button md-ink-ripple\\\" style=box-shadow:none>NO</md-button><md-button ng-if=\\\"editCheck == false\\\" ng-click=vm.openNewForm() class=\\\"md-raised md-accent ttsearch-buttom md-button md-ink-ripple\\\" style=box-shadow:none>NO</md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/custom-options.html\",\"<md-card-content loadmask-dark loadmask-clear loadmask=!$ctrl.isLoading><div ng-show=$ctrl.active><form name=$ctrl.customOptionsForm flex=auto class=five-day-form-in><div layout=column><div class=custom-forecast><header layout=row layout-align=\\\"start center\\\"><div flex=auto flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label translate=WIDGETS.FORECAST_LABEL></label><input ng-model=$ctrl.newOption.forecast_label ng-required=\\\"($ctrl.newOption.origins.length > 0\\r\\n || $ctrl.newOption.destinations.length > 0\\r\\n || $ctrl.newOption.lane_pairs.length > 0)\\r\\n \\\" name=newOption></md-input-container><!-- <label translate=\\\"WIDGETS.FORECAST_LABEL\\\"></label>\\r\\n <input\\r\\n ng-model=\\\"optionRow.forecast_label\\\"\\r\\n ng-model-options=\\\"{ debounce: 200 }\\\"\\r\\n ng-required=\\\"true\\\"\\r\\n name=\\\"{{optionRow.id}}\\\"\\r\\n value=\\\"{{optionRow.forecast_label}}\\\">\\r\\n </md-input-container> --></div></header><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.ORIGIN></label><md-chips ng-model=$ctrl.newOption.origins md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchOrigin md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchOrigin)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Origin\\\"><md-item-template><span md-highlight-text=searchOrigin>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.DESTINATION></label><md-chips ng-model=$ctrl.newOption.destinations md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchDestination md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchDestination)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Destination\\\"><md-item-template><span md-highlight-text=searchDestination>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.LANE_PAIRS></label><md-chips ng-model=$ctrl.newOption.lane_pairs md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchLanePairs md-items=\\\"item in $ctrl.getMatches(\\'forecast_lane_pair\\', searchLanePairs)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Lane Pair\\\"><md-item-template><span md-highlight-text=searchLanePairs>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></div><div ng-repeat=\\\"optionRow in $ctrl.customForecasts\\\" layout=column><div class=custom-forecast><header layout-gt-sm=row layout-align=\\\"center center\\\" layout-wrap><div flex=auto flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label translate=WIDGETS.FORECAST_LABEL></label><input ng-model=optionRow.forecast_label ng-model-options=\\\"{ debounce: 200 }\\\" ng-required=true name={{optionRow.id}} value={{optionRow.forecast_label}}></md-input-container></div><div layout=row layout-align=\\\"center center\\\" flex=auto><div flex=50 flex-offset-gt-sm=10><md-checkbox ng-model=optionRow.is_default ng-change=$ctrl.removeOtherDefaults(optionRow) aria-label=\\\"Set As Default\\\">Set as Default</md-checkbox></div><div flex=50 layout=row layout-align=end><md-button aria-label=delete ng-click=$ctrl.deleteOptionRow(optionRow)>REMOVE<md-icon>clear</md-icon></md-button></div></div></header><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.ORIGIN></label><md-chips ng-model=optionRow.origins ng-required=$ctrl.requireAtLeastOne(optionRow) md-transform-chip=$ctrl.chipDisplay($chip) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchOrigin md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchOrigin)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Origin\\\"><md-item-template><span md-highlight-text=searchOrigin>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.DESTINATION></label><md-chips ng-model=optionRow.destinations md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(optionRow) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchDestination md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchDestination)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Destination\\\"><md-item-template><span md-highlight-text=searchDestination>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=\\\"cfc-content lane-pairs\\\"><md-input-container><label translate=WIDGETS.FIVE_DAY.LANE_PAIRS></label><md-chips ng-model=optionRow.lane_pairs md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(optionRow) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchLanePairs md-items=\\\"item in $ctrl.getMatches(\\'forecast_lane_pair\\', searchLanePairs)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Lane Pair\\\"><md-item-template><span md-highlight-text=searchLanePairs>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></div></form><div layout=row><div layout=row layout-align=start flex=auto class=m-t><md-button class=\\\"md-warn md-ink-ripple five-day-cancel\\\" ng-click=$ctrl.cancel()><span translate=USER.CANCEL></span></md-button></div><div layout=row layout-align=end flex=auto class=m-t><md-button class=\\\"md-primary md-ink-ripple five-day-save\\\" ng-click=$ctrl.save() ng-disabled=\\\"$ctrl.emptyData() || $ctrl.customOptionsForm.$invalid\\\"><span translate=USER.SAVE></span></md-button></div></div></div></md-card-content>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/delete-forecast.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/delete-forecast.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=m-t style=top:25%><md-toolbar><div class=md-toolbar-tools><h2>DELETE FORECAST</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>Are you sure you want to delete this custom forecast?</p><p></p><div style=\\\"text-align: center\\\"><!-- <loading-button\\r\\n callfunction=\\\"vm1.deleteForecastSet(id)\\\"\\r\\n display=\\\"YES\\\"\\r\\n isloading=\\\"vm1.isActionLoading\\\">\\r\\n </loading-button> --><md-button style=\\\"border: 1px solid #ccc\\\" ng-click=vm.deleteForecastSet(vm.savedDeletedForecastId,vm.savedDeletedForecastIndexNo) isloading=vm.isActionLoading>YES</md-button><span flex=auto></span><loading-button callfunction=vm.closeModal() display=NO></loading-button></div></md-dialog-content><!-- <md-dialog-actions layout=\\\"row\\\" layout-align=\\\"start center\\\"> \\r\\n <md-button ng-click=\\\"vm.closeModal()\\\">NO</md-button>\\r\\n <span flex=\\\"auto\\\"></span>\\r\\n <loading-button\\r\\n callfunction=\\\"vm.deleteForecastSet(id)\\\"\\r\\n display=\\\"YES\\\"\\r\\n isloading=\\\"vm.isActionLoading\\\">\\r\\n </loading-button>\\r\\n </md-dialog-actions> --></md-dialog>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/delete-forecast.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex><p>Forecast Removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/five-day-forecast-mobile.form.html\",\"<div ng-show=true flex=auto><div ng-include=\\\"\\'/app/dashboard/cmts/five-day-forecast/five-day-forecast.form.html\\'\\\"></div></div><div ng-show=$ctrl.isMobile() style=\\\"padding-bottom: 5px\\\"></div>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/five-day-forecast.form.html\",\"<form name=$ctrl.fiveDayForm><div layout-gt-sm=row layout=column flex=auto><div flex=25><mdp-date-picker mdp-format=MM/DD/YYYY ng-change=$ctrl.selectedDateChange() ng-model-options=\\\"{debounce: 1000}\\\" ng-disabled=$ctrl.isLoading ng-model=$ctrl.payload.date_from class=\\\"mb-0 error-hidden\\\"><label translate=WIDGETS.START_DATE></label>{{$ctrl.start_date.$error}}</mdp-date-picker></div><div flex=20 ng-class=\\\"{\\'mobile-offset-top\\': $ctrl.isMobile()}\\\" flex-offset=\\\"{{$ctrl.isMobile() ? \\'\\' : \\'5\\'}}\\\"><div class=\\\"md-tab-wrapper five-day-bs-type-active\\\"><md-tabs md-stretch-tabs=always><md-tab ng-repeat=\\\"vtab in $ctrl.lane_type\\\" md-on-select=\\\"$ctrl.onLaneTypeTabSelected(vtab, $index)\\\" md-on-deselect=announceDeselected(vtab) ng-disabled=vtab.deselected><md-tab-label><span translate={{vtab.label}}></span><div ng-show=\\\"vtab.field==\\'ALL\\'\\\">ALL</div><div ng-show=\\\"vtab.field==\\'TL\\'\\\"><md-icon style=font-size:17px class=font-family-ftl></md-icon></div><!--<div ng-show=\\\"vtab.field==\\'LOCAL\\'\\\"><md-icon style=\\\"font-size:17px;\\\" class=\\\"font-family-intermodal\\\"></md-icon></div>--><div ng-show=\\\"vtab.field==\\'LTL\\'\\\"><md-icon style=font-size:17px class=font-family-ltl></md-icon></div></md-tab-label></md-tab></md-tabs></div></div><div flex=25 flex-offset=5 ng-if=!$ctrl.isMobile()><md-input-container class=md-block><label translate=WIDGETS.LOCATION_FILTER></label><md-select ng-model=$ctrl.selectedOptionRow ng-change=$ctrl.checkClear(); ng-model-options=\\\"{trackBy: $value.id}\\\" placeholder=\\\"Default Forecast\\\" aria-label=\\\"Default Forecast\\\" md-on-open=$ctrl.onSelectOpen() md-on-close=$ctrl.onSelectClose()><md-option value=null>All Locations</md-option><md-option ng-repeat=\\\"frow in $ctrl.custom_forecasts\\\" value={{frow.id}}>{{frow.forecast_label}}</md-option><!--<md-option ng-if=\\\"!$ctrl.custom_forecasts.length\\\" value=\\'create\\' layout=\\\"row\\\" layout-align=\\\"center center\\\" style=\\\"color:#2A9FD8; font-size:16px;\\\">\\r\\n\\r\\n <i\\r\\n class=\\\"material-icons\\\"\\r\\n style=\\\"float:left;cursor: pointer;color: #3eaee5;margin-right:10px\\\" ></i>\\r\\n <span style=\\\"float:left;\\\">Create Preset</span>\\r\\n\\r\\n </md-option>\\r\\n\\r\\n <md-option ng-if=\\\"$ctrl.custom_forecasts.length\\\" value=\\'create_new\\' layout=\\\"row\\\" layout-align=\\\"center center\\\" style=\\\"color:#2A9FD8; font-size:16px;\\\">\\r\\n\\r\\n <i\\r\\n class=\\\"material-icons\\\"\\r\\n style=\\\"float:left;cursor: pointer;color: #3eaee5;margin-right:10px\\\" ></i>\\r\\n <span style=\\\"float:left;\\\">Create a New Preset</span>\\r\\n\\r\\n </md-option>--></md-select></md-input-container></div><div flex=5 ng-if=!$ctrl.isMobile() layout=row layout-align=\\\"start center\\\"><!--<md-button aria-label=\\\"create\\\" ng-click=\\\"$ctrl.toggleOptions()\\\" style=\\\"color: #45AFE3;\\\">\\r\\n <md-icon style=\\\"color: #45AFE3;\\\">create</md-icon> edit\\r\\n </md-button>--><md-button aria-label=create ng-click=$ctrl.toggleOptions($ctrl.selectedOptionRow)><md-icon>create</md-icon>edit</md-button></div><!-- Mobile --><div layout=row class=mobile-offset-top ng-if=$ctrl.isMobile()><md-input-container flex=90 class=md-block><label translate=WIDGETS.LOCATION_FILTER></label><md-select ng-model=$ctrl.selectedOptionRow aria-label=$ctrl.selectedOptionRow ng-change=$ctrl.checkClear(); ng-model-options=\\\"{trackBy: $value.id}\\\" md-on-open=$ctrl.onSelectOpen() md-on-close=$ctrl.onSelectClose()><md-option value=null>None</md-option><md-option ng-repeat=\\\"frow in $ctrl.custom_forecasts\\\" value={{frow.id}}>{{frow.forecast_label}}</md-option></md-select></md-input-container><!-- ng-click=\\\"$ctrl.toggleOptions()\\\" --><md-button class=md-icon-button ng-click=$ctrl.toggleOptions($ctrl.selectedOptionRow) flex=10 aria-label=create><md-icon>create</md-icon></md-button></div></div></form>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/five-day-forecast.html\",\"<md-card flex=auto class=\\\"widget ie-fivedayforcast\\\" id=ie-fivedayforcast><md-toolbar ng-click=$ctrl.saveForecastAccordian()><div class=md-toolbar-tools><h2><md-icon md-svg-src=../assets/images/icons/ic_date_range.svg class=\\\"icon-reset svg-icon-reset\\\"></md-icon><span><span ng-show=!$ctrl.optionsActive translate=WIDGETS.FIVE_DAY.FIVE_DAY_FORECAST></span> <span ng-show=$ctrl.optionsActive translate=WIDGETS.FORECAST_CUSTOM_OPTIONS></span></span></h2><span flex=auto></span></div></md-toolbar><md-card-content ng-show=!$ctrl.optionsActive class=five-day-forecast loadmask-dark loadmask-clear loadmask=!$ctrl.isLoading><div ng-class=\\\"{loaded: !$ctrl.isLoading, \\'first-load\\': $ctrl.isLoading, \\'loading-content\\': $ctrl.isLoading}\\\" layout=column flex=auto style=display:block><div class=ie-forecastdate flex=100 layout=row collapsible template-url=/app/dashboard/cmts/five-day-forecast/five-day-forecast-mobile.form.html></div><div layout=row layout-align=\\\"center end\\\" class=\\\"activity-notices hide show-gt-sm\\\"><div flex=1 ng-repeat=\\\"day in $ctrl.days track by $index | limitTo:5\\\" class=activity-header><div flex=auto ng-if=\\\"!day.is_record && day.is_high\\\" class=\\\"notice high-activity\\\"><div class=\\\"activity-icon high-activity-icon\\\"><span><img src=../assets/images/flame-icon.png></span></div><div class=\\\"activity-text high-activity-text\\\"><span>High Shipment Activity</span></div></div><div ng-if=day.is_record class=\\\"notice daily-record\\\"><div class=\\\"activity-icon daily-record-icon\\\"><span><md-icon class=material-icons></md-icon></span></div><div class=\\\"activity-text daily-record-text\\\"><span>New Daily Record</span></div></div></div></div><div flex=1 id=forecasts layout-gt-sm=row layout-align-gt-sm=\\\"center stretch\\\" layout-align-sm=\\\"space-between stretch\\\" layout-sm=column><div flex-gt-sm=20 flex-sm=100 ng-repeat=\\\"day in $ctrl.days track by $index | limitTo:5\\\" class=day-wrapper><div layout=column layout-align=\\\"center stretch\\\" class=\\\"activity-notices hide-gt-sm\\\"><div flex=auto ng-if=\\\"!day.is_record && day.is_high\\\" class=\\\"notice high-activity\\\"><div class=\\\"activity-icon high-activity-icon\\\"><span><img src=../assets/images/flame-icon.png></span></div><div class=\\\"activity-text high-activity-text\\\"><span>High Shipment Activity</span></div></div><div ng-if=day.is_record class=\\\"notice daily-record\\\"><div class=\\\"activity-icon daily-record-icon\\\"><span><md-icon class=material-icons></md-icon></span></div><div class=\\\"activity-text daily-record-text\\\"><span>New Daily Record</span></div></div></div><forecast-cmts flex=auto data=day payload=$ctrl.payload index={{$index}} mobile=$ctrl.isMobile()></forecast-cmts></div></div></div></md-card-content><custom-options-cmts flex=auto ng-if=$ctrl.optionsActive active=$ctrl.optionsActive custom-forecasts=$ctrl.custom_forecasts></custom-options-cmts></md-card>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/forecast-cmts.html\",\"<style type=text/css>md-tooltip .md-content {\\r\\n color: #FFFFFF;\\r\\n text-transform: uppercase;\\r\\n font-weight: normal;\\r\\n font-size: .95em;\\r\\n opacity: 0.96; \\r\\n background-color: black;\\r\\n height: auto;\\r\\n}</style><div layout=row layout-align=\\\"center stretch\\\" layout-fill class=forecast-wrapper ng-class=\\\"{\\'show-notice\\': $ctrl.data.is_record || $ctrl.data.is_high, \\'record-high\\': $ctrl.data.is_record, \\'high-shipments\\': $ctrl.data.is_high && !$ctrl.data.is_record}\\\"><div layout=column layout-align=\\\"end stretch\\\" layout-fill><div flex=auto layout=column class=\\\"forecast disabled\\\" layout-align=\\\"center stretch\\\" ng-if=!$ctrl.getTotal()><div class=upper><h1 layout=row layout-align=\\\"center center\\\" class=header>{{$ctrl.getDay()}}</h1><span class=subheader layout=row layout-align=\\\"center center\\\">{{$ctrl.getDate()}}</span></div><div flex=auto layout=column layout-align=\\\"center center\\\"><span class=md-display-1 translate=WIDGETS.FIVE_DAY.DISABLED></span></div></div><div flex=auto layout=column class=forecast layout-align=\\\"center stretch\\\" ng-if=$ctrl.getTotal() ng-click=$ctrl.viewOnTrackAndTraceCmts($ctrl.getDateForTT())><div class=upper><h1 layout=row layout-align=\\\"center center\\\" class=header>{{$ctrl.getDay()}}</h1><span class=subheader layout=row layout-align=\\\"center center\\\">{{$ctrl.getDate()}}</span><md-tooltip md-direction=center><div class=tooltip-bc-color><span style=\\\"margin:5%;font-weight: bold;margin-left: 3%;font-size: 1.3em\\\">Top Shipments</span> <span ng-show=\\\"$ctrl.data.ref_numbers.length === 0\\\" style=\\\"margin:3%;margin-left: 3%;font-weight: bold\\\">No Shipments Found.</span><div style=\\\"margin-left: 3%\\\" ng-repeat=\\\"shipmentValue in $ctrl.data.ref_numbers track by $index\\\" style=\\\"margin-bottom: -2%\\\"><span style=\\\"color: #fff;font-weight: bold\\\">{{$ctrl.data.ref_numbers[$index]}}</span></div></div></md-tooltip></div><div flex=auto></div><div class=body><div ng-if=!$ctrl.mobile><md-grid-list md-cols=4 md-gutter=8px md-row-height=1:1><md-grid-tile ng-repeat=\\\"container in $ctrl.containers\\\" md-colspan={{container.colspan}} md-rowspan={{container.rowspan}} class={{container.icon_class}}><md-icon ng-if=!container.empty md-svg-icon={{container.icon}}></md-icon></md-grid-tile></md-grid-list></div><h1 layout=row layout-align=\\\"center center\\\" class=md-display-3>{{$ctrl.getTotal()}}</h1><span layout=row layout-align=\\\"center center\\\" class=md-title>DELIVERIES</span></div><div class=business-group layout=row layout-align=\\\"space-around center\\\"><span flex=1 class=font-xs><md-icon class=font-family-ftl style=font-size:11px></md-icon>{{$ctrl.getPercentageTl()}} </span><span flex=1 class=font-xs><md-icon class=font-family-ltl style=font-size:11px></md-icon>{{$ctrl.getPercentageLtl()}}</span></div><!--<div class=\\\"business-group\\\" layout=\\\"row\\\">\\r\\n <span flex=\\\"1\\\"><md-icon></md-icon>{{$ctrl.getPercentageGround()}}</span>\\r\\n </div>--><div class=lower><breakdowncmts data=$ctrl.data index={{$ctrl.index}} mobile=$ctrl.mobile></breakdowncmts></div></div></div></div>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/location_filter_empty_modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t\\\" style=top:25%><md-toolbar><div class=md-toolbar-tools><h2 style=\\\"text-transform: capitalize\\\">Enter Required Field</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>Please enter a <b>Location Filter Label </b>to save this forecast.</p><p></p></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/save_changes_alert_model.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=m-t style=top:25%><md-toolbar><div class=md-toolbar-tools><h2 style=\\\"text-transform: capitalize\\\" ng-if=!vm.editForecastId>CANCEL CREATION OF FORECAST</h2><h2 style=\\\"text-transform: capitalize\\\" ng-if=vm.editForecastId>EDIT FORECAST</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p ng-if=\\\"vm.redirectPath == \\'cancel\\' && !vm.editForecastId \\\">Do you want to cancel creation of forecast</p><p ng-if=\\\"(vm.redirectPath == \\'cancel\\' && vm.editForecastId) || vm.redirectPath == \\'apply\\' \\\">You have unsaved edits with your current forecast.<br>Do you want to cancel the changes?</p><p></p><div style=\\\"text-align: center\\\"><md-button style=\\\"border: 1px solid #ccc\\\" ng-click=\\\"vm.redirectPath == \\'cancel\\'?vm.cancel():vm.getDays(vm.editForecastId)\\\" isloading=vm.isActionLoading>YES</md-button><span flex=auto></span><loading-button callfunction=vm.closeModal() display=NO></loading-button></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/dashboard/cmts/five-day-forecast/saved-forecast-accordian.html\",\"<div class=\\\"m-b saved-forecast\\\" style=display:block id=mySavedForecast><md-card flex=auto flex-fill class=\\\"ontime-percentage-widget widget loading-container has-menu\\\"><md-toolbar ng-click=$ctrl.saveForecastAccordian()><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=\\\"MY SAVED FORECAST\\\"></span> </span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=\\\"!$ctrl.aljexSavedForecastIsExpanded && !$ctrl.aljexSavedIsOpen\\\"><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=\\\"$ctrl.aljexSavedForecastIsExpanded || $ctrl.aljexSavedIsOpen\\\"><md-icon aria-label=options></md-icon></md-button><md-menu-content hide></md-menu-content></md-menu></div></md-toolbar><md-card-content ng-if=\\\"$ctrl.aljexSavedForecastIsExpanded || $ctrl.aljexSavedIsOpen\\\"><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\" class=\\\"light-form m-t\\\"><div layout=row flex-xs=100 style=margin-right:20px><md-checkbox layout=row ng-hide=$ctrl.allLocationSet ng-checked=true class=\\\"md-primary color-347c8f\\\" aria-label=\\\"All Locations is set to Default\\\">All Locations is set to Default</md-checkbox></div><div layout=row flex-xs=100><md-checkbox id=savedForecastOpen layout=row ng-model=$ctrl.aljexSavedForecastIsExpanded ng-change=$ctrl.setAljexSavedForecastExpanded() class=\\\"md-primary color-ffffff\\\" aria-label=\\\"Keep Saved Forecast Open\\\"></md-checkbox><label for=savedForecastOpen>Keep Saved Forecast Open</label></div></div><div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\"><div class=\\\"table-scroll m-t\\\"><table cellspacing=0 ng-class=\\\"card-content-table saved-forecast-table\\\" align=center;><thead><!-- ng-style or ng-class is not working --><tr ng-if=getForecastList.length><th class=location_filter_label style=width:55%;text-align:left>LOCATION FILTER LABEL</th><th class=location_filter_label style=width:15%>CURRENT DEFAULT</th><th style=width:15%>DELETE</th><th style=width:15%>EDIT</th></tr><tr ng-if=!getForecastList.length style=color:#3b3c41><th class=location_filter_label style=width:55%;text-align:left>LOCATION FILTER LABEL</th><th class=location_filter_label style=width:15%>CURRENT DEFAULT</th><th style=width:15%>DELETE</th><th style=width:15%>EDIT</th></tr></thead><tbody class=saved-forecast-list><tr ng-repeat=\\\"item in getForecastList\\\" class=savedForecast{{$index}}><!-- right now ng-style/ng-class is not working --><td class=location_filter_label ng-if=\\\"item.id == $ctrl.editForecastId\\\" style=text-align:left;color:#3eaee5>{{item.forecast_label}}</td><td class=location_filter_label ng-if=\\\"item.id != $ctrl.editForecastId\\\" style=text-align:left;color:#797a80>{{item.forecast_label}}</td><td class=current_default style=text-align:center><label class=container style=\\\"position: relative;margin-top:7px;display:inline\\\"><input type=checkbox ng-checked=item.is_default ng-true-value={{item.id}} ng-click=$ctrl.updateForecastSet(item.id) ng-model=$ctrl.forecast_check_value> <span class=checkmark></span></label><!-- <md-radio-button value=\\\"Apple\\\" class=\\\"md-primary\\\">Apple</md-radio-button> --></td><td style=text-align:center><i style=\\\"cursor: pointer\\\" ng-click=$ctrl.showModal(ev,item.id,$index) class=material-icons></i></td><td style=text-align:center ng-if=\\\"($ctrl.beforesave == true && $ctrl.addNewCheck == false) || ($ctrl.beforesave == false && $ctrl.addNewCheck == false) || ($ctrl.beforesave == true && $ctrl.addNewCheck == true)\\\"><i style=\\\"cursor: pointer\\\" class=material-icons ng-click=$ctrl.editForecast(item.id)></i></td><td style=text-align:center ng-if=\\\"$ctrl.beforesave == false && $ctrl.addNewCheck == true\\\"><i style=\\\"cursor: pointer\\\" class=material-icons ng-click=$ctrl.showCustomSearch($event,$ctrl.editForecastId,true,item.id)></i></td></tr><tr ng-if=!getForecastList.length><td colspan=4 style=text-align:center>Enter in custom forecast information above to create your first forecast</td></tr></tbody></table></div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/dashboard/cmts/on-time/otp.html\",\"<md-card flex=auto flex-fill class=\\\"ontime-percentage-widget widget loading-container has-menu\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=WIDGETS.ON_TIME_PERCENTAGE></span> </span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button aria-label=setCustomRange ng-click=\\\"vm.setCustomRange(\\'on-time-percentage\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.SET_END_DATE></span></p></div></md-button></md-menu-item><md-menu-item ng-if=vm.widgetHasCustomRange.onTimePercentage><md-button ng-click=\\\"vm.resetCustomRange(\\'on-time-percentage\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.RESET_END_DATE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always class=md-primary><md-tab ng-repeat=\\\"tab in vm.onTimePercentage.tabs\\\" md-on-select=vm.onTimePercentage.tabSelected(tab) ng-disabled=tab.disabled md-active=\\\"$index==3\\\"><md-tab-label><span translate={{tab.label}}></span></md-tab-label></md-tab></md-tabs><!-- loadmask=\\\"vm.onTimePercentage.isLoaded()\\\" --><md-content flex=auto flex-fill class=\\\"loadmask-dark loadmask-clear\\\" loadmask=vm.onTimePercentage.isLoaded()><div flex=auto ng-class=\\\"{loaded: vm.onTimePercentage.isLoaded(), \\'first-load\\': !vm.onTimePercentage.isLoaded(), \\'loading-content\\': !vm.onTimePercentage.isLoaded()}\\\" id=on-time-percentage><div layout=column layout-align=\\\" center\\\" class=\\\"md-padding cfs-padding\\\"><h4 layout=row layout-align=\\\"center center\\\" ng-if=vm.onTimePercentage.isLoaded()>{{vm.onTimePercentage.getDateRange()}}</h4><div class=\\\"percentage cfs-percentage\\\"><span ng-if=!vm.onTimePercentage.isNoCurrentData()>{{ vm.onTimePercentage.getPercentage() }}%</span> <span ng-if=vm.onTimePercentage.isNoCurrentData()>—</span></div><div><!--<section class=\\\"btn-group btn-group-sm btn-group-block-xs\\\" layout=\\\"row\\\" layout-sm=\\\"column\\\" layout-align=\\\"center center\\\" style=\\\"text-align: center; width: 100%\\\">\\r\\n <md-button class=\\\"btn-left {{vm.onTimePercentage.version == \\'ontime\\' ? \\'btn-active\\' : \\'btn-inactive\\'}}\\\" ng-click=\\\"vm.onTimePercentageSwap(\\'ontime\\')\\\" flex=\\\"25\\\" style=\\\"width: 100px\\\">\\r\\n <strong><span translate=\\\"WIDGETS.RAW\\\"></span></strong>\\r\\n </md-button>\\r\\n <md-button class=\\\"btn-right {{vm.onTimePercentage.version == \\'adjusted_ontime\\' ? \\'btn-active\\' : \\'btn-inactive\\'}}\\\" flex=\\\"25\\\" ng-click=\\\"vm.onTimePercentageSwap(\\'adjusted_ontime\\')\\\" style=\\\"width: 100px\\\">\\r\\n <strong><span translate=\\\"WIDGETS.ADJUSTED\\\"></span></strong>\\r\\n </md-button>\\r\\n </section>--><p class=\\\"md-caption change-info\\\"></p><div ng-if=!vm.onTimePercentage.isNoCurrentData() class=otp-div-height><div ng-if=!vm.onTimePercentage.isNoPreviousData()><md-icon aria-label=direction ng-show=vm.onTimePercentage.getChange()>{{vm.onTimePercentage.getDirection()}}</md-icon><md-icon ng-hide=vm.onTimePercentage.getChange()>remove</md-icon>{{ vm.onTimePercentage.getChange() }}% {{vm.onTimePercentage.fromLast() | translate}}</div><div ng-if=vm.onTimePercentage.isNoPreviousData() class=otp-div-height>{{ vm.onTimePercentage.noPreviousData() | translate }}</div></div><div ng-if=vm.onTimePercentage.isNoCurrentData() class=otp-div-height>{{ vm.onTimePercentage.noCurrentData() | translate }}</div><p></p></div><!-- Percent Complete --><div flex=auto layout=column><div flex=auto layout=row layout-align=\\\"center center\\\" class=\\\"text-strong current-cfs\\\">Current {{vm.onTimePercentage.selected}}</div><div flex=auto layout=row class=\\\"meter blue progress-bar\\\"><span class=percent><strong>{{vm.onTimePercentage.getDatePercentage()}}%</strong></span> <span class=\\\"bar progress-bar\\\" ng-attr-style=\\\"width: {{vm.onTimePercentage.getDatePercentage()}}%\\\"></span></div><!-- Progress Bar --><div layout=row class=\\\"m-b-sm otp-progress-font\\\"><span class=text-sub>{{vm.displayDate(vm.onTimePercentage.getDateFrom())}}</span> <span flex=auto></span> <span class=text-sub>{{vm.displayDate(vm.onTimePercentage.getDatePeriodTo())}}</span></div></div></div><!-- End column --></div><!-- End loading class --></md-content></md-card>\");\n$templateCache.put(\"/app/dashboard/csl/configurations/version-a.html\",\"<div flex=100 layout=row style=\\\"margin:0 15px\\\"><span flex=auto></span><md-button class=btn-link md-ink-ripple=false ng-click=vm.hardRefresh() ng-disabled=trackTraceCtrl.showLoading><span>{{\\'TRACKTRACE.REFRESH\\' | translate}}</span><!-- <span class=\\\"btn-load-wrapper\\\" ng-show=\\\"trackTraceCtrl.showLoading\\\">\\r\\n <md-progress-circular md-mode=\\\"indeterminate\\\" class=\\\"md-hue-1\\\" md-diameter=\\\"30px\\\"></md-progress-circular>\\r\\n </span> --></md-button></div><!-- <div flex layout=\\\"row\\\" ng-include=\\\"\\'/app/dashboard/five-day-forecast/five-day-forecast.html\\'\\\">HI</div> --><div layout-xs=column layout-sm=column layout-gt-sm=row layout-fill><!-- hide the html if you are loading and show the loading animation instead --><!-- ACTIVE SHIPMENTS --><div class=ie-donut flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/csl/total-shipments.html\\'\\\" ng-show=vm.showLoading></div><!-- CURRENT EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/csl/current-exceptions.html\\'\\\" ng-show=vm.showLoading></div></div><div ng-if=true><five-day-csl-forecast></five-day-csl-forecast></div><div layout-xs=column layout-sm=column layout-gt-sm=row><!--SPENDING OVER TIME --><div flex-xs=auto flex-gt-xs=33><div flex=auto ng-include=\\\"\\'/app/dashboard/csl/on-time/otp.html\\'\\\"></div></div><!-- BOOKMARKED SHIPMENTS --><div flex-xs=auto flex-gt-sm=66 layout=column><md-card flex=auto ng-include=\\\"\\'/app/components/widgets/csl/bookmarked-shipments.html\\'\\\" ng-controller=\\\"WidgetsCslController as widgetsCslCtrl\\\" ng-init=\\\"widgetsCslCtrl.page_name=\\'dashboard\\'\\\" class=\\\"loadmask-dark widget has-menu shipment_bookmark\\\" loadmask=!widgetsCslCtrl.isBookmarksFirstLoad ng-class=\\\"{\\'disabled-bookmark-page\\': widgetsCslCtrl.switchUser == true}\\\"></md-card></div></div>\");\n$templateCache.put(\"/app/dashboard/csl/configurations/version-b.html\",\"<div layout-xs=column layout-sm=column layout-gt-sm=row layout-fill><!-- hide the html if you are loading and show the loading animation instead --><five-day-forecast></five-day-forecast><div flex=auto layout=row ng-include=\\\"\\'/app/dashboard/five-day-forecast/five-day-forecast.html\\\"></div><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/total-shipments.html\\'\\\" ng-show=vm.showLoading></div><!-- CURRENT EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/current-exceptions.html\\'\\\" ng-show=vm.showLoading></div><!-- POTENTIAL EXCEPTIONS --><div flex-xs=auto flex-gt-xs=33 layout=column ng-include=\\\"\\'/app/components/widgets/potential-exceptions.html\\'\\\" ng-show=vm.showLoading></div></div><!-- SHIPMENTS VOLUME AND COUNT OVER TIME --><div ng-if=true><md-card flex=auto ng-include=\\\"\\'/app/dashboard/shipments-over-time/shipments-over-time.html\\'\\\" class=widget></md-card></div><div layout-xs=column layout-sm=column layout-gt-sm=row><!--SPENDING OVER TIME --><div flex-xs=auto flex-gt-xs=33><div flex=auto ng-include=\\\"\\'/app/dashboard/on-time/otp.html\\'\\\"></div><div flex=auto ng-include=\\\"\\'/app/components/widgets/spending-over-time.html\\'\\\"></div></div><!-- BOOKMARKED SHIPMENTS --><div flex-xs=auto flex-gt-sm=66 layout=column><md-card flex=auto ng-include=\\\"\\'/app/components/widgets/bookmarked-shipments.html\\'\\\" ng-controller=\\\"WidgetsController as widgetsCtrl\\\" class=\\\"loadmask-dark widget has-menu\\\" loadmask=!widgetsCtrl.isBookmarksFirstLoad ng-class=\\\"{\\'disabled-bookmark-page\\': widgetsCtrl.switchUser == true}\\\"></md-card></div></div>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/custom-options-modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t\\\" style=top:25%><md-toolbar><div class=md-toolbar-tools><h2 ng-if=\\\"editCheck == true\\\">EDIT FORECAST</h2>{{editCheckID}}<h2 ng-if=\\\"editCheck == false\\\">CREATE NEW FORECAST</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p ng-if=\\\"editCheck == true\\\">You have unsaved edits with your current forecast.<br>Would you like to save before editing a forecast?</p><p ng-if=\\\"editCheck == false\\\">You have unsaved edits with your current forecast.<br>Would you like to save before creating a new forecast?</p><p></p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"space-around center\\\"><md-button ng-click=vm.closeModal() class=\\\"md-raised md-button md-ink-ripple\\\" style=\\\"border:1px solid #2B7C8C;color:#2B7C8C;box-shadow:none\\\">CANCEL</md-button><md-button ng-click=vm.save(savedForecastId,editCheckID,true) class=\\\"md-raised md-accent ttsearch-buttom md-button md-ink-ripple\\\" style=box-shadow:none>SAVE</md-button><md-button ng-if=\\\"editCheck == true\\\" ng-click=vm.editForecast(editCheckID) class=\\\"md-raised md-accent ttsearch-buttom md-button md-ink-ripple\\\" style=box-shadow:none>NO</md-button><md-button ng-if=\\\"editCheck == false\\\" ng-click=vm.openNewForm() class=\\\"md-raised md-accent ttsearch-buttom md-button md-ink-ripple\\\" style=box-shadow:none>NO</md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/custom-options.html\",\"<md-card-content loadmask-dark loadmask-clear loadmask=!$ctrl.isLoading><div ng-show=$ctrl.active><form name=$ctrl.customOptionsForm flex=auto class=five-day-form-in><div layout=column><div class=custom-forecast><header layout=row layout-align=\\\"start center\\\"><div flex=auto flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label translate=WIDGETS.FORECAST_LABEL></label><input ng-model=$ctrl.newOption.forecast_label ng-required=\\\"($ctrl.newOption.origins.length > 0\\r\\n || $ctrl.newOption.destinations.length > 0\\r\\n || $ctrl.newOption.lane_pairs.length > 0)\\r\\n \\\" name=newOption></md-input-container><!-- <label translate=\\\"WIDGETS.FORECAST_LABEL\\\"></label>\\r\\n <input\\r\\n ng-model=\\\"optionRow.forecast_label\\\"\\r\\n ng-model-options=\\\"{ debounce: 200 }\\\"\\r\\n ng-required=\\\"true\\\"\\r\\n name=\\\"{{optionRow.id}}\\\"\\r\\n value=\\\"{{optionRow.forecast_label}}\\\">\\r\\n </md-input-container> --></div></header><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.ORIGIN></label><md-chips ng-model=$ctrl.newOption.origins md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchOrigin md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchOrigin)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Origin\\\"><md-item-template><span md-highlight-text=searchOrigin>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.DESTINATION></label><md-chips ng-model=$ctrl.newOption.destinations md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchDestination md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchDestination)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Destination\\\"><md-item-template><span md-highlight-text=searchDestination>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.LANE_PAIRS></label><md-chips ng-model=$ctrl.newOption.lane_pairs md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(newOption) md-separator-keys=$ctrl.keys><md-autocomplete ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchLanePairs md-items=\\\"item in $ctrl.getMatches(\\'forecast_lane_pair\\', searchLanePairs)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Lane Pair\\\"><md-item-template><span md-highlight-text=searchLanePairs>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></div><div ng-repeat=\\\"optionRow in $ctrl.customForecasts\\\" layout=column><div class=custom-forecast><header layout-gt-sm=row layout-align=\\\"center center\\\" layout-wrap><div flex=auto flex-gt-sm=40><md-input-container class=\\\"md-block error-hidden\\\"><label translate=WIDGETS.FORECAST_LABEL></label><input ng-model=optionRow.forecast_label ng-model-options=\\\"{ debounce: 200 }\\\" ng-required=true name={{optionRow.id}} value={{optionRow.forecast_label}}></md-input-container></div><div layout=row layout-align=\\\"center center\\\" flex=auto><div flex=50 flex-offset-gt-sm=10><md-checkbox ng-model=optionRow.is_default ng-change=$ctrl.removeOtherDefaults(optionRow) aria-label=\\\"Set As Default\\\">Set as Default</md-checkbox></div><div flex=50 layout=row layout-align=end><md-button aria-label=delete ng-click=$ctrl.deleteOptionRow(optionRow)>REMOVE<md-icon>clear</md-icon></md-button></div></div></header><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.ORIGIN></label><md-chips ng-model=optionRow.origins ng-required=$ctrl.requireAtLeastOne(optionRow) md-transform-chip=$ctrl.chipDisplay($chip) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchOrigin md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchOrigin)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Origin\\\"><md-item-template><span md-highlight-text=searchOrigin>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=cfc-content><md-input-container><label translate=WIDGETS.FIVE_DAY.DESTINATION></label><md-chips ng-model=optionRow.destinations md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(optionRow) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchDestination md-items=\\\"item in $ctrl.getMatches(\\'forecast_city_state\\', searchDestination)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Destination\\\"><md-item-template><span md-highlight-text=searchDestination>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div><div class=\\\"cfc-content lane-pairs\\\"><md-input-container><label translate=WIDGETS.FIVE_DAY.LANE_PAIRS></label><md-chips ng-model=optionRow.lane_pairs md-transform-chip=$ctrl.chipDisplay($chip) ng-required=$ctrl.requireAtLeastOne(optionRow) md-separator-keys=$ctrl.keys><md-autocomplete class=dark-theme ng-disabled=$ctrl.isLoading md-selected-item=selectedItem md-delay=300 md-min-length=2 md-require-match=true md-search-text=searchLanePairs md-items=\\\"item in $ctrl.getMatches(\\'forecast_lane_pair\\', searchLanePairs)\\\" md-item-text=item.display placeholder=\\\"Enter Shipment Lane Pair\\\"><md-item-template><span md-highlight-text=searchLanePairs>{{item.display}}</span></md-item-template><md-not-found>No matches found.</md-not-found></md-autocomplete></md-chips></md-input-container></div></div></div></form><div layout=row><div layout=row layout-align=start flex=auto class=m-t><md-button class=\\\"md-warn md-ink-ripple five-day-cancel\\\" ng-click=$ctrl.cancel()><span translate=USER.CANCEL></span></md-button></div><div layout=row layout-align=end flex=auto class=m-t><md-button class=\\\"md-primary md-ink-ripple five-day-save\\\" ng-click=$ctrl.save() ng-disabled=\\\"$ctrl.emptyData() || $ctrl.customOptionsForm.$invalid\\\"><span translate=USER.SAVE></span></md-button></div></div></div></md-card-content>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/delete-forecast.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/delete-forecast.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=m-t style=top:25%><md-toolbar style=\\\"padding:0px 5px 0px 25px\\\"><div class=md-toolbar-tools><h2 style=\\\"text-transform: capitalize\\\">Delete Forecast Preset?</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\" style=\\\"padding:16px 35px 16px 35px\\\"><p>Are you sure you want to delete this forecast preset?</p><p></p><div style=\\\"text-align: center\\\"><!--<loading-button\\r\\n callfunction=\\\"vm1.deleteForecastSet(id)\\\"\\r\\n display=\\\"YES\\\"\\r\\n isloading=\\\"true\\\">\\r\\n </loading-button>--><md-button class=deleteModalSuccessBtn isloading=vm.deleteForecastLoading style=\\\"border: 1px solid #9b9b9b\\\" ng-click=vm.deleteForecast(vm.editForecastId) isloading=true>YES</md-button><!--<loading-button\\r\\n isloading=\\\"vm.deleteForecastLoading\\\"\\r\\n ng-click=\\\"vm.deleteForecast(vm.editForecastId)\\\" \\r\\n class=\\\"deleteModalSuccessBtn\\\"\\r\\n callfunction=\\\"vm.closeModal()\\\"\\r\\n display=\\\"YES\\\">\\r\\n </loading-button>--> <span flex=auto></span><loading-button callfunction=vm.closeModal() display=NO></loading-button></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/delete-forecast.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Forecast Removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/five-day-forecast-mobile.form.html\",\"<!-- <div hide-gt-sm>\\r\\n <div layout=\\\"column\\\" class=\\\"\\\">\\r\\n <div flex=\\\"95\\\" class=\\\"flex-transition\\\">\\r\\n <div>\\r\\n <h4><md-icon class=\\\"m-r-xs\\\">search</md-icon><span style=\\\"text-transform:uppercase;\\\" translate=\\\"WIDGETS.CHANGE_QUERY\\\"></span></h4>\\r\\n </div>\\r\\n </div>\\r\\n <md-button class=\\\"md-fab md-mini btn-collapse\\\" aria-label=\\\"Open/Close\\\" ng-click=\\\"toggleCollapse()\\\">\\r\\n <md-icon>{{collapsed ? \\'expand_more\\' : \\'expand_less\\'}}</md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n</div> --><!-- <div ng-show=\\\"$ctrl.isMobile() || !collapsed\\\" flex=\\\"auto\\\"> --><div ng-show=true flex=auto><div ng-include=\\\"\\'/app/dashboard/csl/five-day-forecast/five-day-forecast.form.html\\'\\\"></div></div><div ng-show=$ctrl.isMobile() style=\\\"padding-bottom: 5px\\\"></div>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/five-day-forecast.form.html\",\"<form name=$ctrl.fiveDayForm><div layout-gt-sm=row layout=column flex=auto><div flex=25><mdp-date-picker mdp-format=MM/DD/YYYY ng-change=$ctrl.selectedDateChange() ng-model-options=\\\"{debounce: 1000}\\\" ng-disabled=$ctrl.isLoading ng-model=$ctrl.payload.date_from class=\\\"mb-0 error-hidden\\\"><label translate=WIDGETS.START_DATE></label>{{$ctrl.start_date.$error}}</mdp-date-picker></div><div flex=20 ng-class=\\\"{\\'mobile-offset-top\\': $ctrl.isMobile()}\\\" flex-offset=\\\"{{$ctrl.isMobile() ? \\'\\' : \\'5\\'}}\\\"><div class=\\\"md-tab-wrapper five-day-bs-type-active\\\"><md-tabs md-stretch-tabs=always><md-tab ng-repeat=\\\"vtab in $ctrl.lane_type\\\" md-on-select=\\\"$ctrl.onLaneTypeTabSelected(vtab, $index)\\\" md-on-deselect=announceDeselected(vtab) ng-disabled=vtab.deselected><md-tab-label><span translate={{vtab.label}}></span><div ng-show=\\\"vtab.field==\\'ALL\\'\\\">ALL</div><div ng-show=\\\"vtab.field==\\'FTL\\'\\\"><md-icon style=font-size:17px class=font-family-ftl></md-icon></div><div ng-show=\\\"vtab.field==\\'LTL\\'\\\"><md-icon style=font-size:17px class=font-family-ltl></md-icon></div><div ng-show=\\\"vtab.field==\\'INTERMODAL\\'\\\"><md-icon style=font-size:17px class=font-family-intermodal></md-icon></div></md-tab-label></md-tab></md-tabs></div></div><div flex=25 flex-offset=5 ng-if=!$ctrl.isMobile()><md-input-container class=md-block><label translate=WIDGETS.LOCATION_FILTER></label><md-select ng-model=$ctrl.selectedOptionRow ng-change=$ctrl.checkClear(); ng-model-options=\\\"{trackBy: $value.id}\\\" placeholder=\\\"Default Forecast\\\" aria-label=\\\"Default Forecast\\\" md-on-open=$ctrl.onSelectOpen() md-on-close=$ctrl.onSelectClose()><md-option value=null>All Locations</md-option><md-option ng-repeat=\\\"frow in $ctrl.custom_forecasts\\\" value={{frow.id}}>{{frow.forecast_label}}</md-option><!--<md-option ng-if=\\\"!$ctrl.custom_forecasts.length\\\" value=\\'create\\' layout=\\\"row\\\" layout-align=\\\"center center\\\" style=\\\"color:#2A9FD8; font-size:16px;\\\">\\r\\n\\r\\n <i\\r\\n class=\\\"material-icons\\\"\\r\\n style=\\\"float:left;cursor: pointer;color: #3eaee5;margin-right:10px\\\" ></i>\\r\\n <span style=\\\"float:left;\\\">Create Preset</span>\\r\\n\\r\\n </md-option>\\r\\n\\r\\n <md-option ng-if=\\\"$ctrl.custom_forecasts.length\\\" value=\\'create_new\\' layout=\\\"row\\\" layout-align=\\\"center center\\\" style=\\\"color:#2A9FD8; font-size:16px;\\\">\\r\\n\\r\\n <i\\r\\n class=\\\"material-icons\\\"\\r\\n style=\\\"float:left;cursor: pointer;color: #3eaee5;margin-right:10px\\\" ></i>\\r\\n <span style=\\\"float:left;\\\">Create a New Preset</span>\\r\\n\\r\\n </md-option>--></md-select></md-input-container></div><div flex=5 ng-if=!$ctrl.isMobile() layout=row layout-align=\\\"start center\\\"><!--<md-button aria-label=\\\"create\\\" ng-click=\\\"$ctrl.toggleOptions()\\\" style=\\\"color: #45AFE3;\\\">\\r\\n <md-icon style=\\\"color: #45AFE3;\\\">create</md-icon> edit\\r\\n </md-button>--><md-button aria-label=create ng-click=$ctrl.toggleOptions($ctrl.selectedOptionRow)><md-icon>create</md-icon>edit</md-button></div><!-- Mobile --><div layout=row class=mobile-offset-top ng-if=$ctrl.isMobile()><md-input-container flex=90 class=md-block><label translate=WIDGETS.LOCATION_FILTER></label><md-select ng-model=$ctrl.selectedOptionRow aria-label=$ctrl.selectedOptionRow ng-change=$ctrl.checkClear(); ng-model-options=\\\"{trackBy: $value.id}\\\" md-on-open=$ctrl.onSelectOpen() md-on-close=$ctrl.onSelectClose()><md-option value=null>None</md-option><md-option ng-repeat=\\\"frow in $ctrl.custom_forecasts\\\" value={{frow.id}}>{{frow.forecast_label}}</md-option></md-select></md-input-container><!-- ng-click=\\\"$ctrl.toggleOptions()\\\" --><md-button class=md-icon-button ng-click=$ctrl.toggleOptions($ctrl.selectedOptionRow) flex=10 aria-label=create><md-icon>create</md-icon></md-button></div></div></form>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/five-day-forecast.html\",\"<md-card flex=auto class=\\\"widget ie-fivedayforcast\\\" id=ie-fivedayforcast><md-toolbar ng-click=$ctrl.saveForecastAccordian()><div class=md-toolbar-tools><h2><md-icon md-svg-src=../assets/images/icons/ic_date_range.svg class=\\\"icon-reset svg-icon-reset\\\"></md-icon><span><span ng-show=!$ctrl.optionsActive translate=WIDGETS.FIVE_DAY.FIVE_DAY_FORECAST></span> <span ng-show=$ctrl.optionsActive translate=WIDGETS.FORECAST_CUSTOM_OPTIONS></span></span></h2><span flex=auto></span></div></md-toolbar><md-card-content ng-show=!$ctrl.optionsActive class=five-day-forecast loadmask-dark loadmask-clear loadmask=!$ctrl.isLoading><div ng-class=\\\"{loaded: !$ctrl.isLoading, \\'first-load\\': $ctrl.isLoading, \\'loading-content\\': $ctrl.isLoading}\\\" layout=column flex=auto style=display:block><div class=ie-forecastdate flex=100 layout=row collapsible template-url=/app/dashboard/csl/five-day-forecast/five-day-forecast-mobile.form.html></div><div layout=row layout-align=\\\"center end\\\" class=\\\"activity-notices hide show-gt-sm\\\"><div flex=1 ng-repeat=\\\"day in $ctrl.days track by $index | limitTo:5\\\" class=activity-header><div flex=auto ng-if=\\\"!day.is_record && day.is_high\\\" class=\\\"notice high-activity\\\"><div class=\\\"activity-icon high-activity-icon\\\"><span><img src=../assets/images/flame-icon.png></span></div><div class=\\\"activity-text high-activity-text\\\"><span>High Shipment Activity</span></div></div><div ng-if=day.is_record class=\\\"notice daily-record\\\"><div class=\\\"activity-icon daily-record-icon\\\"><span><md-icon class=material-icons></md-icon></span></div><div class=\\\"activity-text daily-record-text\\\"><span>New Daily Record</span></div></div></div></div><div flex=1 id=forecasts layout-gt-sm=row layout-align-gt-sm=\\\"center stretch\\\" layout-align-sm=\\\"space-between stretch\\\" layout-sm=column><div flex-gt-sm=20 flex-sm=100 ng-repeat=\\\"day in $ctrl.days track by $index | limitTo:5\\\" class=day-wrapper><div layout=column layout-align=\\\"center stretch\\\" class=\\\"activity-notices hide-gt-sm\\\"><div flex=auto ng-if=\\\"!day.is_record && day.is_high\\\" class=\\\"notice high-activity\\\"><div class=\\\"activity-icon high-activity-icon\\\"><span><img src=../assets/images/flame-icon.png></span></div><div class=\\\"activity-text high-activity-text\\\"><span>High Shipment Activity</span></div></div><div ng-if=day.is_record class=\\\"notice daily-record\\\"><div class=\\\"activity-icon daily-record-icon\\\"><span><md-icon class=material-icons></md-icon></span></div><div class=\\\"activity-text daily-record-text\\\"><span>New Daily Record</span></div></div></div><forecast-csl flex=auto data=day payload=$ctrl.payload index={{$index}} mobile=$ctrl.isMobile()></forecast-csl></div></div></div></md-card-content><custom-options-csl flex=auto ng-if=$ctrl.optionsActive active=$ctrl.optionsActive custom-forecasts=$ctrl.custom_forecasts></custom-options-csl></md-card>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/forecast-csl.html\",\"<style>@media screen and (max-width: 1170px) and (min-width: 960px) {\\r\\n .font-xs{\\r\\n font-size:8px !important;\\r\\n }\\r\\n\\r\\n .font-xs md-icon{\\r\\n font-size:10px !important;\\r\\n }\\r\\n\\r\\n #forecasts .day-wrapper .forecast .business-group span{\\r\\n padding:0px !important;\\r\\n }\\r\\n }\\r\\n\\r\\n @media screen and (max-width: 1400px) and (min-width: 1280px) {\\r\\n .font-xs{\\r\\n font-size:8px !important;\\r\\n }\\r\\n\\r\\n .font-xs md-icon{\\r\\n font-size:10px !important;\\r\\n }\\r\\n\\r\\n #forecasts .day-wrapper .forecast .business-group span{\\r\\n padding:0px !important;\\r\\n }\\r\\n }\\r\\n\\r\\n md-tooltip .md-content {\\r\\n color: #FFFFFF;\\r\\n text-transform: uppercase;\\r\\n font-weight: normal;\\r\\n font-size: .95em;\\r\\n opacity: 0.96; \\r\\n background-color: black;\\r\\n height: auto;\\r\\n}</style><div layout=row layout-align=\\\"center stretch\\\" layout-fill class=forecast-wrapper ng-class=\\\"{\\'show-notice\\': $ctrl.data.is_record || $ctrl.data.is_high, \\'record-high\\': $ctrl.data.is_record, \\'high-shipments\\': $ctrl.data.is_high && !$ctrl.data.is_record}\\\"><div layout=column layout-align=\\\"end stretch\\\" layout-fill><div flex=auto layout=column class=\\\"forecast disabled\\\" layout-align=\\\"center stretch\\\" ng-if=!$ctrl.getTotal()><div class=upper><h1 layout=row layout-align=\\\"center center\\\" class=header>{{$ctrl.getDay()}}</h1><span class=subheader layout=row layout-align=\\\"center center\\\">{{$ctrl.getDate()}}</span></div><div flex=auto layout=column layout-align=\\\"center center\\\"><span class=md-display-1 translate=WIDGETS.FIVE_DAY.DISABLED></span></div></div><!--<div flex=\\\"auto\\\" layout=\\\"column\\\" class=\\\"forecast\\\" layout-align=\\\"center stretch\\\" ng-if=\\\"$ctrl.getTotal()\\\" ng-click=\\\"$ctrl.viewOnTrackAndTraceCsl($ctrl.getDate())\\\" >--><div flex=auto layout=column class=forecast layout-align=\\\"center stretch\\\" ng-if=$ctrl.getTotal() ng-click=$ctrl.viewOnTrackAndTraceCsl($ctrl.getDateForTT())><div class=upper><h1 layout=row layout-align=\\\"center center\\\" class=header>{{$ctrl.getDay()}}</h1><span class=subheader layout=row layout-align=\\\"center center\\\">{{$ctrl.getDate()}}</span><md-tooltip md-direction=center><div class=tooltip-bc-color><span style=\\\"margin:5%;font-weight: bold;margin-left: 3%;font-size: 1.3em\\\">Top Shipments</span> <span ng-show=\\\"$ctrl.data.ref_numbers.length === 0\\\" style=\\\"margin:3%;margin-left: 3%;font-weight: bold\\\">No Shipments Found.</span><div style=\\\"margin-left: 3%\\\" ng-repeat=\\\"shipmentValue in $ctrl.data.ref_numbers track by $index\\\" style=\\\"margin-bottom: -2%\\\"><span style=\\\"color: #fff;font-weight: bold\\\">{{$ctrl.data.ref_numbers[$index]}}</span></div></div></md-tooltip></div><div flex=auto></div><div class=body><div ng-if=!$ctrl.mobile><md-grid-list md-cols=4 md-gutter=8px md-row-height=1:1><md-grid-tile ng-repeat=\\\"container in $ctrl.containers\\\" md-colspan={{container.colspan}} md-rowspan={{container.rowspan}} class={{container.icon_class}}><md-icon ng-if=!container.empty md-svg-icon={{container.icon}}></md-icon></md-grid-tile></md-grid-list></div><h1 layout=row layout-align=\\\"center center\\\" class=md-display-3>{{$ctrl.getTotal()}}</h1><span layout=row layout-align=\\\"center center\\\" class=md-title>DELIVERIES</span></div><div class=business-group layout=row layout-align=\\\"space-around center\\\"><span flex=1 class=font-xs><md-icon class=font-family-ftl style=font-size:11px></md-icon>{{$ctrl.getPercentageFtl()}} </span><span flex=1 class=font-xs><md-icon class=font-family-ltl style=font-size:11px></md-icon>{{$ctrl.getPercentageLtl()}} </span><span flex=1 class=font-xs><md-icon class=font-family-intermodal style=font-size:11px></md-icon>{{$ctrl.getPercentageIntermodal()}}</span></div><div class=lower><breakdowncsl data=$ctrl.data index={{$ctrl.index}} mobile=$ctrl.mobile></breakdowncsl></div></div></div></div>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/location_filter_empty_modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t\\\" style=top:25%><md-toolbar><div class=md-toolbar-tools><h2 style=\\\"text-transform: capitalize\\\">Enter Required Field</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>Please enter a <b>Location Filter Label </b>to save this forecast.</p><p></p></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/save_changes_alert_model.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=m-t style=top:25%><md-toolbar><div class=md-toolbar-tools><h2 style=\\\"text-transform: capitalize\\\" ng-if=!vm.editForecastId>CANCEL CREATION OF FORECAST</h2><h2 style=\\\"text-transform: capitalize\\\" ng-if=vm.editForecastId>EDIT FORECAST</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p ng-if=\\\"vm.redirectPath == \\'cancel\\' && !vm.editForecastId \\\">Do you want to cancel creation of forecast</p><p ng-if=\\\"(vm.redirectPath == \\'cancel\\' && vm.editForecastId) || vm.redirectPath == \\'apply\\' \\\">You have unsaved edits with your current forecast.<br>Do you want to cancel the changes?</p><p></p><div style=\\\"text-align: center\\\"><md-button style=\\\"border: 1px solid #ccc\\\" ng-click=\\\"vm.redirectPath == \\'cancel\\'?vm.cancel():vm.getDays(vm.editForecastId)\\\" isloading=vm.isActionLoading>YES</md-button><span flex=auto></span><loading-button callfunction=vm.closeModal() display=NO></loading-button></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/dashboard/csl/five-day-forecast/saved-forecast-accordian.html\",\"<div class=\\\"m-b saved-forecast\\\" style=display:block id=mySavedForecast><md-card flex=auto flex-fill class=\\\"ontime-percentage-widget widget loading-container has-menu\\\"><md-toolbar ng-click=$ctrl.saveForecastAccordian()><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=\\\"MY SAVED FORECAST\\\"></span> </span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=\\\"!$ctrl.aljexSavedForecastIsExpanded && !$ctrl.aljexSavedIsOpen\\\"><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=\\\"$ctrl.aljexSavedForecastIsExpanded || $ctrl.aljexSavedIsOpen\\\"><md-icon aria-label=options></md-icon></md-button><md-menu-content hide></md-menu-content></md-menu></div></md-toolbar><md-card-content ng-if=\\\"$ctrl.aljexSavedForecastIsExpanded || $ctrl.aljexSavedIsOpen\\\"><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\" class=\\\"light-form m-t\\\"><div layout=row flex-xs=100 style=margin-right:20px><md-checkbox layout=row ng-hide=$ctrl.allLocationSet ng-checked=true class=\\\"md-primary color-347c8f\\\" aria-label=\\\"All Locations is set to Default\\\">All Locations is set to Default</md-checkbox></div><div layout=row flex-xs=100><md-checkbox id=savedForecastOpen layout=row ng-model=$ctrl.aljexSavedForecastIsExpanded ng-change=$ctrl.setAljexSavedForecastExpanded() class=\\\"md-primary color-ffffff\\\" aria-label=\\\"Keep Saved Forecast Open\\\"></md-checkbox><label for=savedForecastOpen>Keep Saved Forecast Open</label></div></div><div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\"><div class=\\\"table-scroll m-t\\\"><table cellspacing=0 ng-class=\\\"card-content-table saved-forecast-table\\\" align=center;><thead><!-- ng-style or ng-class is not working --><tr ng-if=getForecastList.length><th class=location_filter_label style=width:55%;text-align:left>LOCATION FILTER LABEL</th><th class=location_filter_label style=width:15%>CURRENT DEFAULT</th><th style=width:15%>DELETE</th><th style=width:15%>EDIT</th></tr><tr ng-if=!getForecastList.length style=color:#3b3c41><th class=location_filter_label style=width:55%;text-align:left>LOCATION FILTER LABEL</th><th class=location_filter_label style=width:15%>CURRENT DEFAULT</th><th style=width:15%>DELETE</th><th style=width:15%>EDIT</th></tr></thead><tbody class=saved-forecast-list><tr ng-repeat=\\\"item in getForecastList\\\" class=savedForecast{{$index}}><!-- right now ng-style/ng-class is not working --><td class=location_filter_label ng-if=\\\"item.id == $ctrl.editForecastId\\\" style=text-align:left;color:#3eaee5>{{item.forecast_label}}</td><td class=location_filter_label ng-if=\\\"item.id != $ctrl.editForecastId\\\" style=text-align:left;color:#797a80>{{item.forecast_label}}</td><td class=current_default style=text-align:center><label class=container style=\\\"position: relative;margin-top:7px;display:inline\\\"><input type=checkbox ng-checked=item.is_default ng-true-value={{item.id}} ng-click=$ctrl.updateForecastSet(item.id) ng-model=$ctrl.forecast_check_value> <span class=checkmark></span></label><!-- <md-radio-button value=\\\"Apple\\\" class=\\\"md-primary\\\">Apple</md-radio-button> --></td><td style=text-align:center><i style=\\\"cursor: pointer\\\" ng-click=$ctrl.showModal(ev,item.id,$index) class=material-icons></i></td><td style=text-align:center ng-if=\\\"($ctrl.beforesave == true && $ctrl.addNewCheck == false) || ($ctrl.beforesave == false && $ctrl.addNewCheck == false) || ($ctrl.beforesave == true && $ctrl.addNewCheck == true)\\\"><i style=\\\"cursor: pointer\\\" class=material-icons ng-click=$ctrl.editForecast(item.id)></i></td><td style=text-align:center ng-if=\\\"$ctrl.beforesave == false && $ctrl.addNewCheck == true\\\"><i style=\\\"cursor: pointer\\\" class=material-icons ng-click=$ctrl.showCustomSearch($event,$ctrl.editForecastId,true,item.id)></i></td></tr><tr ng-if=!getForecastList.length><td colspan=4 style=text-align:center>Enter in custom forecast information above to create your first forecast</td></tr></tbody></table></div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/dashboard/csl/on-time/otp.html\",\"<md-card flex=auto flex-fill class=\\\"ontime-percentage-widget widget loading-container has-menu\\\"><md-toolbar><div class=md-toolbar-tools><h2><md-icon></md-icon><span><span id=font-range translate=WIDGETS.ON_TIME_PERCENTAGE></span> </span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-click=$mdOpenMenu($event)><md-icon aria-label=options></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"vm.setCustomRange(\\'on-time-percentage\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.SET_END_DATE></span></p></div></md-button></md-menu-item><md-menu-item ng-if=vm.widgetHasCustomRange.onTimePercentage><md-button ng-click=\\\"vm.resetCustomRange(\\'on-time-percentage\\')\\\"><div layout=row flex=auto><p flex=auto><span translate=WIDGETS.RESET_END_DATE></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div></md-toolbar><md-tabs md-dynamic-height md-border-bottom md-stretch-tabs=always class=md-primary><md-tab ng-repeat=\\\"tab in vm.onTimePercentage.tabs\\\" md-on-select=vm.onTimePercentage.tabSelected(tab) ng-disabled=tab.disabled md-active=\\\"$index==3\\\"><md-tab-label><span translate={{tab.label}}></span></md-tab-label></md-tab></md-tabs><md-content flex=auto flex-fill class=\\\"loadmask-dark loadmask-clear\\\" loadmask=vm.onTimePercentage.isLoaded()><div flex=auto ng-class=\\\"{loaded: vm.onTimePercentage.isLoaded(), \\'first-load\\': !vm.onTimePercentage.isLoaded(), \\'loading-content\\': !vm.onTimePercentage.isLoaded()}\\\" id=on-time-percentage><div layout=column layout-align=\\\" center\\\" class=\\\"md-padding csl-padding\\\"><h4 layout=row layout-align=\\\"center center\\\" ng-if=vm.onTimePercentage.isLoaded()>{{vm.onTimePercentage.getDateRange()}}</h4><div class=\\\"percentage csl-percentage\\\"><span ng-if=!vm.onTimePercentage.isNoCurrentData()>{{ vm.onTimePercentage.getPercentage() }}%</span> <span ng-if=vm.onTimePercentage.isNoCurrentData()>—</span></div><div><p class=\\\"md-caption change-info\\\"></p><div ng-if=!vm.onTimePercentage.isNoCurrentData() class=otp-div-height><div ng-if=!vm.onTimePercentage.isNoPreviousData()><md-icon aria-label=direction ng-show=vm.onTimePercentage.getChange()>{{vm.onTimePercentage.getDirection()}}</md-icon><md-icon ng-hide=vm.onTimePercentage.getChange()>remove</md-icon>{{ vm.onTimePercentage.getChange() }}% {{vm.onTimePercentage.fromLast() | translate}}</div><div ng-if=vm.onTimePercentage.isNoPreviousData() class=otp-div-height>{{ vm.onTimePercentage.noPreviousData() | translate }}</div></div><div ng-if=vm.onTimePercentage.isNoCurrentData() class=otp-div-height>{{ vm.onTimePercentage.noCurrentData() | translate }}</div><p></p></div><!-- Percent Complete --><div flex=auto layout=column><div flex=auto layout=row layout-align=\\\"center center\\\" class=\\\"text-strong current-csl\\\">Current {{vm.onTimePercentage.selected}}</div><div flex=auto layout=row class=\\\"meter blue progress-bar\\\"><span class=percent><strong>{{vm.onTimePercentage.getDatePercentage()}}%</strong></span> <span class=\\\"bar progress-bar\\\" ng-attr-style=\\\"width: {{vm.onTimePercentage.getDatePercentage()}}%\\\"></span></div><!-- Progress Bar --><div layout=row class=\\\"m-b-sm otp-progress-font\\\"><span class=text-sub>{{vm.displayDate(vm.onTimePercentage.getDateFrom())}}</span> <span flex=auto></span> <span class=text-sub>{{vm.displayDate(vm.onTimePercentage.getDatePeriodTo())}}</span></div></div></div><!-- End column --></div><!-- End loading class --></md-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/bookmark/bookmark-already-removed-toast.html\",\"<md-toast><div layout=row><md-icon class=text-danger></md-icon><span flex=auto><p>You have already removed this bookmark.<br>You can view your bookmarks in the <a href=/cfs class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/bookmark/bookmark-discussion-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment discussion has been bookmarked!<br>Bookmarked discussion shipments appear in the <a href=/shipment-discussions-cfs class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/bookmark/bookmark-limit-toast.html\",\"<md-toast><div layout=row><md-icon class=text-danger></md-icon><span flex=auto><p>You have exceeded your bookmark limit!<br></p>You can remove bookmarks in the <a href=/cfs class=btn-link>dashboard</a>.<p></p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/bookmark/bookmark-notification-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment notification is enabled!<br>Notification of the shipment appear in the <a href=/shipment-discussions-cfs class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/bookmark/bookmark-toast.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger></md-icon><span flex><p>Bookmark Shipment Error: {{vm.bookmarkShipmentError}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/bookmark/bookmark-toast.html\",\"<md-toast><div layout=row><md-icon class=text-success></md-icon><span flex><p>Shipment has been bookmarked!<br>Bookmarked shipments appear in the <a href=/cfs class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/bookmark/bookmarks-list.html\",\"<md-dialog class=\\\"md-card-light bookmarks-list\\\" aria-label=Bookmarks ng-controller=\\\"WidgetsCfsController as widgetsCfsCtrl\\\" ng-init=\\\"widgetsCfsCtrl.page_name=\\'shipment\\'\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'WIDGETS.BOOKMARKS\\' | translate}}</h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding style=\\\"min-height: 120px\\\"><div class=loadmask-light loadmask=widgetsCfsCtrl.bookmarksLoaded ng-if=!widgetsCfsCtrl.bookmarksLoaded style=position:absolute;top:52px;left:0;right:0;bottom:0></div><div ng-include=\\\"\\'/app/components/widgets/cfs/bookmarked-shipments-results.html\\'\\\" ng-show=widgetsCfsCtrl.bookmarksLoaded></div><div ng-show=widgetsCfsCtrl.bookmarksLoaded class=m-t layout=row layout-align=\\\"center center\\\"><a href=/cfs ng-click=vm.closeModal($event)>{{\\'ADMIN.POTENTIAL.VIEW_IN_DASHBOARD\\' | translate}}</a></div><div layout=row layout-align=\\\"center start\\\" flex=100 style=margin-top:15px ng-show=\\\"widgetsCfsCtrl.showRemoveButton && widgetsCfsCtrl.bookmarksCount >0\\\"><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=widgetsCfsCtrl.showRemoveButton ng-click=widgetsCfsCtrl.doneEditingBookmarks();vm.doneBookmark()><span translate=WIDGETS.DONE></span></md-button></div></md-dialog-content><md-dialog-actions ng-show=widgetsCfsCtrl.bookmarksLoaded><div layout=row layout-align=\\\"end end\\\"><md-button ng-click=vm.closeModal()>{{\\'SHIPPINGDETAILS.CONTAINER.CLOSE\\' | translate}}</md-button></div></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/bookmark/remove-bookmark-discussion-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment bookmarked discussion has been removed!<br>Bookmarked discussion shipments appear in the <a href=/shipment-discussions-cfs class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/bookmark/remove-bookmark-notification-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment notification is disabled!</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/bookmark/remove-bookmark-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment bookmarked has been removed!<br>Bookmarked shipments appear in the <a href=/cfs class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/discussion/index.html\",\"<style type=text/css>.attachment-ul{\\r\\n margin: 0;padding: 0;\\r\\n}\\r\\n.attachment-icon{\\r\\n color: #324c7e;top: 7px;position: relative;\\r\\n}\\r\\n.attachment-text{\\r\\n cursor: pointer;color: #494949;font-size: 15px;margin: 0 !important;\\r\\n}\\r\\n.tooltip {\\r\\n position: relative;\\r\\n display: inline-block;\\r\\n}\\r\\n\\r\\n.tooltip .tooltiptext {\\r\\n visibility: hidden;\\r\\n width: 120px;\\r\\n background-color: black;\\r\\n color: #fff;\\r\\n text-align: center;\\r\\n border-radius: 6px;\\r\\n padding: 10px 0;\\r\\n position: absolute;\\r\\n z-index: 1;\\r\\n top: 110%;\\r\\n left: 50%;\\r\\n margin-left: -60px;\\r\\n}\\r\\n\\r\\n.tooltip .tooltiptext::after {\\r\\n content: \\\"\\\";\\r\\n position: absolute;\\r\\n bottom: 100%;\\r\\n left: 50%;\\r\\n margin-left: -5px;\\r\\n border-width: 5px;\\r\\n border-style: solid;\\r\\n border-color: transparent transparent black transparent;\\r\\n}\\r\\n\\r\\n.tooltip:hover .tooltiptext {\\r\\n visibility: visible;\\r\\n}\\r\\n\\r\\n.btn-color-hide{\\r\\n background-color: #E6E6E6 !important;\\r\\n}\\r\\n.btn-color-show{\\r\\n background-color: #30c267 !important;\\r\\n}</style><md-toolbar ng-click=\\\"vm.expandReferenceOne = !vm.expandReferenceOne\\\" ng-attr-class=\\\"{{(vm.expandReferenceOne)?\\'active\\':\\'\\'}}\\\"><div class=md-toolbar-tools ng-if=vm.searchDiscussionNew><section style=\\\"width: 100%\\\" class=chat_input layout=row layout-align=\\\"start center\\\"><input type=text ng-model=vm.findText class=search-text-box autocomplete=off autofocus><md-icon ng-click=vm.cancelFindData(); aria-label=options class=image_cancel_icon></md-icon></section></div><div class=md-toolbar-tools ng-if=vm.searchDiscussionOld layout=row layout-align=\\\"space-between center\\\"><h2><!--<md-icon\\r\\n\t \tstyle=\\\"font-family: \\'discussion-toolbar\\' !important;color:#192e5a\\\" >\\r\\n\t \t\t\\r\\n\t\t\t</md-icon>--><md-icon style=\\\"margin-right: 5px;margin-left: 10px;color:#192e5a\\\"><i class=material-icons style=\\\"margin-top:4px;font-size: 2.2rem\\\">chat</i></md-icon><span id=font-range translate=\\\"SHIPMENT DISCUSSION\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\" layout=row layout-align=\\\"space center\\\"><div ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=tooltip><md-button ng-click=vm.sendNotification() class=md-icon-button><md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarkedNotification}\\\" style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Notifications</span></div><div class=tooltip><md-button ng-click=vm.findAttachmentComments() class=md-icon-button><md-icon ng-class=\\\"{\\'text-success\\': vm.isAttachmentsNotification}\\\" style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize; font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Attachments</span></div><div class=tooltip><md-button ng-click=vm.findData(vm.findText) style=\\\"margin-right: 10px\\\" class=md-icon-button><md-icon style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Search</span></div></md-menu></div></md-toolbar><md-card-content class=discussion_layout><div ng-attr-class=\\\"shipment_status {{(vm.data.isbooked)?\\'booked\\':((vm.data.isdelivered == \\'true\\')?\\'delivered\\':\\'undelivered\\')}} \\\" layout=column layout-align=\\\"space-around start\\\" layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\"><div class=status><!--<md-icon class=\\\"icon\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\" style=\\\"font-family:\\'discussion-deliverd\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=icon ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\"></md-icon><!--<md-icon class=\\\"icon\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=\\\"font-family:\\'discussion-in-transit\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=\\\"icon sidebar-in-transit\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=font-size:1.4rem></md-icon><!--<md-icon class=\\\"icon\\\" ng-if=\\\"vm.data.isbooked\\\" style=\\\"font-family:\\'discussion-booked\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=icon ng-if=vm.data.isbooked></md-icon><span class=text ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\" style=font-size:1rem>SHIPMENT DELIVERED</span> <span class=text ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=font-size:1rem>SHIPMENT IN-TRANSIT</span> <span class=text ng-if=vm.data.isbooked style=font-size:1rem>BOOKED</span></div><div class=desc><span ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\">Limited shipment requests may be made at this time.</span> <span ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\">No further shipment requests may be made at this time.</span> <span ng-if=vm.data.isbooked>Shipment requests may be made at this time.</span></div></div><section class=\\\"message_body remove-padding-xs\\\" scroll-to-bottom-cfs=vm.discussion_chat style=\\\"max-height: 500px;overflow-y: scroll\\\"><div ng-repeat=\\\"(key,chat_msg) in vm.discussion_chat\\\"><main style=margin-top:20px><div class=date_time_div><!-- {{vm.getSuffixDate(key)}} --> <span class=content>{{key | date: \\'EEEE MMM dd\\'}}</span></div></main><div ng-repeat=\\\"message in chat_msg\\\"><!-- MAIN COMMENT --><article class=\\\"messages chat_msgs msg_section msg_section{{message.id}}\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == message.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};width:100%;\\\" layout=row layout-align=\\\"start stretch\\\"><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == message.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=msg_details><div class=author layout=column layout-gt-xs=row><span class=name>{{message.user_name | capitalize}}</span> <span class=\\\"company remove-marginLeft-xs\\\">{{message.user_email}}</span></div><div class=text_messages><p ng-bind-html=\\\"highlight(message.comment_text | userTagHighlight: vm.company_contacts)\\\"></p><p><ul class=attachment-ul type=none><li ng-repeat=\\\"file in message.attachments\\\"><label ng-if=\\\"(file.thumb1.url || file.thumb2.url)\\\"><a target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\"><img style=\\\"margin-top: 15px\\\" ng-src=\\\"{{vm.downloadlink}}{{(file.thumb1.url || file.thumb2.url).slice((file.thumb1.url || file.thumb2.url).indexOf(\\'/shipment_comment\\'))}}\\\"></a></label><p class=attachment-text><i class=\\\"material-icons attachment-icon\\\"></i>  <a style=\\\"color: #494949 !important\\\" target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\">{{file.url.substring((file.url.lastIndexOf(\\\"/\\\")) + 1)}}</a></p></li></ul></p></div></section><section ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=reply_btn_div layout=row layout-align=\\\"center start\\\" ng-click=\\\"vm.showReplyTextBox(message.id, message.user_id)\\\"><!--<i class=\\\"material-icons\\\"\\r\\n\t\t\t\t\t\tstyle=\\\"font-family: \\'discussion-reply\\' !important; font-size: 16px; margin-top: 3px; margin-right: 5px; \\\">\\r\\n\t\t\t\t\t\t\t\\r\\n\t\t\t\t\t\t</i>--> <i class=material-icons style=\\\"vertical-align: middle\\\">reply</i> <span class=reply_txt>Reply</span></section><aside class=time_div hide-xs><span class=time_txt>{{message.created_at | date: \\'hh:mm a\\'}}</span></aside></article><!-- USER LIST DROPDOWN AND REPLY TEXT --><article class=\\\"hide replyTextBoxDiv{{message.id}} replyTextBoxDiv chat_input chatSubInput chatSubInput{{message.id}}\\\" layout=row layout-align=\\\"start center\\\" ng-click=$event.stopPropagation() ng-if=\\\"message.id == replyId\\\"><!-- USER LIST DROPDOWN --><section class=\\\"userLists hide\\\" id=userList><!-- | filter:userFilter --><article ng-attr-style=\\\"margin-top:{{($index == 0)?\\'10px\\':\\'0px\\'}}\\\" ng-repeat=\\\"x in vm.company_contacts | orderBy : \\'full_name\\'\\\" class=active ng-class=\\\"{\\'active-highlight\\': $index == focusIndex , \\'userList{{$index}}\\':$index == $index }\\\" ng-click=userSelect($event,$index,x.full_name,message.id,x.email);>{{ x.full_name }} {{\\'[\\' + x.email + \\']\\' }}</article></section><!-- COMMENT TEXT BOX --><!--<input type=\\\"text\\\" class=\\\"chat_input_text chat_input_text{{message.id}}\\\" autocomplete=\\\"off\\\" ng-focus=\\\"checkTagWord(message.id,$event)\\\" ng-keyup=\\\"checkTagWord(message.id,$event)\\\" maxlength=\\\"2200\\\" />--><div id={{message.id}} class=\\\"chat_input_text chat_input_text{{message.id}}\\\" maxlength=2200 autocomplete=off ng-keyup=checkTagWord($event,message.id) ng-focus=checkTagWord($event,message.id) contenteditable=true ng-click=\\\"setManualCrusorPoint($event,\\'chat_input_text{{message.id}}\\')\\\" onkeypress=\\\"return (this.innerText.length <= 2200)\\\"></div><md-icon aria-label=options class=image_upload_icon><label for=file{{message.id}} style=\\\"cursor: pointer\\\"><i class=material-icons style=font-size:26px></i></label><input style=\\\"visibility: hidden;width: 0\\\" type=file ng-modal=vm.files{{message.id}} id=file{{message.id}} msg_id={{message.id}} name=files multiple onchange=\\\"angular.element(this).scope().fileNameChanged(this);this.value=null;return false\\\"></md-icon><md-icon ng-class=\\\"{\\'disabledbutton\\' : vm.replyTagPopup == true}\\\" aria-label=options class=select_dropdown_icon ng-click=openUserTagsDiv($event,message.id)><i class=material-icons>alternate_email</i></md-icon><button class=chat_submit id=replyBtn type=button layout=row layout-align=\\\"center center\\\" ng-click=vm.chat_text_submit(message.id) ng-disabled=vm.submitBtnReply ng-class=\\\"(vm.submitBtnReply == true) ? \\'btn-color-hide\\' : \\'btn-color-show\\'\\\"><md-icon aria-label=options style=\\\"color: #ffffff;margin-top:-2px\\\"></md-icon></button></article><!-- File Attachment --><ul ng-if=\\\"(message_id == message.id)\\\"><li style=\\\"color: #000\\\" class=savedFile{{$index}} ng-repeat=\\\"file in files\\\">{{file.name}} - {{vm.file_size_array[file.name].size}} <span title=remove ng-click=vm.removeFile(file.name,$index,message.id) style=\\\"color: red;cursor: pointer;margin-left: 20px\\\"><i style=\\\"color: red;position: relative;top: 10px\\\" class=material-icons></i></span></li></ul><!-- Replies Section --><main ng-if=\\\"message.replies.length > 1\\\" style=margin-top:20px><div class=date_time_div><span style=\\\"cursor: pointer;width: 140px\\\" class=content><span class=\\\"expand_less{{message.id}} hide\\\" ng-click=\\\"vm.reply_comment_display(message.id,\\'less\\',key,$index)\\\"><i style=\\\"vertical-align: middle\\\" class=material-icons>expand_less</i>   {{message.replies.length}} Replies </span><span class=expand_more{{message.id}} ng-click=\\\"vm.reply_comment_display(message.id,\\'more\\',key,$index)\\\"><i style=\\\"vertical-align: middle\\\" class=material-icons>expand_more</i>   {{message.replies.length}} Replies</span></span></div></main><article ng-if=\\\"message.replies.length > 1\\\" class=\\\"messages hide chat_msgs expand_div expand_div{{message.id}}\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};margin-left:{{(1)*45}}px;width: calc(100% - ((1)*45)px);min-height: 40px !important;\\\" layout=row layout-align=\\\"start stretch\\\"><aside class=arrow_left layout=row layout-align=\\\"center start\\\"><i class=material-icons>subdirectory_arrow_right</i></aside><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=msg_details layout=column layout-align=\\\"space-around start\\\" layout-gt-xs=row layout-align-gt-xs=\\\"space-between center\\\" style=\\\"padding: 15px 30px\\\"><div class=text_messages><p style=\\\"margin: 0\\\">Expand to view <span style=\\\"color:#000000;font-size: 15px;font-weight: bold\\\">{{message.replies.length}} Replies to {{message.user_name}}</span></p></div><div class=text_messages><p style=\\\"margin: 0;color: #324c7e;cursor: pointer\\\" ng-click=\\\"vm.reply_comment_display(message.id, \\'less\\',key,$index)\\\">See most recent replies   <i style=\\\"color: #324c7e;vertical-align: middle\\\" class=material-icons>arrow_downward</i></p></div></section><aside class=time_div hide-xs><span class=time_txt>{{message.created_at | date: \\'hh:mm a\\'}}</span></aside></article><!-- REPLY COMMENTS --><!-- ng-class=\\\"message.replies.length > 5 ? \\'hide\\' : \\'\\'\\\" --><article ng-if=message.replies.length class=\\\"messages chat_msgs reply_msg_section{{reply.id}} sub_msg_details sub_msg_details{{message.id}}\\\" ng-repeat=\\\"reply in message.replies\\\" ng-class=\\\"reply.attachments.length > 0 ? \\'attachment-exist\\' : \\'\\'\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};margin-left:{{(1)*45}}px;width: calc(100% - ((1)*45)px);\\\" layout=row layout-align=\\\"start stretch\\\"><aside class=arrow_left layout=row layout-align=\\\"center start\\\"><i class=material-icons>subdirectory_arrow_right</i></aside><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=\\\"msg_details remove-padding-right-xs\\\"><div class=author layout=column layout-gt-xs=row><span class=name>{{reply.user_name | capitalize}}</span> <span class=\\\"company remove-marginLeft-xs\\\">{{reply.user_email}}</span></div><div class=text_messages><p ng-bind-html=\\\"highlight(reply.comment_text | userTagHighlight: vm.company_contacts)\\\"></p><p><ul class=attachment-ul type=none><li ng-repeat=\\\"file in reply.attachments\\\"><label ng-if=\\\"(file.thumb1.url || file.thumb2.url)\\\"><a target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\"><img style=\\\"margin-top: 15px\\\" src=\\\"{{vm.downloadlink}}{{(file.thumb1.url || file.thumb2.url).slice((file.thumb1.url || file.thumb2.url).indexOf(\\'/shipment_comment\\'))}}\\\"></a></label><p class=attachment-text><i class=\\\"material-icons attachment-icon\\\"></i>  <a style=\\\"color: #494949 !important\\\" target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\">{{file.url.substring((file.url.lastIndexOf(\\\"/\\\")) + 1)}}</a></p></li></ul></p></div></section><!--<section class=\\\"reply_btn_div\\\" layout=\\\"row\\\" layout-align=\\\"center start\\\" >\\r\\n\\r\\n\t\t\t\t\t\t<i class=\\\"material-icons\\\">reply</i>\\r\\n\t\t\t\t \t<span class=\\\"reply_txt\\\">Reply</span>\\r\\n\\r\\n\t\t\t\t\t</section>--><aside class=time_div hide-xs><span class=time_txt>{{reply.created_at | date: \\'hh:mm a\\'}}</span></aside></article></div></div></section><section ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=\\\"chat_input chatMainInput\\\" layout=row layout-align=\\\"start center\\\" ng-click=$event.stopPropagation()><section class=\\\"userLists hide\\\" id=userList><!-- | filter:userFilter --><article ng-attr-style=\\\"margin-top:{{($index == 0)?\\'10px\\':\\'0px\\'}};\\\" ng-if=vm.company_contacts ng-repeat=\\\"x in vm.company_contacts | orderBy : \\'full_name\\'\\\" class=active ng-class=\\\"{\\'active-highlight\\': $index == focusIndex , \\'userList{{$index}}\\':$index == $index }\\\" ng-click=\\\"userSelect($event,$index,x.full_name,\\'\\',x.email);document.getElementById(\\'chat_input_main_text\\').focus();\\\">{{ x.full_name }} {{\\'[ \\' + x.email + \\' ]\\' }}</article></section><!--<input type=\\\"text\\\" class=\\\"chat_input_text\\\" ng-model=\\\"vm.discussion_comment_text\\\" ng-focus=\\\"checkTagWord()\\\" ng-keyup=\\\"checkTagWord()\\\" autocomplete=\\\"off\\\" maxlength=\\\"2200\\\" />--><div class=\\\"chat_input_text chat_input_main_text\\\" id=chat_input_main_text maxlength=2200 autocomplete=off ng-model=vm.discussion_comment_text ng-keyup=checkTagWord($event) ng-focus=checkTagWord($event) contenteditable=true message_id=\\\"\\\" ng-click=\\\"setManualCrusorPoint($event,\\'chat_input_main_text\\')\\\" ng-keypress=\\\"return (this.innerText.length <= 2200)\\\"></div><md-icon aria-label=options class=image_upload_icon><label for=fileOne style=\\\"cursor: pointer\\\"><i class=material-icons style=font-size:26px></i></label><input style=\\\"visibility: hidden;width: 0\\\" type=file ng-modal=vm.files msg_id=\\\"\\\" id=fileOne name=files multiple onchange=\\\"angular.element(this).scope().fileNameChanged(this);this.value=null;return false\\\"></md-icon><md-icon ng-class=\\\"{\\'disabledbutton\\' : vm.commentTagPopup == true}\\\" aria-label=options class=select_dropdown_icon ng-click=openUserTagsDiv($event);><i class=material-icons>alternate_email</i></md-icon><button class=chat_submit id=commentBtn type=button layout=row layout-align=\\\"center center\\\" ng-click=vm.chat_text_submit() ng-disabled=vm.submitBtn ng-class=\\\"(vm.submitBtn == true) ? \\'btn-color-hide\\' : \\'btn-color-show\\'\\\"><md-icon aria-label=options style=\\\"color: #ffffff;margin-top:-2px\\\"></md-icon></button></section><ul ng-if=\\\"(message_id == \\'none\\')\\\"><li style=\\\"color: #000\\\" class=savedFile{{$index}} ng-repeat=\\\"file in files\\\">{{file.name}} - {{vm.file_size_array[file.name].size}} <span title=remove ng-click=vm.removeFile(file.name,$index) style=\\\"color: red;cursor: pointer;margin-left: 20px\\\"><i style=\\\"color: red;position: relative;top: 10px\\\" class=material-icons></i></span></li></ul></md-card-content>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/invoices/invoice-line-items.html\",\"<div class=table-scroll><table class=table-striped><thead><tr><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.AMOUNT\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.CHARGECODE\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.CHARGEDESCRIPTION\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.CURRENCY\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.QUANTITY\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.RATE\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.TAX\\' | translate}}</th><th class=td-15>{{\\'SHIPPINGDETAILS.INVOICE.REMARKS\\' | translate}}</th></tr></thead><tbody><tr ng-repeat=\\\"line_item in invoice.invoice_details\\\"><td class=td-15>{{line_item.amount}}</td><td class=td-15>{{line_item.chargecode}}</td><td class=td-15>{{line_item.chargedescription}}</td><td class=td-15>{{line_item.currency}}</td><td class=td-15>{{line_item.quantity}}</td><td class=td-15>{{line_item.rate}}</td><td class=td-15>{{line_item.tax}}</td><td class=td-15>{{line_item.remarks}}</td></tr></tbody></table></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/invoices/invoice-list.html\",\"<md-card flex=auto class=invoice-md-card ng-init=\\\"vm.expandInvoice = vm.expandedInvoices\\\"><md-toolbar ng-click=\\\"vm.expandInvoice = !vm.expandInvoice\\\"><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=\\\"Invoice Details\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=!vm.expandInvoice><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=vm.expandInvoice><md-icon aria-label=options></md-icon></md-button></md-menu></div></md-toolbar><md-card-content class=\\\"invoice-md-card-content slide\\\" ng-show=vm.expandInvoice><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\"><div layout=row layout-xs=column layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedInvoices ng-change=vm.setInvoicesExpanded() aria-label=\\\"keep invoices open\\\">Keep Invoices Open</md-checkbox></div></div><div layout=column><div layout=column layout-gt-xs=row><md-card flex=auto flex-gt-xs=45 layout-align=\\\"start stretch\\\"><md-card-content style=padding-left:35px;padding-right:35px class=background-fff layout=column layout-gt-sm=row layout-align=\\\"space-around start\\\" layout-align-gt-sm=\\\"space-between start\\\"><div flex=100 flex=\\\"\\\" layout=column class=add-margin-sm><p class=\\\"margin-top-0 remove-margin-sm\\\"><strong>CUSTOMER NAME</strong></p><span>{{vm.invoiceDetails.customername}}</span></div><div flex=100 layout=column class=add-margin-sm><p class=\\\"margin-top-0 remove-margin-sm\\\"><strong>CUSTOMER ADDRESS</strong></p><span>{{vm.invoiceDetails.load.customeraddress1}}</span></div></md-card-content></md-card><md-card flex=auto flex-gt-xs=45><md-card-content style=padding-left:35px;padding-right:35px class=background-fff layout=column layout-gt-sm=row layout-align=\\\"space-around start\\\" layout-align-gt-sm=\\\"space-between start\\\"><div flex=100 layout=column class=add-margin-sm><p class=\\\"margin-top-0 remove-margin-sm\\\"><strong>CONSIGNEE NAME</strong></p><span>{{vm.invoiceDetails.load.consigneename}}</span></div><div flex=100 layout=column class=add-margin-sm><p class=\\\"margin-top-0 remove-margin-sm\\\"><strong>CONSIGNEE ADDRESS</strong></p><span>{{vm.invoiceDetails.load.consigneeaddress}}</span></div></md-card-content></md-card></div><div layout=column><md-card class=background-fff><md-card-content style=padding:35px layout=column layout-gt-xs=row layout-align=\\\"space-around start\\\" layout-align-gt-xs=\\\"space-between center\\\"><div flex=100 layout=column class=add-margin-xs><strong>INVOICE DATE</strong> <span>{{vm.invoiceDetails.invoicedate | date:\\'dd-MMM-yyyy\\'}}</span></div><div flex=100 layout=column class=add-margin-sm><strong ng-if=\\\"vm.data.shipmentstatus == \\'DELIVERED\\'\\\">INVOICE TOTAL</strong> <strong ng-if=\\\"vm.data.shipmentstatus != \\'DELIVERED\\'\\\">PROJECTED INVOICE TOTAL</strong> <span>{{vm.invoiceDetails.total | number : 2}} <span ng-if=vm.invoiceDetails.total>USD</span></span></div><div flex=100 layout=column class=add-margin-sm><strong>TOTAL WEIGHT</strong> <span>{{vm.invoiceDetails.weight}}</span></div></md-card-content></md-card></div><div><md-button style=\\\"box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);background-color: rgb(45,125,143);margin-left:15px\\\" ng-disabled=\\\"\\\" class=\\\"btn btn-default\\\" ng-click=\\\"vm.showModal(ev,\\'invoice-modal\\')\\\"><span style=\\\"padding: 10px;color:#fff\\\">MORE INFO</span></md-button></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/invoices/invoice.html\",\"<md-dialog class=md-card-light aria-label=\\\"Invoice Details\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'SHIPPINGDETAILS.INVOICE_NUM\\' | translate}}: {{invoice.invoicenumber}}</h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding><div layout=row><div flex=33><strong>{{\\'SHIPPINGDETAILS.SHIPPER\\' | translate | uppercase}}</strong><br><p>{{invoice.shippername}}</p><br><strong>{{\\'SHIPPINGDETAILS.SHIPPER_NUMBER\\' | translate | uppercase}}</strong><br><p>{{invoice.shipperpartyid}}</p></div><div flex=34><strong>{{\\'SHIPPINGDETAILS.INVOICE.ADDRESS\\' | translate | uppercase}}</strong> <span ng-repeat=\\\"address_line in address\\\"><p ng-if=address_line>{{address_line}}</p></span></div><div flex=33><strong>{{\\'SHIPPINGDETAILS.INVOICE.TOTAL_AMOUNT\\' | translate | uppercase}}</strong><p>{{invoice.totalinvoiceamount | number:2}} {{invoice.currencycode}}</p><div><p></p><strong>{{\\'SHIPPINGDETAILS.INVOICE.DATE\\' | translate | uppercase}}</strong><p>{{invoice.invoicedate | date : \\'dd-MMM-yyyy\\'}}</p></div><strong>{{\\'SHIPPINGDETAILS.INVOICE.GROSS_WEIGHT\\' | translate | uppercase}}</strong><p>{{invoice.grossweight}}</p></div></div><div ng-include=\\\"\\'/app/shipping-details/invoices/invoice-line-items.html\\'\\\"></div></md-dialog-content></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/milestones/milestones.html\",\"<style>.status_col img{\\r\\n vertical-align: middle; margin-right:10px; display:inline;\\r\\n}\\r\\n\\r\\n.status_col .hover_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .default_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .hover_img{\\r\\n display:inline;\\r\\n}</style><div class=table-scroll><table class=\\\"card-table table-static milestone-table\\\" cellspacing=0 border=0 style=\\\"min-width: 935px\\\"><thead><tr><th style=width:68px>TYPE</th><th style=width:10%></th><th style=width:17%>MILESTONE</th><th style=width:19%>COMPANY NAME</th><th style=width:15%>LOCATION</th><th style=width:15%>ESTIMATED</th><th style=width:15%>ACTUAL</th><th style=width:14%>ACTIONS</th></tr></thead><tbody><tr ng-repeat=\\\"(key1, milestone_details) in vm.shipment_milestones\\\"><td class=first_heading_row colspan=9><table cellspacing=0 border=0><!--<tr class=\\\"header\\\">\\r\\n\\r\\n <td\\r\\n\\r\\n ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}};font-weight:bold;color:{{milestone_details.achieved?\\'#ffffff\\':\\'\\'}};\\\"></td>\\r\\n\\r\\n <td\\r\\n class=\\\"td-50\\\"\\r\\n colspan=\\\"3\\\"\\r\\n name=\\\"{{milestone_details.milestone}}\\\"\\r\\n ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}};font-weight:bold;color:{{milestone_details.achieved?\\'#ffffff\\':\\'\\'}};\\\">{{milestone_details.milestone}}</td>\\r\\n\\r\\n <td ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}}\\\"></td>\\r\\n <td ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}}\\\"></td>\\r\\n <td ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}}\\\"></td>\\r\\n <td ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}}\\\"></td>\\r\\n <td class=\\\"td-10\\\" ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}}\\\"></td>\\r\\n\\r\\n </tr>--><tr ng-if=milestone_details.pick_stops.length class=header_details ng-repeat=\\\"(key2, stops) in milestone_details.pick_stops\\\"><td style=width:63px><div layout=row layout-align=\\\"start center\\\"><md-icon ng-attr-style=\\\"color:{{(stops.exception)?\\'#EF533D\\':((stops.achieved)?\\'#30C268\\':\\'#777A7D\\')}};\\\" class=pick-stop-arrived-icon ng-if=\\\"stops.name.indexOf(\\'Departed\\')\\\"></md-icon><md-icon ng-attr-style=\\\"color:{{(stops.exception)?\\'#EF533D\\':((stops.achieved)?\\'#30C268\\':\\'#777A7D\\')}}; margin-left:7px;\\\" class=pick-stop-depart-icon ng-if=\\\"stops.name.indexOf(\\'Arrived\\') && milestone_details.milestone != \\'DELIVERED\\'\\\"></md-icon><md-icon ng-attr-style=\\\"color:{{(stops.exception)?\\'#EF533D\\':((stops.achieved)?\\'#30C268\\':\\'#777A7D\\')}}; margin-left:3px;\\\" ng-if=\\\"stops.name.indexOf(\\'Arrived\\') && milestone_details.milestone == \\'DELIVERED\\'\\\"></md-icon></div></td><td style=width:10%><div layout=row layout-align=\\\"start center\\\"><span class=milestone_status ng-if=\\\"key2 == 0\\\">{{milestone_details.milestone}}</span></div></td><td style=width:17%>{{stops.name}}</td><td style=width:19%>{{stops.company | capitalize}}</td><td style=width:15%>{{(stops.city)?(stops.city | capitalize):\\'\\'}}{{(stops.state)?(\\', \\'+(stops.state | uppercase)):\\'\\'}}</td><td style=width:15%><span ng-if=\\\"stops.est_date || stops.est_time\\\">{{(stops.est_date)?(stops.est_date | date:\\'dd-MMM-yyyy\\'):\\'\\'}}<br>{{(stops.est_time)?(stops.est_time | date : \\\"hh:mm\\\"):\\'\\'}} </span><span ng-if=\\\"!stops.est_date && !stops.est_time\\\"><hr style=\\\"border-color:#9b9b9b; width:10px;float:left\\\"></span></td><td style=width:15%><span ng-if=\\\"stops.act_date || stops.act_time\\\" ng-attr-style=\\\"color:{{(stops.exception)?\\'#EF533D\\':\\'\\'}}\\\">{{(stops.act_date)?(stops.act_date | date:\\'dd-MMM-yyyy\\'):\\'\\'}}<br>{{(stops.act_time)?(stops.act_time | date : \\\"hh:mm\\\"):\\'\\'}} </span><span ng-if=\\\"!stops.act_date && !stops.act_time\\\"><hr style=\\\"border-color:#9b9b9b; width:10px;float:left\\\"></span></td><td style=width:14% align=center><!--<md-icon ng-click=\\\"vm.showModal(ev, \\'pick-details\\',stops)\\\" class=\\\"m-r-xs icon-more-details-blue\\\"></md-icon>--> <span class=milestone_view_more ng-click=\\\"vm.showModal(ev, \\'pick-details\\',stops)\\\">View More</span></td></tr><!--<tr ng-if=\\\"!milestone_details.pick_stops.length\\\">\\r\\n <td class=\\\"remove-border-radius\\\" style=\\\"display: table; width:100%\\\" >No Milestone Details Available</td>\\r\\n </tr>--></table></td></tr><tr ng-if=!vm.shipment_milestones.length><td class=remove-border-radius colspan=9>No Milestone Details Available</td></tr></tbody></table></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/more-shipping/more-shipping.html\",\"<md-card flex=auto ng-init=\\\"vm.expandMoreShipping = vm.expandedShippingDetails\\\"><md-toolbar ng-click=\\\"vm.expandMoreShipping = !vm.expandMoreShipping\\\"><div class=md-toolbar-tools><h2><!-- shipment-section-icon --><!-- shipment-section-title --><md-icon></md-icon><span id=font-range translate=\\\"More Shipping Details\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=!vm.expandMoreShipping><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=vm.expandMoreShipping><md-icon aria-label=options></md-icon></md-button></md-menu></div></md-toolbar><md-card-content class=slide ng-show=vm.expandMoreShipping><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\"><div layout=row layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedShippingDetails ng-change=vm.setShippingDetailsExpanded() aria-label=\\\"keep shipping details open\\\">Keep Shipping Details Open</md-checkbox></div></div><div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\" style=padding:20px><div class=table-scroll><table class=table-static><thead><tr><th class=td-20><strong>MUST SHIP DATE</strong></th><th class=td-20><strong>MUST DELIVER DATE</strong></th><th class=td-15><strong>PRO #</strong></th><th class=td-15><strong>BOL #</strong></th><th class=td-15><strong>LOAD #</strong></th><th class=td-20><strong>CONTAINER/TRAILER #</strong></th></tr></thead><tbody><tr><td class=color_text>{{vm.data.shipdate}}</td><td class=color_text>{{vm.data.duedate}}</td><td class=color_text>{{vm.data.pro}}</td><td class=color_text>{{vm.data.bol}}</td><td class=color_text>{{vm.data.load}}</td><td class=color_text>{{vm.data.containertrailer}}</td></tr></tbody></table></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/reference-numbers/reference-numbers-list.html\",\"<md-card flex=auto ng-init=\\\"vm.expandReference = vm.expandedRefNumbers\\\"><md-toolbar ng-click=\\\"vm.expandReference = !vm.expandReference\\\" ng-attr-class=\\\"{{(vm.expandReference)?\\'active\\':\\'\\'}}\\\"><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=\\\"Reference Numbers\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=!vm.expandReference><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=vm.expandReference><md-icon aria-label=options></md-icon></md-button></md-menu></div></md-toolbar><md-card-content class=slide ng-show=vm.expandReference><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\"><div layout=row layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedRefNumbers ng-change=vm.setRefNumbersExpanded() aria-label=\\\"keep reference numbers open\\\">Keep Reference Numbers Open</md-checkbox></div></div><div layout=column><div id=referenceNumbers><md-card flex-gt-xs=100 flex-xs=1 class=background-fff><div class=display-block><strong>REF #</strong> <span class=\\\"list-header margin-0 padding-bottom-15\\\">{{vm.data.reference}}</span></div><div layout=column layout-gt-xs=row class=m-t-sm><div class=table-scroll><table class=table-static><thead><tr><th class=td-20><strong ng-class=\\\"vm.data.extraref1 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #1</strong></th><th class=td-20><strong ng-class=\\\"vm.data.extraref2 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #2</strong></th><th class=td-20><strong ng-class=\\\"vm.data.extraref3 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #3</strong></th><th class=td-20><strong ng-class=\\\"vm.data.extraref4 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #4</strong></th><th class=td-20><strong ng-class=\\\"vm.data.extraref5 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #5</strong></th><th class=td-20><strong ng-class=\\\"vm.data.extraref6 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #6</strong></th></tr></thead><tbody><tr><td><span ng-attr-class=\\\"{{(vm.data.extraref1)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref1)?vm.data.extraref1:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref2)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref2)?vm.data.extraref2:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref3)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref3)?vm.data.extraref3:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref4)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref4)?vm.data.extraref4:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref5)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref5)?vm.data.extraref5:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref6)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref6)?vm.data.extraref6:\\'-\\'}}</span></td></tr></tbody></table></div></div></md-card></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/show-list-view/details.html\",\"<div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=REF></span> #</span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.reference}}</span> <span href=#reference-area du-smooth-scroll offset=80 duration=700 translate=\\\"View More\\\" class=\\\"font-bold font-15\\\" style=\\\"cursor: pointer;color: #45afe3\\\" ng-click=\\\"vm.expandReference = true\\\"></span></div><!-- ng-click=\\\"vm.goToReference()\\\" --><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=Description></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.description | capitalize}}</span></div><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=\\\"Total Pieces\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.totalpieces}}</span></div><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=\\\"Gross Weight\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{(vm.invoiceDetails.weight)?(vm.invoiceDetails.weight+ \\' lbs\\'):\\'\\'}}</span></div><div ng-if=vm.show_class_access layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=Class></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.shipmentclass}}</span></div><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\" ng-hide=\\\"((vm.is_consignee_user == \\'true\\')?true:((!vm.hasFinancialPermissions)?true:false))\\\"><span ng-if=\\\"vm.data.shipmentstatus == \\'DELIVERED\\'\\\" class=\\\"text-sub text-upper\\\"><span translate=\\\"Invoice Total\\\"></span></span> <span ng-if=\\\"vm.data.shipmentstatus != \\'DELIVERED\\'\\\" class=\\\"text-sub text-upper\\\"><span translate=\\\"Projected Invoice Total\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{(vm.invoiceDetails.total)? (vm.invoiceDetails.total | currency: \\'$\\'):\\'\\'}}</span></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/show-list-view/loads_filter.html\",\"<div layout-xs=column layout-gt-xs=row layout-align=\\\"space-around start\\\" layout-align-gt-xs=\\\"space-between end\\\"><span class=font-22>CHECK CALLS <span class=\\\"font-12 font-bold\\\" style=color:#fc9f2e>({{(vm.check_calls.length)?(vm.check_calls.length):0}} total)</span> </span><span class=filter-text translate=FILTER ng-click=vm.showListFilterChange()></span></div><div ng-if=vm.showListFilter layout=column layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\" class=\\\"m-b-sm m-t-sm\\\"><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=DATE></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><mdp-date-picker ng-model=vm.checkcalls.date ng-change=\\\"vm.check_calls_filter((vm.checkcalls.date | date : \\'dd MMM yyyy\\'),\\'date\\',0)\\\" class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-date-picker></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=TIME></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><mdp-time-picker ng-model=vm.checkcalls.time ng-change=\\\"vm.check_calls_filter(vm.checkcalls.time,\\'time\\',0)\\\" class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-time-picker></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=CITY></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><md-input-container class=\\\"error-hidden display-block\\\"><input type=text name=\\\"\\\" ng-disabled=\\\"\\\" ng-model=vm.checkcalls.city ng-model-options=\\\"{ debounce: 1000 }\\\" ng-change=\\\"vm.check_calls_filter(vm.checkcalls.city,\\'city\\',2000)\\\" class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=STATE></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><md-input-container class=\\\"error-hidden display-block\\\"><input type=text name=\\\"\\\" ng-disabled=\\\"\\\" ng-model=vm.checkcalls.state ng-model-options=\\\"{ debounce: 1000 }\\\" ng-change=\\\"vm.check_calls_filter(vm.checkcalls.state,\\'state\\',2000)\\\" class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=STATUS></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><md-input-container class=md-block><md-select md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() ng-model=vm.checkcalls.status ng-change=\\\"vm.check_calls_filter(vm.checkcalls.status,\\'status\\',0)\\\"><md-option ng-value=null>—</md-option><md-option ng-repeat=\\\"check_call_status in vm.check_calls_status | orderBy\\\" ng-value=check_call_status>{{check_call_status}}</md-option></md-select></md-input-container></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=NOTE></span></span> <span class=\\\"display-block word-break display-block\\\"><md-input-container class=\\\"error-hidden display-block\\\"><input type=text ng-disabled=\\\"\\\" ng-model=vm.checkcalls.note ng-model-options=\\\"{ debounce: 1000 }\\\" ng-change=\\\"vm.check_calls_filter(vm.checkcalls.note,\\'note\\',2000)\\\" class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container></span></div></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/show-list-view/show-list-view.html\",\"<div flex=100 flex-xs=100 flex-sm=100 flex-gt-sm=50 class=\\\"m-b-xs shipping-origin-dest-top\\\" ng-if=!vm.showWayPointDiv><div flex-gt-sm=95 flex-xs=100 class=exceptions ng-repeat=\\\"exceptions in vm.data.exceptions\\\"><div class=\\\"current notice\\\"><div layout=row layout-align=\\\"start center\\\" style=\\\"font-weight: 600;color: #FDEEEC\\\"><md-icon></md-icon><div flex=auto class=uppercase><span style=\\\"font-size: 15px\\\" translate=SHIPPINGDETAILS.EXCEPTION></span> : {{exceptions.pointname}}</div><div style=\\\"float: right\\\">{{exceptions.created_at | date:\\'dd-MMM-yyyy\\'}}     {{exceptions.created_at | date:\\'hh:mm\\'}}</div></div></div></div><span layout=row style=\\\"margin-bottom: 10px; visibility:hidden\\\" class=layout-row><hr flex=auto class=flex-auto></span><div flex-gt-sm=95 flex-xs=100 layout-gt-xs=row class=\\\"m-b shipment-origin-dest\\\"><div flex=100 flex-gt-sm=65 class=m-b><div style=\\\"float: left\\\"><md-icon class=shipment-origin-dest-icons></md-icon></div><div class=shipment-origin-dest-content><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span translate=SHIPPINGDETAILS.PICKUP></span></h4><!-- <md-icon></md-icon> <br> --> <span class=\\\"font-20 font-bold\\\">{{vm.data.origincity != null ? (vm.data.origincity + \\\", \\\" + (vm.data.originstate || vm.data.origincountrycode)) : \\\"\\\"}}</span></div></div><!-- <br show-xs show-sm> --><div flex=100 flex-gt-sm=30 class=\\\"shpping-origin-dest-date-content m-b\\\"><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span>ESTIMATED</span></h4><!-- <md-icon></md-icon> {{vm.data.duedate | date:\\'dd-MMM-yyyy\\'}}<br> --> <span class=\\\"shipment-date-txt display-block\\\">{{vm.data.pickupdate | date:\\'dd-MMM-yyyy\\':\\'UTC\\'}} {{vm.data.pickuptime}}</span><!-- pickup time --></div></div><div flex-gt-sm=95 flex-xs=100 layout-gt-xs=row class=\\\"m-b shipment-origin-dest\\\"><div flex=100 flex-gt-sm=65 class=m-b><div style=\\\"float: left\\\"><md-icon class=shipment-origin-dest-icons></md-icon></div><div class=shipment-origin-dest-content><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span translate=SHIPPINGDETAILS.DELIVERY></span></h4><!-- <md-icon></md-icon> <br> --> <span class=\\\"font-20 font-bold\\\">{{vm.data.destinationcity != null ? (vm.data.destinationcity + \\\", \\\" + (vm.data.destinationstate || vm.data.destinationcountrycode)) : \\\"\\\"}}</span></div></div><!-- <br show-xs show-sm> --><div flex=100 flex-gt-sm=30 class=\\\"shpping-origin-dest-date-content m-b\\\"><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span>ESTIMATED</span></h4><!-- <md-icon></md-icon> {{vm.data.duedate | date:\\'dd-MMM-yyyy\\'}}<br> --> <span class=\\\"shipment-date-txt display-block\\\" ng-class=\\\"{\\'text-danger\\' : ((vm.data.duedatenew < vm.data.currentDate) && !vm.data.delivereddate) }\\\">{{vm.data.load_display_date_time.date_display | date:\\'dd-MMM-yyyy\\':\\'UTC\\'}} {{vm.data.load_display_date_time.time_display}} </span><!-- pickup time --></div></div><div flex=100 layout=row><div class=equipmenttypediv><span>REVENUE CODE</span> <span>{{vm.data.revenuecode}}</span></div></div><div flex=100 layout=row style=\\\"margin-top: 10px\\\"><div class=equipmenttypediv><span>EQUIPMENT TYPE</span> <span>{{vm.data.equipmenttype}}</span></div></div></div><!-- Include the map --><div flex=100 flex-xs=100 flex-sm=100 flex-gt-sm={{vm.showWayPointDiv?45:50}} id=aljex_shipment_ng_map class=m-b-xs><p ng-if=!vm.showWayPointDiv style=margin-bottom:7px class=\\\"font-22 margin-top-0\\\">CHECK CALLS <span class=\\\"font-12 font-bold\\\" style=color:#fc9f2e>({{(vm.check_calls.length)?(vm.check_calls.length):0}} total)</span></p><div map-lazy-load=https://maps.google.com/maps/api/js map-lazy-load-params=\\\"{{ vm.googleMapsUrl }}\\\" layout-gt-sm=row flex=100 ng-attr-style=position:relative;min-height:315px;><ng-map gesture-handling=greedy id=aljex_shipping_map center=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" zoom=12 disable-double-click-zoom=true fullscreen-control=false zoom-control-options=\\\"{style:\\'LARGE\\', position:\\'RIGHT_CENTER\\'}\\\" street-view-control=false map-type-control=false styles={{vm.mapStyle}} default-style=false style=height:100%;border-radius:5px;width:100%;position:absolute><custom-control position=TOP_RIGHT index=1><div id=show_list_view><!--<h3 translate=\\\"Show List View\\\" class=\\\"inline-elem\\\" style=\\\"line-height:20px\\\" ></h3>--><md-checkbox id=showListViewCheckBox class=md-primary ng-model=vm.showListView ng-change=vm.showListViewChange() aria-label=\\\"Show List View\\\"><span style=line-height:25px class=font-13>Show List View</span></md-checkbox></div><!--<div id=\\\"gps_status\\\" class=\\\"\\\">\\r\\n <md-icon class=\\\"\\\"></md-icon> GPS ACTIVE\\r\\n </div>\\r\\n\\r\\n <div id=\\\"gps_status\\\" class=\\\"hide\\\">\\r\\n <md-icon class=\\\"\\\">location_off</md-icon> NO GPS\\r\\n </div>--></custom-control><!-- Empty check call points with undelivered status --><directions ng-if=\\\"!vm.ngMapway.length && !vm.data.isdelivered\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#45AFE3\\\", strokeOpacity: 0,icons: [{icon: {path: \\\"M 0,-1 0,1\\\", strokeOpacity: 1, scale: 2 },offset: \\\"0\\\",repeat: \\\"8px\\\"}]}\\' origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><!-- check call points with undelivered status --><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"!vm.data.isdelivered && vm.ngMapway.length && ($index == 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#1FC06F\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"!vm.data.isdelivered && vm.ngMapway.length && vm.chunk_array.length > 1 && ($index > 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#1FC06F\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lat}} , {{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><directions ng-if=\\\"!vm.data.isdelivered && vm.ngMapway.length\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#45AFE3\\\", strokeOpacity: 0,icons: [{icon: {path: \\\"M 0,-1 0,1\\\", strokeOpacity: 1, scale: 2 },offset: \\\"0\\\",repeat: \\\"8px\\\"}]}\\' origin=\\\"{{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lat}} , {{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><!-- Delivered Status--><!-- check call points with Delivered status --><directions ng-if=\\\"!vm.ngMapway.length && vm.data.isdelivered\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING waypoints={{vm.ngMapway}} polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"vm.data.isdelivered && vm.ngMapway.length && ($index == 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"vm.data.isdelivered && vm.ngMapway.length && vm.chunk_array.length > 1 && ($index > 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lat}} , {{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><!-- Empty check call points with Delivered status --><directions ng-if=\\\"vm.data.isdelivered && vm.ngMapway.length\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' origin=\\\"{{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lat}} , {{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><info-window id=myInfoWindow style=color:black><div ng-non-bindable><h4>{{title}}</h4></div></info-window></ng-map></div></div><!-- SHOW LIST VIEW --><div flex=100 flex-xs=100 flex-sm=100 flex-gt-sm=55 ng-if=vm.showWayPointDiv id=checkPtsDetails><table ng-if=vm.check_calls class=show_listView_layout><tr><td style=position:relative;width:50px align=center><div class=vertical-line ng-if=!vm.data.isdelivered style=\\\"border-right:4px dashed #37ABDE\\\"></div><div class=vertical-line ng-if=vm.data.isdelivered style=\\\"border-right:4px solid #9B9B9B\\\"></div><div ng-if=!vm.data.isdelivered class=vertical-line-green ng-attr-style=\\\"height: {{verticalLineHeight}}px\\\"></div></td><td check-calls-height id=scrollElement><!--<md-card\\r\\n id=\\\"location10000\\\"\\r\\n class=\\\"locationDetDiv locationDetDivOrigin location10000 origin_note margin-bottom-10 display-block\\\"\\r\\n lat=\\\"{{vm.data.origin_geocode.origin_lat}}\\\"\\r\\n lng=\\\"{{vm.data.origin_geocode.origin_lng}}\\\" >\\r\\n\\r\\n <div class=\\\"shipment_aljex_arrow_left\\\" ></div>\\r\\n\\r\\n <div class=\\\"shipment_aljex_arrow_left_black\\\" ></div>--><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--><!--<img class=\\\"custom-marker-icons origin\\\" src=\\\"/assets/images/icons/shipment/showListView/icon-origin.png\\\" />\\r\\n <md-card-content>\\r\\n <span class=\\\"diaply-block\\\"> Note </span>\\r\\n <p class=\\\"margin-top-0\\\">Test</p>\\r\\n </md-card-content>\\r\\n\\r\\n </md-card>--><!-- Origin --><md-card id=\\\"location{{vm.data.origin_geocode.origin_lat.toString().replace(\\'.\\',\\'-\\')}}{{vm.data.origin_geocode.origin_lng.toString().replace(\\'.\\',\\'-\\')}}\\\" ng-attr-class=\\\"locationDetDiv locationDetDivOrigin location10000 origin_note margin-bottom-10 display-block {{(vm.data.pickupdateactual)?\\'delivered\\':\\'\\'}}\\\" lat={{vm.data.origin_geocode.origin_lat}} lng={{vm.data.origin_geocode.origin_lng}}><div class=shipment_aljex_arrow_left></div><div class=shipment_aljex_arrow_left_black ng-if=!vm.data.pickupdateactual></div><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--> <img ng-attr-class=\\\"custom-marker-icons origin {{(vm.data.pickupdateactual)?\\'delivered\\':\\'\\'}}\\\" src=/assets/images/icons/shipment/showListView/icon-origin.png><md-card-content layout=column layout-gt-xs=row layout-align=\\\"space-between start\\\" layout-align-gt-xs=\\\"space-between {{(!vm.data.pickupdateactual)?\\'center\\':\\'start\\'}}\\\" class=check_calls_content><div class=margin-top-0 flex=100 ng-if=!vm.data.pickupdateactual>Origin</div><div flex=100 flex-gt-xs=40 ng-if=vm.data.pickupdateactual class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>MILESTONE</span><h4 class=\\\"margin-top-0 margin-bottom-0 shipment-lst-mile-name font-16\\\" style=font-weight:normal>At Pickup</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.pickupdateactual class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL DATE</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{(vm.data.pickupdateactual)?(vm.data.pickupdateactual | date : \\'dd-MMM-yyyy\\'):\\'-\\'}}</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.pickupdateactual class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL TIME</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{(vm.data.pickuptimeactual)?(vm.data.pickuptimeactual | date : \\'hh:mm\\'):\\'-\\'}}</h4></div></md-card-content></md-card><!-- Check Calls --><md-card ng-repeat=\\\"check_calls in vm.check_calls\\\" id=\\\"location{{check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\')}}{{check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\')}}\\\" ng-attr-class=\\\"locationDetDiv{{check_calls.geocodes.lat}} location{{$index}} margin-bottom-10 display-block locationDetDiv\\\" lat={{check_calls.geocodes.lat}} lng={{check_calls.geocodes.lng}} ng-if=vm.check_calls.length><div class=shipment_aljex_arrow_left></div><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--> <img ng-if=\\\"highlight_check_call_pt == (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )\\\" class=\\\"custom-marker-icons highlight\\\" src=/assets/images/icons/shipment/showListView/icon-oval-selected-showlist.png> <img ng-if=\\\"(highlight_check_call_pt != (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )) && (vm.check_calls.length - 1) != $index && !vm.data.isdelivered\\\" class=custom-marker-icons src=/assets/images/icons/shipment/showListView/icon-oval-unselected.png> <img ng-if=\\\"(highlight_check_call_pt != (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )) && (vm.check_calls.length - 1) == $index && !vm.data.isdelivered\\\" class=\\\"custom-marker-icons lastCheck\\\" src=/assets/images/icons/shipment/showListView/icon-oval-enroute.png> <img ng-if=\\\"(highlight_check_call_pt != (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )) && vm.data.isdelivered\\\" class=custom-marker-icons src=/assets/images/icons/shipment/showListView/icon-oval-unselected.png><md-card-content class=\\\"check_calls_content check_calls_content_item\\\"><div flex=100 layout=column layout-gt-xs=row layout-align=\\\"space-between start\\\" layout-align-gt-xs=\\\"space-between start\\\" class=margin-bottom-15><div flex=20 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=DATE></span></span> <span class=desc>{{check_calls.arrivedate | date:\\'dd-MMM-yyyy\\'}}</span></div><div flex=10 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=TIME></span></span> <span class=desc>{{check_calls.arrivetime| date:\\'hh:mm:ss a\\'}}</span></div><div flex=25 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=CITY></span></span> <span class=desc>{{check_calls.city}}</span></div><div flex=10 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=STATE></span></span> <span class=desc>{{check_calls.state}}</span></div><div flex=15 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=STATUS></span></span> <span class=desc>{{check_calls.status}}</span></div><div flex=20 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=\\\"TRACKING TYPE\\\"></span></span> <span class=desc>{{check_calls.trackingtype}}</span></div></div><div class=\\\"padding-top-0 note-descriptions\\\"><span class=\\\"text-upper heading\\\">Note </span><!-- hm-limit=\\\"60\\\" --><hm-read-more ng-click=vm.verticalGreenLine() ng-if=check_calls.note hm-text={{check_calls.note}} hm-limit=60 hm-more-text=\\\"View More\\\" hm-less-text=\\\"View Less\\\" hm-dots-class=\\\"\\\" hm-link-class=\\\"read-more text-upper\\\"></hm-read-more><!--<p ng-if=\\\"check_calls.note\\\" class=\\\"margin-top-0\\\">{{check_calls.note}}</p>\\r\\n <a ng-if=\\\"check_calls.note\\\" ng-click=\\\"\\\" class=\\\"text-upper read-more\\\" translate=\\\"View More\\\" ></a>--></div></md-card-content></md-card><!-- Destination --><md-card id=\\\"location{{vm.data.destination_geocode.dest_lat.toString().replace(\\'.\\',\\'-\\')}}{{vm.data.destination_geocode.dest_lng.toString().replace(\\'.\\',\\'-\\')}}\\\" ng-attr-class=\\\"locationDetDiv destination_note display-block location10001 {{(vm.data.isdelivered)?\\'delivered\\':\\'\\'}}\\\" lat={{vm.data.destination_geocode.dest_lat}} lng={{vm.data.destination_geocode.dest_lng}}><div class=shipment_aljex_arrow_left></div><div class=shipment_aljex_arrow_left_black ng-if=!vm.data.isdelivered></div><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--> <img ng-attr-class=\\\"custom-marker-icons destination {{(vm.data.isdelivered)?\\'delivered\\':\\'\\'}}\\\" src=/assets/images/icons/shipment/showListView/icon-destination.png><md-card-content layout=column layout-gt-xs=row layout-align=\\\"space-between start\\\" layout-align-gt-xs=\\\"space-between {{(!vm.data.isdelivered)?\\'center\\':\\'start\\'}}\\\" class=check_calls_content><!--<span class=\\\"diaply-block\\\"> </span>--><div class=margin-top-0 layout=row flex=100 ng-if=!vm.data.isdelivered>Final Destination</div><div flex=100 flex-gt-xs=40 ng-if=vm.data.isdelivered class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>LAST MILESTONE</span><h4 class=\\\"margin-top-0 margin-bottom-0 shipment-lst-mile-name font-16\\\" style=font-weight:normal>{{vm.data.shipmentstatus | capitalize}}</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.isdelivered class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL DATE</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{ vm.data.deliverydate | date:\\'dd-MMM-yyyy\\' }}</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.isdelivered class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL TIME</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{ vm.data.deliverytime | date:\\'hh:mm a\\' }}</h4></div></md-card-content></md-card></td></tr></table></div><div id=jqueryShowListView><input type=checkbox style=display:none latlng=\\\"\\\" serial_no=\\\"\\\" ng-model=vm.showListViewJqueryCheckbox name=update_highlight_img_from_jquery class=update_highlight_img_from_jquery ng-change=vm.highlight_check_call_pt_jquery()></div><script>$(document).on(\\'click\\',\\'.gmailToolTip\\',function(){\\r\\n\\r\\n if($(\\'#checkPtsDetails\\').is(\\':visible\\')){\\r\\n\\r\\n scrollDivToHighlighted($(this));\\r\\n\\r\\n }else{\\r\\n\\r\\n $(\\'#showListViewCheckBox\\').click();\\r\\n scrollDivToHighlighted($(this));\\r\\n\\r\\n }\\r\\n\\r\\n });\\r\\n\\r\\n\\r\\n function scrollDivToHighlighted(thiss){\\r\\n\\r\\n var name = thiss.find(\\'.status\\').val();\\r\\n var serial_nos = thiss.find(\\'.serial_no\\').val();\\r\\n var latlng = thiss.find(\\'.latlng\\').val();\\r\\n\\r\\n $(\\'.update_highlight_img_from_jquery\\').val(latlng);\\r\\n $(\\'.update_highlight_img_from_jquery\\').attr(\\'serial_no\\',serial_nos);\\r\\n $(\\'.update_highlight_img_from_jquery\\').attr(\\'latlng\\',latlng);\\r\\n $(\\'.update_highlight_img_from_jquery\\').click();\\r\\n\\r\\n /*var element = document.getElementById(\\'location\\'+serial_nos);\\r\\n var container = document.getElementById(\\'checkPtsDetails\\');\\r\\n\\r\\n const offsetBottom = element.offsetTop;\\r\\n const scrollBottom = container.offsetHeight;\\r\\n\\r\\n //adding margin bottom height to element\\r\\n\\r\\n var total_div = $(\\'.locationDetDiv\\').length;\\r\\n\\r\\n var marginHeight = (total_div * 10) - scrollBottom;\\r\\n\\r\\n $(container).animate({\\r\\n scrollTop: (offsetBottom - marginHeight) - 240\\r\\n\\r\\n }, 1000);*/\\r\\n\\r\\n }</script>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cfs/show-list-view/status_arrows.html\",\"<div layout-gt-sm=row layout-align-gt-sm=\\\"end center\\\" style=padding-right:45px><md-card flex=100 flex-gt-md=50 class=shipment_aljex_arrow_div1><div class=shipment_aljex_arrow_right1></div><md-card-content><div flex=100 class=shipment-lst-mile-txt style=font-size:14px>LAST MILESTONE</div><div flex=100 class=shipment-lst-mile-name>{{(vm.data.last_status_details[\\'status\\'])?(vm.data.last_status_details[\\'status\\'] | capitalize):\\'-\\'}}</div><div flex=100 layout=row style=\\\"font-size: 13px; color: #126b28\\\"><div style=min-width:90px>{{(vm.data.last_status_details[\\'actual_date\\'])?(vm.data.last_status_details[\\'actual_date\\'] | date : \\'dd-MMM-yyyy\\' :\\'UTC\\' ):\\'-\\'}}</div><div style=\\\"text-overflow: ellipsis;overflow: hidden;white-space: nowrap\\\">{{(vm.data.last_status_details[\\'actual_time\\'])?((vm.data.last_status_details[\\'actual_time\\'] | date : \\'hh:mm\\')):\\'-\\' }}</div></div></md-card-content></md-card><md-card class=shipment_aljex_arrow_div2 flex=100 flex-gt-md=50 ng-if=!vm.data.isdelivered><div class=shipment_aljex_arrow_right2></div><div class=shipment_aljex_arrow_right21></div><md-card-content><div flex=100 class=shipment-nxt-mile-txt style=\\\"color: #1FC06F; font-size:14px\\\">NEXT MILESTONE</div><div flex=100 class=shipment-lst-mile-name>{{(vm.data.next_status_details[\\'status\\'])?(vm.data.next_status_details[\\'status\\'] | capitalize):\\'-\\'}}</div><div flex=100 layout=row style=\\\"color: #908b92;font-size: 13px\\\"><div style=\\\"min-width:90px;font-weight: normal\\\">{{(vm.data.next_status_details[\\'estimated_date\\'])?(vm.data.next_status_details[\\'estimated_date\\'] | date : \\'dd-MMM-yyyy\\' :\\'UTC\\' ):\\'-\\'}}</div><div style=\\\"font-weight: normal;text-overflow: ellipsis;overflow: hidden;white-space: nowrap\\\">{{(vm.data.next_status_details[\\'estimated_time\\'])?((vm.data.next_status_details[\\'estimated_time\\'] | date : \\'hh:mm\\')) :\\'-\\' }}</div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/bookmark/bookmark-already-removed-toast.html\",\"<md-toast><div layout=row><md-icon class=text-danger></md-icon><span flex=auto><p>You have already removed this bookmark.<br>You can view your bookmarks in the <a href=/cmts class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/bookmark/bookmark-discussion-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment discussion has been bookmarked!<br>Bookmarked discussion shipments appear in the <a href=/shipment-discussions-cmts class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/bookmark/bookmark-limit-toast.html\",\"<md-toast><div layout=row><md-icon class=text-danger></md-icon><span flex=auto><p>You have exceeded your bookmark limit!<br></p>You can remove bookmarks in the <a href=/cfs class=btn-link>dashboard</a>.<p></p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/bookmark/bookmark-notification-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment notification is enabled!<br>Notification of the shipment appear in the <a href=/shipment-discussions-cmts class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/bookmark/bookmark-toast.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger></md-icon><span flex><p>Bookmark Shipment Error: {{vm.bookmarkShipmentError}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/bookmark/bookmark-toast.html\",\"<md-toast><div layout=row><md-icon class=text-success></md-icon><span flex><p>Shipment has been bookmarked!<br>Bookmarked shipments appear in the <a href=/cmts class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/bookmark/bookmarks-list.html\",\"<md-dialog class=\\\"md-card-light bookmarks-list\\\" aria-label=Bookmarks ng-controller=\\\"WidgetsCmtsController as widgetsCmtsCtrl\\\" ng-init=\\\"widgetsCmtsCtrl.page_name=\\'shipment\\'\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'WIDGETS.BOOKMARKS\\' | translate}}</h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding style=\\\"min-height: 120px\\\"><div class=loadmask-light loadmask=widgetsCmtsCtrl.bookmarksLoaded ng-if=!widgetsCmtsCtrl.bookmarksLoaded style=position:absolute;top:52px;left:0;right:0;bottom:0></div><div ng-include=\\\"\\'/app/components/widgets/cmts/bookmarked-shipments-results.html\\'\\\" ng-show=widgetsCmtsCtrl.bookmarksLoaded></div><div ng-show=widgetsCmtsCtrl.bookmarksLoaded class=m-t layout=row layout-align=\\\"center center\\\"><a href=/cmts ng-click=vm.closeModal($event)>{{\\'ADMIN.POTENTIAL.VIEW_IN_DASHBOARD\\' | translate}}</a></div><div layout=row layout-align=\\\"center start\\\" flex=100 style=margin-top:15px ng-show=\\\"widgetsCmtsCtrl.showRemoveButton && widgetsCmtsCtrl.bookmarksCount >0\\\"><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=widgetsCmtsCtrl.showRemoveButton ng-click=widgetsCmtsCtrl.doneEditingBookmarks();vm.doneBookmark()><span translate=WIDGETS.DONE></span></md-button></div></md-dialog-content><md-dialog-actions ng-show=widgetsCmtsCtrl.bookmarksLoaded><div layout=row layout-align=\\\"end end\\\"><md-button ng-click=vm.closeModal()>{{\\'SHIPPINGDETAILS.CONTAINER.CLOSE\\' | translate}}</md-button></div></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/bookmark/remove-bookmark-discussion-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment bookmarked discussion has been removed!<br>Bookmarked discussion shipments appear in the <a href=/shipment-discussions-cmts class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/bookmark/remove-bookmark-notification-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment notification is disabled!</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/bookmark/remove-bookmark-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment bookmarked has been removed!<br>Bookmarked shipments appear in the <a href=/cmts class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/discussion/index.html\",\"<style type=text/css>.attachment-ul{\\r\\n margin: 0;padding: 0;\\r\\n}\\r\\n.attachment-icon{\\r\\n color: #324c7e;top: 7px;position: relative;\\r\\n}\\r\\n.attachment-text{\\r\\n cursor: pointer;color: #494949;font-size: 15px;margin: 0 !important;\\r\\n}\\r\\n.tooltip {\\r\\n position: relative;\\r\\n display: inline-block;\\r\\n}\\r\\n\\r\\n.tooltip .tooltiptext {\\r\\n visibility: hidden;\\r\\n width: 120px;\\r\\n background-color: black;\\r\\n color: #fff;\\r\\n text-align: center;\\r\\n border-radius: 6px;\\r\\n padding: 10px 0;\\r\\n position: absolute;\\r\\n z-index: 1;\\r\\n top: 110%;\\r\\n left: 50%;\\r\\n margin-left: -60px;\\r\\n}\\r\\n\\r\\n.tooltip .tooltiptext::after {\\r\\n content: \\\"\\\";\\r\\n position: absolute;\\r\\n bottom: 100%;\\r\\n left: 50%;\\r\\n margin-left: -5px;\\r\\n border-width: 5px;\\r\\n border-style: solid;\\r\\n border-color: transparent transparent black transparent;\\r\\n}\\r\\n\\r\\n.tooltip:hover .tooltiptext {\\r\\n visibility: visible;\\r\\n}\\r\\n\\r\\n.btn-color-hide{\\r\\n background-color: #E6E6E6 !important;\\r\\n}\\r\\n.btn-color-show{\\r\\n background-color: #30c267 !important;\\r\\n}</style><md-toolbar ng-click=\\\"vm.expandReferenceOne = !vm.expandReferenceOne\\\" ng-attr-class=\\\"{{(vm.expandReferenceOne)?\\'active\\':\\'\\'}}\\\"><div class=md-toolbar-tools ng-if=vm.searchDiscussionNew><section style=\\\"width: 100%\\\" class=chat_input layout=row layout-align=\\\"start center\\\"><input type=text ng-model=vm.findText class=search-text-box autocomplete=off autofocus><md-icon ng-click=vm.cancelFindData(); aria-label=options class=image_cancel_icon></md-icon></section></div><div class=md-toolbar-tools ng-if=vm.searchDiscussionOld layout=row layout-align=\\\"space-between center\\\"><h2><!--<md-icon\\r\\n\t \tstyle=\\\"font-family: \\'discussion-toolbar\\' !important;color:#192e5a\\\" >\\r\\n\t \t\t\\r\\n\t\t\t</md-icon>--><md-icon style=\\\"margin-right: 5px;margin-left: 10px;color:#192e5a\\\"><i class=material-icons style=\\\"margin-top:4px;font-size: 2.2rem\\\">chat</i></md-icon><span id=font-range translate=\\\"SHIPMENT DISCUSSION\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\" layout=row layout-align=\\\"space center\\\"><div ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=tooltip><md-button ng-click=vm.sendNotification() class=md-icon-button><md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarkedNotification}\\\" style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Notifications</span></div><div class=tooltip><md-button ng-click=vm.findAttachmentComments() class=md-icon-button><md-icon ng-class=\\\"{\\'text-success\\': vm.isAttachmentsNotification}\\\" style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize; font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Attachments</span></div><div class=tooltip><md-button ng-click=vm.findData(vm.findText) style=\\\"margin-right: 10px\\\" class=md-icon-button><md-icon style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Search</span></div></md-menu></div></md-toolbar><md-card-content class=discussion_layout><div ng-attr-class=\\\"shipment_status {{(vm.data.isbooked)?\\'booked\\':((vm.data.isdelivered == \\'true\\')?\\'delivered\\':\\'undelivered\\')}} \\\" layout=column layout-align=\\\"space-around start\\\" layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\"><div class=status><!--<md-icon class=\\\"icon\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\" style=\\\"font-family:\\'discussion-deliverd\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=icon ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\"></md-icon><!--<md-icon class=\\\"icon\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=\\\"font-family:\\'discussion-in-transit\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=\\\"icon sidebar-in-transit\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=font-size:1.4rem></md-icon><!--<md-icon class=\\\"icon\\\" ng-if=\\\"vm.data.isbooked\\\" style=\\\"font-family:\\'discussion-booked\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=icon ng-if=vm.data.isbooked></md-icon><span class=text ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\" style=font-size:1rem>SHIPMENT DELIVERED</span> <span class=text ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=font-size:1rem>SHIPMENT IN-TRANSIT</span> <span class=text ng-if=vm.data.isbooked style=font-size:1rem>BOOKED</span></div><div class=desc><span ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\">Limited shipment requests may be made at this time.</span> <span ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\">No further shipment requests may be made at this time.</span> <span ng-if=vm.data.isbooked>Shipment requests may be made at this time.</span></div></div><section class=\\\"message_body remove-padding-xs\\\" scroll-to-bottom-cmts=vm.discussion_chat style=\\\"max-height: 500px;overflow-y: scroll\\\"><div ng-repeat=\\\"(key,chat_msg) in vm.discussion_chat\\\"><main style=margin-top:20px><div class=date_time_div><!-- {{vm.getSuffixDate(key)}} --> <span class=content>{{key | date: \\'EEEE MMM dd\\'}}</span></div></main><div ng-repeat=\\\"message in chat_msg\\\"><!-- MAIN COMMENT --><article class=\\\"messages chat_msgs msg_section msg_section{{message.id}}\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == message.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};width:100%;\\\" layout=row layout-align=\\\"start stretch\\\"><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == message.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=msg_details><div class=author layout=column layout-gt-xs=row><span class=name>{{message.user_name | capitalize}}</span> <span class=\\\"company remove-marginLeft-xs\\\">{{message.user_email}}</span></div><div class=text_messages><p ng-bind-html=\\\"highlight(message.comment_text | userTagHighlight: vm.company_contacts)\\\"></p><p><ul class=attachment-ul type=none><li ng-repeat=\\\"file in message.attachments\\\"><label ng-if=\\\"(file.thumb1.url || file.thumb2.url)\\\"><a target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\"><img style=\\\"margin-top: 15px\\\" ng-src=\\\"{{vm.downloadlink}}{{(file.thumb1.url || file.thumb2.url).slice((file.thumb1.url || file.thumb2.url).indexOf(\\'/shipment_comment\\'))}}\\\"></a></label><p class=attachment-text><i class=\\\"material-icons attachment-icon\\\"></i>  <a style=\\\"color: #494949 !important\\\" target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\">{{file.url.substring((file.url.lastIndexOf(\\\"/\\\")) + 1)}}</a></p></li></ul></p></div></section><section ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=reply_btn_div layout=row layout-align=\\\"center start\\\" ng-click=\\\"vm.showReplyTextBox(message.id, message.user_id)\\\"><!--<i class=\\\"material-icons\\\"\\r\\n\t\t\t\t\t\tstyle=\\\"font-family: \\'discussion-reply\\' !important; font-size: 16px; margin-top: 3px; margin-right: 5px; \\\">\\r\\n\t\t\t\t\t\t\t\\r\\n\t\t\t\t\t\t</i>--> <i class=material-icons style=\\\"vertical-align: middle\\\">reply</i> <span class=reply_txt>Reply</span></section><aside class=time_div hide-xs><span class=time_txt>{{message.created_at | date: \\'hh:mm a\\'}}</span></aside></article><!-- USER LIST DROPDOWN AND REPLY TEXT --><article class=\\\"hide replyTextBoxDiv{{message.id}} replyTextBoxDiv chat_input chatSubInput chatSubInput{{message.id}}\\\" layout=row layout-align=\\\"start center\\\" ng-click=$event.stopPropagation() ng-if=\\\"message.id == replyId\\\"><!-- USER LIST DROPDOWN --><section class=\\\"userLists hide\\\" id=userList><!-- | filter:userFilter --><article ng-attr-style=\\\"margin-top:{{($index == 0)?\\'10px\\':\\'0px\\'}}\\\" ng-repeat=\\\"x in vm.company_contacts | orderBy : \\'full_name\\'\\\" class=active ng-class=\\\"{\\'active-highlight\\': $index == focusIndex , \\'userList{{$index}}\\':$index == $index }\\\" ng-click=userSelect($event,$index,x.full_name,message.id,x.email);>{{ x.full_name }} {{\\'[\\' + x.email + \\']\\' }}</article></section><!-- COMMENT TEXT BOX --><!--<input type=\\\"text\\\" class=\\\"chat_input_text chat_input_text{{message.id}}\\\" autocomplete=\\\"off\\\" ng-focus=\\\"checkTagWord(message.id,$event)\\\" ng-keyup=\\\"checkTagWord(message.id,$event)\\\" maxlength=\\\"2200\\\" />--><div id={{message.id}} class=\\\"chat_input_text chat_input_text{{message.id}}\\\" maxlength=2200 autocomplete=off ng-keyup=checkTagWord($event,message.id) ng-focus=checkTagWord($event,message.id) contenteditable=true ng-click=\\\"setManualCrusorPoint($event,\\'chat_input_text{{message.id}}\\')\\\" onkeypress=\\\"return (this.innerText.length <= 2200)\\\"></div><md-icon aria-label=options class=image_upload_icon><label for=file{{message.id}} style=\\\"cursor: pointer\\\"><i class=material-icons style=font-size:26px></i></label><input style=\\\"visibility: hidden;width: 0\\\" type=file ng-modal=vm.files{{message.id}} id=file{{message.id}} msg_id={{message.id}} name=files multiple onchange=\\\"angular.element(this).scope().fileNameChanged(this);this.value=null;return false\\\"></md-icon><md-icon ng-class=\\\"{\\'disabledbutton\\' : vm.replyTagPopup == true}\\\" aria-label=options class=select_dropdown_icon ng-click=openUserTagsDiv($event,message.id)><i class=material-icons>alternate_email</i></md-icon><button class=chat_submit id=replyBtn type=button layout=row layout-align=\\\"center center\\\" ng-click=vm.chat_text_submit(message.id) ng-disabled=vm.submitBtnReply ng-class=\\\"(vm.submitBtnReply == true) ? \\'btn-color-hide\\' : \\'btn-color-show\\'\\\"><md-icon aria-label=options style=\\\"color: #ffffff;margin-top:-2px\\\"></md-icon></button></article><!-- File Attachment --><ul ng-if=\\\"(message_id == message.id)\\\"><li style=\\\"color: #000\\\" class=savedFile{{$index}} ng-repeat=\\\"file in files\\\">{{file.name}} - {{vm.file_size_array[file.name].size}} <span title=remove ng-click=vm.removeFile(file.name,$index,message.id) style=\\\"color: red;cursor: pointer;margin-left: 20px\\\"><i style=\\\"color: red;position: relative;top: 10px\\\" class=material-icons></i></span></li></ul><!-- Replies Section --><main ng-if=\\\"message.replies.length > 1\\\" style=margin-top:20px><div class=date_time_div><span style=\\\"cursor: pointer;width: 140px\\\" class=content><span class=\\\"expand_less{{message.id}} hide\\\" ng-click=\\\"vm.reply_comment_display(message.id,\\'less\\',key,$index)\\\"><i style=\\\"vertical-align: middle\\\" class=material-icons>expand_less</i>   {{message.replies.length}} Replies </span><span class=expand_more{{message.id}} ng-click=\\\"vm.reply_comment_display(message.id,\\'more\\',key,$index)\\\"><i style=\\\"vertical-align: middle\\\" class=material-icons>expand_more</i>   {{message.replies.length}} Replies</span></span></div></main><article ng-if=\\\"message.replies.length > 1\\\" class=\\\"messages hide chat_msgs expand_div expand_div{{message.id}}\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};margin-left:{{(1)*45}}px;width: calc(100% - ((1)*45)px);min-height: 40px !important;\\\" layout=row layout-align=\\\"start stretch\\\"><aside class=arrow_left layout=row layout-align=\\\"center start\\\"><i class=material-icons>subdirectory_arrow_right</i></aside><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=msg_details layout=column layout-align=\\\"space-around start\\\" layout-gt-xs=row layout-align-gt-xs=\\\"space-between center\\\" style=\\\"padding: 15px 30px\\\"><div class=text_messages><p style=\\\"margin: 0\\\">Expand to view <span style=\\\"color:#000000;font-size: 15px;font-weight: bold\\\">{{message.replies.length}} Replies to {{message.user_name}}</span></p></div><div class=text_messages><p style=\\\"margin: 0;color: #324c7e;cursor: pointer\\\" ng-click=\\\"vm.reply_comment_display(message.id, \\'less\\',key,$index)\\\">See most recent replies   <i style=\\\"color: #324c7e;vertical-align: middle\\\" class=material-icons>arrow_downward</i></p></div></section><aside class=time_div hide-xs><span class=time_txt>{{message.created_at | date: \\'hh:mm a\\'}}</span></aside></article><!-- REPLY COMMENTS --><!-- ng-class=\\\"message.replies.length > 5 ? \\'hide\\' : \\'\\'\\\" --><article ng-if=message.replies.length class=\\\"messages chat_msgs reply_msg_section{{reply.id}} sub_msg_details sub_msg_details{{message.id}}\\\" ng-repeat=\\\"reply in message.replies\\\" ng-class=\\\"reply.attachments.length > 0 ? \\'attachment-exist\\' : \\'\\'\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};margin-left:{{(1)*45}}px;width: calc(100% - ((1)*45)px);\\\" layout=row layout-align=\\\"start stretch\\\"><aside class=arrow_left layout=row layout-align=\\\"center start\\\"><i class=material-icons>subdirectory_arrow_right</i></aside><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=\\\"msg_details remove-padding-right-xs\\\"><div class=author layout=column layout-gt-xs=row><span class=name>{{reply.user_name | capitalize}}</span> <span class=\\\"company remove-marginLeft-xs\\\">{{reply.user_email}}</span></div><div class=text_messages><p ng-bind-html=\\\"highlight(reply.comment_text | userTagHighlight: vm.company_contacts)\\\"></p><p><ul class=attachment-ul type=none><li ng-repeat=\\\"file in reply.attachments\\\"><label ng-if=\\\"(file.thumb1.url || file.thumb2.url)\\\"><a target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\"><img style=\\\"margin-top: 15px\\\" src=\\\"{{vm.downloadlink}}{{(file.thumb1.url || file.thumb2.url).slice((file.thumb1.url || file.thumb2.url).indexOf(\\'/shipment_comment\\'))}}\\\"></a></label><p class=attachment-text><i class=\\\"material-icons attachment-icon\\\"></i>  <a style=\\\"color: #494949 !important\\\" target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\">{{file.url.substring((file.url.lastIndexOf(\\\"/\\\")) + 1)}}</a></p></li></ul></p></div></section><!--<section class=\\\"reply_btn_div\\\" layout=\\\"row\\\" layout-align=\\\"center start\\\" >\\r\\n\\r\\n\t\t\t\t\t\t<i class=\\\"material-icons\\\">reply</i>\\r\\n\t\t\t\t \t<span class=\\\"reply_txt\\\">Reply</span>\\r\\n\\r\\n\t\t\t\t\t</section>--><aside class=time_div hide-xs><span class=time_txt>{{reply.created_at | date: \\'hh:mm a\\'}}</span></aside></article></div></div></section><section ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=\\\"chat_input chatMainInput\\\" layout=row layout-align=\\\"start center\\\" ng-click=$event.stopPropagation()><section class=\\\"userLists hide\\\" id=userList><!-- | filter:userFilter --><article ng-attr-style=\\\"margin-top:{{($index == 0)?\\'10px\\':\\'0px\\'}};\\\" ng-if=vm.company_contacts ng-repeat=\\\"x in vm.company_contacts | orderBy : \\'full_name\\'\\\" class=active ng-class=\\\"{\\'active-highlight\\': $index == focusIndex , \\'userList{{$index}}\\':$index == $index }\\\" ng-click=\\\"userSelect($event,$index,x.full_name,\\'\\',x.email);document.getElementById(\\'chat_input_main_text\\').focus();\\\">{{ x.full_name }} {{\\'[ \\' + x.email + \\' ]\\' }}</article></section><!--<input type=\\\"text\\\" class=\\\"chat_input_text\\\" ng-model=\\\"vm.discussion_comment_text\\\" ng-focus=\\\"checkTagWord()\\\" ng-keyup=\\\"checkTagWord()\\\" autocomplete=\\\"off\\\" maxlength=\\\"2200\\\" />--><div class=\\\"chat_input_text chat_input_main_text\\\" id=chat_input_main_text maxlength=2200 autocomplete=off ng-model=vm.discussion_comment_text ng-keyup=checkTagWord($event) ng-focus=checkTagWord($event) contenteditable=true message_id=\\\"\\\" ng-click=\\\"setManualCrusorPoint($event,\\'chat_input_main_text\\')\\\" ng-keypress=\\\"return (this.innerText.length <= 2200)\\\"></div><md-icon aria-label=options class=image_upload_icon><label for=fileOne style=\\\"cursor: pointer\\\"><i class=material-icons style=font-size:26px></i></label><input style=\\\"visibility: hidden;width: 0\\\" type=file ng-modal=vm.files msg_id=\\\"\\\" id=fileOne name=files multiple onchange=\\\"angular.element(this).scope().fileNameChanged(this);this.value=null;return false\\\"></md-icon><md-icon ng-class=\\\"{\\'disabledbutton\\' : vm.commentTagPopup == true}\\\" aria-label=options class=select_dropdown_icon ng-click=openUserTagsDiv($event);><i class=material-icons>alternate_email</i></md-icon><button class=chat_submit id=commentBtn type=button layout=row layout-align=\\\"center center\\\" ng-click=vm.chat_text_submit() ng-disabled=vm.submitBtn ng-class=\\\"(vm.submitBtn == true) ? \\'btn-color-hide\\' : \\'btn-color-show\\'\\\"><md-icon aria-label=options style=\\\"color: #ffffff;margin-top:-2px\\\"></md-icon></button></section><ul ng-if=\\\"(message_id == \\'none\\')\\\"><li style=\\\"color: #000\\\" class=savedFile{{$index}} ng-repeat=\\\"file in files\\\">{{file.name}} - {{vm.file_size_array[file.name].size}} <span title=remove ng-click=vm.removeFile(file.name,$index) style=\\\"color: red;cursor: pointer;margin-left: 20px\\\"><i style=\\\"color: red;position: relative;top: 10px\\\" class=material-icons></i></span></li></ul></md-card-content>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/invoices/invoice-list.html\",\"<md-card flex=auto class=invoice-md-card ng-init=\\\"vm.expandInvoice = vm.expandedInvoices\\\"><md-toolbar ng-click=\\\"vm.expandInvoice = !vm.expandInvoice\\\"><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=\\\"Invoice Details\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=!vm.expandInvoice><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=vm.expandInvoice><md-icon aria-label=options></md-icon></md-button></md-menu></div></md-toolbar><md-card-content class=\\\"invoice-md-card-content slide\\\" ng-show=vm.expandInvoice><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\"><div layout=row layout-xs=column layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedInvoices ng-change=vm.setInvoicesExpanded() aria-label=\\\"keep invoices open\\\">Keep Invoices Open</md-checkbox></div></div><div layout=column><div layout=column><md-card class=background-fff><md-card-content style=padding:35px layout=column layout-gt-xs=row layout-align=\\\"space-around start\\\" layout-align-gt-xs=\\\"space-between center\\\"><div flex=100 layout=column class=add-margin-xs><strong>INVOICE NUMBER</strong> <span>{{vm.invoiceDetails.invoice_number}}</span></div><div flex=100 layout=column class=add-margin-xs><strong>INVOICE DATE</strong> <span>{{vm.invoiceDetails.invoice_date}}</span></div><div flex=100 layout=column class=add-margin-sm><strong ng-if=vm.data.isdelivered>INVOICE TOTAL</strong> <strong ng-if=!vm.data.isdelivered>PROJECTED INVOICE TOTAL</strong> <span><span ng-if=vm.invoiceDetails.invoice_total>{{vm.data.currency_code_display}}</span>{{vm.invoiceDetails.invoice_total | number : 2}}</span></div><div flex=100 layout=column class=add-margin-sm><strong>TOTAL WEIGHT</strong> <span>{{(vm.data.total_gross_wt)?(vm.data.total_gross_wt + vm.data.total_gross_unit):\\'\\'}}</span></div></md-card-content></md-card></div><div><md-button style=\\\"box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);background-color: rgb(45,125,143);margin-left:15px\\\" ng-disabled=\\\"\\\" class=\\\"btn btn-default\\\" ng-click=\\\"vm.showModal(ev,\\'invoice-modal\\')\\\"><span style=\\\"padding: 10px;color:#fff\\\">MORE INFO</span></md-button></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/milestones/milestones.html\",\"<style>.status_col img{\\r\\n vertical-align: middle; margin-right:10px; display:inline;\\r\\n}\\r\\n\\r\\n.status_col .hover_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .default_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .hover_img{\\r\\n display:inline;\\r\\n}</style><div class=table-scroll style=\\\"max-height: 450px; overflow: auto\\\"><table class=\\\"card-table table-static milestone-table\\\" cellspacing=0 border=0 style=\\\"min-width: 935px\\\"><thead><tr><th>Stop Number</th><th>Description</th><th>Status Date/Time</th><th>Reason Type</th></tr></thead><tbody><tr ng-repeat-start=\\\"(key1, milestone_details) in vm.shipment_milestones\\\"><td>{{milestone_details.stop_number}}</td><td>{{milestone_details.status_description}}</td><td>{{milestone_details.event_date}}</td><td>{{milestone_details.reason_type}}</td></tr><tr ng-repeat-end ng-if=milestone_details.remark><td colspan=4><strong>Remark:</strong> {{ milestone_details.remark }}</td></tr><tr ng-if=!vm.shipment_milestones.length><td class=remove-border-radius colspan=4>No Milestone Details Available</td></tr></tbody></table></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/more-shipping/more-shipping.html\",\"<md-card flex=auto ng-init=\\\"vm.expandMoreShipping = vm.expandedShippingDetails\\\"><md-toolbar ng-click=\\\"vm.expandMoreShipping = !vm.expandMoreShipping\\\"><div class=md-toolbar-tools><h2><!-- shipment-section-icon --><!-- shipment-section-title --><md-icon></md-icon><span id=font-range translate=\\\"More Shipping Details\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=!vm.expandMoreShipping><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=vm.expandMoreShipping><md-icon aria-label=options></md-icon></md-button></md-menu></div></md-toolbar><md-card-content class=slide ng-show=vm.expandMoreShipping><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\"><div layout=row layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedShippingDetails ng-change=vm.setShippingDetailsExpanded() aria-label=\\\"keep shipping details open\\\"><span class=color_text>Keep Shipping Details Open</span></md-checkbox></div></div><div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\" style=padding:20px><div class=table-scroll><table class=table-static><thead><tr><th class=td-20><strong>ROUTE NUMBER</strong></th><th class=td-20><strong>TP CARRIER NAME</strong></th><th class=td-15><strong>TP CLIENT NAME</strong></th><th class=td-15><strong>SERVICE NAME</strong></th><th class=td-15><strong>ORDER COUNT</strong></th><th class=td-20><strong>CREATED BY</strong></th></tr></thead><tbody><tr><td class=color_text>{{vm.data.route_number}}</td><td class=color_text>{{vm.data.trading_partner_carrier_name}}</td><td class=color_text>{{vm.data.trading_partner_client_name}}</td><td class=color_text>{{vm.data.service_option_name}}</td><td class=color_text>{{vm.data.order_count}}</td><td class=color_text>{{vm.data.user_created_by}}</td></tr></tbody></table></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/reference-numbers/reference-numbers-list.html\",\"<md-card flex=auto ng-init=\\\"vm.expandReference = vm.expandedRefNumbers\\\"><md-toolbar ng-click=\\\"vm.expandReference = !vm.expandReference\\\" ng-attr-class=\\\"{{(vm.expandReference)?\\'active\\':\\'\\'}}\\\"><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=\\\"Reference Numbers\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=!vm.expandReference><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=vm.expandReference><md-icon aria-label=options></md-icon></md-button></md-menu></div></md-toolbar><md-card-content class=slide ng-show=vm.expandReference><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\"><div layout=row layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedRefNumbers ng-change=vm.setRefNumbersExpanded() aria-label=\\\"keep reference numbers open\\\">Keep Reference Numbers Open</md-checkbox></div></div><div layout=column><div id=referenceNumbers><md-card flex-gt-xs=100 flex-xs=1 class=background-fff><div style=\\\"display: flex; flex-direction: row\\\"><div class=display-block><strong style=\\\"display: block; margin-bottom: 4px\\\">LOAD REF #s</strong><div style=\\\"margin-bottom: 4px\\\" ng-repeat=\\\"reference in vm.data.reference_numbers.additional_references | filter:{is_load_reference:true}\\\">{{reference.reference_name}}: {{reference.reference_number}}</div></div><div class=display-block style=\\\"margin-left: 50px\\\"><strong style=\\\"display: block; margin-bottom: 4px\\\">ORDER REF #s</strong><div style=\\\"margin-bottom: 4px\\\" ng-repeat=\\\"reference in vm.data.reference_numbers.additional_references | filter:{is_order_reference:true}\\\">{{reference.reference_name}}: {{reference.reference_number}}</div></div></div><div layout=column layout-gt-xs=row class=m-t-sm><div class=table-scroll><table class=table-static><thead><tr><th class=td-20><strong ng-class=\\\"vm.data.bol_number ?\\'\\':\\'blur-color\\'\\\" class=display-block>BOL NUMBER</strong></th><th class=td-20><strong ng-class=\\\"vm.data.pro_number ?\\'\\':\\'blur-color\\'\\\" class=display-block>PRO NUMBER</strong></th><th class=td-20><strong ng-class=\\\"vm.invoiceDetails.invoice_number ?\\'\\':\\'blur-color\\'\\\" class=display-block>INVOICE NUMBER</strong></th></tr></thead><tbody><tr><td><span ng-attr-class=\\\"{{(vm.data.extraref1)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.bol_number)?vm.data.bol_number:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref2)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.pro_number)?vm.data.pro_number:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref3)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.invoiceDetails.invoice_number)?vm.invoiceDetails.invoice_number:\\'-\\'}}</span></td></tr></tbody></table></div></div></md-card></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/show-list-view/details.html\",\"<div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=REF></span> #</span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.reference_numbers[\\'pro_number\\']}}</span> <span href=#reference-area du-smooth-scroll offset=80 duration=700 translate=\\\"View More\\\" class=\\\"font-bold font-15\\\" style=\\\"cursor: pointer;color: #45afe3\\\" ng-click=\\\"vm.expandReference = true\\\"></span></div><!-- ng-click=\\\"vm.goToReference()\\\" --><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=\\\"Load Number\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.load_number | capitalize}}</span></div><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=\\\"Total Pieces\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.total_piece_count}}</span></div><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=\\\"Total Handling Units\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.total_handling_unit_count}}</span></div><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=\\\"Gross Weight\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{(vm.data.total_gross_wt)?(vm.data.total_gross_wt + vm.data.total_gross_unit):\\'\\'}}</span></div><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\" ng-hide=((!vm.hasFinancialPermissions)?true:false))><span ng-if=vm.data.isdelivered class=\\\"text-sub text-upper\\\"><span translate=\\\"Invoice Total\\\"></span></span> <span ng-if=!vm.data.isdelivered class=\\\"text-sub text-upper\\\"><span translate=\\\"Projected Invoice Total\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{(vm.data.total_invoice_amount)? (vm.data.currency_code_display + vm.data.total_invoice_amount):\\'\\'}}</span></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/show-list-view/loads_filter.html\",\"<div layout-xs=column layout-gt-xs=row layout-align=\\\"space-around start\\\" layout-align-gt-xs=\\\"space-between end\\\"><!--<span class=\\\"font-22\\\">CHECK CALLS \\r\\n <span class=\\\"font-12 font-bold\\\" style=\\\"color:#fc9f2e;\\\">({{(vm.check_calls.length)?(vm.check_calls.length):0}} total)</span>\\r\\n </span>--> <span class=filter-text translate=FILTER ng-click=vm.showListFilterChange()></span></div><div ng-if=vm.showListFilter layout=column layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\" class=\\\"m-b-sm m-t-sm\\\"><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=DATE></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><mdp-date-picker ng-model=vm.checkcalls.date ng-change=\\\"vm.check_calls_filter((vm.checkcalls.date | date : \\'dd MMM yyyy\\'),\\'date\\',0)\\\" class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-date-picker></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=TIME></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><mdp-time-picker ng-model=vm.checkcalls.time ng-change=\\\"vm.check_calls_filter(vm.checkcalls.time,\\'time\\',0)\\\" class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-time-picker></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=CITY></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><md-input-container class=\\\"error-hidden display-block\\\"><input type=text name=\\\"\\\" ng-disabled=\\\"\\\" ng-model=vm.checkcalls.city ng-model-options=\\\"{ debounce: 1000 }\\\" ng-change=\\\"vm.check_calls_filter(vm.checkcalls.city,\\'city\\',2000)\\\" class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=STATE></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><md-input-container class=\\\"error-hidden display-block\\\"><input type=text name=\\\"\\\" ng-disabled=\\\"\\\" ng-model=vm.checkcalls.state ng-model-options=\\\"{ debounce: 1000 }\\\" ng-change=\\\"vm.check_calls_filter(vm.checkcalls.state,\\'state\\',2000)\\\" class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=STATUS></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><md-input-container class=md-block><md-select md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() ng-model=vm.checkcalls.status ng-change=\\\"vm.check_calls_filter(vm.checkcalls.status,\\'status\\',0)\\\"><md-option ng-value=null>—</md-option><md-option ng-repeat=\\\"check_call_status in vm.check_calls_status | orderBy\\\" ng-value=check_call_status>{{check_call_status}}</md-option></md-select></md-input-container></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=NOTE></span></span> <span class=\\\"display-block word-break display-block\\\"><md-input-container class=\\\"error-hidden display-block\\\"><input type=text ng-disabled=\\\"\\\" ng-model=vm.checkcalls.note ng-model-options=\\\"{ debounce: 1000 }\\\" ng-change=\\\"vm.check_calls_filter(vm.checkcalls.note,\\'note\\',2000)\\\" class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container></span></div></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/show-list-view/show-list-view.html\",\"<div flex=100 flex-xs=100 flex-sm=100 flex-gt-sm=50 class=\\\"m-b-xs shipping-origin-dest-top\\\" ng-if=!vm.showWayPointDiv><div flex-gt-sm=95 flex-xs=100 class=exceptions ng-repeat=\\\"exceptions in vm.data.exceptions\\\"><div class=\\\"current notice\\\"><div layout=row layout-align=\\\"start center\\\" style=\\\"font-weight: 600;color: #FDEEEC\\\"><md-icon></md-icon><div flex=auto class=uppercase><span style=\\\"font-size: 15px\\\" translate=SHIPPINGDETAILS.EXCEPTION></span> : {{exceptions.pointname}}</div><div style=\\\"float: right\\\">{{exceptions.created_at | date:\\'dd-MMM-yyyy\\'}}     {{exceptions.created_at | date:\\'hh:mm\\'}}</div></div></div></div><span layout=row style=\\\"margin-bottom: 10px; visibility:hidden\\\" class=layout-row><hr flex=auto class=flex-auto></span><div flex-gt-sm=95 flex-xs=100 layout-gt-xs=row class=\\\"m-b shipment-origin-dest\\\"><div flex=100 flex-gt-sm=65 class=m-b><div style=\\\"float: left\\\"><md-icon class=shipment-origin-dest-icons></md-icon></div><div class=shipment-origin-dest-content><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span translate=SHIPPINGDETAILS.PICKUP></span></h4><!-- <md-icon></md-icon> <br> --> <span class=\\\"shipment-date-txt font-bold\\\">{{vm.data.origin_location_name + \\\", \\\" + vm.data.origin_city}}<br>{{vm.data.origin_state_name + \\\", \\\" + vm.data.origin_country_iso}}</span></div></div><!-- <br show-xs show-sm> --><div flex=100 flex-gt-sm=30 class=\\\"shpping-origin-dest-date-content m-b\\\"><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span>ESTIMATED</span></h4><!-- <md-icon></md-icon> {{vm.data.duedate | date:\\'dd-MMM-yyyy\\'}}<br> --> <span class=\\\"shipment-date-txt display-block\\\">{{vm.data.planned_start_date}}</span><!-- pickup time --></div></div><div flex-gt-sm=95 flex-xs=100 layout-gt-xs=row class=\\\"m-b shipment-origin-dest\\\"><div flex=100 flex-gt-sm=65 class=m-b><div style=\\\"float: left\\\"><md-icon class=shipment-origin-dest-icons></md-icon></div><div class=shipment-origin-dest-content><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span translate=SHIPPINGDETAILS.DELIVERY></span></h4><!-- <md-icon></md-icon> <br> --> <span class=\\\"shipment-date-txt font-bold\\\">{{vm.data.destination_location_name + \\\", \\\" + vm.data.destination_city}}<br>{{vm.data.destination_state_name + \\\", \\\" + vm.data.destination_country_iso}}</span></div></div><!-- <br show-xs show-sm> --><div flex=100 flex-gt-sm=30 class=\\\"shpping-origin-dest-date-content m-b\\\"><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span>ESTIMATED</span></h4><!-- <md-icon></md-icon> {{vm.data.duedate | date:\\'dd-MMM-yyyy\\'}}<br> --> <span class=\\\"shipment-date-txt display-block\\\" ng-class=\\\"{\\'text-danger\\' : ((vm.data.duedatenew < vm.data.currentDate) && !vm.data.delivereddate) }\\\">{{vm.data.planned_end_date}} </span><!-- pickup time --></div></div><div flex=100 layout=row style=\\\"margin-top: 10px\\\"><div class=equipmenttypediv><span>EQUIPMENT NAME</span> <span>{{vm.data.equipment_name}}</span></div></div></div><!-- Include the map --><div flex=100 flex-xs=100 flex-sm=100 flex-gt-sm={{vm.showWayPointDiv?45:50}} id=aljex_shipment_ng_map class=m-b-xs><!--<p ng-if=\\\"!vm.showWayPointDiv\\\" style=\\\"margin-bottom:7px;\\\" class=\\\"font-22 margin-top-0\\\" >CHECK CALLS <span class=\\\"font-12 font-bold\\\" style=\\\"color:#fc9f2e;\\\">({{(vm.check_calls.length)?(vm.check_calls.length):0}} total)</span> </p>--><div map-lazy-load=https://maps.google.com/maps/api/js map-lazy-load-params=\\\"{{ vm.googleMapsUrl }}\\\" layout-gt-sm=row flex=100 ng-attr-style=position:relative;min-height:315px;><ng-map gesture-handling=greedy id=aljex_shipping_map center=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" zoom=12 disable-double-click-zoom=true fullscreen-control=false zoom-control-options=\\\"{style:\\'LARGE\\', position:\\'RIGHT_CENTER\\'}\\\" street-view-control=false map-type-control=false styles={{vm.mapStyle}} default-style=false style=height:100%;border-radius:5px;width:100%;position:absolute><custom-control position=TOP_RIGHT index=1><!--<div id=\\\"show_list_view\\\" class=\\\"\\\">--><!--<!–<h3 translate=\\\"Show List View\\\" class=\\\"inline-elem\\\" style=\\\"line-height:20px\\\" ></h3>–>--><!--<md-checkbox id=\\\"showListViewCheckBox\\\" class=\\\"md-primary\\\" ng-model=\\\"vm.showListView\\\" ng-change=\\\"vm.showListViewChange()\\\" aria-label=\\\"Show List View\\\"> <span style=\\\"line-height:25px\\\" class=\\\"font-13\\\" >Show List View</span> </md-checkbox>--><!--</div>--><!--<div id=\\\"gps_status\\\" class=\\\"\\\">\\r\\n <md-icon class=\\\"\\\"></md-icon> GPS ACTIVE\\r\\n </div>\\r\\n\\r\\n <div id=\\\"gps_status\\\" class=\\\"hide\\\">\\r\\n <md-icon class=\\\"\\\">location_off</md-icon> NO GPS\\r\\n </div>--></custom-control><!-- Empty check call points with undelivered status --><directions ng-if=\\\"!vm.ngMapway.length && !vm.data.isdelivered\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#45AFE3\\\", strokeOpacity: 0,icons: [{icon: {path: \\\"M 0,-1 0,1\\\", strokeOpacity: 1, scale: 2 },offset: \\\"0\\\",repeat: \\\"8px\\\"}]}\\' origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><!-- check call points with undelivered status --><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"!vm.data.isdelivered && vm.ngMapway.length && ($index == 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#1FC06F\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"!vm.data.isdelivered && vm.ngMapway.length && vm.chunk_array.length > 1 && ($index > 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#1FC06F\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lat}} , {{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><directions ng-if=\\\"!vm.data.isdelivered && vm.ngMapway.length\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#45AFE3\\\", strokeOpacity: 0,icons: [{icon: {path: \\\"M 0,-1 0,1\\\", strokeOpacity: 1, scale: 2 },offset: \\\"0\\\",repeat: \\\"8px\\\"}]}\\' origin=\\\"{{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lat}} , {{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><!-- Delivered Status--><!-- check call points with Delivered status --><directions ng-if=\\\"!vm.ngMapway.length && vm.data.isdelivered\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING waypoints={{vm.ngMapway}} polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"vm.data.isdelivered && vm.ngMapway.length && ($index == 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"vm.data.isdelivered && vm.ngMapway.length && vm.chunk_array.length > 1 && ($index > 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lat}} , {{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><!-- Empty check call points with Delivered status --><directions ng-if=\\\"vm.data.isdelivered && vm.ngMapway.length\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' origin=\\\"{{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lat}} , {{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><info-window id=myInfoWindow style=color:black><div ng-non-bindable><h4>{{title}}</h4></div></info-window></ng-map></div></div><!-- SHOW LIST VIEW --><div flex=100 flex-xs=100 flex-sm=100 flex-gt-sm=55 ng-if=vm.showWayPointDiv id=checkPtsDetails><table ng-if=vm.check_calls class=show_listView_layout><tr><td style=position:relative;width:50px align=center><div class=vertical-line ng-if=!vm.data.isdelivered style=\\\"border-right:4px dashed #37ABDE\\\"></div><div class=vertical-line ng-if=vm.data.isdelivered style=\\\"border-right:4px solid #9B9B9B\\\"></div><div ng-if=!vm.data.isdelivered class=vertical-line-green ng-attr-style=\\\"height: {{verticalLineHeight}}px\\\"></div></td><td check-calls-height id=scrollElement><!--<md-card\\r\\n id=\\\"location10000\\\"\\r\\n class=\\\"locationDetDiv locationDetDivOrigin location10000 origin_note margin-bottom-10 display-block\\\"\\r\\n lat=\\\"{{vm.data.origin_geocode.origin_lat}}\\\"\\r\\n lng=\\\"{{vm.data.origin_geocode.origin_lng}}\\\" >\\r\\n\\r\\n <div class=\\\"shipment_aljex_arrow_left\\\" ></div>\\r\\n\\r\\n <div class=\\\"shipment_aljex_arrow_left_black\\\" ></div>--><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--><!--<img class=\\\"custom-marker-icons origin\\\" src=\\\"/assets/images/icons/shipment/showListView/icon-origin.png\\\" />\\r\\n <md-card-content>\\r\\n <span class=\\\"diaply-block\\\"> Note </span>\\r\\n <p class=\\\"margin-top-0\\\">Test</p>\\r\\n </md-card-content>\\r\\n\\r\\n </md-card>--><!-- Origin --><md-card id=\\\"location{{vm.data.origin_geocode.origin_lat.toString().replace(\\'.\\',\\'-\\')}}{{vm.data.origin_geocode.origin_lng.toString().replace(\\'.\\',\\'-\\')}}\\\" ng-attr-class=\\\"locationDetDiv locationDetDivOrigin location10000 origin_note margin-bottom-10 display-block {{(vm.data.pickupdateactual)?\\'delivered\\':\\'\\'}}\\\" lat={{vm.data.origin_geocode.origin_lat}} lng={{vm.data.origin_geocode.origin_lng}}><div class=shipment_aljex_arrow_left></div><div class=shipment_aljex_arrow_left_black ng-if=!vm.data.pickupdateactual></div><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--> <img ng-attr-class=\\\"custom-marker-icons origin {{(vm.data.pickupdateactual)?\\'delivered\\':\\'\\'}}\\\" src=/assets/images/icons/shipment/showListView/icon-origin.png><md-card-content layout=column layout-gt-xs=row layout-align=\\\"space-between start\\\" layout-align-gt-xs=\\\"space-between {{(!vm.data.pickupdateactual)?\\'center\\':\\'start\\'}}\\\" class=check_calls_content><div class=margin-top-0 flex=100 ng-if=!vm.data.pickupdateactual>Origin</div><div flex=100 flex-gt-xs=40 ng-if=vm.data.pickupdateactual class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>MILESTONE</span><h4 class=\\\"margin-top-0 margin-bottom-0 shipment-lst-mile-name font-16\\\" style=font-weight:normal>At Pickup</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.pickupdateactual class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL DATE</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{(vm.data.pickupdateactual)?(vm.data.pickupdateactual | date : \\'dd-MMM-yyyy\\'):\\'-\\'}}</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.pickupdateactual class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL TIME</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{(vm.data.pickuptimeactual)?(vm.data.pickuptimeactual | date : \\'hh:mm\\'):\\'-\\'}}</h4></div></md-card-content></md-card><!-- Check Calls --><md-card ng-repeat=\\\"check_calls in vm.check_calls\\\" id=\\\"location{{check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\')}}{{check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\')}}\\\" ng-attr-class=\\\"locationDetDiv{{check_calls.geocodes.lat}} location{{$index}} margin-bottom-10 display-block locationDetDiv\\\" lat={{check_calls.geocodes.lat}} lng={{check_calls.geocodes.lng}} ng-if=vm.check_calls.length><div class=shipment_aljex_arrow_left></div><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--> <img ng-if=\\\"highlight_check_call_pt == (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )\\\" class=\\\"custom-marker-icons highlight\\\" src=/assets/images/icons/shipment/showListView/icon-oval-selected-showlist.png> <img ng-if=\\\"(highlight_check_call_pt != (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )) && (vm.check_calls.length - 1) != $index && !vm.data.isdelivered\\\" class=custom-marker-icons src=/assets/images/icons/shipment/showListView/icon-oval-unselected.png> <img ng-if=\\\"(highlight_check_call_pt != (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )) && (vm.check_calls.length - 1) == $index && !vm.data.isdelivered\\\" class=\\\"custom-marker-icons lastCheck\\\" src=/assets/images/icons/shipment/showListView/icon-oval-enroute.png> <img ng-if=\\\"(highlight_check_call_pt != (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )) && vm.data.isdelivered\\\" class=custom-marker-icons src=/assets/images/icons/shipment/showListView/icon-oval-unselected.png><md-card-content class=\\\"check_calls_content check_calls_content_item\\\"><div flex=100 layout=column layout-gt-xs=row layout-align=\\\"space-between start\\\" layout-align-gt-xs=\\\"space-between start\\\" class=margin-bottom-15><div flex=20 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=DATE></span></span> <span class=desc>{{check_calls.arrivedate | date:\\'dd-MMM-yyyy\\'}}</span></div><div flex=10 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=TIME></span></span> <span class=desc>{{check_calls.arrivetime| date:\\'hh:mm:ss a\\'}}</span></div><div flex=25 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=CITY></span></span> <span class=desc>{{check_calls.city}}</span></div><div flex=10 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=STATE></span></span> <span class=desc>{{check_calls.state}}</span></div><div flex=15 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=STATUS></span></span> <span class=desc>{{check_calls.status}}</span></div><div flex=20 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=\\\"TRACKING TYPE\\\"></span></span> <span class=desc>{{check_calls.trackingtype}}</span></div></div><div class=\\\"padding-top-0 note-descriptions\\\"><span class=\\\"text-upper heading\\\">Note </span><!-- hm-limit=\\\"60\\\" --><hm-read-more ng-click=vm.verticalGreenLine() ng-if=check_calls.note hm-text={{check_calls.note}} hm-limit=60 hm-more-text=\\\"View More\\\" hm-less-text=\\\"View Less\\\" hm-dots-class=\\\"\\\" hm-link-class=\\\"read-more text-upper\\\"></hm-read-more><!--<p ng-if=\\\"check_calls.note\\\" class=\\\"margin-top-0\\\">{{check_calls.note}}</p>\\r\\n <a ng-if=\\\"check_calls.note\\\" ng-click=\\\"\\\" class=\\\"text-upper read-more\\\" translate=\\\"View More\\\" ></a>--></div></md-card-content></md-card><!-- Destination --><md-card id=\\\"location{{vm.data.destination_geocode.dest_lat.toString().replace(\\'.\\',\\'-\\')}}{{vm.data.destination_geocode.dest_lng.toString().replace(\\'.\\',\\'-\\')}}\\\" ng-attr-class=\\\"locationDetDiv destination_note display-block location10001 {{(vm.data.isdelivered)?\\'delivered\\':\\'\\'}}\\\" lat={{vm.data.destination_geocode.dest_lat}} lng={{vm.data.destination_geocode.dest_lng}}><div class=shipment_aljex_arrow_left></div><div class=shipment_aljex_arrow_left_black ng-if=!vm.data.isdelivered></div><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--> <img ng-attr-class=\\\"custom-marker-icons destination {{(vm.data.isdelivered)?\\'delivered\\':\\'\\'}}\\\" src=/assets/images/icons/shipment/showListView/icon-destination.png><md-card-content layout=column layout-gt-xs=row layout-align=\\\"space-between start\\\" layout-align-gt-xs=\\\"space-between {{(!vm.data.isdelivered)?\\'center\\':\\'start\\'}}\\\" class=check_calls_content><!--<span class=\\\"diaply-block\\\"> </span>--><div class=margin-top-0 layout=row flex=100 ng-if=!vm.data.isdelivered>Final Destination</div><div flex=100 flex-gt-xs=40 ng-if=vm.data.isdelivered class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>LAST MILESTONE</span><h4 class=\\\"margin-top-0 margin-bottom-0 shipment-lst-mile-name font-16\\\" style=font-weight:normal>{{vm.data.shipmentstatus | capitalize}}</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.isdelivered class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL DATE</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{ vm.data.deliverydate | date:\\'dd-MMM-yyyy\\' }}</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.isdelivered class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL TIME</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{ vm.data.deliverytime | date:\\'hh:mm a\\' }}</h4></div></md-card-content></md-card></td></tr></table></div><div id=jqueryShowListView><input type=checkbox style=display:none latlng=\\\"\\\" serial_no=\\\"\\\" ng-model=vm.showListViewJqueryCheckbox name=update_highlight_img_from_jquery class=update_highlight_img_from_jquery ng-change=vm.highlight_check_call_pt_jquery()></div><script>$(document).on(\\'click\\',\\'.gmailToolTip\\',function(){\\r\\n\\r\\n if($(\\'#checkPtsDetails\\').is(\\':visible\\')){\\r\\n\\r\\n scrollDivToHighlighted($(this));\\r\\n\\r\\n }else{\\r\\n\\r\\n $(\\'#showListViewCheckBox\\').click();\\r\\n scrollDivToHighlighted($(this));\\r\\n\\r\\n }\\r\\n\\r\\n });\\r\\n\\r\\n\\r\\n function scrollDivToHighlighted(thiss){\\r\\n\\r\\n var name = thiss.find(\\'.status\\').val();\\r\\n var serial_nos = thiss.find(\\'.serial_no\\').val();\\r\\n var latlng = thiss.find(\\'.latlng\\').val();\\r\\n\\r\\n $(\\'.update_highlight_img_from_jquery\\').val(latlng);\\r\\n $(\\'.update_highlight_img_from_jquery\\').attr(\\'serial_no\\',serial_nos);\\r\\n $(\\'.update_highlight_img_from_jquery\\').attr(\\'latlng\\',latlng);\\r\\n $(\\'.update_highlight_img_from_jquery\\').click();\\r\\n\\r\\n /*var element = document.getElementById(\\'location\\'+serial_nos);\\r\\n var container = document.getElementById(\\'checkPtsDetails\\');\\r\\n\\r\\n const offsetBottom = element.offsetTop;\\r\\n const scrollBottom = container.offsetHeight;\\r\\n\\r\\n //adding margin bottom height to element\\r\\n\\r\\n var total_div = $(\\'.locationDetDiv\\').length;\\r\\n\\r\\n var marginHeight = (total_div * 10) - scrollBottom;\\r\\n\\r\\n $(container).animate({\\r\\n scrollTop: (offsetBottom - marginHeight) - 240\\r\\n\\r\\n }, 1000);*/\\r\\n\\r\\n }</script>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/show-list-view/status_arrows.html\",\"<div layout-gt-sm=row layout-align-gt-sm=\\\"end center\\\" style=padding-right:45px><md-card flex=100 flex-gt-md=50 class=shipment_aljex_arrow_div1><div class=shipment_aljex_arrow_right1></div><md-card-content><div flex=100 class=shipment-lst-mile-txt style=font-size:14px>LAST MILESTONE</div><div flex=100 class=shipment-lst-mile-name>{{(vm.data.last_status_details[\\'status\\'])?(vm.data.last_status_details[\\'status\\'] | capitalize):\\'-\\'}}</div><div flex=100 layout=row style=\\\"font-size: 13px; color: #126b28\\\"><div style=min-width:90px>{{(vm.data.last_status_details[\\'actual_date\\'])?(vm.data.last_status_details[\\'actual_date\\'] | date : \\'dd-MMM-yyyy\\' ):\\'-\\'}}</div><div style=\\\"text-overflow: ellipsis;overflow: hidden;white-space: nowrap\\\">{{(vm.data.last_status_details[\\'actual_time\\'])?((vm.data.last_status_details[\\'actual_time\\'] | date : \\'hh:mm\\')):\\'-\\' }}</div></div></md-card-content></md-card><md-card class=shipment_aljex_arrow_div2 flex=100 flex-gt-md=50 ng-if=!vm.data.isdelivered><div class=shipment_aljex_arrow_right2></div><div class=shipment_aljex_arrow_right21></div><md-card-content><div flex=100 class=shipment-nxt-mile-txt style=\\\"color: #1FC06F; font-size:14px\\\">NEXT MILESTONE</div><div flex=100 class=shipment-lst-mile-name>{{(vm.data.next_status_details[\\'status\\'])?(vm.data.next_status_details[\\'status\\'] | capitalize):\\'-\\'}}</div><div flex=100 layout=row style=\\\"color: #908b92;font-size: 13px\\\"><div style=\\\"min-width:90px;font-weight: normal\\\">{{(vm.data.next_status_details[\\'estimated_date\\'])?(vm.data.next_status_details[\\'estimated_date\\'] | date : \\'dd-MMM-yyyy\\' ):\\'-\\'}}</div><div style=\\\"font-weight: normal;text-overflow: ellipsis;overflow: hidden;white-space: nowrap\\\">{{(vm.data.next_status_details[\\'estimated_time\\'])?((vm.data.next_status_details[\\'estimated_time\\'] | date : \\'hh:mm\\')) :\\'-\\' }}</div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-cmts/stops/stops.html\",\"<style>.status_col img{\\r\\n vertical-align: middle; margin-right:10px; display:inline;\\r\\n }\\r\\n \\r\\n .status_col .hover_img{\\r\\n display:none;\\r\\n }\\r\\n \\r\\n .status_col:hover > .default_img{\\r\\n display:none;\\r\\n }\\r\\n \\r\\n .status_col:hover > .hover_img{\\r\\n display:inline;\\r\\n }</style><div class=table-scroll style=\\\"max-height: 450px; overflow: auto\\\"><table class=\\\"card-table table-static milestone-table\\\" cellspacing=0 border=0 style=\\\"min-width: 935px\\\"><thead><tr><th>Stop Number</th><th>Stop Name</th><th>Estimated Date/Time</th><th>Actual Date/Time</th><th>Appointment</th><th>Handling Units</th><th>Gross Weight</th></tr></thead><tbody><tr ng-repeat=\\\"(key1, stop_details) in vm.shipment_stops\\\"><td>{{stop_details.stop_number}}</td><td>{{stop_details.stop_name}}</td><td>{{stop_details.estimated_date}}</td><td>{{stop_details.actual_date}}</td><td>{{stop_details.appointment_date}}</td><td>{{stop_details.handling_units}}</td><td>{{stop_details.gross_weight}}</td></tr><tr ng-if=!vm.shipment_stops.length><td class=remove-border-radius colspan=8>No Stop Details Available</td></tr></tbody></table></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/bookmark/bookmark-already-removed-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>You have already removed this bookmark.<br>You can view your bookmarks in the <a href=/csl class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/bookmark/bookmark-discussion-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment discussion has been bookmarked!<br>Bookmarked discussion shipments appear in the <a href=/shipment-discussions-csl class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/bookmark/bookmark-limit-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>You have exceeded your bookmark limit!<br>You can remove bookmarks in the <a href=/csl class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/bookmark/bookmark-notification-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment notification is enabled!<br>Notification of the shipment appear in the <a href=/shipment-discussions-csl class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/bookmark/bookmark-toast.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger></md-icon><span layout=row><p>Bookmark Shipment Error: {{vm.bookmarkShipmentError}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/bookmark/bookmark-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment has been bookmarked!<br>Bookmarked shipments appear in the <a href=/csl class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/bookmark/bookmarks-list.html\",\"<md-dialog class=\\\"md-card-light bookmarks-list\\\" aria-label=Bookmarks ng-controller=\\\"WidgetsCslController as widgetsCslCtrl\\\" ng-init=\\\"widgetsCslCtrl.page_name=\\'shipment\\'\\\"><md-toolbar><div class=md-toolbar-tools><h2>{{\\'WIDGETS.BOOKMARKS\\' | translate}}</h2><span flex></span><md-button class=md-icon-button ng-click=vm.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding style=\\\"min-height: 120px\\\"><div class=loadmask-light loadmask=widgetsCslCtrl.bookmarksLoaded ng-if=!widgetsCslCtrl.bookmarksLoaded style=position:absolute;top:52px;left:0;right:0;bottom:0></div><div ng-include=\\\"\\'/app/components/widgets/csl/bookmarked-shipments-results.html\\'\\\" ng-show=widgetsCslCtrl.bookmarksLoaded></div><div ng-show=widgetsCslCtrl.bookmarksLoaded class=m-t layout=row layout-align=\\\"center center\\\"><a href=/csl ng-click=vm.closeModal($event)>{{\\'ADMIN.POTENTIAL.VIEW_IN_DASHBOARD\\' | translate}}</a></div><div layout=row layout-align=\\\"center start\\\" flex=100 style=margin-top:15px ng-show=\\\"widgetsCslCtrl.showRemoveButton && widgetsCslCtrl.bookmarksCount >0\\\"><md-button class=\\\"md-raised md-primary btn-lg\\\" ng-show=widgetsCslCtrl.showRemoveButton ng-click=widgetsCslCtrl.doneEditingBookmarks();vm.doneBookmark()><span translate=WIDGETS.DONE></span></md-button></div></md-dialog-content><md-dialog-actions ng-show=widgetsCslCtrl.bookmarksLoaded><div layout=row layout-align=\\\"end end\\\"><md-button ng-click=vm.closeModal()>{{\\'SHIPPINGDETAILS.CONTAINER.CLOSE\\' | translate}}</md-button></div></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/bookmark/remove-bookmark-discussion-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment bookmarked discussion has been removed!<br>Bookmarked discussion shipments appear in the <a href=/shipment-discussions-csl class=btn-link>discussion</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/bookmark/remove-bookmark-notification-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment notification is disabled!</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/bookmark/remove-bookmark-toast.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-success></md-icon><span layout=row><p>Shipment bookmarked has been removed!<br>Bookmarked shipments appear in the <a href=/csl class=btn-link>dashboard</a>.</p></span></div></md-toast>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/discussion/index.html\",\"<style type=text/css>.attachment-ul{\\r\\n margin: 0;padding: 0;\\r\\n}\\r\\n.attachment-icon{\\r\\n color: #324c7e;top: 7px;position: relative;\\r\\n}\\r\\n.attachment-text{\\r\\n cursor: pointer;color: #494949;font-size: 15px;margin: 0 !important;\\r\\n}\\r\\n.tooltip {\\r\\n position: relative;\\r\\n display: inline-block;\\r\\n}\\r\\n\\r\\n.tooltip .tooltiptext {\\r\\n visibility: hidden;\\r\\n width: 120px;\\r\\n background-color: black;\\r\\n color: #fff;\\r\\n text-align: center;\\r\\n border-radius: 6px;\\r\\n padding: 10px 0;\\r\\n position: absolute;\\r\\n z-index: 1;\\r\\n top: 110%;\\r\\n left: 50%;\\r\\n margin-left: -60px;\\r\\n}\\r\\n\\r\\n.tooltip .tooltiptext::after {\\r\\n content: \\\"\\\";\\r\\n position: absolute;\\r\\n bottom: 100%;\\r\\n left: 50%;\\r\\n margin-left: -5px;\\r\\n border-width: 5px;\\r\\n border-style: solid;\\r\\n border-color: transparent transparent black transparent;\\r\\n}\\r\\n\\r\\n.tooltip:hover .tooltiptext {\\r\\n visibility: visible;\\r\\n}\\r\\n\\r\\n.btn-color-hide{\\r\\n background-color: #E6E6E6 !important;\\r\\n}\\r\\n.btn-color-show{\\r\\n background-color: #30c267 !important;\\r\\n}</style><md-toolbar ng-click=\\\"vm.expandReferenceOne = !vm.expandReferenceOne\\\" ng-attr-class=\\\"{{(vm.expandReferenceOne)?\\'active\\':\\'\\'}}\\\"><div class=md-toolbar-tools ng-if=vm.searchDiscussionNew><section style=\\\"width: 100%\\\" class=chat_input layout=row layout-align=\\\"start center\\\"><input type=text ng-model=vm.findText class=search-text-box autocomplete=off autofocus><md-icon ng-click=vm.cancelFindData(); aria-label=options class=image_cancel_icon></md-icon></section></div><div class=md-toolbar-tools ng-if=vm.searchDiscussionOld layout=row layout-align=\\\"space-between center\\\"><h2><!--<md-icon\\r\\n\t \tstyle=\\\"font-family: \\'discussion-toolbar\\' !important;color:#192e5a\\\" >\\r\\n\t \t\t\\r\\n\t\t\t</md-icon>--><md-icon style=\\\"margin-right: 5px;margin-left: 10px;color:#192e5a\\\"><i class=material-icons style=\\\"margin-top:4px;font-size: 2.2rem\\\">chat</i></md-icon><span id=font-range translate=\\\"SHIPMENT DISCUSSION\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\" layout=row layout-align=\\\"space center\\\"><div ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=tooltip><md-button ng-click=vm.sendNotification() class=md-icon-button><md-icon ng-class=\\\"{\\'text-success\\': vm.isBookmarkedNotification}\\\" style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Notifications</span></div><div class=tooltip><md-button ng-click=vm.findAttachmentComments() class=md-icon-button><md-icon ng-class=\\\"{\\'text-success\\': vm.isAttachmentsNotification}\\\" style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize; font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Attachments</span></div><div class=tooltip><md-button ng-click=vm.findData(vm.findText) style=\\\"margin-right: 10px\\\" class=md-icon-button><md-icon style=\\\"font-size: 30px\\\" aria-label=options></md-icon></md-button><span style=\\\"font-size: 13px;text-transform: capitalize;font-family: \\'Open Sans\\', \\'Helvetica\\', \\'Arial\\', sans-serif\\\" class=tooltiptext>Search</span></div></md-menu></div></md-toolbar><md-card-content class=discussion_layout><div ng-attr-class=\\\"shipment_status {{(vm.data.isbooked)?\\'booked\\':((vm.data.isdelivered == \\'true\\')?\\'delivered\\':\\'undelivered\\')}} \\\" layout=column layout-align=\\\"space-around start\\\" layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\"><div class=status><!--<md-icon class=\\\"icon\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\" style=\\\"font-family:\\'discussion-deliverd\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=icon ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\"></md-icon><!--<md-icon class=\\\"icon\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=\\\"font-family:\\'discussion-in-transit\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=\\\"icon sidebar-in-transit\\\" ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=font-size:1.4rem></md-icon><!--<md-icon class=\\\"icon\\\" ng-if=\\\"vm.data.isbooked\\\" style=\\\"font-family:\\'discussion-booked\\' !important;font-size:1.4rem; \\\">  </md-icon>--><md-icon class=icon ng-if=vm.data.isbooked></md-icon><span class=text ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\" style=font-size:1rem>SHIPMENT DELIVERED</span> <span class=text ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\" style=font-size:1rem>SHIPMENT IN-TRANSIT</span> <span class=text ng-if=vm.data.isbooked style=font-size:1rem>BOOKED</span></div><div class=desc><span ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered == \\'true\\'\\\">Limited shipment requests may be made at this time.</span> <span ng-if=\\\"!vm.data.isbooked && vm.data.isdelivered != \\'true\\'\\\">No further shipment requests may be made at this time.</span> <span ng-if=vm.data.isbooked>Shipment requests may be made at this time.</span></div></div><section class=\\\"message_body remove-padding-xs\\\" scroll-to-bottom-csl=vm.discussion_chat style=\\\"max-height: 500px;overflow-y: scroll\\\"><div ng-repeat=\\\"(key,chat_msg) in vm.discussion_chat\\\"><main style=margin-top:20px><div class=date_time_div><!-- {{vm.getSuffixDate(key)}} --> <span class=content>{{key | date: \\'EEEE MMM dd\\'}}</span></div></main><div ng-repeat=\\\"message in chat_msg\\\"><!-- MAIN COMMENT --><article class=\\\"messages chat_msgs msg_section msg_section{{message.id}}\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == message.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};width:100%;\\\" layout=row layout-align=\\\"start stretch\\\"><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == message.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=msg_details><div class=author layout=column layout-gt-xs=row><span class=name>{{message.user_name | capitalize}}</span> <span class=\\\"company remove-marginLeft-xs\\\">{{message.user_email}}</span></div><div class=text_messages><p ng-bind-html=\\\"highlight(message.comment_text | userTagHighlight: vm.company_contacts)\\\"></p><p><ul class=attachment-ul type=none><li ng-repeat=\\\"file in message.attachments\\\"><label ng-if=\\\"(file.thumb1.url || file.thumb2.url)\\\"><a target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\"><img style=\\\"margin-top: 15px\\\" ng-src=\\\"{{vm.downloadlink}}{{(file.thumb1.url || file.thumb2.url).slice((file.thumb1.url || file.thumb2.url).indexOf(\\'/shipment_comment\\'))}}\\\"></a></label><p class=attachment-text><i class=\\\"material-icons attachment-icon\\\"></i>  <a style=\\\"color: #494949 !important\\\" target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\">{{file.url.substring((file.url.lastIndexOf(\\\"/\\\")) + 1)}}</a></p></li></ul></p></div></section><section ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=reply_btn_div layout=row layout-align=\\\"center start\\\" ng-click=\\\"vm.showReplyTextBox(message.id, message.user_id)\\\"><!--<i class=\\\"material-icons\\\"\\r\\n\t\t\t\t\t\tstyle=\\\"font-family: \\'discussion-reply\\' !important; font-size: 16px; margin-top: 3px; margin-right: 5px; \\\">\\r\\n\t\t\t\t\t\t\t\\r\\n\t\t\t\t\t\t</i>--> <i class=material-icons style=\\\"vertical-align: middle\\\">reply</i> <span class=reply_txt>Reply</span></section><aside class=time_div hide-xs><span class=time_txt>{{message.created_at | date: \\'hh:mm a\\'}}</span></aside></article><!-- USER LIST DROPDOWN AND REPLY TEXT --><article class=\\\"hide replyTextBoxDiv{{message.id}} replyTextBoxDiv chat_input chatSubInput chatSubInput{{message.id}}\\\" layout=row layout-align=\\\"start center\\\" ng-click=$event.stopPropagation() ng-if=\\\"message.id == replyId\\\"><!-- USER LIST DROPDOWN --><section class=\\\"userLists hide\\\" id=userList><!-- | filter:userFilter --><article ng-attr-style=\\\"margin-top:{{($index == 0)?\\'10px\\':\\'0px\\'}}\\\" ng-repeat=\\\"x in vm.company_contacts | orderBy : \\'full_name\\'\\\" class=active ng-class=\\\"{\\'active-highlight\\': $index == focusIndex , \\'userList{{$index}}\\':$index == $index }\\\" ng-click=userSelect($event,$index,x.full_name,message.id,x.email);>{{ x.full_name }} {{\\'[\\' + x.email + \\']\\' }}</article></section><!-- COMMENT TEXT BOX --><!--<input type=\\\"text\\\" class=\\\"chat_input_text chat_input_text{{message.id}}\\\" autocomplete=\\\"off\\\" ng-focus=\\\"checkTagWord(message.id,$event)\\\" ng-keyup=\\\"checkTagWord(message.id,$event)\\\" maxlength=\\\"2200\\\" />--><div id={{message.id}} class=\\\"chat_input_text chat_input_text{{message.id}}\\\" maxlength=2200 autocomplete=off ng-keyup=checkTagWord($event,message.id) ng-focus=checkTagWord($event,message.id) contenteditable=true ng-click=\\\"setManualCrusorPoint($event,\\'chat_input_text{{message.id}}\\')\\\" onkeypress=\\\"return (this.innerText.length <= 2200)\\\"></div><md-icon aria-label=options class=image_upload_icon><label for=file{{message.id}} style=\\\"cursor: pointer\\\"><i class=material-icons style=font-size:26px></i></label><input style=\\\"visibility: hidden;width: 0\\\" type=file ng-modal=vm.files{{message.id}} id=file{{message.id}} msg_id={{message.id}} name=files multiple onchange=\\\"angular.element(this).scope().fileNameChanged(this);this.value=null;return false\\\"></md-icon><md-icon ng-class=\\\"{\\'disabledbutton\\' : vm.replyTagPopup == true}\\\" aria-label=options class=select_dropdown_icon ng-click=openUserTagsDiv($event,message.id)><i class=material-icons>alternate_email</i></md-icon><button class=chat_submit id=replyBtn type=button layout=row layout-align=\\\"center center\\\" ng-click=vm.chat_text_submit(message.id) ng-disabled=vm.submitBtnReply ng-class=\\\"(vm.submitBtnReply == true) ? \\'btn-color-hide\\' : \\'btn-color-show\\'\\\"><md-icon aria-label=options style=\\\"color: #ffffff;margin-top:-2px\\\"></md-icon></button></article><!-- File Attachment --><ul ng-if=\\\"(message_id == message.id)\\\"><li style=\\\"color: #000\\\" class=savedFile{{$index}} ng-repeat=\\\"file in files\\\">{{file.name}} - {{vm.file_size_array[file.name].size}} <span title=remove ng-click=vm.removeFile(file.name,$index,message.id) style=\\\"color: red;cursor: pointer;margin-left: 20px\\\"><i style=\\\"color: red;position: relative;top: 10px\\\" class=material-icons></i></span></li></ul><!-- Replies Section --><main ng-if=\\\"message.replies.length > 1\\\" style=margin-top:20px><div class=date_time_div><span style=\\\"cursor: pointer;width: 140px\\\" class=content><span class=\\\"expand_less{{message.id}} hide\\\" ng-click=\\\"vm.reply_comment_display(message.id,\\'less\\',key,$index)\\\"><i style=\\\"vertical-align: middle\\\" class=material-icons>expand_less</i>   {{message.replies.length}} Replies </span><span class=expand_more{{message.id}} ng-click=\\\"vm.reply_comment_display(message.id,\\'more\\',key,$index)\\\"><i style=\\\"vertical-align: middle\\\" class=material-icons>expand_more</i>   {{message.replies.length}} Replies</span></span></div></main><article ng-if=\\\"message.replies.length > 1\\\" class=\\\"messages hide chat_msgs expand_div expand_div{{message.id}}\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};margin-left:{{(1)*45}}px;width: calc(100% - ((1)*45)px);min-height: 40px !important;\\\" layout=row layout-align=\\\"start stretch\\\"><aside class=arrow_left layout=row layout-align=\\\"center start\\\"><i class=material-icons>subdirectory_arrow_right</i></aside><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=msg_details layout=column layout-align=\\\"space-around start\\\" layout-gt-xs=row layout-align-gt-xs=\\\"space-between center\\\" style=\\\"padding: 15px 30px\\\"><div class=text_messages><p style=\\\"margin: 0\\\">Expand to view <span style=\\\"color:#000000;font-size: 15px;font-weight: bold\\\">{{message.replies.length}} Replies to {{message.user_name}}</span></p></div><div class=text_messages><p style=\\\"margin: 0;color: #324c7e;cursor: pointer\\\" ng-click=\\\"vm.reply_comment_display(message.id, \\'less\\',key,$index)\\\">See most recent replies   <i style=\\\"color: #324c7e;vertical-align: middle\\\" class=material-icons>arrow_downward</i></p></div></section><aside class=time_div hide-xs><span class=time_txt>{{message.created_at | date: \\'hh:mm a\\'}}</span></aside></article><!-- REPLY COMMENTS --><!-- ng-class=\\\"message.replies.length > 5 ? \\'hide\\' : \\'\\'\\\" --><article ng-if=message.replies.length class=\\\"messages chat_msgs reply_msg_section{{reply.id}} sub_msg_details sub_msg_details{{message.id}}\\\" ng-repeat=\\\"reply in message.replies\\\" ng-class=\\\"reply.attachments.length > 0 ? \\'attachment-exist\\' : \\'\\'\\\" ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#bae1f5\\':\\'#ffffff\\'}};margin-left:{{(1)*45}}px;width: calc(100% - ((1)*45)px);\\\" layout=row layout-align=\\\"start stretch\\\"><aside class=arrow_left layout=row layout-align=\\\"center start\\\"><i class=material-icons>subdirectory_arrow_right</i></aside><section class=side_color ng-attr-style=\\\"background-color:{{(vm.user_id == reply.user_id)?\\'#45afe3\\':\\'#30c267\\'}};\\\"></section><section class=\\\"msg_details remove-padding-right-xs\\\"><div class=author layout=column layout-gt-xs=row><span class=name>{{reply.user_name | capitalize}}</span> <span class=\\\"company remove-marginLeft-xs\\\">{{reply.user_email}}</span></div><div class=text_messages><p ng-bind-html=\\\"highlight(reply.comment_text | userTagHighlight: vm.company_contacts)\\\"></p><p><ul class=attachment-ul type=none><li ng-repeat=\\\"file in reply.attachments\\\"><label ng-if=\\\"(file.thumb1.url || file.thumb2.url)\\\"><a target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\"><img style=\\\"margin-top: 15px\\\" src=\\\"{{vm.downloadlink}}{{(file.thumb1.url || file.thumb2.url).slice((file.thumb1.url || file.thumb2.url).indexOf(\\'/shipment_comment\\'))}}\\\"></a></label><p class=attachment-text><i class=\\\"material-icons attachment-icon\\\"></i>  <a style=\\\"color: #494949 !important\\\" target=_blank download=\\\"{{file.url.substring((file.url.lastIndexOf(\\'/\\')) + 1)}}\\\" href=\\\"{{vm.downloadlink}}{{file.url.slice(file.url.indexOf(\\'/shipment_comment\\'))}}\\\">{{file.url.substring((file.url.lastIndexOf(\\\"/\\\")) + 1)}}</a></p></li></ul></p></div></section><!--<section class=\\\"reply_btn_div\\\" layout=\\\"row\\\" layout-align=\\\"center start\\\" >\\r\\n\\r\\n\t\t\t\t\t\t<i class=\\\"material-icons\\\">reply</i>\\r\\n\t\t\t\t \t<span class=\\\"reply_txt\\\">Reply</span>\\r\\n\\r\\n\t\t\t\t\t</section>--><aside class=time_div hide-xs><span class=time_txt>{{reply.created_at | date: \\'hh:mm a\\'}}</span></aside></article></div></div></section><section ng-class=\\\"{\\'disabledbutton\\' : vm.switchUser == true}\\\" class=\\\"chat_input chatMainInput\\\" layout=row layout-align=\\\"start center\\\" ng-click=$event.stopPropagation()><section class=\\\"userLists hide\\\" id=userList><!-- | filter:userFilter --><article ng-attr-style=\\\"margin-top:{{($index == 0)?\\'10px\\':\\'0px\\'}};\\\" ng-if=vm.company_contacts ng-repeat=\\\"x in vm.company_contacts | orderBy : \\'full_name\\'\\\" class=active ng-class=\\\"{\\'active-highlight\\': $index == focusIndex , \\'userList{{$index}}\\':$index == $index }\\\" ng-click=\\\"userSelect($event,$index,x.full_name,\\'\\',x.email);document.getElementById(\\'chat_input_main_text\\').focus();\\\">{{ x.full_name }} {{\\'[ \\' + x.email + \\' ]\\' }}</article></section><!--<input type=\\\"text\\\" class=\\\"chat_input_text\\\" ng-model=\\\"vm.discussion_comment_text\\\" ng-focus=\\\"checkTagWord()\\\" ng-keyup=\\\"checkTagWord()\\\" autocomplete=\\\"off\\\" maxlength=\\\"2200\\\" />--><div class=\\\"chat_input_text chat_input_main_text\\\" id=chat_input_main_text maxlength=2200 autocomplete=off ng-model=vm.discussion_comment_text ng-keyup=checkTagWord($event) ng-focus=checkTagWord($event) contenteditable=true message_id=\\\"\\\" ng-click=\\\"setManualCrusorPoint($event,\\'chat_input_main_text\\')\\\" ng-keypress=\\\"return (this.innerText.length <= 2200)\\\"></div><md-icon aria-label=options class=image_upload_icon><label for=fileOne style=\\\"cursor: pointer\\\"><i class=material-icons style=font-size:26px></i></label><input style=\\\"visibility: hidden;width: 0\\\" type=file ng-modal=vm.files msg_id=\\\"\\\" id=fileOne name=files multiple onchange=\\\"angular.element(this).scope().fileNameChanged(this);this.value=null;return false\\\"></md-icon><md-icon ng-class=\\\"{\\'disabledbutton\\' : vm.commentTagPopup == true}\\\" aria-label=options class=select_dropdown_icon ng-click=openUserTagsDiv($event);><i class=material-icons>alternate_email</i></md-icon><button class=chat_submit id=commentBtn type=button layout=row layout-align=\\\"center center\\\" ng-click=vm.chat_text_submit() ng-disabled=vm.submitBtn ng-class=\\\"(vm.submitBtn == true) ? \\'btn-color-hide\\' : \\'btn-color-show\\'\\\"><md-icon aria-label=options style=\\\"color: #ffffff;margin-top:-2px\\\"></md-icon></button></section><ul ng-if=\\\"(message_id == \\'none\\')\\\"><li style=\\\"color: #000\\\" class=savedFile{{$index}} ng-repeat=\\\"file in files\\\">{{file.name}} - {{vm.file_size_array[file.name].size}} <span title=remove ng-click=vm.removeFile(file.name,$index) style=\\\"color: red;cursor: pointer;margin-left: 20px\\\"><i style=\\\"color: red;position: relative;top: 10px\\\" class=material-icons></i></span></li></ul></md-card-content>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/invoices/invoice-list.html\",\"<md-card flex=auto class=invoice-md-card ng-init=\\\"vm.expandInvoice = vm.expandedInvoices\\\"><md-toolbar ng-click=\\\"vm.expandInvoice = !vm.expandInvoice\\\"><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=\\\"Invoice Details\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=!vm.expandInvoice><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=vm.expandInvoice><md-icon aria-label=options></md-icon></md-button><md-menu-content hide></md-menu-content></md-menu></div></md-toolbar><md-card-content class=\\\"invoice-md-card-content slide\\\" ng-show=vm.expandInvoice><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\"><div layout=row layout-xs=column layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedInvoices ng-change=vm.setInvoicesExpanded() aria-label=\\\"keep invoices open\\\">Keep Invoices Open</md-checkbox></div></div><div layout=column><div layout=column layout-gt-xs=row><md-card flex=auto flex-gt-xs=45 layout-align=\\\"start stretch\\\"><md-card-content style=padding-left:35px;padding-right:35px class=background-fff layout=column layout-gt-sm=row layout-align=\\\"space-around start\\\" layout-align-gt-sm=\\\"space-between start\\\"><div flex=100 flex=\\\"\\\" layout=column class=add-margin-sm><p class=\\\"margin-top-0 remove-margin-sm\\\"><strong>CUSTOMER NAME</strong></p><span>{{vm.invoiceDetails.customername}}</span></div><div flex=100 layout=column class=add-margin-sm><p class=\\\"margin-top-0 remove-margin-sm\\\"><strong>CUSTOMER ADDRESS</strong></p><span>{{vm.invoiceDetails.load.customeraddress1}}</span></div></md-card-content></md-card><md-card flex=auto flex-gt-xs=45><md-card-content style=padding-left:35px;padding-right:35px class=background-fff layout=column layout-gt-sm=row layout-align=\\\"space-around start\\\" layout-align-gt-sm=\\\"space-between start\\\"><div flex=100 layout=column class=add-margin-sm><p class=\\\"margin-top-0 remove-margin-sm\\\"><strong>CONSIGNEE NAME</strong></p><span>{{vm.invoiceDetails.load.consigneename}}</span></div><div flex=100 layout=column class=add-margin-sm><p class=\\\"margin-top-0 remove-margin-sm\\\"><strong>CONSIGNEE ADDRESS</strong></p><span>{{vm.invoiceDetails.load.consigneeaddress}}</span></div></md-card-content></md-card></div><div layout=column><md-card class=background-fff><md-card-content style=padding:35px layout=column layout-gt-xs=row layout-align=\\\"space-around start\\\" layout-align-gt-xs=\\\"space-between center\\\"><div flex=100 layout=column class=add-margin-xs><strong>INVOICE DATE</strong> <span>{{vm.invoiceDetails.invoicedate | date:\\'dd-MMM-yyyy\\'}}</span></div><div flex=100 layout=column class=add-margin-sm><strong ng-if=\\\"vm.data.shipmentstatus == \\'DELIVERED\\'\\\">INVOICE TOTAL</strong> <strong ng-if=\\\"vm.data.shipmentstatus != \\'DELIVERED\\'\\\">PROJECTED INVOICE TOTAL</strong> <span>{{vm.invoiceDetails.total | number : 2}} <span ng-if=vm.invoiceDetails.total>USD</span></span></div><div flex=100 layout=column class=add-margin-sm><strong>TOTAL WEIGHT</strong> <span>{{vm.invoiceDetails.weight}}</span></div></md-card-content></md-card></div><div><md-button style=\\\"box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.26);background-color: rgb(45,125,143);margin-left:15px\\\" ng-disabled=\\\"\\\" class=\\\"btn btn-default\\\" ng-click=\\\"vm.showModal(ev,\\'invoice-modal\\')\\\"><span style=\\\"padding: 10px;color:#fff\\\">MORE INFO</span></md-button></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/milestones/milestones.html\",\"<style>.status_col img{\\r\\n vertical-align: middle; margin-right:10px; display:inline;\\r\\n}\\r\\n\\r\\n.status_col .hover_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .default_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .hover_img{\\r\\n display:inline;\\r\\n}</style><div class=table-scroll><table class=\\\"card-table table-static milestone-table\\\" cellspacing=0 border=0 style=\\\"min-width: 935px\\\"><thead><tr><th style=width:68px>TYPE</th><th style=width:10%></th><th style=width:17%>MILESTONE</th><th style=width:19%>COMPANY NAME</th><th style=width:15%>LOCATION</th><th style=width:15%>ESTIMATED</th><th style=width:15%>ACTUAL</th><th style=width:14%>ACTIONS</th></tr></thead><tbody><tr ng-repeat=\\\"(key1, milestone_details) in vm.shipment_milestones\\\"><td class=first_heading_row colspan=9><table cellspacing=0 border=0><!--<tr class=\\\"header\\\">\\r\\n\\r\\n <td\\r\\n\\r\\n ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}};font-weight:bold;color:{{milestone_details.achieved?\\'#ffffff\\':\\'\\'}};\\\"></td>\\r\\n\\r\\n <td\\r\\n class=\\\"td-50\\\"\\r\\n colspan=\\\"3\\\"\\r\\n name=\\\"{{milestone_details.milestone}}\\\"\\r\\n ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}};font-weight:bold;color:{{milestone_details.achieved?\\'#ffffff\\':\\'\\'}};\\\">{{milestone_details.milestone}}</td>\\r\\n\\r\\n <td ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}}\\\"></td>\\r\\n <td ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}}\\\"></td>\\r\\n <td ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}}\\\"></td>\\r\\n <td ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}}\\\"></td>\\r\\n <td class=\\\"td-10\\\" ng-attr-style=\\\"background-color:{{milestone_details.achieved?\\'#30c267\\':\\'#dddddd\\'}}\\\"></td>\\r\\n\\r\\n </tr>--><tr ng-if=milestone_details.pick_stops.length class=header_details ng-repeat=\\\"(key2, stops) in milestone_details.pick_stops\\\"><td style=width:63px><div layout=row layout-align=\\\"start center\\\"><md-icon ng-attr-style=\\\"color:{{(stops.exception)?\\'#EF533D\\':((stops.achieved)?\\'#30C268\\':\\'#777A7D\\')}};\\\" class=pick-stop-arrived-icon ng-if=\\\"stops.name.indexOf(\\'Departed\\')\\\"></md-icon><md-icon ng-attr-style=\\\"color:{{(stops.exception)?\\'#EF533D\\':((stops.achieved)?\\'#30C268\\':\\'#777A7D\\')}}; margin-left:7px;\\\" class=pick-stop-depart-icon ng-if=\\\"stops.name.indexOf(\\'Arrived\\') && milestone_details.milestone != \\'DELIVERED\\'\\\"></md-icon><md-icon ng-attr-style=\\\"color:{{(stops.exception)?\\'#EF533D\\':((stops.achieved)?\\'#30C268\\':\\'#777A7D\\')}}; margin-left:3px;\\\" ng-if=\\\"stops.name.indexOf(\\'Arrived\\') && milestone_details.milestone == \\'DELIVERED\\'\\\"></md-icon></div></td><td style=width:10%><div layout=row layout-align=\\\"start center\\\"><span class=milestone_status ng-if=\\\"key2 == 0\\\">{{milestone_details.milestone}}</span></div></td><td style=width:17%>{{stops.name}}</td><td style=width:19%>{{stops.company | capitalize}}</td><td style=width:15%>{{(stops.city)?(stops.city | capitalize):\\'\\'}}{{(stops.state)?(\\', \\'+(stops.state | uppercase)):\\'\\'}}</td><td style=width:15%><span ng-if=\\\"stops.est_date || stops.est_time\\\">{{(stops.est_date)?(stops.est_date | date:\\'dd-MMM-yyyy\\'):\\'\\'}}<br>{{(stops.est_time)?(stops.est_time | date : \\\"hh:mm\\\"):\\'\\'}} </span><span ng-if=\\\"!stops.est_date && !stops.est_time\\\"><hr style=\\\"border-color:#9b9b9b; width:10px;float:left\\\"></span></td><td style=width:15%><span ng-if=\\\"stops.act_date || stops.act_time\\\" ng-attr-style=\\\"color:{{(stops.exception)?\\'#EF533D\\':\\'\\'}}\\\">{{(stops.act_date)?(stops.act_date | date:\\'dd-MMM-yyyy\\'):\\'\\'}}<br>{{(stops.act_time)?(stops.act_time | date : \\\"hh:mm\\\"):\\'\\'}} </span><span ng-if=\\\"!stops.act_date && !stops.act_time\\\"><hr style=\\\"border-color:#9b9b9b; width:10px;float:left\\\"></span></td><td style=width:14% align=center><!--<md-icon ng-click=\\\"vm.showModal(ev, \\'pick-details\\',stops)\\\" class=\\\"m-r-xs icon-more-details-blue\\\"></md-icon>--> <span class=milestone_view_more ng-click=\\\"vm.showModal(ev, \\'pick-details\\',stops)\\\">View More</span></td></tr><!--<tr ng-if=\\\"!milestone_details.pick_stops.length\\\">\\r\\n <td class=\\\"remove-border-radius\\\" style=\\\"display: table; width:100%\\\" >No Milestone Details Available</td>\\r\\n </tr>--></table></td></tr><tr ng-if=!vm.shipment_milestones.length><td class=remove-border-radius colspan=9>No Milestone Details Available</td></tr></tbody></table></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/more-shipping/more-shipping.html\",\"<md-card flex=auto ng-init=\\\"vm.expandMoreShipping = vm.expandedShippingDetails\\\"><md-toolbar ng-click=\\\"vm.expandMoreShipping = !vm.expandMoreShipping\\\"><div class=md-toolbar-tools><h2><!-- shipment-section-icon --><!-- shipment-section-title --><md-icon></md-icon><span id=font-range translate=\\\"More Shipping Details\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=!vm.expandMoreShipping><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=vm.expandMoreShipping><md-icon aria-label=options></md-icon></md-button><md-menu-content hide></md-menu-content></md-menu></div></md-toolbar><md-card-content class=slide ng-show=vm.expandMoreShipping><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\"><div layout=row layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedShippingDetails ng-change=vm.setShippingDetailsExpanded() aria-label=\\\"keep shipping details open\\\">Keep Shipping Details Open</md-checkbox></div></div><div flex=auto class=\\\"loading-container bookmarks-widget has-menu\\\" style=padding:20px><div class=table-scroll><table class=table-static><thead><tr><th class=td-20><strong>MUST SHIP DATE</strong></th><th class=td-20><strong>MUST DELIVER DATE</strong></th><th class=td-15><strong>PRO #</strong></th><th class=td-15><strong>BOL #</strong></th><th class=td-15><strong>LOAD #</strong></th><th class=td-20><strong>CONTAINER/TRAILER #</strong></th></tr></thead><tbody><tr><td class=color_text>{{vm.data.shipdate}}</td><td class=color_text>{{vm.data.duedate}}</td><td class=color_text>{{vm.data.pro}}</td><td class=color_text>{{vm.data.bol}}</td><td class=color_text>{{vm.data.load}}</td><td class=color_text>{{vm.data.containertrailer}}</td></tr></tbody></table></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/reference-numbers/reference-numbers-list.html\",\"<md-card flex=auto ng-init=\\\"vm.expandReference = vm.expandedRefNumbers\\\"><md-toolbar ng-click=\\\"vm.expandReference = !vm.expandReference\\\" ng-attr-class=\\\"{{(vm.expandReference)?\\'active\\':\\'\\'}}\\\"><div class=md-toolbar-tools><h2><md-icon></md-icon><span id=font-range translate=\\\"Reference Numbers\\\"></span></h2><span flex=auto></span><md-menu md-position-mode=\\\"target-right target\\\"><md-button class=md-icon-button ng-if=!vm.expandReference><md-icon aria-label=options></md-icon></md-button><md-button class=md-icon-button ng-if=vm.expandReference><md-icon aria-label=options></md-icon></md-button><md-menu-content hide></md-menu-content></md-menu></div></md-toolbar><md-card-content class=slide ng-show=vm.expandReference><div layout=column layout-gt-xs=row layout-align=\\\"start start\\\" layout-align-gt-xs=\\\"end center\\\"><div layout=row layout-align=\\\"end center\\\" class=light-form><md-checkbox class=md-primary ng-model=vm.expandedRefNumbers ng-change=vm.setRefNumbersExpanded() aria-label=\\\"keep reference numbers open\\\">Keep Reference Numbers Open</md-checkbox></div></div><div layout=column><div id=referenceNumbers><md-card flex-gt-xs=100 flex-xs=1 class=background-fff><div class=display-block><strong>REF #</strong> <span class=\\\"list-header margin-0 padding-bottom-15\\\">{{vm.data.reference}}</span></div><div layout=column layout-gt-xs=row class=m-t-sm><div class=table-scroll><table class=table-static><thead><tr><th class=td-20><strong ng-class=\\\"vm.data.extraref1 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #1</strong></th><th class=td-20><strong ng-class=\\\"vm.data.extraref2 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #2</strong></th><th class=td-20><strong ng-class=\\\"vm.data.extraref3 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #3</strong></th><th class=td-20><strong ng-class=\\\"vm.data.extraref4 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #4</strong></th><th class=td-20><strong ng-class=\\\"vm.data.extraref5 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #5</strong></th><th class=td-20><strong ng-class=\\\"vm.data.extraref6 ?\\'\\':\\'blur-color\\'\\\" class=display-block>EXTRA REF #6</strong></th></tr></thead><tbody><tr><td><span ng-attr-class=\\\"{{(vm.data.extraref1)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref1)?vm.data.extraref1:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref2)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref2)?vm.data.extraref2:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref3)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref3)?vm.data.extraref3:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref4)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref4)?vm.data.extraref4:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref5)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref5)?vm.data.extraref5:\\'-\\'}}</span></td><td><span ng-attr-class=\\\"{{(vm.data.extraref6)?\\'\\':\\'blur-color\\'}} display-block word-break color_text\\\">{{(vm.data.extraref6)?vm.data.extraref6:\\'-\\'}}</span></td></tr></tbody></table></div></div></md-card></div></div></md-card-content></md-card>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/show-list-view/details.html\",\"<div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=REF></span> #</span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.reference}}</span> <span href=#reference-area du-smooth-scroll offset=80 duration=700 translate=\\\"View More\\\" class=\\\"font-bold font-15\\\" style=\\\"cursor: pointer;color: #45afe3\\\" ng-click=\\\"vm.expandReference = true\\\"></span></div><!-- ng-click=\\\"vm.goToReference()\\\" --><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=Description></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.description | capitalize}}</span></div><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=\\\"Total Pieces\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.totalpieces}}</span></div><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=\\\"Gross Weight\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{(vm.invoiceDetails.weight)?(vm.invoiceDetails.weight+ \\' lbs\\'):\\'\\'}}</span></div><div ng-if=vm.show_class_access layout=column class=\\\"margin-bottom-15 margin-top-15\\\"><span class=\\\"text-sub text-upper\\\"><span translate=Class></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{vm.data.shipmentclass}}</span></div><div layout=column class=\\\"margin-bottom-15 margin-top-15\\\" ng-hide=\\\"((vm.is_consignee_user == \\'true\\')?true:((!vm.hasFinancialPermissions)?true:false))\\\"><span ng-if=\\\"vm.data.shipmentstatus == \\'DELIVERED\\'\\\" class=\\\"text-sub text-upper\\\"><span translate=\\\"Invoice Total\\\"></span></span> <span ng-if=\\\"vm.data.shipmentstatus != \\'DELIVERED\\'\\\" class=\\\"text-sub text-upper\\\"><span translate=\\\"Projected Invoice Total\\\"></span></span> <span class=shipment-invoice-det-txt style=font-size:16px>{{(vm.invoiceDetails.total)? (vm.invoiceDetails.total | currency: \\'$\\'):\\'\\'}}</span></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/show-list-view/loads_filter.html\",\"<div layout-xs=column layout-gt-xs=row layout-align=\\\"space-around start\\\" layout-align-gt-xs=\\\"space-between end\\\"><span class=font-22>CHECK CALLS <span class=\\\"font-12 font-bold\\\" style=color:#fc9f2e>({{(vm.check_calls.length)?(vm.check_calls.length):0}} total)</span> </span><span class=filter-text translate=FILTER ng-click=vm.showListFilterChange()></span></div><div ng-if=vm.showListFilter layout=column layout-gt-sm=row layout-align-gt-sm=\\\"space-between center\\\" class=\\\"m-b-sm m-t-sm\\\"><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=DATE></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><mdp-date-picker ng-model=vm.checkcalls.date ng-change=\\\"vm.check_calls_filter((vm.checkcalls.date | date : \\'dd MMM yyyy\\'),\\'date\\',0)\\\" class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-date-picker></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=TIME></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><mdp-time-picker ng-model=vm.checkcalls.time ng-change=\\\"vm.check_calls_filter(vm.checkcalls.time,\\'time\\',0)\\\" class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-time-picker></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=CITY></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><md-input-container class=\\\"error-hidden display-block\\\"><input type=text name=\\\"\\\" ng-disabled=\\\"\\\" ng-model=vm.checkcalls.city ng-model-options=\\\"{ debounce: 1000 }\\\" ng-change=\\\"vm.check_calls_filter(vm.checkcalls.city,\\'city\\',2000)\\\" class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=STATE></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><md-input-container class=\\\"error-hidden display-block\\\"><input type=text name=\\\"\\\" ng-disabled=\\\"\\\" ng-model=vm.checkcalls.state ng-model-options=\\\"{ debounce: 1000 }\\\" ng-change=\\\"vm.check_calls_filter(vm.checkcalls.state,\\'state\\',2000)\\\" class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=STATUS></span></span> <span class=\\\"display-block word-break display-block padding-right-10\\\"><md-input-container class=md-block><md-select md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() aria-label=vm.checkcalls.status ng-model=vm.checkcalls.status ng-change=\\\"vm.check_calls_filter(vm.checkcalls.status,\\'status\\',0)\\\"><md-option ng-value=null>—</md-option><md-option ng-repeat=\\\"check_call_status in vm.check_calls_status | orderBy\\\" ng-value=check_call_status>{{check_call_status}}</md-option></md-select></md-input-container></span></div><div class=m-b-sm flex=100 flex-gt-sm=90><span class=\\\"display-block text-sub text-upper\\\"><span translate=NOTE></span></span> <span class=\\\"display-block word-break display-block\\\"><md-input-container class=\\\"error-hidden display-block\\\"><input type=text ng-disabled=\\\"\\\" ng-model=vm.checkcalls.note ng-model-options=\\\"{ debounce: 1000 }\\\" ng-change=\\\"vm.check_calls_filter(vm.checkcalls.note,\\'note\\',2000)\\\" class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container></span></div></div>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/show-list-view/show-list-view.html\",\"<div flex=100 flex-xs=100 flex-sm=100 flex-gt-sm=50 class=\\\"m-b-xs shipping-origin-dest-top\\\" ng-if=!vm.showWayPointDiv><div flex-gt-sm=95 flex-xs=100 class=exceptions ng-repeat=\\\"exceptions in vm.data.exceptions\\\"><div class=\\\"current notice\\\"><div layout=row layout-align=\\\"start center\\\" style=\\\"font-weight: 600;color: #FDEEEC\\\"><md-icon></md-icon><div flex=auto class=uppercase><span style=\\\"font-size: 15px\\\" translate=SHIPPINGDETAILS.EXCEPTION></span> : {{exceptions.pointname}}</div><div style=\\\"float: right\\\">{{exceptions.created_at | date:\\'dd-MMM-yyyy\\'}}     {{exceptions.created_at | date:\\'hh:mm\\'}}</div></div></div></div><span layout=row style=\\\"margin-bottom: 10px; visibility:hidden\\\" class=layout-row><hr flex=auto class=flex-auto></span><div flex-gt-sm=95 flex-xs=100 layout-gt-xs=row class=\\\"m-b shipment-origin-dest\\\"><div flex=100 flex-gt-sm=65 class=m-b><div style=\\\"float: left\\\"><md-icon class=shipment-origin-dest-icons></md-icon></div><div class=shipment-origin-dest-content><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span translate=SHIPPINGDETAILS.PICKUP></span></h4><!-- <md-icon></md-icon> <br> --> <span class=\\\"font-20 font-bold\\\">{{vm.data.origincity != null ? (vm.data.origincity + \\\", \\\" + (vm.data.originstate || vm.data.origincountrycode)) : \\\"\\\"}}</span></div></div><!-- <br show-xs show-sm> --><div flex=100 flex-gt-sm=30 class=\\\"shpping-origin-dest-date-content m-b\\\"><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span>ESTIMATED</span></h4><!-- <md-icon></md-icon> {{vm.data.duedate | date:\\'dd-MMM-yyyy\\'}}<br> --> <span class=\\\"shipment-date-txt display-block\\\">{{vm.data.pickupdate | date:\\'dd-MMM-yyyy\\':\\'UTC\\'}} {{vm.data.pickuptime}}</span><!-- pickup time --></div></div><div flex-gt-sm=95 flex-xs=100 layout-gt-xs=row class=\\\"m-b shipment-origin-dest\\\"><div flex=100 flex-gt-sm=65 class=m-b><div style=\\\"float: left\\\"><md-icon class=shipment-origin-dest-icons></md-icon></div><div class=shipment-origin-dest-content><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span translate=SHIPPINGDETAILS.DELIVERY></span></h4><!-- <md-icon></md-icon> <br> --> <span class=\\\"font-20 font-bold\\\">{{vm.data.destinationcity != null ? (vm.data.destinationcity + \\\", \\\" + (vm.data.destinationstate || vm.data.destinationcountrycode)) : \\\"\\\"}}</span></div></div><!-- <br show-xs show-sm> --><div flex=100 flex-gt-sm=30 class=\\\"shpping-origin-dest-date-content m-b\\\"><h4 class=\\\"text-upper text-light m-b-xs m-t-0\\\"><span>ESTIMATED</span></h4><!-- <md-icon></md-icon> {{vm.data.duedate | date:\\'dd-MMM-yyyy\\'}}<br> --> <span class=\\\"shipment-date-txt display-block\\\" ng-class=\\\"{\\'text-danger\\' : ((vm.data.duedatenew < vm.data.currentDate) && !vm.data.delivereddate) }\\\">{{vm.data.load_display_date_time.date_display | date:\\'dd-MMM-yyyy\\':\\'UTC\\'}} {{vm.data.load_display_date_time.time_display}} </span><!-- pickup time --></div></div><div flex=100 layout=row><div class=equipmenttypediv><span>EQUIPMENT TYPE</span> <span>{{vm.data.equipmenttype}}</span></div></div></div><!-- Include the map --><div flex=100 flex-xs=100 flex-sm=100 flex-gt-sm={{vm.showWayPointDiv?45:50}} id=aljex_shipment_ng_map class=m-b-xs><p ng-if=!vm.showWayPointDiv style=margin-bottom:7px class=\\\"font-22 margin-top-0\\\">CHECK CALLS <span class=\\\"font-12 font-bold\\\" style=color:#fc9f2e>({{(vm.check_calls.length)?(vm.check_calls.length):0}} total)</span></p><div map-lazy-load=https://maps.google.com/maps/api/js map-lazy-load-params=\\\"{{ vm.googleMapsUrl }}\\\" layout-gt-sm=row flex=100 ng-attr-style=position:relative;min-height:315px;><ng-map gesture-handling=greedy id=aljex_shipping_map center=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" zoom=12 disable-double-click-zoom=true fullscreen-control=false zoom-control-options=\\\"{style:\\'LARGE\\', position:\\'RIGHT_CENTER\\'}\\\" street-view-control=false map-type-control=false styles={{vm.mapStyle}} default-style=false style=height:100%;border-radius:5px;width:100%;position:absolute><custom-control position=TOP_RIGHT index=1><div id=show_list_view><!--<h3 translate=\\\"Show List View\\\" class=\\\"inline-elem\\\" style=\\\"line-height:20px\\\" ></h3>--><md-checkbox id=showListViewCheckBox class=md-primary ng-model=vm.showListView ng-change=vm.showListViewChange() aria-label=\\\"Show List View\\\"><span style=line-height:25px class=font-13>Show List View</span></md-checkbox></div><!--<div id=\\\"gps_status\\\" class=\\\"\\\">\\r\\n <md-icon class=\\\"\\\"></md-icon> GPS ACTIVE\\r\\n </div>\\r\\n\\r\\n <div id=\\\"gps_status\\\" class=\\\"hide\\\">\\r\\n <md-icon class=\\\"\\\">location_off</md-icon> NO GPS\\r\\n </div>--></custom-control><!-- Empty check call points with undelivered status --><directions ng-if=\\\"!vm.ngMapway.length && !vm.data.isdelivered\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#45AFE3\\\", strokeOpacity: 0,icons: [{icon: {path: \\\"M 0,-1 0,1\\\", strokeOpacity: 1, scale: 2 },offset: \\\"0\\\",repeat: \\\"8px\\\"}]}\\' origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><!-- check call points with undelivered status --><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"!vm.data.isdelivered && vm.ngMapway.length && ($index == 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#1FC06F\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"!vm.data.isdelivered && vm.ngMapway.length && vm.chunk_array.length > 1 && ($index > 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#1FC06F\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lat}} , {{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><directions ng-if=\\\"!vm.data.isdelivered && vm.ngMapway.length\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#45AFE3\\\", strokeOpacity: 0,icons: [{icon: {path: \\\"M 0,-1 0,1\\\", strokeOpacity: 1, scale: 2 },offset: \\\"0\\\",repeat: \\\"8px\\\"}]}\\' origin=\\\"{{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lat}} , {{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><!-- Delivered Status--><!-- check call points with Delivered status --><directions ng-if=\\\"!vm.ngMapway.length && vm.data.isdelivered\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING waypoints={{vm.ngMapway}} polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"vm.data.isdelivered && vm.ngMapway.length && ($index == 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.data.origin_geocode.origin_lat}} , {{vm.data.origin_geocode.origin_lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><directions ng-repeat=\\\"wayPts in vm.chunk_array\\\" ng-if=\\\"vm.data.isdelivered && vm.ngMapway.length && vm.chunk_array.length > 1 && ($index > 0)\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' waypoints={{wayPts}} origin=\\\"{{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lat}} , {{vm.chunk_array[$index-1][vm.chunk_array[$index-1].length-1].location.lng}}\\\" destination=\\\"{{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lat}} , {{vm.chunk_array[$index][vm.chunk_array[$index].length-1].location.lng}}\\\"></directions><!-- Empty check call points with Delivered status --><directions ng-if=\\\"vm.data.isdelivered && vm.ngMapway.length\\\" draggable=false suppress-markers=true panel=directions-panel travel-mode=DRIVING polyline-options=\\'{strokeColor: \\\"#9B9B9B\\\"}\\' origin=\\\"{{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lat}} , {{vm.chunk_array[vm.chunk_array.length - 1][vm.chunk_array[vm.chunk_array.length - 1].length-1].location.lng}}\\\" destination=\\\"{{vm.data.destination_geocode.dest_lat}} , {{vm.data.destination_geocode.dest_lng}}\\\"></directions><info-window id=myInfoWindow style=color:black><div ng-non-bindable><h4>{{title}}</h4></div></info-window></ng-map></div></div><!-- SHOW LIST VIEW --><div flex=100 flex-xs=100 flex-sm=100 flex-gt-sm=55 ng-if=vm.showWayPointDiv id=checkPtsDetails><table ng-if=vm.check_calls class=show_listView_layout><tr><td style=position:relative;width:50px align=center><div class=vertical-line ng-if=!vm.data.isdelivered style=\\\"border-right:4px dashed #37ABDE\\\"></div><div class=vertical-line ng-if=vm.data.isdelivered style=\\\"border-right:4px solid #9B9B9B\\\"></div><div ng-if=!vm.data.isdelivered class=vertical-line-green ng-attr-style=\\\"height: {{verticalLineHeight}}px\\\"></div></td><td check-calls-height id=scrollElement><!--<md-card\\r\\n id=\\\"location10000\\\"\\r\\n class=\\\"locationDetDiv locationDetDivOrigin location10000 origin_note margin-bottom-10 display-block\\\"\\r\\n lat=\\\"{{vm.data.origin_geocode.origin_lat}}\\\"\\r\\n lng=\\\"{{vm.data.origin_geocode.origin_lng}}\\\" >\\r\\n\\r\\n <div class=\\\"shipment_aljex_arrow_left\\\" ></div>\\r\\n\\r\\n <div class=\\\"shipment_aljex_arrow_left_black\\\" ></div>--><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--><!--<img class=\\\"custom-marker-icons origin\\\" src=\\\"/assets/images/icons/shipment/showListView/icon-origin.png\\\" />\\r\\n <md-card-content>\\r\\n <span class=\\\"diaply-block\\\"> Note </span>\\r\\n <p class=\\\"margin-top-0\\\">Test</p>\\r\\n </md-card-content>\\r\\n\\r\\n </md-card>--><!-- Origin --><md-card id=\\\"location{{vm.data.origin_geocode.origin_lat.toString().replace(\\'.\\',\\'-\\')}}{{vm.data.origin_geocode.origin_lng.toString().replace(\\'.\\',\\'-\\')}}\\\" ng-attr-class=\\\"locationDetDiv locationDetDivOrigin location10000 origin_note margin-bottom-10 display-block {{(vm.data.pickupdateactual)?\\'delivered\\':\\'\\'}}\\\" lat={{vm.data.origin_geocode.origin_lat}} lng={{vm.data.origin_geocode.origin_lng}}><div class=shipment_aljex_arrow_left></div><div class=shipment_aljex_arrow_left_black ng-if=!vm.data.pickupdateactual></div><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--> <img ng-attr-class=\\\"custom-marker-icons origin {{(vm.data.pickupdateactual)?\\'delivered\\':\\'\\'}}\\\" src=/assets/images/icons/shipment/showListView/icon-origin.png><md-card-content layout=column layout-gt-xs=row layout-align=\\\"space-between start\\\" layout-align-gt-xs=\\\"space-between {{(!vm.data.pickupdateactual)?\\'center\\':\\'start\\'}}\\\" class=check_calls_content><div class=margin-top-0 flex=100 ng-if=!vm.data.pickupdateactual>Origin</div><div flex=100 flex-gt-xs=40 ng-if=vm.data.pickupdateactual class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>MILESTONE</span><h4 class=\\\"margin-top-0 margin-bottom-0 shipment-lst-mile-name font-16\\\" style=font-weight:normal>At Pickup</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.pickupdateactual class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL DATE</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{(vm.data.pickupdateactual)?(vm.data.pickupdateactual | date : \\'dd-MMM-yyyy\\'):\\'-\\'}}</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.pickupdateactual class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL TIME</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{(vm.data.pickuptimeactual)?(vm.data.pickuptimeactual | date : \\'hh:mm\\'):\\'-\\'}}</h4></div></md-card-content></md-card><!-- Check Calls --><md-card ng-repeat=\\\"check_calls in vm.check_calls\\\" id=\\\"location{{check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\')}}{{check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\')}}\\\" ng-attr-class=\\\"locationDetDiv{{check_calls.geocodes.lat}} location{{$index}} margin-bottom-10 display-block locationDetDiv\\\" lat={{check_calls.geocodes.lat}} lng={{check_calls.geocodes.lng}} ng-if=vm.check_calls.length><div class=shipment_aljex_arrow_left></div><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--> <img ng-if=\\\"highlight_check_call_pt == (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )\\\" class=\\\"custom-marker-icons highlight\\\" src=/assets/images/icons/shipment/showListView/icon-oval-selected-showlist.png> <img ng-if=\\\"(highlight_check_call_pt != (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )) && (vm.check_calls.length - 1) != $index && !vm.data.isdelivered\\\" class=custom-marker-icons src=/assets/images/icons/shipment/showListView/icon-oval-unselected.png> <img ng-if=\\\"(highlight_check_call_pt != (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )) && (vm.check_calls.length - 1) == $index && !vm.data.isdelivered\\\" class=\\\"custom-marker-icons lastCheck\\\" src=/assets/images/icons/shipment/showListView/icon-oval-enroute.png> <img ng-if=\\\"(highlight_check_call_pt != (check_calls.geocodes.lat.toString().replace(\\'.\\',\\'-\\') + check_calls.geocodes.lng.toString().replace(\\'.\\',\\'-\\') )) && vm.data.isdelivered\\\" class=custom-marker-icons src=/assets/images/icons/shipment/showListView/icon-oval-unselected.png><md-card-content class=\\\"check_calls_content check_calls_content_item\\\"><div flex=100 layout=column layout-gt-xs=row layout-align=\\\"space-between start\\\" layout-align-gt-xs=\\\"space-between start\\\" class=margin-bottom-15><div flex=20 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=DATE></span></span> <span class=desc>{{check_calls.arrivedate | date:\\'dd-MMM-yyyy\\'}}</span></div><div flex=10 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=TIME></span></span> <span class=desc>{{check_calls.arrivetime| date:\\'hh:mm:ss a\\'}}</span></div><div flex=25 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=CITY></span></span> <span class=desc>{{check_calls.city}}</span></div><div flex=10 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=STATE></span></span> <span class=desc>{{check_calls.state}}</span></div><div flex=15 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=STATUS></span></span> <span class=desc>{{check_calls.status}}</span></div><div flex=20 flex-xs=100 class=\\\"m-b-xs padding-right-5\\\"><span class=\\\"text-upper heading\\\"><span translate=\\\"TRACKING TYPE\\\"></span></span> <span class=desc>{{check_calls.trackingtype}}</span></div></div><div class=\\\"padding-top-0 note-descriptions\\\"><span class=\\\"text-upper heading\\\">Note </span><!-- hm-limit=\\\"60\\\" --><hm-read-more ng-click=vm.verticalGreenLine() ng-if=check_calls.note hm-text={{check_calls.note}} hm-limit=60 hm-more-text=\\\"View More\\\" hm-less-text=\\\"View Less\\\" hm-dots-class=\\\"\\\" hm-link-class=\\\"read-more text-upper\\\"></hm-read-more><!--<p ng-if=\\\"check_calls.note\\\" class=\\\"margin-top-0\\\">{{check_calls.note}}</p>\\r\\n <a ng-if=\\\"check_calls.note\\\" ng-click=\\\"\\\" class=\\\"text-upper read-more\\\" translate=\\\"View More\\\" ></a>--></div></md-card-content></md-card><!-- Destination --><md-card id=\\\"location{{vm.data.destination_geocode.dest_lat.toString().replace(\\'.\\',\\'-\\')}}{{vm.data.destination_geocode.dest_lng.toString().replace(\\'.\\',\\'-\\')}}\\\" ng-attr-class=\\\"locationDetDiv destination_note display-block location10001 {{(vm.data.isdelivered)?\\'delivered\\':\\'\\'}}\\\" lat={{vm.data.destination_geocode.dest_lat}} lng={{vm.data.destination_geocode.dest_lng}}><div class=shipment_aljex_arrow_left></div><div class=shipment_aljex_arrow_left_black ng-if=!vm.data.isdelivered></div><!--<md-icon class=\\\"custom-marker-icons\\\" >  </md-icon>--> <img ng-attr-class=\\\"custom-marker-icons destination {{(vm.data.isdelivered)?\\'delivered\\':\\'\\'}}\\\" src=/assets/images/icons/shipment/showListView/icon-destination.png><md-card-content layout=column layout-gt-xs=row layout-align=\\\"space-between start\\\" layout-align-gt-xs=\\\"space-between {{(!vm.data.isdelivered)?\\'center\\':\\'start\\'}}\\\" class=check_calls_content><!--<span class=\\\"diaply-block\\\"> </span>--><div class=margin-top-0 layout=row flex=100 ng-if=!vm.data.isdelivered>Final Destination</div><div flex=100 flex-gt-xs=40 ng-if=vm.data.isdelivered class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>LAST MILESTONE</span><h4 class=\\\"margin-top-0 margin-bottom-0 shipment-lst-mile-name font-16\\\" style=font-weight:normal>{{vm.data.shipmentstatus | capitalize}}</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.isdelivered class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL DATE</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{ vm.data.deliverydate | date:\\'dd-MMM-yyyy\\' }}</h4></div><div flex=100 flex-gt-xs=30 ng-if=vm.data.isdelivered class=padding-right-5><span class=shipment-lst-mile-txt style=font-size:15px>ACTUAL TIME</span><h4 class=\\\"margin-top-0 margin-bottom-0 font-13\\\" style=font-weight:normal>{{ vm.data.deliverytime | date:\\'hh:mm a\\' }}</h4></div></md-card-content></md-card></td></tr></table></div><div id=jqueryShowListView><input type=checkbox style=display:none latlng=\\\"\\\" serial_no=\\\"\\\" ng-model=vm.showListViewJqueryCheckbox name=update_highlight_img_from_jquery class=update_highlight_img_from_jquery ng-change=vm.highlight_check_call_pt_jquery()></div><script>$(document).on(\\'click\\',\\'.gmailToolTip\\',function(){\\r\\n\\r\\n if($(\\'#checkPtsDetails\\').is(\\':visible\\')){\\r\\n\\r\\n scrollDivToHighlighted($(this));\\r\\n\\r\\n }else{\\r\\n\\r\\n $(\\'#showListViewCheckBox\\').click();\\r\\n scrollDivToHighlighted($(this));\\r\\n\\r\\n }\\r\\n\\r\\n });\\r\\n\\r\\n\\r\\n function scrollDivToHighlighted(thiss){\\r\\n\\r\\n var name = thiss.find(\\'.status\\').val();\\r\\n var serial_nos = thiss.find(\\'.serial_no\\').val();\\r\\n var latlng = thiss.find(\\'.latlng\\').val();\\r\\n\\r\\n $(\\'.update_highlight_img_from_jquery\\').val(latlng);\\r\\n $(\\'.update_highlight_img_from_jquery\\').attr(\\'serial_no\\',serial_nos);\\r\\n $(\\'.update_highlight_img_from_jquery\\').attr(\\'latlng\\',latlng);\\r\\n $(\\'.update_highlight_img_from_jquery\\').click();\\r\\n\\r\\n /*var element = document.getElementById(\\'location\\'+serial_nos);\\r\\n var container = document.getElementById(\\'checkPtsDetails\\');\\r\\n\\r\\n const offsetBottom = element.offsetTop;\\r\\n const scrollBottom = container.offsetHeight;\\r\\n\\r\\n //adding margin bottom height to element\\r\\n\\r\\n var total_div = $(\\'.locationDetDiv\\').length;\\r\\n\\r\\n var marginHeight = (total_div * 10) - scrollBottom;\\r\\n\\r\\n $(container).animate({\\r\\n scrollTop: (offsetBottom - marginHeight) - 240\\r\\n\\r\\n }, 1000);*/\\r\\n\\r\\n }</script>\");\n$templateCache.put(\"/app/shipping-details/shipping-details-csl/show-list-view/status_arrows.html\",\"<div layout-gt-sm=row layout-align-gt-sm=\\\"end center\\\" style=padding-right:45px><md-card flex=100 flex-gt-md=50 class=shipment_aljex_arrow_div1><div class=shipment_aljex_arrow_right1></div><md-card-content><div flex=100 class=shipment-lst-mile-txt style=font-size:14px>LAST MILESTONE</div><div flex=100 class=shipment-lst-mile-name>{{(vm.data.last_status_details[\\'status\\'])?(vm.data.last_status_details[\\'status\\'] | capitalize):\\'-\\'}}</div><div flex=100 layout=row style=\\\"font-size: 13px; color: #126b28\\\"><div style=min-width:90px>{{(vm.data.last_status_details[\\'actual_date\\'])?(vm.data.last_status_details[\\'actual_date\\'] | date : \\'dd-MMM-yyyy\\' :\\'UTC\\' ):\\'-\\'}}</div><div style=\\\"text-overflow: ellipsis;overflow: hidden;white-space: nowrap\\\">{{(vm.data.last_status_details[\\'actual_time\\'])?((vm.data.last_status_details[\\'actual_time\\'] | date : \\'hh:mm\\')):\\'-\\' }}</div></div></md-card-content></md-card><md-card class=shipment_aljex_arrow_div2 flex=100 flex-gt-md=50 ng-if=!vm.data.isdelivered><div class=shipment_aljex_arrow_right2></div><div class=shipment_aljex_arrow_right21></div><md-card-content><div flex=100 class=shipment-nxt-mile-txt style=\\\"color: #1FC06F; font-size:14px\\\">NEXT MILESTONE</div><div flex=100 class=shipment-lst-mile-name>{{(vm.data.next_status_details[\\'status\\'])?(vm.data.next_status_details[\\'status\\'] | capitalize):\\'-\\'}}</div><div flex=100 layout=row style=\\\"color: #908b92;font-size: 13px\\\"><div style=\\\"min-width:90px;font-weight: normal\\\">{{(vm.data.next_status_details[\\'estimated_date\\'])?(vm.data.next_status_details[\\'estimated_date\\'] | date : \\'dd-MMM-yyyy\\' :\\'UTC\\' ):\\'-\\'}}</div><div style=\\\"font-weight: normal;text-overflow: ellipsis;overflow: hidden;white-space: nowrap\\\">{{(vm.data.next_status_details[\\'estimated_time\\'])?((vm.data.next_status_details[\\'estimated_time\\'] | date : \\'hh:mm\\')) :\\'-\\' }}</div></div></md-card-content></md-card></div>\");\n$templateCache.put(\"/app/track-trace/action-board/customize-results/customize-results.html\",\"<style type=text/css>@media screen and (max-width: 768px) and (min-width: 320px){\\r\\n .font-css{\\r\\n font-size: 11px;\\r\\n }\\r\\n }</style><md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Customize Results Modal\\\" ng-controller=\\\"CustomizeResultsABController as customizeABCtrl\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><span hide-gt-xs show-xs hide-gt-xs>Customize Results</span><div layout=row hide-xs show-gt-xs flex=1><div flex=50 layout-margin><h2 translate=TRACKTRACE.ACTIVE_DATA></h2></div><div flex=50 layout-margin><h2 translate=TRACKTRACE.AVAILABLE_DATA></h2></div></div><span flex=auto hide-gt-xs show-xs></span><md-button class=md-icon-button ng-click=customizeABCtrl.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content><div><div layout-gt-xs=row><div flex-gt-xs=50 flex-xs=1 class=\\\"active-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Active Columns</h3><div class=sortable-container as-sortable=customizeABCtrl.dragListener() ng-model=customizeABCtrl.activeColumns ng-style=\\\"{ true: {height: customizeABCtrl.colHeight + \\'px\\'}, false: {height: (customizeABCtrl.colHeight + 76) +\\'px\\'}}[customizeABCtrl.activeColumns.length > 120]\\\"><md-card ng-repeat=\\\"column in customizeABCtrl.activeColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle><div layout=row flex=auto layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><span flex=auto translate={{column.title}}></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Remove Field\\\" ng-click=customizeABCtrl.remove(column)><span translate=TRACKTRACE.REMOVE_BUTT></span></md-button></div></md-card-content></md-card></div></div><div flex-gt-xs=50 flex-xs=1 class=\\\"available-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Available Columns</h3><div layout=row><md-input-container flex=\\\"{{customizeABCtrl.availableSearchField.length > 0 ? 90 : 100}}\\\" class=\\\"md-block error-hidden\\\" flex-gt-sm=auto><label translate=TRACKTRACE.SEARCH_COLUMNS></label><input type=text ng-model=customizeABCtrl.availableSearchField ng-change=customizeABCtrl.availableSearchChange() name=search aria-label=search></md-input-container><div flex=10 ng-if=\\\"customizeABCtrl.availableSearchField.length > 0\\\"><md-button class=\\\"md-icon-button btn-sm input-field-addon\\\" ng-click=customizeABCtrl.clickedAvailableSearchX()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><div class=sortable-container as-sortable=customizeABCtrl.dragListener() ng-model=customizeABCtrl.availableColumns ng-style=\\\"{ true: {height: customizeABCtrl.colHeight + \\'px\\'}, false: {height: (customizeABCtrl.colHeight + 76) +\\'px\\'}}[true]\\\"><md-card ng-repeat=\\\"column in customizeABCtrl.availableColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle ng-if=\\\"((column.field == \\'totalinvoiceamount\\' || column.field == \\'customerpartyid\\' ) ?((customizeABCtrl.is_consignee_user == \\'true\\')?false:(!customizeABCtrl.hasFinancialPermissions)?false:true):true)\\\"><div layout=row flex=auto layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><span flex=auto translate={{column.title}}></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Add Column\\\" ng-click=customizeABCtrl.add(column)><span translate=TRACKTRACE.ADD_BUTT></span></md-button></div></md-card-content></md-card></div></div></div></div></md-dialog-content><md-dialog-actions layout=row class=dialog-footer-border><md-button aria-label=\\\"Cancel Customization\\\" ng-click=customizeABCtrl.cancel() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button aria-label=\\\"Save As Default\\\" ng-click=customizeABCtrl.saveToDefault()><span class=font-css translate=TRACKTRACE.SAVE_DEFAULT_CRITERIA></span></md-button><md-button aria-label=\\\"Load Default Criteria\\\" ng-click=customizeABCtrl.restoreDefault()><span class=font-css translate=TRACKTRACE.RESTORE_DEFAULT_CRITERIA></span></md-button><md-button class=\\\"md-raised md-accent\\\" aria-label=\\\"Submit Customization\\\" ng-click=customizeABCtrl.submit()><span translate=TRACKTRACE.SUBMIT></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/track-trace/action-board/server-table/filterDate.html\",\"<mdp-date-picker mdp-format=MM/DD/YYYY ng-model=vm.filters[name] ng-change=vm.filterDate(name) class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-date-picker>\");\n$templateCache.put(\"/app/track-trace/action-board/server-table/filterDefault.html\",\"<md-input-container class=error-hidden><input type=text aria-label={{name}} name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] ng-change=vm.updateFilteredCounts() ng-minlength=3 class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container>\");\n$templateCache.put(\"/app/track-trace/action-board/server-table/filterHeader.html\",\"<tr ng-show=show_filter class=ng-table-filters><th data-title-text=\\\"{{$column.titleAlt(this) || $column.title(this)}}\\\" ng-repeat=\\\"$column in $columns\\\" ng-if=$column.show(this) class=\\\"filter {{$column.class(this)}}\\\"><div ng-repeat=\\\"(name, filter) in $column.filter(this)\\\"><div ng-include=config.getTemplateUrl(filter)></div></div></th></tr>\");\n$templateCache.put(\"/app/track-trace/action-board/server-table/filterStatus.html\",\"<md-input-container class=md-block><md-select ng-model=params.filter()[name] name={{name}} aria-label={{name}} ng-change=vm.updateFilteredCounts() ng-disabled=$filterRow.disabled md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() aria-label={{name}}><md-option ng-value=null>—</md-option><md-option ng-value=true>Delivered</md-option><md-option ng-value=false>Undelivered</md-option><md-option ng-value=N/A>Not Available</md-option></md-select></md-input-container>\");\n$templateCache.put(\"/app/track-trace/action-board/server-table/header.html\",\"<ng-table-sorter-row-action-board></ng-table-sorter-row-action-board><ng-table-filter-row-cview></ng-table-filter-row-cview>\");\n$templateCache.put(\"/app/track-trace/action-board/server-table/pagination.html\",\"<!-- <div class=\\\"ng-table-pager m-t-sm ng-scope\\\" ng-if=\\\"params.data.length\\\" ng-controller=\\\"ServerTableABController as vm\\\"> \\r\\n\t<div layout-gt-xs=\\\"row\\\" layout-xs=\\\"column\\\">\\r\\n\t\t<div>\\r\\n\t\t\t<ul ng-if=\\\"pages.length\\\" class=\\\"pagination ng-table-pagination ng-scope\\\">\\r\\n\t\t\t\t<li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=\\\"page.type\\\" class=\\\"ng-scope disabled\\\">\\r\\n\t\t\t\t\t<a ng-switch-when=\\\"prev\\\" ng-click=\\\"params.page(page.number);vm.checkSelectedInput()\\\" href=\\\"\\\" class=\\\"ng-scope\\\">«</a>\\r\\n\t\t\t\t</li>\\r\\n\t\t\t\t<li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=\\\"page.type\\\" class=\\\"ng-scope\\\">\\r\\n\t\t\t\t\t<a ng-switch-when=\\\"first\\\" ng-click=\\\"params.page(page.number);vm.checkSelectedInput()\\\" href=\\\"\\\" class=\\\"ng-scope\\\">\\r\\n\t\t\t\t\t\t<span ng-bind=\\\"page.number\\\" class=\\\"ng-binding\\\">1</span>\\r\\n\t\t\t\t\t</a>\\r\\n\t\t\t\t</li>\\r\\n\t\t\t\t<li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=\\\"page.type\\\" class=\\\"ng-scope\\\">\\r\\n\t\t\t\t\t<a ng-switch-when=\\\"page\\\" ng-click=\\\"params.page(page.number);vm.checkSelectedInput()\\\" href=\\\"\\\" class=\\\"ng-scope\\\">\\r\\n\t\t\t\t\t\t<span ng-bind=\\\"page.number\\\" class=\\\"ng-binding\\\">2</span>\\r\\n\t\t\t\t\t</a>\\r\\n\t\t\t\t</li>\\r\\n\t\t\t\t<li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=\\\"page.type\\\" class=\\\"ng-scope\\\">\\r\\n\t\t\t\t\t<a ng-switch-when=\\\"last\\\" ng-click=\\\"params.page(page.number);vm.checkSelectedInput()\\\" href=\\\"\\\" class=\\\"ng-scope\\\"><span ng-bind=\\\"page.number\\\" class=\\\"ng-binding\\\">3</span></a>\\r\\n\t\t\t\t</li>\\r\\n\t\t\t\t<li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=\\\"page.type\\\" class=\\\"ng-scope\\\">\\r\\n\t\t\t\t\t<a ng-switch-when=\\\"next\\\" ng-click=\\\"params.page(page.number);vm.checkSelectedInput()\\\" href=\\\"\\\" class=\\\"ng-scope\\\">»</a>\\r\\n\t\t\t\t</li>\\r\\n\t\t\t</ul>\\r\\n\t\t</div>\\r\\n\t\t<span flex></span>\\r\\n\t\t<div ng-if=\\\"params.settings().counts.length\\\" class=\\\"ng-table-counts btn-group pull-right ng-scope\\\">\\r\\n\t\t\t<div>\\r\\n\t\t\t\t<md-button \\r\\n\t\t\t\t\tng-repeat=\\\"count in params.settings().counts\\\"\\r\\n\t\t\t\t\tng-class=\\\"{\\'md-primary\\':params.count()==count}\\\"\\r\\n\t\t\t\t\tng-click=\\\"params.count(count)\\\"\\r\\n\t\t\t\t\taria-label=\\\"Results Per Page\\\"\\r\\n\t\t\t\t\tclass=\\\"md-raised md-default\\\">\\r\\n\t\t\t\t\t<span ng-bind=\\\"count\\\" class=\\\"ng-binding\\\"></span>\\r\\n\t\t\t\t</md-button>\\r\\n\t\t\t</div>\\r\\n\t\t\t<span class=\\\"md-caption\\\">Records per page</span>\\r\\n\t\t</div>\\r\\n\t</div>\\r\\n</div> -->\");\n$templateCache.put(\"/app/track-trace/action-board/server-table/server-table.html\",\"<style>.serverReqTable{\\r\\n width: 100%;\\r\\n margin-bottom: 15px;\\r\\n\\r\\n }\\r\\n table.ng-table + div[ng-table-pagination]{\\r\\n display: none;\\r\\n }</style><div ng-controller=\\\"ServerTableABController as vm\\\" class=table-scroll><div class=loadmask-light><table ng-table-dynamic=\\\"tabledata with vm.columns\\\" template-header=/app/track-trace/action-board/server-table/header.html class=\\\"card-table serverReqTable\\\" show-filter=actionBoardCtrl.filtersVisible><tbody><tr ng-repeat=\\\"row in $data\\\"><td ng-repeat=\\\"col in $columns\\\" ng-if=col.field><span class=hoverable ng-if=\\\"col.field == \\'flag\\'\\\"><div ng-repeat=\\\"exc in row.exceptions track by $index\\\"><md-icon ng-if=\\\"row.exceptions[$index] == \\'current_exception\\'\\\" class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\" ng-mouseover=vm.getException(row.gshpid)></md-icon><md-icon ng-if=\\\"row.exceptions[$index] == \\'potential_exception\\'\\\" class=potential-exception title=\\\"potential exception\\\" aria-label=\\\"potential exception\\\" ng-mouseover=vm.getPotentialException(row.gshpid)></md-icon><md-tooltip ng-if=\\\"row.exceptions[$index] == \\'current_exception\\'\\\" md-direction=right><md-progress-circular md-mode=indeterminate class=\\\"md-warn md-hue-2\\\" ng-show=vm.tooltipIsLoading></md-progress-circular><p ng-show=!vm.tooltipIsLoading>Current Exception: <span>{{vm.response.code}}</span></p><p ng-show=!vm.tooltipIsLoading>Description: <span>{{vm.response.description}}</span></p></md-tooltip><md-tooltip ng-if=\\\"row.exceptions[$index] == \\'potential_exception\\'\\\" md-direction=right><md-progress-circular md-mode=indeterminate class=tracktracetooltip ng-show=vm.tooltipIsLoading></md-progress-circular><p ng-show=!vm.tooltipIsLoading>Current Potential Exception: <span>{{vm.response.title}}</span></p><p ng-show=!vm.tooltipIsLoading>Description: <span>{{vm.response.description}}</span></p></md-tooltip></div></span><span ng-if=\\\"col.field != \\'flag\\' && col.field == \\'shipment_references\\'\\\"><a>{{vm.getShipmentReferences(row[col.field])}} </a></span><span ng-if=\\\"col.field != \\'flag\\' && col.field != \\'shipment_references\\'\\\"><a target=_blank ng-href=/shipping-details/{{row.gshpid}} ng-if=\\\"col.field ==\\'isdelivered\\' && row[\\'isbooked\\']\\\" class=\\\"text-strong text-success\\\">{{row[col.field] == \\'true\\' ? \\'Delivered\\' : vm.checkStatus(row)}} Booked </a><a target=_blank ng-href=/shipping-details/{{row.gshpid}} ng-if=\\\"col.field == \\'isdelivered\\' && !row[\\'isbooked\\'] && col.field != \\'shipment_references\\'\\\" class=\\\"{{(row[col.field] == \\'true\\' || row[col.field] == \\'booking\\') ? \\'\\' : \\'text-strong text-success\\' }}\\\">{{row[col.field] == \\'true\\' ? \\'Delivered\\' : vm.checkStatus(row)}} </a><a target=_blank ng-href=/shipping-details/{{row.gshpid}} class={{col.link_class}} ng-if=\\\"col.field != \\'isdelivered\\' && col.field != \\'destination\\' && col.field != \\'origin\\' && col.field != \\'shipment_references\\'\\\">{{col.isDate ? (row[col.field] | date:\\'dd-MMM-yyyy\\') : row[col.field]}} </a><a target=_blank ng-href=/shipping-details/{{row.gshpid}} ng-if=\\\"col.field == \\'origin\\'\\\">{{col.origin = row.origin != null ? (row.origin + \\\", \\\" + (row.originstate || row.origincountrycode)) : \\'\\' }} </a><a target=_blank ng-href=/shipping-details/{{row.gshpid}} ng-if=\\\"col.field == \\'destination\\'\\\">{{col.destination = row.destination != null ? (row.destination + \\\", \\\" + (row.destinationstate || row.destinationcountrycode)) : \\'\\'}}</a></span></td></tr><tr ng-show=\\\"vm.noResults && !vm.isError\\\"><td colspan=100% style=\\\"text-align: center\\\" id=isResults><span translate=TRACKTRACE.NORESULTS></span></td></tr><tr ng-show=vm.isError><td colspan=100% style=\\\"text-align: center\\\" id=timedOut><span translate={{vm.error}}></span></td></tr><tr ng-show=vm.noDataResults style=margin-bottom:20px><td colspan=100% style=\\\"text-align: center\\\" id=timedOut><span>No Record Found</span></td></tr></tbody></table></div></div>\");\n$templateCache.put(\"/app/track-trace/action-board/server-table/sorterHeader.html\",\"<tr class=ng-table-sort-header><!-- Table Header --><th title={{$column.headerTitle(this)}} ng-repeat=\\\"$column in $columns\\\" ng-class=\\\"{ \\'sortable\\': $column.sortable(this),\\r\\n \\'sort-asc\\': params.sorting()[$column.sortable(this)]==\\'asc\\',\\r\\n \\'sort-desc\\': params.sorting()[$column.sortable(this)]==\\'desc\\'\\r\\n }\\\" ng-init=\\\"template = $column.headerTemplateURL(this)\\\" ng-if=$column.title(this) class={{$column.class(this)}} filter=\\\"{ age: \\'/app/track-trace/action-board/server-table/filterHeader.html\\' }\\\"><div ng-if=!template><div ng-if=$column.static class=ng-table-header id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><input style=cursor:pointer;vertical-align:middle ng-click=vm.checkAll(vm.selectAll) ng-if=$column.checkbox type=checkbox ng-model=vm.selectAll> <span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : sortBy($column, $event)\\\"></span></span></div><div ng-if=!$column.static class=ng-table-header resizable r-directions=\\\"[\\'right\\']\\\" id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : sortBy($column, $event)\\\"></span></span></div></div><!-- <div ng-if=\\\"template\\\" ng-include=\\\"template\\\">\\r\\n </div> --></th></tr>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/customize-results/customize-results-cfs.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Customize Results Modal\\\" ng-controller=\\\"CustomizeResultsCfsController as customizeCfsCtrl\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><span hide-gt-xs show-xs hide-gt-xs>Customize Results</span><div layout=row hide-xs show-gt-xs flex=1><div flex=50 layout-margin><h2 translate=TRACKTRACE.ACTIVE_DATA></h2></div><div flex=50 layout-margin><h2 translate=TRACKTRACE.AVAILABLE_DATA></h2></div></div><span flex=auto hide-gt-xs show-xs></span><md-button class=md-icon-button ng-click=customizeCfsCtrl.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content><div><div layout-gt-xs=row><div flex-gt-xs=50 flex-xs=1 class=\\\"active-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Active Columns</h3><!--<div layout=\\\"row\\\" ng-if=\\\"customizeCfsCtrl.activeColumns.length > 11 || customizeCfsCtrl.activeSearchField.length > 0\\\">\\r\\n <md-input-container flex=\\'90\\' class=\\\"md-block error-hidden\\\" flex-gt-sm=\\\"auto\\\">\\r\\n <label>{{\\'TRACKTRACE.SEARCH_ACTIVE_COLUMNS\\' | translate}}</label>\\r\\n <input type=\\\"text\\\"\\r\\n ng-model=\\\"customizeCfsCtrl.activeSearchField\\\"\\r\\n ng-change=\\\"customizeCfsCtrl.activeSearchChange()\\\"\\r\\n name=\\\"search\\\" />\\r\\n </md-input-container>\\r\\n <div flex=\\'10\\'>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"customizeCfsCtrl.clickedActiveSearchX()\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n </div>--><div class=sortable-container as-sortable=customizeCfsCtrl.dragListener() ng-model=customizeCfsCtrl.activeColumns ng-style=\\\"{ true: {height: customizeCfsCtrl.colHeight + \\'px\\'}, false: {height: (customizeCfsCtrl.colHeight + 76) +\\'px\\'}}[customizeCfsCtrl.activeColumns.length > 120]\\\"><md-card ng-repeat=\\\"column in customizeCfsCtrl.activeColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle><div layout=row flex=auto layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><!--<span flex=\\\"auto\\\" translate=\\\"{{column.title}}\\\"></span>--> <span flex=auto ng-bind-html=\\\"(column.title | translate).replace(\\'<br>\\',\\'\\')\\\"></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Remove Field\\\" ng-click=customizeCfsCtrl.remove(column)><span translate=TRACKTRACE.REMOVE_BUTT></span></md-button></div></md-card-content></md-card></div></div><div flex-gt-xs=50 flex-xs=1 class=\\\"available-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Available Columns</h3><div layout=row><md-input-container flex=\\\"{{customizeCfsCtrl.availableSearchField.length > 0 ? 90 : 100}}\\\" class=\\\"md-block error-hidden\\\" flex-gt-sm=auto><label translate=TRACKTRACE.SEARCH_COLUMNS></label><input type=text ng-model=customizeCfsCtrl.availableSearchField ng-change=customizeCfsCtrl.availableSearchChange() name=search></md-input-container><div flex=10 ng-if=\\\"customizeCfsCtrl.availableSearchField.length > 0\\\"><md-button class=\\\"md-icon-button btn-sm input-field-addon\\\" ng-click=customizeCfsCtrl.clickedAvailableSearchX()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><div class=sortable-container as-sortable=customizeCfsCtrl.dragListener() ng-model=customizeCfsCtrl.availableColumns ng-style=\\\"{ true: {height: customizeCfsCtrl.colHeight + \\'px\\'}, false: {height: (customizeCfsCtrl.colHeight + 76) +\\'px\\'}}[true]\\\"><md-card ng-repeat=\\\"column in customizeCfsCtrl.availableColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle ng-if=\\\"customizeCfsCtrl.hasFinancialPermissions && column.field == \\'totalinvoiceamount\\' || column.field != \\'totalinvoiceamount\\'\\\"><div layout=row flex=auto layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><!--<span flex=\\\"auto\\\" translate=\\\"{{column.title}}\\\"></span>--> <span flex=auto ng-bind-html=\\\"(column.title | translate).replace(\\'<br>\\',\\'\\')\\\"></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Add Column\\\" ng-click=customizeCfsCtrl.add(column)><span translate=TRACKTRACE.ADD_BUTT></span></md-button></div></md-card-content></md-card></div></div></div></div></md-dialog-content><md-dialog-actions layout=row class=dialog-footer-border><md-button aria-label=\\\"Cancel Customization\\\" ng-click=customizeCfsCtrl.cancel() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button aria-label=\\\"Save As Default\\\" ng-click=customizeCfsCtrl.saveToDefault()><span translate=TRACKTRACE.SAVE_DEFAULT_CRITERIA></span></md-button><md-button aria-label=\\\"Load Default Criteria\\\" ng-click=customizeCfsCtrl.restoreDefault()><span translate=TRACKTRACE.RESTORE_DEFAULT_CRITERIA></span></md-button><md-button class=\\\"md-raised md-accent\\\" aria-label=\\\"Submit Customization\\\" ng-click=customizeCfsCtrl.submit()><span translate=TRACKTRACE.SUBMIT></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/exports/export-csv.html\",\"<md-dialog class=export-csv aria-label=\\\"Export CSV\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><h2 translate=\\\"{{exportCsvLoaded ? \\'TRACKTRACE.EXPORT\\' : \\'TRACKTRACE.EXPORTING\\'}}\\\"></h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content flex-fill flex=auto style=\\\"min-height: 120px\\\"><div class=loadmask-light loadmask=exportCsvLoaded ng-if=!exportCsvLoaded style=position:absolute;top:52px;left:0;right:0;bottom:0></div><div class=md-dialog-content ng-show=exportCsvLoaded><p><span translate=TRACKTRACE.EXPORT_LINE_1 style=\\\"color: #ffffff\\\"></span></p><p><span translate=TRACKTRACE.EXPORT_LINE_2 style=\\\"color: #ffffff\\\"></span></p></div></md-dialog-content><md-dialog-actions layout=row ng-show=exportCsvLoaded><md-button ng-click=closeDialog() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" ng-click=exportCustom()><span translate=TRACKTRACE.EXPORT_CUSTOM></span></md-button><md-button class=\\\"md-raised md-accent\\\" ng-click=exportAll()><span translate=TRACKTRACE.EXPORT_ALL></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/exports/no-results.html\",\"<md-dialog class=\\\"export-csv md-card-light\\\" aria-label=\\\"Export CSV\\\" ng-cloak><md-toolbar><div class=md-toolbar-tools><h2 translate=TRACKTRACE.EXPORT></h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding><p><span translate=TRACKTRACE.NORESULTS style=\\\"color: #ffffff\\\"></span></p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"end center\\\"><md-button class=md-raised ng-click=closeDialog()><span translate=TRACKTRACE.CANCEL></span></md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/quick-search/quick-search.html\",\"<style>.state_dropdown{\\r\\n margin:0px;\\r\\n box-sizing:border-box;\\r\\n }\\r\\n\\r\\n .state_dropdown label{\\r\\n display:none;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete{\\r\\n padding: 0px;\\r\\n margin:0px;\\r\\n height: 68px;\\r\\n background-color: #fff;\\r\\n width: 100%;\\r\\n box-sizing:border-box;\\r\\n z-index:0;\\r\\n border-radius:0px;\\r\\n margin-top: -2px;\\r\\n margin-left: -2px;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete-wrap{\\r\\n padding: 0px;\\r\\n height: 68px;\\r\\n padding: 1.3rem;\\r\\n width: 100%;\\r\\n box-sizing:border-box;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete-wrap button{\\r\\n display:none;\\r\\n }\\r\\n\\r\\n .state_dropdown input[type=\\'search\\']{\\r\\n border-bottom: 0px !important;\\r\\n }\\r\\n \\r\\n .light-form md-input-container .md-input:not([disabled]), .light-form md-select md-select-value{\\r\\n color: rgb(117,117,117) !important;\\r\\n }</style><form id=quick_search_form ng-submit=trackTraceCfsCtrl.quickSearch(trackTraceCfsCtrl.queryVal)><div layout-gt-xs=row layout-xs=column class=\\\"search-group {{trackTraceCfsCtrl.aljexSearchType == \\'pickupapptdate\\' || trackTraceCfsCtrl.aljexSearchType == \\'consigneeapptdate\\' ? \\'col-tablet-sm\\' : \\'\\'}}\\\"><div><!-- Search Options Menu --><md-menu md-position-mode=\\\"target target\\\" md-offset=\\\"0 60\\\"><md-button aria-label=\\\"Open demo menu\\\" class=\\\"md-raised search-type md-accent\\\" ng-click=$mdOpenMenu($event) layout-gt-xs=row><span ng-if=\\\"trackTraceCfsCtrl.aljexSearchType == \\'shipment_status\\'\\\"><span class=responsive-ellipsis translate=Status></span> </span><span ng-if=\\\"trackTraceCfsCtrl.aljexSearchType == \\'deliverydate\\'\\\"><span class=responsive-ellipsis translate=\\\"DELIVERY DATE\\\"></span> </span><span ng-if=\\\"trackTraceCfsCtrl.aljexSearchType == \\'reference\\'\\\"><span class=responsive-ellipsis translate=\\\"REF #\\\"></span> </span><span ng-if=\\\"trackTraceCfsCtrl.aljexSearchType == \\'pro\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.PRO></span> </span><span ng-if=\\\"trackTraceCfsCtrl.aljexSearchType == \\'pickupapptdate\\'\\\"><span class=responsive-ellipsis translate=\\\"PICK UP APPT DATE\\\"></span> </span><span ng-if=\\\"trackTraceCfsCtrl.aljexSearchType == \\'consigneeapptdate\\'\\\"><span class=responsive-ellipsis translate=\\\"C/NEE APPT DATE\\\"></span> </span><span ng-if=\\\"trackTraceCfsCtrl.aljexSearchType == \\'originstate\\'\\\"><span class=responsive-ellipsis translate=\\\"Pickup City / State\\\"></span> </span><span ng-if=\\\"trackTraceCfsCtrl.aljexSearchType == \\'destinationstate\\'\\\"><span class=responsive-ellipsis translate=\\\"Delivery City / State\\\"></span></span><md-icon></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"trackTraceCfsCtrl.aljexSearchChange(\\'shipment_status\\');\\\"><div layout=row><p flex=auto><span translate=STATUS></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Pickup Appointment Date\\\" ng-click=\\\"trackTraceCfsCtrl.aljexSearchChange(\\'deliverydate\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"DELIVERY DATE\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-click=\\\"trackTraceCfsCtrl.aljexSearchChange(\\'reference\\');\\\"><div layout=row><p flex=auto><span translate=\\\"REF #\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By PRO #\\\" ng-click=\\\"trackTraceCfsCtrl.aljexSearchChange(\\'pro\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.PRO></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Pickup Appointment Date\\\" ng-click=\\\"trackTraceCfsCtrl.aljexSearchChange(\\'pickupapptdate\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"PICK UP APPT DATE\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Consignee Appointment Date\\\" ng-click=\\\"trackTraceCfsCtrl.aljexSearchChange(\\'consigneeapptdate\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"C/NEE APPT DATE\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Pickup State\\\" ng-click=\\\"trackTraceCfsCtrl.aljexSearchChange(\\'originstate\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"PICKUP CITY / STATE\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Delivery State\\\" ng-click=\\\"trackTraceCfsCtrl.aljexSearchChange(\\'destinationstate\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"DELIVERY CITY / STATE\\\"></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div><div flex=auto class=light-form><!-- Search Field --><div ng-show=\\\"trackTraceCfsCtrl.aljexSearchType == \\'reference\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCfsCtrl.queryVal name=query maxlength=18 aria-label=\\\"Search By Reference Number\\\" placeholder=\\\"Search by {{\\'TRACKTRACE.REFERENCE_NUM\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- PRO --><div ng-show=\\\"trackTraceCfsCtrl.aljexSearchType == \\'pro\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCfsCtrl.queryVal name=query maxlength=7 placeholder=\\\"Search by {{\\'TRACKTRACE.PRO\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- STATUS --><div ng-show=\\\"trackTraceCfsCtrl.aljexSearchType == \\'shipment_status\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><md-select ng-model=trackTraceCfsCtrl.queryVal ng-change=\\\"\\\" class=clear-fields placeholder=\\\"select a status\\\" md-on-open=trackTraceCfsCtrl.onSelectOpen() md-on-close=trackTraceCfsCtrl.onSelectClose()><md-option ng-repeat=\\\"status_list in trackTraceCfsCtrl.statusOptionsVar.status_options\\\">{{status_list}}</md-option></md-select></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Pickup App Date --><div ng-show=\\\"trackTraceCfsCtrl.aljexSearchType == \\'pickupapptdate\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCfsCtrl.aljexMinDate mdp-placeholder=\\\"From Pickup Appointment Date\\\" ng-change=trackTraceCfsCtrl.dateChanged() ng-model=trackTraceCfsCtrl.pickupapptdate_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCfsCtrl.aljexMinDate mdp-placeholder=\\\"To Pickup Appointment Date\\\" ng-change=trackTraceCfsCtrl.dateChanged() ng-model=trackTraceCfsCtrl.pickupapptdate_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCfsCtrl.pickupDateRangeSelect ng-change=trackTraceCfsCtrl.selectRange() placeholder=\\\"or select a range\\\" md-on-open=trackTraceCfsCtrl.onSelectOpen() md-on-close=trackTraceCfsCtrl.onSelectClose() aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCfsCtrl.aljexRanges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Pickup App Date --><div ng-show=\\\"trackTraceCfsCtrl.aljexSearchType == \\'deliverydate\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCfsCtrl.aljexMinDate mdp-placeholder=\\\"From Delivery Date\\\" ng-change=trackTraceCfsCtrl.dateChanged() ng-model=trackTraceCfsCtrl.deliverydate_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCfsCtrl.aljexMinDate mdp-placeholder=\\\"To Delivery Date\\\" ng-change=trackTraceCfsCtrl.dateChanged() ng-model=trackTraceCfsCtrl.deliverydate_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCfsCtrl.deliveryDateRangeSelect ng-change=trackTraceCfsCtrl.selectRange() placeholder=\\\"or select a range\\\" md-on-open=trackTraceCfsCtrl.onSelectOpen() md-on-close=trackTraceCfsCtrl.onSelectClose()><md-option ng-repeat=\\\"range in trackTraceCfsCtrl.aljexRanges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Consignee App Date --><div ng-show=\\\"trackTraceCfsCtrl.aljexSearchType == \\'consigneeapptdate\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><mdp-date-picker mdp-min-date=trackTraceCfsCtrl.aljexMinDate mdp-placeholder=\\\"From Consignee Appointment Date\\\" ng-change=trackTraceCfsCtrl.dateChanged() ng-model=trackTraceCfsCtrl.consigneeapptdate_start_date></mdp-date-picker></div><div flex-gt-xs=31><mdp-date-picker mdp-min-date=trackTraceCfsCtrl.aljexMinDate mdp-placeholder=\\\"To Consignee Appointment Date\\\" ng-change=trackTraceCfsCtrl.dateChanged() ng-model=trackTraceCfsCtrl.consigneeapptdate_end_date></mdp-date-picker></div><div flex-gt-xs=31><md-select ng-model=trackTraceCfsCtrl.consigneeDateRangeSelect ng-change=trackTraceCfsCtrl.selectRange() placeholder=\\\"or select a range\\\" md-on-open=trackTraceCfsCtrl.onSelectOpen() md-on-close=trackTraceCfsCtrl.onSelectClose() aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCfsCtrl.aljexRanges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- OriginState --><div ng-show=\\\"trackTraceCfsCtrl.aljexSearchType == \\'originstate\\'\\\" class=date-search><div layout-gt-xs=row><div flex-gt-xs=93><!--<input ng-model=\\\"query\\\" name=\\\"query\\\" placeholder=\\\"Search by {{\\'TRACKTRACE.ORIGIN_CITYSTATE\\' | translate}}\\\" class=\\\"form-control\\\">--><md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\"><md-autocomplete md-no-cache=false md-selected-item=trackTraceCfsCtrl.selectedItem md-search-text-change=\\\"\\\" md-search-text=trackTraceCfsCtrl.searchOriginText md-items=\\\"item in trackTraceCfsCtrl.getMatch(trackTraceCfsCtrl.searchOriginText)\\\" md-item-text=item placeholder=\\\"Enter pickup city / state\\\"><md-item-template><span md-highlight-text=trackTraceCfsCtrl.searchOriginText md-highlight-flags=^i>{{item}}</span></md-item-template><md-not-found>No city/states matching \\\"{{trackTraceCfsCtrl.searchOriginText}}\\\" were found.</md-not-found></md-autocomplete></md-input-container></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- DestinationState --><div ng-show=\\\"trackTraceCfsCtrl.aljexSearchType == \\'destinationstate\\'\\\" class=date-search><div layout-gt-xs=row><div flex-gt-xs=93><!--<input ng-model=\\\"query\\\"\\r\\n name=\\\"query\\\"\\r\\n placeholder=\\\"Search by {{\\'TRACKTRACE.DESTINATION_CITYSTATE\\' | translate}}\\\"\\r\\n class=\\\"form-control\\\">--><md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\"><md-autocomplete md-no-cache=false md-selected-item=trackTraceCfsCtrl.selectedItem md-search-text-change=\\\"\\\" md-search-text=trackTraceCfsCtrl.searchDestinationText md-items=\\\"item in trackTraceCfsCtrl.getMatch(trackTraceCfsCtrl.searchDestinationText)\\\" md-item-text=item placeholder=\\\"Enter delivery city / state\\\"><md-item-template><span md-highlight-text=trackTraceCfsCtrl.searchDestinationText md-highlight-flags=^i>{{item}}</span></md-item-template><md-not-found>No city/states matching \\\"{{trackTraceCfsCtrl.searchDestinationText}}\\\" were found.</md-not-found></md-autocomplete></md-input-container></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div></div></div></form>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/server-table/filterDate.html\",\"<mdp-date-picker ng-model=vm.filters[name] ng-change=vm.filterDate(name) class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-date-picker>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/server-table/filterDefault.html\",\"<md-input-container class=error-hidden><input type=text name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" ng-minlength=3 class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/server-table/filterHeader.html\",\"<tr ng-show=show_filter class=ng-table-filters><th data-title-text=\\\"{{$column.titleAlt(this) || $column.title(this)}}\\\" ng-repeat=\\\"$column in $columns\\\" ng-if=$column.show(this) class=\\\"filter {{$column.class(this)}}\\\"><div ng-repeat=\\\"(name, filter) in $column.filter(this)\\\"><div ng-include=config.getTemplateUrl(filter)></div></div></th></tr>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/server-table/filterMilestone.html\",\"<md-input-container class=md-block><md-select ng-model=params.filter()[name] id=params.filter()[name] name={{name}} ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" ng-disabled=$filterRow.disabled md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() aria-label={{name}}><md-option ng-value=null>—</md-option><md-option ng-value=0>Open</md-option><md-option ng-value=1><!-- ng-value used to set true or false which ng-table needs --> Covered</md-option><md-option ng-value=2>Pickup</md-option><md-option ng-value=3>Dispatched</md-option><md-option ng-value=4>Loaded</md-option><md-option ng-value=5>Consignee</md-option><md-option ng-value=6>Delivered</md-option></md-select></md-input-container>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/server-table/filterStatus.html\",\"<md-input-container class=md-block><md-select ng-model=params.filter()[name] id=params.filter()[name] name={{name}} ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" ng-disabled=$filterRow.disabled md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() aria-label={{name}}><md-option ng-value=null>—</md-option><!--<md-option ng-value=\\\"0\\\">\\r\\n Delivered\\r\\n </md-option>\\r\\n <md-option ng-value=\\\"1\\\">\\r\\n Undelivered\\r\\n </md-option>\\r\\n <md-option ng-value=\\\"\\'n/a\\'\\\">\\r\\n N/A\\r\\n </md-option>\\r\\n <md-option ng-value=\\\"8\\\">\\r\\n Released\\r\\n </md-option>--><md-option ng-repeat=\\\"status_list in trackTraceCfsCtrl.statusOptionsVar.status_options\\\">{{status_list}}</md-option></md-select></md-input-container>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/server-table/filterTime.html\",\"<mdp-time-picker ng-model=vm.filters[name] ng-change=vm.filterTime(name) class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-time-picker>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/server-table/header.html\",\"<ng-table-sorter-aljex-row-server-table></ng-table-sorter-aljex-row-server-table><!--<ng-table-filter-row-aljex-cview></ng-table-filter-row-aljex-cview>--><ng-table-filter-row-cview></ng-table-filter-row-cview>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/server-table/pagination.html\",\"<div class=\\\"ng-table-pager m-t-sm ng-scope\\\" ng-if=params.data.length ng-controller=\\\"ServerTableCfsController as vm\\\"><div layout-gt-xs=row layout-xs=column><div><ul ng-if=pages.length data-ng-init=params.total(100) class=\\\"pagination ng-table-pagination ng-scope\\\"><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=\\\"ng-scope disabled\\\"><a ng-switch-when=prev ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope>«</a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=first ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>1</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=page ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>2</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=last ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>3</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=next ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope>»</a></li></ul></div><span flex></span><div ng-if=params.settings().counts.length class=\\\"ng-table-counts btn-group pull-right ng-scope\\\"><div><md-button ng-repeat=\\\"count in params.settings().counts\\\" ng-class=\\\"{\\'md-primary\\':params.count()==count}\\\" ng-click=vm.aljex_per_page(count);params.count(count) aria-label=\\\"Results Per Page\\\" class=\\\"md-raised md-default\\\"><span ng-bind=count class=ng-binding></span></md-button></div><span class=md-caption>Records per page</span></div></div></div>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/server-table/server-table.html\",\"<style>.status_col img{\\r\\n vertical-align: middle; margin-right:10px; display:inline;\\r\\n}\\r\\n\\r\\n.status_col .hover_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .default_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .hover_img{\\r\\n display:inline;\\r\\n}</style><div ng-controller=\\\"ServerTableCfsController as vm\\\" class=table-scroll ng-style=\\\"(vm.noResults || vm.isError) ? {\\'overflow-x\\':\\'hidden\\'} : {}\\\"><div class=loadmask-light loadmask=!vm.isLoading><table style=\\\"width: 100%\\\" ng-table-dynamic=\\\"vm.tableParams with vm.columns\\\" template-header=/app/track-trace/track-trace-cfs/server-table/header.html template-pagination=/app/track-trace/track-trace-cfs/server-table/pagination.html class=card-table show-filter=trackTraceCfsCtrl.filtersVisible><tbody><tr ng-repeat=\\\"row in $data\\\"><td ng-repeat=\\\"col in $columns\\\" ng-if=col.field><span class=hoverable ng-if=\\\"col.field == \\'flag\\'\\\"><md-icon ng-show=row.exceptions.length class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\" ng-mouseover=vm.getException(row.exceptions)></md-icon><md-tooltip md-direction=right><md-progress-circular md-mode=indeterminate class=\\\"md-warn md-hue-2\\\" ng-show=vm.tooltipIsLoading></md-progress-circular><div ng-show=!vm.tooltipIsLoading ng-repeat=\\\"exception in row.exceptions\\\"><p>Current Exception: <span>{{exception.pointname}}</span></p><p>Date / Time Created: <span>{{exception.created_at | date:\\'dd-MMM-yyyy\\'}}     {{exception.created_at | date:\\'hh:mm\\'}}</span></p></div></md-tooltip></span><span ng-if=\\\"col.field != \\'flag\\'\\\"><!-- Pro Column [color blue] --> <a target=_blank ng-href=/shipping-details-cfs/{{row.pro}} ng-if=\\\"col.field == \\'pro\\' \\\" class=text-strong>{{row[col.field] | capitalize}} </a><a ng-if=\\\"(col.field == \\'status\\') && ((row[col.field] | lowercase) != \\'delivered\\')\\\" target=_blank ng-href=/shipping-details-cfs/{{row.pro}} ng-attr-style=\\\"color:{{vm.status_colors[row[col.field]][\\'color-code\\']}};display:block\\\" class=\\\"text-strong status_col\\\"><!--<img ng-if=\\\"vm.status_colors[row[col.field]][\\'icon\\']\\\" class=\\\"default_img\\\" alt=\\\"#\\\" ng-src=\\\"{{vm.status_colors[row[col.field]][\\'icon\\']}}\\\" height=\\\"30\\\" />\\r\\n\\r\\n <img ng-if=\\\"vm.status_colors[row[col.field]][\\'hover_icon\\']\\\" class=\\\"hover_img\\\" alt=\\\"#\\\" ng-src=\\\"{{vm.status_colors[row[col.field]][\\'hover_icon\\']}}\\\" height=\\\"30\\\" />--> <span ng-bind-html=\\\"row[col.field] | capitalize\\\"></span> </a><a ng-if=\\\"(col.field == \\'status\\') && ((row[col.field] | lowercase) == \\'delivered\\')\\\" target=_blank ng-href=/shipping-details-cfs/{{row.pro}} ng-attr-style=\\\"color:{{vm.status_colors[row[col.field]][\\'color-code\\']}};display:block\\\" class=status_col><span ng-bind-html=\\\"row[col.field] | capitalize\\\"></span> </a><!-- Time --> <a target=_blank ng-href=/shipping-details-cfs/{{row.pro}} ng-if=\\\"(col.field == \\'pickupappttime\\' || col.field == \\'consigneeappttime\\' || col.field == \\'lastcheckcalltime\\' || col.field == \\'deliverytime\\')\\\" style=display:block>{{row[col.field] | date:\\'hh:mm:ss a\\'}} </a><!-- Remaining Columns --> <a target=_blank ng-href=/shipping-details-cfs/{{row.pro}} ng-if=\\\"col.field != \\'pro\\' && col.field != \\'status\\' && col.field != \\'consigneeappttime\\' && col.field != \\'pickupappttime\\' && col.field != \\'lastcheckcalltime\\' && col.field != \\'deliverytime\\' \\\"><!--{{( col.field == \\'deliverydate\\' || col.field == \\'lastcheckcalldate\\' || col.field == \\'pickupapptdate\\' || col.field == \\'consigneeapptdate\\' || col.field == \\'billeddate\\' || col.field == \\'shipdate\\' || col.field == \\'loadeddate\\' || col.field == \\'duedate\\' || col.field == \\'pickupapptdateline2\\' || col.field == \\'pickupdate\\' ) ? (row[col.field] | date:\\'dd-MMM-yyyy\\') : row[col.field]}}--> {{( col.field == \\'deliverydate\\' || col.field == \\'lastcheckcalldate\\' || col.field == \\'pickupapptdate\\' || col.field == \\'consigneeapptdate\\' || col.field == \\'billeddate\\' || col.field == \\'shipdate\\' || col.field == \\'loadeddate\\' || col.field == \\'duedate\\' || col.field == \\'pickupapptdateline2\\' || col.field == \\'pickupdate\\' ) ? (row[col.field] | date:\\'dd-MMM-yyyy\\': \\'UTC\\') : row[col.field]}}</a></span></td></tr><tr ng-show=\\\"vm.noResults && !vm.isError\\\"><td colspan=100% style=\\\"text-align: center\\\" id=isResults><span translate=TRACKTRACE.NORESULTS></span></td></tr><tr ng-show=vm.isError><td colspan=100% style=\\\"text-align: center\\\" id=timedOut><span translate={{vm.error}}></span></td></tr></tbody></table></div></div>\");\n$templateCache.put(\"/app/track-trace/track-trace-cfs/server-table/sorterHeader.html\",\"<tr class=ng-table-sort-header><!-- Table Header --><th title={{$column.headerTitle(this)}} ng-repeat=\\\"$column in $columns\\\" ng-class=\\\"{ \\'sortable\\': $column.sortable(this),\\r\\n \\'sort-asc\\': params.sorting()[$column.sortable(this)]==\\'asc\\',\\r\\n \\'sort-desc\\': params.sorting()[$column.sortable(this)]==\\'desc\\'\\r\\n }\\\" ng-init=\\\"template = $column.headerTemplateURL(this)\\\" ng-if=$column.title(this) class={{$column.class(this)}} filter=\\\"{ age: \\'/app/track-trace/track-trace-cfs/server-table/filterHeader.html\\' }\\\"><div ng-if=!template><div ng-if=$column.static class=ng-table-header id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : aljexSortBy($column, $event)\\\"></span></span></div><div ng-if=!$column.static class=ng-table-header resizable r-directions=\\\"[\\'right\\']\\\" id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : aljexSortBy($column, $event)\\\"></span></span></div></div><div ng-if=template ng-include=template></div></th></tr>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/customize-results/customize-results-cmts.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Customize Results Modal\\\" ng-controller=\\\"CustomizeResultsCmtsController as customizeCmtsCtrl\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><span hide-gt-xs show-xs hide-gt-xs>Customize Results</span><div layout=row hide-xs show-gt-xs flex=1><div flex=50 layout-margin><h2 translate=TRACKTRACE.ACTIVE_DATA></h2></div><div flex=50 layout-margin><h2 translate=TRACKTRACE.AVAILABLE_DATA></h2></div></div><span flex=auto hide-gt-xs show-xs></span><md-button class=md-icon-button ng-click=customizeCmtsCtrl.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content><div><div layout-gt-xs=row><div flex-gt-xs=50 flex-xs=1 class=\\\"active-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Active Columns</h3><div class=sortable-container as-sortable=customizeCmtsCtrl.dragListener() ng-model=customizeCmtsCtrl.activeColumns ng-style=\\\"{ true: {height: customizeCmtsCtrl.colHeight + \\'px\\'}, false: {height: (customizeCmtsCtrl.colHeight + 76) +\\'px\\'}}[customizeCmtsCtrl.activeColumns.length > 120]\\\"><md-card ng-repeat=\\\"column in customizeCmtsCtrl.activeColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle><div layout=row flex=auto layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><!--<span flex=\\\"auto\\\" translate=\\\"{{column.title}}\\\"></span>--> <span flex=auto ng-bind-html=\\\"(column.title | translate).replace(\\'<br>\\',\\'\\')\\\"></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Remove Field\\\" ng-click=customizeCmtsCtrl.remove(column)><span translate=TRACKTRACE.REMOVE_BUTT></span></md-button></div></md-card-content></md-card></div></div><div flex-gt-xs=50 flex-xs=1 class=\\\"available-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Available Columns</h3><div layout=row><md-input-container flex=\\\"{{customizeCmtsCtrl.availableSearchField.length > 0 ? 90 : 100}}\\\" class=\\\"md-block error-hidden\\\" flex-gt-sm=auto><label translate=TRACKTRACE.SEARCH_COLUMNS></label><input type=text ng-model=customizeCmtsCtrl.availableSearchField ng-change=customizeCmtsCtrl.availableSearchChange() name=search></md-input-container><div flex=10 ng-if=\\\"customizeCmtsCtrl.availableSearchField.length > 0\\\"><md-button class=\\\"md-icon-button btn-sm input-field-addon\\\" ng-click=customizeCmtsCtrl.clickedAvailableSearchX()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><div class=sortable-container as-sortable=customizeCmtsCtrl.dragListener() ng-model=customizeCmtsCtrl.availableColumns ng-style=\\\"{ true: {height: customizeCmtsCtrl.colHeight + \\'px\\'}, false: {height: (customizeCmtsCtrl.colHeight + 76) +\\'px\\'}}[true]\\\"><md-card ng-repeat=\\\"column in customizeCmtsCtrl.availableColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle ng-if=\\\"customizeCmtsCtrl.hasFinancialPermissions && column.field == \\'totalinvoiceamount\\' || column.field != \\'totalinvoiceamount\\'\\\"><div layout=row flex=auto layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><!--<span flex=\\\"auto\\\" translate=\\\"{{column.title}}\\\"></span>--> <span flex=auto ng-bind-html=\\\"(column.title | translate).replace(\\'<br>\\',\\'\\')\\\"></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Add Column\\\" ng-click=customizeCmtsCtrl.add(column)><span translate=TRACKTRACE.ADD_BUTT></span></md-button></div></md-card-content></md-card></div></div></div></div></md-dialog-content><md-dialog-actions layout=row class=dialog-footer-border><md-button aria-label=\\\"Cancel Customization\\\" ng-click=customizeCmtsCtrl.cancel() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button aria-label=\\\"Save As Default\\\" ng-click=customizeCmtsCtrl.saveToDefault()><span translate=TRACKTRACE.SAVE_DEFAULT_CRITERIA></span></md-button><md-button aria-label=\\\"Load Default Criteria\\\" ng-click=customizeCmtsCtrl.restoreDefault()><span translate=TRACKTRACE.RESTORE_DEFAULT_CRITERIA></span></md-button><md-button class=\\\"md-raised md-accent\\\" aria-label=\\\"Submit Customization\\\" ng-click=customizeCmtsCtrl.submit()><span translate=TRACKTRACE.SUBMIT></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/exports/export-csv.html\",\"<md-dialog class=export-csv aria-label=\\\"Export CSV\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><h2 translate=\\\"{{exportCsvLoaded ? \\'TRACKTRACE.EXPORT\\' : \\'TRACKTRACE.EXPORTING\\'}}\\\"></h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content flex-fill flex=auto style=\\\"min-height: 120px\\\"><div class=loadmask-light loadmask=exportCsvLoaded ng-if=!exportCsvLoaded style=position:absolute;top:52px;left:0;right:0;bottom:0></div><div class=md-dialog-content ng-show=exportCsvLoaded><p><span translate=TRACKTRACE.EXPORT_LINE_1 style=\\\"color: #ffffff\\\"></span></p><p><span translate=TRACKTRACE.EXPORT_LINE_2 style=\\\"color: #ffffff\\\"></span></p></div></md-dialog-content><md-dialog-actions layout=row ng-show=exportCsvLoaded><md-button ng-click=closeDialog() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" ng-click=exportCustom()><span translate=TRACKTRACE.EXPORT_CUSTOM></span></md-button><md-button class=\\\"md-raised md-accent\\\" ng-click=exportAll()><span translate=TRACKTRACE.EXPORT_ALL></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/exports/no-results.html\",\"<md-dialog class=\\\"export-csv md-card-light\\\" aria-label=\\\"Export CSV\\\" ng-cloak><md-toolbar><div class=md-toolbar-tools><h2 translate=TRACKTRACE.EXPORT></h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding><p><span translate=TRACKTRACE.NORESULTS style=\\\"color: #ffffff\\\"></span></p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"end center\\\"><md-button class=md-raised ng-click=closeDialog()><span translate=TRACKTRACE.CANCEL></span></md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/quick-search/quick-search.html\",\"<style>.state_dropdown{\\r\\n margin:0px;\\r\\n box-sizing:border-box;\\r\\n }\\r\\n\\r\\n .state_dropdown label{\\r\\n display:none;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete{\\r\\n padding: 0px;\\r\\n margin:0px;\\r\\n height: 68px;\\r\\n background-color: #fff;\\r\\n width: 100%;\\r\\n box-sizing:border-box;\\r\\n z-index:0;\\r\\n border-radius:0px;\\r\\n margin-top: -2px;\\r\\n margin-left: -2px;\\r\\n color: #5E6163 !important;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete-wrap{\\r\\n padding: 0px;\\r\\n height: 68px;\\r\\n padding: 1.3rem;\\r\\n width: 100%;\\r\\n box-sizing:border-box;\\r\\n color: #5E6163 !important;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete-wrap button{\\r\\n display:none;\\r\\n }\\r\\n\\r\\n .state_dropdown input[type=\\'search\\']{\\r\\n border-bottom: 0px !important;\\r\\n color: #5E6163 !important;\\r\\n }\\r\\n .light-form md-input-container .md-input:not([disabled]), .light-form md-select md-select-value{\\r\\n color: rgb(117,117,117) !important;\\r\\n }</style><form id=quick_search_form ng-submit=trackTraceCmtsCtrl.quickSearch(trackTraceCmtsCtrl.queryVal)><div layout-gt-xs=row layout-xs=column class=\\\"search-group {{trackTraceCmtsCtrl.aljexSearchType == \\'pickupapptdate\\' || trackTraceCmtsCtrl.aljexSearchType == \\'consigneeapptdate\\' ? \\'col-tablet-sm\\' : \\'\\'}}\\\"><div><!-- Search Options Menu --><md-menu md-position-mode=\\\"target target\\\" md-offset=\\\"0 60\\\"><md-button aria-label=\\\"Open demo menu\\\" class=\\\"md-raised search-type md-accent\\\" ng-click=$mdOpenMenu($event) layout-gt-xs=row><span ng-if=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'load_status\\'\\\"><span class=responsive-ellipsis translate=\\\"Load Status\\\"></span> </span><span ng-if=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'load_number\\'\\\"><span class=responsive-ellipsis translate=\\\"Load #\\\"></span> </span><span ng-if=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'pro_number\\'\\\"><span class=responsive-ellipsis translate=\\\"Pro #\\\"></span> </span><span ng-if=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'planned_start\\'\\\"><span class=responsive-ellipsis translate=\\\"Planned Start\\\"></span> </span><span ng-if=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'planned_end\\'\\\"><span class=responsive-ellipsis translate=planned_end></span> </span><span ng-if=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'pickup_location\\'\\\"><span class=responsive-ellipsis translate=\\\"Pick-up Location\\\"></span> </span><span ng-if=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'delivery_location\\'\\\"><span class=responsive-ellipsis translate=\\\"Delivery Location\\\"></span> </span><span ng-if=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'reference_number\\'\\\"><span class=responsive-ellipsis translate=\\\"Reference Number\\\"></span> </span><span ng-if=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'route_number\\'\\\"><span class=responsive-ellipsis translate=\\\"Route Number\\\"></span></span><md-icon></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'load_status\\');\\\"><div layout=row><p flex=auto><span translate=\\\"Load Status\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Load #\\\" ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'load_number\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"Load #\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Pro #\\\" ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'pro_number\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"Pro #\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Planned Start Date\\\" ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'planned_start\\');\\\"><div layout=row><p flex=auto><span translate=\\\"Planned Start\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Planned End Date\\\" ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'planned_end\\');\\\"><div layout=row><p flex=auto><span translate=\\\"Planned End\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Pick-up Location\\\" ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'pickup_location\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"Pick-up Location\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Delivery Location\\\" ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'delivery_location\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"Delivery Location\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Reference Number\\\" ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'reference_number\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"Reference Number\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Route Number\\\" ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'route_number\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"Route Number\\\"></span></p></div></md-button></md-menu-item><!--<md-menu-item>\\r\\n <md-button\\r\\n aria-label=\\\"Search By BOL #\\\"\\r\\n ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'bol_number\\');\\\">\\r\\n <div layout=\\\"row\\\">\\r\\n <p flex=\\\"auto\\\"><span class=\\\"responsive-ellipsis\\\" translate=\\\"BOL #\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n\\r\\n <md-menu-item>\\r\\n <md-button\\r\\n aria-label=\\\"Search By Pro #\\\"\\r\\n ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'pro_number\\');\\\">\\r\\n <div layout=\\\"row\\\">\\r\\n <p flex=\\\"auto\\\"><span class=\\\"responsive-ellipsis\\\" translate=\\\"Pro #\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n\\r\\n <md-menu-item>\\r\\n <md-button\\r\\n aria-label=\\\"Search By Billing Status\\\"\\r\\n ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'load_billing_invoice_status\\');\\\">\\r\\n <div layout=\\\"row\\\">\\r\\n <p flex=\\\"auto\\\"><span class=\\\"responsive-ellipsis\\\" translate=\\\"Billing Status\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n\\r\\n <md-menu-item>\\r\\n <md-button\\r\\n aria-label=\\\"Search By TP Carrier Name\\\"\\r\\n ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'trading_partner_carrier_name\\');\\\">\\r\\n <div layout=\\\"row\\\">\\r\\n <p flex=\\\"auto\\\"><span class=\\\"responsive-ellipsis\\\" translate=\\\"TP Carrier Name\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n\\r\\n <md-menu-item>\\r\\n <md-button\\r\\n aria-label=\\\"Search By TP Carrier Number\\\"\\r\\n ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'trading_partner_carrier_number\\');\\\">\\r\\n <div layout=\\\"row\\\">\\r\\n <p flex=\\\"auto\\\"><span class=\\\"responsive-ellipsis\\\" translate=\\\"TP Carrier Number\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n\\r\\n <md-menu-item>\\r\\n <md-button\\r\\n aria-label=\\\"Search By Transport Mode\\\"\\r\\n ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'transport_mode_name\\');\\\">\\r\\n <div layout=\\\"row\\\">\\r\\n <p flex=\\\"auto\\\"><span class=\\\"responsive-ellipsis\\\" translate=\\\"Transport Mode\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n\\r\\n <md-menu-item>\\r\\n <md-button\\r\\n aria-label=\\\"Search By Equipment Name\\\"\\r\\n ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'equipment_name\\');\\\">\\r\\n <div layout=\\\"row\\\">\\r\\n <p flex=\\\"auto\\\"><span class=\\\"responsive-ellipsis\\\" translate=\\\"Equipment Name\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n\\r\\n\\r\\n <md-menu-item>\\r\\n <md-button\\r\\n aria-label=\\\"Search By TP Client Name\\\"\\r\\n ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'trading_partner_client_name\\');\\\">\\r\\n <div layout=\\\"row\\\">\\r\\n <p flex=\\\"auto\\\"><span class=\\\"responsive-ellipsis\\\" translate=\\\"TP Client Name\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n\\r\\n <md-menu-item>\\r\\n <md-button\\r\\n aria-label=\\\"Search By TP Client Number\\\"\\r\\n ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'trading_partner_client_number\\');\\\">\\r\\n <div layout=\\\"row\\\">\\r\\n <p flex=\\\"auto\\\"><span class=\\\"responsive-ellipsis\\\" translate=\\\"TP Client Number\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>\\r\\n\\r\\n <md-menu-item>\\r\\n <md-button\\r\\n aria-label=\\\"Search By Service Option\\\"\\r\\n ng-click=\\\"trackTraceCmtsCtrl.aljexSearchChange(\\'service_option_name\\');\\\">\\r\\n <div layout=\\\"row\\\">\\r\\n <p flex=\\\"auto\\\"><span class=\\\"responsive-ellipsis\\\" translate=\\\"Service Option\\\"></span></p>\\r\\n </div>\\r\\n </md-button>\\r\\n </md-menu-item>--></md-menu-content></md-menu></div><div flex=auto class=light-form><!-- Load STATUS --><div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'load_status\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><md-select ng-model=trackTraceCmtsCtrl.queryVal ng-change=\\\"\\\" class=clear-fields placeholder=\\\"select a status\\\" md-on-open=trackTraceCmtsCtrl.onSelectOpen() md-on-close=trackTraceCmtsCtrl.onSelectClose()><md-option ng-repeat=\\\"status_list in trackTraceCmtsCtrl.statusOptionsVar.status_options\\\">{{status_list}}</md-option></md-select></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!--load_billing_invoice_status--><!--<div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'load_billing_invoice_status\\'\\\">\\r\\n\\r\\n <div layout-gt-xs=\\\"row\\\">\\r\\n <div flex-gt-xs=\\\"93\\\">\\r\\n <md-select ng-model=\\\"trackTraceCmtsCtrl.queryVal\\\" ng-change=\\\"\\\" class=\\\"clear-fields\\\" placeholder=\\\"select a billing status\\\"\\r\\n md-on-open=\\\"trackTraceCmtsCtrl.onSelectOpen()\\\"\\r\\n md-on-close=\\\"trackTraceCmtsCtrl.onSelectClose()\\\">\\r\\n <md-option ng-repeat=\\\"billingStatus_item in trackTraceCmtsCtrl.billingStatusVar\\\">{{billingStatus_item}}</md-option>\\r\\n </md-select>\\r\\n </div>\\r\\n <md-button class=\\\"md-raised md-accent btn-search-date\\\"\\r\\n aria-label=\\\"search\\\"\\r\\n type=\\\"submit\\\">\\r\\n <md-icon>\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n\\r\\n </div>\\r\\n\\r\\n </div>--><!--transport_mode_name--><!--<div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'transport_mode_name\\'\\\">\\r\\n\\r\\n <div layout-gt-xs=\\\"row\\\">\\r\\n <div flex-gt-xs=\\\"93\\\">\\r\\n <md-select ng-model=\\\"trackTraceCmtsCtrl.queryVal\\\" ng-change=\\\"\\\" class=\\\"clear-fields\\\" placeholder=\\\"select a transport mode\\\"\\r\\n md-on-open=\\\"trackTraceCmtsCtrl.onSelectOpen()\\\"\\r\\n md-on-close=\\\"trackTraceCmtsCtrl.onSelectClose()\\\">\\r\\n <md-option ng-repeat=\\\"transportMode_item in trackTraceCmtsCtrl.transportModeVar\\\">{{transportMode_item}}</md-option>\\r\\n </md-select>\\r\\n </div>\\r\\n <md-button class=\\\"md-raised md-accent btn-search-date\\\"\\r\\n aria-label=\\\"search\\\"\\r\\n type=\\\"submit\\\">\\r\\n <md-icon>\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n\\r\\n </div>\\r\\n\\r\\n </div>--><!--equipment_name--><!--<div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'equipment_name\\'\\\">\\r\\n\\r\\n <div layout-gt-xs=\\\"row\\\">\\r\\n <div flex-gt-xs=\\\"93\\\">\\r\\n <md-select ng-model=\\\"trackTraceCmtsCtrl.queryVal\\\" ng-change=\\\"\\\" class=\\\"clear-fields\\\" placeholder=\\\"select a equipment name\\\"\\r\\n md-on-open=\\\"trackTraceCmtsCtrl.onSelectOpen()\\\"\\r\\n md-on-close=\\\"trackTraceCmtsCtrl.onSelectClose()\\\">\\r\\n <md-option ng-repeat=\\\"equipmentName_item in trackTraceCmtsCtrl.equipmentNameVar\\\">{{equipmentName_item}}</md-option>\\r\\n </md-select>\\r\\n </div>\\r\\n <md-button class=\\\"md-raised md-accent btn-search-date\\\"\\r\\n aria-label=\\\"search\\\"\\r\\n type=\\\"submit\\\">\\r\\n <md-icon>\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n\\r\\n </div>\\r\\n\\r\\n </div>--><!--service_option_name--><!--<div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'service_option_name\\'\\\">\\r\\n\\r\\n <div layout-gt-xs=\\\"row\\\">\\r\\n <div flex-gt-xs=\\\"93\\\">\\r\\n <md-select ng-model=\\\"trackTraceCmtsCtrl.queryVal\\\" ng-change=\\\"\\\" class=\\\"clear-fields\\\" placeholder=\\\"select a service option\\\"\\r\\n md-on-open=\\\"trackTraceCmtsCtrl.onSelectOpen()\\\"\\r\\n md-on-close=\\\"trackTraceCmtsCtrl.onSelectClose()\\\">\\r\\n <md-option ng-repeat=\\\"serviceOption_item in trackTraceCmtsCtrl.serviceOptionVar\\\">{{serviceOption_item}}</md-option>\\r\\n </md-select>\\r\\n </div>\\r\\n <md-button class=\\\"md-raised md-accent btn-search-date\\\"\\r\\n aria-label=\\\"search\\\"\\r\\n type=\\\"submit\\\">\\r\\n <md-icon>\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n\\r\\n </div>\\r\\n\\r\\n </div>--><!-- pickup_location --><div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'pickup_location\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCmtsCtrl.queryVal name=query aria-label=\\\"Search by pick-up location\\\" placeholder=\\\"Search by {{\\'Pick-up Location\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- delivery_location --><div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'delivery_location\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCmtsCtrl.queryVal name=query aria-label=\\\"Search by delivery location\\\" placeholder=\\\"Search by {{\\'Delivery Location\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Planned Start Date --><div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'planned_start\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCmtsCtrl.aljexMinDate mdp-placeholder=\\\"From Planned Start Date\\\" ng-change=trackTraceCmtsCtrl.dateChanged() ng-model=trackTraceCmtsCtrl.planned_start_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCmtsCtrl.aljexMinDate mdp-placeholder=\\\"To Planned Start Date\\\" ng-change=trackTraceCmtsCtrl.dateChanged() ng-model=trackTraceCmtsCtrl.planned_start_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCmtsCtrl.plannedSatrtDateRangeSelect ng-change=trackTraceCmtsCtrl.selectRange() placeholder=\\\"or select a range\\\" md-on-open=trackTraceCmtsCtrl.onSelectOpen() md-on-close=trackTraceCmtsCtrl.onSelectClose() aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCmtsCtrl.aljexRanges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Planned End Date --><div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'planned_end\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCmtsCtrl.aljexMinDate mdp-placeholder=\\\"From Planned End Date\\\" ng-change=trackTraceCmtsCtrl.dateChanged() ng-model=trackTraceCmtsCtrl.planned_end_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCmtsCtrl.aljexMinDate mdp-placeholder=\\\"To Planned End Date\\\" ng-change=trackTraceCmtsCtrl.dateChanged() ng-model=trackTraceCmtsCtrl.planned_end_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCmtsCtrl.plannedEndDateRangeSelect ng-change=trackTraceCmtsCtrl.selectRange() placeholder=\\\"or select a range\\\" md-on-open=trackTraceCmtsCtrl.onSelectOpen() md-on-close=trackTraceCmtsCtrl.onSelectClose() aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCmtsCtrl.aljexRanges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- load_number --><div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'load_number\\'\\\" class=date-search><div layout-gt-xs=row><div flex-gt-xs=93><!--<input ng-model=\\\"query\\\" name=\\\"query\\\" placeholder=\\\"Search by {{\\'TRACKTRACE.ORIGIN_CITYSTATE\\' | translate}}\\\" class=\\\"form-control\\\">--><md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\"><md-autocomplete md-no-cache=false md-selected-item=trackTraceCmtsCtrl.selectedItem md-search-text-change=\\\"\\\" md-min-length=3 md-search-text=trackTraceCmtsCtrl.searchLoadNumberText md-items=\\\"item in trackTraceCmtsCtrl.getMatch(\\'load_number\\', trackTraceCmtsCtrl.searchLoadNumberText)\\\" md-item-text=item placeholder=\\\"Enter load number\\\"><md-item-template><span md-highlight-text=trackTraceCmtsCtrl.searchLoadNumberText md-highlight-flags=^i>{{item}}</span></md-item-template><md-not-found>No load number matching \\\"{{trackTraceCmtsCtrl.searchLoadNumberText}}\\\" were found.</md-not-found></md-autocomplete></md-input-container></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- pro_number --><div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'pro_number\\'\\\" class=date-search><div layout-gt-xs=row><div flex-gt-xs=93><!--<input ng-model=\\\"query\\\" name=\\\"query\\\" placeholder=\\\"Search by {{\\'TRACKTRACE.ORIGIN_CITYSTATE\\' | translate}}\\\" class=\\\"form-control\\\">--><md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\"><md-autocomplete md-no-cache=false md-selected-item=trackTraceCmtsCtrl.selectedItem md-search-text-change=\\\"\\\" md-min-length=3 md-search-text=trackTraceCmtsCtrl.searchProNumberText md-items=\\\"item in trackTraceCmtsCtrl.getMatch(\\'pro_number\\', trackTraceCmtsCtrl.searchProNumberText)\\\" md-item-text=item placeholder=\\\"Enter pro number\\\"><md-item-template><span md-highlight-text=trackTraceCmtsCtrl.searchProNumberText md-highlight-flags=^i>{{item}}</span></md-item-template><md-not-found>No load number matching \\\"{{trackTraceCmtsCtrl.searchProNumberText}}\\\" were found.</md-not-found></md-autocomplete></md-input-container></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- bol_number --><!--<div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'bol_number\\'\\\" class=\\\"date-search\\\">\\r\\n\\r\\n <div layout-gt-xs=\\\"row\\\">\\r\\n <div flex-gt-xs=\\\"93\\\">\\r\\n\\r\\n <md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\">\\r\\n\\r\\n <md-autocomplete\\r\\n md-no-cache=\\\"false\\\"\\r\\n md-selected-item=\\\"trackTraceCmtsCtrl.selectedItem\\\"\\r\\n md-search-text-change=\\\"\\\"\\r\\n md-min-length=\\\"3\\\"\\r\\n md-search-text=\\\"trackTraceCmtsCtrl.searchBolNumberText\\\"\\r\\n md-items=\\\"item in trackTraceCmtsCtrl.getMatch(\\'bol_number\\',trackTraceCmtsCtrl.searchBolNumberText)\\\"\\r\\n md-item-text=\\\"item\\\"\\r\\n placeholder=\\\"Enter bol number\\\">\\r\\n\\r\\n <md-item-template>\\r\\n <span md-highlight-text=\\\"trackTraceCmtsCtrl.searchBolNumberText\\\" md-highlight-flags=\\\"^i\\\">{{item}}</span>\\r\\n </md-item-template>\\r\\n\\r\\n <md-not-found>\\r\\n No bol number matching \\\"{{trackTraceCmtsCtrl.searchBolNumberText}}\\\" were found.\\r\\n </md-not-found>\\r\\n\\r\\n </md-autocomplete>\\r\\n\\r\\n </md-input-container>\\r\\n\\r\\n </div>\\r\\n <md-button class=\\\"md-raised md-accent btn-search-date\\\"\\r\\n aria-label=\\\"search\\\"\\r\\n type=\\\"submit\\\">\\r\\n <md-icon>\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n\\r\\n </div>--><!-- pro_number --><!--<div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'pro_number\\'\\\" class=\\\"date-search\\\">\\r\\n\\r\\n <div layout-gt-xs=\\\"row\\\">\\r\\n <div flex-gt-xs=\\\"93\\\">\\r\\n\\r\\n <md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\">\\r\\n\\r\\n <md-autocomplete\\r\\n md-no-cache=\\\"false\\\"\\r\\n md-selected-item=\\\"trackTraceCmtsCtrl.selectedItem\\\"\\r\\n md-search-text-change=\\\"\\\"\\r\\n md-min-length=\\\"3\\\"\\r\\n md-search-text=\\\"trackTraceCmtsCtrl.searchProNumberText\\\"\\r\\n md-items=\\\"item in trackTraceCmtsCtrl.getMatch(\\'pro_number\\',trackTraceCmtsCtrl.searchProNumberText)\\\"\\r\\n md-item-text=\\\"item\\\"\\r\\n placeholder=\\\"Enter pro number\\\">\\r\\n\\r\\n <md-item-template>\\r\\n <span md-highlight-text=\\\"trackTraceCmtsCtrl.searchProNumberText\\\" md-highlight-flags=\\\"^i\\\">{{item}}</span>\\r\\n </md-item-template>\\r\\n\\r\\n <md-not-found>\\r\\n No pro number matching \\\"{{trackTraceCmtsCtrl.searchProNumberText}}\\\" were found.\\r\\n </md-not-found>\\r\\n\\r\\n </md-autocomplete>\\r\\n\\r\\n </md-input-container>\\r\\n\\r\\n </div>\\r\\n <md-button class=\\\"md-raised md-accent btn-search-date\\\"\\r\\n aria-label=\\\"search\\\"\\r\\n type=\\\"submit\\\">\\r\\n <md-icon>\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n\\r\\n </div>--><!-- trading_partner_carrier_name --><!--<div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'trading_partner_carrier_name\\'\\\" class=\\\"date-search\\\">\\r\\n\\r\\n <div layout-gt-xs=\\\"row\\\">\\r\\n <div flex-gt-xs=\\\"93\\\">\\r\\n\\r\\n <md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\">\\r\\n\\r\\n <md-autocomplete\\r\\n md-no-cache=\\\"false\\\"\\r\\n md-selected-item=\\\"trackTraceCmtsCtrl.selectedItem\\\"\\r\\n md-search-text-change=\\\"\\\"\\r\\n md-min-length=\\\"3\\\"\\r\\n md-search-text=\\\"trackTraceCmtsCtrl.searchTPCNameText\\\"\\r\\n md-items=\\\"item in trackTraceCmtsCtrl.getMatch(\\'trading_partner_carrier_name\\',trackTraceCmtsCtrl.searchTPCNameText)\\\"\\r\\n md-item-text=\\\"item\\\"\\r\\n placeholder=\\\"Enter tp carrier name\\\">\\r\\n\\r\\n <md-item-template>\\r\\n <span md-highlight-text=\\\"trackTraceCmtsCtrl.searchTPCNameText\\\" md-highlight-flags=\\\"^i\\\">{{item}}</span>\\r\\n </md-item-template>\\r\\n\\r\\n <md-not-found>\\r\\n No tp carrier name matching \\\"{{trackTraceCmtsCtrl.searchTPCNameText}}\\\" were found.\\r\\n </md-not-found>\\r\\n\\r\\n </md-autocomplete>\\r\\n\\r\\n </md-input-container>\\r\\n\\r\\n </div>\\r\\n <md-button class=\\\"md-raised md-accent btn-search-date\\\"\\r\\n aria-label=\\\"search\\\"\\r\\n type=\\\"submit\\\">\\r\\n <md-icon>\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n\\r\\n </div>--><!-- trading_partner_carrier_number --><!--<div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'trading_partner_carrier_number\\'\\\" class=\\\"date-search\\\">\\r\\n\\r\\n <div layout-gt-xs=\\\"row\\\">\\r\\n <div flex-gt-xs=\\\"93\\\">\\r\\n\\r\\n <md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\">\\r\\n\\r\\n <md-autocomplete\\r\\n md-no-cache=\\\"false\\\"\\r\\n md-selected-item=\\\"trackTraceCmtsCtrl.selectedItem\\\"\\r\\n md-search-text-change=\\\"\\\"\\r\\n md-min-length=\\\"3\\\"\\r\\n md-search-text=\\\"trackTraceCmtsCtrl.searchTPCNumberText\\\"\\r\\n md-items=\\\"item in trackTraceCmtsCtrl.getMatch(\\'trading_partner_carrier_number\\',trackTraceCmtsCtrl.searchTPCNumberText)\\\"\\r\\n md-item-text=\\\"item\\\"\\r\\n placeholder=\\\"Enter tp carrier number\\\">\\r\\n\\r\\n <md-item-template>\\r\\n <span md-highlight-text=\\\"trackTraceCmtsCtrl.searchTPCNumberText\\\" md-highlight-flags=\\\"^i\\\">{{item}}</span>\\r\\n </md-item-template>\\r\\n\\r\\n <md-not-found>\\r\\n No tp carrier number matching \\\"{{trackTraceCmtsCtrl.searchOriginText}}\\\" were found.\\r\\n </md-not-found>\\r\\n\\r\\n </md-autocomplete>\\r\\n\\r\\n </md-input-container>\\r\\n\\r\\n </div>\\r\\n <md-button class=\\\"md-raised md-accent btn-search-date\\\"\\r\\n aria-label=\\\"search\\\"\\r\\n type=\\\"submit\\\">\\r\\n <md-icon>\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n\\r\\n </div>--><!-- trading_partner_client_name --><!--<div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'trading_partner_client_name\\'\\\" class=\\\"date-search\\\">\\r\\n\\r\\n <div layout-gt-xs=\\\"row\\\">\\r\\n <div flex-gt-xs=\\\"93\\\">\\r\\n\\r\\n <md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\">\\r\\n\\r\\n <md-autocomplete\\r\\n md-no-cache=\\\"false\\\"\\r\\n md-selected-item=\\\"trackTraceCmtsCtrl.selectedItem\\\"\\r\\n md-search-text-change=\\\"\\\"\\r\\n md-min-length=\\\"3\\\"\\r\\n md-search-text=\\\"trackTraceCmtsCtrl.searchTPClientNameText\\\"\\r\\n md-items=\\\"item in trackTraceCmtsCtrl.getMatch(\\'trading_partner_client_name\\',trackTraceCmtsCtrl.searchTPClientNameText)\\\"\\r\\n md-item-text=\\\"item\\\"\\r\\n placeholder=\\\"Enter tp client name\\\">\\r\\n\\r\\n <md-item-template>\\r\\n <span md-highlight-text=\\\"trackTraceCmtsCtrl.searchTPClientNameText\\\" md-highlight-flags=\\\"^i\\\">{{item}}</span>\\r\\n </md-item-template>\\r\\n\\r\\n <md-not-found>\\r\\n No tp client name matching \\\"{{trackTraceCmtsCtrl.searchTPClientNameText}}\\\" were found.\\r\\n </md-not-found>\\r\\n\\r\\n </md-autocomplete>\\r\\n\\r\\n </md-input-container>\\r\\n\\r\\n </div>\\r\\n <md-button class=\\\"md-raised md-accent btn-search-date\\\"\\r\\n aria-label=\\\"search\\\"\\r\\n type=\\\"submit\\\">\\r\\n <md-icon>\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n\\r\\n </div>--><!-- trading_partner_client_number --><!--<div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'trading_partner_client_number\\'\\\" class=\\\"date-search\\\">\\r\\n\\r\\n <div layout-gt-xs=\\\"row\\\">\\r\\n <div flex-gt-xs=\\\"93\\\">\\r\\n\\r\\n <md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\">\\r\\n\\r\\n <md-autocomplete\\r\\n md-no-cache=\\\"false\\\"\\r\\n md-selected-item=\\\"trackTraceCmtsCtrl.selectedItem\\\"\\r\\n md-search-text-change=\\\"\\\"\\r\\n md-min-length=\\\"3\\\"\\r\\n md-search-text=\\\"trackTraceCmtsCtrl.searchTPClientNumberText\\\"\\r\\n md-items=\\\"item in trackTraceCmtsCtrl.getMatch(\\'trading_partner_client_number\\',trackTraceCmtsCtrl.searchTPClientNumberText)\\\"\\r\\n md-item-text=\\\"item\\\"\\r\\n placeholder=\\\"Enter tp client number\\\">\\r\\n\\r\\n <md-item-template>\\r\\n <span md-highlight-text=\\\"trackTraceCmtsCtrl.searchTPClientNumberText\\\" md-highlight-flags=\\\"^i\\\">{{item}}</span>\\r\\n </md-item-template>\\r\\n\\r\\n <md-not-found>\\r\\n No tp client number matching \\\"{{trackTraceCmtsCtrl.searchTPClientNumberText}}\\\" were found.\\r\\n </md-not-found>\\r\\n\\r\\n </md-autocomplete>\\r\\n\\r\\n </md-input-container>\\r\\n\\r\\n </div>\\r\\n <md-button class=\\\"md-raised md-accent btn-search-date\\\"\\r\\n aria-label=\\\"search\\\"\\r\\n type=\\\"submit\\\">\\r\\n <md-icon>\\r\\n \\r\\n </md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n\\r\\n </div>--><!-- reference_number --><div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'reference_number\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCmtsCtrl.queryVal name=query aria-label=\\\"Search by reference number\\\" placeholder=\\\"Search by {{\\'Reference Number\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- route_number --><div ng-show=\\\"trackTraceCmtsCtrl.aljexSearchType == \\'route_number\\'\\\" class=date-search><div layout-gt-xs=row><div flex-gt-xs=93><md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\"><md-autocomplete md-no-cache=false md-selected-item=trackTraceCmtsCtrl.selectedItem md-search-text-change=\\\"\\\" md-min-length=3 md-search-text=trackTraceCmtsCtrl.searchRouteNumberText md-items=\\\"item in trackTraceCmtsCtrl.getMatch(\\'route_number\\',trackTraceCmtsCtrl.searchRouteNumberText)\\\" md-item-text=item placeholder=\\\"Enter Route Number\\\"><md-item-template><span md-highlight-text=trackTraceCmtsCtrl.searchRouteNumberText md-highlight-flags=^i>{{item}}</span></md-item-template><md-not-found>No route number matching \\\"{{trackTraceCmtsCtrl.searchRouteNumberText}}\\\" were found.</md-not-found></md-autocomplete></md-input-container></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div></div></div></form>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/server-table/filterDate.html\",\"<mdp-date-picker ng-model=vm.filters[name] ng-change=vm.filterDate(name) class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-date-picker>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/server-table/filterDefault.html\",\"<md-input-container class=error-hidden><input type=text name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" ng-minlength=3 class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/server-table/filterHeader.html\",\"<tr ng-show=show_filter class=ng-table-filters><th data-title-text=\\\"{{$column.titleAlt(this) || $column.title(this)}}\\\" ng-repeat=\\\"$column in $columns\\\" ng-if=$column.show(this) class=\\\"filter {{$column.class(this)}}\\\"><div ng-repeat=\\\"(name, filter) in $column.filter(this)\\\"><div ng-include=config.getTemplateUrl(filter)></div></div></th></tr>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/server-table/filterMilestone.html\",\"<md-input-container class=md-block><md-select ng-model=params.filter()[name] id=params.filter()[name] name={{name}} ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" ng-disabled=$filterRow.disabled md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() aria-label={{name}}><md-option ng-value=null>—</md-option><md-option ng-value=0>Open</md-option><md-option ng-value=1><!-- ng-value used to set true or false which ng-table needs --> Covered</md-option><md-option ng-value=2>Pickup</md-option><md-option ng-value=3>Dispatched</md-option><md-option ng-value=4>Loaded</md-option><md-option ng-value=5>Consignee</md-option><md-option ng-value=6>Delivered</md-option></md-select></md-input-container>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/server-table/filterStatus.html\",\"<md-input-container class=md-block><md-select ng-model=params.filter()[name] id=params.filter()[name] name={{name}} ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" ng-disabled=$filterRow.disabled md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() aria-label={{name}}><md-option ng-value=null>—</md-option><!--<md-option ng-value=\\\"0\\\">\\r\\n Delivered\\r\\n </md-option>\\r\\n <md-option ng-value=\\\"1\\\">\\r\\n Undelivered\\r\\n </md-option>\\r\\n <md-option ng-value=\\\"\\'n/a\\'\\\">\\r\\n N/A\\r\\n </md-option>\\r\\n <md-option ng-value=\\\"8\\\">\\r\\n Released\\r\\n </md-option>--><div ng-if=\\\"name == \\'load_status\\'\\\"><md-option ng-repeat=\\\"status_list in trackTraceCmtsCtrl.statusOptionsVar.status_options\\\">{{status_list}}</md-option></div><div ng-if=\\\"name == \\'load_billing_invoice_status\\'\\\"><md-option ng-repeat=\\\"status_list in trackTraceCmtsCtrl.billingStatusVar\\\">{{status_list}}</md-option></div><div ng-if=\\\"name == \\'transport_mode_name\\'\\\"><md-option ng-repeat=\\\"status_list in trackTraceCmtsCtrl.transportModeVar\\\">{{status_list}}</md-option></div><div ng-if=\\\"name == \\'equipment_name\\'\\\"><md-option ng-repeat=\\\"status_list in trackTraceCmtsCtrl.equipmentNameVar\\\">{{status_list}}</md-option></div><div ng-if=\\\"name == \\'service_option_name\\'\\\"><md-option ng-repeat=\\\"status_list in trackTraceCmtsCtrl.serviceOptionVar\\\">{{status_list}}</md-option></div><div ng-if=\\\"name == \\'is_bookmarked\\'\\\"><md-option ng-repeat=\\\"status_list in trackTraceCmtsCtrl.isBookedOptionsVar\\\">{{status_list}}</md-option></div></md-select></md-input-container>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/server-table/filterTime.html\",\"<mdp-time-picker ng-model=vm.filters[name] ng-change=vm.filterTime(name) class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-time-picker>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/server-table/header.html\",\"<ng-table-sorter-aljex-row-server-table></ng-table-sorter-aljex-row-server-table><!--<ng-table-filter-row-aljex-cview></ng-table-filter-row-aljex-cview>--><ng-table-filter-row-cview></ng-table-filter-row-cview>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/server-table/pagination.html\",\"<div class=\\\"ng-table-pager m-t-sm ng-scope\\\" ng-if=params.data.length ng-controller=\\\"ServerTableCmtsController as vm\\\"><div layout-gt-xs=row layout-xs=column><div><ul ng-if=pages.length data-ng-init=params.total(100) class=\\\"pagination ng-table-pagination ng-scope\\\"><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=\\\"ng-scope disabled\\\"><a ng-switch-when=prev ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope>«</a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=first ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>1</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=page ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>2</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=last ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>3</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=next ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope>»</a></li></ul></div><span flex></span><div ng-if=params.settings().counts.length class=\\\"ng-table-counts btn-group pull-right ng-scope\\\"><div><md-button ng-repeat=\\\"count in params.settings().counts\\\" ng-class=\\\"{\\'md-primary\\':params.count()==count}\\\" ng-click=vm.aljex_per_page(count);params.count(count) aria-label=\\\"Results Per Page\\\" class=\\\"md-raised md-default\\\"><span ng-bind=count class=ng-binding></span></md-button></div><span class=md-caption>Records per page</span></div></div></div>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/server-table/server-table.html\",\"<style>.status_col img{\\r\\n vertical-align: middle; margin-right:10px; display:inline;\\r\\n}\\r\\n\\r\\n.status_col .hover_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .default_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .hover_img{\\r\\n display:inline;\\r\\n}</style><div ng-controller=\\\"ServerTableCmtsController as vm\\\" class=table-scroll ng-style=\\\"(vm.noResults || vm.isError) ? {\\'overflow-x\\':\\'hidden\\'} : {}\\\"><div class=loadmask-light loadmask=!vm.isLoading><table style=\\\"width: 100%\\\" ng-table-dynamic=\\\"vm.tableParams with vm.columns\\\" template-header=/app/track-trace/track-trace-cmts/server-table/header.html template-pagination=/app/track-trace/track-trace-cmts/server-table/pagination.html class=card-table show-filter=trackTraceCmtsCtrl.cmtsFiltersVisible><tbody><tr ng-repeat=\\\"row in $data\\\"><td ng-repeat=\\\"col in $columns\\\" ng-if=col.field><span class=hoverable ng-if=\\\"col.field == \\'flag\\'\\\"><md-icon ng-show=row.exceptions.length class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\" ng-mouseover=vm.getException(row.exceptions)></md-icon><md-tooltip md-direction=right><md-progress-circular md-mode=indeterminate class=\\\"md-warn md-hue-2\\\" ng-show=vm.tooltipIsLoading></md-progress-circular><div ng-show=!vm.tooltipIsLoading ng-repeat=\\\"exception in row.exceptions\\\"><p>Current Exception: <span>{{exception.pointname}}</span></p><p>Date / Time Created: <span>{{exception.created_at | date:\\'dd-MMM-yyyy\\'}}     {{exception.created_at | date:\\'hh:mm\\'}}</span></p></div></md-tooltip></span><span ng-if=\\\"col.field != \\'flag\\'\\\"><!-- Pro Column [color blue] --> <a target=_blank ng-href=/shipping-details-cmts/{{row.load_id}} ng-if=\\\"col.field == \\'load_id\\' \\\" class=text-strong>{{row[col.field] | capitalize}} </a><a ng-if=\\\"(col.field == \\'load_status\\') && ((row[col.field] | lowercase) != \\'delivered\\')\\\" target=_blank ng-href=/shipping-details-cmts/{{row.load_id}} ng-attr-style=\\\"color:{{vm.status_colors[row[col.field]][\\'color-code\\']}};display:block\\\" class=\\\"text-strong status_col\\\"><!--<img ng-if=\\\"vm.status_colors[row[col.field]][\\'icon\\']\\\" class=\\\"default_img\\\" alt=\\\"#\\\" ng-src=\\\"{{vm.status_colors[row[col.field]][\\'icon\\']}}\\\" height=\\\"30\\\" />\\r\\n\\r\\n <img ng-if=\\\"vm.status_colors[row[col.field]][\\'hover_icon\\']\\\" class=\\\"hover_img\\\" alt=\\\"#\\\" ng-src=\\\"{{vm.status_colors[row[col.field]][\\'hover_icon\\']}}\\\" height=\\\"30\\\" />--> <span ng-bind-html=\\\"row[col.field] | capitalize\\\"></span> </a><a ng-if=\\\"(col.field == \\'load_status\\') && ((row[col.field] | lowercase) == \\'delivered\\')\\\" target=_blank ng-href=/shipping-details-cmts/{{row.load_id}} ng-attr-style=\\\"color:{{vm.status_colors[row[col.field]][\\'color-code\\']}};display:block\\\" class=status_col><span ng-bind-html=\\\"row[col.field] | capitalize\\\"></span> </a><!-- Time --> <a target=_blank ng-href=/shipping-details-cmts/{{row.load_id}} ng-if=\\\"(col.field == \\'planned_start\\' || col.field == \\'planned_end\\')\\\" style=display:block>{{row[col.field] | date:\\'hh:mm:ss a\\'}} </a><!-- Remaining Columns --> <a target=_blank ng-href=/shipping-details-cmts/{{row.load_id}} ng-if=\\\"col.field != \\'load_id\\' && col.field != \\'load_status\\' && col.field != \\'planned_start\\' && col.field != \\'planned_end\\'\\\">{{( col.field == \\'planned_start\\' || col.field == \\'planned_end\\') ? (row[col.field] | date:\\'dd-MMM-yyyy hh:mm\\': \\'UTC\\') : row[col.field]}}</a></span></td></tr><tr ng-show=\\\"vm.noResults && !vm.isError\\\"><td colspan=100% style=\\\"text-align: center\\\" id=isResults><span translate=TRACKTRACE.NORESULTS></span></td></tr><tr ng-show=vm.isError><td colspan=100% style=\\\"text-align: center\\\" id=timedOut><span translate={{vm.error}}></span></td></tr></tbody></table></div></div>\");\n$templateCache.put(\"/app/track-trace/track-trace-cmts/server-table/sorterHeader.html\",\"<tr class=ng-table-sort-header><!-- Table Header --><th title={{$column.headerTitle(this)}} ng-repeat=\\\"$column in $columns\\\" ng-class=\\\"{ \\'sortable\\': $column.sortable(this),\\r\\n \\'sort-asc\\': params.sorting()[$column.sortable(this)]==\\'asc\\',\\r\\n \\'sort-desc\\': params.sorting()[$column.sortable(this)]==\\'desc\\'\\r\\n }\\\" ng-init=\\\"template = $column.headerTemplateURL(this)\\\" ng-if=$column.title(this) class={{$column.class(this)}} filter=\\\"{ age: \\'/app/track-trace/track-trace-cmts/server-table/filterHeader.html\\' }\\\"><div ng-if=!template><div ng-if=$column.static class=ng-table-header id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : aljexSortBy($column, $event)\\\"></span></span></div><div ng-if=!$column.static class=ng-table-header resizable r-directions=\\\"[\\'right\\']\\\" id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : aljexSortBy($column, $event)\\\"></span></span></div></div><div ng-if=template ng-include=template></div></th></tr>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/customize-results/customize-results-csl.html\",\"<md-dialog class=\\\"advanced-search xs-fullscreen\\\" aria-label=\\\"Customize Results Modal\\\" ng-controller=\\\"CustomizeResultsCslController as customizeCslCtrl\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><span hide-gt-xs show-xs hide-gt-xs>Customize Results</span><div layout=row hide-xs show-gt-xs flex=1><div flex=50 layout-margin><h2 translate=TRACKTRACE.ACTIVE_DATA></h2></div><div flex=50 layout-margin><h2 translate=TRACKTRACE.AVAILABLE_DATA></h2></div></div><span flex=auto hide-gt-xs show-xs></span><md-button class=md-icon-button ng-click=customizeCslCtrl.cancel()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content><div><div layout-gt-xs=row><div flex-gt-xs=50 flex-xs=1 class=\\\"active-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Active Columns</h3><!--<div layout=\\\"row\\\" ng-if=\\\"customizeCslCtrl.activeColumns.length > 11 || customizeCslCtrl.activeSearchField.length > 0\\\">\\r\\n <md-input-container flex=\\'90\\' class=\\\"md-block error-hidden\\\" flex-gt-sm=\\\"auto\\\">\\r\\n <label>{{\\'TRACKTRACE.SEARCH_ACTIVE_COLUMNS\\' | translate}}</label>\\r\\n <input type=\\\"text\\\"\\r\\n ng-model=\\\"customizeCslCtrl.activeSearchField\\\"\\r\\n ng-change=\\\"customizeCslCtrl.activeSearchChange()\\\"\\r\\n name=\\\"search\\\" />\\r\\n </md-input-container>\\r\\n <div flex=\\'10\\'>\\r\\n <md-button class=\\\"md-icon-button\\\" ng-click=\\\"customizeCslCtrl.clickedActiveSearchX()\\\">\\r\\n <md-icon aria-label=\\\"Close dialog\\\"></md-icon>\\r\\n </md-button>\\r\\n </div>\\r\\n </div>--><div class=sortable-container as-sortable=customizeCslCtrl.dragListener() ng-model=customizeCslCtrl.activeColumns ng-style=\\\"{ true: {height: customizeCslCtrl.colHeight + \\'px\\'}, false: {height: (customizeCslCtrl.colHeight + 76) +\\'px\\'}}[customizeCslCtrl.activeColumns.length > 120]\\\"><md-card ng-repeat=\\\"column in customizeCslCtrl.activeColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle><div layout=row flex=auto layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><!--<span flex=\\\"auto\\\" translate=\\\"{{column.title}}\\\"></span>--> <span flex=auto ng-bind-html=\\\"(column.title | translate).replace(\\'<br>\\',\\'\\')\\\"></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Remove Field\\\" ng-click=customizeCslCtrl.remove(column)><span translate=TRACKTRACE.REMOVE_BUTT></span></md-button></div></md-card-content></md-card></div></div><div flex-gt-xs=50 flex-xs=1 class=\\\"available-data-column sortable-wrapper\\\"><h3 class=\\\"mb-0 text-white\\\" hide-gt-xs>Available Columns</h3><div layout=row><md-input-container flex=\\\"{{customizeCslCtrl.availableSearchField.length > 0 ? 90 : 100}}\\\" class=\\\"md-block error-hidden\\\" flex-gt-sm=auto><label translate=TRACKTRACE.SEARCH_COLUMNS></label><input type=text ng-model=customizeCslCtrl.availableSearchField ng-change=customizeCslCtrl.availableSearchChange() name=search></md-input-container><div flex=10 ng-if=\\\"customizeCslCtrl.availableSearchField.length > 0\\\"><md-button class=\\\"md-icon-button btn-sm input-field-addon\\\" ng-click=customizeCslCtrl.clickedAvailableSearchX()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><div class=sortable-container as-sortable=customizeCslCtrl.dragListener() ng-model=customizeCslCtrl.availableColumns ng-style=\\\"{ true: {height: customizeCslCtrl.colHeight + \\'px\\'}, false: {height: (customizeCslCtrl.colHeight + 76) +\\'px\\'}}[true]\\\"><md-card ng-repeat=\\\"column in customizeCslCtrl.availableColumns\\\" as-sortable-item class=md-card-light><md-card-content as-sortable-item-handle ng-if=\\\"customizeCslCtrl.hasFinancialPermissions && column.field == \\'totalinvoiceamount\\' || column.field != \\'totalinvoiceamount\\'\\\"><div layout=row flex=auto layout-align=\\\"left center\\\"><md-button class=md-icon-button><md-icon></md-icon></md-button><!--<span flex=\\\"auto\\\" translate=\\\"{{column.title}}\\\"></span>--> <span flex=auto ng-bind-html=\\\"(column.title | translate).replace(\\'<br>\\',\\'\\')\\\"></span><md-button class=\\\"btn-sm btn-xs\\\" aria-label=\\\"Add Column\\\" ng-click=customizeCslCtrl.add(column)><span translate=TRACKTRACE.ADD_BUTT></span></md-button></div></md-card-content></md-card></div></div></div></div></md-dialog-content><md-dialog-actions layout=row class=dialog-footer-border><md-button aria-label=\\\"Cancel Customization\\\" ng-click=customizeCslCtrl.cancel() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button aria-label=\\\"Save As Default\\\" ng-click=customizeCslCtrl.saveToDefault()><span translate=TRACKTRACE.SAVE_DEFAULT_CRITERIA></span></md-button><md-button aria-label=\\\"Load Default Criteria\\\" ng-click=customizeCslCtrl.restoreDefault()><span translate=TRACKTRACE.RESTORE_DEFAULT_CRITERIA></span></md-button><md-button class=\\\"md-raised md-accent\\\" aria-label=\\\"Submit Customization\\\" ng-click=customizeCslCtrl.submit()><span translate=TRACKTRACE.SUBMIT></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/exports/export-csv.html\",\"<md-dialog class=export-csv aria-label=\\\"Export CSV\\\" ng-cloak><form class=dark-form><md-toolbar><div class=md-toolbar-tools><h2 translate=\\\"{{exportCsvLoaded ? \\'TRACKTRACE.EXPORT\\' : \\'TRACKTRACE.EXPORTING\\'}}\\\"></h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content flex-fill flex=auto style=\\\"min-height: 120px\\\"><div class=loadmask-light loadmask=exportCsvLoaded ng-if=!exportCsvLoaded style=position:absolute;top:52px;left:0;right:0;bottom:0></div><div class=md-dialog-content ng-show=exportCsvLoaded><p><span translate=TRACKTRACE.EXPORT_LINE_1 style=\\\"color: #ffffff\\\"></span></p><p><span translate=TRACKTRACE.EXPORT_LINE_2 style=\\\"color: #ffffff\\\"></span></p></div></md-dialog-content><md-dialog-actions layout=row ng-show=exportCsvLoaded><md-button ng-click=closeDialog() hide-xs><span translate=TRACKTRACE.CANCEL></span></md-button><span flex=auto></span><md-button class=\\\"md-raised md-accent\\\" ng-click=exportCustom()><span translate=TRACKTRACE.EXPORT_CUSTOM></span></md-button><md-button class=\\\"md-raised md-accent\\\" ng-click=exportAll()><span translate=TRACKTRACE.EXPORT_ALL></span></md-button></md-dialog-actions></form></md-dialog>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/exports/no-results.html\",\"<md-dialog class=\\\"export-csv md-card-light\\\" aria-label=\\\"Export CSV\\\" ng-cloak><md-toolbar><div class=md-toolbar-tools><h2 translate=TRACKTRACE.EXPORT></h2><span flex=auto></span><md-button class=md-icon-button ng-click=closeDialog()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=md-padding><p><span translate=TRACKTRACE.NORESULTS style=\\\"color: #ffffff\\\"></span></p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"end center\\\"><md-button class=md-raised ng-click=closeDialog()><span translate=TRACKTRACE.CANCEL></span></md-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/quick-search/quick-search.html\",\"<style>.state_dropdown{\\r\\n margin:0px;\\r\\n box-sizing:border-box;\\r\\n }\\r\\n\\r\\n .state_dropdown label{\\r\\n display:none;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete{\\r\\n padding: 0px;\\r\\n margin:0px;\\r\\n height: 68px;\\r\\n background-color: #fff;\\r\\n width: 100%;\\r\\n box-sizing:border-box;\\r\\n z-index:0;\\r\\n border-radius:0px;\\r\\n margin-top: -2px;\\r\\n margin-left: -2px;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete-wrap{\\r\\n padding: 0px;\\r\\n height: 68px;\\r\\n padding: 1.3rem;\\r\\n width: 100%;\\r\\n box-sizing:border-box;\\r\\n }\\r\\n\\r\\n .state_dropdown md-autocomplete-wrap button{\\r\\n display:none;\\r\\n }\\r\\n\\r\\n .state_dropdown input[type=\\'search\\']{\\r\\n border-bottom: 0px !important;\\r\\n }\\r\\n \\r\\n .light-form md-input-container .md-input:not([disabled]), .light-form md-select md-select-value{\\r\\n color: rgb(117,117,117) !important;\\r\\n }</style><form id=quick_search_form ng-submit=trackTraceCslCtrl.quickSearch(trackTraceCslCtrl.queryVal)><div layout-gt-xs=row layout-xs=column class=\\\"search-group {{trackTraceCslCtrl.aljexSearchType == \\'pickupapptdate\\' || trackTraceCslCtrl.aljexSearchType == \\'consigneeapptdate\\' ? \\'col-tablet-sm\\' : \\'\\'}}\\\"><div><!-- Search Options Menu --><md-menu md-position-mode=\\\"target target\\\" md-offset=\\\"0 60\\\"><md-button aria-label=\\\"Open demo menu\\\" class=\\\"md-raised search-type md-accent\\\" ng-click=$mdOpenMenu($event) layout-gt-xs=row><span ng-if=\\\"trackTraceCslCtrl.aljexSearchType == \\'shipment_status\\'\\\"><span class=responsive-ellipsis translate=Status></span> </span><span ng-if=\\\"trackTraceCslCtrl.aljexSearchType == \\'deliverydate\\'\\\"><span class=responsive-ellipsis translate=\\\"DELIVERY DATE\\\"></span> </span><span ng-if=\\\"trackTraceCslCtrl.aljexSearchType == \\'reference\\'\\\"><span class=responsive-ellipsis translate=\\\"REF #\\\"></span> </span><span ng-if=\\\"trackTraceCslCtrl.aljexSearchType == \\'pro\\'\\\"><span class=responsive-ellipsis translate=TRACKTRACE.PRO></span> </span><span ng-if=\\\"trackTraceCslCtrl.aljexSearchType == \\'pickupapptdate\\'\\\"><span class=responsive-ellipsis translate=\\\"PICK UP APPT DATE\\\"></span> </span><span ng-if=\\\"trackTraceCslCtrl.aljexSearchType == \\'consigneeapptdate\\'\\\"><span class=responsive-ellipsis translate=\\\"C/NEE APPT DATE\\\"></span> </span><span ng-if=\\\"trackTraceCslCtrl.aljexSearchType == \\'originstate\\'\\\"><span class=responsive-ellipsis translate=\\\"Pickup City / State\\\"></span> </span><span ng-if=\\\"trackTraceCslCtrl.aljexSearchType == \\'destinationstate\\'\\\"><span class=responsive-ellipsis translate=\\\"Delivery City / State\\\"></span></span><md-icon></md-icon></md-button><md-menu-content width=4><md-menu-item><md-button ng-click=\\\"trackTraceCslCtrl.aljexSearchChange(\\'shipment_status\\');\\\"><div layout=row><p flex=auto><span translate=STATUS></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Pickup Appointment Date\\\" ng-click=\\\"trackTraceCslCtrl.aljexSearchChange(\\'deliverydate\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"DELIVERY DATE\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button ng-click=\\\"trackTraceCslCtrl.aljexSearchChange(\\'reference\\');\\\"><div layout=row><p flex=auto><span translate=\\\"REF #\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By PRO #\\\" ng-click=\\\"trackTraceCslCtrl.aljexSearchChange(\\'pro\\');\\\"><div layout=row><p flex=auto><span translate=TRACKTRACE.PRO></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Pickup Appointment Date\\\" ng-click=\\\"trackTraceCslCtrl.aljexSearchChange(\\'pickupapptdate\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"PICK UP APPT DATE\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Search By Consignee Appointment Date\\\" ng-click=\\\"trackTraceCslCtrl.aljexSearchChange(\\'consigneeapptdate\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"C/NEE APPT DATE\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Pickup State\\\" ng-click=\\\"trackTraceCslCtrl.aljexSearchChange(\\'originstate\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"PICKUP CITY / STATE\\\"></span></p></div></md-button></md-menu-item><md-menu-item><md-button aria-label=\\\"Delivery State\\\" ng-click=\\\"trackTraceCslCtrl.aljexSearchChange(\\'destinationstate\\');\\\"><div layout=row><p flex=auto><span class=responsive-ellipsis translate=\\\"DELIVERY CITY / STATE\\\"></span></p></div></md-button></md-menu-item></md-menu-content></md-menu></div><div flex=auto class=light-form><!-- Search Field --><div ng-show=\\\"trackTraceCslCtrl.aljexSearchType == \\'reference\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCslCtrl.queryVal name=query maxlength=18 aria-label=\\\"Search By Reference Number\\\" placeholder=\\\"Search by {{\\'TRACKTRACE.REFERENCE_NUM\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- PRO --><div ng-show=\\\"trackTraceCslCtrl.aljexSearchType == \\'pro\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><input ng-model=trackTraceCslCtrl.queryVal name=query maxlength=7 placeholder=\\\"Search by {{\\'TRACKTRACE.PRO\\' | translate}}\\\" class=\\\"form-control clear-fields\\\"></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- STATUS --><div ng-show=\\\"trackTraceCslCtrl.aljexSearchType == \\'shipment_status\\'\\\"><div layout-gt-xs=row><div flex-gt-xs=93><md-select ng-model=trackTraceCslCtrl.queryVal ng-change=\\\"\\\" class=clear-fields placeholder=\\\"select a status\\\" md-on-open=trackTraceCslCtrl.onSelectOpen() md-on-close=trackTraceCslCtrl.onSelectClose() aria-label=\\\"select a status\\\"><md-option ng-repeat=\\\"status_list in trackTraceCslCtrl.statusOptionsVar.status_options\\\">{{status_list}}</md-option></md-select></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Pickup App Date --><div ng-show=\\\"trackTraceCslCtrl.aljexSearchType == \\'pickupapptdate\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCslCtrl.aljexMinDate mdp-placeholder=\\\"From Pickup Appointment Date\\\" ng-change=trackTraceCslCtrl.dateChanged() ng-model=trackTraceCslCtrl.pickupapptdate_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCslCtrl.aljexMinDate mdp-placeholder=\\\"To Pickup Appointment Date\\\" ng-change=trackTraceCslCtrl.dateChanged() ng-model=trackTraceCslCtrl.pickupapptdate_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCslCtrl.pickupDateRangeSelect ng-change=trackTraceCslCtrl.selectRange() placeholder=\\\"or select a range\\\" md-on-open=trackTraceCslCtrl.onSelectOpen() md-on-close=trackTraceCslCtrl.onSelectClose() aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCslCtrl.aljexRanges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Pickup App Date --><div ng-show=\\\"trackTraceCslCtrl.aljexSearchType == \\'deliverydate\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCslCtrl.aljexMinDate mdp-placeholder=\\\"From Delivery Date\\\" ng-change=trackTraceCslCtrl.dateChanged() ng-model=trackTraceCslCtrl.deliverydate_start_date></mdp-date-picker></div></div><div flex-gt-xs=31><div class=date-picker-wrapper><mdp-date-picker mdp-min-date=trackTraceCslCtrl.aljexMinDate mdp-placeholder=\\\"To Delivery Date\\\" ng-change=trackTraceCslCtrl.dateChanged() ng-model=trackTraceCslCtrl.deliverydate_end_date></mdp-date-picker></div></div><div flex-gt-xs=31><md-select ng-model=trackTraceCslCtrl.deliveryDateRangeSelect ng-change=trackTraceCslCtrl.selectRange() placeholder=\\\"or select a range\\\" md-on-open=trackTraceCslCtrl.onSelectOpen() md-on-close=trackTraceCslCtrl.onSelectClose() aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCslCtrl.aljexRanges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- Consignee App Date --><div ng-show=\\\"trackTraceCslCtrl.aljexSearchType == \\'consigneeapptdate\\'\\\" class=date-search><div layout-gt-xs=row class=col-tablet-sm><div flex-gt-xs=31><mdp-date-picker mdp-min-date=trackTraceCslCtrl.aljexMinDate mdp-placeholder=\\\"From Consignee Appointment Date\\\" ng-change=trackTraceCslCtrl.dateChanged() ng-model=trackTraceCslCtrl.consigneeapptdate_start_date></mdp-date-picker></div><div flex-gt-xs=31><mdp-date-picker mdp-min-date=trackTraceCslCtrl.aljexMinDate mdp-placeholder=\\\"To Consignee Appointment Date\\\" ng-change=trackTraceCslCtrl.dateChanged() ng-model=trackTraceCslCtrl.consigneeapptdate_end_date></mdp-date-picker></div><div flex-gt-xs=31><md-select ng-model=trackTraceCslCtrl.consigneeDateRangeSelect ng-change=trackTraceCslCtrl.selectRange() placeholder=\\\"or select a range\\\" md-on-open=trackTraceCslCtrl.onSelectOpen() md-on-close=trackTraceCslCtrl.onSelectClose() aria-label=\\\"or select a range\\\"><md-option ng-repeat=\\\"range in trackTraceCslCtrl.aljexRanges\\\" value={{range}}>{{range.name}}</md-option></md-select></div><!-- Search Button --><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- OriginState --><div ng-show=\\\"trackTraceCslCtrl.aljexSearchType == \\'originstate\\'\\\" class=date-search><div layout-gt-xs=row><div flex-gt-xs=93><!--<input ng-model=\\\"query\\\" name=\\\"query\\\" placeholder=\\\"Search by {{\\'TRACKTRACE.ORIGIN_CITYSTATE\\' | translate}}\\\" class=\\\"form-control\\\">--><md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\"><md-autocomplete md-no-cache=false md-selected-item=trackTraceCslCtrl.selectedItem md-search-text-change=\\\"\\\" md-search-text=trackTraceCslCtrl.searchOriginText md-items=\\\"item in trackTraceCslCtrl.getMatch(trackTraceCslCtrl.searchOriginText)\\\" md-item-text=item placeholder=\\\"Enter pickup city / state\\\"><md-item-template><span md-highlight-text=trackTraceCslCtrl.searchOriginText md-highlight-flags=^i>{{item}}</span></md-item-template><md-not-found>No city/states matching \\\"{{trackTraceCslCtrl.searchOriginText}}\\\" were found.</md-not-found></md-autocomplete></md-input-container></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div><!-- DestinationState --><div ng-show=\\\"trackTraceCslCtrl.aljexSearchType == \\'destinationstate\\'\\\" class=date-search><div layout-gt-xs=row><div flex-gt-xs=93><!--<input ng-model=\\\"query\\\"\\r\\n name=\\\"query\\\"\\r\\n placeholder=\\\"Search by {{\\'TRACKTRACE.DESTINATION_CITYSTATE\\' | translate}}\\\"\\r\\n class=\\\"form-control\\\">--><md-input-container class=\\\"md-block error-hidden form-control state_dropdown\\\"><md-autocomplete md-no-cache=false md-selected-item=trackTraceCslCtrl.selectedItem md-search-text-change=\\\"\\\" md-search-text=trackTraceCslCtrl.searchDestinationText md-items=\\\"item in trackTraceCslCtrl.getMatch(trackTraceCslCtrl.searchDestinationText)\\\" md-item-text=item placeholder=\\\"Enter delivery city / state\\\"><md-item-template><span md-highlight-text=trackTraceCslCtrl.searchDestinationText md-highlight-flags=^i>{{item}}</span></md-item-template><md-not-found>No city/states matching \\\"{{trackTraceCslCtrl.searchDestinationText}}\\\" were found.</md-not-found></md-autocomplete></md-input-container></div><md-button class=\\\"md-raised md-accent btn-search-date\\\" aria-label=search type=submit><md-icon></md-icon></md-button></div></div></div></div></form>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/server-table/filterDate.html\",\"<mdp-date-picker ng-model=vm.filters[name] ng-change=vm.filterDate(name) class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-date-picker>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/server-table/filterDefault.html\",\"<md-input-container class=error-hidden><input type=text name={{name}} ng-disabled=$filterRow.disabled ng-model=params.filter()[name] ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" ng-minlength=3 class=\\\"input-filter form-control ng-pristine ng-untouched ng-valid ng-scope ng-empty\\\" aria-invalid=false></md-input-container>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/server-table/filterHeader.html\",\"<tr ng-show=show_filter class=ng-table-filters><th data-title-text=\\\"{{$column.titleAlt(this) || $column.title(this)}}\\\" ng-repeat=\\\"$column in $columns\\\" ng-if=$column.show(this) class=\\\"filter {{$column.class(this)}}\\\"><div ng-repeat=\\\"(name, filter) in $column.filter(this)\\\"><div ng-include=config.getTemplateUrl(filter)></div></div></th></tr>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/server-table/filterMilestone.html\",\"<md-input-container class=md-block><md-select ng-model=params.filter()[name] id=params.filter()[name] name={{name}} ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" ng-disabled=$filterRow.disabled md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() aria-label={{name}}><md-option ng-value=null>—</md-option><md-option ng-value=0>Open</md-option><md-option ng-value=1><!-- ng-value used to set true or false which ng-table needs --> Covered</md-option><md-option ng-value=2>Pickup</md-option><md-option ng-value=3>Dispatched</md-option><md-option ng-value=4>Loaded</md-option><md-option ng-value=5>Consignee</md-option><md-option ng-value=6>Delivered</md-option></md-select></md-input-container>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/server-table/filterStatus.html\",\"<md-input-container class=md-block><md-select ng-model=params.filter()[name] id=params.filter()[name] name={{name}} ng-change=\\\"vm.updateFilteredCounts(name, params.filter()[name])\\\" ng-disabled=$filterRow.disabled md-on-open=vm.onSelectOpen() md-on-close=vm.onSelectClose() aria-label={{name}}><md-option ng-value=null>—</md-option><!--<md-option ng-value=\\\"0\\\">\\r\\n Delivered\\r\\n </md-option>\\r\\n <md-option ng-value=\\\"1\\\">\\r\\n Undelivered\\r\\n </md-option>\\r\\n <md-option ng-value=\\\"\\'n/a\\'\\\">\\r\\n N/A\\r\\n </md-option>\\r\\n <md-option ng-value=\\\"8\\\">\\r\\n Released\\r\\n </md-option>--><md-option ng-repeat=\\\"status_list in trackTraceCslCtrl.statusOptionsVar.status_options\\\">{{status_list}}</md-option></md-select></md-input-container>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/server-table/filterTime.html\",\"<mdp-time-picker ng-model=vm.filters[name] ng-change=vm.filterTime(name) class=\\\"error-hidden no-webkit-ui\\\" md-no-ink></mdp-time-picker>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/server-table/header.html\",\"<ng-table-sorter-csl-row-server-table></ng-table-sorter-csl-row-server-table><!--<ng-table-filter-row-aljex-cview></ng-table-filter-row-aljex-cview>--><ng-table-filter-row-cview></ng-table-filter-row-cview>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/server-table/pagination.html\",\"<div class=\\\"ng-table-pager m-t-sm ng-scope\\\" ng-if=params.data.length ng-controller=\\\"ServerTableCslController as vm\\\"><div layout-gt-xs=row layout-xs=column><div><ul ng-if=pages.length data-ng-init=params.total(100) class=\\\"pagination ng-table-pagination ng-scope\\\"><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=\\\"ng-scope disabled\\\"><a ng-switch-when=prev ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope>«</a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=first ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>1</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=page ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>2</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=last ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope><span ng-bind=page.number class=ng-binding>3</span></a></li><li ng-class=\\\"{\\'disabled\\': !page.active && !page.current, \\'active\\': page.current}\\\" ng-repeat=\\\"page in pages\\\" ng-switch=page.type class=ng-scope><a ng-switch-when=next ng-click=vm.aljex_page_number(page.number);params.page(page.number) href=\\\"\\\" class=ng-scope>»</a></li></ul></div><span flex></span><div ng-if=params.settings().counts.length class=\\\"ng-table-counts btn-group pull-right ng-scope\\\"><div><md-button ng-repeat=\\\"count in params.settings().counts\\\" ng-class=\\\"{\\'md-primary\\':params.count()==count}\\\" ng-click=vm.aljex_per_page(count);params.count(count) aria-label=\\\"Results Per Page\\\" class=\\\"md-raised md-default\\\"><span ng-bind=count class=ng-binding></span></md-button></div><span class=md-caption>Records per page</span></div></div></div>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/server-table/server-table.html\",\"<style>.status_col img{\\r\\n vertical-align: middle; margin-right:10px; display:inline;\\r\\n}\\r\\n\\r\\n.status_col .hover_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .default_img{\\r\\n display:none;\\r\\n}\\r\\n\\r\\n.status_col:hover > .hover_img{\\r\\n display:inline;\\r\\n}</style><div ng-controller=\\\"ServerTableCslController as vm\\\" class=table-scroll ng-style=\\\"(vm.noResults || vm.isError) ? {\\'overflow-x\\':\\'hidden\\'} : {}\\\"><div class=loadmask-light loadmask=!vm.isLoading><table style=\\\"width: 100%\\\" ng-table-dynamic=\\\"vm.tableParams with vm.columns\\\" template-header=/app/track-trace/track-trace-csl/server-table/header.html template-pagination=/app/track-trace/track-trace-csl/server-table/pagination.html class=card-table show-filter=trackTraceCslCtrl.filtersVisible><tbody><tr ng-repeat=\\\"row in $data\\\"><td ng-repeat=\\\"col in $columns\\\" ng-if=col.field><span class=hoverable ng-if=\\\"col.field == \\'flag\\'\\\"><md-icon ng-show=row.exceptions.length class=current-exception title=\\\"current exception\\\" aria-label=\\\"current exception\\\" ng-mouseover=vm.getException(row.exceptions)></md-icon><md-tooltip md-direction=right><md-progress-circular md-mode=indeterminate class=\\\"md-warn md-hue-2\\\" ng-show=vm.tooltipIsLoading></md-progress-circular><div ng-show=!vm.tooltipIsLoading ng-repeat=\\\"exception in row.exceptions\\\"><p>Current Exception: <span>{{exception.pointname}}</span></p><p>Date / Time Created: <span>{{exception.created_at | date:\\'dd-MMM-yyyy\\': \\'UTC\\'}}     {{exception.created_at | date:\\'hh:mm\\'}}</span></p></div></md-tooltip></span><span ng-if=\\\"col.field != \\'flag\\'\\\"><!-- Pro Column [color blue] --> <a target=_blank ng-href=/shipping-details-csl/{{row.pro}} ng-if=\\\"col.field == \\'pro\\' \\\" class=text-strong>{{row[col.field] | capitalize}} </a><a ng-if=\\\"(col.field == \\'status\\') && ((row[col.field] | lowercase) != \\'delivered\\')\\\" target=_blank ng-href=/shipping-details-csl/{{row.pro}} ng-attr-style=\\\"color:{{vm.status_colors[row[col.field]][\\'color-code\\']}};display:block\\\" class=\\\"text-strong status_col\\\"><!--<img ng-if=\\\"vm.status_colors[row[col.field]][\\'icon\\']\\\" class=\\\"default_img\\\" alt=\\\"#\\\" ng-src=\\\"{{vm.status_colors[row[col.field]][\\'icon\\']}}\\\" height=\\\"30\\\" />\\r\\n\\r\\n <img ng-if=\\\"vm.status_colors[row[col.field]][\\'hover_icon\\']\\\" class=\\\"hover_img\\\" alt=\\\"#\\\" ng-src=\\\"{{vm.status_colors[row[col.field]][\\'hover_icon\\']}}\\\" height=\\\"30\\\" />--> <span ng-bind-html=\\\"row[col.field] | capitalize\\\"></span> </a><a ng-if=\\\"(col.field == \\'status\\') && ((row[col.field] | lowercase) == \\'delivered\\')\\\" target=_blank ng-href=/shipping-details-csl/{{row.pro}} ng-attr-style=\\\"color:{{vm.status_colors[row[col.field]][\\'color-code\\']}};display:block\\\" class=status_col><span ng-bind-html=\\\"row[col.field] | capitalize\\\"></span> </a><!-- Time --> <a target=_blank ng-href=/shipping-details-csl/{{row.pro}} ng-if=\\\"(col.field == \\'pickupappttime\\' || col.field == \\'consigneeappttime\\' || col.field == \\'lastcheckcalltime\\' || col.field == \\'deliverytime\\')\\\" style=display:block>{{row[col.field] | date:\\'hh:mm:ss a\\'}} </a><!-- Remaining Columns --> <a target=_blank ng-href=/shipping-details-csl/{{row.pro}} ng-if=\\\"col.field != \\'pro\\' && col.field != \\'status\\' && col.field != \\'consigneeappttime\\' && col.field != \\'pickupappttime\\' && col.field != \\'lastcheckcalltime\\' && col.field != \\'deliverytime\\' \\\"><!--{{( col.field == \\'deliverydate\\' || col.field == \\'lastcheckcalldate\\' || col.field == \\'pickupapptdate\\' || col.field == \\'consigneeapptdate\\' || col.field == \\'billeddate\\' || col.field == \\'shipdate\\' || col.field == \\'loadeddate\\' || col.field == \\'duedate\\' || col.field == \\'pickupapptdateline2\\' || col.field == \\'pickupdate\\' ) ? (row[col.field] | date:\\'dd-MMM-yyyy\\') : row[col.field]}}--> <span ng-bind-html=\\\"( col.field == \\'deliverydate\\' || col.field == \\'lastcheckcalldate\\' || col.field == \\'pickupapptdate\\' || col.field == \\'consigneeapptdate\\' || col.field == \\'billeddate\\' || col.field == \\'shipdate\\' || col.field == \\'loadeddate\\' || col.field == \\'duedate\\' || col.field == \\'pickupapptdateline2\\' || col.field == \\'pickupdate\\' ) ? (row[col.field] | date:\\'dd-MMM-yyyy\\': \\'UTC\\') : row[col.field]\\\"></span></a></span></td></tr><tr ng-show=\\\"vm.noResults && !vm.isError\\\"><td colspan=100% style=\\\"text-align: center\\\" id=isResults><span translate=TRACKTRACE.NORESULTS></span></td></tr><tr ng-show=vm.isError><td colspan=100% style=\\\"text-align: center\\\" id=timedOut><span translate={{vm.error}}></span></td></tr></tbody></table></div></div>\");\n$templateCache.put(\"/app/track-trace/track-trace-csl/server-table/sorterHeader.html\",\"<tr class=ng-table-sort-header><!-- Table Header --><th title={{$column.headerTitle(this)}} ng-repeat=\\\"$column in $columns\\\" ng-class=\\\"{ \\'sortable\\': $column.sortable(this),\\r\\n \\'sort-asc\\': params.sorting()[$column.sortable(this)]==\\'asc\\',\\r\\n \\'sort-desc\\': params.sorting()[$column.sortable(this)]==\\'desc\\'\\r\\n }\\\" ng-init=\\\"template = $column.headerTemplateURL(this)\\\" ng-if=$column.title(this) class={{$column.class(this)}} filter=\\\"{ age: \\'/app/track-trace/track-trace-csl/server-table/filterHeader.html\\' }\\\"><div ng-if=!template><div ng-if=$column.static class=ng-table-header id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : aljexSortBy($column, $event)\\\"></span></span></div><div ng-if=!$column.static class=ng-table-header resizable r-directions=\\\"[\\'right\\']\\\" id=\\\"{{$column.title(this) | slug }}\\\" style={{getHeaderWidth($column.title(this))}} ng-click=\\\"params.sorting().$column.field=\\'asc\\'\\\" ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'div\\'}\\\"><span ng-class=\\\"{\\'sort-indicator\\': params.settings().sortingIndicator == \\'span\\'}\\\"><span translate={{$column.title(this)}} ng-click=\\\"!sortClickable($event) ? null : aljexSortBy($column, $event)\\\"></span></span></div></div><div ng-if=template ng-include=template></div></th></tr>\");\n$templateCache.put(\"/app/admin/lensview/companies/modals/delete-companies.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>Remove Companies</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This action will remove {{tctrl.listSelectedCount}} Companies</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=tctrl.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=tctrl.bulkDelete() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/companies/modals/generic-exception.error.modal.html\",\"<md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>ERROR OCCURED</h2><span flex=auto></span><md-button class=md-icon-button ng-click=vm.closemodal()><md-icon aria-label=\\\"close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><span layout=row><p>{{ messages }}</p></span></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=vm.closemodal() ng-disabled=vm.isactiondisabled>{{\\'close\\' | translate}}</md-button><span flex=auto></span></md-dialog-actions></md-dialog><!-- <md-toast>\\r\\n <div layout=\\\"row\\\">\\r\\n <md-icon class=\\\"text-danger\\\">error</md-icon>\\r\\n <span flex> \\r\\n <p> EXCEPTION ERROR </p>\\r\\n {{messages}}\\r\\n </span>\\r\\n </div>\\r\\n</md-toast> -->\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/activate-department-demo.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Successfully Activated Demo Feature</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/cfs-delete-exception.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>CFS Exception Approvers removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/company-delete.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=column layout-align=\\\"center start\\\"><p>Company removed Successfully</p><span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/company-update.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><span ng-repeat=\\\"message in message track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/company-update.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Company Updated Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/deactivate-department-demo.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Successfully Deactivated Demo Feature</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/delete-company.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'COMPANY.DELETED_ERROR\\' | translate}}</p><!-- <span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span> --> {{messages}}</span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/delete-department.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Successfully Deleted Departments</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/delete-exception.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>CSL Exception Approvers removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/department-update.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><p>{{messages}}</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/posted-email-exception.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Exception Posted. Email to Users Sent Successfully!</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/posted-exception.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Exception Posted!</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/rejected-exception.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Pending Exception Rejected!</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/save-department.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Successfully Saved Department</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/companies/toast/update-department.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><p>Successfully Updated Department</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/users/modals/delete-users.modal.html\",\"<!-- CreatePotentialExceptionsController as vm --><md-dialog class=\\\"md-card-light m-t small-dialog\\\"><md-toolbar><div class=md-toolbar-tools><h2>Remove Users</h2><span flex=auto></span><md-button class=md-icon-button ng-click=tctrl.closeModal()><md-icon aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></md-toolbar><md-dialog-content class=\\\"light-content md-padding\\\"><p>This action will remove {{tctrl.listSelectedCount}} users</p></md-dialog-content><md-dialog-actions layout=row layout-align=\\\"start center\\\"><md-button ng-click=tctrl.closeModal()>{{\\'ADMIN.POTENTIAL.CANCEL\\' | translate}}</md-button><span flex=auto></span><loading-button callfunction=tctrl.bulkDelete() display=ADMIN.POTENTIAL.CONFIRM isloading=tctrl.isActionLoading.confirmDelete></loading-button></md-dialog-actions></md-dialog>\");\n$templateCache.put(\"/app/admin/lensview/users/toast/delete-user.error.html\",\"<md-toast><div layout=row><md-icon class=text-danger>error</md-icon><span flex><p>{{\\'USER.DELETED_ERROR\\' | translate}}</p><!-- <span ng-repeat=\\\"message in messages track by $index\\\"><p>{{message}}</p></span> --> {{messages}}</span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/users/toast/delete-user.success.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=green-color>check</md-icon><span layout=row><!-- <p>{{\\'USER.DELETED\\' | translate}}</p>\\r\\n <span ng-repeat=\\\"message in messages\\\"><p>{{message}}</p></span> --><p>User removed Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/users/toast/update-user.error.html\",\"<md-toast><div layout=row layout-align=\\\"center center\\\"><md-icon class=text-danger>error</md-icon><span layout=row><span ng-repeat=\\\"message in message track by $index\\\"><p>{{message}}</p></span></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/lensview/users/toast/update-user.success.html\",\"<md-toast><div layout=row><md-icon class=green-color>check</md-icon><span flex=auto><p>User Updated Successfully</p></span></div></md-toast>\");\n$templateCache.put(\"/app/admin/support-requests/add-user/preview/preview.html\",\"<style>button{\\r\\n color:#ece6e6;\\r\\n font-size:15px;\\r\\n padding:13px 50px 13px 50px;\\r\\n border-radius:5px;\\r\\n min-width:170px;\\r\\n margin:5px 0px 5px 0px;\\r\\n }\\r\\n\\r\\n .add_user_edit_btn{\\r\\n border:1px solid #50afe3;\\r\\n background-color:#50afe3;\\r\\n }\\r\\n\\r\\n .add_user_approve_btn{\\r\\n border:1px solid #2fc269;\\r\\n background-color:#2fc269;\\r\\n }\\r\\n\\r\\n .add_user_approve_btn[disabled=\\'disabled\\']{\\r\\n border:1px solid #2e7b59;\\r\\n background-color:#2e7b59;\\r\\n color:#95b1aa;\\r\\n }\\r\\n\\r\\n .add_user_reject_btn{\\r\\n border:1px solid #45afe3;\\r\\n background-color:#d0011b;\\r\\n }\\r\\n\\r\\n .error-div{\\r\\n position: relative;;\\r\\n background-color: #d0021b;margin: 40px 15px 20px;\\r\\n min-height: 50px;border-radius: 5px;\\r\\n min-height: 65px;\\r\\n }</style><script src=http://cwl-dc01-app01-okta.cranewwl.internal/faye/faye.js></script><cva-shell ng-if=\\\"(vm.readOnly != true) && (vm.readOnlyView != true)\\\" class=support_request_addUser><div loadmask=!vm.isLoading.account loadmask-fixed-center=true class=loadmask-light></div><div ng-if=!vm.failedToRetrieveData class=\\\"shell-padding shipping-details content-max loadmask-dark loadmask-opaque full-page-loading page-loaded-{{!vm.isLoading.account}}\\\" id=toast-parent><div class=\\\"view-header md-fab md-fab-top-right\\\"><div layout=column layout-gt-sm=row layout-align=\\\"space-around start\\\" layout-align-gt-sm=\\\"space-between center\\\"><div><h2><span class=md-display-1>User Request #{{vm.account_ticket.id}}</span></h2><div><span class=\\\"breadcrumb flat\\\"><a href=/supportRequests class=parent-link><span>Support Requests / <span class=color-ffffff>User Request #{{vm.account_ticket.id}}</span></span></a></span></div></div><div><div><button class=add_user_reject_btn ng-click=\\\"vm.changeAccountStatus(\\'rejected\\')\\\" ng-if=\\\"vm.account_ticket.status != \\'awaiting_user_creation\\' && vm.account_ticket.status != \\'completed\\' && vm.account_ticket.status != \\'rejected\\' && vm.account_ticket.status != \\'open\\'\\\">Reject</button> <button ng-if=\\\"vm.account_ticket.status != \\'completed\\' && vm.account_ticket.status != \\'rejected\\'\\\" ng-click=vm.rediretToUserEdit(vm.account_ticket.id) class=add_user_edit_btn>Edit</button> <button ng-if=\\\"vm.account_ticket.status == \\'open\\' && vm.account_ticket.status != \\'completed\\' && vm.account_ticket.status != \\'rejected\\'\\\" class=add_user_approve_btn ng-click=\\\"vm.changeAccountStatus(\\'in_review\\')\\\"><!--Mark Awaiting Approval--> Mark in Review</button> <button ng-disabled=vm.account_ticket.bad_party_ids.length ng-if=\\\"vm.account_ticket.status != \\'awaiting_user_creation\\' && vm.account_ticket.status != \\'open\\' && vm.account_ticket.status != \\'completed\\' && vm.account_ticket.status != \\'rejected\\'\\\" class=add_user_approve_btn ng-click=\\\"vm.changeAccountStatus(\\'awaiting_user_creation\\')\\\">Approve</button> <button ng-if=\\\"vm.account_ticket.status == \\'awaiting_user_creation\\' && vm.account_ticket.status != \\'completed\\' && vm.account_ticket.status != \\'rejected\\'\\\" class=add_user_approve_btn ng-click=\\\"vm.changeAccountStatus(\\'completed\\')\\\">Create Users</button></div></div></div></div><!-- Errors Div --><div layout=row ng-if=\\\"vm.account_ticket.bad_party_ids.length && vm.account_ticket.status == \\'in_review\\'\\\" ng-attr-style=\\\"display:{{vm.errorDivCheck==false ? \\'\\' : \\'none\\'}}\\\" layout-wrap class=error-div><div flex=80 style=\\\"padding: 22px\\\"><span style=\\\"font-size: 16px\\\">{{vm.account_ticket.bad_party_ids.length}} Errors Found. Please Correct in order to proceed</span></div><div flex=20 style=\\\"padding: 10px;right: 0px;position: absolute\\\"><md-button class=md-icon-button ng-click=vm.closeErrorDiv()><md-icon style=\\\"font-size: 30px;color: #fff\\\" aria-label=\\\"Close dialog\\\"></md-icon></md-button></div></div><md-card><md-card-content><div class=header><div class=header_text layout=column layout-align=\\\"space-around start\\\" layout-gt-xs=row layout-align-gt-xs=\\\"space-between center\\\"><div>New User Request</div><div class=status-text>{{vm.account_ticket.status | capitalize}}</div></div></div><div class=company_name><div class=text>Company</div></div><div class=spectrum_group layout=row style=min-height:45px><md-input-container class=\\\"md-block error-hidden\\\" flex=100><input type=text ng-model=vm.account_ticket.company.name placeholder=\\\"Company Name\\\" disabled></md-input-container></div><div class=user_accounts><div class=text>Accounts</div></div><div class=user_add_div><div layout=column layout-gt-xs=row class=\\\"table-scroll user_add_list\\\"><!-- <table cellspacing=\\\"0\\\" style=\\\"width:100%; min-width:800px;\\\" >\\r\\n <thead>\\r\\n <tr>\\r\\n <th class=\\\"td-20\\\">First Name</th>\\r\\n <th class=\\\"td-20\\\">Last Name</th>\\r\\n <th class=\\\"td-20\\\">Email</th>\\r\\n <th class=\\\"td-20\\\">Department</th>\\r\\n <th class=\\\"td-20\\\">\\r\\n <div flex=\\\"100\\\" layout=\\\"row\\\" layout-align=\\\"center center\\\">\\r\\n Override\\r\\n </div>\\r\\n </th>\\r\\n </tr>\\r\\n </thead>\\r\\n <tbody>\\r\\n <tr ng-repeat=\\\"user_list in vm.account_ticket.user_accounts\\\" class=\\\"user_list\\\">\\r\\n <td class=\\\"td-20\\\">{{user_list.first_name}}</td>\\r\\n <td class=\\\"td-20\\\">{{user_list.first_name}}</td>\\r\\n <td class=\\\"td-20\\\">{{user_list.email}}</td>\\r\\n <td class=\\\"td-20\\\">\\r\\n <span ng-repeat=\\\"dept in user_list.departments\\\">{{dept.name}}<span ng-if=\\\"!$last\\\">,</span>\\r\\n </span>\\r\\n </td>\\r\\n <td class=\\\"td-20\\\">\\r\\n\\r\\n <div flex=\\\"100\\\" layout=\\\"row\\\" layout-align=\\\"center end\\\">\\r\\n\\r\\n <span\\r\\n\\r\\n ng-show=\\\"user_list.primary_contact.id || user_list.bccs.length || user_list.party_group_ids.length\\\"\\r\\n ng-attr-class=\\\"override {{(user_list.party_group_ids.length)?((vm.getMatchArray(user_list.party_group_ids) && vm.account_ticket.status == \\'in_review\\') ? \\'user-error-data\\' : \\'no-error\\'):\\'\\'}}\\\"\\r\\n ng-click=\\\"vm.display_overrides(user_list)\\\">Overrides</span>\\r\\n\\r\\n <span\\r\\n ng-show=\\\"!user_list.primary_contact && !user_list.bccs.length && !user_list.party_group_ids.length\\\"\\r\\n class=\\\"no_override\\\">No overrides</span>\\r\\n\\r\\n </div>\\r\\n\\r\\n </td>\\r\\n </tr>\\r\\n </tbody>\\r\\n </table> --><table class=table-static cellspacing=0 border=0 style=\\\"width: 95%; min-width:800px\\\"><thead class=header-table><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-5><div class=label>FIRST NAME</div></th><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-5><div class=label>LAST NAME</div></th><th style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-10><div class=label>EMAIL</div></th><th ng-if=vm.departmentAccess style=\\\"text-align: start;padding-left: 0;font-size: 13px\\\" class=td-10><div class=label>DEPARTMENT</div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px\\\">Pathway</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:35px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">ACCESS</span></div><div style=\\\"width:55px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">ROLE</span></div></div></div></th><th style=\\\"text-align: start;padding-left: 0\\\" class=td-20><div layout=column class=\\\"label cust_type\\\"><div style=\\\"margin-bottom:8px;text-align: center;font-size: 13px\\\">CUSTOMER TYPE</div><div layout=row layout-align=\\\"space-between center\\\"><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CWW</span></div><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CSL</span></div><div style=\\\"width:50px;text-align: center;border-right: 1px dotted #d2d2d2\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">CFS</span></div><div style=\\\"width:50px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span style=\\\"font-size: 11px\\\">FINANCIAL</span></div></div></div></th><th style=\\\"text-align: center;padding-left: 0;font-size: 13px\\\" class=td-10><div class=label>OVERRIDES</div></th></thead><tbody><tr class=user_list ng-repeat=\\\"item in vm.account_ticket.user_accounts\\\"><td style=\\\"height: 70px\\\"><div flex=100>{{item.first_name}}</div></td><td style=\\\"height: 70px\\\"><div flex=100>{{item.last_name}}</div></td><td style=\\\"height: 70px\\\"><div flex=100>{{item.email}}</div></td><td ng-if=vm.departmentAccess style=\\\"height: 70px\\\"><div flex=100><span class=label style=\\\"font-weight: 600;font-size: 13px\\\" flex=100 layout=row layout-align=\\\"center center\\\"><span ng-if=\\\"(item.cww_overrides.department.id || item.csl_overrides.department.id || item.cfs_overrides.department.id)\\\" class=override ng-click=vm.display_departments(item)>{{ (item.cww_overrides.department.id ? 1 : 0) + (item.csl_overrides.department.id ? 1 : 0) + (item.cfs_overrides.department.id ? 1 : 0) }} <span ng-if=\\\"((item.cww_overrides.department.id ? 1 : 0) + (item.csl_overrides.department.id ? 1 : 0) +\\r\\n (item.cfs_overrides.department.id ? 1 : 0) == 1)\\\">Department</span> <span ng-if=\\\"((item.cww_overrides.department.id ? 1 : 0) + (item.csl_overrides.department.id ? 1 : 0) +\\r\\n (item.cfs_overrides.department.id ? 1 : 0) > 1)\\\">Departments</span> </span><span ng-if=\\\"(!item.cww_overrides.department.id && !item.csl_overrides.department.id && !item.cfs_overrides.department.id)\\\" class=no_override>No Departments</span></span></div></td><td style=\\\"height: 70px\\\"><div layout=column class=\\\"label cust_type\\\"><div layout=row layout-align=\\\"space-between center\\\" style=\\\"padding: 0px\\\"><div style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.classic_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.classic_access class=material-icons style=\\\"color: red\\\">clear</i></div><div style=\\\"width:75px;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><span flex=100><span ng-if=\\\"(item.classic_role == \\'customer_classic\\')\\\">Customer</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_ops\\')\\\">Customer Ops</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_consignee\\')\\\">Consignee</span> <span ng-if=\\\"(item.classic_role == \\'classic_customer_shipper\\')\\\">Shipper</span> <span ng-if=\\\"(item.classic_role == \\'\\')\\\">N/A</span></span></div></div></div></td><td style=\\\"height: 70px\\\"><span><div layout=row layout-align=\\\"space-between center\\\"><!-- CWW md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.cww_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.cww_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- CSL md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.csl_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.csl_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- CFS md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.cfs_access class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.cfs_access class=material-icons style=\\\"color: red\\\">clear</i></div><!-- FINACIAL md-switch --><div style=\\\"padding: 0;text-align: center\\\" layout-align=\\\"start center\\\" flex=100><i ng-if=item.financial class=material-icons style=\\\"color: #48c267\\\">check</i> <i ng-if=!item.financial class=material-icons style=\\\"color: red\\\">clear</i></div></div></span></td><td style=\\\"height: 70px\\\"><div flex=100><span class=label style=\\\"font-weight: 600;font-size: 13px\\\" flex=100 layout=row layout-align=\\\"center center\\\"><span ng-if=\\\"(item.cww_overrides.primary_contact.id || item.cww_overrides.bccs.length || item.cww_overrides.party_group_ids.length || item.csl_overrides.primary_contact.id || item.csl_overrides.bccs.length || item.csl_overrides.customer_ids.length || item.cfs_overrides.primary_contact.id || item.cfs_overrides.bccs.length || item.cfs_overrides.customer_ids.length)\\\" class=override ng-click=vm.display_overrides(item)>{{ (item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length}} <span ng-if=\\\"((item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length == 1)\\\">Override</span> <span ng-if=\\\"((item.cww_overrides.primary_contact.id ? 1 : 0) + item.cww_overrides.bccs.length + item.cww_overrides.party_group_ids.length + (item.csl_overrides.primary_contact.id ? 1 : 0) + item.csl_overrides.bccs.length + item.csl_overrides.customer_ids.length + (item.cfs_overrides.primary_contact.id ? 1 : 0) + item.cfs_overrides.bccs.length + item.cfs_overrides.customer_ids.length > 1)\\\">Overrides</span> </span><span ng-if=\\\"(!item.cww_overrides.primary_contact.id && !item.cww_overrides.bccs.length && !item.cww_overrides.party_group_ids.length && !item.csl_overrides.primary_contact.id && !item.csl_overrides.bccs.length && !item.csl_overrides.customer_ids.length && !item.cfs_overrides.primary_contact.id && !item.cfs_overrides.bccs.length && !item.cfs_overrides.customer_ids.length)\\\" class=no_override>No overrides</span></span></div></td></tr></tbody></table></div></div></md-card-content></md-card><md-card class=discussion-chat ng-include=\\\"\\'/app/admin/support-requests/support-request-discussion-chat.html\\'\\\"></md-card><md-card class=support-request-log ng-include=\\\"\\'/app/admin/support-requests/support-request-log.html\\'\\\"></md-card></div><div ng-if=vm.failedToRetrieveData class=\\\"m-t m-b\\\" layout=row layout-align=\\\"center center\\\"><h2><span translate=\\\"Failed to retrive user details with error\\\"></span> {{vm.failedToRetrieveData}}</h2></div></cva-shell>\");}]);"],"sourceRoot":"/source/"}